StorageLensConfiguration

class StorageLensConfiguration : KotlinCustomResource

Provides a resource to manage an S3 Storage Lens configuration.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.s3control.StorageLensConfiguration;
import com.pulumi.aws.s3control.StorageLensConfigurationArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs;
import com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationExcludeArgs;
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) {
final var current = AwsFunctions.getCallerIdentity();
var example = new StorageLensConfiguration("example", StorageLensConfigurationArgs.builder()
.configId("example-1")
.storageLensConfiguration(StorageLensConfigurationStorageLensConfigurationArgs.builder()
.enabled(true)
.accountLevel(StorageLensConfigurationStorageLensConfigurationAccountLevelArgs.builder()
.activityMetrics(StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs.builder()
.enabled(true)
.build())
.bucketLevel(StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs.builder()
.activityMetrics(StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs.builder()
.enabled(true)
.build())
.build())
.build())
.dataExport(StorageLensConfigurationStorageLensConfigurationDataExportArgs.builder()
.cloudWatchMetrics(StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs.builder()
.enabled(true)
.build())
.s3BucketDestination(StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs.builder()
.accountId(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
.arn(aws_s3_bucket.target().arn())
.format("CSV")
.outputSchemaVersion("V_1")
.encryption(StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs.builder()
.sseS3s()
.build())
.build())
.build())
.exclude(StorageLensConfigurationStorageLensConfigurationExcludeArgs.builder()
.buckets(
aws_s3_bucket.b1().arn(),
aws_s3_bucket.b2().arn())
.regions("us-east-2")
.build())
.build())
.build());
}
}

Import

S3 Storage Lens configurations can be imported using the account_id and config_id, separated by a colon (:), e.g.

$ pulumi import aws:s3control/storageLensConfiguration:StorageLensConfiguration example 123456789012:example-1

Properties

Link copied to clipboard
val accountId: Output<String>

The AWS account ID for the S3 Storage Lens configuration. Defaults to automatically determined account ID of the AWS provider.

Link copied to clipboard
val arn: Output<String>

The Amazon Resource Name (ARN) of the Amazon Web Services organization.

Link copied to clipboard
val configId: Output<String>

The ID of the S3 Storage Lens configuration.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The S3 Storage Lens configuration. See Storage Lens Configuration below for more details.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>