@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
139 lines (138 loc) • 4.43 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Gets an existing object content 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).
*
* > **Warning:** The object content will be saved in the state, and visible to everyone who has access to the state file.
*
* ## Example Usage
*
* Example file object stored within a folder.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const key = gcp.storage.getBucketObjectContent({
* name: "encryptedkey",
* bucket: "keystore",
* });
* export const encrypted = key.then(key => key.content);
* ```
*/
export declare function getBucketObjectContent(args: GetBucketObjectContentArgs, opts?: pulumi.InvokeOptions): Promise<GetBucketObjectContentResult>;
/**
* A collection of arguments for invoking getBucketObjectContent.
*/
export interface GetBucketObjectContentArgs {
/**
* The name of the containing bucket.
*/
bucket: string;
/**
* (Computed) The content of the object.
*/
content?: string;
/**
* The name of the object.
*/
name: string;
}
/**
* A collection of values returned by getBucketObjectContent.
*/
export interface GetBucketObjectContentResult {
readonly bucket: string;
readonly cacheControl: string;
/**
* (Computed) The content of the object.
*/
readonly content: string;
/**
* (Computed) Base64 encoded version of the object content.
* Use this when dealing with binary data.
*/
readonly contentBase64: string;
/**
* (Computed) Base64 encoded SHA512 checksum of file content.
*/
readonly contentBase64sha512: string;
readonly contentDisposition: string;
readonly contentEncoding: string;
/**
* (Computed) Hex encoded SHA512 checksum of file content.
*/
readonly contentHexsha512: string;
readonly contentLanguage: string;
readonly contentType: string;
readonly crc32c: string;
readonly customerEncryptions: outputs.storage.GetBucketObjectContentCustomerEncryption[];
readonly deletionPolicy: string;
readonly detectMd5hash: string;
readonly eventBasedHold: boolean;
readonly forceEmptyContentType: boolean;
readonly generation: number;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly kmsKeyName: string;
readonly md5hash: string;
readonly md5hexhash: string;
readonly mediaLink: string;
readonly metadata: {
[key: string]: string;
};
readonly name: string;
readonly outputName: string;
readonly retentions: outputs.storage.GetBucketObjectContentRetention[];
readonly selfLink: string;
readonly source: string;
readonly sourceMd5hash: string;
readonly storageClass: string;
readonly temporaryHold: boolean;
}
/**
* Gets an existing object content 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).
*
* > **Warning:** The object content will be saved in the state, and visible to everyone who has access to the state file.
*
* ## Example Usage
*
* Example file object stored within a folder.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const key = gcp.storage.getBucketObjectContent({
* name: "encryptedkey",
* bucket: "keystore",
* });
* export const encrypted = key.then(key => key.content);
* ```
*/
export declare function getBucketObjectContentOutput(args: GetBucketObjectContentOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetBucketObjectContentResult>;
/**
* A collection of arguments for invoking getBucketObjectContent.
*/
export interface GetBucketObjectContentOutputArgs {
/**
* The name of the containing bucket.
*/
bucket: pulumi.Input<string>;
/**
* (Computed) The content of the object.
*/
content?: pulumi.Input<string>;
/**
* The name of the object.
*/
name: pulumi.Input<string>;
}