published on Thursday, Mar 12, 2026 by opentelekomcloud
published on Thursday, Mar 12, 2026 by opentelekomcloud
Use this data source to get details about the metadata and optionally (see below) content of an object stored inside S3 bucket.
Note: The content of an object (
bodyfield) is available only for objects which have a human-readableContent-Type(text/*andapplication/json). This is to prevent printing unsafe characters and potentially downloading large amount of data which would be thrown away in favour of metadata.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const b = opentelekomcloud.getS3BucketObject({
bucket: "my-test-bucket",
key: "hello-world.zip",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
b = opentelekomcloud.get_s3_bucket_object(bucket="my-test-bucket",
key="hello-world.zip")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opentelekomcloud.LookupS3BucketObject(ctx, &opentelekomcloud.LookupS3BucketObjectArgs{
Bucket: "my-test-bucket",
Key: "hello-world.zip",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var b = Opentelekomcloud.GetS3BucketObject.Invoke(new()
{
Bucket = "my-test-bucket",
Key = "hello-world.zip",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetS3BucketObjectArgs;
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 b = OpentelekomcloudFunctions.getS3BucketObject(GetS3BucketObjectArgs.builder()
.bucket("my-test-bucket")
.key("hello-world.zip")
.build());
}
}
variables:
b:
fn::invoke:
function: opentelekomcloud:getS3BucketObject
arguments:
bucket: my-test-bucket
key: hello-world.zip
Using getS3BucketObject
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 getS3BucketObject(args: GetS3BucketObjectArgs, opts?: InvokeOptions): Promise<GetS3BucketObjectResult>
function getS3BucketObjectOutput(args: GetS3BucketObjectOutputArgs, opts?: InvokeOptions): Output<GetS3BucketObjectResult>def get_s3_bucket_object(bucket: Optional[str] = None,
id: Optional[str] = None,
key: Optional[str] = None,
range: Optional[str] = None,
version_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetS3BucketObjectResult
def get_s3_bucket_object_output(bucket: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
key: Optional[pulumi.Input[str]] = None,
range: Optional[pulumi.Input[str]] = None,
version_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetS3BucketObjectResult]func LookupS3BucketObject(ctx *Context, args *LookupS3BucketObjectArgs, opts ...InvokeOption) (*LookupS3BucketObjectResult, error)
func LookupS3BucketObjectOutput(ctx *Context, args *LookupS3BucketObjectOutputArgs, opts ...InvokeOption) LookupS3BucketObjectResultOutput> Note: This function is named LookupS3BucketObject in the Go SDK.
public static class GetS3BucketObject
{
public static Task<GetS3BucketObjectResult> InvokeAsync(GetS3BucketObjectArgs args, InvokeOptions? opts = null)
public static Output<GetS3BucketObjectResult> Invoke(GetS3BucketObjectInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetS3BucketObjectResult> getS3BucketObject(GetS3BucketObjectArgs args, InvokeOptions options)
public static Output<GetS3BucketObjectResult> getS3BucketObject(GetS3BucketObjectArgs args, InvokeOptions options)
fn::invoke:
function: opentelekomcloud:index/getS3BucketObject:getS3BucketObject
arguments:
# arguments dictionaryThe following arguments are supported:
- bucket str
- The name of the bucket to read the object from.
- key str
- The full path to the object inside the bucket.
- id str
- range str
- version_
id str - Specific version ID of the object returned (defaults to latest version).
getS3BucketObject Result
The following output properties are available:
- Body string
- Object data (see limitations above to understand cases in which this field is actually available)
- Bucket string
- Cache
Control string - Specifies caching behavior along the request/reply chain.
- Content
Disposition string - Specifies presentational information for the object.
- Content
Encoding string - Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
- Content
Language string - The language the content is in.
- Content
Length double - Size of the body in bytes.
- Content
Type string - A standard MIME type describing the format of the object data.
- Etag string
- ETag generated for the object (an MD5 sum of the object content in case it's not encrypted).
- Expiration string
- If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
- Expires string
- The date and time at which the object is no longer cacheable.
- Id string
- Key string
- Last
Modified string - Last modified date of the object in RFC1123 format
(e.g.
Mon, 02 Jan 2006 15:04:05 MST) - Metadata Dictionary<string, string>
- A map of metadata stored with the object in S3
- Server
Side stringEncryption - If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
- Sse
Kms stringKey Id - If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
- Version
Id string - The latest version ID of the object returned.
- Website
Redirect stringLocation - 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. Amazon S3 stores the value of this header in the object metadata.
- Range string
- Body string
- Object data (see limitations above to understand cases in which this field is actually available)
- Bucket string
- Cache
Control string - Specifies caching behavior along the request/reply chain.
- Content
Disposition string - Specifies presentational information for the object.
- Content
Encoding string - Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
- Content
Language string - The language the content is in.
- Content
Length float64 - Size of the body in bytes.
- Content
Type string - A standard MIME type describing the format of the object data.
- Etag string
- ETag generated for the object (an MD5 sum of the object content in case it's not encrypted).
- Expiration string
- If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
- Expires string
- The date and time at which the object is no longer cacheable.
- Id string
- Key string
- Last
Modified string - Last modified date of the object in RFC1123 format
(e.g.
Mon, 02 Jan 2006 15:04:05 MST) - Metadata map[string]string
- A map of metadata stored with the object in S3
- Server
Side stringEncryption - If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
- Sse
Kms stringKey Id - If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
- Version
Id string - The latest version ID of the object returned.
- Website
Redirect stringLocation - 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. Amazon S3 stores the value of this header in the object metadata.
- Range string
- body String
- Object data (see limitations above to understand cases in which this field is actually available)
- bucket String
- cache
Control String - Specifies caching behavior along the request/reply chain.
- content
Disposition String - Specifies presentational information for the object.
- content
Encoding String - Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
- content
Language String - The language the content is in.
- content
Length Double - Size of the body in bytes.
- content
Type String - A standard MIME type describing the format of the object data.
- etag String
- ETag generated for the object (an MD5 sum of the object content in case it's not encrypted).
- expiration String
- If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
- expires String
- The date and time at which the object is no longer cacheable.
- id String
- key String
- last
Modified String - Last modified date of the object in RFC1123 format
(e.g.
Mon, 02 Jan 2006 15:04:05 MST) - metadata Map<String,String>
- A map of metadata stored with the object in S3
- server
Side StringEncryption - If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
- sse
Kms StringKey Id - If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
- version
Id String - The latest version ID of the object returned.
- website
Redirect StringLocation - 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. Amazon S3 stores the value of this header in the object metadata.
- range String
- body string
- Object data (see limitations above to understand cases in which this field is actually available)
- bucket string
- cache
Control string - Specifies caching behavior along the request/reply chain.
- content
Disposition string - Specifies presentational information for the object.
- content
Encoding string - Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
- content
Language string - The language the content is in.
- content
Length number - Size of the body in bytes.
- content
Type string - A standard MIME type describing the format of the object data.
- etag string
- ETag generated for the object (an MD5 sum of the object content in case it's not encrypted).
- expiration string
- If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
- expires string
- The date and time at which the object is no longer cacheable.
- id string
- key string
- last
Modified string - Last modified date of the object in RFC1123 format
(e.g.
Mon, 02 Jan 2006 15:04:05 MST) - metadata {[key: string]: string}
- A map of metadata stored with the object in S3
- server
Side stringEncryption - If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
- sse
Kms stringKey Id - If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
- version
Id string - The latest version ID of the object returned.
- website
Redirect stringLocation - 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. Amazon S3 stores the value of this header in the object metadata.
- range string
- body str
- Object data (see limitations above to understand cases in which this field is actually available)
- bucket str
- cache_
control str - Specifies caching behavior along the request/reply chain.
- content_
disposition str - Specifies presentational information for the object.
- content_
encoding str - Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
- content_
language str - The language the content is in.
- content_
length float - Size of the body in bytes.
- content_
type str - A standard MIME type describing the format of the object data.
- etag str
- ETag generated for the object (an MD5 sum of the object content in case it's not encrypted).
- expiration str
- If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
- expires str
- The date and time at which the object is no longer cacheable.
- id str
- key str
- last_
modified str - Last modified date of the object in RFC1123 format
(e.g.
Mon, 02 Jan 2006 15:04:05 MST) - metadata Mapping[str, str]
- A map of metadata stored with the object in S3
- server_
side_ strencryption - If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
- sse_
kms_ strkey_ id - If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
- version_
id str - The latest version ID of the object returned.
- website_
redirect_ strlocation - 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. Amazon S3 stores the value of this header in the object metadata.
- range str
- body String
- Object data (see limitations above to understand cases in which this field is actually available)
- bucket String
- cache
Control String - Specifies caching behavior along the request/reply chain.
- content
Disposition String - Specifies presentational information for the object.
- content
Encoding String - Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
- content
Language String - The language the content is in.
- content
Length Number - Size of the body in bytes.
- content
Type String - A standard MIME type describing the format of the object data.
- etag String
- ETag generated for the object (an MD5 sum of the object content in case it's not encrypted).
- expiration String
- If the object expiration is configured (see object lifecycle management), the field includes this header. It includes the expiry-date and rule-id key value pairs providing object expiration information. The value of the rule-id is URL encoded.
- expires String
- The date and time at which the object is no longer cacheable.
- id String
- key String
- last
Modified String - Last modified date of the object in RFC1123 format
(e.g.
Mon, 02 Jan 2006 15:04:05 MST) - metadata Map<String>
- A map of metadata stored with the object in S3
- server
Side StringEncryption - If the object is stored using server-side encryption (KMS or Amazon S3-managed encryption key), this field includes the chosen encryption and algorithm used.
- sse
Kms StringKey Id - If present, specifies the ID of the Key Management Service (KMS) master encryption key that was used for the object.
- version
Id String - The latest version ID of the object returned.
- website
Redirect StringLocation - 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. Amazon S3 stores the value of this header in the object metadata.
- range String
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloudTerraform Provider.
published on Thursday, Mar 12, 2026 by opentelekomcloud
