Show / Hide Table of Contents

Class Deployment

A Deployment of a REST API.

Inheritance
System.Object
Construct
Resource
Deployment
Implements
IResource
IConstruct
Constructs.IConstruct
IDependable
Inherited Members
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.AWS.APIGateway.dll
Syntax (csharp)
public class Deployment : Resource, IResource, IConstruct, IConstruct, IDependable
Syntax (vb)
Public Class Deployment
    Inherits Resource
    Implements IResource, IConstruct, IConstruct, IDependable
Remarks

An immutable representation of a RestApi resource that can be called by users using Stages. A deployment must be associated with a Stage for it to be callable over the Internet.

Normally, you don't need to define deployments manually. The RestApi construct manages a Deployment resource that represents the latest model. It can be accessed through restApi.latestDeployment (unless deploy: false is set when defining the RestApi).

If you manually define this resource, you will need to know that since deployments are immutable, as long as the resource's logical ID doesn't change, the deployment will represent the snapshot in time in which the resource was created. This means that if you modify the RestApi model (i.e. add methods or resources), these changes will not be reflected unless a new deployment resource is created.

To achieve this behavior, the method addToLogicalId(data) can be used to augment the logical ID generated for the deployment resource such that it will include arbitrary data. This is done automatically for the restApi.latestDeployment deployment.

Furthermore, since a deployment does not reference any of the REST API resources and methods, CloudFormation will likely provision it before these resources are created, which means that it will represent a "half-baked" model. Use the node.addDependency(dep) method to circumvent that. This is done automatically for the restApi.latestDeployment deployment.

Synopsis

Constructors

Deployment(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

Deployment(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

Deployment(Construct, String, IDeploymentProps)

Properties

Api
DeploymentId

Methods

AddToLogicalId(Object)

Adds a component to the hash that determines this Deployment resource's logical ID.

Constructors

Deployment(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected Deployment(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

Deployment(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected Deployment(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

Deployment(Construct, String, IDeploymentProps)

public Deployment(Construct scope, string id, IDeploymentProps props)
Parameters
scope Constructs.Construct
id System.String
props IDeploymentProps

Properties

Api

public virtual IRestApi Api { get; }
Property Value

IRestApi

DeploymentId

public virtual string DeploymentId { get; }
Property Value

System.String

Remarks

Attribute: true

Methods

AddToLogicalId(Object)

Adds a component to the hash that determines this Deployment resource's logical ID.

public virtual void AddToLogicalId(object data)
Parameters
data System.Object
Remarks

This should be called by constructs of the API Gateway model that want to invalidate the deployment when their settings change. The component will be resolve()ed during synthesis so tokens are welcome.

Implements

IResource
IConstruct
Constructs.IConstruct
IDependable
Back to top Generated by DocFX