CfnApiProps
- class aws_cdk.aws_sam.CfnApiProps(*, stage_name, access_log_setting=None, always_deploy=None, auth=None, binary_media_types=None, cache_cluster_enabled=None, cache_cluster_size=None, canary_setting=None, cors=None, definition_body=None, definition_uri=None, description=None, disable_execute_api_endpoint=None, domain=None, endpoint_configuration=None, gateway_responses=None, method_settings=None, minimum_compression_size=None, models=None, name=None, open_api_version=None, tags=None, tracing_enabled=None, variables=None)
Bases:
object
Properties for defining a
CfnApi
.- Parameters:
stage_name (
str
) –access_log_setting (
Union
[IResolvable
,AccessLogSettingProperty
,Dict
[str
,Any
],None
]) –always_deploy (
Union
[bool
,IResolvable
,None
]) –auth (
Union
[IResolvable
,AuthProperty
,Dict
[str
,Any
],None
]) –binary_media_types (
Optional
[Sequence
[str
]]) –cache_cluster_enabled (
Union
[bool
,IResolvable
,None
]) –cache_cluster_size (
Optional
[str
]) –canary_setting (
Union
[IResolvable
,CanarySettingProperty
,Dict
[str
,Any
],None
]) –cors (
Union
[str
,IResolvable
,CorsConfigurationProperty
,Dict
[str
,Any
],None
]) –definition_body (
Any
) –definition_uri (
Union
[str
,IResolvable
,S3LocationProperty
,Dict
[str
,Any
],None
]) –description (
Optional
[str
]) –disable_execute_api_endpoint (
Union
[bool
,IResolvable
,None
]) –domain (
Union
[IResolvable
,DomainConfigurationProperty
,Dict
[str
,Any
],None
]) –endpoint_configuration (
Union
[str
,IResolvable
,EndpointConfigurationProperty
,Dict
[str
,Any
],None
]) –gateway_responses (
Any
) –method_settings (
Union
[Sequence
[Any
],IResolvable
,None
]) –minimum_compression_size (
Union
[int
,float
,None
]) –models (
Any
) –name (
Optional
[str
]) –open_api_version (
Optional
[str
]) –tags (
Optional
[Mapping
[str
,str
]]) –tracing_enabled (
Union
[bool
,IResolvable
,None
]) –variables (
Union
[IResolvable
,Mapping
[str
,str
],None
]) –
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-serverless-api.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 import aws_sam as sam # authorizers: Any # definition_body: Any # gateway_responses: Any # method_settings: Any # models: Any cfn_api_props = sam.CfnApiProps( stage_name="stageName", # the properties below are optional access_log_setting=sam.CfnApi.AccessLogSettingProperty( destination_arn="destinationArn", format="format" ), always_deploy=False, auth=sam.CfnApi.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.CfnApi.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.CfnApi.DomainConfigurationProperty( certificate_arn="certificateArn", domain_name="domainName", # the properties below are optional base_path=["basePath"], endpoint_configuration="endpointConfiguration", mutual_tls_authentication=sam.CfnApi.MutualTlsAuthenticationProperty( truststore_uri="truststoreUri", truststore_version="truststoreVersion" ), ownership_verification_certificate_arn="ownershipVerificationCertificateArn", route53=sam.CfnApi.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", tags={ "tags_key": "tags" }, tracing_enabled=False, variables={ "variables_key": "variables" } )
Attributes
- access_log_setting
-
- Type:
see
- always_deploy
-
- Type:
see
- auth
-
- Type:
see
- binary_media_types
-
- Type:
see
- cache_cluster_enabled
-
- Type:
see
- cache_cluster_size
-
- Type:
see
- canary_setting
-
- Type:
see
- cors
-
- Type:
see
- definition_body
-
- Type:
see
- definition_uri
-
- Type:
see
- description
-
- Type:
see
- disable_execute_api_endpoint
-
- Type:
see
- domain
-
- Type:
see
- endpoint_configuration
-
- Type:
see
- gateway_responses
-
- Type:
see
- method_settings
-
- Type:
see
- minimum_compression_size
-
- Type:
see
- models
-
- Type:
see
- name
-
- Type:
see
- open_api_version
-
- Type:
see
- stage_name
-
- Type:
see
- tags
-
- Type:
see
- tracing_enabled
-
- Type:
see