Show / Hide Table of Contents

Class Deployment

Provides an API Gateway REST Deployment.

Note: This resource depends on having at least one aws.apigateway.Integration created in the REST API, which itself has other dependencies. To avoid race conditions when all resources are being created together, you need to add implicit resource references via the triggers argument or explicit resource references using the resource dependsOn meta-argument.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var myDemoAPI = new Aws.ApiGateway.RestApi("myDemoAPI", new Aws.ApiGateway.RestApiArgs
    {
        Description = "This is my API for demonstration purposes",
    });
    var myDemoResource = new Aws.ApiGateway.Resource("myDemoResource", new Aws.ApiGateway.ResourceArgs
    {
        RestApi = myDemoAPI.Id,
        ParentId = myDemoAPI.RootResourceId,
        PathPart = "test",
    });
    var myDemoMethod = new Aws.ApiGateway.Method("myDemoMethod", new Aws.ApiGateway.MethodArgs
    {
        RestApi = myDemoAPI.Id,
        ResourceId = myDemoResource.Id,
        HttpMethod = "GET",
        Authorization = "NONE",
    });
    var myDemoIntegration = new Aws.ApiGateway.Integration("myDemoIntegration", new Aws.ApiGateway.IntegrationArgs
    {
        RestApi = myDemoAPI.Id,
        ResourceId = myDemoResource.Id,
        HttpMethod = myDemoMethod.HttpMethod,
        Type = "MOCK",
    });
    var myDemoDeployment = new Aws.ApiGateway.Deployment("myDemoDeployment", new Aws.ApiGateway.DeploymentArgs
    {
        RestApi = myDemoAPI.Id,
        StageName = "test",
        Variables = 
        {
            { "answer", "42" },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Deployment
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ApiGateway
Assembly: Pulumi.Aws.dll
Syntax
public class Deployment : CustomResource

Constructors

View Source

Deployment(String, DeploymentArgs, CustomResourceOptions)

Create a Deployment resource with the given unique name, arguments, and options.

Declaration
public Deployment(string name, DeploymentArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

DeploymentArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

CreatedDate

The creation date of the deployment

Declaration
public Output<string> CreatedDate { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

The description of the deployment

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

ExecutionArn

The execution ARN to be used in lambda_permission resource's source_arn when allowing API Gateway to invoke a Lambda function, e.g. arn:aws:execute-api:eu-west-2:123456789012:z4675bid1j/prod

Declaration
public Output<string> ExecutionArn { get; }
Property Value
Type Description
Output<System.String>
View Source

InvokeUrl

The URL to invoke the API pointing to the stage, e.g. https://z4675bid1j.execute-api.eu-west-2.amazonaws.com/prod

Declaration
public Output<string> InvokeUrl { get; }
Property Value
Type Description
Output<System.String>
View Source

RestApi

The ID of the associated REST API

Declaration
public Output<string> RestApi { get; }
Property Value
Type Description
Output<System.String>
View Source

StageDescription

The description of the stage

Declaration
public Output<string> StageDescription { get; }
Property Value
Type Description
Output<System.String>
View Source

StageName

The name of the stage. If the specified stage already exists, it will be updated to point to the new deployment. If the stage does not exist, a new one will be created and point to this deployment.

Declaration
public Output<string> StageName { get; }
Property Value
Type Description
Output<System.String>
View Source

Triggers

A map of arbitrary keys and values that, when changed, will trigger a redeployment.

Declaration
public Output<ImmutableDictionary<string, string>> Triggers { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

Variables

A map that defines variables for the stage

Declaration
public Output<ImmutableDictionary<string, string>> Variables { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>

Methods

View Source

Get(String, Input<String>, DeploymentState, CustomResourceOptions)

Get an existing Deployment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Deployment Get(string name, Input<string> id, DeploymentState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

DeploymentState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Deployment
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.