UNPKG

@pulumi/aws

Version:

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

101 lines 5.02 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.StandardsControl = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Disable/enable Security Hub standards control in the current region. * * The `aws.securityhub.StandardsControl` behaves differently from normal resources, in that * Pulumi does not _create_ this resource, but instead "adopts" it * into management. When you _delete_ this resource configuration, Pulumi "abandons" resource as is and just removes it from the state. * * ## Example 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 ensureIamPasswordPolicyPreventsPasswordReuse = new aws.securityhub.StandardsControl("ensure_iam_password_policy_prevents_password_reuse", { * standardsControlArn: "arn:aws:securityhub:us-east-1:111111111111:control/cis-aws-foundations-benchmark/v/1.2.0/1.10", * controlStatus: "DISABLED", * disabledReason: "We handle password policies within Okta", * }, { * dependsOn: [cisAwsFoundationsBenchmark], * }); * ``` */ class StandardsControl extends pulumi.CustomResource { /** * Get an existing StandardsControl 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 StandardsControl(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of StandardsControl. 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'] === StandardsControl.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["controlId"] = state?.controlId; resourceInputs["controlStatus"] = state?.controlStatus; resourceInputs["controlStatusUpdatedAt"] = state?.controlStatusUpdatedAt; resourceInputs["description"] = state?.description; resourceInputs["disabledReason"] = state?.disabledReason; resourceInputs["region"] = state?.region; resourceInputs["relatedRequirements"] = state?.relatedRequirements; resourceInputs["remediationUrl"] = state?.remediationUrl; resourceInputs["severityRating"] = state?.severityRating; resourceInputs["standardsControlArn"] = state?.standardsControlArn; resourceInputs["title"] = state?.title; } else { const args = argsOrState; if (args?.controlStatus === undefined && !opts.urn) { throw new Error("Missing required property 'controlStatus'"); } if (args?.standardsControlArn === undefined && !opts.urn) { throw new Error("Missing required property 'standardsControlArn'"); } resourceInputs["controlStatus"] = args?.controlStatus; resourceInputs["disabledReason"] = args?.disabledReason; resourceInputs["region"] = args?.region; resourceInputs["standardsControlArn"] = args?.standardsControlArn; resourceInputs["controlId"] = undefined /*out*/; resourceInputs["controlStatusUpdatedAt"] = undefined /*out*/; resourceInputs["description"] = undefined /*out*/; resourceInputs["relatedRequirements"] = undefined /*out*/; resourceInputs["remediationUrl"] = undefined /*out*/; resourceInputs["severityRating"] = undefined /*out*/; resourceInputs["title"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(StandardsControl.__pulumiType, name, resourceInputs, opts); } } exports.StandardsControl = StandardsControl; /** @internal */ StandardsControl.__pulumiType = 'aws:securityhub/standardsControl:StandardsControl'; //# sourceMappingURL=standardsControl.js.map