UNPKG

@pulumi/aws

Version:

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

104 lines 4.7 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.CloudFormationStack = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Deploys an Application CloudFormation Stack from the Serverless Application Repository. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getPartition({}); * const currentGetRegion = aws.getRegion({}); * const postgres_rotator = new aws.serverlessrepository.CloudFormationStack("postgres-rotator", { * name: "postgres-rotator", * applicationId: "arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser", * capabilities: [ * "CAPABILITY_IAM", * "CAPABILITY_RESOURCE_POLICY", * ], * parameters: { * functionName: "func-postgres-rotator", * endpoint: Promise.all([currentGetRegion, current]).then(([currentGetRegion, current]) => `secretsmanager.${currentGetRegion.region}.${current.dnsSuffix}`), * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Serverless Application Repository Stack using the CloudFormation Stack name (with or without the `serverlessrepo-` prefix) or the CloudFormation Stack ID. For example: * * ```sh * $ pulumi import aws:serverlessrepository/cloudFormationStack:CloudFormationStack example serverlessrepo-postgres-rotator * ``` */ class CloudFormationStack extends pulumi.CustomResource { /** * Get an existing CloudFormationStack 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 CloudFormationStack(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of CloudFormationStack. 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'] === CloudFormationStack.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationId"] = state?.applicationId; resourceInputs["capabilities"] = state?.capabilities; resourceInputs["name"] = state?.name; resourceInputs["outputs"] = state?.outputs; resourceInputs["parameters"] = state?.parameters; resourceInputs["region"] = state?.region; resourceInputs["semanticVersion"] = state?.semanticVersion; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.applicationId === undefined && !opts.urn) { throw new Error("Missing required property 'applicationId'"); } if (args?.capabilities === undefined && !opts.urn) { throw new Error("Missing required property 'capabilities'"); } resourceInputs["applicationId"] = args?.applicationId; resourceInputs["capabilities"] = args?.capabilities; resourceInputs["name"] = args?.name; resourceInputs["parameters"] = args?.parameters; resourceInputs["region"] = args?.region; resourceInputs["semanticVersion"] = args?.semanticVersion; resourceInputs["tags"] = args?.tags; resourceInputs["outputs"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CloudFormationStack.__pulumiType, name, resourceInputs, opts); } } exports.CloudFormationStack = CloudFormationStack; /** @internal */ CloudFormationStack.__pulumiType = 'aws:serverlessrepository/cloudFormationStack:CloudFormationStack'; //# sourceMappingURL=cloudFormationStack.js.map