AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.5.0 published on Wednesday, May 25, 2022 by Pulumi

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/v5/go/aws/apigatewayv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

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

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Deployment("example", DeploymentArgs.builder()        
            .apiId(aws_apigatewayv2_route.example().api_id())
            .description("Example deployment")
            .build());

    }
}
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.api_id,
    description: "Example deployment",
});
resources:
  example:
    type: aws:apigatewayv2:Deployment
    properties:
      apiId: ${aws_apigatewayv2_route.example.api_id}
      description: Example deployment

Create a Deployment Resource

new Deployment(name: string, args: DeploymentArgs, opts?: CustomResourceOptions);
@overload
def Deployment(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               api_id: Optional[str] = None,
               description: Optional[str] = None,
               triggers: Optional[Mapping[str, str]] = None)
@overload
def Deployment(resource_name: str,
               args: DeploymentArgs,
               opts: Optional[ResourceOptions] = None)
func NewDeployment(ctx *Context, name string, args DeploymentArgs, opts ...ResourceOption) (*Deployment, error)
public Deployment(string name, DeploymentArgs args, CustomResourceOptions? opts = null)
public Deployment(String name, DeploymentArgs args)
public Deployment(String name, DeploymentArgs args, CustomResourceOptions options)
type: aws:apigatewayv2:Deployment
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args DeploymentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control 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.
name String
The unique name of the resource.
args DeploymentArgs
The arguments to resource properties.
options 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 Architecture and Concepts docs.

Inputs

The Deployment resource accepts the following input properties:

ApiId string

The API identifier.

Description string

The description for the deployment resource. Must be less than or equal to 1024 characters in length.

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. Must be less than or equal to 1024 characters in length.

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. Must be less than or equal to 1024 characters in length.

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. Must be less than or equal to 1024 characters in length.

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. Must be less than or equal to 1024 characters in length.

triggers Mapping[str, str]

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. Must be less than or equal to 1024 characters in length.

triggers Map<String>

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.

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.

autoDeployed Boolean

Whether the deployment was automatically released.

id String

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
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_id: Optional[str] = None,
        auto_deployed: Optional[bool] = None,
        description: Optional[str] = None,
        triggers: Optional[Mapping[str, str]] = None) -> Deployment
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)
public static Deployment get(String name, Output<String> id, DeploymentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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. Must be less than or equal to 1024 characters in length.

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. Must be less than or equal to 1024 characters in length.

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. Must be less than or equal to 1024 characters in length.

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. Must be less than or equal to 1024 characters in length.

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. Must be less than or equal to 1024 characters in length.

triggers Mapping[str, str]

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. Must be less than or equal to 1024 characters in length.

triggers Map<String>

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

Import

aws_apigatewayv2_deployment can be imported by using the API identifier and deployment identifier, e.g.,

 $ pulumi import aws:apigatewayv2/deployment:Deployment example aabbccddee/1122334

The triggers argument cannot be imported.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.