CfnDomainNamePropsMixin

class aws_cdk.mixins_preview.aws_apigatewayv2.mixins.CfnDomainNamePropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::ApiGatewayV2::DomainName resource specifies a custom domain name for your API in Amazon API Gateway (API Gateway).

You can use a custom domain name to provide a URL that’s more intuitive and easier to recall. For more information about using custom domain names, see Set up Custom Domain Name for an API in API Gateway in the API Gateway Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html

CloudformationResource:

AWS::ApiGatewayV2::DomainName

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_apigatewayv2 import mixins as apigatewayv2_mixins

cfn_domain_name_props_mixin = apigatewayv2_mixins.CfnDomainNamePropsMixin(apigatewayv2_mixins.CfnDomainNameMixinProps(
    domain_name="domainName",
    domain_name_configurations=[apigatewayv2_mixins.CfnDomainNamePropsMixin.DomainNameConfigurationProperty(
        certificate_arn="certificateArn",
        certificate_name="certificateName",
        endpoint_type="endpointType",
        ip_address_type="ipAddressType",
        ownership_verification_certificate_arn="ownershipVerificationCertificateArn",
        security_policy="securityPolicy"
    )],
    mutual_tls_authentication=apigatewayv2_mixins.CfnDomainNamePropsMixin.MutualTlsAuthenticationProperty(
        truststore_uri="truststoreUri",
        truststore_version="truststoreVersion"
    ),
    routing_mode="routingMode",
    tags={
        "tags_key": "tags"
    }
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::ApiGatewayV2::DomainName.

Parameters:
  • props (Union[CfnDomainNameMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['domainName', 'domainNameConfigurations', 'mutualTlsAuthentication', 'routingMode', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

DomainNameConfigurationProperty

class CfnDomainNamePropsMixin.DomainNameConfigurationProperty(*, certificate_arn=None, certificate_name=None, endpoint_type=None, ip_address_type=None, ownership_verification_certificate_arn=None, security_policy=None)

Bases: object

The DomainNameConfiguration property type specifies the configuration for an API’s domain name.

DomainNameConfiguration is a property of the AWS::ApiGatewayV2::DomainName resource.

Parameters:
  • certificate_arn (Optional[str]) – An AWS -managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

  • certificate_name (Optional[str]) – The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

  • endpoint_type (Optional[str]) – The endpoint type.

  • ip_address_type (Optional[str]) – The IP address types that can invoke the domain name. Use ipv4 to allow only IPv4 addresses to invoke your domain name, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your domain name.

  • ownership_verification_certificate_arn (Optional[str]) – The Amazon resource name (ARN) for the public certificate issued by Certificate Manager . This ARN is used to validate custom domain ownership. It’s required only if you configure mutual TLS and use either an ACM-imported or a private CA certificate ARN as the regionalCertificateArn.

  • security_policy (Optional[str]) – The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_apigatewayv2 import mixins as apigatewayv2_mixins

domain_name_configuration_property = apigatewayv2_mixins.CfnDomainNamePropsMixin.DomainNameConfigurationProperty(
    certificate_arn="certificateArn",
    certificate_name="certificateName",
    endpoint_type="endpointType",
    ip_address_type="ipAddressType",
    ownership_verification_certificate_arn="ownershipVerificationCertificateArn",
    security_policy="securityPolicy"
)

Attributes

certificate_arn

An AWS -managed certificate that will be used by the edge-optimized endpoint for this domain name.

AWS Certificate Manager is the only supported source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-certificatearn

certificate_name

The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-certificatename

endpoint_type

The endpoint type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-endpointtype

ip_address_type

The IP address types that can invoke the domain name.

Use ipv4 to allow only IPv4 addresses to invoke your domain name, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your domain name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-ipaddresstype

ownership_verification_certificate_arn

The Amazon resource name (ARN) for the public certificate issued by Certificate Manager .

This ARN is used to validate custom domain ownership. It’s required only if you configure mutual TLS and use either an ACM-imported or a private CA certificate ARN as the regionalCertificateArn.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-ownershipverificationcertificatearn

security_policy

The Transport Layer Security (TLS) version of the security policy for this domain name.

The valid values are TLS_1_0 and TLS_1_2 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-securitypolicy

MutualTlsAuthenticationProperty

class CfnDomainNamePropsMixin.MutualTlsAuthenticationProperty(*, truststore_uri=None, truststore_version=None)

Bases: object

If specified, API Gateway performs two-way authentication between the client and the server.

Clients must present a trusted certificate to access your API.

Parameters:
  • truststore_uri (Optional[str]) – An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, s3:// bucket-name / key-name . The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.

  • truststore_version (Optional[str]) – The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-mutualtlsauthentication.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_apigatewayv2 import mixins as apigatewayv2_mixins

mutual_tls_authentication_property = apigatewayv2_mixins.CfnDomainNamePropsMixin.MutualTlsAuthenticationProperty(
    truststore_uri="truststoreUri",
    truststore_version="truststoreVersion"
)

Attributes

truststore_uri

An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example, s3:// bucket-name / key-name .

The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-mutualtlsauthentication.html#cfn-apigatewayv2-domainname-mutualtlsauthentication-truststoreuri

truststore_version

The version of the S3 object that contains your truststore.

To specify a version, you must have versioning enabled for the S3 bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-mutualtlsauthentication.html#cfn-apigatewayv2-domainname-mutualtlsauthentication-truststoreversion