@pulumi/signalfx
Version:
A Pulumi package for creating and managing SignalFx resources.
153 lines • 9.05 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");
/**
* AWS CloudWatch integrations for Splunk Observability Cloud. For help with this integration see [Monitoring Amazon Web Services](https://docs.splunk.com/observability/en/gdi/get-data-in/connect/aws/get-awstoc.html).
*
* This resource implements a part of a workflow. Use it with one of either `signalfx.aws.ExternalIntegration` or `signalfx.aws.TokenIntegration`.
*
* > **NOTE** When managing integrations, use a session token of an administrator to authenticate the Splunk Observability 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).
*
* ## Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as signalfx from "@pulumi/signalfx";
*
* // This resource returns an account id in `external_id`…
* const awsMyteamExternal = new signalfx.aws.ExternalIntegration("aws_myteam_external", {name: "My AWS integration"});
* // Make yourself an AWS IAM role here, use `signalfx_aws_external_integration.aws_myteam_external.external_id`
* const awsSfxExample = new aws.index.IamRole("aws_sfx_example", {});
* const awsMyteam = new signalfx.aws.Integration("aws_myteam", {
* enabled: true,
* integrationId: awsMyteamExternal.id,
* externalId: awsMyteamExternal.externalId,
* roleArn: awsSfxRole.arn,
* regions: ["us-east-1"],
* pollRate: 300,
* importCloudWatch: true,
* enableAwsUsage: true,
* customNamespaceSyncRules: [{
* defaultAction: "Exclude",
* filterAction: "Include",
* filterSource: "filter('code', '200')",
* namespace: "my-custom-namespace",
* }],
* namespaceSyncRules: [{
* defaultAction: "Exclude",
* filterAction: "Include",
* filterSource: "filter('code', '200')",
* namespace: "AWS/EC2",
* }],
* metricStatsToSyncs: [{
* namespace: "AWS/EC2",
* metric: "NetworkPacketsIn",
* stats: ["upper"],
* }],
* });
* ```
*/
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["authMethod"] = state ? state.authMethod : undefined;
resourceInputs["collectOnlyRecommendedStats"] = state ? state.collectOnlyRecommendedStats : undefined;
resourceInputs["customCloudwatchNamespaces"] = state ? state.customCloudwatchNamespaces : undefined;
resourceInputs["customNamespaceSyncRules"] = state ? state.customNamespaceSyncRules : undefined;
resourceInputs["enableAwsUsage"] = state ? state.enableAwsUsage : undefined;
resourceInputs["enableCheckLargeVolume"] = state ? state.enableCheckLargeVolume : undefined;
resourceInputs["enableLogsSync"] = state ? state.enableLogsSync : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["externalId"] = state ? state.externalId : undefined;
resourceInputs["importCloudWatch"] = state ? state.importCloudWatch : undefined;
resourceInputs["integrationId"] = state ? state.integrationId : undefined;
resourceInputs["key"] = state ? state.key : undefined;
resourceInputs["metricStatsToSyncs"] = state ? state.metricStatsToSyncs : undefined;
resourceInputs["metricStreamsManagedExternally"] = state ? state.metricStreamsManagedExternally : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["namedToken"] = state ? state.namedToken : undefined;
resourceInputs["namespaceSyncRules"] = state ? state.namespaceSyncRules : undefined;
resourceInputs["pollRate"] = state ? state.pollRate : undefined;
resourceInputs["regions"] = state ? state.regions : undefined;
resourceInputs["roleArn"] = state ? state.roleArn : undefined;
resourceInputs["services"] = state ? state.services : undefined;
resourceInputs["syncCustomNamespacesOnly"] = state ? state.syncCustomNamespacesOnly : undefined;
resourceInputs["token"] = state ? state.token : undefined;
resourceInputs["useMetricStreamsSync"] = state ? state.useMetricStreamsSync : undefined;
}
else {
const args = argsOrState;
if ((!args || args.enabled === undefined) && !opts.urn) {
throw new Error("Missing required property 'enabled'");
}
if ((!args || args.integrationId === undefined) && !opts.urn) {
throw new Error("Missing required property 'integrationId'");
}
if ((!args || args.regions === undefined) && !opts.urn) {
throw new Error("Missing required property 'regions'");
}
resourceInputs["collectOnlyRecommendedStats"] = args ? args.collectOnlyRecommendedStats : undefined;
resourceInputs["customCloudwatchNamespaces"] = args ? args.customCloudwatchNamespaces : undefined;
resourceInputs["customNamespaceSyncRules"] = args ? args.customNamespaceSyncRules : undefined;
resourceInputs["enableAwsUsage"] = args ? args.enableAwsUsage : undefined;
resourceInputs["enableCheckLargeVolume"] = args ? args.enableCheckLargeVolume : undefined;
resourceInputs["enableLogsSync"] = args ? args.enableLogsSync : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["externalId"] = (args === null || args === void 0 ? void 0 : args.externalId) ? pulumi.secret(args.externalId) : undefined;
resourceInputs["importCloudWatch"] = args ? args.importCloudWatch : undefined;
resourceInputs["integrationId"] = args ? args.integrationId : undefined;
resourceInputs["key"] = (args === null || args === void 0 ? void 0 : args.key) ? pulumi.secret(args.key) : undefined;
resourceInputs["metricStatsToSyncs"] = args ? args.metricStatsToSyncs : undefined;
resourceInputs["metricStreamsManagedExternally"] = args ? args.metricStreamsManagedExternally : undefined;
resourceInputs["namedToken"] = args ? args.namedToken : undefined;
resourceInputs["namespaceSyncRules"] = args ? args.namespaceSyncRules : undefined;
resourceInputs["pollRate"] = args ? args.pollRate : undefined;
resourceInputs["regions"] = args ? args.regions : undefined;
resourceInputs["roleArn"] = args ? args.roleArn : undefined;
resourceInputs["services"] = args ? args.services : undefined;
resourceInputs["syncCustomNamespacesOnly"] = args ? args.syncCustomNamespacesOnly : undefined;
resourceInputs["token"] = args ? args.token : undefined;
resourceInputs["useMetricStreamsSync"] = args ? args.useMetricStreamsSync : undefined;
resourceInputs["authMethod"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["externalId", "key"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Integration.__pulumiType, name, resourceInputs, opts);
}
}
exports.Integration = Integration;
/** @internal */
Integration.__pulumiType = 'signalfx:aws/integration:Integration';
//# sourceMappingURL=integration.js.map