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)

135 lines 5.88 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.ProtectionGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A grouping of protected resources so they can be handled as a collective. This resource grouping improves the accuracy of detection and reduces false positives. * * ## Example Usage * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const protectionGroup = new aws_native.shield.ProtectionGroup("protectionGroup", { * protectionGroupId: "ProtectionGroupForAllResources", * aggregation: aws_native.shield.ProtectionGroupAggregation.Sum, * pattern: aws_native.shield.ProtectionGroupPattern.All, * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const protectionGroup = new aws_native.shield.ProtectionGroup("protectionGroup", { * protectionGroupId: "ProtectionGroupForAllResources", * aggregation: aws_native.shield.ProtectionGroupAggregation.Sum, * pattern: aws_native.shield.ProtectionGroupPattern.All, * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const protectionGroup = new aws_native.shield.ProtectionGroup("protectionGroup", { * protectionGroupId: "ProtectionGroupForAllEIPResources", * aggregation: aws_native.shield.ProtectionGroupAggregation.Sum, * pattern: aws_native.shield.ProtectionGroupPattern.ByResourceType, * resourceType: aws_native.shield.ProtectionGroupResourceType.ElasticIpAllocation, * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const protectionGroup = new aws_native.shield.ProtectionGroup("protectionGroup", { * protectionGroupId: "ProtectionGroupForAllEIPResources", * aggregation: aws_native.shield.ProtectionGroupAggregation.Sum, * pattern: aws_native.shield.ProtectionGroupPattern.ByResourceType, * resourceType: aws_native.shield.ProtectionGroupResourceType.ElasticIpAllocation, * }); * * ``` */ class ProtectionGroup extends pulumi.CustomResource { /** * Get an existing ProtectionGroup 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 ProtectionGroup(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ProtectionGroup. 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'] === ProtectionGroup.__pulumiType; } /** * Create a ProtectionGroup 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.aggregation === undefined) && !opts.urn) { throw new Error("Missing required property 'aggregation'"); } if ((!args || args.pattern === undefined) && !opts.urn) { throw new Error("Missing required property 'pattern'"); } if ((!args || args.protectionGroupId === undefined) && !opts.urn) { throw new Error("Missing required property 'protectionGroupId'"); } resourceInputs["aggregation"] = args ? args.aggregation : undefined; resourceInputs["members"] = args ? args.members : undefined; resourceInputs["pattern"] = args ? args.pattern : undefined; resourceInputs["protectionGroupId"] = args ? args.protectionGroupId : undefined; resourceInputs["resourceType"] = args ? args.resourceType : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["protectionGroupArn"] = undefined /*out*/; } else { resourceInputs["aggregation"] = undefined /*out*/; resourceInputs["members"] = undefined /*out*/; resourceInputs["pattern"] = undefined /*out*/; resourceInputs["protectionGroupArn"] = undefined /*out*/; resourceInputs["protectionGroupId"] = undefined /*out*/; resourceInputs["resourceType"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["protectionGroupId"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(ProtectionGroup.__pulumiType, name, resourceInputs, opts); } } exports.ProtectionGroup = ProtectionGroup; /** @internal */ ProtectionGroup.__pulumiType = 'aws-native:shield:ProtectionGroup'; //# sourceMappingURL=protectionGroup.js.map