@pulumi/signalfx
Version:
A Pulumi package for creating and managing SignalFx resources.
142 lines • 7.72 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.Integration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Splunk Observability Cloud Azure integrations. For help with this integration see [Monitoring Microsoft Azure](https://docs.splunk.com/observability/en/gdi/get-data-in/connect/azure/azure.html).
*
* > **NOTE** When managing integrations, use a session token of an administrator to authenticate the Splunk Observability Cloud provider. See [Operations that require a session token for an administrator](https://dev.splunk.com/observability/docs/administration/authtokens#Operations-that-require-a-session-token-for-an-administrator). Otherwise you'll receive a 4xx error.
*
* ## Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
*
* const azureMyteam = new signalfx.azure.Integration("azure_myteam", {
* name: "Azure Foo",
* enabled: true,
* environment: "azure",
* pollRate: 300,
* secretKey: "XXX",
* appId: "YYY",
* tenantId: "ZZZ",
* services: ["microsoft.sql/servers/elasticpools"],
* subscriptions: ["sub-guid-here"],
* additionalServices: [
* "some/service",
* "another/service",
* ],
* customNamespacesPerServices: [{
* service: "Microsoft.Compute/virtualMachines",
* namespaces: [
* "monitoringAgent",
* "customNamespace",
* ],
* }],
* resourceFilterRules: [
* {
* filterSource: "filter('azure_tag_service', 'payment') and (filter('azure_tag_env', 'prod-us') or filter('azure_tag_env', 'prod-eu'))",
* },
* {
* filterSource: "filter('azure_tag_service', 'notification') and (filter('azure_tag_env', 'prod-us') or filter('azure_tag_env', 'prod-eu'))",
* },
* ],
* });
* ```
*/
class Integration extends pulumi.CustomResource {
/**
* Get an existing Integration 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 Integration(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Integration. 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'] === Integration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["additionalServices"] = state ? state.additionalServices : undefined;
resourceInputs["appId"] = state ? state.appId : undefined;
resourceInputs["customNamespacesPerServices"] = state ? state.customNamespacesPerServices : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["environment"] = state ? state.environment : undefined;
resourceInputs["importAzureMonitor"] = state ? state.importAzureMonitor : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["namedToken"] = state ? state.namedToken : undefined;
resourceInputs["pollRate"] = state ? state.pollRate : undefined;
resourceInputs["resourceFilterRules"] = state ? state.resourceFilterRules : undefined;
resourceInputs["secretKey"] = state ? state.secretKey : undefined;
resourceInputs["services"] = state ? state.services : undefined;
resourceInputs["subscriptions"] = state ? state.subscriptions : undefined;
resourceInputs["syncGuestOsNamespaces"] = state ? state.syncGuestOsNamespaces : undefined;
resourceInputs["tenantId"] = state ? state.tenantId : undefined;
resourceInputs["useBatchApi"] = state ? state.useBatchApi : undefined;
}
else {
const args = argsOrState;
if ((!args || args.appId === undefined) && !opts.urn) {
throw new Error("Missing required property 'appId'");
}
if ((!args || args.enabled === undefined) && !opts.urn) {
throw new Error("Missing required property 'enabled'");
}
if ((!args || args.secretKey === undefined) && !opts.urn) {
throw new Error("Missing required property 'secretKey'");
}
if ((!args || args.services === undefined) && !opts.urn) {
throw new Error("Missing required property 'services'");
}
if ((!args || args.subscriptions === undefined) && !opts.urn) {
throw new Error("Missing required property 'subscriptions'");
}
if ((!args || args.tenantId === undefined) && !opts.urn) {
throw new Error("Missing required property 'tenantId'");
}
resourceInputs["additionalServices"] = args ? args.additionalServices : undefined;
resourceInputs["appId"] = (args === null || args === void 0 ? void 0 : args.appId) ? pulumi.secret(args.appId) : undefined;
resourceInputs["customNamespacesPerServices"] = args ? args.customNamespacesPerServices : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["environment"] = (args === null || args === void 0 ? void 0 : args.environment) ? pulumi.secret(args.environment) : undefined;
resourceInputs["importAzureMonitor"] = args ? args.importAzureMonitor : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["namedToken"] = args ? args.namedToken : undefined;
resourceInputs["pollRate"] = args ? args.pollRate : undefined;
resourceInputs["resourceFilterRules"] = args ? args.resourceFilterRules : undefined;
resourceInputs["secretKey"] = (args === null || args === void 0 ? void 0 : args.secretKey) ? pulumi.secret(args.secretKey) : undefined;
resourceInputs["services"] = args ? args.services : undefined;
resourceInputs["subscriptions"] = args ? args.subscriptions : undefined;
resourceInputs["syncGuestOsNamespaces"] = args ? args.syncGuestOsNamespaces : undefined;
resourceInputs["tenantId"] = args ? args.tenantId : undefined;
resourceInputs["useBatchApi"] = args ? args.useBatchApi : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["appId", "environment", "secretKey"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Integration.__pulumiType, name, resourceInputs, opts);
}
}
exports.Integration = Integration;
/** @internal */
Integration.__pulumiType = 'signalfx:azure/integration:Integration';
//# sourceMappingURL=integration.js.map