@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-10-27T14:10:42.860Z") @Stability(value=Stable) public class CfnApi extends CfnResource implements IInspectable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sam.*;
Object authorizers;
Object definitionBody;
Object gatewayResponses;
Object methodSettings;
Object models;
CfnApi cfnApi = CfnApi.Builder.create(this, "MyCfnApi")
.stageName("stageName")
// the properties below are optional
.accessLogSetting(AccessLogSettingProperty.builder()
.destinationArn("destinationArn")
.format("format")
.build())
.auth(AuthProperty.builder()
.addDefaultAuthorizerToCorsPreflight(false)
.authorizers(authorizers)
.defaultAuthorizer("defaultAuthorizer")
.build())
.binaryMediaTypes(List.of("binaryMediaTypes"))
.cacheClusterEnabled(false)
.cacheClusterSize("cacheClusterSize")
.canarySetting(CanarySettingProperty.builder()
.deploymentId("deploymentId")
.percentTraffic(123)
.stageVariableOverrides(Map.of(
"stageVariableOverridesKey", "stageVariableOverrides"))
.useStageCache(false)
.build())
.cors("cors")
.definitionBody(definitionBody)
.definitionUri("definitionUri")
.description("description")
.domain(DomainConfigurationProperty.builder()
.certificateArn("certificateArn")
.domainName("domainName")
// the properties below are optional
.basePath(List.of("basePath"))
.endpointConfiguration("endpointConfiguration")
.mutualTlsAuthentication(MutualTlsAuthenticationProperty.builder()
.truststoreUri("truststoreUri")
.truststoreVersion("truststoreVersion")
.build())
.ownershipVerificationCertificateArn("ownershipVerificationCertificateArn")
.route53(Route53ConfigurationProperty.builder()
.distributedDomainName("distributedDomainName")
.evaluateTargetHealth(false)
.hostedZoneId("hostedZoneId")
.hostedZoneName("hostedZoneName")
.ipV6(false)
.build())
.securityPolicy("securityPolicy")
.build())
.endpointConfiguration("endpointConfiguration")
.gatewayResponses(gatewayResponses)
.methodSettings(List.of(methodSettings))
.minimumCompressionSize(123)
.models(models)
.name("name")
.openApiVersion("openApiVersion")
.tags(Map.of(
"tagsKey", "tags"))
.tracingEnabled(false)
.variables(Map.of(
"variablesKey", "variables"))
.build();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnApi.AccessLogSettingProperty
Example:
|
static interface |
CfnApi.AuthProperty
Example:
|
static class |
CfnApi.Builder
A fluent builder for
CfnApi. |
static interface |
CfnApi.CanarySettingProperty
Example:
|
static interface |
CfnApi.CorsConfigurationProperty
Example:
|
static interface |
CfnApi.DomainConfigurationProperty
Example:
|
static interface |
CfnApi.EndpointConfigurationProperty
Example:
|
static interface |
CfnApi.MutualTlsAuthenticationProperty
Example:
|
static interface |
CfnApi.Route53ConfigurationProperty
Example:
|
static interface |
CfnApi.S3LocationProperty
Example:
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
static String |
REQUIRED_TRANSFORM
The `Transform` a template must use in order to use this resource.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnApi(Construct scope,
String id,
CfnApiProps props)
Create a new `AWS::Serverless::Api`.
|
protected |
CfnApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnApi(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAccessLogSetting()
`AWS::Serverless::Api.AccessLogSetting`.
|
Object |
getAuth()
`AWS::Serverless::Api.Auth`.
|
List<String> |
getBinaryMediaTypes()
`AWS::Serverless::Api.BinaryMediaTypes`.
|
Object |
getCacheClusterEnabled()
`AWS::Serverless::Api.CacheClusterEnabled`.
|
String |
getCacheClusterSize()
`AWS::Serverless::Api.CacheClusterSize`.
|
Object |
getCanarySetting()
`AWS::Serverless::Api.CanarySetting`.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getCors()
`AWS::Serverless::Api.Cors`.
|
Object |
getDefinitionBody()
`AWS::Serverless::Api.DefinitionBody`.
|
Object |
getDefinitionUri()
`AWS::Serverless::Api.DefinitionUri`.
|
String |
getDescription()
`AWS::Serverless::Api.Description`.
|
Object |
getDomain()
`AWS::Serverless::Api.Domain`.
|
Object |
getEndpointConfiguration()
`AWS::Serverless::Api.EndpointConfiguration`.
|
Object |
getGatewayResponses()
`AWS::Serverless::Api.GatewayResponses`.
|
Object |
getMethodSettings()
`AWS::Serverless::Api.MethodSettings`.
|
Number |
getMinimumCompressionSize()
`AWS::Serverless::Api.MinimumCompressionSize`.
|
Object |
getModels()
`AWS::Serverless::Api.Models`.
|
String |
getName()
`AWS::Serverless::Api.Name`.
|
String |
getOpenApiVersion()
`AWS::Serverless::Api.OpenApiVersion`.
|
String |
getStageName()
`AWS::Serverless::Api.StageName`.
|
TagManager |
getTags()
`AWS::Serverless::Api.Tags`.
|
Object |
getTracingEnabled()
`AWS::Serverless::Api.TracingEnabled`.
|
Object |
getVariables()
`AWS::Serverless::Api.Variables`.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAccessLogSetting(CfnApi.AccessLogSettingProperty value)
`AWS::Serverless::Api.AccessLogSetting`.
|
void |
setAccessLogSetting(IResolvable value)
`AWS::Serverless::Api.AccessLogSetting`.
|
void |
setAuth(CfnApi.AuthProperty value)
`AWS::Serverless::Api.Auth`.
|
void |
setAuth(IResolvable value)
`AWS::Serverless::Api.Auth`.
|
void |
setBinaryMediaTypes(List<String> value)
`AWS::Serverless::Api.BinaryMediaTypes`.
|
void |
setCacheClusterEnabled(Boolean value)
`AWS::Serverless::Api.CacheClusterEnabled`.
|
void |
setCacheClusterEnabled(IResolvable value)
`AWS::Serverless::Api.CacheClusterEnabled`.
|
void |
setCacheClusterSize(String value)
`AWS::Serverless::Api.CacheClusterSize`.
|
void |
setCanarySetting(CfnApi.CanarySettingProperty value)
`AWS::Serverless::Api.CanarySetting`.
|
void |
setCanarySetting(IResolvable value)
`AWS::Serverless::Api.CanarySetting`.
|
void |
setCors(CfnApi.CorsConfigurationProperty value)
`AWS::Serverless::Api.Cors`.
|
void |
setCors(IResolvable value)
`AWS::Serverless::Api.Cors`.
|
void |
setCors(String value)
`AWS::Serverless::Api.Cors`.
|
void |
setDefinitionBody(Object value)
`AWS::Serverless::Api.DefinitionBody`.
|
void |
setDefinitionUri(CfnApi.S3LocationProperty value)
`AWS::Serverless::Api.DefinitionUri`.
|
void |
setDefinitionUri(IResolvable value)
`AWS::Serverless::Api.DefinitionUri`.
|
void |
setDefinitionUri(String value)
`AWS::Serverless::Api.DefinitionUri`.
|
void |
setDescription(String value)
`AWS::Serverless::Api.Description`.
|
void |
setDomain(CfnApi.DomainConfigurationProperty value)
`AWS::Serverless::Api.Domain`.
|
void |
setDomain(IResolvable value)
`AWS::Serverless::Api.Domain`.
|
void |
setEndpointConfiguration(CfnApi.EndpointConfigurationProperty value)
`AWS::Serverless::Api.EndpointConfiguration`.
|
void |
setEndpointConfiguration(IResolvable value)
`AWS::Serverless::Api.EndpointConfiguration`.
|
void |
setEndpointConfiguration(String value)
`AWS::Serverless::Api.EndpointConfiguration`.
|
void |
setGatewayResponses(Object value)
`AWS::Serverless::Api.GatewayResponses`.
|
void |
setMethodSettings(IResolvable value)
`AWS::Serverless::Api.MethodSettings`.
|
void |
setMethodSettings(List<Object> value)
`AWS::Serverless::Api.MethodSettings`.
|
void |
setMinimumCompressionSize(Number value)
`AWS::Serverless::Api.MinimumCompressionSize`.
|
void |
setModels(Object value)
`AWS::Serverless::Api.Models`.
|
void |
setName(String value)
`AWS::Serverless::Api.Name`.
|
void |
setOpenApiVersion(String value)
`AWS::Serverless::Api.OpenApiVersion`.
|
void |
setStageName(String value)
`AWS::Serverless::Api.StageName`.
|
void |
setTracingEnabled(Boolean value)
`AWS::Serverless::Api.TracingEnabled`.
|
void |
setTracingEnabled(IResolvable value)
`AWS::Serverless::Api.TracingEnabled`.
|
void |
setVariables(IResolvable value)
`AWS::Serverless::Api.Variables`.
|
void |
setVariables(Map<String,String> value)
`AWS::Serverless::Api.Variables`.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
@Stability(value=Stable) public static final String REQUIRED_TRANSFORM
protected CfnApi(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnApi(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnApiProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public Object getDefinitionBody()
@Stability(value=Stable)
public void setDefinitionBody(@NotNull
Object value)
@Stability(value=Stable) @NotNull public Object getGatewayResponses()
@Stability(value=Stable)
public void setGatewayResponses(@NotNull
Object value)
@Stability(value=Stable) @NotNull public Object getModels()
@Stability(value=Stable)
public void setModels(@NotNull
Object value)
@Stability(value=Stable) @NotNull public String getStageName()
@Stability(value=Stable)
public void setStageName(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getAccessLogSetting()
@Stability(value=Stable)
public void setAccessLogSetting(@Nullable
CfnApi.AccessLogSettingProperty value)
@Stability(value=Stable)
public void setAccessLogSetting(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getAuth()
@Stability(value=Stable)
public void setAuth(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setAuth(@Nullable
CfnApi.AuthProperty value)
@Stability(value=Stable) @Nullable public List<String> getBinaryMediaTypes()
@Stability(value=Stable)
public void setBinaryMediaTypes(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public Object getCacheClusterEnabled()
@Stability(value=Stable)
public void setCacheClusterEnabled(@Nullable
Boolean value)
@Stability(value=Stable)
public void setCacheClusterEnabled(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getCacheClusterSize()
@Stability(value=Stable)
public void setCacheClusterSize(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getCanarySetting()
@Stability(value=Stable)
public void setCanarySetting(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setCanarySetting(@Nullable
CfnApi.CanarySettingProperty value)
@Stability(value=Stable) @Nullable public Object getCors()
@Stability(value=Stable)
public void setCors(@Nullable
String value)
@Stability(value=Stable)
public void setCors(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setCors(@Nullable
CfnApi.CorsConfigurationProperty value)
@Stability(value=Stable) @Nullable public Object getDefinitionUri()
@Stability(value=Stable)
public void setDefinitionUri(@Nullable
String value)
@Stability(value=Stable)
public void setDefinitionUri(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setDefinitionUri(@Nullable
CfnApi.S3LocationProperty value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getDomain()
@Stability(value=Stable)
public void setDomain(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setDomain(@Nullable
CfnApi.DomainConfigurationProperty value)
@Stability(value=Stable) @Nullable public Object getEndpointConfiguration()
@Stability(value=Stable)
public void setEndpointConfiguration(@Nullable
String value)
@Stability(value=Stable)
public void setEndpointConfiguration(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setEndpointConfiguration(@Nullable
CfnApi.EndpointConfigurationProperty value)
@Stability(value=Stable) @Nullable public Object getMethodSettings()
@Stability(value=Stable)
public void setMethodSettings(@Nullable
List<Object> value)
@Stability(value=Stable)
public void setMethodSettings(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Number getMinimumCompressionSize()
@Stability(value=Stable)
public void setMinimumCompressionSize(@Nullable
Number value)
@Stability(value=Stable) @Nullable public String getName()
@Stability(value=Stable)
public void setName(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getOpenApiVersion()
@Stability(value=Stable)
public void setOpenApiVersion(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getTracingEnabled()
@Stability(value=Stable)
public void setTracingEnabled(@Nullable
Boolean value)
@Stability(value=Stable)
public void setTracingEnabled(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getVariables()
@Stability(value=Stable)
public void setVariables(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.