@pulumi/linode
Version:
A Pulumi package for creating and managing linode cloud resources.
105 lines • 4.41 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.ProducerImageShareGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages an Image Share Group.
* For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/post-sharegroups). May not be currently available to all users even under v4beta.
*
* ## Example Usage
*
* Create an Image Share Group without any Images:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const test_empty = new linode.ProducerImageShareGroup("test-empty", {
* label: "my-image-share-group",
* description: "My description.",
* });
* ```
*
* Create an Image Share Group with one Image:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as linode from "@pulumi/linode";
*
* const test_images = new linode.ProducerImageShareGroup("test-images", {
* label: "my-image-share-group",
* description: "My description.",
* images: [{
* id: "private/12345",
* label: "my-image",
* description: "My image description.",
* }],
* });
* ```
*/
class ProducerImageShareGroup extends pulumi.CustomResource {
/**
* Get an existing ProducerImageShareGroup 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 ProducerImageShareGroup(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ProducerImageShareGroup. 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'] === ProducerImageShareGroup.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["created"] = state?.created;
resourceInputs["description"] = state?.description;
resourceInputs["expiry"] = state?.expiry;
resourceInputs["images"] = state?.images;
resourceInputs["imagesCount"] = state?.imagesCount;
resourceInputs["isSuspended"] = state?.isSuspended;
resourceInputs["label"] = state?.label;
resourceInputs["membersCount"] = state?.membersCount;
resourceInputs["updated"] = state?.updated;
resourceInputs["uuid"] = state?.uuid;
}
else {
const args = argsOrState;
if (args?.label === undefined && !opts.urn) {
throw new Error("Missing required property 'label'");
}
resourceInputs["description"] = args?.description;
resourceInputs["images"] = args?.images;
resourceInputs["label"] = args?.label;
resourceInputs["created"] = undefined /*out*/;
resourceInputs["expiry"] = undefined /*out*/;
resourceInputs["imagesCount"] = undefined /*out*/;
resourceInputs["isSuspended"] = undefined /*out*/;
resourceInputs["membersCount"] = undefined /*out*/;
resourceInputs["updated"] = undefined /*out*/;
resourceInputs["uuid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ProducerImageShareGroup.__pulumiType, name, resourceInputs, opts);
}
}
exports.ProducerImageShareGroup = ProducerImageShareGroup;
/** @internal */
ProducerImageShareGroup.__pulumiType = 'linode:index/producerImageShareGroup:ProducerImageShareGroup';
//# sourceMappingURL=producerImageShareGroup.js.map