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

ovh.CloudProject.getStorageObject

Explore with Pulumi AI

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

    Get information about an object in a S3™* compatible storage container. * 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 object = ovh.CloudProject.getStorageObject({
        key: "<object name>",
        name: "<bucket name>",
        regionName: "GRA",
        serviceName: "<public cloud project ID>",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    object = ovh.CloudProject.get_storage_object(key="<object name>",
        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.GetStorageObject(ctx, &cloudproject.GetStorageObjectArgs{
    			Key:         "<object name>",
    			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 @object = Ovh.CloudProject.GetStorageObject.Invoke(new()
        {
            Key = "<object name>",
            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.GetStorageObjectArgs;
    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 object = CloudProjectFunctions.getStorageObject(GetStorageObjectArgs.builder()
                .key("<object name>")
                .name("<bucket name>")
                .regionName("GRA")
                .serviceName("<public cloud project ID>")
                .build());
    
        }
    }
    
    variables:
      object:
        fn::invoke:
          function: ovh:CloudProject:getStorageObject
          arguments:
            key: <object name>
            name: <bucket name>
            regionName: GRA
            serviceName: <public cloud project ID>
    

    Using getStorageObject

    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 getStorageObject(args: GetStorageObjectArgs, opts?: InvokeOptions): Promise<GetStorageObjectResult>
    function getStorageObjectOutput(args: GetStorageObjectOutputArgs, opts?: InvokeOptions): Output<GetStorageObjectResult>
    def get_storage_object(key: Optional[str] = None,
                           name: Optional[str] = None,
                           region_name: Optional[str] = None,
                           service_name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetStorageObjectResult
    def get_storage_object_output(key: Optional[pulumi.Input[str]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           region_name: Optional[pulumi.Input[str]] = None,
                           service_name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetStorageObjectResult]
    func GetStorageObject(ctx *Context, args *GetStorageObjectArgs, opts ...InvokeOption) (*GetStorageObjectResult, error)
    func GetStorageObjectOutput(ctx *Context, args *GetStorageObjectOutputArgs, opts ...InvokeOption) GetStorageObjectResultOutput

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

    public static class GetStorageObject 
    {
        public static Task<GetStorageObjectResult> InvokeAsync(GetStorageObjectArgs args, InvokeOptions? opts = null)
        public static Output<GetStorageObjectResult> Invoke(GetStorageObjectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStorageObjectResult> getStorageObject(GetStorageObjectArgs args, InvokeOptions options)
    public static Output<GetStorageObjectResult> getStorageObject(GetStorageObjectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:CloudProject/getStorageObject:getStorageObject
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Key string
    Key
    Name string
    Name
    RegionName string
    Region name
    ServiceName string
    Service name
    Key string
    Key
    Name string
    Name
    RegionName string
    Region name
    ServiceName string
    Service name
    key String
    Key
    name String
    Name
    regionName String
    Region name
    serviceName String
    Service name
    key string
    Key
    name string
    Name
    regionName string
    Region name
    serviceName string
    Service name
    key str
    Key
    name str
    Name
    region_name str
    Region name
    service_name str
    Service name
    key String
    Key
    name String
    Name
    regionName String
    Region name
    serviceName String
    Service name

    getStorageObject Result

    The following output properties are available:

    Etag string
    ETag
    Id string
    The provider-assigned unique ID for this managed resource.
    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
    Name string
    Name
    RegionName string
    Region name
    ServiceName string
    Service name
    Size double
    Size (bytes)
    StorageClass string
    Storage class
    VersionId string
    Version ID of the object
    Etag string
    ETag
    Id string
    The provider-assigned unique ID for this managed resource.
    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
    Name string
    Name
    RegionName string
    Region name
    ServiceName string
    Service name
    Size float64
    Size (bytes)
    StorageClass string
    Storage class
    VersionId string
    Version ID of the object
    etag String
    ETag
    id String
    The provider-assigned unique ID for this managed resource.
    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
    name String
    Name
    regionName String
    Region name
    serviceName String
    Service name
    size Double
    Size (bytes)
    storageClass String
    Storage class
    versionId String
    Version ID of the object
    etag string
    ETag
    id string
    The provider-assigned unique ID for this managed resource.
    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
    name string
    Name
    regionName string
    Region name
    serviceName string
    Service name
    size number
    Size (bytes)
    storageClass string
    Storage class
    versionId string
    Version ID of the object
    etag str
    ETag
    id str
    The provider-assigned unique ID for this managed resource.
    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
    name str
    Name
    region_name str
    Region name
    service_name str
    Service name
    size float
    Size (bytes)
    storage_class str
    Storage class
    version_id str
    Version ID of the object
    etag String
    ETag
    id String
    The provider-assigned unique ID for this managed resource.
    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
    name String
    Name
    regionName String
    Region name
    serviceName String
    Service name
    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