Updates the virtual private cloud (VPC) that is bound to a namespace.
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
POST /pop/v1/sam/namespace/updateNamespaceVpc HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
NamespaceId | String | Query | No | cn-beijing:test | The long ID of the namespace. If you configure this parameter, the long ID take effects and the value of the NameSpaceShortId parameter is ignored. To ensure compatibility, we recommend that you specify a short namespace ID. |
VpcId | String | Query | Yes | vpc-2ze0i263cnn311nvj**** | The VPC ID. The value of this parameter is used to replace the existing VPC ID. |
NameSpaceShortId | String | Query | No | test | The short ID of the namespace. You do not need to specify a region ID. We recommend that you configure this parameter. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 91F93257-7A4A-4BD3-9A7E-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. |
ErrorCode | String | Null | The error code. Valid values:
|
Code | String | 200 | The HTTP status code. Valid values:
|
Success | Boolean | true | Indicates whether the VPC was updated. Valid values:
|
Examples
Sample requests
POST /pop/v1/sam/namespace/updateNamespaceVpc?NameSpaceShortId=test&VpcId=vpc-2ze0i263cnn311nvj**** 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
<UpdateNamespaceVpcResponse>
<RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Code>200</Code>
<Success>true</Success>
</UpdateNamespaceVpcResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Code" : "200",
"Success" : true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | DeleteFail.NamespaceHasIngress | Ingress detected when deleting the namespace. | The namespace that you want to delete contains routing rules. |
400 | Namespace.AppExists | Please delete the application first. | The namespace contains applications. Remove the applications and try again. |
For a list of error codes, see Service error codes.