class CfnApiPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.SAM.Mixins.CfnApiPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awssam/mixins#CfnApiPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.sam.mixins.CfnApiPropsMixin |
Python | aws_cdk.mixins_preview.aws_sam.mixins.CfnApiPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_sam » mixins » CfnApiPropsMixin |
Implements
IMixin
Extends
Mixin
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-serverless-api.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as sam_mixins } from '@aws-cdk/mixins-preview/aws-sam';
declare const authorizers: any;
declare const definitionBody: any;
declare const gatewayResponses: any;
declare const methodSettings: any;
declare const models: any;
const cfnApiPropsMixin = new sam_mixins.CfnApiPropsMixin({
accessLogSetting: {
destinationArn: 'destinationArn',
format: 'format',
},
alwaysDeploy: false,
auth: {
addDefaultAuthorizerToCorsPreflight: false,
authorizers: authorizers,
defaultAuthorizer: 'defaultAuthorizer',
},
binaryMediaTypes: ['binaryMediaTypes'],
cacheClusterEnabled: false,
cacheClusterSize: 'cacheClusterSize',
canarySetting: {
deploymentId: 'deploymentId',
percentTraffic: 123,
stageVariableOverrides: {
stageVariableOverridesKey: 'stageVariableOverrides',
},
useStageCache: false,
},
cors: 'cors',
definitionBody: definitionBody,
definitionUri: 'definitionUri',
description: 'description',
disableExecuteApiEndpoint: false,
domain: {
basePath: ['basePath'],
certificateArn: 'certificateArn',
domainName: 'domainName',
endpointConfiguration: 'endpointConfiguration',
mutualTlsAuthentication: {
truststoreUri: 'truststoreUri',
truststoreVersion: 'truststoreVersion',
},
ownershipVerificationCertificateArn: 'ownershipVerificationCertificateArn',
route53: {
distributedDomainName: 'distributedDomainName',
evaluateTargetHealth: false,
hostedZoneId: 'hostedZoneId',
hostedZoneName: 'hostedZoneName',
ipV6: false,
},
securityPolicy: 'securityPolicy',
},
endpointConfiguration: 'endpointConfiguration',
gatewayResponses: gatewayResponses,
methodSettings: [methodSettings],
minimumCompressionSize: 123,
models: models,
name: 'name',
openApiVersion: 'openApiVersion',
stageName: 'stageName',
tags: {
tagsKey: 'tags',
},
tracingEnabled: false,
variables: {
variablesKey: 'variables',
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnApiPropsMixin(props: CfnApiMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Api Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::Serverless::Api.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript