DevOpsAgentService / Client / create_private_connection

create_private_connection

DevOpsAgentService.Client.create_private_connection(**kwargs)

Creates a Private Connection to a target resource.

See also: AWS API Documentation

Request Syntax

response = client.create_private_connection(
    name='string',
    mode={
        'serviceManaged': {
            'hostAddress': 'string',
            'vpcId': 'string',
            'subnetIds': [
                'string',
            ],
            'securityGroupIds': [
                'string',
            ],
            'ipAddressType': 'IPV4'|'IPV6'|'DUAL_STACK',
            'ipv4AddressesPerEni': 123,
            'portRanges': [
                'string',
            ],
            'certificate': 'string'
        },
        'selfManaged': {
            'resourceConfigurationId': 'string',
            'certificate': 'string'
        }
    },
    tags={
        'string': 'string'
    }
)
Parameters:
  • name (string) –

    [REQUIRED]

    Unique name for this Private Connection within the account.

  • mode (dict) –

    [REQUIRED]

    Private Connection mode configuration.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: serviceManaged, selfManaged.

    • serviceManaged (dict) –

      Service manages the Resource Gateway lifecycle.

      • hostAddress (string) – [REQUIRED]

        IP address or DNS name of the target resource.

      • vpcId (string) – [REQUIRED]

        VPC to create the service-managed Resource Gateway in.

      • subnetIds (list) – [REQUIRED]

        Subnets that the service-managed Resource Gateway will span.

        • (string) –

          Subnet identifier.

      • securityGroupIds (list) –

        Security groups to attach to the service-managed Resource Gateway. If not specified, a default security group is created.

        • (string) –

          Security group identifier.

      • ipAddressType (string) –

        IP address type of the service-managed Resource Gateway.

      • ipv4AddressesPerEni (integer) –

        Number of IPv4 addresses in each ENI for the service-managed Resource Gateway.

      • portRanges (list) –

        TCP port ranges that a consumer can use to access the resource.

        • (string) –

          TCP port range expression (single port or range e.g. ‘443’ or ‘8080-8090’). Valid port values are 1-65535, enforced at runtime.

      • certificate (string) –

        Certificate for the Private Connection.

    • selfManaged (dict) –

      Caller manages their own resource configuration.

      • resourceConfigurationId (string) – [REQUIRED]

        The ARN of the Resource Configuration.

      • certificate (string) –

        Certificate for the Private Connection.

  • tags (dict) –

    Tags to add to the Private Connection at creation time.

    • (string) –

      Tag key string.

      • (string) –

        Tag value string.

Return type:

dict

Returns:

Response Syntax

{
    'name': 'string',
    'type': 'SELF_MANAGED'|'SERVICE_MANAGED',
    'resourceGatewayId': 'string',
    'hostAddress': 'string',
    'vpcId': 'string',
    'resourceConfigurationId': 'string',
    'status': 'ACTIVE'|'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED',
    'certificateExpiryTime': datetime(2015, 1, 1),
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) –

    Output containing the newly created Private Connection summary.

    • name (string) –

      The name of the Private Connection.

    • type (string) –

      The type of the Private Connection.

    • resourceGatewayId (string) –

      The service-managed Resource Gateway ARN. Only present for service-managed Private Connections.

    • hostAddress (string) –

      IP address or DNS name of the target resource. Only present for service-managed Private Connections.

    • vpcId (string) –

      VPC identifier of the service-managed Resource Gateway. Only present for service-managed Private Connections.

    • resourceConfigurationId (string) –

      The Resource Configuration ARN. Only present for self-managed Private Connections.

    • status (string) –

      The status of the Private Connection.

    • certificateExpiryTime (datetime) –

      The expiry time of the certificate associated with the Private Connection. Only present when a certificate is associated.

    • tags (dict) –

      Tags associated with the created Private Connection.

      • (string) –

        Tag key string.

        • (string) –

          Tag value string.

Exceptions

  • DevOpsAgentService.Client.exceptions.ValidationException

  • DevOpsAgentService.Client.exceptions.ContentSizeExceededException

  • DevOpsAgentService.Client.exceptions.ServiceQuotaExceededException

  • DevOpsAgentService.Client.exceptions.ConflictException

  • DevOpsAgentService.Client.exceptions.InternalServerException

  • DevOpsAgentService.Client.exceptions.AccessDeniedException

  • DevOpsAgentService.Client.exceptions.ThrottlingException

  • DevOpsAgentService.Client.exceptions.ResourceNotFoundException

  • DevOpsAgentService.Client.exceptions.InvalidParameterException