// *** 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 StorageBucketKey extends pulumi.CustomResource { /** * Get an existing StorageBucketKey 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, state?: StorageBucketKeyState, opts?: pulumi.CustomResourceOptions, ): StorageBucketKey { return new StorageBucketKey(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = "incus:index/storageBucketKey:StorageBucketKey"; /** * Returns true if the given object is an instance of StorageBucketKey. 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 StorageBucketKey { if (obj === undefined || obj === null) { return false; } return obj["__pulumiType"] === StorageBucketKey.__pulumiType; } /** * Access key of the storage bucket key. */ declare public readonly /*out*/ accessKey: pulumi.Output; /** * *Optional* - Description of the storage bucket key. */ declare public readonly description: pulumi.Output; /** * **Required** - Name of the storage bucket key. */ declare public readonly name: pulumi.Output; /** * **Required** - Name of storage pool to host the storage bucket key. */ declare public readonly pool: pulumi.Output; /** * *Optional* - Name of the project where the storage bucket key will be stored. */ declare public readonly project: pulumi.Output; /** * *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; /** * *Optional* - Name of the role that controls the access rights for the * key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys). */ declare public readonly role: pulumi.Output; /** * Secret key of the storage bucket key. */ declare public readonly /*out*/ secretKey: pulumi.Output; /** * **Required** - Name of the storage bucket. */ declare public readonly storageBucket: pulumi.Output; /** * Create a StorageBucketKey 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: StorageBucketKeyArgs, opts?: pulumi.CustomResourceOptions); constructor( name: string, argsOrState?: StorageBucketKeyArgs | StorageBucketKeyState, opts?: pulumi.CustomResourceOptions, ) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as StorageBucketKeyState | undefined; resourceInputs["accessKey"] = state?.accessKey; resourceInputs["description"] = state?.description; resourceInputs["name"] = state?.name; resourceInputs["pool"] = state?.pool; resourceInputs["project"] = state?.project; resourceInputs["remote"] = state?.remote; resourceInputs["role"] = state?.role; resourceInputs["secretKey"] = state?.secretKey; resourceInputs["storageBucket"] = state?.storageBucket; } else { const args = argsOrState as StorageBucketKeyArgs | 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'"); } if (args?.storageBucket === undefined && !opts.urn) { throw new Error("Missing required property 'storageBucket'"); } resourceInputs["description"] = args?.description; resourceInputs["name"] = args?.name; resourceInputs["pool"] = args?.pool; resourceInputs["project"] = args?.project ?? "default"; resourceInputs["remote"] = args?.remote; resourceInputs["role"] = args?.role; resourceInputs["storageBucket"] = args?.storageBucket; resourceInputs["accessKey"] = undefined /*out*/; resourceInputs["secretKey"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["accessKey", "secretKey"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(StorageBucketKey.__pulumiType, name, resourceInputs, opts); } } /** * Input properties used for looking up and filtering StorageBucketKey resources. */ export interface StorageBucketKeyState { /** * Access key of the storage bucket key. */ accessKey?: pulumi.Input; /** * *Optional* - Description of the storage bucket key. */ description?: pulumi.Input; /** * **Required** - Name of the storage bucket key. */ name?: pulumi.Input; /** * **Required** - Name of storage pool to host the storage bucket key. */ pool?: pulumi.Input; /** * *Optional* - Name of the project where the storage bucket key will be stored. */ project?: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ remote?: pulumi.Input; /** * *Optional* - Name of the role that controls the access rights for the * key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys). */ role?: pulumi.Input; /** * Secret key of the storage bucket key. */ secretKey?: pulumi.Input; /** * **Required** - Name of the storage bucket. */ storageBucket?: pulumi.Input; } /** * The set of arguments for constructing a StorageBucketKey resource. */ export interface StorageBucketKeyArgs { /** * *Optional* - Description of the storage bucket key. */ description?: pulumi.Input; /** * **Required** - Name of the storage bucket key. */ name: pulumi.Input; /** * **Required** - Name of storage pool to host the storage bucket key. */ pool: pulumi.Input; /** * *Optional* - Name of the project where the storage bucket key will be stored. */ project?: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ remote?: pulumi.Input; /** * *Optional* - Name of the role that controls the access rights for the * key. If not specified, the default role is used, as described in the [official documentation](https://linuxcontainers.org/incus/docs/main/howto/storage_buckets/#manage-storage-bucket-keys). */ role?: pulumi.Input; /** * **Required** - Name of the storage bucket. */ storageBucket: pulumi.Input; }