1. Packages
  2. AWS
  3. API Docs
  4. macie2
  5. ClassificationExportConfiguration
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.macie2.ClassificationExportConfiguration

Explore with Pulumi AI

Provides a resource to manage an Amazon Macie Classification Export Configuration.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.macie2.Account("example", {});
const exampleClassificationExportConfiguration = new aws.macie2.ClassificationExportConfiguration("example", {s3Destination: {
    bucketName: exampleAwsS3Bucket.bucket,
    keyPrefix: "exampleprefix/",
    kmsKeyArn: exampleAwsKmsKey.arn,
}}, {
    dependsOn: [example],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.macie2.Account("example")
example_classification_export_configuration = aws.macie2.ClassificationExportConfiguration("example", s3_destination={
    "bucket_name": example_aws_s3_bucket["bucket"],
    "key_prefix": "exampleprefix/",
    "kms_key_arn": example_aws_kms_key["arn"],
},
opts = pulumi.ResourceOptions(depends_on=[example]))
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/macie2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := macie2.NewAccount(ctx, "example", nil)
		if err != nil {
			return err
		}
		_, err = macie2.NewClassificationExportConfiguration(ctx, "example", &macie2.ClassificationExportConfigurationArgs{
			S3Destination: &macie2.ClassificationExportConfigurationS3DestinationArgs{
				BucketName: pulumi.Any(exampleAwsS3Bucket.Bucket),
				KeyPrefix:  pulumi.String("exampleprefix/"),
				KmsKeyArn:  pulumi.Any(exampleAwsKmsKey.Arn),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			example,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Macie2.Account("example");

    var exampleClassificationExportConfiguration = new Aws.Macie2.ClassificationExportConfiguration("example", new()
    {
        S3Destination = new Aws.Macie2.Inputs.ClassificationExportConfigurationS3DestinationArgs
        {
            BucketName = exampleAwsS3Bucket.Bucket,
            KeyPrefix = "exampleprefix/",
            KmsKeyArn = exampleAwsKmsKey.Arn,
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            example,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.macie2.Account;
import com.pulumi.aws.macie2.ClassificationExportConfiguration;
import com.pulumi.aws.macie2.ClassificationExportConfigurationArgs;
import com.pulumi.aws.macie2.inputs.ClassificationExportConfigurationS3DestinationArgs;
import com.pulumi.resources.CustomResourceOptions;
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 Account("example");

        var exampleClassificationExportConfiguration = new ClassificationExportConfiguration("exampleClassificationExportConfiguration", ClassificationExportConfigurationArgs.builder()
            .s3Destination(ClassificationExportConfigurationS3DestinationArgs.builder()
                .bucketName(exampleAwsS3Bucket.bucket())
                .keyPrefix("exampleprefix/")
                .kmsKeyArn(exampleAwsKmsKey.arn())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(example)
                .build());

    }
}
Copy
resources:
  example:
    type: aws:macie2:Account
  exampleClassificationExportConfiguration:
    type: aws:macie2:ClassificationExportConfiguration
    name: example
    properties:
      s3Destination:
        bucketName: ${exampleAwsS3Bucket.bucket}
        keyPrefix: exampleprefix/
        kmsKeyArn: ${exampleAwsKmsKey.arn}
    options:
      dependsOn:
        - ${example}
Copy

Create ClassificationExportConfiguration Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ClassificationExportConfiguration(name: string, args?: ClassificationExportConfigurationArgs, opts?: CustomResourceOptions);
@overload
def ClassificationExportConfiguration(resource_name: str,
                                      args: Optional[ClassificationExportConfigurationArgs] = None,
                                      opts: Optional[ResourceOptions] = None)

@overload
def ClassificationExportConfiguration(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      s3_destination: Optional[ClassificationExportConfigurationS3DestinationArgs] = None)
func NewClassificationExportConfiguration(ctx *Context, name string, args *ClassificationExportConfigurationArgs, opts ...ResourceOption) (*ClassificationExportConfiguration, error)
public ClassificationExportConfiguration(string name, ClassificationExportConfigurationArgs? args = null, CustomResourceOptions? opts = null)
public ClassificationExportConfiguration(String name, ClassificationExportConfigurationArgs args)
public ClassificationExportConfiguration(String name, ClassificationExportConfigurationArgs args, CustomResourceOptions options)
type: aws:macie2:ClassificationExportConfiguration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args ClassificationExportConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args ClassificationExportConfigurationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args ClassificationExportConfigurationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args ClassificationExportConfigurationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ClassificationExportConfigurationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var classificationExportConfigurationResource = new Aws.Macie2.ClassificationExportConfiguration("classificationExportConfigurationResource", new()
{
    S3Destination = new Aws.Macie2.Inputs.ClassificationExportConfigurationS3DestinationArgs
    {
        BucketName = "string",
        KmsKeyArn = "string",
        KeyPrefix = "string",
    },
});
Copy
example, err := macie2.NewClassificationExportConfiguration(ctx, "classificationExportConfigurationResource", &macie2.ClassificationExportConfigurationArgs{
	S3Destination: &macie2.ClassificationExportConfigurationS3DestinationArgs{
		BucketName: pulumi.String("string"),
		KmsKeyArn:  pulumi.String("string"),
		KeyPrefix:  pulumi.String("string"),
	},
})
Copy
var classificationExportConfigurationResource = new ClassificationExportConfiguration("classificationExportConfigurationResource", ClassificationExportConfigurationArgs.builder()
    .s3Destination(ClassificationExportConfigurationS3DestinationArgs.builder()
        .bucketName("string")
        .kmsKeyArn("string")
        .keyPrefix("string")
        .build())
    .build());
Copy
classification_export_configuration_resource = aws.macie2.ClassificationExportConfiguration("classificationExportConfigurationResource", s3_destination={
    "bucket_name": "string",
    "kms_key_arn": "string",
    "key_prefix": "string",
})
Copy
const classificationExportConfigurationResource = new aws.macie2.ClassificationExportConfiguration("classificationExportConfigurationResource", {s3Destination: {
    bucketName: "string",
    kmsKeyArn: "string",
    keyPrefix: "string",
}});
Copy
type: aws:macie2:ClassificationExportConfiguration
properties:
    s3Destination:
        bucketName: string
        keyPrefix: string
        kmsKeyArn: string
Copy

ClassificationExportConfiguration Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ClassificationExportConfiguration resource accepts the following input properties:

S3Destination ClassificationExportConfigurationS3Destination
Configuration block for a S3 Destination. Defined below
S3Destination ClassificationExportConfigurationS3DestinationArgs
Configuration block for a S3 Destination. Defined below
s3Destination ClassificationExportConfigurationS3Destination
Configuration block for a S3 Destination. Defined below
s3Destination ClassificationExportConfigurationS3Destination
Configuration block for a S3 Destination. Defined below
s3_destination ClassificationExportConfigurationS3DestinationArgs
Configuration block for a S3 Destination. Defined below
s3Destination Property Map
Configuration block for a S3 Destination. Defined below

Outputs

All input properties are implicitly available as output properties. Additionally, the ClassificationExportConfiguration 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 ClassificationExportConfiguration Resource

Get an existing ClassificationExportConfiguration 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?: ClassificationExportConfigurationState, opts?: CustomResourceOptions): ClassificationExportConfiguration
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        s3_destination: Optional[ClassificationExportConfigurationS3DestinationArgs] = None) -> ClassificationExportConfiguration
func GetClassificationExportConfiguration(ctx *Context, name string, id IDInput, state *ClassificationExportConfigurationState, opts ...ResourceOption) (*ClassificationExportConfiguration, error)
public static ClassificationExportConfiguration Get(string name, Input<string> id, ClassificationExportConfigurationState? state, CustomResourceOptions? opts = null)
public static ClassificationExportConfiguration get(String name, Output<String> id, ClassificationExportConfigurationState state, CustomResourceOptions options)
resources:  _:    type: aws:macie2:ClassificationExportConfiguration    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
S3Destination ClassificationExportConfigurationS3Destination
Configuration block for a S3 Destination. Defined below
S3Destination ClassificationExportConfigurationS3DestinationArgs
Configuration block for a S3 Destination. Defined below
s3Destination ClassificationExportConfigurationS3Destination
Configuration block for a S3 Destination. Defined below
s3Destination ClassificationExportConfigurationS3Destination
Configuration block for a S3 Destination. Defined below
s3_destination ClassificationExportConfigurationS3DestinationArgs
Configuration block for a S3 Destination. Defined below
s3Destination Property Map
Configuration block for a S3 Destination. Defined below

Supporting Types

ClassificationExportConfigurationS3Destination
, ClassificationExportConfigurationS3DestinationArgs

BucketName This property is required. string
The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
KmsKeyArn This property is required. string

Amazon Resource Name (ARN) of the KMS key to be used to encrypt the data.

Additional information can be found in the Storing and retaining sensitive data discovery results with Amazon Macie for AWS Macie documentation.

KeyPrefix string
The object key for the bucket in which Amazon Macie exports the data classification results.
BucketName This property is required. string
The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
KmsKeyArn This property is required. string

Amazon Resource Name (ARN) of the KMS key to be used to encrypt the data.

Additional information can be found in the Storing and retaining sensitive data discovery results with Amazon Macie for AWS Macie documentation.

KeyPrefix string
The object key for the bucket in which Amazon Macie exports the data classification results.
bucketName This property is required. String
The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
kmsKeyArn This property is required. String

Amazon Resource Name (ARN) of the KMS key to be used to encrypt the data.

Additional information can be found in the Storing and retaining sensitive data discovery results with Amazon Macie for AWS Macie documentation.

keyPrefix String
The object key for the bucket in which Amazon Macie exports the data classification results.
bucketName This property is required. string
The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
kmsKeyArn This property is required. string

Amazon Resource Name (ARN) of the KMS key to be used to encrypt the data.

Additional information can be found in the Storing and retaining sensitive data discovery results with Amazon Macie for AWS Macie documentation.

keyPrefix string
The object key for the bucket in which Amazon Macie exports the data classification results.
bucket_name This property is required. str
The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
kms_key_arn This property is required. str

Amazon Resource Name (ARN) of the KMS key to be used to encrypt the data.

Additional information can be found in the Storing and retaining sensitive data discovery results with Amazon Macie for AWS Macie documentation.

key_prefix str
The object key for the bucket in which Amazon Macie exports the data classification results.
bucketName This property is required. String
The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
kmsKeyArn This property is required. String

Amazon Resource Name (ARN) of the KMS key to be used to encrypt the data.

Additional information can be found in the Storing and retaining sensitive data discovery results with Amazon Macie for AWS Macie documentation.

keyPrefix String
The object key for the bucket in which Amazon Macie exports the data classification results.

Import

Using pulumi import, import aws_macie2_classification_export_configuration using the account ID and region. For example:

$ pulumi import aws:macie2/classificationExportConfiguration:ClassificationExportConfiguration example 123456789012:us-west-2
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.