@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
106 lines • 4.5 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.Baseline = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS Control Tower Baseline.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.controltower.Baseline("example", {
* baselineIdentifier: "arn:aws:controltower:us-east-1::baseline/17BSJV3IGJ2QSGA2",
* baselineVersion: "4.0",
* targetIdentifier: test.arn,
* parameters: {
* key: "IdentityCenterEnabledBaselineArn",
* value: "arn:aws:controltower:us-east-1:664418989480:enabledbaseline/XALULM96QHI525UOC",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Control Tower Baseline using the `arn`. For example:
*
* ```sh
* $ pulumi import aws:controltower/baseline:Baseline example arn:aws:controltower:us-east-1:012345678912:enabledbaseline/XALULM96QHI525UOC
* ```
*/
class Baseline extends pulumi.CustomResource {
/**
* Get an existing Baseline 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 Baseline(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Baseline. 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'] === Baseline.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["baselineIdentifier"] = state?.baselineIdentifier;
resourceInputs["baselineVersion"] = state?.baselineVersion;
resourceInputs["operationIdentifier"] = state?.operationIdentifier;
resourceInputs["parameters"] = state?.parameters;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["targetIdentifier"] = state?.targetIdentifier;
resourceInputs["timeouts"] = state?.timeouts;
}
else {
const args = argsOrState;
if (args?.baselineIdentifier === undefined && !opts.urn) {
throw new Error("Missing required property 'baselineIdentifier'");
}
if (args?.baselineVersion === undefined && !opts.urn) {
throw new Error("Missing required property 'baselineVersion'");
}
if (args?.targetIdentifier === undefined && !opts.urn) {
throw new Error("Missing required property 'targetIdentifier'");
}
resourceInputs["baselineIdentifier"] = args?.baselineIdentifier;
resourceInputs["baselineVersion"] = args?.baselineVersion;
resourceInputs["parameters"] = args?.parameters;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["targetIdentifier"] = args?.targetIdentifier;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["operationIdentifier"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Baseline.__pulumiType, name, resourceInputs, opts);
}
}
exports.Baseline = Baseline;
/** @internal */
Baseline.__pulumiType = 'aws:controltower/baseline:Baseline';
//# sourceMappingURL=baseline.js.map