@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
158 lines (157 loc) • 6.68 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Resource for managing an AWS Redshift Logging configuration.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.redshift.Logging("example", {
* clusterIdentifier: exampleAwsRedshiftCluster.id,
* logDestinationType: "cloudwatch",
* logExports: [
* "connectionlog",
* "userlog",
* ],
* });
* ```
*
* ### S3 Destination Type
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.redshift.Logging("example", {
* clusterIdentifier: exampleAwsRedshiftCluster.id,
* logDestinationType: "s3",
* bucketName: exampleAwsS3Bucket.id,
* s3KeyPrefix: "example-prefix/",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Redshift Logging using the `id`. For example:
*
* ```sh
* $ pulumi import aws:redshift/logging:Logging example cluster-id-12345678
* ```
*/
export declare class Logging extends pulumi.CustomResource {
/**
* Get an existing Logging resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LoggingState, opts?: pulumi.CustomResourceOptions): Logging;
/**
* Returns true if the given object is an instance of Logging. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Logging;
/**
* Name of an existing S3 bucket where the log files are to be stored. Required when `logDestinationType` 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)
*/
readonly bucketName: pulumi.Output<string | undefined>;
/**
* Identifier of the source cluster.
*
* The following arguments are optional:
*/
readonly clusterIdentifier: pulumi.Output<string>;
/**
* Log destination type. Valid values are `s3` and `cloudwatch`.
*/
readonly logDestinationType: pulumi.Output<string | undefined>;
/**
* Collection of exported log types. Required when `logDestinationType` is `cloudwatch`. Valid values are `connectionlog`, `useractivitylog`, and `userlog`.
*/
readonly logExports: pulumi.Output<string[] | undefined>;
/**
* 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.
*/
readonly region: pulumi.Output<string>;
/**
* Prefix applied to the log file names.
*/
readonly s3KeyPrefix: pulumi.Output<string | undefined>;
/**
* Create a Logging resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: LoggingArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Logging resources.
*/
export interface LoggingState {
/**
* Name of an existing S3 bucket where the log files are to be stored. Required when `logDestinationType` 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)
*/
bucketName?: pulumi.Input<string>;
/**
* Identifier of the source cluster.
*
* The following arguments are optional:
*/
clusterIdentifier?: pulumi.Input<string>;
/**
* Log destination type. Valid values are `s3` and `cloudwatch`.
*/
logDestinationType?: pulumi.Input<string>;
/**
* Collection of exported log types. Required when `logDestinationType` is `cloudwatch`. Valid values are `connectionlog`, `useractivitylog`, and `userlog`.
*/
logExports?: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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.
*/
region?: pulumi.Input<string>;
/**
* Prefix applied to the log file names.
*/
s3KeyPrefix?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Logging resource.
*/
export interface LoggingArgs {
/**
* Name of an existing S3 bucket where the log files are to be stored. Required when `logDestinationType` 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)
*/
bucketName?: pulumi.Input<string>;
/**
* Identifier of the source cluster.
*
* The following arguments are optional:
*/
clusterIdentifier: pulumi.Input<string>;
/**
* Log destination type. Valid values are `s3` and `cloudwatch`.
*/
logDestinationType?: pulumi.Input<string>;
/**
* Collection of exported log types. Required when `logDestinationType` is `cloudwatch`. Valid values are `connectionlog`, `useractivitylog`, and `userlog`.
*/
logExports?: pulumi.Input<pulumi.Input<string>[]>;
/**
* 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.
*/
region?: pulumi.Input<string>;
/**
* Prefix applied to the log file names.
*/
s3KeyPrefix?: pulumi.Input<string>;
}