AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi
aws.s3.getObjects
Explore with Pulumi AI
NOTE on
max_keys
: Retrieving very large numbers of keys can adversely affect the provider’s performance.
The objects data source returns keys (i.e., file names) and other metadata about objects in an S3 bucket.
Using getObjects
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 getObjects(args: GetObjectsArgs, opts?: InvokeOptions): Promise<GetObjectsResult>
function getObjectsOutput(args: GetObjectsOutputArgs, opts?: InvokeOptions): Output<GetObjectsResult>
def get_objects(bucket: Optional[str] = None,
delimiter: Optional[str] = None,
encoding_type: Optional[str] = None,
fetch_owner: Optional[bool] = None,
max_keys: Optional[int] = None,
prefix: Optional[str] = None,
request_payer: Optional[str] = None,
start_after: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetObjectsResult
def get_objects_output(bucket: Optional[pulumi.Input[str]] = None,
delimiter: Optional[pulumi.Input[str]] = None,
encoding_type: Optional[pulumi.Input[str]] = None,
fetch_owner: Optional[pulumi.Input[bool]] = None,
max_keys: Optional[pulumi.Input[int]] = None,
prefix: Optional[pulumi.Input[str]] = None,
request_payer: Optional[pulumi.Input[str]] = None,
start_after: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetObjectsResult]
func GetObjects(ctx *Context, args *GetObjectsArgs, opts ...InvokeOption) (*GetObjectsResult, error)
func GetObjectsOutput(ctx *Context, args *GetObjectsOutputArgs, opts ...InvokeOption) GetObjectsResultOutput
> Note: This function is named GetObjects
in the Go SDK.
public static class GetObjects
{
public static Task<GetObjectsResult> InvokeAsync(GetObjectsArgs args, InvokeOptions? opts = null)
public static Output<GetObjectsResult> Invoke(GetObjectsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetObjectsResult> getObjects(GetObjectsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:s3/getObjects:getObjects
arguments:
# arguments dictionary
The following arguments are supported:
- Bucket string
- Lists object keys in this S3 bucket. Alternatively, an S3 access point ARN can be specified
- Delimiter string
- Character used to group keys (Default: none)
- Encoding
Type string - Encodes keys using this method (Default: none; besides none, only "url" can be used)
- Fetch
Owner bool - Boolean specifying whether to populate the owner list (Default: false)
- Max
Keys int - Maximum object keys to return (Default: 1000)
- Prefix string
- Limits results to object keys with this prefix (Default: none)
- Request
Payer string - Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If included, the only valid value is
requester
. - Start
After string - Returns key names lexicographically after a specific object key in your bucket (Default: none; S3 lists object keys in UTF-8 character encoding in lexicographical order)
- Bucket string
- Lists object keys in this S3 bucket. Alternatively, an S3 access point ARN can be specified
- Delimiter string
- Character used to group keys (Default: none)
- Encoding
Type string - Encodes keys using this method (Default: none; besides none, only "url" can be used)
- Fetch
Owner bool - Boolean specifying whether to populate the owner list (Default: false)
- Max
Keys int - Maximum object keys to return (Default: 1000)
- Prefix string
- Limits results to object keys with this prefix (Default: none)
- Request
Payer string - Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If included, the only valid value is
requester
. - Start
After string - Returns key names lexicographically after a specific object key in your bucket (Default: none; S3 lists object keys in UTF-8 character encoding in lexicographical order)
- bucket String
- Lists object keys in this S3 bucket. Alternatively, an S3 access point ARN can be specified
- delimiter String
- Character used to group keys (Default: none)
- encoding
Type String - Encodes keys using this method (Default: none; besides none, only "url" can be used)
- fetch
Owner Boolean - Boolean specifying whether to populate the owner list (Default: false)
- max
Keys Integer - Maximum object keys to return (Default: 1000)
- prefix String
- Limits results to object keys with this prefix (Default: none)
- request
Payer String - Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If included, the only valid value is
requester
. - start
After String - Returns key names lexicographically after a specific object key in your bucket (Default: none; S3 lists object keys in UTF-8 character encoding in lexicographical order)
- bucket string
- Lists object keys in this S3 bucket. Alternatively, an S3 access point ARN can be specified
- delimiter string
- Character used to group keys (Default: none)
- encoding
Type string - Encodes keys using this method (Default: none; besides none, only "url" can be used)
- fetch
Owner boolean - Boolean specifying whether to populate the owner list (Default: false)
- max
Keys number - Maximum object keys to return (Default: 1000)
- prefix string
- Limits results to object keys with this prefix (Default: none)
- request
Payer string - Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If included, the only valid value is
requester
. - start
After string - Returns key names lexicographically after a specific object key in your bucket (Default: none; S3 lists object keys in UTF-8 character encoding in lexicographical order)
- bucket str
- Lists object keys in this S3 bucket. Alternatively, an S3 access point ARN can be specified
- delimiter str
- Character used to group keys (Default: none)
- encoding_
type str - Encodes keys using this method (Default: none; besides none, only "url" can be used)
- fetch_
owner bool - Boolean specifying whether to populate the owner list (Default: false)
- max_
keys int - Maximum object keys to return (Default: 1000)
- prefix str
- Limits results to object keys with this prefix (Default: none)
- request_
payer str - Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If included, the only valid value is
requester
. - start_
after str - Returns key names lexicographically after a specific object key in your bucket (Default: none; S3 lists object keys in UTF-8 character encoding in lexicographical order)
- bucket String
- Lists object keys in this S3 bucket. Alternatively, an S3 access point ARN can be specified
- delimiter String
- Character used to group keys (Default: none)
- encoding
Type String - Encodes keys using this method (Default: none; besides none, only "url" can be used)
- fetch
Owner Boolean - Boolean specifying whether to populate the owner list (Default: false)
- max
Keys Number - Maximum object keys to return (Default: 1000)
- prefix String
- Limits results to object keys with this prefix (Default: none)
- request
Payer String - Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If included, the only valid value is
requester
. - start
After String - Returns key names lexicographically after a specific object key in your bucket (Default: none; S3 lists object keys in UTF-8 character encoding in lexicographical order)
getObjects Result
The following output properties are available:
- Bucket string
- Common
Prefixes List<string> - List of any keys between
prefix
and the next occurrence ofdelimiter
(i.e., similar to subdirectories of theprefix
"directory"); the list is only returned when you specifydelimiter
- Id string
- The provider-assigned unique ID for this managed resource.
- Keys List<string>
- List of strings representing object keys
- Owners List<string>
- List of strings representing object owner IDs (see
fetch_owner
above) - Request
Charged string - If present, indicates that the requester was successfully charged for the request.
- Delimiter string
- Encoding
Type string - Fetch
Owner bool - Max
Keys int - Prefix string
- Request
Payer string - Start
After string
- Bucket string
- Common
Prefixes []string - List of any keys between
prefix
and the next occurrence ofdelimiter
(i.e., similar to subdirectories of theprefix
"directory"); the list is only returned when you specifydelimiter
- Id string
- The provider-assigned unique ID for this managed resource.
- Keys []string
- List of strings representing object keys
- Owners []string
- List of strings representing object owner IDs (see
fetch_owner
above) - Request
Charged string - If present, indicates that the requester was successfully charged for the request.
- Delimiter string
- Encoding
Type string - Fetch
Owner bool - Max
Keys int - Prefix string
- Request
Payer string - Start
After string
- bucket String
- common
Prefixes List<String> - List of any keys between
prefix
and the next occurrence ofdelimiter
(i.e., similar to subdirectories of theprefix
"directory"); the list is only returned when you specifydelimiter
- id String
- The provider-assigned unique ID for this managed resource.
- keys List<String>
- List of strings representing object keys
- owners List<String>
- List of strings representing object owner IDs (see
fetch_owner
above) - request
Charged String - If present, indicates that the requester was successfully charged for the request.
- delimiter String
- encoding
Type String - fetch
Owner Boolean - max
Keys Integer - prefix String
- request
Payer String - start
After String
- bucket string
- common
Prefixes string[] - List of any keys between
prefix
and the next occurrence ofdelimiter
(i.e., similar to subdirectories of theprefix
"directory"); the list is only returned when you specifydelimiter
- id string
- The provider-assigned unique ID for this managed resource.
- keys string[]
- List of strings representing object keys
- owners string[]
- List of strings representing object owner IDs (see
fetch_owner
above) - request
Charged string - If present, indicates that the requester was successfully charged for the request.
- delimiter string
- encoding
Type string - fetch
Owner boolean - max
Keys number - prefix string
- request
Payer string - start
After string
- bucket str
- common_
prefixes Sequence[str] - List of any keys between
prefix
and the next occurrence ofdelimiter
(i.e., similar to subdirectories of theprefix
"directory"); the list is only returned when you specifydelimiter
- id str
- The provider-assigned unique ID for this managed resource.
- keys Sequence[str]
- List of strings representing object keys
- owners Sequence[str]
- List of strings representing object owner IDs (see
fetch_owner
above) - request_
charged str - If present, indicates that the requester was successfully charged for the request.
- delimiter str
- encoding_
type str - fetch_
owner bool - max_
keys int - prefix str
- request_
payer str - start_
after str
- bucket String
- common
Prefixes List<String> - List of any keys between
prefix
and the next occurrence ofdelimiter
(i.e., similar to subdirectories of theprefix
"directory"); the list is only returned when you specifydelimiter
- id String
- The provider-assigned unique ID for this managed resource.
- keys List<String>
- List of strings representing object keys
- owners List<String>
- List of strings representing object owner IDs (see
fetch_owner
above) - request
Charged String - If present, indicates that the requester was successfully charged for the request.
- delimiter String
- encoding
Type String - fetch
Owner Boolean - max
Keys Number - prefix String
- request
Payer String - start
After String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.