AssociateSecGroupDynamic - AssociateSecGroupDynamic
Overview
AssociateSecGroup, give the secgroup highest priority as 1, dynamically adjust other binding priorities.
💡 Note: If the binding quota for a resource is already full, an error will be returned; if the resource is already bound to the specified security group, the resource will be ignored; if the resource has already used the highest priority to bind another security group, the priority of the existing binding will be dynamically adjusted (lowered by one level sequentially), and the security group specified in the API will be bound with the highest priority.
ℹ️ Bind the security group with the highest priority. If the highest priority is already in use, dynamically adjust the priority. If the API needs to adjust priorities for a large number of resources, the process may be time-consuming. Therefore, the batch resource limit is set to 20 (exceeding this number will result in an error).
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is AssociateSecGroupDynamic . | 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. Leave blank for the default project; sub-accounts must fill in. Please refer to GetProjectList API | No |
ResourceId.N | string | Resource short ID array. Supports array mode. Type is a string array. | Yes |
SecGroupId | string | Security Group ID | Yes |
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=AssociateSecGroupDynamic
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=jDgGuzXa
&ResourceId.n=ltQAcQwA
&SecGroupId=LfVLuWmM
Response Example
{
"Action": "AssociateSecGroupDynamicResponse",
"Failed": [
{
"Message": "wsVkVbAz",
"ResourceId": "TJUTyVlE"
}
],
"RetCode": 0
}