1. Packages
  2. AWS
  3. API Docs
  4. macie2
  5. ClassificationExportConfiguration
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.macie2.ClassificationExportConfiguration

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    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],
    });
    
    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]))
    
    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
    	})
    }
    
    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,
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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}
    

    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 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 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 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 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 String
    The unique name of the resource.
    args 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",
        },
    });
    
    example, err := macie2.NewClassificationExportConfiguration(ctx, "classificationExportConfigurationResource", &macie2.ClassificationExportConfigurationArgs{
    	S3Destination: &macie2.ClassificationExportConfigurationS3DestinationArgs{
    		BucketName: pulumi.String("string"),
    		KmsKeyArn:  pulumi.String("string"),
    		KeyPrefix:  pulumi.String("string"),
    	},
    })
    
    var classificationExportConfigurationResource = new ClassificationExportConfiguration("classificationExportConfigurationResource", ClassificationExportConfigurationArgs.builder()
        .s3Destination(ClassificationExportConfigurationS3DestinationArgs.builder()
            .bucketName("string")
            .kmsKeyArn("string")
            .keyPrefix("string")
            .build())
        .build());
    
    classification_export_configuration_resource = aws.macie2.ClassificationExportConfiguration("classificationExportConfigurationResource", s3_destination={
        "bucketName": "string",
        "kmsKeyArn": "string",
        "keyPrefix": "string",
    })
    
    const classificationExportConfigurationResource = new aws.macie2.ClassificationExportConfiguration("classificationExportConfigurationResource", {s3Destination: {
        bucketName: "string",
        kmsKeyArn: "string",
        keyPrefix: "string",
    }});
    
    type: aws:macie2:ClassificationExportConfiguration
    properties:
        s3Destination:
            bucketName: string
            keyPrefix: string
            kmsKeyArn: string
    

    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

    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)
    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.
    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 string
    The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
    KmsKeyArn 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 string
    The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
    KmsKeyArn 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 String
    The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
    kmsKeyArn 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 string
    The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
    kmsKeyArn 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 str
    The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
    kms_key_arn 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 String
    The Amazon S3 bucket name in which Amazon Macie exports the data classification results.
    kmsKeyArn 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
    

    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.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi