1. Packages
  2. AWS Classic
  3. API Docs
  4. shield
  5. DrtAccessLogBucketAssociation

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi

aws.shield.DrtAccessLogBucketAssociation

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi

    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

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var testDrtAccessRoleArnAssociation = new Aws.Shield.DrtAccessRoleArnAssociation("testDrtAccessRoleArnAssociation", new()
        {
            RoleArn = $"arn:aws:iam:{data.Aws_region.Current.Name}:{data.Aws_caller_identity.Current.Account_id}:{@var.Shield_drt_access_role_name}",
        });
    
        var testDrtAccessLogBucketAssociation = new Aws.Shield.DrtAccessLogBucketAssociation("testDrtAccessLogBucketAssociation", new()
        {
            LogBucket = @var.Shield_drt_access_log_bucket,
            RoleArnAssociationId = testDrtAccessRoleArnAssociation.Id,
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		testDrtAccessRoleArnAssociation, err := shield.NewDrtAccessRoleArnAssociation(ctx, "testDrtAccessRoleArnAssociation", &shield.DrtAccessRoleArnAssociationArgs{
    			RoleArn: pulumi.String(fmt.Sprintf("arn:aws:iam:%v:%v:%v", data.Aws_region.Current.Name, data.Aws_caller_identity.Current.Account_id, _var.Shield_drt_access_role_name)),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = shield.NewDrtAccessLogBucketAssociation(ctx, "testDrtAccessLogBucketAssociation", &shield.DrtAccessLogBucketAssociationArgs{
    			LogBucket:            pulumi.Any(_var.Shield_drt_access_log_bucket),
    			RoleArnAssociationId: testDrtAccessRoleArnAssociation.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.shield.DrtAccessRoleArnAssociation;
    import com.pulumi.aws.shield.DrtAccessRoleArnAssociationArgs;
    import com.pulumi.aws.shield.DrtAccessLogBucketAssociation;
    import com.pulumi.aws.shield.DrtAccessLogBucketAssociationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testDrtAccessRoleArnAssociation = new DrtAccessRoleArnAssociation("testDrtAccessRoleArnAssociation", DrtAccessRoleArnAssociationArgs.builder()        
                .roleArn(String.format("arn:aws:iam:%s:%s:%s", data.aws_region().current().name(),data.aws_caller_identity().current().account_id(),var_.shield_drt_access_role_name()))
                .build());
    
            var testDrtAccessLogBucketAssociation = new DrtAccessLogBucketAssociation("testDrtAccessLogBucketAssociation", DrtAccessLogBucketAssociationArgs.builder()        
                .logBucket(var_.shield_drt_access_log_bucket())
                .roleArnAssociationId(testDrtAccessRoleArnAssociation.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    test_drt_access_role_arn_association = aws.shield.DrtAccessRoleArnAssociation("testDrtAccessRoleArnAssociation", role_arn=f"arn:aws:iam:{data['aws_region']['current']['name']}:{data['aws_caller_identity']['current']['account_id']}:{var['shield_drt_access_role_name']}")
    test_drt_access_log_bucket_association = aws.shield.DrtAccessLogBucketAssociation("testDrtAccessLogBucketAssociation",
        log_bucket=var["shield_drt_access_log_bucket"],
        role_arn_association_id=test_drt_access_role_arn_association.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const testDrtAccessRoleArnAssociation = new aws.shield.DrtAccessRoleArnAssociation("testDrtAccessRoleArnAssociation", {roleArn: `arn:aws:iam:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:${_var.shield_drt_access_role_name}`});
    const testDrtAccessLogBucketAssociation = new aws.shield.DrtAccessLogBucketAssociation("testDrtAccessLogBucketAssociation", {
        logBucket: _var.shield_drt_access_log_bucket,
        roleArnAssociationId: testDrtAccessRoleArnAssociation.id,
    });
    
    resources:
      testDrtAccessRoleArnAssociation:
        type: aws:shield:DrtAccessRoleArnAssociation
        properties:
          roleArn: arn:aws:iam:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:${var.shield_drt_access_role_name}
      testDrtAccessLogBucketAssociation:
        type: aws:shield:DrtAccessLogBucketAssociation
        properties:
          logBucket: ${var.shield_drt_access_log_bucket}
          roleArnAssociationId: ${testDrtAccessRoleArnAssociation.id}
    

    Create DrtAccessLogBucketAssociation Resource

    new DrtAccessLogBucketAssociation(name: string, args: DrtAccessLogBucketAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def DrtAccessLogBucketAssociation(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      log_bucket: Optional[str] = None,
                                      role_arn_association_id: Optional[str] = None,
                                      timeouts: Optional[DrtAccessLogBucketAssociationTimeoutsArgs] = None)
    @overload
    def DrtAccessLogBucketAssociation(resource_name: str,
                                      args: DrtAccessLogBucketAssociationArgs,
                                      opts: Optional[ResourceOptions] = None)
    func NewDrtAccessLogBucketAssociation(ctx *Context, name string, args DrtAccessLogBucketAssociationArgs, opts ...ResourceOption) (*DrtAccessLogBucketAssociation, error)
    public DrtAccessLogBucketAssociation(string name, DrtAccessLogBucketAssociationArgs args, CustomResourceOptions? opts = null)
    public DrtAccessLogBucketAssociation(String name, DrtAccessLogBucketAssociationArgs args)
    public DrtAccessLogBucketAssociation(String name, DrtAccessLogBucketAssociationArgs args, CustomResourceOptions options)
    
    type: aws:shield:DrtAccessLogBucketAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args DrtAccessLogBucketAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DrtAccessLogBucketAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DrtAccessLogBucketAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DrtAccessLogBucketAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DrtAccessLogBucketAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DrtAccessLogBucketAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The DrtAccessLogBucketAssociation resource accepts the following input properties:

    LogBucket string

    The Amazon S3 bucket that contains the logs that you want to share.

    RoleArnAssociationId string

    The ID of the Role Arn association used for allowing Shield DRT Access.

    Timeouts DrtAccessLogBucketAssociationTimeouts
    LogBucket string

    The Amazon S3 bucket that contains the logs that you want to share.

    RoleArnAssociationId string

    The ID of the Role Arn association used for allowing Shield DRT Access.

    Timeouts DrtAccessLogBucketAssociationTimeoutsArgs
    logBucket String

    The Amazon S3 bucket that contains the logs that you want to share.

    roleArnAssociationId String

    The ID of the Role Arn association used for allowing Shield DRT Access.

    timeouts DrtAccessLogBucketAssociationTimeouts
    logBucket string

    The Amazon S3 bucket that contains the logs that you want to share.

    roleArnAssociationId string

    The ID of the Role Arn association used for allowing Shield DRT Access.

    timeouts DrtAccessLogBucketAssociationTimeouts
    log_bucket str

    The Amazon S3 bucket that contains the logs that you want to share.

    role_arn_association_id str

    The ID of the Role Arn association used for allowing Shield DRT Access.

    timeouts DrtAccessLogBucketAssociationTimeoutsArgs
    logBucket String

    The Amazon S3 bucket that contains the logs that you want to share.

    roleArnAssociationId String

    The ID of the Role Arn association used for allowing Shield DRT Access.

    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DrtAccessLogBucketAssociation resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing DrtAccessLogBucketAssociation Resource

    Get an existing DrtAccessLogBucketAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DrtAccessLogBucketAssociationState, opts?: CustomResourceOptions): DrtAccessLogBucketAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            log_bucket: Optional[str] = None,
            role_arn_association_id: Optional[str] = None,
            timeouts: Optional[DrtAccessLogBucketAssociationTimeoutsArgs] = None) -> DrtAccessLogBucketAssociation
    func GetDrtAccessLogBucketAssociation(ctx *Context, name string, id IDInput, state *DrtAccessLogBucketAssociationState, opts ...ResourceOption) (*DrtAccessLogBucketAssociation, error)
    public static DrtAccessLogBucketAssociation Get(string name, Input<string> id, DrtAccessLogBucketAssociationState? state, CustomResourceOptions? opts = null)
    public static DrtAccessLogBucketAssociation get(String name, Output<String> id, DrtAccessLogBucketAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    LogBucket string

    The Amazon S3 bucket that contains the logs that you want to share.

    RoleArnAssociationId string

    The ID of the Role Arn association used for allowing Shield DRT Access.

    Timeouts DrtAccessLogBucketAssociationTimeouts
    LogBucket string

    The Amazon S3 bucket that contains the logs that you want to share.

    RoleArnAssociationId string

    The ID of the Role Arn association used for allowing Shield DRT Access.

    Timeouts DrtAccessLogBucketAssociationTimeoutsArgs
    logBucket String

    The Amazon S3 bucket that contains the logs that you want to share.

    roleArnAssociationId String

    The ID of the Role Arn association used for allowing Shield DRT Access.

    timeouts DrtAccessLogBucketAssociationTimeouts
    logBucket string

    The Amazon S3 bucket that contains the logs that you want to share.

    roleArnAssociationId string

    The ID of the Role Arn association used for allowing Shield DRT Access.

    timeouts DrtAccessLogBucketAssociationTimeouts
    log_bucket str

    The Amazon S3 bucket that contains the logs that you want to share.

    role_arn_association_id str

    The ID of the Role Arn association used for allowing Shield DRT Access.

    timeouts DrtAccessLogBucketAssociationTimeoutsArgs
    logBucket String

    The Amazon S3 bucket that contains the logs that you want to share.

    roleArnAssociationId String

    The ID of the Role Arn association used for allowing Shield DRT Access.

    timeouts Property Map

    Supporting Types

    DrtAccessLogBucketAssociationTimeouts, DrtAccessLogBucketAssociationTimeoutsArgs

    Create string
    Delete string
    Read string
    Create string
    Delete string
    Read string
    create String
    delete String
    read String
    create string
    delete string
    read string
    create str
    delete str
    read str
    create String
    delete String
    read String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.2.0 published on Monday, Sep 18, 2023 by Pulumi