published on Wednesday, Apr 15, 2026 by ionos-cloud
published on Wednesday, Apr 15, 2026 by ionos-cloud
The Object data source can be used to search for and return existing objects. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.
⚠️ Note: The Terraform provider only supports contract-owned buckets. User-owned buckets are not supported, and there are no plans to introduce support for them. As a result, user-owned buckets cannot be created, updated, deleted, read, or imported using this provider.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = ionoscloud.objectstorage.getObject({
bucket: "example",
key: "object",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.objectstorage.get_object(bucket="example",
key="object")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/objectstorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := objectstorage.GetObject(ctx, &objectstorage.GetObjectArgs{
Bucket: "example",
Key: "object",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Objectstorage.GetObject.Invoke(new()
{
Bucket = "example",
Key = "object",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.objectstorage.ObjectstorageFunctions;
import com.pulumi.ionoscloud.objectstorage.inputs.GetObjectArgs;
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) {
final var example = ObjectstorageFunctions.getObject(GetObjectArgs.builder()
.bucket("example")
.key("object")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:objectstorage:getObject
arguments:
bucket: example
key: object
Example coming soon!
Using getObject
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 getObject(args: GetObjectArgs, opts?: InvokeOptions): Promise<GetObjectResult>
function getObjectOutput(args: GetObjectOutputArgs, opts?: InvokeOptions): Output<GetObjectResult>def get_object(bucket: Optional[str] = None,
key: Optional[str] = None,
range: Optional[str] = None,
version_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetObjectResult
def get_object_output(bucket: pulumi.Input[Optional[str]] = None,
key: pulumi.Input[Optional[str]] = None,
range: pulumi.Input[Optional[str]] = None,
version_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetObjectResult]func GetObject(ctx *Context, args *GetObjectArgs, opts ...InvokeOption) (*GetObjectResult, error)
func GetObjectOutput(ctx *Context, args *GetObjectOutputArgs, opts ...InvokeOption) GetObjectResultOutput> Note: This function is named GetObject in the Go SDK.
public static class GetObject
{
public static Task<GetObjectResult> InvokeAsync(GetObjectArgs args, InvokeOptions? opts = null)
public static Output<GetObjectResult> Invoke(GetObjectInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetObjectResult> getObject(GetObjectArgs args, InvokeOptions options)
public static Output<GetObjectResult> getObject(GetObjectArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:objectstorage/getObject:getObject
arguments:
# arguments dictionarydata "ionoscloud_objectstorage_getobject" "name" {
# arguments
}The following arguments are supported:
- bucket string
- [string] The name of the bucket where the object is stored.
- key string
- [string] The name of the object.
- range string
- [string] Downloads the specified range bytes of an object. For more information about the HTTP Range header
- version_
id string - [string] The version of the object.
- bucket str
- [string] The name of the bucket where the object is stored.
- key str
- [string] The name of the object.
- range str
- [string] Downloads the specified range bytes of an object. For more information about the HTTP Range header
- version_
id str - [string] The version of the object.
getObject Result
The following output properties are available:
- Body string
- The content of the object.
- Bucket string
- Cache
Control string - The caching behavior along the request/reply chain.
- Content
Disposition string - Presentational information for the object.
- Content
Encoding string - The content encodings applied to the object.
- Content
Language string - The natural language of the intended audience for the object.
- Content
Length int - The size of the object in bytes.
- Content
Type string - The MIME type describing the format of the contents.
- Etag string
- An entity tag (ETag) assigned by a web server to a specific version of a resource.
- Expires string
- The date and time at which the object is no longer cacheable.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Metadata Dictionary<string, string>
- A map of metadata stored with the object.
- Object
Lock stringLegal Hold - The legal hold status of the object, which can be either ON or OFF.
- Object
Lock stringMode - The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
- Object
Lock stringRetain Until Date - The date until which the object will remain locked.
- Request
Payer string - Confirms that the requester knows that they will be charged for the request.
- Server
Side stringEncryption - The server-side encryption algorithm used when storing this object.
- Server
Side stringEncryption Context - The encryption context to use for object encryption. This attribute is sensitive.
- Server
Side stringEncryption Customer Algorithm - The algorithm to use for encrypting the object (e.g., AES256).
- Server
Side stringEncryption Customer Key - The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
- Server
Side stringEncryption Customer Key Md5 - The 128-bit MD5 digest of the encryption key.
- Storage
Class string - The storage class of the object.
- Dictionary<string, string>
- The tag-set for the object, represented as a map of string key-value pairs.
- Version
Id string - The version of the object. This attribute is optional.
- Website
Redirect string - If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL.
- Range string
- Body string
- The content of the object.
- Bucket string
- Cache
Control string - The caching behavior along the request/reply chain.
- Content
Disposition string - Presentational information for the object.
- Content
Encoding string - The content encodings applied to the object.
- Content
Language string - The natural language of the intended audience for the object.
- Content
Length int - The size of the object in bytes.
- Content
Type string - The MIME type describing the format of the contents.
- Etag string
- An entity tag (ETag) assigned by a web server to a specific version of a resource.
- Expires string
- The date and time at which the object is no longer cacheable.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Metadata map[string]string
- A map of metadata stored with the object.
- Object
Lock stringLegal Hold - The legal hold status of the object, which can be either ON or OFF.
- Object
Lock stringMode - The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
- Object
Lock stringRetain Until Date - The date until which the object will remain locked.
- Request
Payer string - Confirms that the requester knows that they will be charged for the request.
- Server
Side stringEncryption - The server-side encryption algorithm used when storing this object.
- Server
Side stringEncryption Context - The encryption context to use for object encryption. This attribute is sensitive.
- Server
Side stringEncryption Customer Algorithm - The algorithm to use for encrypting the object (e.g., AES256).
- Server
Side stringEncryption Customer Key - The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
- Server
Side stringEncryption Customer Key Md5 - The 128-bit MD5 digest of the encryption key.
- Storage
Class string - The storage class of the object.
- map[string]string
- The tag-set for the object, represented as a map of string key-value pairs.
- Version
Id string - The version of the object. This attribute is optional.
- Website
Redirect string - If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL.
- Range string
- body string
- The content of the object.
- bucket string
- cache_
control string - The caching behavior along the request/reply chain.
- content_
disposition string - Presentational information for the object.
- content_
encoding string - The content encodings applied to the object.
- content_
language string - The natural language of the intended audience for the object.
- content_
length number - The size of the object in bytes.
- content_
type string - The MIME type describing the format of the contents.
- etag string
- An entity tag (ETag) assigned by a web server to a specific version of a resource.
- expires string
- The date and time at which the object is no longer cacheable.
- id string
- The provider-assigned unique ID for this managed resource.
- key string
- metadata map(string)
- A map of metadata stored with the object.
- object_
lock_ stringlegal_ hold - The legal hold status of the object, which can be either ON or OFF.
- object_
lock_ stringmode - The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
- object_
lock_ stringretain_ until_ date - The date until which the object will remain locked.
- request_
payer string - Confirms that the requester knows that they will be charged for the request.
- server_
side_ stringencryption - The server-side encryption algorithm used when storing this object.
- server_
side_ stringencryption_ context - The encryption context to use for object encryption. This attribute is sensitive.
- server_
side_ stringencryption_ customer_ algorithm - The algorithm to use for encrypting the object (e.g., AES256).
- server_
side_ stringencryption_ customer_ key - The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
- server_
side_ stringencryption_ customer_ key_ md5 - The 128-bit MD5 digest of the encryption key.
- storage_
class string - The storage class of the object.
- map(string)
- The tag-set for the object, represented as a map of string key-value pairs.
- version_
id string - The version of the object. This attribute is optional.
- website_
redirect string - If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL.
- range string
- body String
- The content of the object.
- bucket String
- cache
Control String - The caching behavior along the request/reply chain.
- content
Disposition String - Presentational information for the object.
- content
Encoding String - The content encodings applied to the object.
- content
Language String - The natural language of the intended audience for the object.
- content
Length Integer - The size of the object in bytes.
- content
Type String - The MIME type describing the format of the contents.
- etag String
- An entity tag (ETag) assigned by a web server to a specific version of a resource.
- expires String
- The date and time at which the object is no longer cacheable.
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- metadata Map<String,String>
- A map of metadata stored with the object.
- object
Lock StringLegal Hold - The legal hold status of the object, which can be either ON or OFF.
- object
Lock StringMode - The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
- object
Lock StringRetain Until Date - The date until which the object will remain locked.
- request
Payer String - Confirms that the requester knows that they will be charged for the request.
- server
Side StringEncryption - The server-side encryption algorithm used when storing this object.
- server
Side StringEncryption Context - The encryption context to use for object encryption. This attribute is sensitive.
- server
Side StringEncryption Customer Algorithm - The algorithm to use for encrypting the object (e.g., AES256).
- server
Side StringEncryption Customer Key - The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
- server
Side StringEncryption Customer Key Md5 - The 128-bit MD5 digest of the encryption key.
- storage
Class String - The storage class of the object.
- Map<String,String>
- The tag-set for the object, represented as a map of string key-value pairs.
- version
Id String - The version of the object. This attribute is optional.
- website
Redirect String - If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL.
- range String
- body string
- The content of the object.
- bucket string
- cache
Control string - The caching behavior along the request/reply chain.
- content
Disposition string - Presentational information for the object.
- content
Encoding string - The content encodings applied to the object.
- content
Language string - The natural language of the intended audience for the object.
- content
Length number - The size of the object in bytes.
- content
Type string - The MIME type describing the format of the contents.
- etag string
- An entity tag (ETag) assigned by a web server to a specific version of a resource.
- expires string
- The date and time at which the object is no longer cacheable.
- id string
- The provider-assigned unique ID for this managed resource.
- key string
- metadata {[key: string]: string}
- A map of metadata stored with the object.
- object
Lock stringLegal Hold - The legal hold status of the object, which can be either ON or OFF.
- object
Lock stringMode - The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
- object
Lock stringRetain Until Date - The date until which the object will remain locked.
- request
Payer string - Confirms that the requester knows that they will be charged for the request.
- server
Side stringEncryption - The server-side encryption algorithm used when storing this object.
- server
Side stringEncryption Context - The encryption context to use for object encryption. This attribute is sensitive.
- server
Side stringEncryption Customer Algorithm - The algorithm to use for encrypting the object (e.g., AES256).
- server
Side stringEncryption Customer Key - The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
- server
Side stringEncryption Customer Key Md5 - The 128-bit MD5 digest of the encryption key.
- storage
Class string - The storage class of the object.
- {[key: string]: string}
- The tag-set for the object, represented as a map of string key-value pairs.
- version
Id string - The version of the object. This attribute is optional.
- website
Redirect string - If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL.
- range string
- body str
- The content of the object.
- bucket str
- cache_
control str - The caching behavior along the request/reply chain.
- content_
disposition str - Presentational information for the object.
- content_
encoding str - The content encodings applied to the object.
- content_
language str - The natural language of the intended audience for the object.
- content_
length int - The size of the object in bytes.
- content_
type str - The MIME type describing the format of the contents.
- etag str
- An entity tag (ETag) assigned by a web server to a specific version of a resource.
- expires str
- The date and time at which the object is no longer cacheable.
- id str
- The provider-assigned unique ID for this managed resource.
- key str
- metadata Mapping[str, str]
- A map of metadata stored with the object.
- object_
lock_ strlegal_ hold - The legal hold status of the object, which can be either ON or OFF.
- object_
lock_ strmode - The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
- object_
lock_ strretain_ until_ date - The date until which the object will remain locked.
- request_
payer str - Confirms that the requester knows that they will be charged for the request.
- server_
side_ strencryption - The server-side encryption algorithm used when storing this object.
- server_
side_ strencryption_ context - The encryption context to use for object encryption. This attribute is sensitive.
- server_
side_ strencryption_ customer_ algorithm - The algorithm to use for encrypting the object (e.g., AES256).
- server_
side_ strencryption_ customer_ key - The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
- server_
side_ strencryption_ customer_ key_ md5 - The 128-bit MD5 digest of the encryption key.
- storage_
class str - The storage class of the object.
- Mapping[str, str]
- The tag-set for the object, represented as a map of string key-value pairs.
- version_
id str - The version of the object. This attribute is optional.
- website_
redirect str - If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL.
- range str
- body String
- The content of the object.
- bucket String
- cache
Control String - The caching behavior along the request/reply chain.
- content
Disposition String - Presentational information for the object.
- content
Encoding String - The content encodings applied to the object.
- content
Language String - The natural language of the intended audience for the object.
- content
Length Number - The size of the object in bytes.
- content
Type String - The MIME type describing the format of the contents.
- etag String
- An entity tag (ETag) assigned by a web server to a specific version of a resource.
- expires String
- The date and time at which the object is no longer cacheable.
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- metadata Map<String>
- A map of metadata stored with the object.
- object
Lock StringLegal Hold - The legal hold status of the object, which can be either ON or OFF.
- object
Lock StringMode - The object lock mode, which can be either GOVERNANCE or COMPLIANCE.
- object
Lock StringRetain Until Date - The date until which the object will remain locked.
- request
Payer String - Confirms that the requester knows that they will be charged for the request.
- server
Side StringEncryption - The server-side encryption algorithm used when storing this object.
- server
Side StringEncryption Context - The encryption context to use for object encryption. This attribute is sensitive.
- server
Side StringEncryption Customer Algorithm - The algorithm to use for encrypting the object (e.g., AES256).
- server
Side StringEncryption Customer Key - The 256-bit, base64-encoded encryption key to encrypt and decrypt your data. This attribute is sensitive.
- server
Side StringEncryption Customer Key Md5 - The 128-bit MD5 digest of the encryption key.
- storage
Class String - The storage class of the object.
- Map<String>
- The tag-set for the object, represented as a map of string key-value pairs.
- version
Id String - The version of the object. This attribute is optional.
- website
Redirect String - If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL.
- range String
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloudTerraform Provider.
published on Wednesday, Apr 15, 2026 by ionos-cloud
