Scales in an application by reducing instances.
Debugging
Request headers
This operation does not have operation-specific request headers and uses only common request headers. For more information, see Common request and response headers.
Request syntax
PUT /pop/v1/sam/app/ScaleInApplicationWithInstanceIds HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
AppId | String | Query | Yes | 0099b7be-5f5b-4512-a7fc-56049ef1**** | The application ID. |
InstanceIds | String | Query | Yes | b2a8a925-477a-4ed7-b825-d5e22500**** | The instance IDs. Separate multiple instance IDs with commas (,). |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 91F93257-7A4A-4BD3-9A8E-2F6EAE6D**** | The request ID. |
Message | String | success | The returned message. Valid values:
|
TraceId | String | 0a98a02315955564772843261e**** | The trace ID that is used to query the details of the request. |
Data | Object | The information of the change order. | |
ChangeOrderId | String | 76fa5c0-9ebb-4bb4-b383-1f885447**** | The ID of the change order. |
ErrorCode | String | Null | The error code. Valid values:
|
Code | String | 200 | The HTTP status code. Valid values:
|
Success | Boolean | true | Indicates whether the information of the change order was queried. Valid values:
|
Examples
Sample requests
PUT /pop/v1/sam/app/ScaleInApplicationWithInstanceIds?AppId=0099b7be-5f5b-4512-a7fc-56049ef1****&InstanceIds=b2a8a925-477a-4ed7-b825-d5e22500**** HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ReduceApplicationCapacityByInstanceIdsResponse>
<RequestId>91F93257-7A4A-4BD3-9A8E-2F6EAE6D****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Data>
<ChangeOrderId>76fa5c0-9ebb-4bb4-b383-1f885447****</ChangeOrderId>
</Data>
<Code>200</Code>
<Success>true</Success>
</ReduceApplicationCapacityByInstanceIdsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "91F93257-7A4A-4BD3-9A8E-2F6EAE6D****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Data" : {
"ChangeOrderId" : "76fa5c0-9ebb-4bb4-b383-1f885447****"
},
"Code" : "200",
"Success" : true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidApplication.NotFound | The current application does not exist. | The specified application is not found. |
400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | The value of the %s parameter is invalid. This parameter cannot be left empty. |
400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | The value of the {%s} parameter is invalid. |
400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | The value %s of the {%s} parameter is invalid. |
400 | NoComputeResourceQuota.App.Exceed | You can create %s instances for each application. Please submit a ticket to raise the quota. | A maximum of %s instances can be created for each application. Join the DingTalk group 32874633 for technical support. |
400 | NoComputeResourceQuota.User.Exceed | Your account is limited to create %s instances. Please submit a ticket to raise the quota. | A maximum of %s instances can be created within your account. Join the DingTalk group 32874633 for technical support. |
400 | System.Upgrading | The system is being upgraded. Please try again later. | The system is being upgraded. Try again later. |
400 | Application.ChangerOrderRunning | An application change process is in progress. Please try again later. | An application change is in progress. Try again later. |
400 | Application.InvalidStatus | The application status is abnormal. Please try again later. | The application is in an abnormal state. Try again later. |
400 | Application.NotDeployYet | The application has not been deployed. Please deploy it and try again. | The application is not deployed. Deploy the application and try again. |
400 | unsupported.workload | The specified instances to scale in application does not support the workload | The application that you want to scale in by reducing instances does not support the workload. |
For a list of error codes, see Service error codes.