Class CfnApi
A CloudFormation AWS::Serverless::Api
.
Inherited Members
Namespace: Amazon.CDK.AWS.SAM
Assembly: Amazon.CDK.AWS.SAM.dll
Syntax (csharp)
public class CfnApi : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnApi
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
CloudformationResource: AWS::Serverless::Api
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SAM;
var authorizers;
var definitionBody;
var gatewayResponses;
var methodSettings;
var models;
var cfnApi = new CfnApi(this, "MyCfnApi", new CfnApiProps {
StageName = "stageName",
// the properties below are optional
AccessLogSetting = new AccessLogSettingProperty {
DestinationArn = "destinationArn",
Format = "format"
},
Auth = new AuthProperty {
AddDefaultAuthorizerToCorsPreflight = false,
Authorizers = authorizers,
DefaultAuthorizer = "defaultAuthorizer"
},
BinaryMediaTypes = new [] { "binaryMediaTypes" },
CacheClusterEnabled = false,
CacheClusterSize = "cacheClusterSize",
CanarySetting = new CanarySettingProperty {
DeploymentId = "deploymentId",
PercentTraffic = 123,
StageVariableOverrides = new Dictionary<string, string> {
{ "stageVariableOverridesKey", "stageVariableOverrides" }
},
UseStageCache = false
},
Cors = "cors",
DefinitionBody = definitionBody,
DefinitionUri = "definitionUri",
Description = "description",
DisableExecuteApiEndpoint = false,
Domain = new DomainConfigurationProperty {
CertificateArn = "certificateArn",
DomainName = "domainName",
// the properties below are optional
BasePath = new [] { "basePath" },
EndpointConfiguration = "endpointConfiguration",
MutualTlsAuthentication = new MutualTlsAuthenticationProperty {
TruststoreUri = "truststoreUri",
TruststoreVersion = "truststoreVersion"
},
OwnershipVerificationCertificateArn = "ownershipVerificationCertificateArn",
Route53 = new Route53ConfigurationProperty {
DistributedDomainName = "distributedDomainName",
EvaluateTargetHealth = false,
HostedZoneId = "hostedZoneId",
HostedZoneName = "hostedZoneName",
IpV6 = false
},
SecurityPolicy = "securityPolicy"
},
EndpointConfiguration = "endpointConfiguration",
GatewayResponses = gatewayResponses,
MethodSettings = new [] { methodSettings },
MinimumCompressionSize = 123,
Models = models,
Name = "name",
OpenApiVersion = "openApiVersion",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
TracingEnabled = false,
Variables = new Dictionary<string, string> {
{ "variablesKey", "variables" }
}
});
Synopsis
Constructors
CfnApi(Construct, String, ICfnApiProps) | Create a new |
CfnApi(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnApi(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AccessLogSetting |
|
Auth |
|
BinaryMediaTypes |
|
CacheClusterEnabled |
|
CacheClusterSize |
|
CanarySetting |
|
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Cors |
|
DefinitionBody |
|
DefinitionUri |
|
Description |
|
DisableExecuteApiEndpoint |
|
Domain |
|
EndpointConfiguration |
|
GatewayResponses |
|
MethodSettings |
|
MinimumCompressionSize |
|
Models |
|
Name |
|
OpenApiVersion |
|
REQUIRED_TRANSFORM | The |
StageName |
|
Tags |
|
TracingEnabled |
|
Variables |
|
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnApi(Construct, String, ICfnApiProps)
Create a new AWS::Serverless::Api
.
public CfnApi(Construct scope, string id, ICfnApiProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnApiProps
- resource properties.
CfnApi(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnApi(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnApi(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnApi(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AccessLogSetting
AWS::Serverless::Api.AccessLogSetting
.
public virtual object AccessLogSetting { get; set; }
Property Value
System.Object
Remarks
Auth
AWS::Serverless::Api.Auth
.
public virtual object Auth { get; set; }
Property Value
System.Object
Remarks
BinaryMediaTypes
AWS::Serverless::Api.BinaryMediaTypes
.
public virtual string[] BinaryMediaTypes { get; set; }
Property Value
System.String[]
Remarks
CacheClusterEnabled
AWS::Serverless::Api.CacheClusterEnabled
.
public virtual object CacheClusterEnabled { get; set; }
Property Value
System.Object
Remarks
CacheClusterSize
AWS::Serverless::Api.CacheClusterSize
.
public virtual string CacheClusterSize { get; set; }
Property Value
System.String
Remarks
CanarySetting
AWS::Serverless::Api.CanarySetting
.
public virtual object CanarySetting { get; set; }
Property Value
System.Object
Remarks
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Cors
AWS::Serverless::Api.Cors
.
public virtual object Cors { get; set; }
Property Value
System.Object
Remarks
DefinitionBody
AWS::Serverless::Api.DefinitionBody
.
public virtual object DefinitionBody { get; set; }
Property Value
System.Object
Remarks
DefinitionUri
AWS::Serverless::Api.DefinitionUri
.
public virtual object DefinitionUri { get; set; }
Property Value
System.Object
Remarks
Description
AWS::Serverless::Api.Description
.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
DisableExecuteApiEndpoint
AWS::Serverless::Api.DisableExecuteApiEndpoint
.
public virtual object DisableExecuteApiEndpoint { get; set; }
Property Value
System.Object
Remarks
Domain
AWS::Serverless::Api.Domain
.
public virtual object Domain { get; set; }
Property Value
System.Object
Remarks
EndpointConfiguration
AWS::Serverless::Api.EndpointConfiguration
.
public virtual object EndpointConfiguration { get; set; }
Property Value
System.Object
Remarks
GatewayResponses
AWS::Serverless::Api.GatewayResponses
.
public virtual object GatewayResponses { get; set; }
Property Value
System.Object
Remarks
MethodSettings
AWS::Serverless::Api.MethodSettings
.
public virtual object MethodSettings { get; set; }
Property Value
System.Object
Remarks
MinimumCompressionSize
AWS::Serverless::Api.MinimumCompressionSize
.
public virtual Nullable<double> MinimumCompressionSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Models
AWS::Serverless::Api.Models
.
public virtual object Models { get; set; }
Property Value
System.Object
Remarks
Name
AWS::Serverless::Api.Name
.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
OpenApiVersion
AWS::Serverless::Api.OpenApiVersion
.
public virtual string OpenApiVersion { get; set; }
Property Value
System.String
Remarks
REQUIRED_TRANSFORM
The Transform
a template must use in order to use this resource.
public static string REQUIRED_TRANSFORM { get; }
Property Value
System.String
StageName
AWS::Serverless::Api.StageName
.
public virtual string StageName { get; set; }
Property Value
System.String
Remarks
Tags
AWS::Serverless::Api.Tags
.
public virtual TagManager Tags { get; }
Property Value
Remarks
TracingEnabled
AWS::Serverless::Api.TracingEnabled
.
public virtual object TracingEnabled { get; set; }
Property Value
System.Object
Remarks
Variables
AWS::Serverless::Api.Variables
.
public virtual object Variables { get; set; }
Property Value
System.Object
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>