ModifySecurityGroupAttribute

Last Updated: Jan 31, 2018

Description

Modifies the attribute of the specified security group, including the security group name and description.

Request parameters

Name Type Required Description
Action String Yes The name of this interface. Value: ModifySecurityGroupAttribute.
RegionId String Yes The region ID. For more information, see Regions and zones.
SecurityGroupId String Yes The ID of the security group.
SecurityGroupName String No The security group name.
  • Can contain [2, 128] characters in length.
  • Must begin with an English letter.
  • Can contain digits, periods (.), underscores (_), and hyphens (-).
  • Cannot begin with http:// or https://.
Description String No The description of the security group.
  • Can contain [2, 256] characters in length.
  • Cannot begin with http:// or https://.
  • Cannot be a null string, otherwise, the Description is ignored in the request.

Response parameters

All are common response parameters. For more information, see Common parameters.

Examples

Request example

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

Response 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. }

Error codes

Error code Error message HTTP status code Meaning
InvalidSecurityGroupDiscription.Malformed Specified security group description is not valid. 400 The specified Description is invalid.
InvalidSecurityGroupName.Malformed Specified security group name is not valid. 400 The specified SecurityGroupName is invalid.
InvalidSecurityGroupId.NotFound The specified SecurityGroupId does not exist. 404 The specified SecurityGroupId is invalid.
Thank you! We've received your feedback.