1. Packages
  2. Scaleway
  3. API Docs
  4. object
  5. Item
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.object.Item

Explore with Pulumi AI

The scaleway.object.Item resource allows you to create and manage objects for Scaleway Object storage.

Refer to the dedicated documentation for more information on Object Storage objects.

Create Item Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Item(name: string, args: ItemArgs, opts?: CustomResourceOptions);
@overload
def Item(resource_name: str,
         args: ItemArgs,
         opts: Optional[ResourceOptions] = None)

@overload
def Item(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         key: Optional[str] = None,
         bucket: Optional[str] = None,
         metadata: Optional[Mapping[str, str]] = None,
         file: Optional[str] = None,
         hash: Optional[str] = None,
         content_base64: Optional[str] = None,
         content: Optional[str] = None,
         project_id: Optional[str] = None,
         region: Optional[str] = None,
         sse_customer_key: Optional[str] = None,
         storage_class: Optional[str] = None,
         tags: Optional[Mapping[str, str]] = None,
         visibility: Optional[str] = None)
func NewItem(ctx *Context, name string, args ItemArgs, opts ...ResourceOption) (*Item, error)
public Item(string name, ItemArgs args, CustomResourceOptions? opts = null)
public Item(String name, ItemArgs args)
public Item(String name, ItemArgs args, CustomResourceOptions options)
type: scaleway:object:Item
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ItemArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ItemArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ItemArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ItemArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ItemArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var itemResource = new Scaleway.Object.Item("itemResource", new()
{
    Key = "string",
    Bucket = "string",
    Metadata = 
    {
        { "string", "string" },
    },
    File = "string",
    Hash = "string",
    ContentBase64 = "string",
    Content = "string",
    ProjectId = "string",
    Region = "string",
    SseCustomerKey = "string",
    StorageClass = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Visibility = "string",
});
Copy
example, err := object.NewItem(ctx, "itemResource", &object.ItemArgs{
	Key:    pulumi.String("string"),
	Bucket: pulumi.String("string"),
	Metadata: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	File:           pulumi.String("string"),
	Hash:           pulumi.String("string"),
	ContentBase64:  pulumi.String("string"),
	Content:        pulumi.String("string"),
	ProjectId:      pulumi.String("string"),
	Region:         pulumi.String("string"),
	SseCustomerKey: pulumi.String("string"),
	StorageClass:   pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Visibility: pulumi.String("string"),
})
Copy
var itemResource = new Item("itemResource", ItemArgs.builder()
    .key("string")
    .bucket("string")
    .metadata(Map.of("string", "string"))
    .file("string")
    .hash("string")
    .contentBase64("string")
    .content("string")
    .projectId("string")
    .region("string")
    .sseCustomerKey("string")
    .storageClass("string")
    .tags(Map.of("string", "string"))
    .visibility("string")
    .build());
Copy
item_resource = scaleway.object.Item("itemResource",
    key="string",
    bucket="string",
    metadata={
        "string": "string",
    },
    file="string",
    hash="string",
    content_base64="string",
    content="string",
    project_id="string",
    region="string",
    sse_customer_key="string",
    storage_class="string",
    tags={
        "string": "string",
    },
    visibility="string")
Copy
const itemResource = new scaleway.object.Item("itemResource", {
    key: "string",
    bucket: "string",
    metadata: {
        string: "string",
    },
    file: "string",
    hash: "string",
    contentBase64: "string",
    content: "string",
    projectId: "string",
    region: "string",
    sseCustomerKey: "string",
    storageClass: "string",
    tags: {
        string: "string",
    },
    visibility: "string",
});
Copy
type: scaleway:object:Item
properties:
    bucket: string
    content: string
    contentBase64: string
    file: string
    hash: string
    key: string
    metadata:
        string: string
    projectId: string
    region: string
    sseCustomerKey: string
    storageClass: string
    tags:
        string: string
    visibility: string
Copy

Item Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Item resource accepts the following input properties:

Bucket This property is required. string
The bucket's name or regional ID.
Key This property is required. string
The path to the object.
Content string
The content of the file to upload. Only one of file, content or content_base64 can be defined.
ContentBase64 string

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

File string
The name of the file to upload, defaults to an empty file.
Hash string
Hash of the file, used to trigger the upload on file change.
Metadata Dictionary<string, string>
Map of metadata used for the object (keys must be lowercase).
ProjectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
Region Changes to this property will trigger replacement. string
The Scaleway region the bucket resides in.
SseCustomerKey string
Customer's encryption keys to encrypt data (SSE-C)
StorageClass string
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
Tags Dictionary<string, string>
Map of tags.
Visibility string
Visibility of the object, public-read or private.
Bucket This property is required. string
The bucket's name or regional ID.
Key This property is required. string
The path to the object.
Content string
The content of the file to upload. Only one of file, content or content_base64 can be defined.
ContentBase64 string

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

