Scaleway v1.37.0 published on Friday, Nov 7, 2025 by pulumiverse
scaleway.object.get
Scaleway v1.37.0 published on Friday, Nov 7, 2025 by pulumiverse
The scaleway.object.Item data source is used to retrieve information about an Object Storage object.
Refer to the Object Storage documentation for more information.
Retrieve an Object Storage object
The following example demonstrates how to retrieve metadata about an object stored in a bucket:
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const main = new scaleway.object.Bucket("main", {name: "bucket.test.com"});
const example = new scaleway.object.Item("example", {
bucket: main.name,
key: "example.txt",
content: "Hello world!",
});
const selected = scaleway.object.getOutput({
bucket: example.bucket,
key: example.key,
});
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway
main = scaleway.object.Bucket("main", name="bucket.test.com")
example = scaleway.object.Item("example",
bucket=main.name,
key="example.txt",
content="Hello world!")
selected = scaleway.object.get_output(bucket=example.bucket,
key=example.key)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/object"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
main, err := object.NewBucket(ctx, "main", &object.BucketArgs{
Name: pulumi.String("bucket.test.com"),
})
if err != nil {
return err
}
example, err := object.NewItem(ctx, "example", &object.ItemArgs{
Bucket: main.Name,
Key: pulumi.String("example.txt"),
Content: pulumi.String("Hello world!"),
})
if err != nil {
return err
}
_ = object.GetOutput(ctx, object.GetOutputArgs{
Bucket: example.Bucket,
Key: example.Key,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = new Scaleway.Object.Bucket("main", new()
{
Name = "bucket.test.com",
});
var example = new Scaleway.Object.Item("example", new()
{
Bucket = main.Name,
Key = "example.txt",
Content = "Hello world!",
});
var selected = Scaleway.Object.Get.Invoke(new()
{
Bucket = example.Bucket,
Key = example.Key,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.object.Bucket;
import com.pulumi.scaleway.object.BucketArgs;
import com.pulumi.scaleway.object.Item;
import com.pulumi.scaleway.object.ItemArgs;
import com.pulumi.scaleway.object.ObjectFunctions;
import com.pulumi.scaleway.object.inputs.GetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var main = new Bucket("main", BucketArgs.builder()
.name("bucket.test.com")
.build());
var example = new Item("example", ItemArgs.builder()
.bucket(main.name())
.key("example.txt")
.content("Hello world!")
.build());
final var selected = ObjectFunctions.get(GetArgs.builder()
.bucket(example.bucket())
.key(example.key())
.build());
}
}
resources:
main:
type: scaleway:object:Bucket
properties:
name: bucket.test.com
example:
type: scaleway:object:Item
properties:
bucket: ${main.name}
key: example.txt
content: Hello world!
variables:
selected:
fn::invoke:
function: scaleway:object:get
arguments:
bucket: ${example.bucket}
key: ${example.key}
Using get
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function get(args: GetArgs, opts?: InvokeOptions): Promise<GetResult>
function getOutput(args: GetOutputArgs, opts?: InvokeOptions): Output<GetResult>def get(bucket: Optional[str] = None,
key: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetResult
def get_output(bucket: Optional[pulumi.Input[str]] = None,
key: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetResult]func Get(ctx *Context, args *GetArgs, opts ...InvokeOption) (*GetResult, error)
func GetOutput(ctx *Context, args *GetOutputArgs, opts ...InvokeOption) GetResultOutput> Note: This function is named Get in the Go SDK.
public static class Get
{
public static Task<GetResult> InvokeAsync(GetArgs args, InvokeOptions? opts = null)
public static Output<GetResult> Invoke(GetInvokeArgs args, InvokeOptions? opts = null)
}fn::invoke:
function: scaleway:object/get:get
arguments:
# arguments dictionaryThe following arguments are supported:
- bucket str
- key str
- The key (path or filename) of the object within the bucket.
- project_
id str project_id) The ID of the project with which the bucket is associated.- region str
region) The region in which the bucket exists.
get Result
The following output properties are available:
- Bucket string
- Content string
- Content
Base64 string - Content
Type string - File string
- Hash string
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Metadata Dictionary<string, string>
- Sse
Customer stringKey - Storage
Class string - Dictionary<string, string>
- Visibility string
- Project
Id string - Region string
- Bucket string
- Content string
- Content
Base64 string - Content
Type string - File string
- Hash string
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Metadata map[string]string
- Sse
Customer stringKey - Storage
Class string - map[string]string
- Visibility string
- Project
Id string - Region string
- bucket String
- content String
- content
Base64 String - content
Type String - file String
- hash String
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- metadata Map<String,String>
- sse
Customer StringKey - storage
Class String - Map<String,String>
- visibility String
- project
Id String - region String
- bucket string
- content string
- content
Base64 string - content
Type string - file string
- hash string
- id string
- The provider-assigned unique ID for this managed resource.
- key string
- metadata {[key: string]: string}
- sse
Customer stringKey - storage
Class string - {[key: string]: string}
- visibility string
- project
Id string - region string
- bucket str
- content str
- content_
base64 str - content_
type str - file str
- hash str
- id str
- The provider-assigned unique ID for this managed resource.
- key str
- metadata Mapping[str, str]
- sse_
customer_ strkey - storage_
class str - Mapping[str, str]
- visibility str
- project_
id str - region str
- bucket String
- content String
- content
Base64 String - content
Type String - file String
- hash String
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- metadata Map<String>
- sse
Customer StringKey - storage
Class String - Map<String>
- visibility String
- project
Id String - region String
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scalewayTerraform Provider.
Scaleway v1.37.0 published on Friday, Nov 7, 2025 by pulumiverse
