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.42.0 published on Wednesday, Jun 26, 2024 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.42.0 published on Wednesday, Jun 26, 2024 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

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.shield.DrtAccessRoleArnAssociation("test", {roleArn: `arn:aws:iam:${current.name}:${currentAwsCallerIdentity.accountId}:${shieldDrtAccessRoleName}`});
    const testDrtAccessLogBucketAssociation = new aws.shield.DrtAccessLogBucketAssociation("test", {
        logBucket: shieldDrtAccessLogBucket,
        roleArnAssociationId: test.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.shield.DrtAccessRoleArnAssociation("test", role_arn=f"arn:aws:iam:{current['name']}:{current_aws_caller_identity['accountId']}:{shield_drt_access_role_name}")
    test_drt_access_log_bucket_association = aws.shield.DrtAccessLogBucketAssociation("test",
        log_bucket=shield_drt_access_log_bucket,
        role_arn_association_id=test.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 {
    		test, err := shield.NewDrtAccessRoleArnAssociation(ctx, "test", &shield.DrtAccessRoleArnAssociationArgs{
    			RoleArn: pulumi.String(fmt.Sprintf("arn:aws:iam:%v:%v:%v", current.Name, currentAwsCallerIdentity.AccountId, shieldDrtAccessRoleName)),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = shield.NewDrtAccessLogBucketAssociation(ctx, "test", &shield.DrtAccessLogBucketAssociationArgs{
    			LogBucket:            pulumi.Any(shieldDrtAccessLogBucket),
    			RoleArnAssociationId: test.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.Shield.DrtAccessRoleArnAssociation("test", new()
        {
            RoleArn = $"arn:aws:iam:{current.Name}:{currentAwsCallerIdentity.AccountId}:{shieldDrtAccessRoleName}",
        });
    
        var testDrtAccessLogBucketAssociation = new Aws.Shield.DrtAccessLogBucketAssociation("test", new()
        {
            LogBucket = shieldDrtAccessLogBucket,
            RoleArnAssociationId = test.Id,
        });
    
    });
    
    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 test = new DrtAccessRoleArnAssociation("test", DrtAccessRoleArnAssociationArgs.builder()
                .roleArn(String.format("arn:aws:iam:%s:%s:%s", current.name(),currentAwsCallerIdentity.accountId(),shieldDrtAccessRoleName))
                .build());
    
            var testDrtAccessLogBucketAssociation = new DrtAccessLogBucketAssociation("testDrtAccessLogBucketAssociation", DrtAccessLogBucketAssociationArgs.builder()
                .logBucket(shieldDrtAccessLogBucket)
                .roleArnAssociationId(test.id())
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:shield:DrtAccessRoleArnAssociation
        properties:
          roleArn: arn:aws:iam:${current.name}:${currentAwsCallerIdentity.accountId}:${shieldDrtAccessRoleName}
      testDrtAccessLogBucketAssociation:
        type: aws:shield:DrtAccessLogBucketAssociation
        name: test
        properties:
          logBucket: ${shieldDrtAccessLogBucket}
          roleArnAssociationId: ${test.id}
    

    Create DrtAccessLogBucketAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DrtAccessLogBucketAssociation(name: string, args: DrtAccessLogBucketAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def DrtAccessLogBucketAssociation(resource_name: str,
                                      args: DrtAccessLogBucketAssociationArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var drtAccessLogBucketAssociationResource = new Aws.Shield.DrtAccessLogBucketAssociation("drtAccessLogBucketAssociationResource", new()
    {
        LogBucket = "string",
        RoleArnAssociationId = "string",
        Timeouts = new Aws.Shield.Inputs.DrtAccessLogBucketAssociationTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := shield.NewDrtAccessLogBucketAssociation(ctx, "drtAccessLogBucketAssociationResource", &shield.DrtAccessLogBucketAssociationArgs{
    	LogBucket:            pulumi.String("string"),
    	RoleArnAssociationId: pulumi.String("string"),
    	Timeouts: &shield.DrtAccessLogBucketAssociationTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var drtAccessLogBucketAssociationResource = new DrtAccessLogBucketAssociation("drtAccessLogBucketAssociationResource", DrtAccessLogBucketAssociationArgs.builder()
        .logBucket("string")
        .roleArnAssociationId("string")
        .timeouts(DrtAccessLogBucketAssociationTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    drt_access_log_bucket_association_resource = aws.shield.DrtAccessLogBucketAssociation("drtAccessLogBucketAssociationResource",
        log_bucket="string",
        role_arn_association_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const drtAccessLogBucketAssociationResource = new aws.shield.DrtAccessLogBucketAssociation("drtAccessLogBucketAssociationResource", {
        logBucket: "string",
        roleArnAssociationId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: aws:shield:DrtAccessLogBucketAssociation
    properties:
        logBucket: string
        roleArnAssociationId: string
        timeouts:
            create: string
            delete: string
    

    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
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

    Import

    Using pulumi import, import Shield DRT access log bucket associations using the log_bucket. For example:

    $ pulumi import aws:shield/drtAccessLogBucketAssociation:DrtAccessLogBucketAssociation example example-bucket
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.42.0 published on Wednesday, Jun 26, 2024 by Pulumi