@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
108 lines • 3.43 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBucketOutput = exports.getBucket = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* The `scaleway.object.Bucket` data source is used to retrieve information about an Object Storage bucket.
*
* Refer to the Object Storage [documentation](https://www.scaleway.com/en/docs/object-storage/how-to/create-a-bucket/) for more information.
*
* ## Retrieve an Object Storage bucket
*
* The following commands allow you to:
*
* - retrieve a bucket by its name
* - retrieve a bucket by its ID
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.object.Bucket("main", {
* name: "bucket.test.com",
* tags: {
* foo: "bar",
* },
* });
* const selected = scaleway.object.getBucketOutput({
* name: main.id,
* });
* ```
*
* ## Retrieve a bucket from a specific project
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
*
* const selected = scaleway.object.getBucket({
* name: "bucket.test.com",
* projectId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*/
function getBucket(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("scaleway:object/getBucket:getBucket", {
"name": args.name,
"projectId": args.projectId,
"region": args.region,
}, opts);
}
exports.getBucket = getBucket;
/**
* The `scaleway.object.Bucket` data source is used to retrieve information about an Object Storage bucket.
*
* Refer to the Object Storage [documentation](https://www.scaleway.com/en/docs/object-storage/how-to/create-a-bucket/) for more information.
*
* ## Retrieve an Object Storage bucket
*
* The following commands allow you to:
*
* - retrieve a bucket by its name
* - retrieve a bucket by its ID
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.object.Bucket("main", {
* name: "bucket.test.com",
* tags: {
* foo: "bar",
* },
* });
* const selected = scaleway.object.getBucketOutput({
* name: main.id,
* });
* ```
*
* ## Retrieve a bucket from a specific project
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
*
* const selected = scaleway.object.getBucket({
* name: "bucket.test.com",
* projectId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*/
function getBucketOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("scaleway:object/getBucket:getBucket", {
"name": args.name,
"projectId": args.projectId,
"region": args.region,
}, opts);
}
exports.getBucketOutput = getBucketOutput;
//# sourceMappingURL=getBucket.js.map