Show / Hide Table of Contents

Class Stage

Inheritance
object
Resource
StageBase
Stage
Implements
IStage
IResource
IStageRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
StageBase.AddApiKey(string, IApiKeyOptions)
StageBase.Metric(string, IMetricOptions)
StageBase.MetricCacheHitCount(IMetricOptions)
StageBase.MetricCacheMissCount(IMetricOptions)
StageBase.MetricClientError(IMetricOptions)
StageBase.MetricCount(IMetricOptions)
StageBase.MetricIntegrationLatency(IMetricOptions)
StageBase.MetricLatency(IMetricOptions)
StageBase.MetricServerError(IMetricOptions)
StageBase.UrlForPath(string)
StageBase.StageArn
StageBase.StageRef
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Stage : StageBase, IStage, IResource, IStageRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class Stage Inherits StageBase Implements IStage, IResource, IStageRef, IConstruct, IDependable, IEnvironmentAware
Remarks

ExampleMetadata: infused

Examples
// production stage
            var prodLogGroup = new LogGroup(this, "PrdLogs");
            var api = new RestApi(this, "books", new RestApiProps {
                DeployOptions = new StageOptions {
                    AccessLogDestination = new LogGroupLogDestination(prodLogGroup),
                    AccessLogFormat = AccessLogFormat.JsonWithStandardFields()
                }
            });
            var deployment = new Deployment(this, "Deployment", new DeploymentProps { Api = api });

            // development stage
            var devLogGroup = new LogGroup(this, "DevLogs");
            new Stage(this, "dev", new StageProps {
                Deployment = deployment,
                AccessLogDestination = new LogGroupLogDestination(devLogGroup),
                AccessLogFormat = AccessLogFormat.JsonWithStandardFields(new JsonWithStandardFieldProps {
                    Caller = false,
                    HttpMethod = true,
                    Ip = true,
                    Protocol = true,
                    RequestTime = true,
                    ResourcePath = true,
                    ResponseLength = true,
                    Status = true,
                    User = true
                })
            });

Synopsis

Constructors

Stage(Construct, string, IStageProps)

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

RestApi

RestApi to which this stage is associated.

StageName

Name of this stage.

Methods

FromStageAttributes(Construct, string, IStageAttributes)

Import a Stage by its attributes.

Constructors

Stage(Construct, string, IStageProps)

public Stage(Construct scope, string id, IStageProps props)
Parameters
scope Construct
id string
props IStageProps
Remarks

ExampleMetadata: infused

Examples
// production stage
            var prodLogGroup = new LogGroup(this, "PrdLogs");
            var api = new RestApi(this, "books", new RestApiProps {
                DeployOptions = new StageOptions {
                    AccessLogDestination = new LogGroupLogDestination(prodLogGroup),
                    AccessLogFormat = AccessLogFormat.JsonWithStandardFields()
                }
            });
            var deployment = new Deployment(this, "Deployment", new DeploymentProps { Api = api });

            // development stage
            var devLogGroup = new LogGroup(this, "DevLogs");
            new Stage(this, "dev", new StageProps {
                Deployment = deployment,
                AccessLogDestination = new LogGroupLogDestination(devLogGroup),
                AccessLogFormat = AccessLogFormat.JsonWithStandardFields(new JsonWithStandardFieldProps {
                    Caller = false,
                    HttpMethod = true,
                    Ip = true,
                    Protocol = true,
                    RequestTime = true,
                    ResourcePath = true,
                    ResponseLength = true,
                    Status = true,
                    User = true
                })
            });

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

ExampleMetadata: infused

RestApi

RestApi to which this stage is associated.

public override IRestApi RestApi { get; }
Property Value

IRestApi

Overrides
StageBase.RestApi
Remarks

ExampleMetadata: infused

StageName

Name of this stage.

public override string StageName { get; }
Property Value

string

Overrides
StageBase.StageName
Remarks

ExampleMetadata: infused

Methods

FromStageAttributes(Construct, string, IStageAttributes)

Import a Stage by its attributes.

public static IStage FromStageAttributes(Construct scope, string id, IStageAttributes attrs)
Parameters
scope Construct
id string
attrs IStageAttributes
Returns

IStage

Remarks

ExampleMetadata: infused

Implements

IStage
IResource
IStageRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX