Table of Contents

Class CfnStage

Namespace
Amazon.CDK.AWS.APIGateway
Assembly
Amazon.CDK.AWS.APIGateway.dll

A CloudFormation AWS::ApiGateway::Stage.

public class CfnStage : CfnResource, IInspectable
Inheritance
CfnStage
Implements
IInspectable

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.APIGateway;

             var cfnStage = new CfnStage(this, "MyCfnStage", new CfnStageProps {
                 RestApiId = "restApiId",

                 // the properties below are optional
                 AccessLogSetting = new AccessLogSettingProperty {
                     DestinationArn = "destinationArn",
                     Format = "format"
                 },
                 CacheClusterEnabled = false,
                 CacheClusterSize = "cacheClusterSize",
                 CanarySetting = new CanarySettingProperty {
                     DeploymentId = "deploymentId",
                     PercentTraffic = 123,
                     StageVariableOverrides = new Dictionary<string, string> {
                         { "stageVariableOverridesKey", "stageVariableOverrides" }
                     },
                     UseStageCache = false
                 },
                 ClientCertificateId = "clientCertificateId",
                 DeploymentId = "deploymentId",
                 Description = "description",
                 DocumentationVersion = "documentationVersion",
                 MethodSettings = new [] { new MethodSettingProperty {
                     CacheDataEncrypted = false,
                     CacheTtlInSeconds = 123,
                     CachingEnabled = false,
                     DataTraceEnabled = false,
                     HttpMethod = "httpMethod",
                     LoggingLevel = "loggingLevel",
                     MetricsEnabled = false,
                     ResourcePath = "resourcePath",
                     ThrottlingBurstLimit = 123,
                     ThrottlingRateLimit = 123
                 } },
                 StageName = "stageName",
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } },
                 TracingEnabled = false,
                 Variables = new Dictionary<string, string> {
                     { "variablesKey", "variables" }
                 }
             });

Remarks

The AWS::ApiGateway::Stage resource creates a stage for a deployment.

CloudformationResource: AWS::ApiGateway::Stage

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html

ExampleMetadata: fixture=_generated

Constructors

CfnStage(Construct, string, ICfnStageProps)

Create a new AWS::ApiGateway::Stage.

public CfnStage(Construct scope, string id, ICfnStageProps props)

Parameters

scope Construct
  • scope in which this resource is defined.
id string
  • scoped id of the resource.
props ICfnStageProps
  • resource properties.

Properties

AccessLogSetting

Access log settings, including the access log format and access log destination ARN.

public virtual object? AccessLogSetting { get; set; }

Property Value

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

string

CacheClusterEnabled

Specifies whether a cache cluster is enabled for the stage.

public virtual object? CacheClusterEnabled { get; set; }

Property Value

object

Remarks

CacheClusterSize

The stage's cache capacity in GB.

public virtual string? CacheClusterSize { get; set; }

Property Value

string

Remarks

CanarySetting

Settings for the canary deployment in this stage.

public virtual object? CanarySetting { get; set; }

Property Value

object

Remarks

CfnProperties

protected override IDictionary<string, object> CfnProperties { get; }

Property Value

IDictionary<string, object>

ClientCertificateId

The identifier of a client certificate for an API stage.

public virtual string? ClientCertificateId { get; set; }

Property Value

string

Remarks

DeploymentId

The identifier of the Deployment that the stage points to.

public virtual string? DeploymentId { get; set; }

Property Value

string

Remarks

Description

The stage's description.

public virtual string? Description { get; set; }

Property Value

string

Remarks

DocumentationVersion

The version of the associated API documentation.

public virtual string? DocumentationVersion { get; set; }

Property Value

string

Remarks

MethodSettings

A map that defines the method settings for a Stage resource.

public virtual object? MethodSettings { get; set; }

Property Value

object

Remarks

Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /* /* for overriding all methods in the stage.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-methodsettings

RestApiId

The string identifier of the associated RestApi.

public virtual string RestApiId { get; set; }

Property Value

string

Remarks

StageName

The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway.

public virtual string? StageName { get; set; }

Property Value

string

Remarks

Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-stagename

Tags

The collection of tags.

public virtual TagManager Tags { get; }

Property Value

TagManager

Remarks

TracingEnabled

Specifies whether active tracing with X-ray is enabled for the Stage.

public virtual object? TracingEnabled { get; set; }

Property Value

object

Remarks

Variables

A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value.

public virtual object? Variables { get; set; }

Property Value

object

Remarks

Variable names are limited to alphanumeric characters. Values must match the following regular expression: [A-Za-z0-9-._~:/?#&=,]+ .

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-variables

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 IDictionary<string, object>

Returns

IDictionary<string, object>