UNPKG

@pulumi/aws

Version:

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

87 lines 3.81 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.StandardsSubscription = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Subscribes to a Security Hub standard. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.securityhub.Account("example", {}); * const current = aws.getRegion({}); * const cis = new aws.securityhub.StandardsSubscription("cis", {standardsArn: "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0"}, { * dependsOn: [example], * }); * const pci321 = new aws.securityhub.StandardsSubscription("pci_321", {standardsArn: current.then(current => `arn:aws:securityhub:${current.region}::standards/pci-dss/v/3.2.1`)}, { * dependsOn: [example], * }); * ``` * * ## Import * * Using `pulumi import`, import Security Hub standards subscriptions using the standards subscription ARN. For example: * * ```sh * $ pulumi import aws:securityhub/standardsSubscription:StandardsSubscription cis arn:aws:securityhub:eu-west-1:123456789012:subscription/cis-aws-foundations-benchmark/v/1.2.0 * ``` * ```sh * $ pulumi import aws:securityhub/standardsSubscription:StandardsSubscription pci_321 arn:aws:securityhub:eu-west-1:123456789012:subscription/pci-dss/v/3.2.1 * ``` * ```sh * $ pulumi import aws:securityhub/standardsSubscription:StandardsSubscription nist_800_53_rev_5 arn:aws:securityhub:eu-west-1:123456789012:subscription/nist-800-53/v/5.0.0 * ``` */ class StandardsSubscription extends pulumi.CustomResource { /** * Get an existing StandardsSubscription 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 StandardsSubscription(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of StandardsSubscription. 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'] === StandardsSubscription.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["region"] = state?.region; resourceInputs["standardsArn"] = state?.standardsArn; } else { const args = argsOrState; if (args?.standardsArn === undefined && !opts.urn) { throw new Error("Missing required property 'standardsArn'"); } resourceInputs["region"] = args?.region; resourceInputs["standardsArn"] = args?.standardsArn; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(StandardsSubscription.__pulumiType, name, resourceInputs, opts); } } exports.StandardsSubscription = StandardsSubscription; /** @internal */ StandardsSubscription.__pulumiType = 'aws:securityhub/standardsSubscription:StandardsSubscription'; //# sourceMappingURL=standardsSubscription.js.map