File string
The name of the file to upload, defaults to an empty file.
Hash string
Hash of the file, used to trigger the upload on file change.
Metadata map[string]string
Map of metadata used for the object (keys must be lowercase).
ProjectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
Region Changes to this property will trigger replacement. string
The Scaleway region the bucket resides in.
SseCustomerKey string
Customer's encryption keys to encrypt data (SSE-C)
StorageClass string
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
Tags map[string]string
Map of tags.
Visibility string
Visibility of the object, public-read or private.
bucket This property is required. String
The bucket's name or regional ID.
key This property is required. String
The path to the object.
content String
The content of the file to upload. Only one of file, content or content_base64 can be defined.
contentBase64 String

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

file String
The name of the file to upload, defaults to an empty file.
hash String
Hash of the file, used to trigger the upload on file change.
metadata Map<String,String>
Map of metadata used for the object (keys must be lowercase).
projectId Changes to this property will trigger replacement. String
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. String
The Scaleway region the bucket resides in.
sseCustomerKey String
Customer's encryption keys to encrypt data (SSE-C)
storageClass String
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
tags Map<String,String>
Map of tags.
visibility String
Visibility of the object, public-read or private.
bucket This property is required. string
The bucket's name or regional ID.
key This property is required. string
The path to the object.
content string
The content of the file to upload. Only one of file, content or content_base64 can be defined.
contentBase64 string

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

file string
The name of the file to upload, defaults to an empty file.
hash string
Hash of the file, used to trigger the upload on file change.
metadata {[key: string]: string}
Map of metadata used for the object (keys must be lowercase).
projectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. string
The Scaleway region the bucket resides in.
sseCustomerKey string
Customer's encryption keys to encrypt data (SSE-C)
storageClass string
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
tags {[key: string]: string}
Map of tags.
visibility string
Visibility of the object, public-read or private.
bucket This property is required. str
The bucket's name or regional ID.
key This property is required. str
The path to the object.
content str
The content of the file to upload. Only one of file, content or content_base64 can be defined.
content_base64 str

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

file str
The name of the file to upload, defaults to an empty file.
hash str
Hash of the file, used to trigger the upload on file change.
metadata Mapping[str, str]
Map of metadata used for the object (keys must be lowercase).
project_id Changes to this property will trigger replacement. str
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. str
The Scaleway region the bucket resides in.
sse_customer_key str
Customer's encryption keys to encrypt data (SSE-C)
storage_class str
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
tags Mapping[str, str]
Map of tags.
visibility str
Visibility of the object, public-read or private.
bucket This property is required. String
The bucket's name or regional ID.
key This property is required. String
The path to the object.
content String
The content of the file to upload. Only one of file, content or content_base64 can be defined.
contentBase64 String

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

file String
The name of the file to upload, defaults to an empty file.
hash String
Hash of the file, used to trigger the upload on file change.
metadata Map<String>
Map of metadata used for the object (keys must be lowercase).
projectId Changes to this property will trigger replacement. String
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. String
The Scaleway region the bucket resides in.
sseCustomerKey String
Customer's encryption keys to encrypt data (SSE-C)
storageClass String
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
tags Map<String>
Map of tags.
visibility String
Visibility of the object, public-read or private.

Outputs

All input properties are implicitly available as output properties. Additionally, the Item resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Item Resource

Get an existing Item resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ItemState, opts?: CustomResourceOptions): Item
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bucket: Optional[str] = None,
        content: Optional[str] = None,
        content_base64: Optional[str] = None,
        file: Optional[str] = None,
        hash: Optional[str] = None,
        key: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        project_id: Optional[str] = None,
        region: Optional[str] = None,
        sse_customer_key: Optional[str] = None,
        storage_class: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        visibility: Optional[str] = None) -> Item
func GetItem(ctx *Context, name string, id IDInput, state *ItemState, opts ...ResourceOption) (*Item, error)
public static Item Get(string name, Input<string> id, ItemState? state, CustomResourceOptions? opts = null)
public static Item get(String name, Output<String> id, ItemState state, CustomResourceOptions options)
resources:  _:    type: scaleway:object:Item    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Bucket string
The bucket's name or regional ID.
Content string
The content of the file to upload. Only one of file, content or content_base64 can be defined.
ContentBase64 string

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

