DrtAccessLogBucketAssociationArgs

data class DrtAccessLogBucketAssociationArgs(val logBucket: Output<String>? = null, val roleArnAssociationId: Output<String>? = null, val timeouts: Output<DrtAccessLogBucketAssociationTimeoutsArgs>? = null) : ConvertibleToJava<DrtAccessLogBucketAssociationArgs>

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)
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 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.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
})
}
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}

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

Constructors

Link copied to clipboard
constructor(logBucket: Output<String>? = null, roleArnAssociationId: Output<String>? = null, timeouts: Output<DrtAccessLogBucketAssociationTimeoutsArgs>? = null)

Properties

Link copied to clipboard
val logBucket: Output<String>? = null

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

Link copied to clipboard
val roleArnAssociationId: Output<String>? = null

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

Link copied to clipboard

Functions

Link copied to clipboard
open override fun toJava(): DrtAccessLogBucketAssociationArgs