ByCloud Docs
GuidesCLIAPISDK
post/v1/certificates/{certificate_id}/bindings

Create certificate binding

Bind a certificate to a resource. Currently supports binding to Octavia listeners. The certificate must be in active status.

Path Parameters

certificate_id

string<uuid>required

path

Certificate ID

Example: "550e8400-e29b-41d4-a716-446655440000"

Header Parameters

X-Region

stringrequired

header

Region code to query resources from. Required for all resource operations.

Example: "sao1"

Request Body

required

Content-Type: application/json

resource_type

stringrequired

The type of resource to bind the certificate to

Enum: "octavia:listener"

resource_id

string<uuid>required

The ID of the resource to bind to

options

objectoptional

Binding options

Responses

201

Binding created

Content-Type: application/json

binding

objectoptional
400

Invalid request parameters

Content-Type: application/json

error

objectrequired
401

Authentication required or token invalid

Content-Type: application/json

error

objectrequired
404

Resource not found

Content-Type: application/json

error

objectrequired
409

Binding already exists or certificate is not active

Content-Type: application/json

error

objectrequired
500

Internal server error

Content-Type: application/json

error

objectrequired
curl -X POST "https://api.spo1.mycloud.com/v1/certificates/550e8400-e29b-41d4-a716-446655440000/bindings" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"resource_type": "octavia:listener",
"resource_id": "550e8400-e29b-41d4-a716-446655440000",
"options": {
"sni": false
}
}'

Response

Binding created

{
"binding": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"crn": "crn:sao1:certificate:binding:550e8400-e29b-41d4-a716-446655440000",
"certificate_id": "550e8400-e29b-41d4-a716-446655440001",
"resource_type": "octavia:listener",
"resource_id": "550e8400-e29b-41d4-a716-446655440002",
"options": {
"sni": false
},
"status": "active",
"error_message": "string",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}