---
title: "POST /CreatePrivateConnection"
method: POST
path: "/CreatePrivateConnection"
---

# POST /CreatePrivateConnection

`POST /CreatePrivateConnection`

Creates a private connection for reaching a self-hosted provider instance over private networking using Amazon VPC Lattice.

## Request body

- object
  - `privateConnectionName` string, required — The unique name of a private connection within your account.
  - `mode` object, required — The configuration for a private connection. Specify either a service-managed or a self-managed mode.
    - `serviceManaged` object — The configuration for a service-managed private connection, where the service manages the resource gateway lifecycle.
      - `hostAddress` string, required — The IP address or DNS name of the target resource.
      - `vpcId` string, required — The VPC to create the service-managed resource gateway in.
      - `subnetIds` PrivateConnectionSubnetId[], required — The subnets that the service-managed resource gateway spans.
      - `securityGroupIds` PrivateConnectionSecurityGroupId[] — The security groups to attach to the service-managed resource gateway.
      - `ipAddressType` 'IPV4' | 'IPV6' | 'DUAL_STACK' — The IP address type of the service-managed resource gateway.
      - `ipv4AddressesPerEni` integer — The number of IPv4 addresses in each elastic network interface for the service-managed resource gateway.
      - `portRanges` PortRange[] — The TCP port ranges that a consumer can use to access the resource.
      - `certificate` string, password — The certificate for the private connection.
      - `dnsResolution` 'PUBLIC' | 'IN_VPC' — The DNS resolution mode for the resource gateway. Defaults to PUBLIC when not set.
    - `selfManaged` object — The configuration for a self-managed private connection, where you manage your own resource configuration.
      - `resourceConfigurationId` string, required — The identifier or ARN of the resource configuration.
      - `certificate` string, password — The certificate for the private connection.
  - `tags` object — Map of tags for a resource.

## Response `201`

Success

- CreatePrivateConnectionOutput
  - `name` string, required — The name of the private connection.
  - `type` 'SERVICE_MANAGED' | 'SELF_MANAGED', required — The type of the private connection, indicating whether it is service-managed or self-managed.
  - `status` 'ACTIVE' | 'CREATE_IN_PROGRESS' | 'CREATE_FAILED' | 'DELETE_IN_PROGRESS' | 'DELETE_FAILED', required — The current status of the private connection.
  - `resourceGatewayId` string — The identifier or ARN of the VPC Lattice resource gateway.
  - `hostAddress` string — The IP address or DNS name of the target resource.
  - `vpcId` string — The identifier of the VPC the resource gateway is created in.
  - `resourceConfigurationId` string — The identifier or ARN of the VPC Lattice resource configuration.
  - `certificateExpiryTime` string, date-time — The date and time the connection's certificate expires, in UTC format.
  - `dnsResolution` 'PUBLIC' | 'IN_VPC' — The DNS resolution mode for the resource gateway.
  - `failureMessage` string — A message describing why the private connection entered a failed state, if applicable.
  - `tags` object — The tags attached to the private connection.

## Other responses

- `480` — ValidationException
- `481` — ResourceNotFoundException
- `482` — InternalServerException
- `483` — ConflictException
- `484` — ThrottlingException
- `485` — AccessDeniedException

---

[API](https://skmtc.net/aws/apis/securityagent.md) · [All operations](https://skmtc.net/aws/apis/securityagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/securityagent/versions/cad56717d636/schema)
