Network ServicesSecurity Group

DeleteSecurityGroupRule

DELETE/zstack/v1/security-groups/rules?ruleUuids={ruleUuids}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 56ec3e843f8e48d1b3cf9e848885dc81" \
-X DELETE http://localhost:8080/zstack/v1/security-groups/rules?ruleUuids=1f0becde585e39d280acbd6c5b21bd39

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
ruleUuidsListbodyThe list of security group rule UUIDs 0.6
systemTags (Optional)ListbodySystem tags 0.6
userTags (Optional)ListbodyUser tags 0.6

API Response

Response Example

{
  "inventory": {
    "uuid": "06abc64deb0b4c8c9dc8831743e34662",
    "name": "web",
    "description": "for test",
    "state": "Enabled",
    "createDate": "Jun 7, 2017 9:20:23 PM",
    "lastOpDate": "Jun 7, 2017 9:20:23 PM",
    "internalId": 0.0
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See error0.6
inventorySecurityGroupInventorySee inventory0.6

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier for the error, for example SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot error: the source error that caused the current error. If there is no original error, this field is null0.6

inventory

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource, uniquely identifying the resource0.6
nameStringThe resource name0.6
descriptionStringThe detailed description of the resource0.6
stateString 0.6
ipVersionIntegerThe IP version number3.1.0
createDateTimestampThe creation time0.6
lastOpDateTimestampThe last modification time0.6
attachedL3NetworkUuidsSet 0.6
rulesListSee rules0.6

rules

Name

Type

Description

Starting Version

uuid

String

The UUID of the resource, uniquely identifying the resource

0.6

securityGroupUuid

String

The security group UUID

0.6

type

String

The traffic type

0.6

ipVersion

Integer

The IP version number

3.1.0

startPort

Integer

  • For TCP/UDP, it is the start port number of the port range
  • For ICMP, it is the ICMP type

0.6

endPort

Integer

  • For TCP/UDP, it is the end port number of the port range
  • For ICMP, it is the ICMP type

0.6

protocol

String

The traffic protocol type

0.6

state

String

The availability state of the rule, not implemented in the current version

0.6

allowedCidr

String

  • The allowed CIDR. The meaning of the allowed CIDR varies depending on the traffic type.
  • For Ingress traffic, the allowed CIDR is the source CIDR that is permitted to access the VM NIC
  • For Egress traffic, the allowed CIDR is the destination CIDR that traffic from the VM NIC is permitted to reach

0.6

remoteSecurityGroupUuid

String

 

0.6

createDate

Timestamp

The creation time

0.6

lastOpDate

Timestamp

The last modification time

0.6

SDK Examples

Java SDK

DeleteSecurityGroupRuleAction action = new DeleteSecurityGroupRuleAction();
action.ruleUuids = asList("5a88c1873bbf48e4a018f03f6bd055b6");
action.sessionId = "f42c32dbfc214bc58fb057d2c9cb63b1";
DeleteSecurityGroupRuleAction.Result res = action.call();

Python SDK

DeleteSecurityGroupRuleAction action = DeleteSecurityGroupRuleAction()
action.ruleUuids = [a9b41667676244e5b3da07d866869b31]
action.sessionId = "f8b0b8d01d8c4adc8058083e9f48a8a9"
DeleteSecurityGroupRuleAction.Result res = action.call()