CfnHttpApiPropsMixin

class aws_cdk.mixins_preview.aws_sam.mixins.CfnHttpApiPropsMixin(props, *, strategy=None)

Bases: Mixin

https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlesshttpapi.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-serverless-httpapi.html

CloudformationResource:

AWS::Serverless::HttpApi

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_sam import mixins as sam_mixins

# authorizers: Any
# definition_body: Any

cfn_http_api_props_mixin = sam_mixins.CfnHttpApiPropsMixin(sam_mixins.CfnHttpApiMixinProps(
    access_log_setting=sam_mixins.CfnHttpApiPropsMixin.AccessLogSettingProperty(
        destination_arn="destinationArn",
        format="format"
    ),
    auth=sam_mixins.CfnHttpApiPropsMixin.HttpApiAuthProperty(
        authorizers=authorizers,
        default_authorizer="defaultAuthorizer"
    ),
    cors_configuration=False,
    default_route_settings=sam_mixins.CfnHttpApiPropsMixin.RouteSettingsProperty(
        data_trace_enabled=False,
        detailed_metrics_enabled=False,
        logging_level="loggingLevel",
        throttling_burst_limit=123,
        throttling_rate_limit=123
    ),
    definition_body=definition_body,
    definition_uri="definitionUri",
    description="description",
    disable_execute_api_endpoint=False,
    domain=sam_mixins.CfnHttpApiPropsMixin.HttpApiDomainConfigurationProperty(
        base_path="basePath",
        certificate_arn="certificateArn",
        domain_name="domainName",
        endpoint_configuration="endpointConfiguration",
        mutual_tls_authentication=sam_mixins.CfnHttpApiPropsMixin.MutualTlsAuthenticationProperty(
            truststore_uri="truststoreUri",
            truststore_version=False
        ),
        route53=sam_mixins.CfnHttpApiPropsMixin.Route53ConfigurationProperty(
            distributed_domain_name="distributedDomainName",
            evaluate_target_health=False,
            hosted_zone_id="hostedZoneId",
            hosted_zone_name="hostedZoneName",
            ip_v6=False
        ),
        security_policy="securityPolicy"
    ),
    fail_on_warnings=False,
    route_settings=sam_mixins.CfnHttpApiPropsMixin.RouteSettingsProperty(
        data_trace_enabled=False,
        detailed_metrics_enabled=False,
        logging_level="loggingLevel",
        throttling_burst_limit=123,
        throttling_rate_limit=123
    ),
    stage_name="stageName",
    stage_variables={
        "stage_variables_key": "stageVariables"
    },
    tags={
        "tags_key": "tags"
    }
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Serverless::HttpApi.

Parameters:
  • props (Union[CfnHttpApiMixinProps, 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 = ['accessLogSetting', 'auth', 'corsConfiguration', 'defaultRouteSettings', 'definitionBody', 'definitionUri', 'description', 'disableExecuteApiEndpoint', 'domain', 'failOnWarnings', 'routeSettings', 'stageName', 'stageVariables', '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

AccessLogSettingProperty

class CfnHttpApiPropsMixin.AccessLogSettingProperty(*, destination_arn=None, format=None)

Bases: object

Parameters:
  • destination_arn (Optional[str])

  • format (Optional[str])

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-accesslogsetting.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_sam import mixins as sam_mixins

access_log_setting_property = sam_mixins.CfnHttpApiPropsMixin.AccessLogSettingProperty(
    destination_arn="destinationArn",
    format="format"
)

Attributes

destination_arn

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-accesslogsetting.html#cfn-serverless-httpapi-accesslogsetting-destinationarn

Type:

see

format

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-accesslogsetting.html#cfn-serverless-httpapi-accesslogsetting-format

Type:

see

CorsConfigurationObjectProperty

class CfnHttpApiPropsMixin.CorsConfigurationObjectProperty(*, allow_credentials=None, allow_headers=None, allow_methods=None, allow_origins=None, expose_headers=None, max_age=None)

Bases: object

Parameters:
  • allow_credentials (Union[bool, IResolvable, None])

  • allow_headers (Optional[Sequence[str]])

  • allow_methods (Optional[Sequence[str]])

  • allow_origins (Optional[Sequence[str]])

  • expose_headers (Optional[Sequence[str]])

  • max_age (Union[int, float, None])

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-corsconfigurationobject.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_sam import mixins as sam_mixins

cors_configuration_object_property = sam_mixins.CfnHttpApiPropsMixin.CorsConfigurationObjectProperty(
    allow_credentials=False,
    allow_headers=["allowHeaders"],
    allow_methods=["allowMethods"],
    allow_origins=["allowOrigins"],
    expose_headers=["exposeHeaders"],
    max_age=123
)

Attributes

allow_credentials

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-corsconfigurationobject.html#cfn-serverless-httpapi-corsconfigurationobject-allowcredentials

Type:

see

allow_headers

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-corsconfigurationobject.html#cfn-serverless-httpapi-corsconfigurationobject-allowheaders

Type:

see

allow_methods

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-corsconfigurationobject.html#cfn-serverless-httpapi-corsconfigurationobject-allowmethods

Type:

see

allow_origins

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-corsconfigurationobject.html#cfn-serverless-httpapi-corsconfigurationobject-alloworigins

Type:

see

expose_headers

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-corsconfigurationobject.html#cfn-serverless-httpapi-corsconfigurationobject-exposeheaders

Type:

see

max_age

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-corsconfigurationobject.html#cfn-serverless-httpapi-corsconfigurationobject-maxage

Type:

see

HttpApiAuthProperty

class CfnHttpApiPropsMixin.HttpApiAuthProperty(*, authorizers=None, default_authorizer=None)

Bases: object

Parameters:
  • authorizers (Any)

  • default_authorizer (Optional[str])

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapiauth.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_sam import mixins as sam_mixins

# authorizers: Any

http_api_auth_property = sam_mixins.CfnHttpApiPropsMixin.HttpApiAuthProperty(
    authorizers=authorizers,
    default_authorizer="defaultAuthorizer"
)

Attributes

authorizers

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapiauth.html#cfn-serverless-httpapi-httpapiauth-authorizers

Type:

see

default_authorizer

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapiauth.html#cfn-serverless-httpapi-httpapiauth-defaultauthorizer

Type:

see

HttpApiDomainConfigurationProperty

class CfnHttpApiPropsMixin.HttpApiDomainConfigurationProperty(*, base_path=None, certificate_arn=None, domain_name=None, endpoint_configuration=None, mutual_tls_authentication=None, route53=None, security_policy=None)

Bases: object

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapidomainconfiguration.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_sam import mixins as sam_mixins

http_api_domain_configuration_property = sam_mixins.CfnHttpApiPropsMixin.HttpApiDomainConfigurationProperty(
    base_path="basePath",
    certificate_arn="certificateArn",
    domain_name="domainName",
    endpoint_configuration="endpointConfiguration",
    mutual_tls_authentication=sam_mixins.CfnHttpApiPropsMixin.MutualTlsAuthenticationProperty(
        truststore_uri="truststoreUri",
        truststore_version=False
    ),
    route53=sam_mixins.CfnHttpApiPropsMixin.Route53ConfigurationProperty(
        distributed_domain_name="distributedDomainName",
        evaluate_target_health=False,
        hosted_zone_id="hostedZoneId",
        hosted_zone_name="hostedZoneName",
        ip_v6=False
    ),
    security_policy="securityPolicy"
)

Attributes

base_path

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapidomainconfiguration.html#cfn-serverless-httpapi-httpapidomainconfiguration-basepath

Type:

see

certificate_arn

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapidomainconfiguration.html#cfn-serverless-httpapi-httpapidomainconfiguration-certificatearn

Type:

see

domain_name

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapidomainconfiguration.html#cfn-serverless-httpapi-httpapidomainconfiguration-domainname

Type:

see

endpoint_configuration

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapidomainconfiguration.html#cfn-serverless-httpapi-httpapidomainconfiguration-endpointconfiguration

Type:

see

mutual_tls_authentication

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapidomainconfiguration.html#cfn-serverless-httpapi-httpapidomainconfiguration-mutualtlsauthentication

Type:

see

route53

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapidomainconfiguration.html#cfn-serverless-httpapi-httpapidomainconfiguration-route53

Type:

see

security_policy

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-httpapidomainconfiguration.html#cfn-serverless-httpapi-httpapidomainconfiguration-securitypolicy

Type:

see

MutualTlsAuthenticationProperty

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

Bases: object

Parameters:
  • truststore_uri (Optional[str])

  • truststore_version (Union[bool, IResolvable, None])

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-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_sam import mixins as sam_mixins

mutual_tls_authentication_property = sam_mixins.CfnHttpApiPropsMixin.MutualTlsAuthenticationProperty(
    truststore_uri="truststoreUri",
    truststore_version=False
)

Attributes

truststore_uri

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

Type:

see

truststore_version

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

Type:

see

Route53ConfigurationProperty

class CfnHttpApiPropsMixin.Route53ConfigurationProperty(*, distributed_domain_name=None, evaluate_target_health=None, hosted_zone_id=None, hosted_zone_name=None, ip_v6=None)

Bases: object

Parameters:
  • distributed_domain_name (Optional[str])

  • evaluate_target_health (Union[bool, IResolvable, None])

  • hosted_zone_id (Optional[str])

  • hosted_zone_name (Optional[str])

  • ip_v6 (Union[bool, IResolvable, None])

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-route53configuration.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_sam import mixins as sam_mixins

route53_configuration_property = sam_mixins.CfnHttpApiPropsMixin.Route53ConfigurationProperty(
    distributed_domain_name="distributedDomainName",
    evaluate_target_health=False,
    hosted_zone_id="hostedZoneId",
    hosted_zone_name="hostedZoneName",
    ip_v6=False
)

Attributes

distributed_domain_name

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-route53configuration.html#cfn-serverless-httpapi-route53configuration-distributeddomainname

Type:

see

evaluate_target_health

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-route53configuration.html#cfn-serverless-httpapi-route53configuration-evaluatetargethealth

Type:

see

hosted_zone_id

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-route53configuration.html#cfn-serverless-httpapi-route53configuration-hostedzoneid

Type:

see

hosted_zone_name

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-route53configuration.html#cfn-serverless-httpapi-route53configuration-hostedzonename

Type:

see

ip_v6

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-route53configuration.html#cfn-serverless-httpapi-route53configuration-ipv6

Type:

see

RouteSettingsProperty

class CfnHttpApiPropsMixin.RouteSettingsProperty(*, data_trace_enabled=None, detailed_metrics_enabled=None, logging_level=None, throttling_burst_limit=None, throttling_rate_limit=None)

Bases: object

Parameters:
  • data_trace_enabled (Union[bool, IResolvable, None])

  • detailed_metrics_enabled (Union[bool, IResolvable, None])

  • logging_level (Optional[str])

  • throttling_burst_limit (Union[int, float, None])

  • throttling_rate_limit (Union[int, float, None])

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-routesettings.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_sam import mixins as sam_mixins

route_settings_property = sam_mixins.CfnHttpApiPropsMixin.RouteSettingsProperty(
    data_trace_enabled=False,
    detailed_metrics_enabled=False,
    logging_level="loggingLevel",
    throttling_burst_limit=123,
    throttling_rate_limit=123
)

Attributes

data_trace_enabled

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-routesettings.html#cfn-serverless-httpapi-routesettings-datatraceenabled

Type:

see

detailed_metrics_enabled

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-routesettings.html#cfn-serverless-httpapi-routesettings-detailedmetricsenabled

Type:

see

logging_level

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-routesettings.html#cfn-serverless-httpapi-routesettings-logginglevel

Type:

see

throttling_burst_limit

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-routesettings.html#cfn-serverless-httpapi-routesettings-throttlingburstlimit

Type:

see

throttling_rate_limit

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-routesettings.html#cfn-serverless-httpapi-routesettings-throttlingratelimit

Type:

see

S3LocationProperty

class CfnHttpApiPropsMixin.S3LocationProperty(*, bucket=None, key=None, version=None)

Bases: object

Parameters:
  • bucket (Optional[str])

  • key (Optional[str])

  • version (Union[int, float, None])

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-s3location.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_sam import mixins as sam_mixins

s3_location_property = sam_mixins.CfnHttpApiPropsMixin.S3LocationProperty(
    bucket="bucket",
    key="key",
    version=123
)

Attributes

bucket

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-s3location.html#cfn-serverless-httpapi-s3location-bucket

Type:

see

key

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-s3location.html#cfn-serverless-httpapi-s3location-key

Type:

see

version

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-serverless-httpapi-s3location.html#cfn-serverless-httpapi-s3location-version

Type:

see