DrtAccessLogBucketAssociation class
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.region}:${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['region']}:{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.Region}:{currentAwsCallerIdentity.AccountId}:{shieldDrtAccessRoleName}",
});
var testDrtAccessLogBucketAssociation = new Aws.Shield.DrtAccessLogBucketAssociation("test", new()
{
LogBucket = shieldDrtAccessLogBucket,
RoleArnAssociationId = test.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/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.Region, currentAwsCallerIdentity.AccountId, shieldDrtAccessRoleName),
})
if err != nil {
return err
}
_, err = shield.NewDrtAccessLogBucketAssociation(ctx, "test", &shield.DrtAccessLogBucketAssociationArgs{
LogBucket: pulumi.Any(shieldDrtAccessLogBucket),
RoleArnAssociationId: test.ID().ToIDOutput().ToStringOutput(),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_shield_drtaccessrolearnassociation" "test" {
role_arn ="arn:aws:iam:${current.region}:${currentAwsCallerIdentity.accountId}:${shieldDrtAccessRoleName}"
}
resource "aws_shield_drtaccesslogbucketassociation" "test" {
log_bucket = shieldDrtAccessLogBucket
role_arn_association_id = aws_shield_drtaccessrolearnassociation.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.ArrayList;
import java.util.Arrays;
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.region(),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.region}:${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 logBucket. For example:
$ pulumi import aws:shield/drtAccessLogBucketAssociation:DrtAccessLogBucketAssociation example example-bucket
Constructors
- DrtAccessLogBucketAssociation(String name, {DrtAccessLogBucketAssociationArgs? args, CustomResourceOptions? options})
-
Creates a new DrtAccessLogBucketAssociation.
nameThe Pulumi resource name.argsArguments used to configure this DrtAccessLogBucketAssociation. The set of arguments for DrtAccessLogBucketAssociation.optionsResource options controlling this resource's behavior. - DrtAccessLogBucketAssociation.reference(String urn)
- Creates a typed reference to an existing DrtAccessLogBucketAssociation resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
logBucket
↔ Output<
String> -
The Amazon S3 bucket that contains the logs that you want to share.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
roleArnAssociationId
↔ Output<
String> -
The ID of the Role Arn association used for allowing Shield DRT Access.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
timeouts
↔ Output<
DrtAccessLogBucketAssociationTimeouts?> -
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {DrtAccessLogBucketAssociationState? state, CustomResourceOptions? options}) → DrtAccessLogBucketAssociation -
Gets an existing DrtAccessLogBucketAssociation resource's state with the given
nameandid.