@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
123 lines • 4.6 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.OrderV1 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a V1 Barbican order resource within OpenStack.
*
* ## Example Usage
*
* ### Symmetric key order
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const order1 = new openstack.keymanager.OrderV1("order_1", {
* type: "key",
* meta: {
* algorithm: "aes",
* bitLength: 256,
* name: "mysecret",
* mode: "cbc",
* },
* });
* ```
*
* ### Asymmetric key pair order
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const order1 = new openstack.keymanager.OrderV1("order_1", {
* type: "asymmetric",
* meta: {
* algorithm: "rsa",
* bitLength: 4096,
* name: "mysecret",
* },
* });
* ```
*
* ## Import
*
* Orders can be imported using the order id (the last part of the order reference), e.g.:
*
* ```sh
* $ pulumi import openstack:keymanager/orderV1:OrderV1 order_1 0c6cd26a-c012-4d7b-8034-057c0f1c2953
* ```
*/
class OrderV1 extends pulumi.CustomResource {
/**
* Get an existing OrderV1 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 OrderV1(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of OrderV1. 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'] === OrderV1.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["containerRef"] = state?.containerRef;
resourceInputs["created"] = state?.created;
resourceInputs["creatorId"] = state?.creatorId;
resourceInputs["meta"] = state?.meta;
resourceInputs["orderRef"] = state?.orderRef;
resourceInputs["region"] = state?.region;
resourceInputs["secretRef"] = state?.secretRef;
resourceInputs["status"] = state?.status;
resourceInputs["subStatus"] = state?.subStatus;
resourceInputs["subStatusMessage"] = state?.subStatusMessage;
resourceInputs["type"] = state?.type;
resourceInputs["updated"] = state?.updated;
}
else {
const args = argsOrState;
if (args?.meta === undefined && !opts.urn) {
throw new Error("Missing required property 'meta'");
}
if (args?.type === undefined && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["meta"] = args?.meta;
resourceInputs["region"] = args?.region;
resourceInputs["type"] = args?.type;
resourceInputs["containerRef"] = undefined /*out*/;
resourceInputs["created"] = undefined /*out*/;
resourceInputs["creatorId"] = undefined /*out*/;
resourceInputs["orderRef"] = undefined /*out*/;
resourceInputs["secretRef"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["subStatus"] = undefined /*out*/;
resourceInputs["subStatusMessage"] = undefined /*out*/;
resourceInputs["updated"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(OrderV1.__pulumiType, name, resourceInputs, opts);
}
}
exports.OrderV1 = OrderV1;
/** @internal */
OrderV1.__pulumiType = 'openstack:keymanager/orderV1:OrderV1';
//# sourceMappingURL=orderV1.js.map