UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

151 lines (150 loc) 5.67 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Gets an existing object inside an existing bucket in Google Cloud Storage service (GCS). * See [the official documentation](https://cloud.google.com/storage/docs/key-terms#objects) * and * [API](https://cloud.google.com/storage/docs/json_api/v1/objects). * * ## Example Usage * * Example picture stored within a folder. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const picture = gcp.storage.getBucketObject({ * name: "folder/butterfly01.jpg", * bucket: "image-store", * }); * ``` */ export declare function getBucketObject(args?: GetBucketObjectArgs, opts?: pulumi.InvokeOptions): Promise<GetBucketObjectResult>; /** * A collection of arguments for invoking getBucketObject. */ export interface GetBucketObjectArgs { /** * The name of the containing bucket. */ bucket?: string; /** * The name of the object. */ name?: string; } /** * A collection of values returned by getBucketObject. */ export interface GetBucketObjectResult { readonly bucket?: string; /** * (Computed) [Cache-Control](https://tools.ietf.org/html/rfc7234#section-5.2) * directive to specify caching behavior of object data. If omitted and object is accessible to all anonymous users, the default will be public, max-age=3600 */ readonly cacheControl: string; readonly content: string; /** * (Computed) [Content-Disposition](https://tools.ietf.org/html/rfc6266) of the object data. */ readonly contentDisposition: string; /** * (Computed) [Content-Encoding](https://tools.ietf.org/html/rfc7231#section-3.1.2.2) of the object data. */ readonly contentEncoding: string; /** * (Computed) [Content-Language](https://tools.ietf.org/html/rfc7231#section-3.1.3.2) of the object data. */ readonly contentLanguage: string; /** * (Computed) [Content-Type](https://tools.ietf.org/html/rfc7231#section-3.1.1.5) of the object data. Defaults to "application/octet-stream" or "text/plain; charset=utf-8". */ readonly contentType: string; /** * (Computed) Base 64 CRC32 hash of the uploaded data. */ readonly crc32c: string; readonly customerEncryptions: outputs.storage.GetBucketObjectCustomerEncryption[]; readonly deletionPolicy: string; readonly detectMd5hash: string; /** * (Computed) Whether an object is under [event-based hold](https://cloud.google.com/storage/docs/object-holds#hold-types). Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). */ readonly eventBasedHold: boolean; readonly forceEmptyContentType: boolean; /** * (Computed) The content generation of this object. Used for object [versioning](https://cloud.google.com/storage/docs/object-versioning) and [soft delete](https://cloud.google.com/storage/docs/soft-delete). */ readonly generation: number; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly kmsKeyName: string; /** * (Computed) Base 64 MD5 hash of the uploaded data. */ readonly md5hash: string; readonly md5hexhash: string; /** * (Computed) A url reference to download this object. */ readonly mediaLink: string; readonly metadata: { [key: string]: string; }; readonly name?: string; readonly outputName: string; readonly retentions: outputs.storage.GetBucketObjectRetention[]; /** * (Computed) A url reference to this object. */ readonly selfLink: string; readonly source: string; readonly sourceMd5hash: string; /** * (Computed) The [StorageClass](https://cloud.google.com/storage/docs/storage-classes) of the new bucket object. * Supported values include: `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`, `ARCHIVE`. If not provided, this defaults to the bucket's default * storage class or to a [standard](https://cloud.google.com/storage/docs/storage-classes#standard) class. */ readonly storageClass: string; /** * (Computed) Whether an object is under [temporary hold](https://cloud.google.com/storage/docs/object-holds#hold-types). While this flag is set to true, the object is protected against deletion and overwrites. */ readonly temporaryHold: boolean; } /** * Gets an existing object inside an existing bucket in Google Cloud Storage service (GCS). * See [the official documentation](https://cloud.google.com/storage/docs/key-terms#objects) * and * [API](https://cloud.google.com/storage/docs/json_api/v1/objects). * * ## Example Usage * * Example picture stored within a folder. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const picture = gcp.storage.getBucketObject({ * name: "folder/butterfly01.jpg", * bucket: "image-store", * }); * ``` */ export declare function getBucketObjectOutput(args?: GetBucketObjectOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetBucketObjectResult>; /** * A collection of arguments for invoking getBucketObject. */ export interface GetBucketObjectOutputArgs { /** * The name of the containing bucket. */ bucket?: pulumi.Input<string>; /** * The name of the object. */ name?: pulumi.Input<string>; }