Modify security group attributes

Last Updated: Jul 25, 2017

Description

Modify the properties of the specified security group, including the security group name and description.

Request Parameters

Name Type Required Description
Action String Yes Required parameter, with a value: ModifySecurityGroupAttribute.
RegionId String Yes The region ID
SecurityGroupId String Yes The ID of the security group
SecurityGroupName String No The security group name. The default value is blank. [2, 128] English or Chinese characters, must begin with an uppercase/lowercase letter or Chinese character. Can contain numbers, “.”, “_“ or “-“. It cannot begin with http:// or https://.
Description String No The description of the security group, which is a string of 2 to 256 characters.It cannot begin with http:// or https://.

Return Parameters

All are public return parameters. For details, see Public Return Parameters.

Error Code

Error Code Description Http status code Meaning
InvalidRegionId.NotFound The RegionId provided does not exist in our records. 404 The specified RegionId does not exist.
MissingParameter The input parameter RegionId that is mandatory for processing this request is not supplied. 400 The RegionId parameter is not specified.
MissingParameter The input parameter SecurityGroupId that is mandatory for processing this request is not supplied. 400 The SecurityGroupId parameter is not specified.
InvalidRegionId.NotFound The RegionId provided does not exist in our records. 404 The specified RegionId does not exist or is unauthorized.
InvalidSecurityGroupName.Malformed Specified security group name is not valid. 400 The specified SecurityGroupName format is invalid.
InvalidDescription.Malformed The specified parameter Description is not valid. 400 The specified DescriptionName format is invalidl.

Examples

Request Example

  1. https://ecs.aliyuncs.com/?Action=ModifySecurityGroupAttribute
  2. &SecurityGroupId=sg-F876FF7BA
  3. &RegionId=cn-hangzhou
  4. &SecurityGroupName=NewName
  5. &<Public Request Parameters>

Return Example

XML format

  1. <ModifySecurityGroupAttributeResponse>
  2. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
  3. </ModifySecurityGroupAttributeResponse>

JSON format

  1. {
  2. "RequestId":"CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
  3. }
Thank you! We've received your feedback.