@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
89 lines • 3.71 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.AccountV1 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a V1 account resource within OpenStack.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const account1 = new openstack.objectstorage.AccountV1("account_1", {
* region: "RegionOne",
* metadata: {
* "Temp-Url-Key": "testkey",
* test: "true",
* },
* });
* ```
*
* ## Import
*
* This resource can be imported by specifying the project ID of the account:
*
* ```sh
* $ pulumi import openstack:objectstorage/accountV1:AccountV1 account_1 1202b3d0aaa44cfc8b79475c007b0711
* ```
*/
class AccountV1 extends pulumi.CustomResource {
/**
* Get an existing AccountV1 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 AccountV1(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AccountV1. 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'] === AccountV1.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["bytesUsed"] = state ? state.bytesUsed : undefined;
resourceInputs["containerCount"] = state ? state.containerCount : undefined;
resourceInputs["headers"] = state ? state.headers : undefined;
resourceInputs["metadata"] = state ? state.metadata : undefined;
resourceInputs["objectCount"] = state ? state.objectCount : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["quotaBytes"] = state ? state.quotaBytes : undefined;
resourceInputs["region"] = state ? state.region : undefined;
}
else {
const args = argsOrState;
resourceInputs["metadata"] = args ? args.metadata : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["bytesUsed"] = undefined /*out*/;
resourceInputs["containerCount"] = undefined /*out*/;
resourceInputs["headers"] = undefined /*out*/;
resourceInputs["objectCount"] = undefined /*out*/;
resourceInputs["quotaBytes"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AccountV1.__pulumiType, name, resourceInputs, opts);
}
}
exports.AccountV1 = AccountV1;
/** @internal */
AccountV1.__pulumiType = 'openstack:objectstorage/accountV1:AccountV1';
//# sourceMappingURL=accountV1.js.map