@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
139 lines (138 loc) • 6.08 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { RestApi } from "./index";
/**
* Manages an API Gateway REST Deployment. A deployment is a snapshot of the REST API configuration. The deployment can then be published to callable endpoints via the `aws.apigateway.Stage` resource and optionally managed further with the `aws.apigateway.BasePathMapping` resource, `aws.apigateway.DomainName` resource, and `awsApiMethodSettings` resource. For more information, see the [API Gateway Developer Guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html).
*
* To properly capture all REST API configuration in a deployment, this resource must have dependencies on all prior resources that manage resources/paths, methods, integrations, etc.
*
* * For REST APIs that are configured via OpenAPI specification (`aws.apigateway.RestApi` resource `body` argument), no special dependency setup is needed beyond referencing the `id` attribute of that resource unless additional resources have further customized the REST API.
* * When the REST API configuration involves other resources (`aws.apigateway.Integration` resource), the dependency setup can be done with implicit resource references in the `triggers` argument or explicit resource references using the [resource `dependsOn` custom option](https://www.pulumi.com/docs/intro/concepts/resources/#dependson). The `triggers` argument should be preferred over `dependsOn`, since `dependsOn` can only capture dependency ordering and will not cause the resource to recreate (redeploy the REST API) with upstream configuration changes.
*
* ## Example Usage
*
* ## Import
*
* Using `pulumi import`, import `aws_api_gateway_deployment` using `REST-API-ID/DEPLOYMENT-ID`. For example:
*
* ```sh
* $ pulumi import aws:apigateway/deployment:Deployment example aabbccddee/1122334
* ```
* The `variables` arguments cannot be imported. Use the `aws_api_gateway_stage` resource to import and manage stages.
*
* The `triggers` argument cannot be imported.
*/
export declare class Deployment extends pulumi.CustomResource {
/**
* Get an existing Deployment resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DeploymentState, opts?: pulumi.CustomResourceOptions): Deployment;
/**
* Returns true if the given object is an instance of Deployment. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Deployment;
/**
* Creation date of the deployment
*/
readonly createdDate: pulumi.Output<string>;
/**
* Description of the deployment.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* REST API identifier.
*/
readonly restApi: pulumi.Output<string>;
/**
* Map of arbitrary keys and values that, when changed, will trigger a redeployment.
*/
readonly triggers: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Map to set on the related stage.
*/
readonly variables: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Create a Deployment resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: DeploymentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Deployment resources.
*/
export interface DeploymentState {
/**
* Creation date of the deployment
*/
createdDate?: pulumi.Input<string>;
/**
* Description of the deployment.
*/
description?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* REST API identifier.
*/
restApi?: pulumi.Input<string | RestApi>;
/**
* Map of arbitrary keys and values that, when changed, will trigger a redeployment.
*/
triggers?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Map to set on the related stage.
*/
variables?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
/**
* The set of arguments for constructing a Deployment resource.
*/
export interface DeploymentArgs {
/**
* Description of the deployment.
*/
description?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* REST API identifier.
*/
restApi: pulumi.Input<string | RestApi>;
/**
* Map of arbitrary keys and values that, when changed, will trigger a redeployment.
*/
triggers?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Map to set on the related stage.
*/
variables?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}