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
new S3BucketAssociation(name: string, args: S3BucketAssociationArgs, opts?: CustomResourceOptions);def S3BucketAssociation(resource_name, opts=None, bucket_name=None, classification_type=None, member_account_id=None, prefix=None, __props__=None);func NewS3BucketAssociation(ctx *Context, name string, args S3BucketAssociationArgs, opts ...ResourceOption) (*S3BucketAssociation, error)public S3BucketAssociation(string name, S3BucketAssociationArgs args, CustomResourceOptions? opts = null)- 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:
- Bucket
Name string The name of the S3 bucket that you want to associate with Amazon Macie.
- Classification
Type S3BucketAssociation Classification Type Args The configuration of how Amazon Macie classifies the S3 objects.
- Member
Account stringId The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If
member_account_idisn’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 string The name of the S3 bucket that you want to associate with Amazon Macie.
- Classification
Type S3BucketAssociation Classification Type The configuration of how Amazon Macie classifies the S3 objects.
- Member
Account stringId The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If
member_account_idisn’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 string The name of the S3 bucket that you want to associate with Amazon Macie.
- classification
Type S3BucketAssociation Classification Type The configuration of how Amazon Macie classifies the S3 objects.
- member
Account stringId The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If
member_account_idisn’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[S3BucketAssociation Classification Type] The configuration of how Amazon Macie classifies the S3 objects.
- member_
account_ strid The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If
member_account_idisn’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:
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.
public static get(name: string, id: Input<ID>, state?: S3BucketAssociationState, opts?: CustomResourceOptions): S3BucketAssociationstatic 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)public static S3BucketAssociation Get(string name, Input<string> id, S3BucketAssociationState? state, CustomResourceOptions? opts = null)- 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:
- Bucket
Name string The name of the S3 bucket that you want to associate with Amazon Macie.
- Classification
Type S3BucketAssociation Classification Type Args The configuration of how Amazon Macie classifies the S3 objects.
- Member
Account stringId The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If
member_account_idisn’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 string The name of the S3 bucket that you want to associate with Amazon Macie.
- Classification
Type S3BucketAssociation Classification Type The configuration of how Amazon Macie classifies the S3 objects.
- Member
Account stringId The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If
member_account_idisn’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 string The name of the S3 bucket that you want to associate with Amazon Macie.
- classification
Type S3BucketAssociation Classification Type The configuration of how Amazon Macie classifies the S3 objects.
- member
Account stringId The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If
member_account_idisn’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[S3BucketAssociation Classification Type] The configuration of how Amazon Macie classifies the S3 objects.
- member_
account_ strid The ID of the Amazon Macie member account whose S3 resources you want to associate with Macie. If
member_account_idisn’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
- 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.- One
Time 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
NONEandFULL. Defaults toNONEindicating 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.- One
Time 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
NONEandFULL. Defaults toNONEindicating 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.- one
Time 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
NONEandFULL. Defaults toNONEindicating 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.- one
Time 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
NONEandFULL. Defaults toNONEindicating 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
awsTerraform Provider.