S3BucketAssociation

NOTE: This resource interacts with Amazon Macie Classic. Macie Classic cannot be activated in new accounts. See the FAQ for more details.

Associates an S3 resource with Amazon Macie for monitoring and data classification.

NOTE: Before using Amazon Macie for the first time it must be enabled manually. Instructions are here.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Macie.S3BucketAssociation("example", new Aws.Macie.S3BucketAssociationArgs
        {
            BucketName = "tf-macie-example",
            ClassificationType = new Aws.Macie.Inputs.S3BucketAssociationClassificationTypeArgs
            {
                OneTime = "FULL",
            },
            Prefix = "data",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/macie"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := macie.NewS3BucketAssociation(ctx, "example", &macie.S3BucketAssociationArgs{
            BucketName: pulumi.String("tf-macie-example"),
            ClassificationType: &macie.S3BucketAssociationClassificationTypeArgs{
                OneTime: pulumi.String("FULL"),
            },
            Prefix: pulumi.String("data"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.macie.S3BucketAssociation("example",
    bucket_name="tf-macie-example",
    classification_type={
        "oneTime": "FULL",
    },
    prefix="data")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.macie.S3BucketAssociation("example", {
    bucketName: "tf-macie-example",
    classificationType: {
        oneTime: "FULL",
    },
    prefix: "data",
});

Create a S3BucketAssociation Resource

def S3BucketAssociation(resource_name, opts=None, bucket_name=None, classification_type=None, member_account_id=None, prefix=None, __props__=None);
name string
The unique name of the resource.
args S3BucketAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args S3BucketAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args S3BucketAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

S3BucketAssociation Resource Properties

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

Inputs

The S3BucketAssociation resource accepts the following input properties:

BucketName string

The name of the S3 bucket that you want to associate with Amazon Macie.

ClassificationType S3BucketAssociationClassificationTypeArgs

The configuration of how Amazon Macie classifies the S3 objects.

MemberAccountId string

The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If member_account_id isn’t specified, the action associates specified S3 resources with Macie for the current master account.

Prefix string

Object key prefix identifying one or more S3 objects to which the association applies.

BucketName string

The name of the S3 bucket that you want to associate with Amazon Macie.

ClassificationType S3BucketAssociationClassificationType

The configuration of how Amazon Macie classifies the S3 objects.

MemberAccountId string

The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If member_account_id isn’t specified, the action associates specified S3 resources with Macie for the current master account.

Prefix string

Object key prefix identifying one or more S3 objects to which the association applies.

bucketName string

The name of the S3 bucket that you want to associate with Amazon Macie.

classificationType S3BucketAssociationClassificationType

The configuration of how Amazon Macie classifies the S3 objects.

memberAccountId string

The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If member_account_id isn’t specified, the action associates specified S3 resources with Macie for the current master account.

prefix string

Object key prefix identifying one or more S3 objects to which the association applies.

bucket_name str

The name of the S3 bucket that you want to associate with Amazon Macie.

classification_type Dict[S3BucketAssociationClassificationType]

The configuration of how Amazon Macie classifies the S3 objects.

member_account_id str

The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If member_account_id isn’t specified, the action associates specified S3 resources with Macie for the current master account.

prefix str

Object key prefix identifying one or more S3 objects to which the association applies.

Outputs

All input properties are implicitly available as output properties. Additionally, the S3BucketAssociation 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing S3BucketAssociation Resource

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

static get(resource_name, id, opts=None, bucket_name=None, classification_type=None, member_account_id=None, prefix=None, __props__=None);
func GetS3BucketAssociation(ctx *Context, name string, id IDInput, state *S3BucketAssociationState, opts ...ResourceOption) (*S3BucketAssociation, error)
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.

The following state arguments are supported:

BucketName string

The name of the S3 bucket that you want to associate with Amazon Macie.

ClassificationType S3BucketAssociationClassificationTypeArgs

The configuration of how Amazon Macie classifies the S3 objects.

MemberAccountId string

The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If member_account_id isn’t specified, the action associates specified S3 resources with Macie for the current master account.

Prefix string

Object key prefix identifying one or more S3 objects to which the association applies.

BucketName string

The name of the S3 bucket that you want to associate with Amazon Macie.

ClassificationType S3BucketAssociationClassificationType

The configuration of how Amazon Macie classifies the S3 objects.

MemberAccountId string

The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If member_account_id isn’t specified, the action associates specified S3 resources with Macie for the current master account.

Prefix string

Object key prefix identifying one or more S3 objects to which the association applies.

bucketName string

The name of the S3 bucket that you want to associate with Amazon Macie.

classificationType S3BucketAssociationClassificationType

The configuration of how Amazon Macie classifies the S3 objects.

memberAccountId string

The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If member_account_id isn’t specified, the action associates specified S3 resources with Macie for the current master account.

prefix string

Object key prefix identifying one or more S3 objects to which the association applies.

bucket_name str

The name of the S3 bucket that you want to associate with Amazon Macie.

classification_type Dict[S3BucketAssociationClassificationType]

The configuration of how Amazon Macie classifies the S3 objects.

member_account_id str

The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If member_account_id isn’t specified, the action associates specified S3 resources with Macie for the current master account.

prefix str

Object key prefix identifying one or more S3 objects to which the association applies.

Supporting Types

S3BucketAssociationClassificationType

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Continuous string

A string value indicating that Macie perform a one-time classification of all of the existing objects in the bucket. The only valid value is the default value, FULL.

OneTime string

A string value indicating whether or not Macie performs a one-time classification of all of the existing objects in the bucket. Valid values are NONE and FULL. Defaults to NONE indicating that Macie only classifies objects that are added after the association was created.

Continuous string

A string value indicating that Macie perform a one-time classification of all of the existing objects in the bucket. The only valid value is the default value, FULL.

OneTime string

A string value indicating whether or not Macie performs a one-time classification of all of the existing objects in the bucket. Valid values are NONE and FULL. Defaults to NONE indicating that Macie only classifies objects that are added after the association was created.

continuous string

A string value indicating that Macie perform a one-time classification of all of the existing objects in the bucket. The only valid value is the default value, FULL.

oneTime string

A string value indicating whether or not Macie performs a one-time classification of all of the existing objects in the bucket. Valid values are NONE and FULL. Defaults to NONE indicating that Macie only classifies objects that are added after the association was created.

continuous str

A string value indicating that Macie perform a one-time classification of all of the existing objects in the bucket. The only valid value is the default value, FULL.

oneTime str

A string value indicating whether or not Macie performs a one-time classification of all of the existing objects in the bucket. Valid values are NONE and FULL. Defaults to NONE indicating that Macie only classifies objects that are added after the association was created.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.