セキュリティグループを作成します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ens:CreateSecurityGroup |
create |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| SecurityGroupName |
string |
任意 |
セキュリティグループの名前。長さは 2~128 文字で、数字、コロン (:)、アンダースコア (_)、ハイフン (-) を含めることができます。先頭は英字で始める必要があります。また、 |
Dcdn1:2_3-4 |
| Description |
string |
任意 |
セキュリティグループの説明。長さは 2~256 文字で、先頭は英字で始める必要があります。また、 |
testDescription |
| Permissions |
array<object> |
任意 |
セキュリティグループルール。N の有効値:0~200。 |
|
|
object |
任意 |
セキュリティグループルール。 |
||
| Direction |
string |
必須 |
セキュリティグループルールの方向。有効値:
|
ingress |
| IpProtocol |
string |
必須 |
トランスポート層プロトコル。有効値:
列挙値:
|
TCP |
| PortRange |
string |
必須 |
セキュリティグループルールの宛先ポート範囲。有効値:
|
80/80 |
| SourcePortRange |
string |
任意 |
セキュリティグループルールの送信元ポート範囲。有効値:
|
22/22 |
| Policy |
string |
必須 |
セキュリティグループルールのポリシー。有効値:
列挙値:
|
Accept |
| DestCidrIp |
string |
任意 |
宛先 IPv4 CIDR ブロック。CIDR ブロックおよび IPv4 アドレスがサポートされます。 |
0.0.0.0/0 |
| Description |
string |
任意 |
セキュリティグループルールの説明。長さは 2~256 文字で、 |
testDescription |
| Priority |
integer |
必須 |
セキュリティグループルールの優先度。値が小さいほど優先度が高くなります。有効値:1~100。 |
1 |
| SourceCidrIp |
string |
任意 |
送信元 IPv4 CIDR ブロック。CIDR ブロックおよび IPv4 アドレスがサポートされます。 |
0.0.0.0/0 |
| Ipv6SourceCidrIp |
string |
任意 |
||
| Ipv6DestCidrIp |
string |
任意 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエストの ID。 |
760bad53276431c499e30dc36f6b26be |
| SecurityGroupId |
string |
新しく作成されたセキュリティグループの ID。 |
sg-bp1fg655nh68xyz9i*** |
例
成功レスポンス
JSONJSON
{
"RequestId": "760bad53276431c499e30dc36f6b26be",
"SecurityGroupId": "sg-bp1fg655nh68xyz9i***"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | NoPermission | Permission denied. | |
| 400 | CallInterface | Call Interface Happen Error. | |
| 400 | ens.interface.error | Failed to call API. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | AuthorizationLimitExceed | The limit of authorization records in the security group reaches. | |
| 400 | SecurityGroupRuleConflict.Duplicated | The SecurityGroup rule already exists. | |
| 400 | InvalidParameter.PortRange | The parameter PortRange is not valid. | |
| 400 | InvalidParameter.CidrIp | The parameter CidrIp is not valid. | |
| 400 | QuotaExceed.SecurityGroup | The maximum number of security groups is reached. | |
| 400 | InvalidParameter.DestIpConflict | The Parameters DestCidrIp and Ipv6DestCidrIp cannot be set at the same time. | |
| 400 | InvalidParameter.Ipv4ProtocolConflictWithIpv6Address | IPv6 address cannot be specified for IPv4-specific protocol. | |
| 400 | InvalidParameter.Ipv6ProtocolConflictWithIpv4Address | IPv4 address cannot be specified for IPv6-specific protocol. | |
| 400 | InvalidParameter.SourceIpConflict | The Parameters SourceCidrIp and Ipv6SourceCidrIp cannot be set at the same time. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。