Security Group
CreateSecurityGroup
Creates a security group. For
example,
CreateSecurityGroup name=SecurityGroup1Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| name | The security group name. | 0.6 | ||
| description | The detailed description of the resource. | Yes | 0.6 | |
| resourceUuid | The resource UUID. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
DeleteSecurityGroup
Deletes a security group. For
example,
DeleteSecurityGroup uuid=4b6b54354448429db419cdb9ca2b17ffParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The security group UUID. | 0.6 | ||
| deleteMode | The delete mode. For more information, see Delete Resources. | Yes |
|
2.1 |
| resourceUuid | The resource UUID. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
QuerySecurityGroup
Queries a security group. For
example,
QuerySecurityGroup uuid=5a008ae4db7b4a7aa1010083f641cc80QuerySecurityGroup rules.uuid=c6173478f10347f0be3398b9ccaed1cbPrimitive Fields of Query
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| l3Network | L3 Network Inventory | 0.6 | |
| rules | Rules Inventory | 0.6 | |
| vmNics | VM NIC Inventory | 0.6 |
UpdateSecurityGroup
Updates a security group. For
example,
UpdateSecurityGroup uuid=5a008ae4db7b4a7aa1010083f641cc80Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The security group UUID. | 0.6 | ||
| name | The security group name. | 0.6 | ||
| description | The detailed description of the security group. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
ChangeSecurityGroupState
Changes the state of a security group. For example,
ChangeSecurityGroupState uuid=5a008ae4db7b4a7aa1010083f641cc80 stateEvent=enableParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The security group UUID. | 0.6 | ||
| stateEvent | The security group state. |
|
0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
AttachSecurityGroupToL3Network
Attaches a security group to an L3 network. For
example,
AttachSecurityGroupToL3Network securityGroupUuid=5a008ae4db7b4a7aa1010083f641cc80 \
l3NetworkUuid=9082f45fce9c46f19b2ab5ff117511d6Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| securityGroupUuid | The security group UUID. | 0.6 | ||
| l3NetworkUuid | The L3 network UUID. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
DetachSecurityGroupFromL3Network
Detaches a security group from an L3 network. For
example,
DetachSecurityGroupFromL3Network securityGroupUuid=5a008ae4db7b4a7aa1010083f641cc80 \
l3NetworkUuid=9082f45fce9c46f19b2ab5ff117511d6Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| securityGroupUuid | The security group UUID. | 0.6 | ||
| l3NetworkUuid | The L3 network UUID. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
GetCandidateVmNicForSecurityGroup
Obtains a VM NIC inventory that can use a security group. For
example,
GetCandidateVmNicForSecurityGroup securityGroupUuid=5a008ae4db7b4a7aa1010083f641cc80Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| securityGroupUuid | The security group UUID. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
AddVmNicToSecurityGroup
Adds a VM NIC to a security group. For
example,
AddVmNicToSecurityGroup securityGroupUuid=5a008ae4db7b4a7aa1010083f641cc80 \
vmNicUuids=3e6a4cc2eb0941edbac7af24e2ff932fParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| securityGroupUuid | The security group UUID. | 0.6 | ||
| vmNicUuids | The VM NIC UUID list. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
DeleteVmNicFromSecurityGroup
Deletes a VM NIC from a security group. For
example.
DeleteVmNicFromSecurityGroup securityGroupUuid=5a008ae4db7b4a7aa1010083f641cc80 \
vmNicUuids=3e6a4cc2eb0941edbac7af24e2ff932fParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| securityGroupUuid | The security group UUID. | 0.6 | ||
| vmNicUuids | The VM NIC UUID list. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
QueryVmNicInSecurityGroup
Queries a list of VM NICs that use a security group. For
example,
QueryVmNicInSecurityGroup securityGroupUuid=5a008ae4db7b4a7aa1010083f641cc80QueryVmNicInSecurityGroup vmNic.uuid=3e6a4cc2eb0941edbac7af24e2ff932fPrimitive Fields of Query
See Security Group Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| securityGroup | Security Group Inventory | 0.6 | |
| vmNic | VM NIC Inventory | The VM NICs that use the security group. | 0.6 |
AddSecurityGroupRule
Adds a rule to a security group. For example,
AddSecurityGroupRule rules="[{'type':'Ingress', 'protocol':'TCP', 'startPort':'22', \
'endPort':'22', 'allowedCidr':'0.0.0.0/0'}]" securityGroupUuid=090990371a5e4949a2a129628ba91275Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| securityGroupUuid | The security group UUID. | 0.6 | ||
| rules | The rules in the security group. | 0.6 | ||
| remoteSecurityGroupUuids | The security group that the rule takes effect. | Yes | 0.6 | |
| priority | The rule priority. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource rye is SecurityGroupVO. | Yes | 0.6 | |
| timeout | Yes |
DeleteSecurityGroupRule
Deletes a security group rule. For
example,
DeleteSecurityGroupRule ruleUuids=b59a266d49374b729cbcafbe2cc23f73Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| ruleUuids | The UUID list of the security group rule. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupRuleVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupRuleVO. | Yes | 0.6 | |
| timeout | Yes |
QuerySecurityGroupRule
Queries a security group rule. For
example,
QuerySecurityGroupRule uuid=b59a266d49374b729cbcafbe2cc23f73QuerySecurityGroupRule securityGroup.uuid=090990371a5e4949a2a129628ba91275Primitive Fields of Query
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| securityGroup | Security Group Inventory | 0.6 |
ValidateSecurityGroupRule
Validate a security group rule. For
example,
ValidateSecurityGroupRule securityGroupUuid=5309eb9abfea4694a1d589f1c3563553 type=Egress protocol=ALLParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| securityGroupUuid | The security group UUID. | 4.7.21 | ||
| type | The rule type. |
|
4.7.21 | |
| protocol | The protocol type of security rule. |
|
4.7.21 | |
| remoteSecurityGroupUuid | The remote security group UUID. | Yes | 4.7.21 | |
| ipVersion | The IP version. | Yes |
|
4.7.21 |
| srcIpRange | The range of the source IP of the rule. | Yes | 4.7.21 | |
| dstIpRange | The range of the target IP of the rule. | Yes | 4.7.21 | |
| dstPortRange | The range of the target port of the rule. | Yes | 4.7.21 | |
| action | The default action of the rule. | Yes |
|
4.7.21 |
| startPort | The startport of the rule. | Yes | 4.7.21 | |
| endPort | The endport of the rule. | Yes | 4.7.21 | |
| allowedCidr | The IP range of the rule. | Yes | 4.7.21 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupRuleVO. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupRuleVO. | Yes | 4.7.21 |
ChangeSecurityGroupRule
Change a security group rule. For
example,
ChangeSecurityGroupRule uuid=1dd5d2e8229f445ca1779b9f977541b0Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The security group UUID. | 4.7.21 | ||
| description | The description of the rule. | Yes | 4.7.21 | |
| remoteSecurityGroupUuid | The remote security group UUID. | Yes | 4.7.21 | |
| action | The default action of the rule. | Yes |
|
4.7.21 |
| state | The rule state. | Yes |
|
4.7.21 |
| priority | The rule priority. | Yes | 4.7.21 | |
| protocol | The traffic protocol type. | Yes |
|
4.7.21 |
| srcIpRange | The range of the source IP of the rule. | Yes | 4.7.21 | |
| dstIpRange | The range of the target IP of the rule. | Yes | 4.7.21 | |
| dstPortRange | The range of the target port of the rule. | Yes | 4.7.21 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 4.7.21 |
ChangeSecurityGroupRuleState
Change the security group rule state. For
example,
ChangeSecurityGroupRuleState securityGroupUuid=5309eb9abfea4694a1d589f1c3563553
ruleUuids='["uuid=1dd5d2e8229f445ca1779b9f977541b0","uuid=c7255fff6c194cb7adc33e28de68cc7e"]' state=Disabled
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| securityGroupUuid | The security group UUID. | 4.7.21 | ||
| ruleUuids | The rule UUID list. | 4.7.21 | ||
| state | The rule state. | Yes |
|
4.7.21 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupVO. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupVO. | Yes | 4.7.21 |
UpdateSecurityGroupRulePriority
Update the security group rule priority. For
example,
UpdateSecurityGroupRulePriority securityGroupUuid=5309eb9abfea4694a1d589f1c3563553 type='Ingress'
rules='[{"ruleUuid":"dbc5f1add1de4b848f69ca7507c56441","priority":1},{"ruleUuid":"c7255fff6c194cb7adc33e28de68cc7e","priority":2}]'Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| securityGroupUuid | The security group UUID. | 4.7.21 | ||
| type | The rule type. |
|
4.7.21 | |
| rules | The rule state. | 4.7.21 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupRuleVO. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupRuleVO. | Yes | 4.7.21 |
QueryVmNicSecurityPolicy
Query a VM instance NIC seurity policy. For
example,
QueryVmNicSecurityPolicy vmNic.uuid=853f9465c02946eaa30ece686d0aceb9Primitive Fields of Query
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| vmNic | vm nic inventory | The VM NIC with the security group applied. | 4.7.21 |
ChangeVmNicSecurityPolicy
Change a VM Instance NIC security policy. For
example,
ChangeVmNicSecurityPolicy vmNicUuid=853f9465c02946eaa30ece686d0aceb9 ingressPolicy=DENYParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vmNicUuid | The VM NIC UUID. | 4.7.21 | ||
| ingressPolicy | The ingress policy of the NIC. | Yes |
|
4.7.21 |
| egressPolicy | The egress policy of the NIC. | Yes |
|
4.7.21 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupRuleVO. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupRuleVO. | Yes | 4.7.21 |
SetVmNicSecurityGroup
Set a VM NIC security group. For
example,
SetVmNicSecurityGroup vmNicUuid=3449c8442f5443e3b245cf3d80762e2f
refs='[{"securityGroupUuid": "5309eb9abfea4694a1d589f1c3563553","priority":1}]'Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vmNicUuid | The VM NIC UUID. | 4.7.21 | ||
| refs | The security group attached to the NIC. | 4.7.21 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is SecurityGroupRuleVO. | Yes | 4.7.21 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is SecurityGroupRuleVO. | Yes | 4.7.11 |
