@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
98 lines • 4.27 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.ImageAccessAccept = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages memberships status for the shared OpenStack Glance V2 Image within the
* destination project, which has a member proposal.
*
* ## Example Usage
*
* Accept a shared image membershipship proposal within the current project.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const rancheros = openstack.images.getImage({
* name: "RancherOS",
* visibility: "shared",
* memberStatus: "all",
* });
* const rancherosMember = new openstack.images.ImageAccessAccept("rancheros_member", {
* imageId: rancheros.then(rancheros => rancheros.id),
* status: "accepted",
* });
* ```
*
* ## Import
*
* Image access acceptance status can be imported using the `image_id`, e.g.
*
* ```sh
* $ pulumi import openstack:images/imageAccessAccept:ImageAccessAccept openstack_images_image_access_accept_v2 89c60255-9bd6-460c-822a-e2b959ede9d2
* ```
*/
class ImageAccessAccept extends pulumi.CustomResource {
/**
* Get an existing ImageAccessAccept 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 ImageAccessAccept(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ImageAccessAccept. 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'] === ImageAccessAccept.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["imageId"] = state ? state.imageId : undefined;
resourceInputs["memberId"] = state ? state.memberId : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["schema"] = state ? state.schema : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
}
else {
const args = argsOrState;
if ((!args || args.imageId === undefined) && !opts.urn) {
throw new Error("Missing required property 'imageId'");
}
if ((!args || args.status === undefined) && !opts.urn) {
throw new Error("Missing required property 'status'");
}
resourceInputs["imageId"] = args ? args.imageId : undefined;
resourceInputs["memberId"] = args ? args.memberId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["status"] = args ? args.status : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["schema"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ImageAccessAccept.__pulumiType, name, resourceInputs, opts);
}
}
exports.ImageAccessAccept = ImageAccessAccept;
/** @internal */
ImageAccessAccept.__pulumiType = 'openstack:images/imageAccessAccept:ImageAccessAccept';
//# sourceMappingURL=imageAccessAccept.js.map