214 lines
7.4 KiB
TypeScript
Generated
214 lines
7.4 KiB
TypeScript
Generated
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
import * as pulumi from "@pulumi/pulumi";
|
|
import * as utilities from "./utilities";
|
|
|
|
export class StorageBucket extends pulumi.CustomResource {
|
|
/**
|
|
* Get an existing StorageBucket 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.
|
|
*/
|
|
public static get(
|
|
name: string,
|
|
id: pulumi.Input<pulumi.ID>,
|
|
state?: StorageBucketState,
|
|
opts?: pulumi.CustomResourceOptions,
|
|
): StorageBucket {
|
|
return new StorageBucket(name, <any>state, { ...opts, id: id });
|
|
}
|
|
|
|
/** @internal */
|
|
public static readonly __pulumiType = "incus:index/storageBucket:StorageBucket";
|
|
|
|
/**
|
|
* Returns true if the given object is an instance of StorageBucket. This is designed to work even
|
|
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
*/
|
|
public static isInstance(obj: any): obj is StorageBucket {
|
|
if (obj === undefined || obj === null) {
|
|
return false;
|
|
}
|
|
return obj["__pulumiType"] === StorageBucket.__pulumiType;
|
|
}
|
|
|
|
/**
|
|
* *Optional* - Map of key/value pairs of
|
|
* [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings).
|
|
* Config settings vary depending on the Storage Pool used.
|
|
*/
|
|
declare public readonly config: pulumi.Output<{ [key: string]: string }>;
|
|
/**
|
|
* *Optional* - Description of the storage bucket.
|
|
*/
|
|
declare public readonly description: pulumi.Output<string>;
|
|
/**
|
|
* Name of the node where storage bucket was created. It could be useful with Incus in cluster mode.
|
|
*/
|
|
declare public readonly /*out*/ location: pulumi.Output<string>;
|
|
/**
|
|
* **Required** - Name of the storage bucket.
|
|
*/
|
|
declare public readonly name: pulumi.Output<string>;
|
|
/**
|
|
* **Required** - Name of storage pool to host the storage bucket.
|
|
*/
|
|
declare public readonly pool: pulumi.Output<string>;
|
|
/**
|
|
* *Optional* - Name of the project where the storage bucket will be stored.
|
|
*/
|
|
declare public readonly project: pulumi.Output<string>;
|
|
/**
|
|
* *Optional* - The remote in which the resource will be created. If
|
|
* not provided, the provider's default remote will be used.
|
|
*/
|
|
declare public readonly remote: pulumi.Output<string | undefined>;
|
|
/**
|
|
* *Optional* - Path to a backup file from which the bucket will be created.
|
|
*/
|
|
declare public readonly sourceFile: pulumi.Output<string | undefined>;
|
|
/**
|
|
* *Optional* - Specify a target node in a cluster.
|
|
*/
|
|
declare public readonly target: pulumi.Output<string>;
|
|
|
|
/**
|
|
* Create a StorageBucket resource with the given unique name, arguments, and options.
|
|
*
|
|
* @param name The _unique_ name of the resource.
|
|
* @param args The arguments to use to populate this resource's properties.
|
|
* @param opts A bag of options that control this resource's behavior.
|
|
*/
|
|
constructor(name: string, args: StorageBucketArgs, opts?: pulumi.CustomResourceOptions);
|
|
constructor(
|
|
name: string,
|
|
argsOrState?: StorageBucketArgs | StorageBucketState,
|
|
opts?: pulumi.CustomResourceOptions,
|
|
) {
|
|
let resourceInputs: pulumi.Inputs = {};
|
|
opts = opts || {};
|
|
if (opts.id) {
|
|
const state = argsOrState as StorageBucketState | undefined;
|
|
resourceInputs["config"] = state?.config;
|
|
resourceInputs["description"] = state?.description;
|
|
resourceInputs["location"] = state?.location;
|
|
resourceInputs["name"] = state?.name;
|
|
resourceInputs["pool"] = state?.pool;
|
|
resourceInputs["project"] = state?.project;
|
|
resourceInputs["remote"] = state?.remote;
|
|
resourceInputs["sourceFile"] = state?.sourceFile;
|
|
resourceInputs["target"] = state?.target;
|
|
} else {
|
|
const args = argsOrState as StorageBucketArgs | undefined;
|
|
if (args?.name === undefined && !opts.urn) {
|
|
throw new Error("Missing required property 'name'");
|
|
}
|
|
if (args?.pool === undefined && !opts.urn) {
|
|
throw new Error("Missing required property 'pool'");
|
|
}
|
|
resourceInputs["config"] = args?.config;
|
|
resourceInputs["description"] = args?.description;
|
|
resourceInputs["name"] = args?.name;
|
|
resourceInputs["pool"] = args?.pool;
|
|
resourceInputs["project"] = args?.project ?? "default";
|
|
resourceInputs["remote"] = args?.remote;
|
|
resourceInputs["sourceFile"] = args?.sourceFile;
|
|
resourceInputs["target"] = args?.target;
|
|
resourceInputs["location"] = undefined /*out*/;
|
|
}
|
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
super(StorageBucket.__pulumiType, name, resourceInputs, opts);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Input properties used for looking up and filtering StorageBucket resources.
|
|
*/
|
|
export interface StorageBucketState {
|
|
/**
|
|
* *Optional* - Map of key/value pairs of
|
|
* [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings).
|
|
* Config settings vary depending on the Storage Pool used.
|
|
*/
|
|
config?: pulumi.Input<{ [key: string]: pulumi.Input<string> }>;
|
|
/**
|
|
* *Optional* - Description of the storage bucket.
|
|
*/
|
|
description?: pulumi.Input<string>;
|
|
/**
|
|
* Name of the node where storage bucket was created. It could be useful with Incus in cluster mode.
|
|
*/
|
|
location?: pulumi.Input<string>;
|
|
/**
|
|
* **Required** - Name of the storage bucket.
|
|
*/
|
|
name?: pulumi.Input<string>;
|
|
/**
|
|
* **Required** - Name of storage pool to host the storage bucket.
|
|
*/
|
|
pool?: pulumi.Input<string>;
|
|
/**
|
|
* *Optional* - Name of the project where the storage bucket will be stored.
|
|
*/
|
|
project?: pulumi.Input<string>;
|
|
/**
|
|
* *Optional* - The remote in which the resource will be created. If
|
|
* not provided, the provider's default remote will be used.
|
|
*/
|
|
remote?: pulumi.Input<string>;
|
|
/**
|
|
* *Optional* - Path to a backup file from which the bucket will be created.
|
|
*/
|
|
sourceFile?: pulumi.Input<string>;
|
|
/**
|
|
* *Optional* - Specify a target node in a cluster.
|
|
*/
|
|
target?: pulumi.Input<string>;
|
|
}
|
|
|
|
/**
|
|
* The set of arguments for constructing a StorageBucket resource.
|
|
*/
|
|
export interface StorageBucketArgs {
|
|
/**
|
|
* *Optional* - Map of key/value pairs of
|
|
* [storage bucket config settings](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#configure-storage-bucket-settings).
|
|
* Config settings vary depending on the Storage Pool used.
|
|
*/
|
|
config?: pulumi.Input<{ [key: string]: pulumi.Input<string> }>;
|
|
/**
|
|
* *Optional* - Description of the storage bucket.
|
|
*/
|
|
description?: pulumi.Input<string>;
|
|
/**
|
|
* **Required** - Name of the storage bucket.
|
|
*/
|
|
name: pulumi.Input<string>;
|
|
/**
|
|
* **Required** - Name of storage pool to host the storage bucket.
|
|
*/
|
|
pool: pulumi.Input<string>;
|
|
/**
|
|
* *Optional* - Name of the project where the storage bucket will be stored.
|
|
*/
|
|
project?: pulumi.Input<string>;
|
|
/**
|
|
* *Optional* - The remote in which the resource will be created. If
|
|
* not provided, the provider's default remote will be used.
|
|
*/
|
|
remote?: pulumi.Input<string>;
|
|
/**
|
|
* *Optional* - Path to a backup file from which the bucket will be created.
|
|
*/
|
|
sourceFile?: pulumi.Input<string>;
|
|
/**
|
|
* *Optional* - Specify a target node in a cluster.
|
|
*/
|
|
target?: pulumi.Input<string>;
|
|
}
|