v1.6.7
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
// Request struct for pin comptute to stack
|
||||
// PinToStackRequest struct to pin compute to stack
|
||||
type PinToStackRequest struct {
|
||||
// ID of the compute instance
|
||||
// Required: true
|
||||
@@ -23,13 +23,11 @@ type PinToStackRequest struct {
|
||||
Force bool `url:"force" json:"force"`
|
||||
}
|
||||
|
||||
// PinToStack pin compute to current stack
|
||||
// PinToStack pins compute to current stack
|
||||
func (c Compute) PinToStack(ctx context.Context, req PinToStackRequest) (uint64, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
return 0, validators.ValidationError(validationError)
|
||||
}
|
||||
return 0, validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudbroker/compute/pinToStack"
|
||||
|
||||
Reference in New Issue
Block a user