Class S3TableIntegration


  • public class S3TableIntegration
    extends com.pulumi.resources.CustomResource
    Manages a CloudWatch Observability Admin S3 Table Integration. This integration enables CloudWatch to duplicate telemetry data to Amazon S3 Tables, making it available for analysis by tools such as Amazon Athena and Amazon Redshift. For more information, see the [CloudWatch Logs S3 Tables integration documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/s3-tables-integration.html). ## Example Usage ### Basic Integration with AES256 Encryption
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.iam.Role;
     import com.pulumi.aws.iam.RoleArgs;
     import com.pulumi.aws.iam.RolePolicy;
     import com.pulumi.aws.iam.RolePolicyArgs;
     import com.pulumi.aws.observabilityadmin.S3TableIntegration;
     import com.pulumi.aws.observabilityadmin.S3TableIntegrationArgs;
     import com.pulumi.aws.observabilityadmin.inputs.S3TableIntegrationEncryptionArgs;
     import static com.pulumi.codegen.internal.Serialization.*;
     import java.util.ArrayList;
     import java.util.Arrays;
     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 Role("example", RoleArgs.builder()
                 .name("example-s3-table-integration")
                 .assumeRolePolicy(serializeJson(
                     jsonObject(
                         jsonProperty("Version", "2012-10-17"),
                         jsonProperty("Statement", jsonArray(jsonObject(
                             jsonProperty("Action", "sts:AssumeRole"),
                             jsonProperty("Effect", "Allow"),
                             jsonProperty("Principal", jsonObject(
                                 jsonProperty("Service", "logs.amazonaws.com")
                             ))
                         )))
                     )))
                 .build());
     
             var exampleRolePolicy = new RolePolicy("exampleRolePolicy", RolePolicyArgs.builder()
                 .role(example.name())
                 .policy(serializeJson(
                     jsonObject(
                         jsonProperty("Version", "2012-10-17"),
                         jsonProperty("Statement", jsonArray(jsonObject(
                             jsonProperty("Effect", "Allow"),
                             jsonProperty("Action", jsonArray(
                                 "s3tables:CreateTableBucket", 
                                 "s3tables:ListTableBuckets", 
                                 "s3tables:GetTableBucket", 
                                 "s3tables:CreateNamespace", 
                                 "s3tables:GetNamespace", 
                                 "s3tables:ListNamespaces", 
                                 "s3tables:CreateTable", 
                                 "s3tables:GetTable", 
                                 "s3tables:ListTables", 
                                 "s3tables:PutTableData", 
                                 "s3tables:GetTableData"
                             )),
                             jsonProperty("Resource", "*")
                         )))
                     )))
                 .build());
     
             var exampleS3TableIntegration = new S3TableIntegration("exampleS3TableIntegration", S3TableIntegrationArgs.builder()
                 .encryption(S3TableIntegrationEncryptionArgs.builder()
                     .sseAlgorithm("AES256")
                     .build())
                 .roleArn(example.arn())
                 .build());
     
         }
     }
     
     
    ### Integration with KMS Encryption
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.iam.Role;
     import com.pulumi.aws.iam.RoleArgs;
     import com.pulumi.aws.kms.Key;
     import com.pulumi.aws.kms.KeyArgs;
     import com.pulumi.aws.observabilityadmin.S3TableIntegration;
     import com.pulumi.aws.observabilityadmin.S3TableIntegrationArgs;
     import com.pulumi.aws.observabilityadmin.inputs.S3TableIntegrationEncryptionArgs;
     import static com.pulumi.codegen.internal.Serialization.*;
     import java.util.ArrayList;
     import java.util.Arrays;
     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 Role("example", RoleArgs.builder()
                 .name("example-s3-table-integration")
                 .assumeRolePolicy(serializeJson(
                     jsonObject(
                         jsonProperty("Version", "2012-10-17"),
                         jsonProperty("Statement", jsonArray(jsonObject(
                             jsonProperty("Action", "sts:AssumeRole"),
                             jsonProperty("Effect", "Allow"),
                             jsonProperty("Principal", jsonObject(
                                 jsonProperty("Service", "logs.amazonaws.com")
                             ))
                         )))
                     )))
                 .build());
     
             var exampleKey = new Key("exampleKey", KeyArgs.builder()
                 .description("S3 Table Integration KMS key")
                 .deletionWindowInDays(7)
                 .build());
     
             var exampleS3TableIntegration = new S3TableIntegration("exampleS3TableIntegration", S3TableIntegrationArgs.builder()
                 .encryption(S3TableIntegrationEncryptionArgs.builder()
                     .sseAlgorithm("aws:kms")
                     .kmsKeyArn(exampleKey.arn())
                     .build())
                 .roleArn(example.arn())
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required - `arn` (String) ARN of the S3 Table integration. Using `pulumi import`, import CloudWatch Observability Admin S3 Table Integrations using the `arn`. For example: ```sh $ pulumi import aws:observabilityadmin/s3TableIntegration:S3TableIntegration example arn:aws:observabilityadmin:us-east-1:123456789012:s3-table-integration/example-id ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.lang.String> destinationTableBucketArn()  
      com.pulumi.core.Output<S3TableIntegrationEncryption> encryption()  
      static S3TableIntegration get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, S3TableIntegrationState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> roleArn()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      com.pulumi.core.Output<java.util.Optional<S3TableIntegrationTimeouts>> timeouts()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • S3TableIntegration

        public S3TableIntegration​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • S3TableIntegration

        public S3TableIntegration​(java.lang.String name,
                                  S3TableIntegrationArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • S3TableIntegration

        public S3TableIntegration​(java.lang.String name,
                                  S3TableIntegrationArgs args,
                                  @Nullable
                                  com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the S3 Table integration.
      • destinationTableBucketArn

        public com.pulumi.core.Output<java.lang.String> destinationTableBucketArn()
        Returns:
        ARN of the S3 Table bucket where CloudWatch data is stored. AWS automatically creates a bucket named `_aws-cloudwatch_` if one does not already exist.
      • encryption

        public com.pulumi.core.Output<S3TableIntegrationEncryption> encryption()
        Returns:
        Encryption configuration block. Documented below.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • roleArn

        public com.pulumi.core.Output<java.lang.String> roleArn()
        Returns:
        ARN of the IAM role that grants the S3 Table integration permissions to access necessary resources.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • get

        public static S3TableIntegration get​(java.lang.String name,
                                             com.pulumi.core.Output<java.lang.String> id,
                                             @Nullable
                                             S3TableIntegrationState state,
                                             @Nullable
                                             com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.