Unbind resources from the security group - DisassociateSecGroup
Overview
Unbind Security Group and Resource Binding Relationship
💡 Batch Use of Arrays
ℹ️ Only passing the security group means unbinding all associations of the security group; only passing the resource means unbinding all associations of the resource; resources and security groups do not support passing multiple entries simultaneously.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is DisassociateSecGroup . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See Region and Availability Zone List | Yes |
ProjectId | string | Project ID. If not filled, it defaults to the default project. Sub-accounts must fill this in. Please refer to GetProjectList API | No |
SecGroupId.N | string | Security Group ID. If not provided, it indicates that all resources bound to the security group will be unbound. At least one of Security Group ID or Resource ID must be provided, and only one batch is allowed. Supports string array format. | No |
ResourceId.N | string | Resource ID, if not provided, indicates unbinding all security groups from the resource. At least one of Security Group ID or Resource ID must be provided, and only one batch is allowed. Supports string array format. | No |
Force | boolean | Whether to force unbinding. Default is false. True indicates forced unbinding, used for unbinding before resource deletion, because resources with security group features must be bound to at least one security group, and normally unbinding all security groups is not allowed. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Example
Request Example
https://api.dezai.com/?Action=DisassociateSecGroup
&Region=VGZgsWQX
&ProjectId=akzSYKVG
&ResourceType=ywlgdbdm
&SecGroupId.n=gsnMRBsK
&ResourceId.n=CLJgIEDW
&Force=true
Response Example
{
"Action": "DisassociateSecGroupResponse",
"RetCode": 0
}