Try AWS Native preview for resources not in the classic version.
aws.apigatewayv2.Deployment
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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 thetriggers
argument or explicit resource references using the resourcedependsOn
meta-argument.
Example Usage
Basic
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.ApiGatewayV2.Deployment("example", new()
{
ApiId = aws_apigatewayv2_api.Example.Id,
Description = "Example deployment",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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_api.Example.Id),
Description: pulumi.String("Example deployment"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigatewayv2.Deployment;
import com.pulumi.aws.apigatewayv2.DeploymentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
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_api.example().id())
.description("Example deployment")
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.apigatewayv2.Deployment("example",
api_id=aws_apigatewayv2_api["example"]["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_api.example.id,
description: "Example deployment",
});
resources:
example:
type: aws:apigatewayv2:Deployment
properties:
apiId: ${aws_apigatewayv2_api.example.id}
description: Example deployment
Create 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:
- Api
Id string API identifier.
- Description string
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- Triggers Dictionary<string, string>
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- Api
Id string API identifier.
- Description string
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- Triggers map[string]string
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- api
Id String API identifier.
- description String
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- triggers Map<String,String>
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- api
Id string API identifier.
- description string
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- triggers {[key: string]: string}
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- api_
id str API identifier.
- description str
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- triggers Mapping[str, str]
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- api
Id String API identifier.
- description String
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- triggers Map<String>
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:
- Auto
Deployed bool 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 string
The provider-assigned unique ID for this managed resource.
- auto
Deployed Boolean Whether the deployment was automatically released.
- id String
The provider-assigned unique ID for this managed resource.
- auto
Deployed 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.
- auto
Deployed Boolean Whether the deployment was automatically released.
- id String
The provider-assigned unique ID for this managed resource.
Look up 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.
- Api
Id string API identifier.
- Auto
Deployed bool Whether the deployment was automatically released.
- Description string
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- Triggers Dictionary<string, string>
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- Api
Id string API identifier.
- Auto
Deployed bool Whether the deployment was automatically released.
- Description string
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- Triggers map[string]string
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- api
Id String API identifier.
- auto
Deployed Boolean Whether the deployment was automatically released.
- description String
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- triggers Map<String,String>
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- api
Id string API identifier.
- auto
Deployed boolean Whether the deployment was automatically released.
- description string
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- triggers {[key: string]: string}
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- api_
id str API identifier.
- auto_
deployed bool Whether the deployment was automatically released.
- description str
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- triggers Mapping[str, str]
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
- api
Id String API identifier.
- auto
Deployed Boolean Whether the deployment was automatically released.
- description String
Description for the deployment resource. Must be less than or equal to 1024 characters in length.
- triggers Map<String>
Map of arbitrary keys and values that, when changed, will trigger a redeployment.
Import
Using pulumi import
, import aws_apigatewayv2_deployment
using the API identifier and deployment identifier. For example:
$ pulumi import aws:apigatewayv2/deployment:Deployment example aabbccddee/1122334
The triggers
argument cannot be imported.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.