UNPKG

@pulumi/aws

Version:

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

112 lines 6.03 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.Image = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an Image Builder Image. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.imagebuilder.Image("example", { * distributionConfigurationArn: exampleAwsImagebuilderDistributionConfiguration.arn, * imageRecipeArn: exampleAwsImagebuilderImageRecipe.arn, * infrastructureConfigurationArn: exampleAwsImagebuilderInfrastructureConfiguration.arn, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_imagebuilder_image` resources using the Amazon Resource Name (ARN). For example: * * ```sh * $ pulumi import aws:imagebuilder/image:Image example arn:aws:imagebuilder:us-east-1:123456789012:image/example/1.0.0/1 * ``` */ class Image extends pulumi.CustomResource { /** * Get an existing Image 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 Image(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Image. 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'] === Image.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["containerRecipeArn"] = state ? state.containerRecipeArn : undefined; resourceInputs["dateCreated"] = state ? state.dateCreated : undefined; resourceInputs["distributionConfigurationArn"] = state ? state.distributionConfigurationArn : undefined; resourceInputs["enhancedImageMetadataEnabled"] = state ? state.enhancedImageMetadataEnabled : undefined; resourceInputs["executionRole"] = state ? state.executionRole : undefined; resourceInputs["imageRecipeArn"] = state ? state.imageRecipeArn : undefined; resourceInputs["imageScanningConfiguration"] = state ? state.imageScanningConfiguration : undefined; resourceInputs["imageTestsConfiguration"] = state ? state.imageTestsConfiguration : undefined; resourceInputs["infrastructureConfigurationArn"] = state ? state.infrastructureConfigurationArn : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["osVersion"] = state ? state.osVersion : undefined; resourceInputs["outputResources"] = state ? state.outputResources : undefined; resourceInputs["platform"] = state ? state.platform : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["version"] = state ? state.version : undefined; resourceInputs["workflows"] = state ? state.workflows : undefined; } else { const args = argsOrState; if ((!args || args.infrastructureConfigurationArn === undefined) && !opts.urn) { throw new Error("Missing required property 'infrastructureConfigurationArn'"); } resourceInputs["containerRecipeArn"] = args ? args.containerRecipeArn : undefined; resourceInputs["distributionConfigurationArn"] = args ? args.distributionConfigurationArn : undefined; resourceInputs["enhancedImageMetadataEnabled"] = args ? args.enhancedImageMetadataEnabled : undefined; resourceInputs["executionRole"] = args ? args.executionRole : undefined; resourceInputs["imageRecipeArn"] = args ? args.imageRecipeArn : undefined; resourceInputs["imageScanningConfiguration"] = args ? args.imageScanningConfiguration : undefined; resourceInputs["imageTestsConfiguration"] = args ? args.imageTestsConfiguration : undefined; resourceInputs["infrastructureConfigurationArn"] = args ? args.infrastructureConfigurationArn : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["workflows"] = args ? args.workflows : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["dateCreated"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["osVersion"] = undefined /*out*/; resourceInputs["outputResources"] = undefined /*out*/; resourceInputs["platform"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["version"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Image.__pulumiType, name, resourceInputs, opts); } } exports.Image = Image; /** @internal */ Image.__pulumiType = 'aws:imagebuilder/image:Image'; //# sourceMappingURL=image.js.map