DomainNameProps
- class aws_cdk.aws_apigatewayv2.DomainNameProps(*, certificate, certificate_name=None, endpoint_type=None, ip_address_type=None, ownership_certificate=None, security_policy=None, domain_name, mtls=None)
Bases:
EndpointOptionsproperties used for creating the DomainName.
- Parameters:
certificate (
ICertificate) – The ACM certificate for this domain name. Certificate can be both ACM issued or imported.certificate_name (
Optional[str]) – The user-friendly name of the certificate that will be used by the endpoint for this domain name. Default: - No friendly certificate nameendpoint_type (
Optional[EndpointType]) – The type of endpoint for this DomainName. Default: EndpointType.REGIONALip_address_type (
Optional[IpAddressType]) – The IP address types that can invoke the API. Default: undefined - AWS default is IPV4ownership_certificate (
Optional[ICertificate]) – A public certificate issued by ACM to validate that you own a custom domain. This parameter is required only when you configure mutual TLS authentication and you specify an ACM imported or private CA certificate forcertificate. The ownership certificate validates that you have permissions to use the domain name. Default: - only required when configuring mTLSsecurity_policy (
Optional[SecurityPolicy]) – The Transport Layer Security (TLS) version + cipher suite for this domain name. Default: SecurityPolicy.TLS_1_2domain_name (
str) – The custom domain name.mtls (
Union[MTLSConfig,Dict[str,Any],None]) – The mutual TLS authentication configuration for a custom domain name. Default: - mTLS is not configured.
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_s3 as s3 import aws_cdk.aws_certificatemanager as acm # bucket: s3.Bucket cert_arn = "arn:aws:acm:us-east-1:111111111111:certificate" domain_name = "example.com" apigwv2.DomainName(self, "DomainName", domain_name=domain_name, certificate=acm.Certificate.from_certificate_arn(self, "cert", cert_arn), mtls=apigwv2.MTLSConfig( bucket=bucket, key="someca.pem", version="version" ) )
Attributes
- certificate
The ACM certificate for this domain name.
Certificate can be both ACM issued or imported.
- certificate_name
The user-friendly name of the certificate that will be used by the endpoint for this domain name.
- Default:
No friendly certificate name
- domain_name
The custom domain name.
- endpoint_type
The type of endpoint for this DomainName.
- Default:
EndpointType.REGIONAL
- ip_address_type
The IP address types that can invoke the API.
- Default:
undefined - AWS default is IPV4
- See:
- mtls
The mutual TLS authentication configuration for a custom domain name.
- Default:
mTLS is not configured.
- ownership_certificate
A public certificate issued by ACM to validate that you own a custom domain.
This parameter is required only when you configure mutual TLS authentication and you specify an ACM imported or private CA certificate for
certificate. The ownership certificate validates that you have permissions to use the domain name.- Default:
only required when configuring mTLS
- security_policy
The Transport Layer Security (TLS) version + cipher suite for this domain name.
- Default:
SecurityPolicy.TLS_1_2