doc-exports/docs/vpc/api-ref/vpc_apiv3_0013.html
fanqinying 9e7606681c VPC API 20241009 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: fanqinying <fanqinying@huawei.com>
Co-committed-by: fanqinying <fanqinying@huawei.com>
2024-11-21 09:26:53 +00:00

557 lines
28 KiB
HTML

<a name="vpc_apiv3_0013"></a><a name="vpc_apiv3_0013"></a>
<h1 class="topictitle1">Updating a Security Group</h1>
<div id="body1708331107508"><div class="section"><h4 class="sectiontitle">Function</h4><p>This API is used to update a security group.</p>
</div>
<div class="section" id="vpc_apiv3_0013__atuogenerate_1"><h4 class="sectiontitle">URI</h4><p>PUT /v3/{project_id}/vpc/security-groups/{security_group_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p>Project ID.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p>security_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p>Security group ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_apiv3_0013__request_UpdateSecurityGroupRequestBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>dry_run</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p>Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><ul><li><p>Whether to only send the check request.</p>
</li><li><p>The value can be one of the following:</p>
<ul><li><p><strong>true</strong>: A check request will be sent and the security group will not be updated. Check items include mandatory parameters, request format, and constraints. If the check fails, the system returns an error. If the check succeeds, response code 202 will be returned.</p>
</li><li><p><strong>false</strong> (default value): A request will be sent and the security group will be updated.</p>
</li></ul>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>security_group</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p><a href="#vpc_apiv3_0013__request_UpdateSecurityGroupOption">UpdateSecurityGroupOption</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p>Request body for updating a security group.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_apiv3_0013__request_UpdateSecurityGroupOption"></a><a name="request_UpdateSecurityGroupOption"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_apiv3_0013__request_UpdateSecurityGroupOption" frame="border" border="1" rules="all"><caption><b>Table 3 </b>UpdateSecurityGroupOption</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><ul><li><p>Security group name.</p>
</li><li><p>The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><ul><li><p>Supplementary information about the security group.</p>
<p>'- The value can contain up to 255 characters and cannot contain angle brackets (&lt; or &gt;).</p>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Response Parameters</h4><p><strong>Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_apiv3_0013__response_UpdateSecurityGroupResponseBody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p>request_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p>Request ID.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p>security_group</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p><a href="#vpc_apiv3_0013__response_SecurityGroupInfo">SecurityGroupInfo</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p>Response body for updating a security group.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_apiv3_0013__response_SecurityGroupInfo"></a><a name="response_SecurityGroupInfo"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_apiv3_0013__response_SecurityGroupInfo" frame="border" border="1" rules="all"><caption><b>Table 5 </b>SecurityGroupInfo</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><ul><li><p>Security group ID, which uniquely identifies the security group.</p>
</li><li><p>The value is in UUID format with hyphens (-).</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><ul><li><p>Security group name.</p>
</li><li><p>The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><ul><li><p>Description about the security group.</p>
</li><li><p>The value can contain up to 255 characters and cannot contain angle brackets (&lt; or &gt;).</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><ul><li><p>ID of the project to which the security group belongs.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>created_at</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><ul><li><p>Time when the security group was created.</p>
</li><li><p>The value is a UTC time in the format of <em>yyyy-MM-ddTHH:mm:ssZ</em>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><ul><li><p>Time when the security group was updated.</p>
</li><li><p>The value is a UTC time in the format of <em>yyyy-MM-ddTHH:mm:ssZ</em>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>enterprise_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><ul><li><p>ID of the enterprise project to which the security group belongs.</p>
</li><li><p>The project ID can be <strong>0</strong> or a string that contains a maximum of 36 characters in UUID format with hyphens (-). <strong>0</strong> indicates the default enterprise project.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>tags</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>Array of <a href="#vpc_apiv3_0013__response_Tag">Tag</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><ul><li><p>Security group tags. For details, see the tag objects.</p>
</li><li><p>Value range: 0 to 20 key-value pairs.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p>security_group_rules</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p>Array of <a href="#vpc_apiv3_0013__response_SecurityGroupRule">SecurityGroupRule</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p>Security group rules.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_apiv3_0013__response_Tag"></a><a name="response_Tag"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_apiv3_0013__response_Tag" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Tag</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p>key</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><ul><li><p>Tag key.</p>
</li><li><p>Value ranges:</p>
<ul><li><p>Each key can contain up to 36 Unicode characters and cannot be left blank.</p>
</li><li><p>Each key value of a resource must be unique.</p>
</li><li><p>The value can contain:</p>
<ul><li><p>Letters</p>
</li><li><p>Digits</p>
</li><li><p>Special characters: underscores (_) ,at signs (@), and hyphens (-)</p>
</li></ul>
</li></ul>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p>value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><ul><li><p>Tag value.</p>
</li><li><p>Value range:</p>
<ul><li><p>Each value can contain up to 43 Unicode characters and can be left blank.</p>
</li><li><p>The value can contain:</p>
<ul><li><p>Letters</p>
</li><li><p>Digits</p>
</li><li><p>Special characters: underscore (_), at signs (@), and hyphen (-)</p>
</li></ul>
</li></ul>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_apiv3_0013__response_SecurityGroupRule"></a><a name="response_SecurityGroupRule"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_apiv3_0013__response_SecurityGroupRule" frame="border" border="1" rules="all"><caption><b>Table 7 </b>SecurityGroupRule</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Security group rule ID, which uniquely identifies the security group rule.</p>
</li><li><p>The value is in UUID format with hyphens (-).</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Provides supplementary information about the security group rule.</p>
</li><li><p>The value can contain no more than 255 characters and cannot contain angle brackets (&lt; or &gt;).</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>security_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>ID of the security group to which the security group rule belongs.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>direction</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Inbound or outbound direction of a security group rule.</p>
</li><li><p>The value can be:</p>
<ul><li><p>ingress: inbound direction.</p>
</li><li><p>egress: outbound direction.</p>
</li></ul>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>protocol</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Protocol type</p>
</li><li><p>The value can be <strong>icmp</strong>, <strong>tcp</strong>, <strong>udp</strong>, <strong>icmpv6</strong>, or an IP number.</p>
</li><li><p>Constraints:</p>
<ul><li><p>If the parameter is left blank, all protocols are supported.</p>
</li><li><p>When the protocol is <strong>icmpv6</strong>, IP version should be <strong>IPv6</strong>.</p>
</li><li><p>When the protocol is <strong>icmp</strong>, IP version should be <strong>IPv4</strong>.</p>
</li></ul>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>ethertype</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>IP version</p>
</li><li><p>The value can be <strong>IPv4</strong> or <strong>IPv6</strong>.</p>
</li><li><p>If you do not set this parameter, <strong>IPv4</strong> is used by default.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>multiport</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Port or port range</p>
</li><li><p>The value can be a single port (80), a port range (1-30), or inconsecutive ports separated by commas (22,3389,80).</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>action</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Action of the security group rule.</p>
</li><li><p>The value can be: <strong>allow</strong>, <strong>deny</strong>.</p>
</li><li><p>The default value is <strong>deny</strong>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>priority</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Rule priority.</p>
</li><li><p>The value is from <strong>1</strong> to <strong>100</strong>. The value <strong>1</strong> indicates the highest priority.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>remote_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>ID of the remote security group, which allows or denies traffic to and from the security group.</p>
</li><li><p>Value range: ID of an existing security group.</p>
</li><li><p>The parameter value is mutually exclusive with parameters <strong>remote_ip_prefix</strong> and <strong>remote_address_group_id</strong>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>remote_ip_prefix</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Remote IP address.</p>
<ul><li><p>If direction is set to <strong>egress</strong>, the parameter specifies the source IP address.</p>
</li><li><p>If direction is set to <strong>ingress</strong>, the parameter specifies the destination IP address.</p>
</li></ul>
</li><li><p>The value is an IP address or a CIDR block.</p>
</li><li><p>Constraints:</p>
<ul><li><p>The parameter value is mutually exclusive with parameters <strong>remote_group_id</strong> and <strong>remote_address_group_id</strong>.</p>
</li></ul>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>remote_address_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>ID of the remote IP address group.</p>
</li><li><p>Value range: ID of an existing IP address group</p>
</li><li><p>The parameter value is mutually exclusive with parameters <strong>remote_ip_prefix</strong> and <strong>remote_group_id</strong>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>created_at</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Time when the security group rule is created.</p>
</li><li><p>UTC time in the format of <em>yyyy-MM-ddTHH:mm:ssZ</em>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>Time when the security group rule is updated.</p>
</li><li><p>UTC time in the format of <em>yyyy-MM-ddTHH:mm:ssZ</em>.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><ul><li><p>ID of the project to which the security group rule belongs.</p>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Example Requests</h4><p>Change the name of the security group whose ID is 1d8b19c7-7c56-48f7-a99b-4b40eb390967 to <strong>security_group_2</strong> and its description to <strong>modified description</strong>.</p>
<pre class="screen">PUT https://{Endpoint}/v3/{project_id}/vpc/security-groups/1d8b19c7-7c56-48f7-a99b-4b40eb390967
{
"security_group" : {
"name" : "security_group_2",
"description" : "modified description"
}
}</pre>
</div>
<div class="section"><h4 class="sectiontitle">Example Responses</h4><p><strong>Status code: 200</strong></p>
<p>Normal response to the PUT operation. For more status codes, see <a href="vpc_api_0002.html">Status Codes</a>.</p>
<ul><li><pre class="screen">{
"security_group" : {
"id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"name" : "security_group_2",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"description" : "modified description",
"enterprise_project_id" : 0,
"tags" : [ ],
"security_group_rules" : [ {
"id" : "f11a3824-ac19-4fad-b4f1-c5f4a6dd0a80",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"remote_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction" : "ingress",
"description" : "",
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00",
"ethertype" : "IPv6",
"action" : "allow",
"priority" : 100,
"protocol" : null,
"multiport" : null,
"remote_ip_prefix" : null,
"remote_address_group_id" : null
}, {
"id" : "3d6480e8-9ea4-46dc-bb1b-8db190cd5677",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction" : "egress",
"description" : "",
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00",
"ethertype" : "IPv6",
"action" : "allow",
"priority" : 100,
"protocol" : null,
"multiport" : null,
"remote_ip_prefix" : null,
"remote_group_id" : null,
"remote_address_group_id" : null
}, {
"id" : "9581f18c-1fdd-43da-ace9-7758a56ef28a",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction" : "egress",
"description" : "",
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00",
"ethertype" : "IPv4",
"action" : "allow",
"priority" : 100,
"protocol" : null,
"multiport" : null,
"remote_ip_prefix" : null,
"remote_group_id" : null,
"remote_address_group_id" : null
}, {
"id" : "a3ba270e-e58b-432d-a912-aeb7eace9fb8",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"remote_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction" : "ingress",
"description" : "",
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00",
"ethertype" : "IPv4",
"action" : "allow",
"priority" : 100,
"protocol" : null,
"multiport" : null,
"remote_ip_prefix" : null,
"remote_address_group_id" : null
} ],
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00"
},
"request_id" : "a8cf4f79ca3c22ca685e7e8872e8c20b"
}</pre>
</li></ul>
</div>
<div class="section"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_apiv3_0013__status_code" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p>Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>Normal response to the PUT operation. For more status codes, see <a href="vpc_api_0002.html">Status Codes</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Error Codes</h4><p>See <a href="vpc_api_0003.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpc_apiv3_0009.html">Security Group</a></div>
</div>
</div>