UNPKG

@pulumi/gcp

Version:

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

72 lines 2.77 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getBucketObjectContentOutput = exports.getBucketObjectContent = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * 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); * ``` */ function getBucketObjectContent(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:storage/getBucketObjectContent:getBucketObjectContent", { "bucket": args.bucket, "content": args.content, "name": args.name, }, opts); } exports.getBucketObjectContent = getBucketObjectContent; /** * 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); * ``` */ function getBucketObjectContentOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:storage/getBucketObjectContent:getBucketObjectContent", { "bucket": args.bucket, "content": args.content, "name": args.name, }, opts); } exports.getBucketObjectContentOutput = getBucketObjectContentOutput; //# sourceMappingURL=getBucketObjectContent.js.map