associate_custom_domain
async
¶
associate_custom_domain(
service_arn: AppRunnerResourceArn,
domain_name: DomainName,
*,
config_overrides: Optional[AsyncAppRunnerClientConfig] = None,
enable_www_subdomain: Optional[NullableBoolean] = None,
) -> AssociateCustomDomainResponse
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).
Parameters:
-
service_arn(AppRunnerResourceArn) –The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with.
-
domain_name(DomainName) –A custom domain endpoint to associate. Specify a root domain (for example,
example.com), a subdomain (for example,login.example.comoradmin.login.example.com), or a wildcard (for example,*.example.com). -
enable_www_subdomain(Optional[NullableBoolean], default:None) –Set to
trueto associate the subdomainwww.DomainNamewith the App Runner service in addition to the base domain.Default:
true
Raises:
-
InternalServiceErrorException–An unexpected service exception occurred.
-
InvalidRequestException–One or more input parameters aren't valid. Refer to the API action's document page, correct the input parameters, and try the action again.
-
InvalidStateException–You can't perform this action when the resource is in its current state.
-
UnknownServiceError–The service returned an error code this client does not model.