@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
121 lines • 4.93 kB
JavaScript
;
// *** 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.CloudToCloudSource = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a [Sumologic Cloud-to-Cloud source][1].
*
* ## Supported Integrations
*
* List of available integrations along with their corresponding `JSON` templates is present [here](https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Cloud-to-Cloud_Integration_Framework#Integrations)
*
* __IMPORTANT:__ The API credentials are stored in plain-text in the state. This is a potential security issue.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const collector = new sumologic.Collector("collector", {
* name: "my-collector",
* description: "Just testing this",
* });
* const oktaSource = new sumologic.CloudToCloudSource("okta_source", {
* collectorId: collector.id,
* schemaRef: {
* type: "Okta",
* },
* config: JSON.stringify({
* name: "okta source",
* domain: "dev-xxx-admin.okta.com",
* collectAll: true,
* apiKey: "xxx",
* fields: {
* _siemForward: false,
* },
* pollingInterval: 30,
* }),
* });
* ```
*
* ## Import
*
* Cloud-to-Cloud sources can be imported using the collector and source IDs (`collector/source`), e.g.:
*
* hcl
*
* ```sh
* $ pulumi import sumologic:index/cloudToCloudSource:CloudToCloudSource test 100000001/100000001
* ```
*
* Cloud-to-Cloud sources can be imported using the collector name and source name (`collectorName/sourceName`), e.g.:
*
* hcl
*
* ```sh
* $ pulumi import sumologic:index/cloudToCloudSource:CloudToCloudSource test my-test-collector/my-test-source
* ```
*
* [1]: https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Cloud-to-Cloud_Integration_Framework
*
* [2]: https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/Cloud-to-Cloud_Integration_Framework#Integrations
*/
class CloudToCloudSource extends pulumi.CustomResource {
/**
* Get an existing CloudToCloudSource 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 CloudToCloudSource(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of CloudToCloudSource. 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'] === CloudToCloudSource.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["collectorId"] = state ? state.collectorId : undefined;
resourceInputs["config"] = state ? state.config : undefined;
resourceInputs["schemaRef"] = state ? state.schemaRef : undefined;
}
else {
const args = argsOrState;
if ((!args || args.collectorId === undefined) && !opts.urn) {
throw new Error("Missing required property 'collectorId'");
}
if ((!args || args.config === undefined) && !opts.urn) {
throw new Error("Missing required property 'config'");
}
if ((!args || args.schemaRef === undefined) && !opts.urn) {
throw new Error("Missing required property 'schemaRef'");
}
resourceInputs["collectorId"] = args ? args.collectorId : undefined;
resourceInputs["config"] = args ? args.config : undefined;
resourceInputs["schemaRef"] = args ? args.schemaRef : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CloudToCloudSource.__pulumiType, name, resourceInputs, opts);
}
}
exports.CloudToCloudSource = CloudToCloudSource;
/** @internal */
CloudToCloudSource.__pulumiType = 'sumologic:index/cloudToCloudSource:CloudToCloudSource';
//# sourceMappingURL=cloudToCloudSource.js.map