UNPKG

@pulumi/aws

Version:

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

95 lines 3.91 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.DrtAccessRoleArnAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Authorizes the Shield Response Team (SRT) using the specified role, to access your AWS account to assist with DDoS attack mitigation during potential attacks. * For more information see [Configure AWS SRT Support](https://docs.aws.amazon.com/waf/latest/developerguide/authorize-srt.html) * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const exampleRole = new aws.iam.Role("example", { * name: "example-role", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Sid: "", * Effect: "Allow", * Principal: { * Service: "drt.shield.amazonaws.com", * }, * Action: "sts:AssumeRole", * }], * }), * }); * const example = new aws.shield.DrtAccessRoleArnAssociation("example", {roleArn: exampleRole.arn}); * const exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment("example", { * role: exampleRole.name, * policyArn: "arn:aws:iam::aws:policy/service-role/AWSShieldDRTAccessPolicy", * }); * ``` * * ## Import * * Using `pulumi import`, import Shield DRT access role ARN association using the AWS account ID. For example: * * ```sh * $ pulumi import aws:shield/drtAccessRoleArnAssociation:DrtAccessRoleArnAssociation example 123456789012 * ``` */ class DrtAccessRoleArnAssociation extends pulumi.CustomResource { /** * Get an existing DrtAccessRoleArnAssociation 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 DrtAccessRoleArnAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DrtAccessRoleArnAssociation. 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'] === DrtAccessRoleArnAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["roleArn"] = state?.roleArn; resourceInputs["timeouts"] = state?.timeouts; } else { const args = argsOrState; if (args?.roleArn === undefined && !opts.urn) { throw new Error("Missing required property 'roleArn'"); } resourceInputs["roleArn"] = args?.roleArn; resourceInputs["timeouts"] = args?.timeouts; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DrtAccessRoleArnAssociation.__pulumiType, name, resourceInputs, opts); } } exports.DrtAccessRoleArnAssociation = DrtAccessRoleArnAssociation; /** @internal */ DrtAccessRoleArnAssociation.__pulumiType = 'aws:shield/drtAccessRoleArnAssociation:DrtAccessRoleArnAssociation'; //# sourceMappingURL=drtAccessRoleArnAssociation.js.map