@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
117 lines • 5.84 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, Object.assign(Object.assign({}, 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 ? state.arn : undefined;
resourceInputs["changeDescription"] = state ? state.changeDescription : undefined;
resourceInputs["data"] = state ? state.data : undefined;
resourceInputs["dateCreated"] = state ? state.dateCreated : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["encrypted"] = state ? state.encrypted : undefined;
resourceInputs["kmsKeyId"] = state ? state.kmsKeyId : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["owner"] = state ? state.owner : undefined;
resourceInputs["platform"] = state ? state.platform : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["skipDestroy"] = state ? state.skipDestroy : undefined;
resourceInputs["supportedOsVersions"] = state ? state.supportedOsVersions : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["uri"] = state ? state.uri : undefined;
resourceInputs["version"] = state ? state.version : undefined;
}
else {
const args = argsOrState;
if ((!args || args.platform === undefined) && !opts.urn) {
throw new Error("Missing required property 'platform'");
}
if ((!args || args.version === undefined) && !opts.urn) {
throw new Error("Missing required property 'version'");
}
resourceInputs["changeDescription"] = args ? args.changeDescription : undefined;
resourceInputs["data"] = args ? args.data : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["kmsKeyId"] = args ? args.kmsKeyId : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["platform"] = args ? args.platform : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["skipDestroy"] = args ? args.skipDestroy : undefined;
resourceInputs["supportedOsVersions"] = args ? args.supportedOsVersions : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["uri"] = args ? args.uri : undefined;
resourceInputs["version"] = args ? args.version : undefined;
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