1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getStorageObjects
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.CloudProject.getStorageObjects

Explore with Pulumi AI

ovh logo
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

    Get objects of S3™* compatible storage containers. * S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud’s service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const objects = ovh.CloudProject.getStorageObjects({
        name: "<bucket name>",
        regionName: "GRA",
        serviceName: "<public cloud project ID>",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    objects = ovh.CloudProject.get_storage_objects(name="<bucket name>",
        region_name="GRA",
        service_name="<public cloud project ID>")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudproject.GetStorageObjects(ctx, &cloudproject.GetStorageObjectsArgs{
    			Name:        "<bucket name>",
    			RegionName:  "GRA",
    			ServiceName: "<public cloud project ID>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var objects = Ovh.CloudProject.GetStorageObjects.Invoke(new()
        {
            Name = "<bucket name>",
            RegionName = "GRA",
            ServiceName = "<public cloud project ID>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
    import com.pulumi.ovh.CloudProject.inputs.GetStorageObjectsArgs;
    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 objects = CloudProjectFunctions.getStorageObjects(GetStorageObjectsArgs.builder()
                .name("<bucket name>")
                .regionName("GRA")
                .serviceName("<public cloud project ID>")
                .build());
    
        }
    }
    
    variables:
      objects:
        fn::invoke:
          function: ovh:CloudProject:getStorageObjects
          arguments:
            name: <bucket name>
            regionName: GRA
            serviceName: <public cloud project ID>
    

    Using getStorageObjects

    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 getStorageObjects(args: GetStorageObjectsArgs, opts?: InvokeOptions): Promise<GetStorageObjectsResult>
    function getStorageObjectsOutput(args: GetStorageObjectsOutputArgs, opts?: InvokeOptions): Output<GetStorageObjectsResult>
    def get_storage_objects(key_marker: Optional[str] = None,
                            limit: Optional[float] = None,
                            name: Optional[str] = None,
                            prefix: Optional[str] = None,
                            region_name: Optional[str] = None,
                            service_name: Optional[str] = None,
                            version_id_marker: Optional[str] = None,
                            with_versions: Optional[bool] = None,
                            opts: Optional[InvokeOptions] = None) -> GetStorageObjectsResult
    def get_storage_objects_output(key_marker: Optional[pulumi.Input[str]] = None,
                            limit: Optional[pulumi.Input[float]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            prefix: Optional[pulumi.Input[str]] = None,
                            region_name: Optional[pulumi.Input[str]] = None,
                            service_name: Optional[pulumi.Input[str]] = None,
                            version_id_marker: Optional[pulumi.Input[str]] = None,
                            with_versions: Optional[pulumi.Input[bool]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetStorageObjectsResult]
    func GetStorageObjects(ctx *Context, args *GetStorageObjectsArgs, opts ...InvokeOption) (*GetStorageObjectsResult, error)
    func GetStorageObjectsOutput(ctx *Context, args *GetStorageObjectsOutputArgs, opts ...InvokeOption) GetStorageObjectsResultOutput

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

    public static class GetStorageObjects 
    {
        public static Task<GetStorageObjectsResult> InvokeAsync(GetStorageObjectsArgs args, InvokeOptions? opts = null)
        public static Output<GetStorageObjectsResult> Invoke(GetStorageObjectsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStorageObjectsResult> getStorageObjects(GetStorageObjectsArgs args, InvokeOptions options)
    public static Output<GetStorageObjectsResult> getStorageObjects(GetStorageObjectsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:CloudProject/getStorageObjects:getStorageObjects
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name
    RegionName string
    Region name
    ServiceName string
    Service name
    KeyMarker string
    Key to start with when listing objects
    Limit double
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    Prefix string
    List objects whose key begins with this prefix
    VersionIdMarker string
    Version ID to start listing from
    WithVersions bool
    List object versions
    Name string
    Name
    RegionName string
    Region name
    ServiceName string
    Service name
    KeyMarker string
    Key to start with when listing objects
    Limit float64
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    Prefix string
    List objects whose key begins with this prefix
    VersionIdMarker string
    Version ID to start listing from
    WithVersions bool
    List object versions
    name String
    Name
    regionName String
    Region name
    serviceName String
    Service name
    keyMarker String
    Key to start with when listing objects
    limit Double
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    prefix String
    List objects whose key begins with this prefix
    versionIdMarker String
    Version ID to start listing from
    withVersions Boolean
    List object versions
    name string
    Name
    regionName string
    Region name
    serviceName string
    Service name
    keyMarker string
    Key to start with when listing objects
    limit number
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    prefix string
    List objects whose key begins with this prefix
    versionIdMarker string
    Version ID to start listing from
    withVersions boolean
    List object versions
    name str
    Name
    region_name str
    Region name
    service_name str
    Service name
    key_marker str
    Key to start with when listing objects
    limit float
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    prefix str
    List objects whose key begins with this prefix
    version_id_marker str
    Version ID to start listing from
    with_versions bool
    List object versions
    name String
    Name
    regionName String
    Region name
    serviceName String
    Service name
    keyMarker String
    Key to start with when listing objects
    limit Number
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    prefix String
    List objects whose key begins with this prefix
    versionIdMarker String
    Version ID to start listing from
    withVersions Boolean
    List object versions

    getStorageObjects Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name
    Objects List<GetStorageObjectsObject>
    RegionName string
    Region name
    ServiceName string
    Service name
    KeyMarker string
    Key to start with when listing objects
    Limit double
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    Prefix string
    List objects whose key begins with this prefix
    VersionIdMarker string
    Version ID to start listing from
    WithVersions bool
    List object versions
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name
    Objects []GetStorageObjectsObject
    RegionName string
    Region name
    ServiceName string
    Service name
    KeyMarker string
    Key to start with when listing objects
    Limit float64
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    Prefix string
    List objects whose key begins with this prefix
    VersionIdMarker string
    Version ID to start listing from
    WithVersions bool
    List object versions
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name
    objects List<GetStorageObjectsObject>
    regionName String
    Region name
    serviceName String
    Service name
    keyMarker String
    Key to start with when listing objects
    limit Double
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    prefix String
    List objects whose key begins with this prefix
    versionIdMarker String
    Version ID to start listing from
    withVersions Boolean
    List object versions
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name
    objects GetStorageObjectsObject[]
    regionName string
    Region name
    serviceName string
    Service name
    keyMarker string
    Key to start with when listing objects
    limit number
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    prefix string
    List objects whose key begins with this prefix
    versionIdMarker string
    Version ID to start listing from
    withVersions boolean
    List object versions
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name
    objects Sequence[cloudproject.GetStorageObjectsObject]
    region_name str
    Region name
    service_name str
    Service name
    key_marker str
    Key to start with when listing objects
    limit float
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    prefix str
    List objects whose key begins with this prefix
    version_id_marker str
    Version ID to start listing from
    with_versions bool
    List object versions
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name
    objects List<Property Map>
    regionName String
    Region name
    serviceName String
    Service name
    keyMarker String
    Key to start with when listing objects
    limit Number
    Limit the number of objects returned (1000 maximum, defaults to 1000)
    prefix String
    List objects whose key begins with this prefix
    versionIdMarker String
    Version ID to start listing from
    withVersions Boolean
    List object versions

    Supporting Types

    GetStorageObjectsObject

    Etag string
    ETag
    IsDeleteMarker bool
    Whether this object is a delete marker
    IsLatest bool
    Whether this is the latest version of the object
    Key string
    Key
    LastModified string
    Last modification date
    Size double
    Size (bytes)
    StorageClass string
    Storage class
    VersionId string
    Version ID of the object
    Etag string
    ETag
    IsDeleteMarker bool
    Whether this object is a delete marker
    IsLatest bool
    Whether this is the latest version of the object
    Key string
    Key
    LastModified string
    Last modification date
    Size float64
    Size (bytes)
    StorageClass string
    Storage class
    VersionId string
    Version ID of the object
    etag String
    ETag
    isDeleteMarker Boolean
    Whether this object is a delete marker
    isLatest Boolean
    Whether this is the latest version of the object
    key String
    Key
    lastModified String
    Last modification date
    size Double
    Size (bytes)
    storageClass String
    Storage class
    versionId String
    Version ID of the object
    etag string
    ETag
    isDeleteMarker boolean
    Whether this object is a delete marker
    isLatest boolean
    Whether this is the latest version of the object
    key string
    Key
    lastModified string
    Last modification date
    size number
    Size (bytes)
    storageClass string
    Storage class
    versionId string
    Version ID of the object
    etag str
    ETag
    is_delete_marker bool
    Whether this object is a delete marker
    is_latest bool
    Whether this is the latest version of the object
    key str
    Key
    last_modified str
    Last modification date
    size float
    Size (bytes)
    storage_class str
    Storage class
    version_id str
    Version ID of the object
    etag String
    ETag
    isDeleteMarker Boolean
    Whether this object is a delete marker
    isLatest Boolean
    Whether this is the latest version of the object
    key String
    Key
    lastModified String
    Last modification date
    size Number
    Size (bytes)
    storageClass String
    Storage class
    versionId String
    Version ID of the object

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud