1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. RegionStoragePresign
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

ovh.CloudProject.RegionStoragePresign

Explore with Pulumi AI

ovh logo
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

    Generates a temporary presigned S3 URLs to download or upload an object.

    NOTE This resource is only compatible with the High Performance - S3 solution for object storage.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const presignedUrlRegionStoragePresign = new ovh.cloudproject.RegionStoragePresign("presignedUrlRegionStoragePresign", {
        serviceName: "xxxxxxxxxxxxxxxxx",
        regionName: "GRA",
        expire: 3600,
        method: "GET",
        object: "an-object-in-the-bucket",
    });
    export const presignedUrl = presignedUrlRegionStoragePresign.url;
    
    import pulumi
    import pulumi_ovh as ovh
    
    presigned_url_region_storage_presign = ovh.cloud_project.RegionStoragePresign("presignedUrlRegionStoragePresign",
        service_name="xxxxxxxxxxxxxxxxx",
        region_name="GRA",
        expire=3600,
        method="GET",
        object="an-object-in-the-bucket")
    pulumi.export("presignedUrl", presigned_url_region_storage_presign.url)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		presignedUrlRegionStoragePresign, err := CloudProject.NewRegionStoragePresign(ctx, "presignedUrlRegionStoragePresign", &CloudProject.RegionStoragePresignArgs{
    			ServiceName: pulumi.String("xxxxxxxxxxxxxxxxx"),
    			RegionName:  pulumi.String("GRA"),
    			Expire:      pulumi.Int(3600),
    			Method:      pulumi.String("GET"),
    			Object:      pulumi.String("an-object-in-the-bucket"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("presignedUrl", presignedUrlRegionStoragePresign.Url)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var presignedUrlRegionStoragePresign = new Ovh.CloudProject.RegionStoragePresign("presignedUrlRegionStoragePresign", new()
        {
            ServiceName = "xxxxxxxxxxxxxxxxx",
            RegionName = "GRA",
            Expire = 3600,
            Method = "GET",
            Object = "an-object-in-the-bucket",
        });
    
        return new Dictionary<string, object?>
        {
            ["presignedUrl"] = presignedUrlRegionStoragePresign.Url,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.CloudProject.RegionStoragePresign;
    import com.pulumi.ovh.CloudProject.RegionStoragePresignArgs;
    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) {
            var presignedUrlRegionStoragePresign = new RegionStoragePresign("presignedUrlRegionStoragePresign", RegionStoragePresignArgs.builder()
                .serviceName("xxxxxxxxxxxxxxxxx")
                .regionName("GRA")
                .expire(3600)
                .method("GET")
                .object("an-object-in-the-bucket")
                .build());
    
            ctx.export("presignedUrl", presignedUrlRegionStoragePresign.url());
        }
    }
    
    resources:
      presignedUrlRegionStoragePresign:
        type: ovh:CloudProject:RegionStoragePresign
        properties:
          serviceName: xxxxxxxxxxxxxxxxx
          regionName: GRA
          expire: 3600
          method: GET
          object: an-object-in-the-bucket
    outputs:
      presignedUrl: ${presignedUrlRegionStoragePresign.url}
    

    Create RegionStoragePresign Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RegionStoragePresign(name: string, args: RegionStoragePresignArgs, opts?: CustomResourceOptions);
    @overload
    def RegionStoragePresign(resource_name: str,
                             args: RegionStoragePresignArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def RegionStoragePresign(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             expire: Optional[int] = None,
                             method: Optional[str] = None,
                             object: Optional[str] = None,
                             region_name: Optional[str] = None,
                             service_name: Optional[str] = None,
                             name: Optional[str] = None)
    func NewRegionStoragePresign(ctx *Context, name string, args RegionStoragePresignArgs, opts ...ResourceOption) (*RegionStoragePresign, error)
    public RegionStoragePresign(string name, RegionStoragePresignArgs args, CustomResourceOptions? opts = null)
    public RegionStoragePresign(String name, RegionStoragePresignArgs args)
    public RegionStoragePresign(String name, RegionStoragePresignArgs args, CustomResourceOptions options)
    
    type: ovh:CloudProject:RegionStoragePresign
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RegionStoragePresignArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RegionStoragePresignArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RegionStoragePresignArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegionStoragePresignArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RegionStoragePresignArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var regionStoragePresignResource = new Ovh.CloudProject.RegionStoragePresign("regionStoragePresignResource", new()
    {
        Expire = 0,
        Method = "string",
        Object = "string",
        RegionName = "string",
        ServiceName = "string",
        Name = "string",
    });
    
    example, err := CloudProject.NewRegionStoragePresign(ctx, "regionStoragePresignResource", &CloudProject.RegionStoragePresignArgs{
    	Expire:      pulumi.Int(0),
    	Method:      pulumi.String("string"),
    	Object:      pulumi.String("string"),
    	RegionName:  pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var regionStoragePresignResource = new RegionStoragePresign("regionStoragePresignResource", RegionStoragePresignArgs.builder()
        .expire(0)
        .method("string")
        .object("string")
        .regionName("string")
        .serviceName("string")
        .name("string")
        .build());
    
    region_storage_presign_resource = ovh.cloud_project.RegionStoragePresign("regionStoragePresignResource",
        expire=0,
        method="string",
        object="string",
        region_name="string",
        service_name="string",
        name="string")
    
    const regionStoragePresignResource = new ovh.cloudproject.RegionStoragePresign("regionStoragePresignResource", {
        expire: 0,
        method: "string",
        object: "string",
        regionName: "string",
        serviceName: "string",
        name: "string",
    });
    
    type: ovh:CloudProject:RegionStoragePresign
    properties:
        expire: 0
        method: string
        name: string
        object: string
        regionName: string
        serviceName: string
    

    RegionStoragePresign Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RegionStoragePresign resource accepts the following input properties:

    Expire int
    Define, in seconds, for how long your URL will be valid.
    Method string
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    Object string
    The name of the object in your S3 bucket.
    RegionName string
    The region in which your storage is located. Ex.: "GRA".
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Name string
    The name of your S3 storage container/bucket.
    Expire int
    Define, in seconds, for how long your URL will be valid.
    Method string
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    Object string
    The name of the object in your S3 bucket.
    RegionName string
    The region in which your storage is located. Ex.: "GRA".
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Name string
    The name of your S3 storage container/bucket.
    expire Integer
    Define, in seconds, for how long your URL will be valid.
    method String
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    object String
    The name of the object in your S3 bucket.
    regionName String
    The region in which your storage is located. Ex.: "GRA".
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name String
    The name of your S3 storage container/bucket.
    expire number
    Define, in seconds, for how long your URL will be valid.
    method string
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    object string
    The name of the object in your S3 bucket.
    regionName string
    The region in which your storage is located. Ex.: "GRA".
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name string
    The name of your S3 storage container/bucket.
    expire int
    Define, in seconds, for how long your URL will be valid.
    method str
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    object str
    The name of the object in your S3 bucket.
    region_name str
    The region in which your storage is located. Ex.: "GRA".
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name str
    The name of your S3 storage container/bucket.
    expire Number
    Define, in seconds, for how long your URL will be valid.
    method String
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    object String
    The name of the object in your S3 bucket.
    regionName String
    The region in which your storage is located. Ex.: "GRA".
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name String
    The name of your S3 storage container/bucket.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RegionStoragePresign resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Url string
    Computed URL result.
    Id string
    The provider-assigned unique ID for this managed resource.
    Url string
    Computed URL result.
    id String
    The provider-assigned unique ID for this managed resource.
    url String
    Computed URL result.
    id string
    The provider-assigned unique ID for this managed resource.
    url string
    Computed URL result.
    id str
    The provider-assigned unique ID for this managed resource.
    url str
    Computed URL result.
    id String
    The provider-assigned unique ID for this managed resource.
    url String
    Computed URL result.

    Look up Existing RegionStoragePresign Resource

    Get an existing RegionStoragePresign resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RegionStoragePresignState, opts?: CustomResourceOptions): RegionStoragePresign
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            expire: Optional[int] = None,
            method: Optional[str] = None,
            name: Optional[str] = None,
            object: Optional[str] = None,
            region_name: Optional[str] = None,
            service_name: Optional[str] = None,
            url: Optional[str] = None) -> RegionStoragePresign
    func GetRegionStoragePresign(ctx *Context, name string, id IDInput, state *RegionStoragePresignState, opts ...ResourceOption) (*RegionStoragePresign, error)
    public static RegionStoragePresign Get(string name, Input<string> id, RegionStoragePresignState? state, CustomResourceOptions? opts = null)
    public static RegionStoragePresign get(String name, Output<String> id, RegionStoragePresignState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Expire int
    Define, in seconds, for how long your URL will be valid.
    Method string
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    Name string
    The name of your S3 storage container/bucket.
    Object string
    The name of the object in your S3 bucket.
    RegionName string
    The region in which your storage is located. Ex.: "GRA".
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Url string
    Computed URL result.
    Expire int
    Define, in seconds, for how long your URL will be valid.
    Method string
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    Name string
    The name of your S3 storage container/bucket.
    Object string
    The name of the object in your S3 bucket.
    RegionName string
    The region in which your storage is located. Ex.: "GRA".
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Url string
    Computed URL result.
    expire Integer
    Define, in seconds, for how long your URL will be valid.
    method String
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    name String
    The name of your S3 storage container/bucket.
    object String
    The name of the object in your S3 bucket.
    regionName String
    The region in which your storage is located. Ex.: "GRA".
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    url String
    Computed URL result.
    expire number
    Define, in seconds, for how long your URL will be valid.
    method string
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    name string
    The name of your S3 storage container/bucket.
    object string
    The name of the object in your S3 bucket.
    regionName string
    The region in which your storage is located. Ex.: "GRA".
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    url string
    Computed URL result.
    expire int
    Define, in seconds, for how long your URL will be valid.
    method str
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    name str
    The name of your S3 storage container/bucket.
    object str
    The name of the object in your S3 bucket.
    region_name str
    The region in which your storage is located. Ex.: "GRA".
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    url str
    Computed URL result.
    expire Number
    Define, in seconds, for how long your URL will be valid.
    method String
    The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
    name String
    The name of your S3 storage container/bucket.
    object String
    The name of the object in your S3 bucket.
    regionName String
    The region in which your storage is located. Ex.: "GRA".
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    url String
    Computed URL result.

    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 v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud