UNPKG

@pulumi/aws

Version:

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

133 lines 6.19 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.ImageRecipe = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an Image Builder Image Recipe. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.imagebuilder.ImageRecipe("example", { * blockDeviceMappings: [{ * deviceName: "/dev/xvdb", * ebs: { * deleteOnTermination: "true", * volumeSize: 100, * volumeType: "gp2", * }, * }], * components: [{ * componentArn: exampleAwsImagebuilderComponent.arn, * parameters: [ * { * name: "Parameter1", * value: "Value1", * }, * { * name: "Parameter2", * value: "Value2", * }, * ], * }], * name: "example", * parentImage: `arn:${current.partition}:imagebuilder:${currentAwsRegion.region}:aws:image/amazon-linux-2-x86/x.x.x`, * version: "1.0.0", * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_imagebuilder_image_recipe` resources using the Amazon Resource Name (ARN). For example: * * ```sh * $ pulumi import aws:imagebuilder/imageRecipe:ImageRecipe example arn:aws:imagebuilder:us-east-1:123456789012:image-recipe/example/1.0.0 * ``` */ class ImageRecipe extends pulumi.CustomResource { /** * Get an existing ImageRecipe 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 ImageRecipe(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ImageRecipe. 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'] === ImageRecipe.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["blockDeviceMappings"] = state ? state.blockDeviceMappings : undefined; resourceInputs["components"] = state ? state.components : undefined; resourceInputs["dateCreated"] = state ? state.dateCreated : undefined; resourceInputs["description"] = state ? state.description : 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["region"] = state ? state.region : undefined; resourceInputs["systemsManagerAgent"] = state ? state.systemsManagerAgent : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["userDataBase64"] = state ? state.userDataBase64 : 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.parentImage === undefined) && !opts.urn) { throw new Error("Missing required property 'parentImage'"); } if ((!args || args.version === undefined) && !opts.urn) { throw new Error("Missing required property 'version'"); } resourceInputs["blockDeviceMappings"] = args ? args.blockDeviceMappings : undefined; resourceInputs["components"] = args ? args.components : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["parentImage"] = args ? args.parentImage : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["systemsManagerAgent"] = args ? args.systemsManagerAgent : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["userDataBase64"] = args ? args.userDataBase64 : undefined; resourceInputs["version"] = args ? args.version : undefined; resourceInputs["workingDirectory"] = args ? args.workingDirectory : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["dateCreated"] = undefined /*out*/; resourceInputs["owner"] = undefined /*out*/; resourceInputs["platform"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ImageRecipe.__pulumiType, name, resourceInputs, opts); } } exports.ImageRecipe = ImageRecipe; /** @internal */ ImageRecipe.__pulumiType = 'aws:imagebuilder/imageRecipe:ImageRecipe'; //# sourceMappingURL=imageRecipe.js.map