@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
80 lines • 4.14 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.UserSettings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class UserSettings extends pulumi.CustomResource {
/**
* Get an existing UserSettings 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 UserSettings(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of UserSettings. 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'] === UserSettings.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["autoLanguage"] = state ? state.autoLanguage : undefined;
resourceInputs["autoRegion"] = state ? state.autoRegion : undefined;
resourceInputs["autoTheme"] = state ? state.autoTheme : undefined;
resourceInputs["autoTimezone"] = state ? state.autoTimezone : undefined;
resourceInputs["language"] = state ? state.language : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["scope"] = state ? state.scope : undefined;
resourceInputs["theme"] = state ? state.theme : undefined;
resourceInputs["timezone"] = state ? state.timezone : undefined;
}
else {
const args = argsOrState;
if ((!args || args.autoLanguage === undefined) && !opts.urn) {
throw new Error("Missing required property 'autoLanguage'");
}
if ((!args || args.autoRegion === undefined) && !opts.urn) {
throw new Error("Missing required property 'autoRegion'");
}
if ((!args || args.autoTheme === undefined) && !opts.urn) {
throw new Error("Missing required property 'autoTheme'");
}
if ((!args || args.autoTimezone === undefined) && !opts.urn) {
throw new Error("Missing required property 'autoTimezone'");
}
if ((!args || args.scope === undefined) && !opts.urn) {
throw new Error("Missing required property 'scope'");
}
resourceInputs["autoLanguage"] = args ? args.autoLanguage : undefined;
resourceInputs["autoRegion"] = args ? args.autoRegion : undefined;
resourceInputs["autoTheme"] = args ? args.autoTheme : undefined;
resourceInputs["autoTimezone"] = args ? args.autoTimezone : undefined;
resourceInputs["language"] = args ? args.language : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["scope"] = args ? args.scope : undefined;
resourceInputs["theme"] = args ? args.theme : undefined;
resourceInputs["timezone"] = args ? args.timezone : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(UserSettings.__pulumiType, name, resourceInputs, opts);
}
}
exports.UserSettings = UserSettings;
/** @internal */
UserSettings.__pulumiType = 'dynatrace:index/userSettings:UserSettings';
//# sourceMappingURL=userSettings.js.map