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:
- Bucket
Name string Name of the bucket that contains the objects to find.
- Key
Prefix string Filter results by the given key prefix (such as “path/to/folder/logs-”).
- Key
Regex string A regex string to filter results by key.
- Output
File string
- Bucket
Name string Name of the bucket that contains the objects to find.
- Key
Prefix string Filter results by the given key prefix (such as “path/to/folder/logs-”).
- Key
Regex string A regex string to filter results by key.
- Output
File string
- bucket
Name string Name of the bucket that contains the objects to find.
- key
Prefix string Filter results by the given key prefix (such as “path/to/folder/logs-”).
- key
Regex string A regex string to filter results by key.
- output
File 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:
- Bucket
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Objects
List<Pulumi.
Ali Cloud. Oss. Outputs. Get Bucket Objects Object> A list of bucket objects. Each element contains the following attributes:
- Key
Prefix string - Key
Regex string - Output
File string
- Bucket
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Objects
[]Get
Bucket Objects Object A list of bucket objects. Each element contains the following attributes:
- Key
Prefix string - Key
Regex string - Output
File string
- bucket
Name string - id string
The provider-assigned unique ID for this managed resource.
- objects
Get
Bucket Objects Object[] A list of bucket objects. Each element contains the following attributes:
- key
Prefix string - key
Regex string - output
File string
- bucket_
name str - id str
The provider-assigned unique ID for this managed resource.
- objects
List[Get
Bucket Objects Object] 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-readandpublic-read-write.- Cache
Control string Caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
- Content
Disposition string Presentational information for the object. Read RFC2616 Content-Disposition for further details.
- Content
Encoding 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.
- Content
Length string Size of the object in bytes.
- Content
Md5 string MD5 value of the content. Read MD5 for computing method.
- Content
Type 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.
- Last
Modification stringTime Last modification time of the object.
- Server
Side stringEncryption Server-side encryption of the object in OSS. It can be empty or
AES256.- Sse
Kms stringKey Id If present, specifies the ID of the Key Management Service(KMS) master encryption key that was used for the object.
- Storage
Class string Object storage type. Possible values:
Standard,IAandArchive.
- Acl string
Object access control list. Possible values:
default,private,public-readandpublic-read-write.- Cache
Control string Caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
- Content
Disposition string Presentational information for the object. Read RFC2616 Content-Disposition for further details.
- Content
Encoding 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.
- Content
Length string Size of the object in bytes.
- Content
Md5 string MD5 value of the content. Read MD5 for computing method.
- Content
Type 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.
- Last
Modification stringTime Last modification time of the object.
- Server
Side stringEncryption Server-side encryption of the object in OSS. It can be empty or
AES256.- Sse
Kms stringKey Id If present, specifies the ID of the Key Management Service(KMS) master encryption key that was used for the object.
- Storage
Class string Object storage type. Possible values:
Standard,IAandArchive.
- acl string
Object access control list. Possible values:
default,private,public-readandpublic-read-write.- cache
Control string Caching behavior along the request/reply chain. Read RFC2616 Cache-Control for further details.
- content
Disposition string Presentational information for the object. Read RFC2616 Content-Disposition for further details.
- content
Encoding 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.
- content
Length string Size of the object in bytes.
- content
Md5 string MD5 value of the content. Read MD5 for computing method.
- content
Type 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.
- last
Modification stringTime Last modification time of the object.
- server
Side stringEncryption Server-side encryption of the object in OSS. It can be empty or
AES256.- sse
Kms stringKey Id If present, specifies the ID of the Key Management Service(KMS) master encryption key that was used for the object.
- storage
Class string Object storage type. Possible values:
Standard,IAandArchive.
- acl str
Object access control list. Possible values:
default,private,public-readandpublic-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.
- last
Modification strTime Last modification time of the object.
- server_
side_ strencryption Server-side encryption of the object in OSS. It can be empty or
AES256.- sse
Kms strKey Id 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,IAandArchive.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.