cURL
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/egress-rules \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--json '{"cluster_id":"35c4abb2-bb66-46d7-afed-25ebef5ed100","description":"egress for GCP storage buckets","destination":"storage.googleapis.com","name":"roach-buckets","ports":[443,80],"type":"FQDN"}'{
"Rule": {
"cluster_id": "<string>",
"crl_managed": true,
"description": "<string>",
"destination": "<string>",
"id": "<string>",
"name": "<string>",
"state": "<string>",
"type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"paths": [
"<string>"
],
"ports": [
123
]
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Add an egress rule
Can be used by the following roles assigned at the organization, folder or cluster scope:
- CLUSTER_ADMIN
- CLUSTER_OPERATOR_WRITER
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
networking
/
egress-rules
cURL
curl --request POST \
--url https://cockroachlabs.cloud/api/v1/clusters/{cluster_id}/networking/egress-rules \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--json '{"cluster_id":"35c4abb2-bb66-46d7-afed-25ebef5ed100","description":"egress for GCP storage buckets","destination":"storage.googleapis.com","name":"roach-buckets","ports":[443,80],"type":"FQDN"}'{
"Rule": {
"cluster_id": "<string>",
"crl_managed": true,
"description": "<string>",
"destination": "<string>",
"id": "<string>",
"name": "<string>",
"state": "<string>",
"type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"paths": [
"<string>"
],
"ports": [
123
]
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}This endpoint is in Preview and subject to change. Refer to the API support policy for more details.
Authorizations
Path Parameters
Body
application/json

