@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
105 lines • 3.83 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Logging = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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
* ```
*/
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, id, state, opts) {
return new Logging(name, state, { ...opts, id: id });
}
/**
* 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) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Logging.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["bucketName"] = state?.bucketName;
resourceInputs["clusterIdentifier"] = state?.clusterIdentifier;
resourceInputs["logDestinationType"] = state?.logDestinationType;
resourceInputs["logExports"] = state?.logExports;
resourceInputs["region"] = state?.region;
resourceInputs["s3KeyPrefix"] = state?.s3KeyPrefix;
}
else {
const args = argsOrState;
if (args?.clusterIdentifier === undefined && !opts.urn) {
throw new Error("Missing required property 'clusterIdentifier'");
}
resourceInputs["bucketName"] = args?.bucketName;
resourceInputs["clusterIdentifier"] = args?.clusterIdentifier;
resourceInputs["logDestinationType"] = args?.logDestinationType;
resourceInputs["logExports"] = args?.logExports;
resourceInputs["region"] = args?.region;
resourceInputs["s3KeyPrefix"] = args?.s3KeyPrefix;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Logging.__pulumiType, name, resourceInputs, opts);
}
}
exports.Logging = Logging;
/** @internal */
Logging.__pulumiType = 'aws:redshift/logging:Logging';
//# sourceMappingURL=logging.js.map