UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

93 lines 4.6 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.DataForwardingDestination = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provider to manage [Sumologic Data Forwarding Destination](https://help.sumologic.com/docs/manage/data-forwarding/amazon-s3-bucket/#configure-an-s3-data-forwarding-destination) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const exampleDataForwardingDestination = new sumologic.DataForwardingDestination("example_data_forwarding_destination", { * destinationName: "df-destination", * description: "some description", * bucketName: "df-bucket", * s3Region: "us-east-1", * authentication: { * type: "RoleBased", * roleArn: "arn:aws:iam::your_arn", * }, * s3ServerSideEncryption: false, * enabled: true, * }); * ``` */ class DataForwardingDestination extends pulumi.CustomResource { /** * Get an existing DataForwardingDestination 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 DataForwardingDestination(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DataForwardingDestination. 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'] === DataForwardingDestination.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authentication"] = state ? state.authentication : undefined; resourceInputs["bucketName"] = state ? state.bucketName : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["destinationName"] = state ? state.destinationName : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["s3Region"] = state ? state.s3Region : undefined; resourceInputs["s3ServerSideEncryption"] = state ? state.s3ServerSideEncryption : undefined; } else { const args = argsOrState; if ((!args || args.authentication === undefined) && !opts.urn) { throw new Error("Missing required property 'authentication'"); } if ((!args || args.bucketName === undefined) && !opts.urn) { throw new Error("Missing required property 'bucketName'"); } if ((!args || args.destinationName === undefined) && !opts.urn) { throw new Error("Missing required property 'destinationName'"); } resourceInputs["authentication"] = args ? args.authentication : undefined; resourceInputs["bucketName"] = args ? args.bucketName : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["destinationName"] = args ? args.destinationName : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["s3Region"] = args ? args.s3Region : undefined; resourceInputs["s3ServerSideEncryption"] = args ? args.s3ServerSideEncryption : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DataForwardingDestination.__pulumiType, name, resourceInputs, opts); } } exports.DataForwardingDestination = DataForwardingDestination; /** @internal */ DataForwardingDestination.__pulumiType = 'sumologic:index/dataForwardingDestination:DataForwardingDestination'; //# sourceMappingURL=dataForwardingDestination.js.map