Skip to main content
Network Management/Network Services/Security Group
POSTSecurity GroupSince 0.6SynchronousAuth Required

AttachSecurityGroupToL3Network

AttachSecurityGroupToL3Network

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Path Parameters

Request Inputs

Path Parameters

  • securityGroupUuidStringRequired

    The security group UUID

  • l3NetworkUuidStringRequired

    The Distributed Port Group UUID

Body Fields

  • systemTagsList

    System tags

  • userTagsList

    User tags

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    Error code. If not null, the operation failed. If null, the operation succeeded. See error

    • codeStringRequired

      Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001

    • descriptionStringRequired

      Brief description of the error

    • detailsStringRequired

      Detailed error information

    • elaborationStringRequired

      Reserved field, defaults to null

    • opaqueLinkedHashMapRequired

      Reserved field, defaults to null

    • causeErrorCodeRequired

      Root error: the source error that caused the current error. If there is no original error, this field is null

  • inventorySecurityGroupInventoryRequired

    See inventory

    • uuidStringRequired

      The UUID of the resource, uniquely identifying the resource

    • nameStringRequired

      The resource name

    • descriptionStringRequired

      The detailed description of the resource

    • stateStringRequired

      当前状态。

    • ipVersionIntegerRequired

      The IP version number

    • createDateTimestampRequired

      The creation time

    • lastOpDateTimestampRequired

      The last modification time

    • attachedL3NetworkUuidsSetRequired

      No description provided.

    • rulesListRequired

      See rules

      • uuidStringRequired

        The UUID of the resource, uniquely identifying the resource

      • securityGroupUuidStringRequired

        The security group UUID

      • typeStringRequired

        The traffic type

      • ipVersionIntegerRequired

        The IP version number

      • startPortIntegerRequired

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

      • endPortIntegerRequired

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

      • protocolStringRequired

        The traffic protocol type

      • stateStringRequired

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

      • allowedCidrStringRequired

        The allowed CIDR. It has different meanings depending on the traffic type. For Ingress, it is the source CIDR allowed to access the VM NIC For Egress, it is the destination CIDR that traffic is allowed to reach from the VM NIC

      • remoteSecurityGroupUuidStringRequired

        远程安全组UUID。

      • createDateTimestampRequired

        The creation time

      • lastOpDateTimestampRequired

        The last modification time

Endpoint

POST/zstack/v1/security-groups/{securityGroupUuid}/l3-networks/{l3NetworkUuid}

/zstack/v1/security-groups/{securityGroupUuid}/l3-networks/{l3NetworkUuid}

Operation ID

AttachSecurityGroupToL3Network

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/security-groups/{securityGroupUuid}/l3-networks/{l3NetworkUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "5870eab620d2487d8d0320eabe185718", "name": "web", "description": "for test", "state": "Enabled", "createDate": "Jun 7, 2017 9:20:28 PM", "lastOpDate": "Jun 7, 2017 9:20:28 PM", "internalId": 0 } }

Change History

This API has no change history records yet.

View all change history