Class Logging


  • public class Logging
    extends com.pulumi.resources.CustomResource
    Resource for managing an AWS Redshift Logging configuration. ## Example Usage ### Basic Usage <!--Start PulumiCodeChooser -->
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.redshift.Logging;
     import com.pulumi.aws.redshift.LoggingArgs;
     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 Logging("example", LoggingArgs.builder()
                 .clusterIdentifier(exampleAwsRedshiftCluster.id())
                 .logDestinationType("cloudwatch")
                 .logExports(            
                     "connectionlog",
                     "userlog")
                 .build());
     
         }
     }
     
     
    <!--End PulumiCodeChooser --> ### S3 Destination Type <!--Start PulumiCodeChooser -->
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.redshift.Logging;
     import com.pulumi.aws.redshift.LoggingArgs;
     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 Logging("example", LoggingArgs.builder()
                 .clusterIdentifier(exampleAwsRedshiftCluster.id())
                 .logDestinationType("s3")
                 .bucketName(exampleAwsS3Bucket.id())
                 .s3KeyPrefix("example-prefix/")
                 .build());
     
         }
     }
     
     
    <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import Redshift Logging using the `id`. For example: ```sh $ pulumi import aws:redshift/logging:Logging example cluster-id-12345678 ```
    • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      Logging​(java.lang.String name)  
      Logging​(java.lang.String name, LoggingArgs args)  
      Logging​(java.lang.String name, LoggingArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> bucketName()  
      com.pulumi.core.Output<java.lang.String> clusterIdentifier()  
      static Logging get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, LoggingState 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.util.Optional<java.lang.String>> logDestinationType()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> logExports()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> s3KeyPrefix()  
      • 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

      • Logging

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

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

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

      • bucketName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> bucketName()
        Returns:
        Name of an existing S3 bucket where the log files are to be stored. Required when `log_destination_type` is `s3`. Must be in the same region as the cluster and the cluster must have read bucket and put object permissions. For more information on the permissions required for the bucket, please read the AWS [documentation](http://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-enable-logging)
      • clusterIdentifier

        public com.pulumi.core.Output<java.lang.String> clusterIdentifier()
        Returns:
        Identifier of the source cluster. The following arguments are optional:
      • logDestinationType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> logDestinationType()
        Returns:
        Log destination type. Valid values are `s3` and `cloudwatch`.
      • logExports

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> logExports()
        Returns:
        Collection of exported log types. Required when `log_destination_type` is `cloudwatch`. Valid values are `connectionlog`, `useractivitylog`, and `userlog`.
      • s3KeyPrefix

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> s3KeyPrefix()
        Returns:
        Prefix applied to the log file names.
      • get

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