UNPKG

@pulumi/gcp

Version:

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

116 lines 4.24 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.getObjectSignedUrlOutput = exports.getObjectSignedUrl = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * The Google Cloud storage signed URL data source generates a signed URL for a given storage object. Signed URLs provide a way to give time-limited read or write access to anyone in possession of the URL, regardless of whether they have a Google account. * * For more info about signed URL's is available [here](https://cloud.google.com/storage/docs/access-control/signed-urls). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const artifact = gcp.storage.getObjectSignedUrl({ * bucket: "install_binaries", * path: "path/to/install_file.bin", * }); * const vm = new gcp.compute.Instance("vm", {name: "vm"}); * ``` * * ## Full Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * * const getUrl = std.file({ * input: "path/to/credentials.json", * }).then(invoke => gcp.storage.getObjectSignedUrl({ * bucket: "fried_chicken", * path: "path/to/file", * contentMd5: "pRviqwS4c4OTJRTe03FD1w==", * contentType: "text/plain", * duration: "2d", * credentials: invoke.result, * extensionHeaders: { * "x-goog-if-generation-match": "1", * }, * })); * ``` */ function getObjectSignedUrl(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("gcp:storage/getObjectSignedUrl:getObjectSignedUrl", { "bucket": args.bucket, "contentMd5": args.contentMd5, "contentType": args.contentType, "credentials": args.credentials, "duration": args.duration, "extensionHeaders": args.extensionHeaders, "httpMethod": args.httpMethod, "path": args.path, }, opts); } exports.getObjectSignedUrl = getObjectSignedUrl; /** * The Google Cloud storage signed URL data source generates a signed URL for a given storage object. Signed URLs provide a way to give time-limited read or write access to anyone in possession of the URL, regardless of whether they have a Google account. * * For more info about signed URL's is available [here](https://cloud.google.com/storage/docs/access-control/signed-urls). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const artifact = gcp.storage.getObjectSignedUrl({ * bucket: "install_binaries", * path: "path/to/install_file.bin", * }); * const vm = new gcp.compute.Instance("vm", {name: "vm"}); * ``` * * ## Full Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * * const getUrl = std.file({ * input: "path/to/credentials.json", * }).then(invoke => gcp.storage.getObjectSignedUrl({ * bucket: "fried_chicken", * path: "path/to/file", * contentMd5: "pRviqwS4c4OTJRTe03FD1w==", * contentType: "text/plain", * duration: "2d", * credentials: invoke.result, * extensionHeaders: { * "x-goog-if-generation-match": "1", * }, * })); * ``` */ function getObjectSignedUrlOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("gcp:storage/getObjectSignedUrl:getObjectSignedUrl", { "bucket": args.bucket, "contentMd5": args.contentMd5, "contentType": args.contentType, "credentials": args.credentials, "duration": args.duration, "extensionHeaders": args.extensionHeaders, "httpMethod": args.httpMethod, "path": args.path, }, opts); } exports.getObjectSignedUrlOutput = getObjectSignedUrlOutput; //# sourceMappingURL=getObjectSignedUrl.js.map