Memanggil CreateSecurityGroup untuk membuat grup keamanan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:CreateSecurityGroup |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| SecurityGroupName |
string |
No |
Nama grup keamanan. Panjang nama harus antara 2 hingga 128 karakter dan dapat berisi huruf bahasa Inggris atau karakter Mandarin. Nama harus diawali dengan huruf kapital, huruf kecil, atau karakter Mandarin. Tidak boleh diawali dengan http:// atau https://. Dapat berisi angka, titik dua (:), garis bawah (_), atau tanda hubung (-). Nilai default: kosong. |
Dcdn1:2_3-4 |
| Description |
string |
No |
Deskripsi. Panjang deskripsi harus antara 2 hingga 256 karakter dan harus diawali dengan huruf atau karakter Mandarin. Tidak boleh diawali dengan http:// atau https://. |
testDescription |
| Permissions |
array<object> |
No |
Array aturan grup keamanan. Panjang array adalah 0 hingga 200. |
|
|
object |
No |
Aturan grup keamanan. |
||
| Direction |
string |
Yes |
Arah otorisasi.
|
ingress |
| IpProtocol |
string |
Yes |
Jenis protokol. Nilai yang valid:
Valid values:
|
TCP |
| PortRange |
string |
Yes |
Rentang port tujuan yang terbuka untuk setiap protokol dalam grup keamanan. Nilai yang valid:
|
80/80 |
| SourcePortRange |
string |
No |
Rentang port sumber yang terbuka untuk setiap protokol dalam grup keamanan. Nilai yang valid:
|
22/22 |
| Policy |
string |
Yes |
Izin akses. Nilai yang valid:
Valid values:
|
Accept |
| DestCidrIp |
string |
No |
Blok CIDR IPv4 tujuan. Mendukung rentang alamat IP dalam format CIDR dan format IPv4. |
0.0.0.0/0 |
| Description |
string |
No |
Deskripsi. Panjang deskripsi harus antara 2 hingga 256 karakter dan tidak boleh diawali dengan http:// atau https://. |
testDescription |
| Priority |
integer |
Yes |
Prioritas aturan grup keamanan. Nilai yang lebih kecil menunjukkan prioritas yang lebih tinggi. Nilai yang valid: 1 hingga 100. |
1 |
| SourceCidrIp |
string |
No |
Blok CIDR IPv4 sumber. Mendukung rentang alamat IP dalam format CIDR dan format IPv4. |
0.0.0.0/0 |
| Ipv6SourceCidrIp |
string |
No |
||
| Ipv6DestCidrIp |
string |
No |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
760bad53276431c499e30dc36f6b26be |
| SecurityGroupId |
string |
ID grup keamanan. |
sg-bp1fg655nh68xyz9i*** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "760bad53276431c499e30dc36f6b26be",
"SecurityGroupId": "sg-bp1fg655nh68xyz9i***"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.