You need to enable JavaScript to run this app.
导航

ModifySecurityGroupAttributes

最近更新时间2024.01.10 10:41:28

首次发布时间2021.07.29 14:11:53

调用 ModifySecurityGroupAttributes 接口,修改安全组的名称和描述。

调用说明

以下可选参数如不配置,则保持原有配置。

调试

请求参数

参数名称
类型
是否必选
示例值
描述
ActionStringModifySecurityGroupAttributes系统规定参数。取值: ModifySecurityGroupAttributes。
VersionString2020-04-01API版本信息,取值为:2020-04-01。

SecurityGroupId

String

sg-bp67acfmxazb4p****

安全组ID。
您可以调用 DescribeSecurityGroups 接口,查询安全组的ID。

SecurityGroupName

String

sg-1

安全组的名称。

  • 长度限制为1 ~ 128个字符。
  • 需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。

Description

String

sg_1

安全组的描述信息。

  • 长度限制为0~ 255个字符。
  • 需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。

返回数据

参数名称
类型
示例值
描述
RequestIdString2021062415303301022514515207C4****请求ID。

请求示例

GET /?Action=ModifySecurityGroupAttribute&Version=2020-04-01&SecurityGroupId=sg-bp67acfmxazb4p****&SecurityGroupName=sg-1 HTTP/1.1
Host: open.volcengineapi.com
Service: vpc
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2021062415303301022514515207C4****",
        "Action": "ModifySecurityGroupAttributes",
        "Version": "2020-04-01",
        "Service": "vpc",
        "Region": "cn-beijing"
    },
   "Result": {
        "RequestId": "2021062415303301022514515207C4****"
    }
}

错误码

此处仅展示当前API的错误码,更多错误码请参见公共错误码

HttpCode
错误码
错误信息
描述
400InvalidName.MalformedThe specified name is malformed. Ensure the maximum length of name is 128.指定的名称格式不合法。名称长度不能超过128个字符。
400InvalidName.MalformedThe specified name is malformed.指定的名称格式不合法。请修复名称格式后重试。
400InvalidDescription.MalformedThe specified description is malformed. Ensure the maximum length of description is 255.指定的描述格式不合法。描述长度不能超过255个字符。
400InvalidDescription.MalformedThe specified description is malformed.指定的描述格式不合法。请修复描述格式后重试。
403ForbiddenYou are not authorized to perform operations on the specified security group. The specified security group is a service-managed security group.无权限对指定安全组进行操作。指定的安全组为云产品托管的安全组。
404InvalidSecurityGroupId.NotFoundThe specified security group does not exist.指定的安全组不存在。