1. Packages
  2. AWS
  3. API Docs
  4. s3
  5. getBucketObjects
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.s3.getBucketObjects

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    NOTE: The aws.s3.getBucketObjects data source is DEPRECATED and will be removed in a future version! Use aws.s3.getObjects instead, where new features and fixes will be added.

    NOTE on max_keys: Retrieving very large numbers of keys can adversely affect this provider’s performance.

    The objects data source returns keys (i.e., file names) and other metadata about objects in an S3 bucket.

    Using getBucketObjects

    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 getBucketObjects(args: GetBucketObjectsArgs, opts?: InvokeOptions): Promise<GetBucketObjectsResult>
    function getBucketObjectsOutput(args: GetBucketObjectsOutputArgs, opts?: InvokeOptions): Output<GetBucketObjectsResult>
    def get_bucket_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,
                           start_after: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetBucketObjectsResult
    def get_bucket_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,
                           start_after: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetBucketObjectsResult]
    func GetBucketObjects(ctx *Context, args *GetBucketObjectsArgs, opts ...InvokeOption) (*GetBucketObjectsResult, error)
    func GetBucketObjectsOutput(ctx *Context, args *GetBucketObjectsOutputArgs, opts ...InvokeOption) GetBucketObjectsResultOutput

    > Note: This function is named GetBucketObjects in the Go SDK.

    public static class GetBucketObjects 
    {
        public static Task<GetBucketObjectsResult> InvokeAsync(GetBucketObjectsArgs args, InvokeOptions? opts = null)
        public static Output<GetBucketObjectsResult> Invoke(GetBucketObjectsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBucketObjectsResult> getBucketObjects(GetBucketObjectsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:s3/getBucketObjects:getBucketObjects
      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

    Deprecated: Use the aws.s3.getObjects data source instead

    Delimiter string
    Character used to group keys (Default: none)
    EncodingType string
    Encodes keys using this method (Default: none; besides none, only "url" can be used)
    FetchOwner bool
    Boolean specifying whether to populate the owner list (Default: false)
    MaxKeys int
    Maximum object keys to return (Default: 1000)
    Prefix string
    Limits results to object keys with this prefix (Default: none)
    StartAfter 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

    Deprecated: Use the aws.s3.getObjects data source instead

    Delimiter string
    Character used to group keys (Default: none)
    EncodingType string
    Encodes keys using this method (Default: none; besides none, only "url" can be used)
    FetchOwner bool
    Boolean specifying whether to populate the owner list (Default: false)
    MaxKeys int
    Maximum object keys to return (Default: 1000)
    Prefix string
    Limits results to object keys with this prefix (Default: none)
    StartAfter 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

    Deprecated: Use the aws.s3.getObjects data source instead

    delimiter String
    Character used to group keys (Default: none)
    encodingType String
    Encodes keys using this method (Default: none; besides none, only "url" can be used)
    fetchOwner Boolean
    Boolean specifying whether to populate the owner list (Default: false)
    maxKeys Integer
    Maximum object keys to return (Default: 1000)
    prefix String
    Limits results to object keys with this prefix (Default: none)
    startAfter 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

    Deprecated: Use the aws.s3.getObjects data source instead

    delimiter string
    Character used to group keys (Default: none)
    encodingType string
    Encodes keys using this method (Default: none; besides none, only "url" can be used)
    fetchOwner boolean
    Boolean specifying whether to populate the owner list (Default: false)
    maxKeys number
    Maximum object keys to return (Default: 1000)
    prefix string
    Limits results to object keys with this prefix (Default: none)
    startAfter 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

    Deprecated: Use the aws.s3.getObjects data source instead

    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)
    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

    Deprecated: Use the aws.s3.getObjects data source instead

    delimiter String
    Character used to group keys (Default: none)
    encodingType String
    Encodes keys using this method (Default: none; besides none, only "url" can be used)
    fetchOwner Boolean
    Boolean specifying whether to populate the owner list (Default: false)
    maxKeys Number
    Maximum object keys to return (Default: 1000)
    prefix String
    Limits results to object keys with this prefix (Default: none)
    startAfter 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)

    getBucketObjects Result

    The following output properties are available:

    Bucket string

    Deprecated: Use the aws.s3.getObjects data source instead

    CommonPrefixes List<string>
    List of any keys between prefix and the next occurrence of delimiter (i.e., similar to subdirectories of the prefix "directory"); the list is only returned when you specify delimiter
    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)
    Delimiter string
    EncodingType string
    FetchOwner bool
    MaxKeys int
    Prefix string
    StartAfter string
    Bucket string

    Deprecated: Use the aws.s3.getObjects data source instead

    CommonPrefixes []string
    List of any keys between prefix and the next occurrence of delimiter (i.e., similar to subdirectories of the prefix "directory"); the list is only returned when you specify delimiter
    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)
    Delimiter string
    EncodingType string
    FetchOwner bool
    MaxKeys int
    Prefix string
    StartAfter string
    bucket String

    Deprecated: Use the aws.s3.getObjects data source instead

    commonPrefixes List<String>
    List of any keys between prefix and the next occurrence of delimiter (i.e., similar to subdirectories of the prefix "directory"); the list is only returned when you specify delimiter
    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)
    delimiter String
    encodingType String
    fetchOwner Boolean
    maxKeys Integer
    prefix String
    startAfter String
    bucket string

    Deprecated: Use the aws.s3.getObjects data source instead

    commonPrefixes string[]
    List of any keys between prefix and the next occurrence of delimiter (i.e., similar to subdirectories of the prefix "directory"); the list is only returned when you specify delimiter
    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)
    delimiter string
    encodingType string
    fetchOwner boolean
    maxKeys number
    prefix string
    startAfter string
    bucket str

    Deprecated: Use the aws.s3.getObjects data source instead

    common_prefixes Sequence[str]
    List of any keys between prefix and the next occurrence of delimiter (i.e., similar to subdirectories of the prefix "directory"); the list is only returned when you specify delimiter
    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)
    delimiter str
    encoding_type str
    fetch_owner bool
    max_keys int
    prefix str
    start_after str
    bucket String

    Deprecated: Use the aws.s3.getObjects data source instead

    commonPrefixes List<String>
    List of any keys between prefix and the next occurrence of delimiter (i.e., similar to subdirectories of the prefix "directory"); the list is only returned when you specify delimiter
    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)
    delimiter String
    encodingType String
    fetchOwner Boolean
    maxKeys Number
    prefix String
    startAfter String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi