UNPKG

@pulumi/aws

Version:

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

87 lines 4.3 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.StandardsControlAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Basic usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.securityhub.Account("example", {}); * const cisAwsFoundationsBenchmark = new aws.securityhub.StandardsSubscription("cis_aws_foundations_benchmark", {standardsArn: "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0"}, { * dependsOn: [example], * }); * const cisAwsFoundationsBenchmarkDisableIam1 = new aws.securityhub.StandardsControlAssociation("cis_aws_foundations_benchmark_disable_iam_1", { * standardsArn: cisAwsFoundationsBenchmark.standardsArn, * securityControlId: "IAM.1", * associationStatus: "DISABLED", * updatedReason: "Not needed", * }); * ``` */ class StandardsControlAssociation extends pulumi.CustomResource { /** * Get an existing StandardsControlAssociation 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 StandardsControlAssociation(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of StandardsControlAssociation. 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'] === StandardsControlAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["associationStatus"] = state ? state.associationStatus : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["securityControlId"] = state ? state.securityControlId : undefined; resourceInputs["standardsArn"] = state ? state.standardsArn : undefined; resourceInputs["updatedReason"] = state ? state.updatedReason : undefined; } else { const args = argsOrState; if ((!args || args.associationStatus === undefined) && !opts.urn) { throw new Error("Missing required property 'associationStatus'"); } if ((!args || args.securityControlId === undefined) && !opts.urn) { throw new Error("Missing required property 'securityControlId'"); } if ((!args || args.standardsArn === undefined) && !opts.urn) { throw new Error("Missing required property 'standardsArn'"); } resourceInputs["associationStatus"] = args ? args.associationStatus : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["securityControlId"] = args ? args.securityControlId : undefined; resourceInputs["standardsArn"] = args ? args.standardsArn : undefined; resourceInputs["updatedReason"] = args ? args.updatedReason : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(StandardsControlAssociation.__pulumiType, name, resourceInputs, opts); } } exports.StandardsControlAssociation = StandardsControlAssociation; /** @internal */ StandardsControlAssociation.__pulumiType = 'aws:securityhub/standardsControlAssociation:StandardsControlAssociation'; //# sourceMappingURL=standardsControlAssociation.js.map