UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

118 lines 5.17 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ContainerServiceDeploymentVersion = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Lightsail container service deployment version. Use this resource to deploy containerized applications to your Lightsail container service with specific container configurations and settings. * * > **NOTE:** The Amazon Lightsail container service must be enabled to create a deployment. * * > **NOTE:** This resource allows you to manage an Amazon Lightsail container service deployment version but the provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.lightsail.ContainerServiceDeploymentVersion("example", { * containers: [{ * containerName: "hello-world", * image: "amazon/amazon-lightsail:hello-world", * commands: [], * environment: { * MY_ENVIRONMENT_VARIABLE: "my_value", * }, * ports: { * "80": "HTTP", * }, * }], * publicEndpoint: { * containerName: "hello-world", * containerPort: 80, * healthCheck: { * healthyThreshold: 2, * unhealthyThreshold: 2, * timeoutSeconds: 2, * intervalSeconds: 5, * path: "/", * successCodes: "200-499", * }, * }, * serviceName: exampleAwsLightsailContainerService.name, * }); * ``` * * ## Import * * Using `pulumi import`, import Lightsail Container Service Deployment Version using the `service_name` and `version` separated by a slash (`/`). For example: * * ```sh * $ pulumi import aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion example container-service-1/1 * ``` */ class ContainerServiceDeploymentVersion extends pulumi.CustomResource { /** * Get an existing ContainerServiceDeploymentVersion 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, id, state, opts) { return new ContainerServiceDeploymentVersion(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ContainerServiceDeploymentVersion. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ContainerServiceDeploymentVersion.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["containers"] = state?.containers; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["publicEndpoint"] = state?.publicEndpoint; resourceInputs["region"] = state?.region; resourceInputs["serviceName"] = state?.serviceName; resourceInputs["state"] = state?.state; resourceInputs["version"] = state?.version; } else { const args = argsOrState; if (args?.containers === undefined && !opts.urn) { throw new Error("Missing required property 'containers'"); } if (args?.serviceName === undefined && !opts.urn) { throw new Error("Missing required property 'serviceName'"); } resourceInputs["containers"] = args?.containers; resourceInputs["publicEndpoint"] = args?.publicEndpoint; resourceInputs["region"] = args?.region; resourceInputs["serviceName"] = args?.serviceName; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["version"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ContainerServiceDeploymentVersion.__pulumiType, name, resourceInputs, opts); } } exports.ContainerServiceDeploymentVersion = ContainerServiceDeploymentVersion; /** @internal */ ContainerServiceDeploymentVersion.__pulumiType = 'aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion'; //# sourceMappingURL=containerServiceDeploymentVersion.js.map