SecurityAgent / Client / create_private_connection
create_private_connection¶
- SecurityAgent.Client.create_private_connection(**kwargs)¶
Creates a private connection for reaching a self-hosted provider instance over private networking using Amazon VPC Lattice.
See also: AWS API Documentation
Request Syntax
response = client.create_private_connection( privateConnectionName='string', mode={ 'serviceManaged': { 'hostAddress': 'string', 'vpcId': 'string', 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ], 'ipAddressType': 'IPV4'|'IPV6'|'DUAL_STACK', 'ipv4AddressesPerEni': 123, 'portRanges': [ 'string', ], 'certificate': 'string', 'dnsResolution': 'PUBLIC'|'IN_VPC' }, 'selfManaged': { 'resourceConfigurationId': 'string', 'certificate': 'string' } }, tags={ 'string': 'string' } )
- Parameters:
privateConnectionName (string) –
[REQUIRED]
A unique name for the private connection within your account.
mode (dict) –
[REQUIRED]
The configuration for the private connection. Specify either a service-managed or a self-managed mode.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
serviceManaged,selfManaged.serviceManaged (dict) –
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 (list) – [REQUIRED]
The subnets that the service-managed resource gateway spans.
(string) –
The identifier of a subnet.
securityGroupIds (list) –
The security groups to attach to the service-managed resource gateway.
(string) –
The identifier of a security group.
ipAddressType (string) –
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 (list) –
The TCP port ranges that a consumer can use to access the resource.
(string) –
A single TCP port or an inclusive range of TCP ports, for example 443 or 8000-8100.
certificate (string) –
The certificate for the private connection.
dnsResolution (string) –
The DNS resolution mode for the resource gateway. Defaults to PUBLIC when not set.
selfManaged (dict) –
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) –
The certificate for the private connection.
tags (dict) –
The tags to attach to the private connection.
(string) –
Key for a resource tag.
(string) –
Value for a resource tag.
- Return type:
dict
- Returns:
Response Syntax
{ 'name': 'string', 'type': 'SERVICE_MANAGED'|'SELF_MANAGED', 'status': 'ACTIVE'|'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED', 'resourceGatewayId': 'string', 'hostAddress': 'string', 'vpcId': 'string', 'resourceConfigurationId': 'string', 'certificateExpiryTime': datetime(2015, 1, 1), 'dnsResolution': 'PUBLIC'|'IN_VPC', 'failureMessage': 'string', 'tags': { 'string': 'string' } }
Response Structure
(dict) –
name (string) –
The name of the private connection.
type (string) –
The type of the private connection, indicating whether it is service-managed or self-managed.
status (string) –
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 (datetime) –
The date and time the connection’s certificate expires, in UTC format.
dnsResolution (string) –
The DNS resolution mode for the resource gateway.
failureMessage (string) –
A message describing why the private connection entered a failed state, if applicable.
tags (dict) –
The tags attached to the private connection.
(string) –
Key for a resource tag.
(string) –
Value for a resource tag.
Exceptions
SecurityAgent.Client.exceptions.ValidationExceptionSecurityAgent.Client.exceptions.ResourceNotFoundExceptionSecurityAgent.Client.exceptions.InternalServerExceptionSecurityAgent.Client.exceptions.ConflictExceptionSecurityAgent.Client.exceptions.ThrottlingExceptionSecurityAgent.Client.exceptions.AccessDeniedException