Skip to content

Starts logging information, such as queries and connection attempts, for the specified Amazon Redshift cluster

Description

Starts logging information, such as queries and connection attempts, for the specified Amazon Redshift cluster.

Usage

redshift_enable_logging(ClusterIdentifier, BucketName, S3KeyPrefix,
  LogDestinationType, LogExports, S3TableKmsKeyId, S3TableGranularity)

Arguments

  • ClusterIdentifier

    [required] The identifier of the cluster on which logging is to be started.

    Example: examplecluster

  • BucketName

    The name of an existing S3 bucket where the log files are to be stored.

    Constraints:

    • Must be in the same region as the cluster
    • The cluster must have read bucket and put object permissions
  • S3KeyPrefix

    The prefix applied to the log file names.

    Valid characters are any letter from any language, any whitespace character, any numeric character, and the following characters: underscore (_), period (.), colon (:), slash (/), equal (=), plus (+), backslash (\), hyphen (-), at symbol (@).

  • LogDestinationType

    The log destination type. An enum with possible values of s3, cloudwatch, and s3table.

  • LogExports

    The collection of exported log types. When LogDestinationType is s3 or cloudwatch, possible values are connectionlog, useractivitylog, and userlog. When LogDestinationType is s3table, the values are the names of the system tables to publish. Omitting this parameter, passing an empty list, or including the value all publishes all current and future system tables.

  • S3TableKmsKeyId

    The identifier of a customer managed KMS key used to encrypt the S3 tables. This parameter is valid only when LogDestinationType is s3table.

  • S3TableGranularity

    The scope of system table publishing. Valid values are cluster and account. A value of cluster scopes publishing to the individual cluster. A value of account scopes publishing to the Amazon Web Services account. This parameter is valid only when LogDestinationType is s3table.

Value

A list with the following syntax:

list(
  LoggingEnabled = TRUE|FALSE,
  BucketName = "string",
  S3KeyPrefix = "string",
  LastSuccessfulDeliveryTime = as.POSIXct(
    "2015-01-01"
  ),
  LastFailureTime = as.POSIXct(
    "2015-01-01"
  ),
  LastFailureMessage = "string",
  LogDestinationType = "s3"|"cloudwatch"|"s3table",
  LogExports = list(
    "string"
  ),
  S3Tables = list(
    S3Tables = list(
      "string"
    ),
    S3TableNamespace = "string",
    S3TableGranularity = "string",
    EnabledAll = TRUE|FALSE,
    LastIngestionTimes = list(
      "string"
    )
  )
)

Request syntax

svc$enable_logging(
  ClusterIdentifier = "string",
  BucketName = "string",
  S3KeyPrefix = "string",
  LogDestinationType = "s3"|"cloudwatch"|"s3table",
  LogExports = list(
    "string"
  ),
  S3TableKmsKeyId = "string",
  S3TableGranularity = "string"
)