VPCLattice / Client / create_service
create_service#
- VPCLattice.Client.create_service(**kwargs)#
Creates a service. A service is any software application that can run on instances containers, or serverless functions within an account or virtual private cloud (VPC).
For more information, see Services in the Amazon VPC Lattice User Guide.
See also: AWS API Documentation
Request Syntax
response = client.create_service( authType='NONE'|'AWS_IAM', certificateArn='string', clientToken='string', customDomainName='string', name='string', tags={ 'string': 'string' } )
- Parameters:
authType (string) –
The type of IAM policy.
NONE
: The resource does not use an IAM policy. This is the default.AWS_IAM
: The resource uses an IAM policy. When this type is used, auth is enabled and an auth policy is required.
certificateArn (string) – The Amazon Resource Name (ARN) of the certificate.
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.
customDomainName (string) – The custom domain name of the service.
name (string) –
[REQUIRED]
The name of the service. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can’t use a hyphen as the first or last character, or immediately after another hyphen.
tags (dict) –
The tags for the service.
(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', 'authType': 'NONE'|'AWS_IAM', 'certificateArn': 'string', 'customDomainName': 'string', 'dnsEntry': { 'domainName': 'string', 'hostedZoneId': 'string' }, 'id': 'string', 'name': 'string', 'status': 'ACTIVE'|'CREATE_IN_PROGRESS'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_FAILED' }
Response Structure
(dict) –
arn (string) –
The Amazon Resource Name (ARN) of the service.
authType (string) –
The type of IAM policy.
certificateArn (string) –
The Amazon Resource Name (ARN) of the certificate.
customDomainName (string) –
The custom domain name of the service.
dnsEntry (dict) –
The public 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 service.
name (string) –
The name of the service.
status (string) –
The status. If the status is
CREATE_FAILED
, you must delete and recreate the service.
Exceptions
VPCLattice.Client.exceptions.ValidationException
VPCLattice.Client.exceptions.AccessDeniedException
VPCLattice.Client.exceptions.ThrottlingException
VPCLattice.Client.exceptions.ResourceNotFoundException
VPCLattice.Client.exceptions.ConflictException
VPCLattice.Client.exceptions.ServiceQuotaExceededException
VPCLattice.Client.exceptions.InternalServerException