aws.macie.S3BucketAssociation
Explore with Pulumi AI
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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Macie.S3BucketAssociation("example", new()
{
BucketName = "tf-macie-example",
ClassificationType = new Aws.Macie.Inputs.S3BucketAssociationClassificationTypeArgs
{
OneTime = "FULL",
},
Prefix = "data",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/macie"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.macie.S3BucketAssociation;
import com.pulumi.aws.macie.S3BucketAssociationArgs;
import com.pulumi.aws.macie.inputs.S3BucketAssociationClassificationTypeArgs;
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 example = new S3BucketAssociation("example", S3BucketAssociationArgs.builder()
.bucketName("tf-macie-example")
.classificationType(S3BucketAssociationClassificationTypeArgs.builder()
.oneTime("FULL")
.build())
.prefix("data")
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.macie.S3BucketAssociation("example",
bucket_name="tf-macie-example",
classification_type=aws.macie.S3BucketAssociationClassificationTypeArgs(
one_time="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",
});
resources:
example:
type: aws:macie:S3BucketAssociation
properties:
bucketName: tf-macie-example
classificationType:
oneTime: FULL
prefix: data
Create S3BucketAssociation Resource
new S3BucketAssociation(name: string, args: S3BucketAssociationArgs, opts?: CustomResourceOptions);
@overload
def S3BucketAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
classification_type: Optional[S3BucketAssociationClassificationTypeArgs] = None,
member_account_id: Optional[str] = None,
prefix: Optional[str] = None)
@overload
def S3BucketAssociation(resource_name: str,
args: S3BucketAssociationArgs,
opts: Optional[ResourceOptions] = None)
func NewS3BucketAssociation(ctx *Context, name string, args S3BucketAssociationArgs, opts ...ResourceOption) (*S3BucketAssociation, error)
public S3BucketAssociation(string name, S3BucketAssociationArgs args, CustomResourceOptions? opts = null)
public S3BucketAssociation(String name, S3BucketAssociationArgs args)
public S3BucketAssociation(String name, S3BucketAssociationArgs args, CustomResourceOptions options)
type: aws:macie:S3BucketAssociation
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args S3BucketAssociationArgs
- 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 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.
- name String
- The unique name of the resource.
- args S3BucketAssociationArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts 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_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 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_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 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_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 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_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 S3BucketAssociation Classification Type Args 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_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.
- bucket
Name String The name of the S3 bucket that you want to associate with Amazon Macie.
- classification
Type Property Map 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_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.
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 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 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): S3BucketAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket_name: Optional[str] = None,
classification_type: Optional[S3BucketAssociationClassificationTypeArgs] = None,
member_account_id: Optional[str] = None,
prefix: Optional[str] = None) -> S3BucketAssociation
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)
public static S3BucketAssociation get(String name, Output<String> id, S3BucketAssociationState 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.
- 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_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 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_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 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_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 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_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 S3BucketAssociation Classification Type Args 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_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.
- bucket
Name String The name of the S3 bucket that you want to associate with Amazon Macie.
- classification
Type Property Map 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_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.
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
NONE
andFULL
. Defaults toNONE
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
.- 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
NONE
andFULL
. Defaults toNONE
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
.- 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
NONE
andFULL
. Defaults toNONE
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
.- 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
NONE
andFULL
. Defaults toNONE
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
.- 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
NONE
andFULL
. Defaults toNONE
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
.- 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
NONE
andFULL
. Defaults toNONE
indicating that Macie only classifies objects that are added after the association was created.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.