Disassociates an endpoint from a security group.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DetachSecurityGroupFromVpcEndpoint

The operation that you want to perform. Set the value to DetachSecurityGroupFromVpcEndpoint.

EndpointId String Yes ep-hp33b2e43fays7s8****

The ID of the endpoint that you want to disassociate from the security group.

RegionId String Yes eu-west-1

The ID of the region where the endpoint is created. You can call the DescribeRegions operation to query region IDs.

SecurityGroupId String Yes sg-hp3c8qj1tyct90ej****

The ID of the security group from which you want to disassociate the endpoint.

DryRun Boolean No false

Specifies whether to only check the API request. Valid values:

true: only checks the API request. If you select this option, the endpoint is not disassociated from the security group after the request passes the check. Check items include whether the AccessKey pair is valid, whether the RAM user is authorized, and whether the required parameters are specified. If the check fails to meet the requirements in the check items, the corresponding error message is returned. If the request meets the requirements in the check items, the DryRunOperation error code is returned.

false (default): checks the API request. After the request passes the check, the 2XX HTTP status code is returned, and the endpoint is disassociated from the security group.

ClientToken String No 0c593ea1-3bea-11e9-b96b-88e9fe637760

The client token that is used to ensure the idempotence of the request. You can use the client to generate a value that is unique among different requests. ClientToken can contain only ASCII characters and cannot exceed 64 characters in length.

Response parameters

Parameter Type Example Description
RequestId String 8D778FF9-7640-4C13-BCD6-9265CA9A2F81

The ID of the request.

Examples

Sample requests

https://[Endpoint]/?Action=DetachSecurityGroupFromVpcEndpoint
&EndpointId=ep-hp33b2e43fays7s8****
&RegionId=eu-west-1
&SecurityGroupId=sg-hp3c8qj1tyct90ej****
&<Common request parameters>

Sample success responses

XML format

<DetachSecurityGroupFromVpcEndpointResponse>
        <RequestId>8D778FF9-7640-4C13-BCD6-9265CA9A2F81</RequestId>
</DetachSecurityGroupFromVpcEndpointResponse>

JSON format

{
  "RequestId": "8D778FF9-7640-4C13-BCD6-9265CA9A2F81"
}

Error codes

HttpCode Error code Error message Description
400 SecurityGroupNotFound The specified security group does not exist. The error message returned because the specified security group does not exist.
400 EndpointMustContainSecurityGroup The specified endpoint must have at least one security group. The error message returned because the endpoint must be associated with at least one security group.

For a list of error codes, visit the API Error Center.