tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getCosBucketObject
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
Use this data source to query the metadata of an object stored inside a bucket.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const mycos = tencentcloud.getCosBucketObject({
bucket: "mycos-test-1258798060",
key: "hello-world.py",
resultOutputFile: "TFresults",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
mycos = tencentcloud.get_cos_bucket_object(bucket="mycos-test-1258798060",
key="hello-world.py",
result_output_file="TFresults")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.LookupCosBucketObject(ctx, &tencentcloud.LookupCosBucketObjectArgs{
Bucket: "mycos-test-1258798060",
Key: "hello-world.py",
ResultOutputFile: pulumi.StringRef("TFresults"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var mycos = Tencentcloud.GetCosBucketObject.Invoke(new()
{
Bucket = "mycos-test-1258798060",
Key = "hello-world.py",
ResultOutputFile = "TFresults",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetCosBucketObjectArgs;
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 mycos = TencentcloudFunctions.getCosBucketObject(GetCosBucketObjectArgs.builder()
.bucket("mycos-test-1258798060")
.key("hello-world.py")
.resultOutputFile("TFresults")
.build());
}
}
variables:
mycos:
fn::invoke:
function: tencentcloud:getCosBucketObject
arguments:
bucket: mycos-test-1258798060
key: hello-world.py
resultOutputFile: TFresults
Using getCosBucketObject
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 getCosBucketObject(args: GetCosBucketObjectArgs, opts?: InvokeOptions): Promise<GetCosBucketObjectResult>
function getCosBucketObjectOutput(args: GetCosBucketObjectOutputArgs, opts?: InvokeOptions): Output<GetCosBucketObjectResult>
def get_cos_bucket_object(bucket: Optional[str] = None,
id: Optional[str] = None,
key: Optional[str] = None,
result_output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCosBucketObjectResult
def get_cos_bucket_object_output(bucket: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
key: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCosBucketObjectResult]
func LookupCosBucketObject(ctx *Context, args *LookupCosBucketObjectArgs, opts ...InvokeOption) (*LookupCosBucketObjectResult, error)
func LookupCosBucketObjectOutput(ctx *Context, args *LookupCosBucketObjectOutputArgs, opts ...InvokeOption) LookupCosBucketObjectResultOutput
> Note: This function is named LookupCosBucketObject
in the Go SDK.
public static class GetCosBucketObject
{
public static Task<GetCosBucketObjectResult> InvokeAsync(GetCosBucketObjectArgs args, InvokeOptions? opts = null)
public static Output<GetCosBucketObjectResult> Invoke(GetCosBucketObjectInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCosBucketObjectResult> getCosBucketObject(GetCosBucketObjectArgs args, InvokeOptions options)
public static Output<GetCosBucketObjectResult> getCosBucketObject(GetCosBucketObjectArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getCosBucketObject:getCosBucketObject
arguments:
# arguments dictionary
The following arguments are supported:
- Bucket string
- Name of the bucket that contains the objects to query.
- Key string
- The full path to the object inside the bucket.
- Id string
- Result
Output stringFile - Used to save results.
- Bucket string
- Name of the bucket that contains the objects to query.
- Key string
- The full path to the object inside the bucket.
- Id string
- Result
Output stringFile - Used to save results.
- bucket String
- Name of the bucket that contains the objects to query.
- key String
- The full path to the object inside the bucket.
- id String
- result
Output StringFile - Used to save results.
- bucket string
- Name of the bucket that contains the objects to query.
- key string
- The full path to the object inside the bucket.
- id string
- result
Output stringFile - Used to save results.
- bucket str
- Name of the bucket that contains the objects to query.
- key str
- The full path to the object inside the bucket.
- id str
- result_
output_ strfile - Used to save results.
- bucket String
- Name of the bucket that contains the objects to query.
- key String
- The full path to the object inside the bucket.
- id String
- result
Output StringFile - Used to save results.
getCosBucketObject Result
The following output properties are 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
Type string - A standard MIME type describing the format of the object data.
- Etag string
- ETag generated for the object, which is may not equal to MD5 value.
- Id string
- Key string
- Last
Modified string - Last modified date of the object.
- Storage
Class string - Object storage type such as STANDARD.
- Result
Output stringFile
- 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
Type string - A standard MIME type describing the format of the object data.
- Etag string
- ETag generated for the object, which is may not equal to MD5 value.
- Id string
- Key string
- Last
Modified string - Last modified date of the object.
- Storage
Class string - Object storage type such as STANDARD.
- Result
Output stringFile
- 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
Type String - A standard MIME type describing the format of the object data.
- etag String
- ETag generated for the object, which is may not equal to MD5 value.
- id String
- key String
- last
Modified String - Last modified date of the object.
- storage
Class String - Object storage type such as STANDARD.
- result
Output StringFile
- 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
Type string - A standard MIME type describing the format of the object data.
- etag string
- ETag generated for the object, which is may not equal to MD5 value.
- id string
- key string
- last
Modified string - Last modified date of the object.
- storage
Class string - Object storage type such as STANDARD.
- result
Output stringFile
- 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_
type str - A standard MIME type describing the format of the object data.
- etag str
- ETag generated for the object, which is may not equal to MD5 value.
- id str
- key str
- last_
modified str - Last modified date of the object.
- storage_
class str - Object storage type such as STANDARD.
- result_
output_ strfile
- 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
Type String - A standard MIME type describing the format of the object data.
- etag String
- ETag generated for the object, which is may not equal to MD5 value.
- id String
- key String
- last
Modified String - Last modified date of the object.
- storage
Class String - Object storage type such as STANDARD.
- result
Output StringFile
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack