1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. getS3Objects
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.getS3Objects

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.getS3Objects({
        bucket: "example",
        delimiter: "/",
        fetchOwner: true,
        maxKeys: 100,
        prefix: "prefix1/",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_s3_objects(bucket="example",
        delimiter="/",
        fetch_owner=True,
        max_keys=100,
        prefix="prefix1/")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ionoscloud.GetS3Objects(ctx, &ionoscloud.GetS3ObjectsArgs{
    			Bucket:     "example",
    			Delimiter:  pulumi.StringRef("/"),
    			FetchOwner: pulumi.BoolRef(true),
    			MaxKeys:    pulumi.Float64Ref(100),
    			Prefix:     pulumi.StringRef("prefix1/"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.GetS3Objects.Invoke(new()
        {
            Bucket = "example",
            Delimiter = "/",
            FetchOwner = true,
            MaxKeys = 100,
            Prefix = "prefix1/",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.IonoscloudFunctions;
    import com.pulumi.ionoscloud.inputs.GetS3ObjectsArgs;
    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 example = IonoscloudFunctions.getS3Objects(GetS3ObjectsArgs.builder()
                .bucket("example")
                .delimiter("/")
                .fetchOwner(true)
                .maxKeys(100)
                .prefix("prefix1/")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getS3Objects
          arguments:
            bucket: example
            delimiter: /
            fetchOwner: true
            maxKeys: 100
            prefix: prefix1/
    

    Using getS3Objects

    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 getS3Objects(args: GetS3ObjectsArgs, opts?: InvokeOptions): Promise<GetS3ObjectsResult>
    function getS3ObjectsOutput(args: GetS3ObjectsOutputArgs, opts?: InvokeOptions): Output<GetS3ObjectsResult>
    def get_s3_objects(bucket: Optional[str] = None,
                       delimiter: Optional[str] = None,
                       encoding_type: Optional[str] = None,
                       fetch_owner: Optional[bool] = None,
                       max_keys: Optional[float] = None,
                       prefix: Optional[str] = None,
                       start_after: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetS3ObjectsResult
    def get_s3_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[float]] = None,
                       prefix: Optional[pulumi.Input[str]] = None,
                       start_after: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetS3ObjectsResult]
    func GetS3Objects(ctx *Context, args *GetS3ObjectsArgs, opts ...InvokeOption) (*GetS3ObjectsResult, error)
    func GetS3ObjectsOutput(ctx *Context, args *GetS3ObjectsOutputArgs, opts ...InvokeOption) GetS3ObjectsResultOutput

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

    public static class GetS3Objects 
    {
        public static Task<GetS3ObjectsResult> InvokeAsync(GetS3ObjectsArgs args, InvokeOptions? opts = null)
        public static Output<GetS3ObjectsResult> Invoke(GetS3ObjectsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetS3ObjectsResult> getS3Objects(GetS3ObjectsArgs args, InvokeOptions options)
    public static Output<GetS3ObjectsResult> getS3Objects(GetS3ObjectsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:index/getS3Objects:getS3Objects
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Bucket string
    [string] The name of the bucket where the objects are stored.
    Delimiter string
    [string] A character used to group keys.
    EncodingType string
    [string] Specifies the encoding method used to encode the object keys in the response. Default is url.
    FetchOwner bool
    [bool] If set to true, the response includes the owner field in the metadata.
    MaxKeys double
    [int] Sets the maximum number of keys returned in the response body.Default is 1000.
    Prefix string
    [string] Limits the response to keys that begin with the specified prefix.
    StartAfter string
    [string] Specifies the key to start after when listing objects in a bucket.
    Bucket string
    [string] The name of the bucket where the objects are stored.
    Delimiter string
    [string] A character used to group keys.
    EncodingType string
    [string] Specifies the encoding method used to encode the object keys in the response. Default is url.
    FetchOwner bool
    [bool] If set to true, the response includes the owner field in the metadata.
    MaxKeys float64
    [int] Sets the maximum number of keys returned in the response body.Default is 1000.
    Prefix string
    [string] Limits the response to keys that begin with the specified prefix.
    StartAfter string
    [string] Specifies the key to start after when listing objects in a bucket.
    bucket String
    [string] The name of the bucket where the objects are stored.
    delimiter String
    [string] A character used to group keys.
    encodingType String
    [string] Specifies the encoding method used to encode the object keys in the response. Default is url.
    fetchOwner Boolean
    [bool] If set to true, the response includes the owner field in the metadata.
    maxKeys Double
    [int] Sets the maximum number of keys returned in the response body.Default is 1000.
    prefix String
    [string] Limits the response to keys that begin with the specified prefix.
    startAfter String
    [string] Specifies the key to start after when listing objects in a bucket.
    bucket string
    [string] The name of the bucket where the objects are stored.
    delimiter string
    [string] A character used to group keys.
    encodingType string
    [string] Specifies the encoding method used to encode the object keys in the response. Default is url.
    fetchOwner boolean
    [bool] If set to true, the response includes the owner field in the metadata.
    maxKeys number
    [int] Sets the maximum number of keys returned in the response body.Default is 1000.
    prefix string
    [string] Limits the response to keys that begin with the specified prefix.
    startAfter string
    [string] Specifies the key to start after when listing objects in a bucket.
    bucket str
    [string] The name of the bucket where the objects are stored.
    delimiter str
    [string] A character used to group keys.
    encoding_type str
    [string] Specifies the encoding method used to encode the object keys in the response. Default is url.
    fetch_owner bool
    [bool] If set to true, the response includes the owner field in the metadata.
    max_keys float
    [int] Sets the maximum number of keys returned in the response body.Default is 1000.
    prefix str
    [string] Limits the response to keys that begin with the specified prefix.
    start_after str
    [string] Specifies the key to start after when listing objects in a bucket.
    bucket String
    [string] The name of the bucket where the objects are stored.
    delimiter String
    [string] A character used to group keys.
    encodingType String
    [string] Specifies the encoding method used to encode the object keys in the response. Default is url.
    fetchOwner Boolean
    [bool] If set to true, the response includes the owner field in the metadata.
    maxKeys Number
    [int] Sets the maximum number of keys returned in the response body.Default is 1000.
    prefix String
    [string] Limits the response to keys that begin with the specified prefix.
    startAfter String
    [string] Specifies the key to start after when listing objects in a bucket.

    getS3Objects Result

    The following output properties are available:

    Bucket string
    CommonPrefixes List<string>
    A list of keys that act as a delimiter for grouping keys.
    Id string
    The provider-assigned unique ID for this managed resource.
    Keys List<string>
    A list of objects in the bucket.
    Owners List<string>
    Delimiter string
    EncodingType string
    FetchOwner bool
    MaxKeys double
    Prefix string
    StartAfter string
    Bucket string
    CommonPrefixes []string
    A list of keys that act as a delimiter for grouping keys.
    Id string
    The provider-assigned unique ID for this managed resource.
    Keys []string
    A list of objects in the bucket.
    Owners []string
    Delimiter string
    EncodingType string
    FetchOwner bool
    MaxKeys float64
    Prefix string
    StartAfter string
    bucket String
    commonPrefixes List<String>
    A list of keys that act as a delimiter for grouping keys.
    id String
    The provider-assigned unique ID for this managed resource.
    keys List<String>
    A list of objects in the bucket.
    owners List<String>
    delimiter String
    encodingType String
    fetchOwner Boolean
    maxKeys Double
    prefix String
    startAfter String
    bucket string
    commonPrefixes string[]
    A list of keys that act as a delimiter for grouping keys.
    id string
    The provider-assigned unique ID for this managed resource.
    keys string[]
    A list of objects in the bucket.
    owners string[]
    delimiter string
    encodingType string
    fetchOwner boolean
    maxKeys number
    prefix string
    startAfter string
    bucket str
    common_prefixes Sequence[str]
    A list of keys that act as a delimiter for grouping keys.
    id str
    The provider-assigned unique ID for this managed resource.
    keys Sequence[str]
    A list of objects in the bucket.
    owners Sequence[str]
    delimiter str
    encoding_type str
    fetch_owner bool
    max_keys float
    prefix str
    start_after str
    bucket String
    commonPrefixes List<String>
    A list of keys that act as a delimiter for grouping keys.
    id String
    The provider-assigned unique ID for this managed resource.
    keys List<String>
    A list of objects in the bucket.
    owners List<String>
    delimiter String
    encodingType String
    fetchOwner Boolean
    maxKeys Number
    prefix String
    startAfter String

    Package Details

    Repository
    ionoscloud ionos-cloud/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud