UNPKG

@pulumi/aws

Version:

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

156 lines 6.91 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 * * ### Identity Schema * * #### Required * * - `arn` (String) Amazon Resource Name (ARN) of the Image Builder container recipe. * * Using `pulumi import`, import `aws_imagebuilder_container_recipe` resources using the Amazon Resource Name (ARN). For example: * * console * * % pulumi import aws_imagebuilder_container_recipe.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, { ...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?.arn; resourceInputs["components"] = state?.components; resourceInputs["containerType"] = state?.containerType; resourceInputs["dateCreated"] = state?.dateCreated; resourceInputs["description"] = state?.description; resourceInputs["dockerfileTemplateData"] = state?.dockerfileTemplateData; resourceInputs["dockerfileTemplateUri"] = state?.dockerfileTemplateUri; resourceInputs["encrypted"] = state?.encrypted; resourceInputs["instanceConfiguration"] = state?.instanceConfiguration; resourceInputs["kmsKeyId"] = state?.kmsKeyId; resourceInputs["name"] = state?.name; resourceInputs["owner"] = state?.owner; resourceInputs["parentImage"] = state?.parentImage; resourceInputs["platform"] = state?.platform; resourceInputs["platformOverride"] = state?.platformOverride; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["targetRepository"] = state?.targetRepository; resourceInputs["version"] = state?.version; resourceInputs["workingDirectory"] = state?.workingDirectory; } else { const args = argsOrState; if (args?.components === undefined && !opts.urn) { throw new Error("Missing required property 'components'"); } if (args?.containerType === undefined && !opts.urn) { throw new Error("Missing required property 'containerType'"); } if (args?.parentImage === undefined && !opts.urn) { throw new Error("Missing required property 'parentImage'"); } if (args?.targetRepository === undefined && !opts.urn) { throw new Error("Missing required property 'targetRepository'"); } if (args?.version === undefined && !opts.urn) { throw new Error("Missing required property 'version'"); } resourceInputs["components"] = args?.components; resourceInputs["containerType"] = args?.containerType; resourceInputs["description"] = args?.description; resourceInputs["dockerfileTemplateData"] = args?.dockerfileTemplateData; resourceInputs["dockerfileTemplateUri"] = args?.dockerfileTemplateUri; resourceInputs["instanceConfiguration"] = args?.instanceConfiguration; resourceInputs["kmsKeyId"] = args?.kmsKeyId; resourceInputs["name"] = args?.name; resourceInputs["parentImage"] = args?.parentImage; resourceInputs["platformOverride"] = args?.platformOverride; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["targetRepository"] = args?.targetRepository; resourceInputs["version"] = args?.version; resourceInputs["workingDirectory"] = args?.workingDirectory; 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