UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

81 lines 4.2 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.PolicyAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * The AWS::SecurityHub::PolicyAssociation resource represents the AWS Security Hub Central Configuration Policy associations in your Target. Only the AWS Security Hub delegated administrator can create the resouce from the home region. */ class PolicyAssociation extends pulumi.CustomResource { /** * Get an existing PolicyAssociation 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new PolicyAssociation(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of PolicyAssociation. 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'] === PolicyAssociation.__pulumiType; } /** * Create a PolicyAssociation resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if ((!args || args.configurationPolicyId === undefined) && !opts.urn) { throw new Error("Missing required property 'configurationPolicyId'"); } if ((!args || args.targetId === undefined) && !opts.urn) { throw new Error("Missing required property 'targetId'"); } if ((!args || args.targetType === undefined) && !opts.urn) { throw new Error("Missing required property 'targetType'"); } resourceInputs["configurationPolicyId"] = args ? args.configurationPolicyId : undefined; resourceInputs["targetId"] = args ? args.targetId : undefined; resourceInputs["targetType"] = args ? args.targetType : undefined; resourceInputs["associationIdentifier"] = undefined /*out*/; resourceInputs["associationStatus"] = undefined /*out*/; resourceInputs["associationStatusMessage"] = undefined /*out*/; resourceInputs["associationType"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } else { resourceInputs["associationIdentifier"] = undefined /*out*/; resourceInputs["associationStatus"] = undefined /*out*/; resourceInputs["associationStatusMessage"] = undefined /*out*/; resourceInputs["associationType"] = undefined /*out*/; resourceInputs["configurationPolicyId"] = undefined /*out*/; resourceInputs["targetId"] = undefined /*out*/; resourceInputs["targetType"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["targetId", "targetType"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(PolicyAssociation.__pulumiType, name, resourceInputs, opts); } } exports.PolicyAssociation = PolicyAssociation; /** @internal */ PolicyAssociation.__pulumiType = 'aws-native:securityhub:PolicyAssociation'; //# sourceMappingURL=policyAssociation.js.map