Skip to Content
Private Network(UVPC)UpdateSecGroupAssociation

Change Security Group Binding Relationship - UpdateSecGroupAssociation

Overview

Only affects the security group ID being operated on, other existing bindings remain unaffected.

ℹ️ This interface is used to first unbind some security groups (parameter OldSecGroupId) from a single resource, and then bind some security groups (NewPrioritySecGroup).

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is UpdateSecGroupAssociation.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. See Region and Availability Zone ListYes
ProjectIdstringProject ID. Leave blank for the default project, sub-account must fill in. Please refer to GetProjectList APINo
ResourceIdstringResource IDYes
OldSecGroupId.NstringThe security group ID to be replaced. Supports array format, i.e., a string array.Yes
NewPrioritySecGroup.N.PriorityintNeed to bind the priority of the new security group. Support NewPrioritySecGroup in array format, i.e., pass the corresponding data in JSON format array.Yes
NewPrioritySecGroup.N.SecGroupIdstringSecurity Group ID to be newly boundYes

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=UpdateSecGroupAssociation &Region=AARqFomP &ProjectId=NLyPDsnf &SecGroupId.n=fqWNNxvJ &ResourceId.n=ercRryXn &NewSecGroupId.n=RQrYZhoX &NewPrioritySecGroup.N.SecGroupId=sMwScEex

Response Example

{ "Action": "UpdateSecGroupAssociationResponse", "RetCode": 0 }