Bind Resources to Security Group - AssociateSecGroup
Overview
Bind resources to security group
💡 Multiple resources and security groups cannot be passed simultaneously. Repeated binding is supported, and this interface is also used to modify binding priorities.
ℹ️ Only supports binding resources of the same resource type
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is AssociateSecGroup . | 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. Please refer to GetProjectList API | 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, Security Group Participation, and this field only supports one batch. Supports string array. | Yes |
PrioritySecGroup.N.Priority | int | Binding priority. This field and resource ID only support one batch. Supports JSON format arrays of PrioritySecGroup. | Yes |
PrioritySecGroup.N.SecGroupId | string | Security Group ID. This field and Resource ID only support one batch. Supports JSON format array of PrioritySecGroup. | 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=AssociateSecGroup
&Region=OUsdiWDK
&ProjectId=gWLANZey
&FWId=MwGpFQZd
&ResourceType=IJUSubKV
&ResourceId=fworMOuc
&PrioritySecGroup.N.SecGroupId=wSALafiE
Response Example
{
"Action": "AssociateSecGroupResponse",
"RetCode": 0
}