@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
117 lines • 5.23 kB
JavaScript
;
// *** 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.Component = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an Image Builder Component.
*
* ## Example Usage
*
* ### URI Document
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.imagebuilder.Component("example", {
* name: "example",
* platform: "Linux",
* uri: `s3://${exampleAwsS3Object.bucket}/${exampleAwsS3Object.key}`,
* version: "1.0.0",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_imagebuilder_components` resources using the Amazon Resource Name (ARN). For example:
*
* ```sh
* $ pulumi import aws:imagebuilder/component:Component example arn:aws:imagebuilder:us-east-1:123456789012:component/example/1.0.0/1
* ```
* Certain resource arguments, such as `uri`, cannot be read via the API and imported into the provider. The provider will display a difference for these arguments the first run after import if declared in the the provider configuration for an imported resource.
*/
class Component extends pulumi.CustomResource {
/**
* Get an existing Component 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 Component(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Component. 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'] === Component.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["changeDescription"] = state?.changeDescription;
resourceInputs["data"] = state?.data;
resourceInputs["dateCreated"] = state?.dateCreated;
resourceInputs["description"] = state?.description;
resourceInputs["encrypted"] = state?.encrypted;
resourceInputs["kmsKeyId"] = state?.kmsKeyId;
resourceInputs["name"] = state?.name;
resourceInputs["owner"] = state?.owner;
resourceInputs["platform"] = state?.platform;
resourceInputs["region"] = state?.region;
resourceInputs["skipDestroy"] = state?.skipDestroy;
resourceInputs["supportedOsVersions"] = state?.supportedOsVersions;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["type"] = state?.type;
resourceInputs["uri"] = state?.uri;
resourceInputs["version"] = state?.version;
}
else {
const args = argsOrState;
if (args?.platform === undefined && !opts.urn) {
throw new Error("Missing required property 'platform'");
}
if (args?.version === undefined && !opts.urn) {
throw new Error("Missing required property 'version'");
}
resourceInputs["changeDescription"] = args?.changeDescription;
resourceInputs["data"] = args?.data;
resourceInputs["description"] = args?.description;
resourceInputs["kmsKeyId"] = args?.kmsKeyId;
resourceInputs["name"] = args?.name;
resourceInputs["platform"] = args?.platform;
resourceInputs["region"] = args?.region;
resourceInputs["skipDestroy"] = args?.skipDestroy;
resourceInputs["supportedOsVersions"] = args?.supportedOsVersions;
resourceInputs["tags"] = args?.tags;
resourceInputs["uri"] = args?.uri;
resourceInputs["version"] = args?.version;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["dateCreated"] = undefined /*out*/;
resourceInputs["encrypted"] = undefined /*out*/;
resourceInputs["owner"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["type"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Component.__pulumiType, name, resourceInputs, opts);
}
}
exports.Component = Component;
/** @internal */
Component.__pulumiType = 'aws:imagebuilder/component:Component';
//# sourceMappingURL=component.js.map