Class CfnApi
Inherited Members
Namespace: Amazon.CDK.AWS.SAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnApi : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnApi
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-serverless-api.html
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"
},
AlwaysDeploy = false,
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(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 |
CfnApi(Construct, String, ICfnApiProps) |
Properties
AccessLogSetting | |
AlwaysDeploy | |
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 | Tag Manager which manages the tags for this resource. |
TagsRaw | |
TracingEnabled | |
Variables |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
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
CfnApi(Construct, String, ICfnApiProps)
public CfnApi(Construct scope, string id, ICfnApiProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnApiProps
Resource properties.
Properties
AccessLogSetting
public virtual object AccessLogSetting { get; set; }
Property Value
System.Object
AlwaysDeploy
public virtual object AlwaysDeploy { get; set; }
Property Value
System.Object
Auth
public virtual object Auth { get; set; }
Property Value
System.Object
BinaryMediaTypes
public virtual string[] BinaryMediaTypes { get; set; }
Property Value
System.String[]
CacheClusterEnabled
public virtual object CacheClusterEnabled { get; set; }
Property Value
System.Object
CacheClusterSize
public virtual string CacheClusterSize { get; set; }
Property Value
System.String
CanarySetting
public virtual object CanarySetting { get; set; }
Property Value
System.Object
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
public virtual object Cors { get; set; }
Property Value
System.Object
DefinitionBody
public virtual object DefinitionBody { get; set; }
Property Value
System.Object
DefinitionUri
public virtual object DefinitionUri { get; set; }
Property Value
System.Object
Description
public virtual string Description { get; set; }
Property Value
System.String
DisableExecuteApiEndpoint
public virtual object DisableExecuteApiEndpoint { get; set; }
Property Value
System.Object
Domain
public virtual object Domain { get; set; }
Property Value
System.Object
EndpointConfiguration
public virtual object EndpointConfiguration { get; set; }
Property Value
System.Object
GatewayResponses
public virtual object GatewayResponses { get; set; }
Property Value
System.Object
MethodSettings
public virtual object MethodSettings { get; set; }
Property Value
System.Object
MinimumCompressionSize
public virtual Nullable<double> MinimumCompressionSize { get; set; }
Property Value
System.Nullable<System.Double>
Models
public virtual object Models { get; set; }
Property Value
System.Object
Name
public virtual string Name { get; set; }
Property Value
System.String
OpenApiVersion
public virtual string OpenApiVersion { get; set; }
Property Value
System.String
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
public virtual string StageName { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
public virtual IDictionary<string, string> TagsRaw { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
TracingEnabled
public virtual object TracingEnabled { get; set; }
Property Value
System.Object
Variables
public virtual object Variables { get; set; }
Property Value
System.Object
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>