1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getObsBucketObject
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.getObsBucketObject

Explore with Pulumi AI

opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

Up-to-date reference of API arguments for OBS bucket object you can get at documentation portal

Use this data source to get details about the metadata and optionally (see below) content of an object stored inside OBS bucket.

Note: The content of an object (body field) is available only for objects which have a human-readable Content-Type (text/* and application/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 hello = opentelekomcloud.getObsBucketObject({
    bucket: "my-test-bucket",
    key: "hello-world.zip",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

hello = opentelekomcloud.get_obs_bucket_object(bucket="my-test-bucket",
    key="hello-world.zip")
Copy
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.LookupObsBucketObject(ctx, &opentelekomcloud.LookupObsBucketObjectArgs{
			Bucket: "my-test-bucket",
			Key:    "hello-world.zip",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var hello = Opentelekomcloud.GetObsBucketObject.Invoke(new()
    {
        Bucket = "my-test-bucket",
        Key = "hello-world.zip",
    });

});
Copy
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.GetObsBucketObjectArgs;
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 hello = OpentelekomcloudFunctions.getObsBucketObject(GetObsBucketObjectArgs.builder()
            .bucket("my-test-bucket")
            .key("hello-world.zip")
            .build());

    }
}
Copy
variables:
  hello:
    fn::invoke:
      function: opentelekomcloud:getObsBucketObject
      arguments:
        bucket: my-test-bucket
        key: hello-world.zip
Copy

Using getObsBucketObject

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 getObsBucketObject(args: GetObsBucketObjectArgs, opts?: InvokeOptions): Promise<GetObsBucketObjectResult>
function getObsBucketObjectOutput(args: GetObsBucketObjectOutputArgs, opts?: InvokeOptions): Output<GetObsBucketObjectResult>
Copy
def get_obs_bucket_object(bucket: Optional[str] = None,
                          id: Optional[str] = None,
                          key: Optional[str] = None,
                          version_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetObsBucketObjectResult
def get_obs_bucket_object_output(bucket: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          key: Optional[pulumi.Input[str]] = None,
                          version_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetObsBucketObjectResult]
Copy
func LookupObsBucketObject(ctx *Context, args *LookupObsBucketObjectArgs, opts ...InvokeOption) (*LookupObsBucketObjectResult, error)
func LookupObsBucketObjectOutput(ctx *Context, args *LookupObsBucketObjectOutputArgs, opts ...InvokeOption) LookupObsBucketObjectResultOutput
Copy

> Note: This function is named LookupObsBucketObject in the Go SDK.

public static class GetObsBucketObject 
{
    public static Task<GetObsBucketObjectResult> InvokeAsync(GetObsBucketObjectArgs args, InvokeOptions? opts = null)
    public static Output<GetObsBucketObjectResult> Invoke(GetObsBucketObjectInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetObsBucketObjectResult> getObsBucketObject(GetObsBucketObjectArgs args, InvokeOptions options)
public static Output<GetObsBucketObjectResult> getObsBucketObject(GetObsBucketObjectArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: opentelekomcloud:index/getObsBucketObject:getObsBucketObject
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Bucket This property is required. string
The name of the bucket to read the object from.
Key This property is required. string
The full path to the object inside the bucket.
Id string
VersionId string
Specific version ID of the object returned (defaults to latest version).
Bucket This property is required. string
The name of the bucket to read the object from.
Key This property is required. string
The full path to the object inside the bucket.
Id string
VersionId string
Specific version ID of the object returned (defaults to latest version).
bucket This property is required. String
The name of the bucket to read the object from.
key This property is required. String
The full path to the object inside the bucket.
id String
versionId String
Specific version ID of the object returned (defaults to latest version).
bucket This property is required. string
The name of the bucket to read the object from.
key This property is required. string
The full path to the object inside the bucket.
id string
versionId string
Specific version ID of the object returned (defaults to latest version).
bucket This property is required. str
The name of the bucket to read the object from.
key This property is required. str
The full path to the object inside the bucket.
id str
version_id str
Specific version ID of the object returned (defaults to latest version).
bucket This property is required. String
The name of the bucket to read the object from.
key This property is required. String
The full path to the object inside the bucket.
id String
versionId String
Specific version ID of the object returned (defaults to latest version).

getObsBucketObject 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
CacheControl string
Specifies caching behavior along the request/reply chain.
ContentDisposition string
Specifies presentational information for the object.
ContentEncoding 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.
ContentLanguage string
The language the content is in.
ContentLength double
Size of the body in bytes.
ContentType 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
LastModified 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
VersionId string
The latest version ID of the object returned.
WebsiteRedirectLocation 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. OBS stores the value of this header in the object metadata.
Body string
Object data (see limitations above to understand cases in which this field is actually available)
Bucket string
CacheControl string
Specifies caching behavior along the request/reply chain.
ContentDisposition string
Specifies presentational information for the object.
ContentEncoding 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.
ContentLanguage string
The language the content is in.
ContentLength float64
Size of the body in bytes.
ContentType 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
LastModified 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
VersionId string
The latest version ID of the object returned.
WebsiteRedirectLocation 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. OBS stores the value of this header in the object metadata.
body String
Object data (see limitations above to understand cases in which this field is actually available)
bucket String
cacheControl String
Specifies caching behavior along the request/reply chain.
contentDisposition String
Specifies presentational information for the object.
contentEncoding 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.
contentLanguage String
The language the content is in.
contentLength Double
Size of the body in bytes.
contentType 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
lastModified 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
versionId String
The latest version ID of the object returned.
websiteRedirectLocation 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. OBS stores the value of this header in the object metadata.
body string
Object data (see limitations above to understand cases in which this field is actually available)
bucket string
cacheControl string
Specifies caching behavior along the request/reply chain.
contentDisposition string
Specifies presentational information for the object.
contentEncoding 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.
contentLanguage string
The language the content is in.
contentLength number
Size of the body in bytes.
contentType 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
lastModified 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
versionId string
The latest version ID of the object returned.
websiteRedirectLocation 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. OBS stores the value of this header in the object metadata.
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
version_id str
The latest version ID of the object returned.
website_redirect_location 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. OBS stores the value of this header in the object metadata.
body String
Object data (see limitations above to understand cases in which this field is actually available)
bucket String
cacheControl String
Specifies caching behavior along the request/reply chain.
contentDisposition String
Specifies presentational information for the object.
contentEncoding 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.
contentLanguage String
The language the content is in.
contentLength Number
Size of the body in bytes.
contentType 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
lastModified 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
versionId String
The latest version ID of the object returned.
websiteRedirectLocation 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. OBS stores the value of this header in the object metadata.

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud