Class LogS3TableIntegrationSource


  • public class LogS3TableIntegrationSource
    extends com.pulumi.resources.CustomResource
    Manages a CloudWatch Logs S3 Table Integration data source association. This resource associates a data source (such as a CloudWatch log type) with an S3 Table Integration, enabling CloudWatch logs to be automatically written to S3 Tables for analytics. 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 ### Associate All Sources (Wildcard)
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.cloudwatch.LogS3TableIntegrationSource;
     import com.pulumi.aws.cloudwatch.LogS3TableIntegrationSourceArgs;
     import com.pulumi.aws.cloudwatch.inputs.LogS3TableIntegrationSourceDataSourceArgs;
     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 LogS3TableIntegrationSource("example", LogS3TableIntegrationSourceArgs.builder()
                 .dataSource(LogS3TableIntegrationSourceDataSourceArgs.builder()
                     .name("*")
                     .type("*")
                     .build())
                 .integrationArn(exampleAwsObservabilityadminS3TableIntegration.arn())
                 .build());
     
         }
     }
     
     
    ### Associate a Custom Data Source To route log stream messages from a specific custom data source into a dedicated S3 Table, tag the CloudWatch log group with `cw:datasource:name` and `cw:datasource:type`. The integration then writes matching log streams into a table named `{name}__{type}` inside the `aws-cloudwatch` table bucket.
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.cloudwatch.LogGroup;
     import com.pulumi.aws.cloudwatch.LogGroupArgs;
     import com.pulumi.aws.cloudwatch.LogS3TableIntegrationSource;
     import com.pulumi.aws.cloudwatch.LogS3TableIntegrationSourceArgs;
     import com.pulumi.aws.cloudwatch.inputs.LogS3TableIntegrationSourceDataSourceArgs;
     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) {
             // Tag the log group to declare it as a custom data source.
             // Log stream messages are written to the "myapp__events" table
             // in the aws-cloudwatch table bucket.
             var example = new LogGroup("example", LogGroupArgs.builder()
                 .name("/example/myapp")
                 .tags(Map.ofEntries(
                     Map.entry("cw:datasource:name", "myapp"),
                     Map.entry("cw:datasource:type", "events")
                 ))
                 .build());
     
             var exampleLogS3TableIntegrationSource = new LogS3TableIntegrationSource("exampleLogS3TableIntegrationSource", LogS3TableIntegrationSourceArgs.builder()
                 .dataSource(LogS3TableIntegrationSourceDataSourceArgs.builder()
                     .name("myapp")
                     .type("events")
                     .build())
                 .integrationArn(exampleAwsObservabilityadminS3TableIntegration.arn())
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `integrationArn` (String) ARN of the integration. * `id` (String) ID of the association. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import S3 Table Integration data source associations using `integrationArn` and `id` separated by a comma (`,`). For example: ```sh $ pulumi import aws:cloudwatch/logS3TableIntegrationSource:LogS3TableIntegrationSource example arn:aws:observabilityadmin:us-west-2:123456789012:s3tableintegration/3g5043wqe54nmw5apiugwkn1a,a8928b36-ab82-4ae2-ae5c-fcb910ec4237 ```
    • 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<LogS3TableIntegrationSourceDataSource> dataSource()  
      static LogS3TableIntegrationSource get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, LogS3TableIntegrationSourceState 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> integrationArn()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<LogS3TableIntegrationSourceTimeouts>> 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

      • LogS3TableIntegrationSource

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

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

        public LogS3TableIntegrationSource​(java.lang.String name,
                                           LogS3TableIntegrationSourceArgs 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

      • dataSource

        public com.pulumi.core.Output<LogS3TableIntegrationSourceDataSource> dataSource()
        Returns:
        Data source to associate with the S3 Table Integration. See `dataSource` Block below.
      • integrationArn

        public com.pulumi.core.Output<java.lang.String> integrationArn()
        Returns:
        ARN of the `aws.observabilityadmin.S3TableIntegration` to associate the data source with.
      • 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.
      • get

        public static LogS3TableIntegrationSource get​(java.lang.String name,
                                                      com.pulumi.core.Output<java.lang.String> id,
                                                      @Nullable
                                                      LogS3TableIntegrationSourceState 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.