Skip to Content
Private Network(UVPC)AssociateSecGroup

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 NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is AssociateSecGroup.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. Please refer to GetProjectList APIYes
ProjectIdstringProject ID. Leave blank for the default project, sub-accounts must fill in. Please refer to GetProjectList APINo
ResourceId.NstringResource Short ID, Security Group Participation, and this field only supports one batch. Supports string array.Yes
PrioritySecGroup.N.PriorityintBinding priority. This field and resource ID only support one batch. Supports JSON format arrays of PrioritySecGroup.Yes
PrioritySecGroup.N.SecGroupIdstringSecurity Group ID. This field and Resource ID only support one batch. Supports JSON format array of PrioritySecGroup.Yes

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns 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 }