GetBucketObjects

This data source provides the objects of an OSS bucket.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var bucketObjectsDs = Output.Create(AliCloud.Oss.GetBucketObjects.InvokeAsync(new AliCloud.Oss.GetBucketObjectsArgs
        {
            BucketName = "sample_bucket",
            KeyRegex = "sample/sample_object.txt",
        }));
        this.FirstObjectKey = bucketObjectsDs.Apply(bucketObjectsDs => bucketObjectsDs.Objects[0].Key);
    }

    [Output("firstObjectKey")]
    public Output<string> FirstObjectKey { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

bucket_objects_ds = alicloud.oss.get_bucket_objects(bucket_name="sample_bucket",
    key_regex="sample/sample_object.txt")
pulumi.export("firstObjectKey", bucket_objects_ds.objects[0]["key"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const bucketObjectsDs = pulumi.output(alicloud.oss.getBucketObjects({
    bucketName: "sample_bucket",
    keyRegex: "sample/sample_object.txt",
}, { async: true }));

export const firstObjectKey = bucketObjectsDs.objects[0].key;

Using GetBucketObjects

function getBucketObjects(args: GetBucketObjectsArgs, opts?: InvokeOptions): Promise<GetBucketObjectsResult>
function  get_bucket_objects(bucket_name=None, key_prefix=None, key_regex=None, output_file=None, opts=None)
func GetBucketObjects(ctx *Context, args *GetBucketObjectsArgs, opts ...InvokeOption) (*GetBucketObjectsResult, error)
public static class GetBucketObjects {
    public static Task<GetBucketObjectsResult> InvokeAsync(GetBucketObjectsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

BucketName string

Name of the bucket that contains the objects to find.

KeyPrefix string

Filter results by the given key prefix (such as “path/to/folder/logs-”).

KeyRegex string

A regex string to filter results by key.

OutputFile string
BucketName string

Name of the bucket that contains the objects to find.

KeyPrefix string

Filter results by the given key prefix (such as “path/to/folder/logs-”).

KeyRegex string

A regex string to filter results by key.

OutputFile string
bucketName string

Name of the bucket that contains the objects to find.

keyPrefix string

Filter results by the given key prefix (such as “path/to/folder/logs-”).

keyRegex string

A regex string to filter results by key.

outputFile string
bucket_name str

Name of the bucket that contains the objects to find.

key_prefix str

Filter results by the given key prefix (such as “path/to/folder/logs-”).

key_regex str

A regex string to filter results by key.

output_file str

GetBucketObjects Result

The following output properties are available:

BucketName string
Id string

The provider-assigned unique ID for this managed resource.

Objects List<Pulumi.AliCloud.Oss.Outputs.GetBucketObjectsObject>

A list of bucket objects. Each element contains the following attributes:

KeyPrefix string
KeyRegex string
OutputFile string
BucketName string
Id string

The provider-assigned unique ID for this managed resource.

Objects []GetBucketObjectsObject

A list of bucket objects. Each element contains the following attributes:

KeyPrefix string
KeyRegex string
OutputFile string
bucketName string
id string

The provider-assigned unique ID for this managed resource.

objects GetBucketObjectsObject[]

A list of bucket objects. Each element contains the following attributes:

keyPrefix string
keyRegex string
outputFile string
bucket_name str
id str

The provider-assigned unique ID for this managed resource.

objects List[GetBucketObjectsObject]

A list of bucket objects. Each element contains the following attributes:

key_prefix str
key_regex str
output_file str

Supporting Types

GetBucketObjectsObject

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Acl string

Object access control list. Possible values: default, private, public-read and public-read-write.

CacheControl string

Caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.

ContentDisposition string

Presentational information for the object. Read RFC2616 Content-Disposition for further details.

ContentEncoding string

Content encodings that 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. Read RFC2616 Content-Encoding for further details.

ContentLength string

Size of the object in bytes.

ContentMd5 string

MD5 value of the content. Read MD5 for computing method.

ContentType string

Standard MIME type describing the format of the object data, e.g. “application/octet-stream”.

Etag string

ETag generated for the object (MD5 sum of the object content).

Expires string

Expiration date for the the request/response. Read RFC2616 Expires for further details.

Key string

Object key.

LastModificationTime string

Last modification time of the object.

ServerSideEncryption string

Server-side encryption of the object in OSS. It can be empty or AES256.

SseKmsKeyId string

If present, specifies the ID of the Key Management Service(KMS) master encryption key that was used for the object.

StorageClass string

Object storage type. Possible values: Standard, IA and Archive.

Acl string

Object access control list. Possible values: default, private, public-read and public-read-write.

CacheControl string

Caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.

ContentDisposition string

Presentational information for the object. Read RFC2616 Content-Disposition for further details.

ContentEncoding string

Content encodings that 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. Read RFC2616 Content-Encoding for further details.

ContentLength string

Size of the object in bytes.

ContentMd5 string

MD5 value of the content. Read MD5 for computing method.

ContentType string

Standard MIME type describing the format of the object data, e.g. “application/octet-stream”.

Etag string

ETag generated for the object (MD5 sum of the object content).

Expires string

Expiration date for the the request/response. Read RFC2616 Expires for further details.

Key string

Object key.

LastModificationTime string

Last modification time of the object.

ServerSideEncryption string

Server-side encryption of the object in OSS. It can be empty or AES256.

SseKmsKeyId string

If present, specifies the ID of the Key Management Service(KMS) master encryption key that was used for the object.

StorageClass string

Object storage type. Possible values: Standard, IA and Archive.

acl string

Object access control list. Possible values: default, private, public-read and public-read-write.

cacheControl string

Caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.

contentDisposition string

Presentational information for the object. Read RFC2616 Content-Disposition for further details.

contentEncoding string

Content encodings that 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. Read RFC2616 Content-Encoding for further details.

contentLength string

Size of the object in bytes.

contentMd5 string

MD5 value of the content. Read MD5 for computing method.

contentType string

Standard MIME type describing the format of the object data, e.g. “application/octet-stream”.

etag string

ETag generated for the object (MD5 sum of the object content).

expires string

Expiration date for the the request/response. Read RFC2616 Expires for further details.

key string

Object key.

lastModificationTime string

Last modification time of the object.

serverSideEncryption string

Server-side encryption of the object in OSS. It can be empty or AES256.

sseKmsKeyId string

If present, specifies the ID of the Key Management Service(KMS) master encryption key that was used for the object.

storageClass string

Object storage type. Possible values: Standard, IA and Archive.

acl str

Object access control list. Possible values: default, private, public-read and public-read-write.

cache_control str

Caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.

content_disposition str

Presentational information for the object. Read RFC2616 Content-Disposition for further details.

content_encoding str

Content encodings that 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. Read RFC2616 Content-Encoding for further details.

content_length str

Size of the object in bytes.

content_md5 str

MD5 value of the content. Read MD5 for computing method.

content_type str

Standard MIME type describing the format of the object data, e.g. “application/octet-stream”.

etag str

ETag generated for the object (MD5 sum of the object content).

expires str

Expiration date for the the request/response. Read RFC2616 Expires for further details.

key str

Object key.

lastModificationTime str

Last modification time of the object.

server_side_encryption str

Server-side encryption of the object in OSS. It can be empty or AES256.

sseKmsKeyId str

If present, specifies the ID of the Key Management Service(KMS) master encryption key that was used for the object.

storage_class str

Object storage type. Possible values: Standard, IA and Archive.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.