curl --request POST \
--url https://api.example.com/api/v2/securitygroups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "security-group-name",
"description": "A verbose description",
"tags": [
{
"name": "cluster-id",
"value": "9361402c-f998-49cc-ab21-9bb99afcfde8"
}
]
},
"spec": {
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe",
"rules": [
{
"direction": "ingress",
"protocol": "tcp",
"port": 80,
"cidr": "172.16.0.0/12"
}
]
}
}
'{
"metadata": {
"id": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"name": "undefined",
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"creationTime": "2024-05-31T14:11:00Z",
"createdBy": "[email protected]",
"provisioningStatus": "provisioned",
"healthStatus": "healthy"
},
"spec": {
"rules": [
{
"direction": "ingress",
"protocol": "tcp",
"port": 80,
"cidr": "172.16.0.0/12"
}
]
},
"status": {
"regionId": "ba39bff5-b0d8-4c60-89e5-ed1104356b4a",
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe"
}
}Create a new security group.
curl --request POST \
--url https://api.example.com/api/v2/securitygroups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"name": "security-group-name",
"description": "A verbose description",
"tags": [
{
"name": "cluster-id",
"value": "9361402c-f998-49cc-ab21-9bb99afcfde8"
}
]
},
"spec": {
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe",
"rules": [
{
"direction": "ingress",
"protocol": "tcp",
"port": 80,
"cidr": "172.16.0.0/12"
}
]
}
}
'{
"metadata": {
"id": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
"name": "undefined",
"organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
"projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
"creationTime": "2024-05-31T14:11:00Z",
"createdBy": "[email protected]",
"provisioningStatus": "provisioned",
"healthStatus": "healthy"
},
"spec": {
"rules": [
{
"direction": "ingress",
"protocol": "tcp",
"port": 80,
"cidr": "172.16.0.0/12"
}
]
},
"status": {
"regionId": "ba39bff5-b0d8-4c60-89e5-ed1104356b4a",
"networkId": "61f0ad85-3001-41cb-824a-e6a047668dfe"
}
}Operation requires OAuth 2.0 bearer token authentication.
A request for a security group.
A security group request.
Metadata required for all API resource reads and writes.
Show child attributes
A valid Kubernetes label value, typically used for resource names that can be indexed in the database.
The resource description, this optionally augments the name with more context.
A security group's specification. A security group's specification.
Show child attributes
A set of security group rules to apply.
Show child attributes
The direction of the rule.
ingress, egress The layer 3+ protocol to allow.
any, icmp, tcp, udp, vrrp Port number for layer 4 protocols, if not specified matches all ports.
1 <= x <= 65535maxumum port number for layer 4 protocols to include a range.
1 <= x <= 65535An IPv4 address.
The network a security group belongs to.
A security group.
A security group.
Metadata required by project scoped resource reads.
Show child attributes
A valid Kubernetes label value, typically used for resource names that can be indexed in the database.
The unique resource ID.
The time the resource was created.
The provisioning state of a resource.
unknown, provisioning, provisioned, deprovisioning, error The health state of a resource.
unknown, healthy, degraded, error The organization identifier the resource belongs to.
The project identifier the resource belongs to.
The resource description, this optionally augments the name with more context.
The user who created the resource.
The time a resource was updated.
The user who updated the resource.
The time the resource was deleted.
A security group's specification.
Show child attributes
A set of security group rules to apply.
Show child attributes
The direction of the rule.
ingress, egress The layer 3+ protocol to allow.
any, icmp, tcp, udp, vrrp Port number for layer 4 protocols, if not specified matches all ports.
1 <= x <= 65535maxumum port number for layer 4 protocols to include a range.
1 <= x <= 65535An IPv4 address.