Class StageBase
Base class for an ApiGateway Stage.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class StageBase : Resource, IStage, IResource, IConstruct, IDependable
Syntax (vb)
Public MustInherit Class StageBase Inherits Resource Implements IStage, IResource, IConstruct, IDependable
Synopsis
Constructors
StageBase(Construct, string, IResourceProps?) | Base class for an ApiGateway Stage. |
Properties
RestApi | RestApi to which this stage is associated. |
StageArn | Returns the resource ARN for this stage:. |
StageName | Name of this stage. |
Methods
AddApiKey(string, IApiKeyOptions?) | Add an ApiKey to this stage. |
Metric(string, IMetricOptions?) | Returns the given named metric for this stage. |
MetricCacheHitCount(IMetricOptions?) | Metric for the number of requests served from the API cache in a given period. |
MetricCacheMissCount(IMetricOptions?) | Metric for the number of requests served from the backend in a given period, when API caching is enabled. |
MetricClientError(IMetricOptions?) | Metric for the number of client-side errors captured in a given period. |
MetricCount(IMetricOptions?) | Metric for the total number API requests in a given period. |
MetricIntegrationLatency(IMetricOptions?) | Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend. |
MetricLatency(IMetricOptions?) | The time between when API Gateway receives a request from a client and when it returns a response to the client. |
MetricServerError(IMetricOptions?) | Metric for the number of server-side errors captured in a given period. |
UrlForPath(string?) | Returns the invoke URL for a certain path. |
Constructors
StageBase(Construct, string, IResourceProps?)
Base class for an ApiGateway Stage.
protected StageBase(Construct scope, string id, IResourceProps? props = null)
Parameters
- scope Construct
- id string
- props IResourceProps
Properties
RestApi
RestApi to which this stage is associated.
public abstract IRestApi RestApi { get; }
Property Value
StageArn
Returns the resource ARN for this stage:.
public virtual string StageArn { get; }
Property Value
Remarks
arn:aws:apigateway:{region}::/restapis/{restApiId}/stages/{stageName}
Note that this is separate from the execute-api ARN for methods and resources within this stage.
Attribute: true
StageName
Methods
AddApiKey(string, IApiKeyOptions?)
Add an ApiKey to this stage.
public virtual IApiKey AddApiKey(string id, IApiKeyOptions? options = null)
Parameters
- id string
- options IApiKeyOptions
Returns
Metric(string, IMetricOptions?)
Returns the given named metric for this stage.
public virtual Metric Metric(string metricName, IMetricOptions? props = null)
Parameters
- metricName string
- props IMetricOptions
Returns
MetricCacheHitCount(IMetricOptions?)
Metric for the number of requests served from the API cache in a given period.
public virtual Metric MetricCacheHitCount(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
MetricCacheMissCount(IMetricOptions?)
Metric for the number of requests served from the backend in a given period, when API caching is enabled.
public virtual Metric MetricCacheMissCount(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
MetricClientError(IMetricOptions?)
Metric for the number of client-side errors captured in a given period.
public virtual Metric MetricClientError(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
MetricCount(IMetricOptions?)
Metric for the total number API requests in a given period.
public virtual Metric MetricCount(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sample count over 5 minutes
MetricIntegrationLatency(IMetricOptions?)
Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
public virtual Metric MetricIntegrationLatency(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - average over 5 minutes.
MetricLatency(IMetricOptions?)
The time between when API Gateway receives a request from a client and when it returns a response to the client.
public virtual Metric MetricLatency(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
The latency includes the integration latency and other API Gateway overhead.
Default: - average over 5 minutes.
MetricServerError(IMetricOptions?)
Metric for the number of server-side errors captured in a given period.
public virtual Metric MetricServerError(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: - sum over 5 minutes
UrlForPath(string?)
Returns the invoke URL for a certain path.
public virtual string UrlForPath(string? path = null)
Parameters
- path string
The resource path.