1. Packages
  2. AWS
  3. API Docs
  4. apigatewayv2
  5. Deployment
AWS v6.59.1 published on Tuesday, Nov 12, 2024 by Pulumi

aws.apigatewayv2.Deployment

Explore with Pulumi AI

aws logo
AWS v6.59.1 published on Tuesday, Nov 12, 2024 by Pulumi

    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

    Create Deployment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Deployment(name: string, args: DeploymentArgs, opts?: CustomResourceOptions);
    @overload
    def Deployment(resource_name: str,
                   args: DeploymentArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var awsDeploymentResource = new Aws.ApiGatewayV2.Deployment("awsDeploymentResource", new()
    {
        ApiId = "string",
        Description = "string",
        Triggers = 
        {
            { "string", "string" },
        },
    });
    
    example, err := apigatewayv2.NewDeployment(ctx, "awsDeploymentResource", &apigatewayv2.DeploymentArgs{
    	ApiId:       pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Triggers: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var awsDeploymentResource = new Deployment("awsDeploymentResource", DeploymentArgs.builder()
        .apiId("string")
        .description("string")
        .triggers(Map.of("string", "string"))
        .build());
    
    aws_deployment_resource = aws.apigatewayv2.Deployment("awsDeploymentResource",
        api_id="string",
        description="string",
        triggers={
            "string": "string",
        })
    
    const awsDeploymentResource = new aws.apigatewayv2.Deployment("awsDeploymentResource", {
        apiId: "string",
        description: "string",
        triggers: {
            string: "string",
        },
    });
    
    type: aws:apigatewayv2:Deployment
    properties:
        apiId: string
        description: string
        triggers:
            string: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Deployment resource accepts the following input properties:

    ApiId 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.
    ApiId 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.
    apiId 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.
    apiId 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.
    apiId 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:

    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 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
    API identifier.
    AutoDeployed 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.
    ApiId string
    API identifier.
    AutoDeployed 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.
    apiId String
    API identifier.
    autoDeployed 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.
    apiId string
    API identifier.
    autoDeployed 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.
    apiId String
    API identifier.
    autoDeployed 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.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.59.1 published on Tuesday, Nov 12, 2024 by Pulumi