UNPKG

@pulumi/aws

Version:

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

86 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.DrtAccessLogBucketAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Shield DRT Access Log Bucket Association. * Up to 10 log buckets can be associated for DRT Access sharing with the Shield Response Team (SRT). * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.shield.DrtAccessRoleArnAssociation("test", {roleArn: `arn:aws:iam:${current.region}:${currentAwsCallerIdentity.accountId}:${shieldDrtAccessRoleName}`}); * const testDrtAccessLogBucketAssociation = new aws.shield.DrtAccessLogBucketAssociation("test", { * logBucket: shieldDrtAccessLogBucket, * roleArnAssociationId: test.id, * }); * ``` * * ## Import * * Using `pulumi import`, import Shield DRT access log bucket associations using the `log_bucket`. For example: * * ```sh * $ pulumi import aws:shield/drtAccessLogBucketAssociation:DrtAccessLogBucketAssociation example example-bucket * ``` */ class DrtAccessLogBucketAssociation extends pulumi.CustomResource { /** * Get an existing DrtAccessLogBucketAssociation 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 DrtAccessLogBucketAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DrtAccessLogBucketAssociation. 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'] === DrtAccessLogBucketAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["logBucket"] = state?.logBucket; resourceInputs["roleArnAssociationId"] = state?.roleArnAssociationId; resourceInputs["timeouts"] = state?.timeouts; } else { const args = argsOrState; if (args?.logBucket === undefined && !opts.urn) { throw new Error("Missing required property 'logBucket'"); } if (args?.roleArnAssociationId === undefined && !opts.urn) { throw new Error("Missing required property 'roleArnAssociationId'"); } resourceInputs["logBucket"] = args?.logBucket; resourceInputs["roleArnAssociationId"] = args?.roleArnAssociationId; resourceInputs["timeouts"] = args?.timeouts; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DrtAccessLogBucketAssociation.__pulumiType, name, resourceInputs, opts); } } exports.DrtAccessLogBucketAssociation = DrtAccessLogBucketAssociation; /** @internal */ DrtAccessLogBucketAssociation.__pulumiType = 'aws:shield/drtAccessLogBucketAssociation:DrtAccessLogBucketAssociation'; //# sourceMappingURL=drtAccessLogBucketAssociation.js.map