Skip to main content

Create a new security group

POST 

/v1/projects/:projectId/zones/:zoneName/securitygroups

In case of success, the response body contains the created security group with its identifier.

Request

Path Parameters

    projectId stringrequired

    Project Identifier

    zoneName stringrequired

    Zone name

Header Parameters

    X-API-KEY string

    Your SIU token if you use this API through Orange Developer.

    Authorization string

    Bearer access token authentication if you use this API through Orange Developer or Orange Developer Inside.

    X-Requester-Id string

    Your SIU Id if you use this API through Orange Developer Inside.

Bodyrequired

Attributes to create a Security Group resource.

    namestringrequired

    Unique resource name. This attribute can not be updated.

    Possible values: <= 40 characters, Value must match regular expression [A-Za-z0-9-]

    descriptionstring

    Resource description

    tags object

    Tags associated with the resource

    property name*string
    securityRules object[]required

    List of security rules contained in a security group. NB: temporary impact on modification.

  • Array [
  • namestringrequired

    Name of the security rule. Must be unique within the Security Group. Cannot be updated.

    Possible values: <= 40 characters, Value must match regular expression [-_a-zA-Z0-9]

    descriptionstring

    Description of the security rule.

    matchRemoteIpSubnetsstring[]required

    List of remote IP subnets to match, in CIDR format.

    Possible values: >= 1, <= 10

    matchDirectionsSecurityRuleDirectionEnum (string)[]required

    List of directions to match.

    Possible values: [ingress, egress], >= 1, <= 9

    matchProtocolsstring[]

    List of protocols to match. Mandatory if matchPortRanges is used. Possible values: ah, dccp, egp, esp, gre, icmp, igmp, ipip, ipv6-encap, ipv6-frag, ipv6-icmp, ipv6-nonxt, ipv6-opts, ipv6-route, ospf, pgm, rsvp, sctp, tcp, udp, udplite, vrrp... or numerical values.

    Possible values: <= 9

    matchPortRangesstring[]

    List of port ranges to match. Item format : ["port_range_min-port_range_max"]. For ICMP protocol, use port_range_min for the ICMP type and port_range_max for the ICMP code.

    Possible values: <= 9

  • ]

Responses

Created

Response Headers
    X-Job-Href

    Href of the asynchronous job that will process the request, in order to track its status.

    X-Retry-After

    The number of seconds to wait before checking the status of the job.

Schema
    iduuidrequired

    Resource identifier.

    hRefurirequired

    Hypertext reference of the resource.

curl -L '/v1/projects/:projectId/zones/:zoneName/securitygroups' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"name": "string",
"description": "string",
"tags": {},
"securityRules": [
{
"name": "string",
"description": "string",
"matchRemoteIpSubnets": [
"string"
],
"matchDirections": [
"ingress"
],
"matchProtocols": [
"string"
],
"matchPortRanges": [
"string"
]
}
]
}'
Request Collapse all
Base URL
/v1
Parameters
— pathrequired
— pathrequired
— header
— header
— header
Body required
{
  "name": "string",
  "description": "string",
  "tags": {},
  "securityRules": [
    {
      "name": "string",
      "description": "string",
      "matchRemoteIpSubnets": [
        "string"
      ],
      "matchDirections": [
        "ingress"
      ],
      "matchProtocols": [
        "string"
      ],
      "matchPortRanges": [
        "string"
      ]
    }
  ]
}