File string
The name of the file to upload, defaults to an empty file.
Hash string
Hash of the file, used to trigger the upload on file change.
Key string
The path to the object.
Metadata Dictionary<string, string>
Map of metadata used for the object (keys must be lowercase).
ProjectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
Region Changes to this property will trigger replacement. string
The Scaleway region the bucket resides in.
SseCustomerKey string
Customer's encryption keys to encrypt data (SSE-C)
StorageClass string
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
Tags Dictionary<string, string>
Map of tags.
Visibility string
Visibility of the object, public-read or private.
Bucket string
The bucket's name or regional ID.
Content string
The content of the file to upload. Only one of file, content or content_base64 can be defined.
ContentBase64 string

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

File string
The name of the file to upload, defaults to an empty file.
Hash string
Hash of the file, used to trigger the upload on file change.
Key string
The path to the object.
Metadata map[string]string
Map of metadata used for the object (keys must be lowercase).
ProjectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
Region Changes to this property will trigger replacement. string
The Scaleway region the bucket resides in.
SseCustomerKey string
Customer's encryption keys to encrypt data (SSE-C)
StorageClass string
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
Tags map[string]string
Map of tags.
Visibility string
Visibility of the object, public-read or private.
bucket String
The bucket's name or regional ID.
content String
The content of the file to upload. Only one of file, content or content_base64 can be defined.
contentBase64 String

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

file String
The name of the file to upload, defaults to an empty file.
hash String
Hash of the file, used to trigger the upload on file change.
key String
The path to the object.
metadata Map<String,String>
Map of metadata used for the object (keys must be lowercase).
projectId Changes to this property will trigger replacement. String
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. String
The Scaleway region the bucket resides in.
sseCustomerKey String
Customer's encryption keys to encrypt data (SSE-C)
storageClass String
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
tags Map<String,String>
Map of tags.
visibility String
Visibility of the object, public-read or private.
bucket string
The bucket's name or regional ID.
content string
The content of the file to upload. Only one of file, content or content_base64 can be defined.
contentBase64 string

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

file string
The name of the file to upload, defaults to an empty file.
hash string
Hash of the file, used to trigger the upload on file change.
key string
The path to the object.
metadata {[key: string]: string}
Map of metadata used for the object (keys must be lowercase).
projectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. string
The Scaleway region the bucket resides in.
sseCustomerKey string
Customer's encryption keys to encrypt data (SSE-C)
storageClass string
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
tags {[key: string]: string}
Map of tags.
visibility string
Visibility of the object, public-read or private.
bucket str
The bucket's name or regional ID.
content str
The content of the file to upload. Only one of file, content or content_base64 can be defined.
content_base64 str

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

file str
The name of the file to upload, defaults to an empty file.
hash str
Hash of the file, used to trigger the upload on file change.
key str
The path to the object.
metadata Mapping[str, str]
Map of metadata used for the object (keys must be lowercase).
project_id Changes to this property will trigger replacement. str
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. str
The Scaleway region the bucket resides in.
sse_customer_key str
Customer's encryption keys to encrypt data (SSE-C)
storage_class str
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
tags Mapping[str, str]
Map of tags.
visibility str
Visibility of the object, public-read or private.
bucket String
The bucket's name or regional ID.
content String
The content of the file to upload. Only one of file, content or content_base64 can be defined.
contentBase64 String

The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.

Note: Only one of file, content or content_base64 can be defined.

file String
The name of the file to upload, defaults to an empty file.
hash String
Hash of the file, used to trigger the upload on file change.
key String
The path to the object.
metadata Map<String>
Map of metadata used for the object (keys must be lowercase).
projectId Changes to this property will trigger replacement. String
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. String
The Scaleway region the bucket resides in.
sseCustomerKey String
Customer's encryption keys to encrypt data (SSE-C)
storageClass String
Specifies the Scaleway storage class (STANDARD, GLACIER, or ONEZONE_IA) used to store the object.
tags Map<String>
Map of tags.
visibility String
Visibility of the object, public-read or private.

Import

Objects can be imported using the {region}/{bucketName}/{objectKey} identifier, as shown below:

bash

$ pulumi import scaleway:object/item:Item some_object fr-par/some-bucket/some-file
Copy

~> Important: The project_id attribute has a particular behavior with s3 products because the s3 API is scoped by project.

If you are using a project different from the default one, you have to specify the project ID at the end of the import command.

bash

$ pulumi import scaleway:object/item:Item some_object fr-par/some-bucket/some-file@xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.