opentelekomcloud.getObsBucketObject
Explore with Pulumi AI
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-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 hello = opentelekomcloud.getObsBucketObject({
bucket: "my-test-bucket",
key: "hello-world.zip",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
hello = opentelekomcloud.get_obs_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.LookupObsBucketObject(ctx, &opentelekomcloud.LookupObsBucketObjectArgs{
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 hello = Opentelekomcloud.GetObsBucketObject.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.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());
}
}
variables:
hello:
fn::invoke:
function: opentelekomcloud:getObsBucketObject
arguments:
bucket: my-test-bucket
key: hello-world.zip
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>
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]
func LookupObsBucketObject(ctx *Context, args *LookupObsBucketObjectArgs, opts ...InvokeOption) (*LookupObsBucketObjectResult, error)
func LookupObsBucketObjectOutput(ctx *Context, args *LookupObsBucketObjectOutputArgs, opts ...InvokeOption) LookupObsBucketObjectResultOutput
> 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)
}
public static CompletableFuture<GetObsBucketObjectResult> getObsBucketObject(GetObsBucketObjectArgs args, InvokeOptions options)
public static Output<GetObsBucketObjectResult> getObsBucketObject(GetObsBucketObjectArgs args, InvokeOptions options)
fn::invoke:
function: opentelekomcloud:index/getObsBucketObject:getObsBucketObject
arguments:
# arguments dictionary
The 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
- version_
id str - 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
- 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
- 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. 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
- 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
- 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. 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
- 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
- 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. 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
- 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
- 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. 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_ 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. 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
- 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
- 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. 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.