1. Packages
  2. Scaleway
  3. API Docs
  4. object
  5. get
Scaleway v1.37.0 published on Friday, Nov 7, 2025 by pulumiverse

scaleway.object.get

Get Started
scaleway logo
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)
    }
    public static CompletableFuture<GetResult> get(GetArgs args, InvokeOptions options)
    public static Output<GetResult> get(GetArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scaleway:object/get:get
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Bucket string
    Key string
    The key (path or filename) of the object within the bucket.
    ProjectId string
    project_id) The ID of the project with which the bucket is associated.
    Region string
    region) The region in which the bucket exists.
    Bucket string
    Key string
    The key (path or filename) of the object within the bucket.
    ProjectId string
    project_id) The ID of the project with which the bucket is associated.
    Region string
    region) The region in which the bucket exists.
    bucket String
    key String
    The key (path or filename) of the object within the bucket.
    projectId String
    project_id) The ID of the project with which the bucket is associated.
    region String
    region) The region in which the bucket exists.
    bucket string
    key string
    The key (path or filename) of the object within the bucket.
    projectId string
    project_id) The ID of the project with which the bucket is associated.
    region string
    region) The region in which the bucket exists.
    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.
    bucket String
    key String
    The key (path or filename) of the object within the bucket.
    projectId String
    project_id) The ID of the project with which the bucket is associated.
    region String
    region) The region in which the bucket exists.

    get Result

    The following output properties are available:

    Bucket string
    Content string
    ContentBase64 string
    ContentType string
    File string
    Hash string
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Metadata Dictionary<string, string>
    SseCustomerKey string
    StorageClass string
    Tags Dictionary<string, string>
    Visibility string
    ProjectId string
    Region string
    Bucket string
    Content string
    ContentBase64 string
    ContentType string
    File string
    Hash string
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Metadata map[string]string
    SseCustomerKey string
    StorageClass string
    Tags map[string]string
    Visibility string
    ProjectId string
    Region string
    bucket String
    content String
    contentBase64 String
    contentType String
    file String
    hash String
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    metadata Map<String,String>
    sseCustomerKey String
    storageClass String
    tags Map<String,String>
    visibility String
    projectId String
    region String
    bucket string
    content string
    contentBase64 string
    contentType string
    file string
    hash string
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    metadata {[key: string]: string}
    sseCustomerKey string
    storageClass string
    tags {[key: string]: string}
    visibility string
    projectId 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_key str
    storage_class str
    tags Mapping[str, str]
    visibility str
    project_id str
    region str
    bucket String
    content String
    contentBase64 String
    contentType String
    file String
    hash String
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    metadata Map<String>
    sseCustomerKey String
    storageClass String
    tags Map<String>
    visibility String
    projectId String
    region String

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.37.0 published on Friday, Nov 7, 2025 by pulumiverse
      Meet Neo: Your AI Platform Teammate