// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** 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. */ public /*out*/ readonly accessKey!: pulumi.Output; /** * *Optional* - Description of the storage bucket key. */ public readonly description!: pulumi.Output; /** * **Required** - Name of the storage bucket key. */ public readonly name!: pulumi.Output; /** * **Required** - Name of storage pool to host the storage bucket key. */ public readonly pool!: pulumi.Output; /** * *Optional* - Name of the project where the storage bucket key will be stored. */ 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. */ 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). */ public readonly role!: pulumi.Output; /** * Secret key of the storage bucket key. */ public /*out*/ readonly secretKey!: pulumi.Output; /** * **Required** - Name of the storage bucket. */ 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 ? state.accessKey : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["pool"] = state ? state.pool : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["remote"] = state ? state.remote : undefined; resourceInputs["role"] = state ? state.role : undefined; resourceInputs["secretKey"] = state ? state.secretKey : undefined; resourceInputs["storageBucket"] = state ? state.storageBucket : undefined; } else { const args = argsOrState as StorageBucketKeyArgs | undefined; if ((!args || args.pool === undefined) && !opts.urn) { throw new Error("Missing required property 'pool'"); } if ((!args || args.storageBucket === undefined) && !opts.urn) { throw new Error("Missing required property 'storageBucket'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["pool"] = args ? args.pool : undefined; resourceInputs["project"] = (args ? args.project : undefined) ?? "default"; resourceInputs["remote"] = args ? args.remote : undefined; resourceInputs["role"] = args ? args.role : undefined; resourceInputs["storageBucket"] = args ? args.storageBucket : undefined; 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; }