Deployment

Manages an Amazon API Gateway Version 2 deployment. More information can be found in the Amazon API Gateway Developer Guide.

Note: Creating a deployment for an API requires at least one aws.apigatewayv2.Route resource associated with that API. 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

Basic

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.ApiGatewayV2.Deployment("example", new Aws.ApiGatewayV2.DeploymentArgs
        {
            ApiId = aws_apigatewayv2_route.Example.Api_id,
            Description = "Example deployment",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/apigatewayv2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := apigatewayv2.NewDeployment(ctx, "example", &apigatewayv2.DeploymentArgs{
            ApiId:       pulumi.String(aws_apigatewayv2_route.Example.Api_id),
            Description: pulumi.String("Example deployment"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.apigatewayv2.Deployment("example",
    api_id=aws_apigatewayv2_route["example"]["api_id"],
    description="Example deployment")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.apigatewayv2.Deployment("example", {
    apiId: aws_apigatewayv2_route_example.apiId,
    description: "Example deployment",
});

Create a Deployment Resource

def Deployment(resource_name, opts=None, api_id=None, description=None, triggers=None, __props__=None);
func NewDeployment(ctx *Context, name string, args DeploymentArgs, opts ...ResourceOption) (*Deployment, error)
public Deployment(string name, DeploymentArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DeploymentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DeploymentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DeploymentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Deployment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Deployment resource accepts the following input properties:

ApiId string

The API identifier.

Description string

The description for the deployment resource.

Triggers Dictionary<string, string>

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

ApiId string

The API identifier.

Description string

The description for the deployment resource.

Triggers map[string]string

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

apiId string

The API identifier.

description string

The description for the deployment resource.

triggers {[key: string]: string}

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

api_id str

The API identifier.

description str

The description for the deployment resource.

triggers Dict[str, str]

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

Outputs

All input properties are implicitly available as output properties. Additionally, the Deployment resource produces the following output properties:

AutoDeployed bool

Whether the deployment was automatically released.

Id string
The provider-assigned unique ID for this managed resource.
AutoDeployed bool

Whether the deployment was automatically released.

Id string
The provider-assigned unique ID for this managed resource.
autoDeployed boolean

Whether the deployment was automatically released.

id string
The provider-assigned unique ID for this managed resource.
auto_deployed bool

Whether the deployment was automatically released.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Deployment Resource

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

public static get(name: string, id: Input<ID>, state?: DeploymentState, opts?: CustomResourceOptions): Deployment
static get(resource_name, id, opts=None, api_id=None, auto_deployed=None, description=None, triggers=None, __props__=None);
func GetDeployment(ctx *Context, name string, id IDInput, state *DeploymentState, opts ...ResourceOption) (*Deployment, error)
public static Deployment Get(string name, Input<string> id, DeploymentState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ApiId string

The API identifier.

AutoDeployed bool

Whether the deployment was automatically released.

Description string

The description for the deployment resource.

Triggers Dictionary<string, string>

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

ApiId string

The API identifier.

AutoDeployed bool

Whether the deployment was automatically released.

Description string

The description for the deployment resource.

Triggers map[string]string

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

apiId string

The API identifier.

autoDeployed boolean

Whether the deployment was automatically released.

description string

The description for the deployment resource.

triggers {[key: string]: string}

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

api_id str

The API identifier.

auto_deployed bool

Whether the deployment was automatically released.

description str

The description for the deployment resource.

triggers Dict[str, str]

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

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.