@pulumi/signalfx
Version:
A Pulumi package for creating and managing SignalFx resources.
106 lines • 4.62 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.DataLink = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manage Splunk Observability Cloud [Data Links](https://docs.signalfx.com/en/latest/managing/data-links.html).
*
* ## Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
*
* // A global link to Splunk Observability Cloud dashboard.
* const myDataLink = new signalfx.DataLink("my_data_link", {
* propertyName: "pname",
* propertyValue: "pvalue",
* targetSignalfxDashboards: [{
* isDefault: true,
* name: "sfx_dash",
* dashboardGroupId: mydashboardgroup0.id,
* dashboardId: mydashboard0.id,
* }],
* });
* // A dashboard-specific link to an external URL
* const myDataLinkDash = new signalfx.DataLink("my_data_link_dash", {
* contextDashboardId: mydashboard0.id,
* propertyName: "pname2",
* propertyValue: "pvalue",
* targetExternalUrls: [{
* name: "ex_url",
* timeFormat: "ISO8601",
* url: "https://www.example.com",
* propertyKeyMapping: {
* foo: "bar",
* },
* }],
* });
* // A link to an AppDynamics Service
* const myDataLinkAppd = new signalfx.DataLink("my_data_link_appd", {
* propertyName: "pname3",
* propertyValue: "pvalue",
* targetAppdUrls: [{
* name: "appd_url",
* url: "https://www.example.saas.appdynamics.com/#/application=1234&component=5678",
* }],
* });
* ```
*/
class DataLink extends pulumi.CustomResource {
/**
* Get an existing DataLink 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 DataLink(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of DataLink. 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'] === DataLink.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["contextDashboardId"] = state ? state.contextDashboardId : undefined;
resourceInputs["propertyName"] = state ? state.propertyName : undefined;
resourceInputs["propertyValue"] = state ? state.propertyValue : undefined;
resourceInputs["targetAppdUrls"] = state ? state.targetAppdUrls : undefined;
resourceInputs["targetExternalUrls"] = state ? state.targetExternalUrls : undefined;
resourceInputs["targetSignalfxDashboards"] = state ? state.targetSignalfxDashboards : undefined;
resourceInputs["targetSplunks"] = state ? state.targetSplunks : undefined;
}
else {
const args = argsOrState;
resourceInputs["contextDashboardId"] = args ? args.contextDashboardId : undefined;
resourceInputs["propertyName"] = args ? args.propertyName : undefined;
resourceInputs["propertyValue"] = args ? args.propertyValue : undefined;
resourceInputs["targetAppdUrls"] = args ? args.targetAppdUrls : undefined;
resourceInputs["targetExternalUrls"] = args ? args.targetExternalUrls : undefined;
resourceInputs["targetSignalfxDashboards"] = args ? args.targetSignalfxDashboards : undefined;
resourceInputs["targetSplunks"] = args ? args.targetSplunks : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DataLink.__pulumiType, name, resourceInputs, opts);
}
}
exports.DataLink = DataLink;
/** @internal */
DataLink.__pulumiType = 'signalfx:index/dataLink:DataLink';
//# sourceMappingURL=dataLink.js.map