UNPKG

@pulumi/aws

Version:

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

150 lines 7.54 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.ContainerRecipe = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an Image Builder Container Recipe. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.imagebuilder.ContainerRecipe("example", { * name: "example", * version: "1.0.0", * containerType: "DOCKER", * parentImage: "arn:aws:imagebuilder:eu-central-1:aws:image/amazon-linux-x86-latest/x.x.x", * targetRepository: { * repositoryName: exampleAwsEcrRepository.name, * service: "ECR", * }, * components: [{ * componentArn: exampleAwsImagebuilderComponent.arn, * parameters: [ * { * name: "Parameter1", * value: "Value1", * }, * { * name: "Parameter2", * value: "Value2", * }, * ], * }], * dockerfileTemplateData: `FROM {{{ imagebuilder:parentImage }}} * {{{ imagebuilder:environments }}} * {{{ imagebuilder:components }}} * `, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_imagebuilder_container_recipe` resources using the Amazon Resource Name (ARN). For example: * * ```sh * $ pulumi import aws:imagebuilder/containerRecipe:ContainerRecipe example arn:aws:imagebuilder:us-east-1:123456789012:container-recipe/example/1.0.0 * ``` */ class ContainerRecipe extends pulumi.CustomResource { /** * Get an existing ContainerRecipe 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 ContainerRecipe(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ContainerRecipe. 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'] === ContainerRecipe.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["components"] = state ? state.components : undefined; resourceInputs["containerType"] = state ? state.containerType : undefined; resourceInputs["dateCreated"] = state ? state.dateCreated : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["dockerfileTemplateData"] = state ? state.dockerfileTemplateData : undefined; resourceInputs["dockerfileTemplateUri"] = state ? state.dockerfileTemplateUri : undefined; resourceInputs["encrypted"] = state ? state.encrypted : undefined; resourceInputs["instanceConfiguration"] = state ? state.instanceConfiguration : undefined; resourceInputs["kmsKeyId"] = state ? state.kmsKeyId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["owner"] = state ? state.owner : undefined; resourceInputs["parentImage"] = state ? state.parentImage : undefined; resourceInputs["platform"] = state ? state.platform : undefined; resourceInputs["platformOverride"] = state ? state.platformOverride : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["targetRepository"] = state ? state.targetRepository : undefined; resourceInputs["version"] = state ? state.version : undefined; resourceInputs["workingDirectory"] = state ? state.workingDirectory : undefined; } else { const args = argsOrState; if ((!args || args.components === undefined) && !opts.urn) { throw new Error("Missing required property 'components'"); } if ((!args || args.containerType === undefined) && !opts.urn) { throw new Error("Missing required property 'containerType'"); } if ((!args || args.parentImage === undefined) && !opts.urn) { throw new Error("Missing required property 'parentImage'"); } if ((!args || args.targetRepository === undefined) && !opts.urn) { throw new Error("Missing required property 'targetRepository'"); } if ((!args || args.version === undefined) && !opts.urn) { throw new Error("Missing required property 'version'"); } resourceInputs["components"] = args ? args.components : undefined; resourceInputs["containerType"] = args ? args.containerType : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["dockerfileTemplateData"] = args ? args.dockerfileTemplateData : undefined; resourceInputs["dockerfileTemplateUri"] = args ? args.dockerfileTemplateUri : undefined; resourceInputs["instanceConfiguration"] = args ? args.instanceConfiguration : undefined; resourceInputs["kmsKeyId"] = args ? args.kmsKeyId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["parentImage"] = args ? args.parentImage : undefined; resourceInputs["platformOverride"] = args ? args.platformOverride : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["targetRepository"] = args ? args.targetRepository : undefined; resourceInputs["version"] = args ? args.version : undefined; resourceInputs["workingDirectory"] = args ? args.workingDirectory : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["dateCreated"] = undefined /*out*/; resourceInputs["encrypted"] = undefined /*out*/; resourceInputs["owner"] = undefined /*out*/; resourceInputs["platform"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ContainerRecipe.__pulumiType, name, resourceInputs, opts); } } exports.ContainerRecipe = ContainerRecipe; /** @internal */ ContainerRecipe.__pulumiType = 'aws:imagebuilder/containerRecipe:ContainerRecipe'; //# sourceMappingURL=containerRecipe.js.map