# Create a single VPC Peering connection for the cluster

POST

/database/clusters/{clusterId}/vpc-peerings

-   

Create a single VPC Peering connection for the cluster.

## Authorizations

-   **[publicOauth2](https://aerospike.com/docs/cloud/reference/api/#publicoauth2)**
    
    update:database
    

## Parameters

### Path Parameters

**clusterId**

required

string

format: uuid

A cluster ID.

## Request Body

Create VPC Peering request

One of:

-   [Create with VPC details](#tab-panel-327)

_Create with VPC details_

Create VPC peering connection using VPC details

object

**vpcId**

required

The ID of the client VPC to peer with

string

/^vpc-(\[0-9a-f\]{8}|\[0-9a-f\]{17})$/

Example:

vpc-0123456789abcdef0

**cidrBlock**

required

The client VPC’s CIDR block where routing will take place

string

/^\\d{1,3}(\\.\\d{1,3}){3}\\/\\d{1,2}$/

Example:

192.168.0.0/16

**accountId**

required

The ID of the account where the client VPC is deployed

string

/^\\d{12}$/

Example:

123456789012

**region**

required

Region where the client VPC is deployed

string

default: us-east-1

/^\[a-z\]{2}-\[a-z\]+-\\d+$/

Example:

us-east-1

**isSecureConnection**

required

Flag to set up tls or non tls vpc peering connection

boolean

default: true

## Responses

### 201

A VPC Peering connection

##### Response Headers

**X-Request-Id**

string

Example:

b0658b67-8ea3-46de-a3b8-18c3f5347def

ID uniquely identifying the request/response cycle.

##### Response Schema

object

**id**

required

Unique identifier for this resource within Aerospike Cloud

string

Example:

e2e81cba-446e-4ff9-9b92-9a9992af44c6

**accountId**

The ID of the account where the client VPC is deployed

string

/^\\d{12}$/

Example:

123456789012

**vpcId**

The ID of the client VPC to peer with

string

/^vpc-(\[0-9a-f\]{8}|\[0-9a-f\]{17})$/

Example:

vpc-0123456789abcdef0

**region**

Region where the client VPC is deployed

string

default: us-east-1

/^\[a-z\]{2}-\[a-z\]+-\\d+$/

Example:

us-east-1

**status**

Status of the VPC peering connection

string

Allowed values:

initiating-request

pending-acceptance

not-operable

provisioning

active

rejected

expired

failed

deleting

deleted

**peeringId**

The AWS-generated ID of the peering connection (PCX ID)

string

Example:

pcx-1410263943e464f4a

**cidrBlock**

The client VPC’s CIDR block where routing will take place

string

/^\\d{1,3}(\\.\\d{1,3}){3}\\/\\d{1,2}$/

Example:

192.168.0.0/16

**privateHostedZoneId**

Deprecated: The ID of the private hosted zone that the VPC should associate with. This can be found in the cluster’s infrastructure.

string

Example:

Z04089311NGVVH0FO3QGG

**isSecureConnection**

Flag to set up tls or non tls vpc peering connection

boolean

default: true

##### Example

Content type: application/json

Copied!

{ 

{

"id": "e2e81cba-446e-4ff9-9b92-9a9992af44c6"

}

### 400

Invalid input

##### Response Headers

**X-Request-Id**

string

Example:

b0658b67-8ea3-46de-a3b8-18c3f5347def

ID uniquely identifying the request/response cycle.

##### Response Schema

RFC 9457 Problem Details for HTTP APIs. Provides a standardized format for conveying error details in HTTP responses.

object

**type**

required

URN-based error type identifiers following the pattern: urn:aerospike:errors:{category}:{specific}

Resource information (cluster, database, organization, etc.) is provided in the ProblemDetails context field, not in the URN.

string

Allowed values:

urn:aerospike:errors:auth:unauthorized

urn:aerospike:errors:auth:token-expired

urn:aerospike:errors:resource:not-found

urn:aerospike:errors:resource:already-exists

urn:aerospike:errors:validation:failed

urn:aerospike:errors:system:internal

urn:aerospike:errors:system:unavailable

urn:aerospike:errors:ratelimit:exceeded

**title**

required

A short, human-readable summary of the problem type

string

Example:

Resource Not Found

**status**

required

The HTTP status code

integer

Example:

404

**detail**

A human-readable explanation specific to this occurrence

string

Example:

The requested cluster could not be found.

**instance**

A URI reference that identifies the specific occurrence

string

format: uri

**context**

Any of:

-   [object](#tab-panel-328)
-   [object](#tab-panel-329)
-   [object](#tab-panel-330)

Context for resource-related errors (not-found, already-exists)

object

**resource**

Type of resource (e.g., cluster, database, organization)

string

Example:

cluster

**id**

Identifier of the resource

string

Example:

abc-123

Structured context for validation errors

object

**missing**

JSON Pointer paths to missing required fields

Array<string>

Example:

\[ "/user/email", "/user/password", "/user/firstName" \]

**invalid**

Details about invalid field values

Array<object>

object

**field**

required

JSON Pointer path to the invalid field

string

Example:

/user/phoneNumber

**type**

required

URN identifying the specific validation error type

string

format: uri

Allowed values:

urn:aerospike:errors:validation:failed

urn:aerospike:errors:validation:invalid-phone-format

urn:aerospike:errors:validation:invalid-email-format

urn:aerospike:errors:validation:invalid-date-format

urn:aerospike:errors:validation:invalid-url-format

urn:aerospike:errors:validation:out-of-range

urn:aerospike:errors:validation:too-long

urn:aerospike:errors:validation:too-short

Example:

urn:aerospike:errors:validation:failed

**description**

An optional human-readable description of the validation error

string

object

**_key_**

additional properties

any

**message**

Developer-friendly message explaining the error. Deprecated: Use ‘detail’ field instead.

string

Example:

The requested cluster could not be found.

##### Example

Example:

{ "type": "urn:aerospike:errors:validation:failed", "title": "Validation Error", "status": 400, "detail": "The provided information is not in the correct format.", "instance": "string", "context": { "invalid": \[ { "field": "/name", "type": "urn:aerospike:errors:validation:too-long" }, { "field": "/region", "type": "urn:aerospike:errors:validation:too-short" } \] }, "message": "The provided information is not in the correct format." }

### 401

Access token is missing or invalid

##### Response Headers

**X-Request-Id**

string

Example:

b0658b67-8ea3-46de-a3b8-18c3f5347def

ID uniquely identifying the request/response cycle.

##### Response Schema

RFC 9457 Problem Details for HTTP APIs. Provides a standardized format for conveying error details in HTTP responses.

object

**type**

required

URN-based error type identifiers following the pattern: urn:aerospike:errors:{category}:{specific}

Resource information (cluster, database, organization, etc.) is provided in the ProblemDetails context field, not in the URN.

string

Allowed values:

urn:aerospike:errors:auth:unauthorized

urn:aerospike:errors:auth:token-expired

urn:aerospike:errors:resource:not-found

urn:aerospike:errors:resource:already-exists

urn:aerospike:errors:validation:failed

urn:aerospike:errors:system:internal

urn:aerospike:errors:system:unavailable

urn:aerospike:errors:ratelimit:exceeded

**title**

required

A short, human-readable summary of the problem type

string

Example:

Resource Not Found

**status**

required

The HTTP status code

integer

Example:

404

**detail**

A human-readable explanation specific to this occurrence

string

Example:

The requested cluster could not be found.

**instance**

A URI reference that identifies the specific occurrence

string

format: uri

**context**

Any of:

-   [object](#tab-panel-331)
-   [object](#tab-panel-332)
-   [object](#tab-panel-333)

Context for resource-related errors (not-found, already-exists)

object

**resource**

Type of resource (e.g., cluster, database, organization)

string

Example:

cluster

**id**

Identifier of the resource

string

Example:

abc-123

Structured context for validation errors

object

**missing**

JSON Pointer paths to missing required fields

Array<string>

Example:

\[ "/user/email", "/user/password", "/user/firstName" \]

**invalid**

Details about invalid field values

Array<object>

object

**field**

required

JSON Pointer path to the invalid field

string

Example:

/user/phoneNumber

**type**

required

URN identifying the specific validation error type

string

format: uri

Allowed values:

urn:aerospike:errors:validation:failed

urn:aerospike:errors:validation:invalid-phone-format

urn:aerospike:errors:validation:invalid-email-format

urn:aerospike:errors:validation:invalid-date-format

urn:aerospike:errors:validation:invalid-url-format

urn:aerospike:errors:validation:out-of-range

urn:aerospike:errors:validation:too-long

urn:aerospike:errors:validation:too-short

Example:

urn:aerospike:errors:validation:failed

**description**

An optional human-readable description of the validation error

string

object

**_key_**

additional properties

any

**message**

Developer-friendly message explaining the error. Deprecated: Use ‘detail’ field instead.

string

Example:

The requested cluster could not be found.

##### Example

Example:

{ "type": "urn:aerospike:errors:auth:token-expired", "title": "Token Expired", "status": 401, "detail": "Your session has expired. Please log in again.", "instance": "string", "context": { "resource": "cluster", "id": "abc-123" }, "message": "Your session has expired. Please log in again." }

### 403

Permission denied

##### Response Headers

**X-Request-Id**

string

Example:

b0658b67-8ea3-46de-a3b8-18c3f5347def

ID uniquely identifying the request/response cycle.

##### Response Schema

RFC 9457 Problem Details for HTTP APIs. Provides a standardized format for conveying error details in HTTP responses.

object

**type**

required

URN-based error type identifiers following the pattern: urn:aerospike:errors:{category}:{specific}

Resource information (cluster, database, organization, etc.) is provided in the ProblemDetails context field, not in the URN.

string

Allowed values:

urn:aerospike:errors:auth:unauthorized

urn:aerospike:errors:auth:token-expired

urn:aerospike:errors:resource:not-found

urn:aerospike:errors:resource:already-exists

urn:aerospike:errors:validation:failed

urn:aerospike:errors:system:internal

urn:aerospike:errors:system:unavailable

urn:aerospike:errors:ratelimit:exceeded

**title**

required

A short, human-readable summary of the problem type

string

Example:

Resource Not Found

**status**

required

The HTTP status code

integer

Example:

404

**detail**

A human-readable explanation specific to this occurrence

string

Example:

The requested cluster could not be found.

**instance**

A URI reference that identifies the specific occurrence

string

format: uri

**context**

Any of:

-   [object](#tab-panel-334)
-   [object](#tab-panel-335)
-   [object](#tab-panel-336)

Context for resource-related errors (not-found, already-exists)

object

**resource**

Type of resource (e.g., cluster, database, organization)

string

Example:

cluster

**id**

Identifier of the resource

string

Example:

abc-123

Structured context for validation errors

object

**missing**

JSON Pointer paths to missing required fields

Array<string>

Example:

\[ "/user/email", "/user/password", "/user/firstName" \]

**invalid**

Details about invalid field values

Array<object>

object

**field**

required

JSON Pointer path to the invalid field

string

Example:

/user/phoneNumber

**type**

required

URN identifying the specific validation error type

string

format: uri

Allowed values:

urn:aerospike:errors:validation:failed

urn:aerospike:errors:validation:invalid-phone-format

urn:aerospike:errors:validation:invalid-email-format

urn:aerospike:errors:validation:invalid-date-format

urn:aerospike:errors:validation:invalid-url-format

urn:aerospike:errors:validation:out-of-range

urn:aerospike:errors:validation:too-long

urn:aerospike:errors:validation:too-short

Example:

urn:aerospike:errors:validation:failed

**description**

An optional human-readable description of the validation error

string

object

**_key_**

additional properties

any

**message**

Developer-friendly message explaining the error. Deprecated: Use ‘detail’ field instead.

string

Example:

The requested cluster could not be found.

##### Example

Example:

{ "type": "urn:aerospike:errors:auth:unauthorized", "title": "Unauthorized", "status": 403, "detail": "You don't have permission to access this resource.", "instance": "string", "context": { "resource": "cluster", "id": "abc-123" }, "message": "You don't have permission to access this resource." }

### 404

Resource not found

##### Response Headers

**X-Request-Id**

string

Example:

b0658b67-8ea3-46de-a3b8-18c3f5347def

ID uniquely identifying the request/response cycle.

##### Response Schema

RFC 9457 Problem Details for HTTP APIs. Provides a standardized format for conveying error details in HTTP responses.

object

**type**

required

URN-based error type identifiers following the pattern: urn:aerospike:errors:{category}:{specific}

Resource information (cluster, database, organization, etc.) is provided in the ProblemDetails context field, not in the URN.

string

Allowed values:

urn:aerospike:errors:auth:unauthorized

urn:aerospike:errors:auth:token-expired

urn:aerospike:errors:resource:not-found

urn:aerospike:errors:resource:already-exists

urn:aerospike:errors:validation:failed

urn:aerospike:errors:system:internal

urn:aerospike:errors:system:unavailable

urn:aerospike:errors:ratelimit:exceeded

**title**

required

A short, human-readable summary of the problem type

string

Example:

Resource Not Found

**status**

required

The HTTP status code

integer

Example:

404

**detail**

A human-readable explanation specific to this occurrence

string

Example:

The requested cluster could not be found.

**instance**

A URI reference that identifies the specific occurrence

string

format: uri

**context**

Any of:

-   [object](#tab-panel-337)
-   [object](#tab-panel-338)
-   [object](#tab-panel-339)

Context for resource-related errors (not-found, already-exists)

object

**resource**

Type of resource (e.g., cluster, database, organization)

string

Example:

cluster

**id**

Identifier of the resource

string

Example:

abc-123

Structured context for validation errors

object

**missing**

JSON Pointer paths to missing required fields

Array<string>

Example:

\[ "/user/email", "/user/password", "/user/firstName" \]

**invalid**

Details about invalid field values

Array<object>

object

**field**

required

JSON Pointer path to the invalid field

string

Example:

/user/phoneNumber

**type**

required

URN identifying the specific validation error type

string

format: uri

Allowed values:

urn:aerospike:errors:validation:failed

urn:aerospike:errors:validation:invalid-phone-format

urn:aerospike:errors:validation:invalid-email-format

urn:aerospike:errors:validation:invalid-date-format

urn:aerospike:errors:validation:invalid-url-format

urn:aerospike:errors:validation:out-of-range

urn:aerospike:errors:validation:too-long

urn:aerospike:errors:validation:too-short

Example:

urn:aerospike:errors:validation:failed

**description**

An optional human-readable description of the validation error

string

object

**_key_**

additional properties

any

**message**

Developer-friendly message explaining the error. Deprecated: Use ‘detail’ field instead.

string

Example:

The requested cluster could not be found.

##### Example

Example:

{ "type": "urn:aerospike:errors:resource:not-found", "title": "Resource Not Found", "status": 404, "detail": "The requested resource could not be found.", "instance": "string", "context": { "resource": "cluster", "id": "abc-123" }, "message": "The requested resource could not be found." }

### 500

Internal Server Error

##### Response Headers

**X-Request-Id**

string

Example:

b0658b67-8ea3-46de-a3b8-18c3f5347def

ID uniquely identifying the request/response cycle.

##### Response Schema

RFC 9457 Problem Details for HTTP APIs. Provides a standardized format for conveying error details in HTTP responses.

object

**type**

required

URN-based error type identifiers following the pattern: urn:aerospike:errors:{category}:{specific}

Resource information (cluster, database, organization, etc.) is provided in the ProblemDetails context field, not in the URN.

string

Allowed values:

urn:aerospike:errors:auth:unauthorized

urn:aerospike:errors:auth:token-expired

urn:aerospike:errors:resource:not-found

urn:aerospike:errors:resource:already-exists

urn:aerospike:errors:validation:failed

urn:aerospike:errors:system:internal

urn:aerospike:errors:system:unavailable

urn:aerospike:errors:ratelimit:exceeded

**title**

required

A short, human-readable summary of the problem type

string

Example:

Resource Not Found

**status**

required

The HTTP status code

integer

Example:

404

**detail**

A human-readable explanation specific to this occurrence

string

Example:

The requested cluster could not be found.

**instance**

A URI reference that identifies the specific occurrence

string

format: uri

**context**

Any of:

-   [object](#tab-panel-340)
-   [object](#tab-panel-341)
-   [object](#tab-panel-342)

Context for resource-related errors (not-found, already-exists)

object

**resource**

Type of resource (e.g., cluster, database, organization)

string

Example:

cluster

**id**

Identifier of the resource

string

Example:

abc-123

Structured context for validation errors

object

**missing**

JSON Pointer paths to missing required fields

Array<string>

Example:

\[ "/user/email", "/user/password", "/user/firstName" \]

**invalid**

Details about invalid field values

Array<object>

object

**field**

required

JSON Pointer path to the invalid field

string

Example:

/user/phoneNumber

**type**

required

URN identifying the specific validation error type

string

format: uri

Allowed values:

urn:aerospike:errors:validation:failed

urn:aerospike:errors:validation:invalid-phone-format

urn:aerospike:errors:validation:invalid-email-format

urn:aerospike:errors:validation:invalid-date-format

urn:aerospike:errors:validation:invalid-url-format

urn:aerospike:errors:validation:out-of-range

urn:aerospike:errors:validation:too-long

urn:aerospike:errors:validation:too-short

Example:

urn:aerospike:errors:validation:failed

**description**

An optional human-readable description of the validation error

string

object

**_key_**

additional properties

any

**message**

Developer-friendly message explaining the error. Deprecated: Use ‘detail’ field instead.

string

Example:

The requested cluster could not be found.

##### Example

Example:

{ "type": "urn:aerospike:errors:system:internal", "title": "Internal Server Error", "status": 500, "detail": "An unexpected error occurred. Please try again later.", "instance": "string", "context": { "resource": "cluster", "id": "abc-123" }, "message": "An unexpected error occurred. Please try again later." }