@pulumiverse/cockroach
Version:
A Pulumi package to create and managed Cockroach DB resources in Pulumi programs.
66 lines • 3.05 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.ServiceAccount = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* CockroachDB Cloud service account. A service account represents a non-person user. By default a service account has no access but it can be accompanied by either a cockroach.UserRoleGrants resource or any number of cockroach.UserRoleGrant resources to grant it roles.
*
* ## Import
*
* format <resource> <service account id>
*
* ```sh
* $ pulumi import cockroach:index/serviceAccount:ServiceAccount api_service_account 1f69fdd2-600a-4cfc-a9ba-16995df0d77d
* ```
*/
class ServiceAccount extends pulumi.CustomResource {
/**
* Get an existing ServiceAccount 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 ServiceAccount(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ServiceAccount. 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'] === ServiceAccount.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["creatorName"] = state ? state.creatorName : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["name"] = state ? state.name : undefined;
}
else {
const args = argsOrState;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["creatorName"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServiceAccount.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceAccount = ServiceAccount;
/** @internal */
ServiceAccount.__pulumiType = 'cockroach:index/serviceAccount:ServiceAccount';
//# sourceMappingURL=serviceAccount.js.map