UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

167 lines (166 loc) 6.33 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Linode Object Storage Key resource. This can be used to create, modify, and delete Linodes Object Storage Keys. * For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/post-object-storage-keys). * * ## Example Usage * * The following example shows how one might use this resource to create an Object Storage Key. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const foo = new linode.ObjectStorageKey("foo", {label: "image-access"}); * ``` * * The following example shows a key with limited access. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const foobar = new linode.ObjectStorageKey("foobar", { * label: "my-key", * bucketAccesses: [{ * bucketName: "my-bucket-name", * region: "us-mia", * permissions: "read_write", * }], * }); * ``` * * The following example shows how to grant a key the explicit access to multiple buckets. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const foo = new linode.ObjectStorageKey("foo", { * label: "image-access", * bucketAccesses: [ * { * bucketName: "foobar1", * region: "us-mia", * permissions: "read_write", * }, * { * bucketName: "foobar2", * region: "gb-lon", * permissions: "read_write", * }, * ], * }); * ``` */ export declare class ObjectStorageKey extends pulumi.CustomResource { /** * Get an existing ObjectStorageKey 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: string, id: pulumi.Input<pulumi.ID>, state?: ObjectStorageKeyState, opts?: pulumi.CustomResourceOptions): ObjectStorageKey; /** * Returns true if the given object is an instance of ObjectStorageKey. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ObjectStorageKey; /** * This keypair's access key. This is not secret. */ readonly accessKey: pulumi.Output<string>; /** * Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key. */ readonly bucketAccesses: pulumi.Output<outputs.ObjectStorageKeyBucketAccess[] | undefined>; /** * The label given to this key. For display purposes only. */ readonly label: pulumi.Output<string>; /** * Whether or not this key is a limited access key. */ readonly limited: pulumi.Output<boolean>; /** * A set of regions where the key will grant access to create buckets. * * - - - */ readonly regions: pulumi.Output<string[]>; /** * A set of objects containing the detailed info of the regions where this key can access. */ readonly regionsDetails: pulumi.Output<outputs.ObjectStorageKeyRegionsDetail[]>; /** * This keypair's secret key. */ readonly secretKey: pulumi.Output<string>; /** * Create a ObjectStorageKey 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: ObjectStorageKeyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ObjectStorageKey resources. */ export interface ObjectStorageKeyState { /** * This keypair's access key. This is not secret. */ accessKey?: pulumi.Input<string>; /** * Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key. */ bucketAccesses?: pulumi.Input<pulumi.Input<inputs.ObjectStorageKeyBucketAccess>[]>; /** * The label given to this key. For display purposes only. */ label?: pulumi.Input<string>; /** * Whether or not this key is a limited access key. */ limited?: pulumi.Input<boolean>; /** * A set of regions where the key will grant access to create buckets. * * - - - */ regions?: pulumi.Input<pulumi.Input<string>[]>; /** * A set of objects containing the detailed info of the regions where this key can access. */ regionsDetails?: pulumi.Input<pulumi.Input<inputs.ObjectStorageKeyRegionsDetail>[]>; /** * This keypair's secret key. */ secretKey?: pulumi.Input<string>; } /** * The set of arguments for constructing a ObjectStorageKey resource. */ export interface ObjectStorageKeyArgs { /** * Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key. */ bucketAccesses?: pulumi.Input<pulumi.Input<inputs.ObjectStorageKeyBucketAccess>[]>; /** * The label given to this key. For display purposes only. */ label: pulumi.Input<string>; /** * A set of regions where the key will grant access to create buckets. * * - - - */ regions?: pulumi.Input<pulumi.Input<string>[]>; }