VPCLattice / Client / create_service_network_service_association

create_service_network_service_association#

VPCLattice.Client.create_service_network_service_association(**kwargs)#

Associates a service with a service network.

You can’t use this operation if the service and service network are already associated or if there is a disassociation or deletion in progress. If the association fails, you can retry the operation by deleting the association and recreating it.

You cannot associate a service and service network that are shared with a caller. The caller must own either the service or the service network.

As a result of this operation, the association is created in the service network account and the association owner account.

See also: AWS API Documentation

Request Syntax

response = client.create_service_network_service_association(
    clientToken='string',
    serviceIdentifier='string',
    serviceNetworkIdentifier='string',
    tags={
        'string': 'string'
    }
)
Parameters:
  • clientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren’t identical, the retry fails.

    This field is autopopulated if not provided.

  • serviceIdentifier (string) –

    [REQUIRED]

    The ID or Amazon Resource Name (ARN) of the service.

  • serviceNetworkIdentifier (string) –

    [REQUIRED]

    The ID or Amazon Resource Name (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts.

  • tags (dict) –

    The tags for the association.

    • (string) –

      The key of the tag.

      Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws:.

      • (string) –

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @

Return type:

dict

Returns:

Response Syntax

{
    'arn': 'string',
    'createdBy': 'string',
    'customDomainName': 'string',
    'dnsEntry': {
        'domainName': 'string',
        'hostedZoneId': 'string'
    },
    'id': 'string',
    'status': 'CREATE_IN_PROGRESS'|'ACTIVE'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_FAILED'
}

Response Structure

  • (dict) –

    • arn (string) –

      The Amazon Resource Name (ARN) of the association.

    • createdBy (string) –

      The account that created the association.

    • customDomainName (string) –

      The custom domain name of the service.

    • dnsEntry (dict) –

      The DNS name of the service.

      • domainName (string) –

        The domain name of the service.

      • hostedZoneId (string) –

        The ID of the hosted zone.

    • id (string) –

      The ID of the association.

    • status (string) –

      The operation’s status.

Exceptions

  • VPCLattice.Client.exceptions.ValidationException

  • VPCLattice.Client.exceptions.ThrottlingException

  • VPCLattice.Client.exceptions.ResourceNotFoundException

  • VPCLattice.Client.exceptions.ConflictException

  • VPCLattice.Client.exceptions.ServiceQuotaExceededException

  • VPCLattice.Client.exceptions.InternalServerException