CfnApiPropsMixin
- class aws_cdk.mixins_preview.aws_sam.mixins.CfnApiPropsMixin(props, *, strategy=None)
Bases:
Mixin- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-serverless-api.html
- CloudformationResource:
AWS::Serverless::Api
- 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 # gateway_responses: Any # method_settings: Any # models: Any cfn_api_props_mixin = sam_mixins.CfnApiPropsMixin(sam_mixins.CfnApiMixinProps( access_log_setting=sam_mixins.CfnApiPropsMixin.AccessLogSettingProperty( destination_arn="destinationArn", format="format" ), always_deploy=False, auth=sam_mixins.CfnApiPropsMixin.AuthProperty( add_default_authorizer_to_cors_preflight=False, authorizers=authorizers, default_authorizer="defaultAuthorizer" ), binary_media_types=["binaryMediaTypes"], cache_cluster_enabled=False, cache_cluster_size="cacheClusterSize", canary_setting=sam_mixins.CfnApiPropsMixin.CanarySettingProperty( deployment_id="deploymentId", percent_traffic=123, stage_variable_overrides={ "stage_variable_overrides_key": "stageVariableOverrides" }, use_stage_cache=False ), cors="cors", definition_body=definition_body, definition_uri="definitionUri", description="description", disable_execute_api_endpoint=False, domain=sam_mixins.CfnApiPropsMixin.DomainConfigurationProperty( base_path=["basePath"], certificate_arn="certificateArn", domain_name="domainName", endpoint_configuration="endpointConfiguration", mutual_tls_authentication=sam_mixins.CfnApiPropsMixin.MutualTlsAuthenticationProperty( truststore_uri="truststoreUri", truststore_version="truststoreVersion" ), ownership_verification_certificate_arn="ownershipVerificationCertificateArn", route53=sam_mixins.CfnApiPropsMixin.Route53ConfigurationProperty( distributed_domain_name="distributedDomainName", evaluate_target_health=False, hosted_zone_id="hostedZoneId", hosted_zone_name="hostedZoneName", ip_v6=False ), security_policy="securityPolicy" ), endpoint_configuration="endpointConfiguration", gateway_responses=gateway_responses, method_settings=[method_settings], minimum_compression_size=123, models=models, name="name", open_api_version="openApiVersion", stage_name="stageName", tags={ "tags_key": "tags" }, tracing_enabled=False, variables={ "variables_key": "variables" } ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Serverless::Api.- Parameters:
props (
Union[CfnApiMixinProps,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:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['accessLogSetting', 'alwaysDeploy', 'auth', 'binaryMediaTypes', 'cacheClusterEnabled', 'cacheClusterSize', 'canarySetting', 'cors', 'definitionBody', 'definitionUri', 'description', 'disableExecuteApiEndpoint', 'domain', 'endpointConfiguration', 'gatewayResponses', 'methodSettings', 'minimumCompressionSize', 'models', 'name', 'openApiVersion', 'stageName', 'tags', 'tracingEnabled', 'variables']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AccessLogSettingProperty
- class CfnApiPropsMixin.AccessLogSettingProperty(*, destination_arn=None, format=None)
Bases:
object- Parameters:
destination_arn (
Optional[str])format (
Optional[str])
- See:
- 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.CfnApiPropsMixin.AccessLogSettingProperty( destination_arn="destinationArn", format="format" )
Attributes
- destination_arn
-
- Type:
see
AuthProperty
- class CfnApiPropsMixin.AuthProperty(*, add_default_authorizer_to_cors_preflight=None, authorizers=None, default_authorizer=None)
Bases:
object- Parameters:
add_default_authorizer_to_cors_preflight (
Union[bool,IResolvable,None])authorizers (
Any)default_authorizer (
Optional[str])
- See:
- 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 auth_property = sam_mixins.CfnApiPropsMixin.AuthProperty( add_default_authorizer_to_cors_preflight=False, authorizers=authorizers, default_authorizer="defaultAuthorizer" )
Attributes
- add_default_authorizer_to_cors_preflight
-
- Type:
see
- authorizers
-
- Type:
see
CanarySettingProperty
- class CfnApiPropsMixin.CanarySettingProperty(*, deployment_id=None, percent_traffic=None, stage_variable_overrides=None, use_stage_cache=None)
Bases:
object- Parameters:
deployment_id (
Optional[str])percent_traffic (
Union[int,float,None])stage_variable_overrides (
Union[Mapping[str,str],IResolvable,None])use_stage_cache (
Union[bool,IResolvable,None])
- See:
- 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 canary_setting_property = sam_mixins.CfnApiPropsMixin.CanarySettingProperty( deployment_id="deploymentId", percent_traffic=123, stage_variable_overrides={ "stage_variable_overrides_key": "stageVariableOverrides" }, use_stage_cache=False )
Attributes
- deployment_id
-
- Type:
see
- percent_traffic
-
- Type:
see
- stage_variable_overrides
-
- Type:
see
CorsConfigurationProperty
- class CfnApiPropsMixin.CorsConfigurationProperty(*, allow_credentials=None, allow_headers=None, allow_methods=None, allow_origin=None, max_age=None)
Bases:
object- Parameters:
allow_credentials (
Union[bool,IResolvable,None])allow_headers (
Optional[str])allow_methods (
Optional[str])allow_origin (
Optional[str])max_age (
Optional[str])
- See:
- 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_property = sam_mixins.CfnApiPropsMixin.CorsConfigurationProperty( allow_credentials=False, allow_headers="allowHeaders", allow_methods="allowMethods", allow_origin="allowOrigin", max_age="maxAge" )
Attributes
- allow_credentials
-
- Type:
see
- allow_headers
-
- Type:
see
- allow_methods
-
- Type:
see
- allow_origin
-
- Type:
see
DomainConfigurationProperty
- class CfnApiPropsMixin.DomainConfigurationProperty(*, base_path=None, certificate_arn=None, domain_name=None, endpoint_configuration=None, mutual_tls_authentication=None, ownership_verification_certificate_arn=None, route53=None, security_policy=None)
Bases:
object- Parameters:
base_path (
Optional[Sequence[str]])certificate_arn (
Optional[str])domain_name (
Optional[str])endpoint_configuration (
Optional[str])mutual_tls_authentication (
Union[IResolvable,MutualTlsAuthenticationProperty,Dict[str,Any],None])ownership_verification_certificate_arn (
Optional[str])route53 (
Union[IResolvable,Route53ConfigurationProperty,Dict[str,Any],None])security_policy (
Optional[str])
- See:
- 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 domain_configuration_property = sam_mixins.CfnApiPropsMixin.DomainConfigurationProperty( base_path=["basePath"], certificate_arn="certificateArn", domain_name="domainName", endpoint_configuration="endpointConfiguration", mutual_tls_authentication=sam_mixins.CfnApiPropsMixin.MutualTlsAuthenticationProperty( truststore_uri="truststoreUri", truststore_version="truststoreVersion" ), ownership_verification_certificate_arn="ownershipVerificationCertificateArn", route53=sam_mixins.CfnApiPropsMixin.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
-
- Type:
see
- certificate_arn
-
- Type:
see
- domain_name
-
- Type:
see
- endpoint_configuration
-
- Type:
see
- mutual_tls_authentication
-
- Type:
see
- ownership_verification_certificate_arn
-
- Type:
see
- route53
-
- Type:
see
EndpointConfigurationProperty
- class CfnApiPropsMixin.EndpointConfigurationProperty(*, type=None, vpc_endpoint_ids=None)
Bases:
object- Parameters:
type (
Optional[str])vpc_endpoint_ids (
Optional[Sequence[str]])
- See:
- 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 endpoint_configuration_property = sam_mixins.CfnApiPropsMixin.EndpointConfigurationProperty( type="type", vpc_endpoint_ids=["vpcEndpointIds"] )
Attributes
- type
-
- Type:
see
MutualTlsAuthenticationProperty
- class CfnApiPropsMixin.MutualTlsAuthenticationProperty(*, truststore_uri=None, truststore_version=None)
Bases:
object- Parameters:
truststore_uri (
Optional[str])truststore_version (
Optional[str])
- See:
- 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.CfnApiPropsMixin.MutualTlsAuthenticationProperty( truststore_uri="truststoreUri", truststore_version="truststoreVersion" )
Attributes
- truststore_uri
-
- Type:
see
Route53ConfigurationProperty
- class CfnApiPropsMixin.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:
- 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.CfnApiPropsMixin.Route53ConfigurationProperty( distributed_domain_name="distributedDomainName", evaluate_target_health=False, hosted_zone_id="hostedZoneId", hosted_zone_name="hostedZoneName", ip_v6=False )
Attributes
- distributed_domain_name
-
- Type:
see
- evaluate_target_health
-
- Type:
see
- hosted_zone_id
-
- Type:
see
- hosted_zone_name
-
- Type:
see
S3LocationProperty
- class CfnApiPropsMixin.S3LocationProperty(*, bucket=None, key=None, version=None)
Bases:
object- Parameters:
bucket (
Optional[str])key (
Optional[str])version (
Union[int,float,None])
- See:
- 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.CfnApiPropsMixin.S3LocationProperty( bucket="bucket", key="key", version=123 )
Attributes
- bucket
-
- Type:
see
- key
-
- Type:
see