CfnRestApiPropsMixin
- class aws_cdk.mixins_preview.aws_apigateway.mixins.CfnRestApiPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::ApiGateway::RestApiresource creates a REST API.For more information, see restapi:create in the Amazon API Gateway REST API Reference . .. epigraph:
On January 1, 2016, the Swagger Specification was donated to the `OpenAPI initiative <https://docs.aws.amazon.com/https://www.openapis.org/>`_ , becoming the foundation of the OpenAPI Specification.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
- CloudformationResource:
AWS::ApiGateway::RestApi
- 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_apigateway import mixins as apigateway_mixins # body: Any # policy: Any cfn_rest_api_props_mixin = apigateway_mixins.CfnRestApiPropsMixin(apigateway_mixins.CfnRestApiMixinProps( api_key_source_type="apiKeySourceType", binary_media_types=["binaryMediaTypes"], body=body, body_s3_location=apigateway_mixins.CfnRestApiPropsMixin.S3LocationProperty( bucket="bucket", e_tag="eTag", key="key", version="version" ), clone_from="cloneFrom", description="description", disable_execute_api_endpoint=False, endpoint_access_mode="endpointAccessMode", endpoint_configuration=apigateway_mixins.CfnRestApiPropsMixin.EndpointConfigurationProperty( ip_address_type="ipAddressType", types=["types"], vpc_endpoint_ids=["vpcEndpointIds"] ), fail_on_warnings=False, minimum_compression_size=123, mode="mode", name="name", parameters={ "parameters_key": "parameters" }, policy=policy, security_policy="securityPolicy", tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::ApiGateway::RestApi.- Parameters:
props (
Union[CfnRestApiMixinProps,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 = ['apiKeySourceType', 'binaryMediaTypes', 'body', 'bodyS3Location', 'cloneFrom', 'description', 'disableExecuteApiEndpoint', 'endpointAccessMode', 'endpointConfiguration', 'failOnWarnings', 'minimumCompressionSize', 'mode', 'name', 'parameters', 'policy', 'securityPolicy', 'tags']
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
EndpointConfigurationProperty
- class CfnRestApiPropsMixin.EndpointConfigurationProperty(*, ip_address_type=None, types=None, vpc_endpoint_ids=None)
Bases:
objectThe
EndpointConfigurationproperty type specifies the endpoint types and IP address types of a REST API.EndpointConfigurationis a property of the AWS::ApiGateway::RestApi resource.- Parameters:
ip_address_type (
Optional[str]) – The IP address types that can invoke an API (RestApi). Useipv4to allow only IPv4 addresses to invoke an API, or usedualstackto allow both IPv4 and IPv6 addresses to invoke an API. For thePRIVATEendpoint type, onlydualstackis supported.types (
Optional[Sequence[str]]) – A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is"EDGE". For a regional API and its custom domain name, the endpoint type isREGIONAL. For a private API, the endpoint type isPRIVATE.vpc_endpoint_ids (
Optional[Sequence[str]]) – A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes. It is only supported forPRIVATEendpoint type.
- 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_apigateway import mixins as apigateway_mixins endpoint_configuration_property = apigateway_mixins.CfnRestApiPropsMixin.EndpointConfigurationProperty( ip_address_type="ipAddressType", types=["types"], vpc_endpoint_ids=["vpcEndpointIds"] )
Attributes
- ip_address_type
The IP address types that can invoke an API (RestApi).
Use
ipv4to allow only IPv4 addresses to invoke an API, or usedualstackto allow both IPv4 and IPv6 addresses to invoke an API. For thePRIVATEendpoint type, onlydualstackis supported.
- types
A list of endpoint types of an API (RestApi) or its custom domain name (DomainName).
For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE". For a regional API and its custom domain name, the endpoint type isREGIONAL. For a private API, the endpoint type isPRIVATE.
- vpc_endpoint_ids
A list of VpcEndpointIds of an API (RestApi) against which to create Route53 ALIASes.
It is only supported for
PRIVATEendpoint type.
S3LocationProperty
- class CfnRestApiPropsMixin.S3LocationProperty(*, bucket=None, e_tag=None, key=None, version=None)
Bases:
objectS3Locationis a property of the AWS::ApiGateway::RestApi resource that specifies the Amazon S3 location of a OpenAPI (formerly Swagger) file that defines a set of RESTful APIs in JSON or YAML.On January 1, 2016, the Swagger Specification was donated to the OpenAPI initiative , becoming the foundation of the OpenAPI Specification.
- Parameters:
bucket (
Optional[str]) – The name of the S3 bucket where the OpenAPI file is stored.e_tag (
Optional[str]) – The Amazon S3 ETag (a file checksum) of the OpenAPI file. If you don’t specify a value, API Gateway skips ETag validation of your OpenAPI file.key (
Optional[str]) – The file name of the OpenAPI file (Amazon S3 object name).version (
Optional[str]) – For versioning-enabled buckets, a specific version of the OpenAPI file.
- 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_apigateway import mixins as apigateway_mixins s3_location_property = apigateway_mixins.CfnRestApiPropsMixin.S3LocationProperty( bucket="bucket", e_tag="eTag", key="key", version="version" )
Attributes
- bucket
The name of the S3 bucket where the OpenAPI file is stored.
- e_tag
The Amazon S3 ETag (a file checksum) of the OpenAPI file.
If you don’t specify a value, API Gateway skips ETag validation of your OpenAPI file.
- key
The file name of the OpenAPI file (Amazon S3 object name).
- version
For versioning-enabled buckets, a specific version of the OpenAPI file.