AppRunner / Client / associate_custom_domain
associate_custom_domain#
- AppRunner.Client.associate_custom_domain(**kwargs)#
Associate your own domain name with the App Runner subdomain URL of your App Runner service.
After you call
AssociateCustomDomain
and receive a successful response, use the information in the CustomDomain record that’s returned to add CNAME records to your Domain Name System (DNS). For each mapped domain name, add a mapping to the target App Runner subdomain and one or more certificate validation records. App Runner then performs DNS validation to verify that you own or control the domain name that you associated. App Runner tracks domain validity in a certificate stored in AWS Certificate Manager (ACM).See also: AWS API Documentation
Request Syntax
response = client.associate_custom_domain( ServiceArn='string', DomainName='string', EnableWWWSubdomain=True|False )
- Parameters:
ServiceArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with.
DomainName (string) –
[REQUIRED]
A custom domain endpoint to associate. Specify a root domain (for example,
example.com
), a subdomain (for example,login.example.com
oradmin.login.example.com
), or a wildcard (for example,*.example.com
).EnableWWWSubdomain (boolean) –
Set to
true
to associate the subdomainwww.DomainName
with the App Runner service in addition to the base domain.Default:
true
- Return type:
dict
- Returns:
Response Syntax
{ 'DNSTarget': 'string', 'ServiceArn': 'string', 'CustomDomain': { 'DomainName': 'string', 'EnableWWWSubdomain': True|False, 'CertificateValidationRecords': [ { 'Name': 'string', 'Type': 'string', 'Value': 'string', 'Status': 'PENDING_VALIDATION'|'SUCCESS'|'FAILED' }, ], 'Status': 'CREATING'|'CREATE_FAILED'|'ACTIVE'|'DELETING'|'DELETE_FAILED'|'PENDING_CERTIFICATE_DNS_VALIDATION'|'BINDING_CERTIFICATE' }, 'VpcDNSTargets': [ { 'VpcIngressConnectionArn': 'string', 'VpcId': 'string', 'DomainName': 'string' }, ] }
Response Structure
(dict) –
DNSTarget (string) –
The App Runner subdomain of the App Runner service. The custom domain name is mapped to this target name.
ServiceArn (string) –
The Amazon Resource Name (ARN) of the App Runner service with which a custom domain name is associated.
CustomDomain (dict) –
A description of the domain name that’s being associated.
DomainName (string) –
An associated custom domain endpoint. It can be a root domain (for example,
example.com
), a subdomain (for example,login.example.com
oradmin.login.example.com
), or a wildcard (for example,*.example.com
).EnableWWWSubdomain (boolean) –
When
true
, the subdomainwww.DomainName
is associated with the App Runner service in addition to the base domain.CertificateValidationRecords (list) –
A list of certificate CNAME records that’s used for this domain name.
(dict) –
Describes a certificate CNAME record to add to your DNS. For more information, see AssociateCustomDomain.
Name (string) –
The certificate CNAME record name.
Type (string) –
The record type, always
CNAME
.Value (string) –
The certificate CNAME record value.
Status (string) –
The current state of the certificate CNAME record validation. It should change to
SUCCESS
after App Runner completes validation with your DNS.
Status (string) –
The current state of the domain name association.
VpcDNSTargets (list) –
DNS Target records for the custom domains of this Amazon VPC.
(dict) –
DNS Target record for a custom domain of this Amazon VPC.
VpcIngressConnectionArn (string) –
The Amazon Resource Name (ARN) of the VPC Ingress Connection that is associated with your service.
VpcId (string) –
The ID of the Amazon VPC that is associated with the custom domain name of the target DNS.
DomainName (string) –
The domain name of your target DNS that is associated with the Amazon VPC.
Exceptions
AppRunner.Client.exceptions.InvalidRequestException
AppRunner.Client.exceptions.InternalServiceErrorException
AppRunner.Client.exceptions.InvalidStateException