@pulumi/linode
Version:
A Pulumi package for creating and managing linode cloud resources.
81 lines • 3.63 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.AccountSettings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages the settings of a Linode account.
* For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-account-settings).
*
* ## Example Usage
*
* The following example shows how one might use this resource to change their Linode account settings.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const myaccount = new linode.AccountSettings("myaccount", {
* longviewSubscription: "longview-40",
* backupsEnabled: true,
* });
* ```
*
* ## Additional Results
*
* * `managed` - Enables monitoring for connectivity, response, and total request time.
*
* * `objectStorage` - A string describing the status of this account’s Object Storage service enrollment.
*/
class AccountSettings extends pulumi.CustomResource {
/**
* Get an existing AccountSettings 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 AccountSettings(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AccountSettings. 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'] === AccountSettings.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["backupsEnabled"] = state ? state.backupsEnabled : undefined;
resourceInputs["longviewSubscription"] = state ? state.longviewSubscription : undefined;
resourceInputs["managed"] = state ? state.managed : undefined;
resourceInputs["networkHelper"] = state ? state.networkHelper : undefined;
resourceInputs["objectStorage"] = state ? state.objectStorage : undefined;
}
else {
const args = argsOrState;
resourceInputs["backupsEnabled"] = args ? args.backupsEnabled : undefined;
resourceInputs["longviewSubscription"] = args ? args.longviewSubscription : undefined;
resourceInputs["networkHelper"] = args ? args.networkHelper : undefined;
resourceInputs["managed"] = undefined /*out*/;
resourceInputs["objectStorage"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AccountSettings.__pulumiType, name, resourceInputs, opts);
}
}
exports.AccountSettings = AccountSettings;
/** @internal */
AccountSettings.__pulumiType = 'linode:index/accountSettings:AccountSettings';
//# sourceMappingURL=accountSettings.js.map
;