// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace Lbrlabs.PulumiPackage.Ovh.CloudProject
{
    /// <summary>
    /// Generates a temporary presigned S3 URLs to download or upload an object.
    /// 
    /// &gt; __NOTE__ This resource is only compatible with the `High Performance - S3` solution for object storage.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Ovh = Lbrlabs.PulumiPackage.Ovh;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     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&lt;string, object?&gt;
    ///     {
    ///         ["presignedUrl"] = presignedUrlRegionStoragePresign.Url,
    ///     };
    /// });
    /// ```
    /// </summary>
    [OvhResourceType("ovh:CloudProject/regionStoragePresign:RegionStoragePresign")]
    public partial class RegionStoragePresign : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Define, in seconds, for how long your URL will be valid.
        /// </summary>
        [Output("expire")]
        public Output<int> Expire { get; private set; } = null!;

        /// <summary>
        /// The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
        /// </summary>
        [Output("method")]
        public Output<string> Method { get; private set; } = null!;

        /// <summary>
        /// The name of your S3 storage container/bucket.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The name of the object in your S3 bucket.
        /// </summary>
        [Output("object")]
        public Output<string> Object { get; private set; } = null!;

        /// <summary>
        /// The region in which your storage is located.
        /// Ex.: "GRA".
        /// </summary>
        [Output("regionName")]
        public Output<string> RegionName { get; private set; } = null!;

        /// <summary>
        /// The id of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Output("serviceName")]
        public Output<string> ServiceName { get; private set; } = null!;

        /// <summary>
        /// Computed URL result.
        /// </summary>
        [Output("url")]
        public Output<string> Url { get; private set; } = null!;


        /// <summary>
        /// Create a RegionStoragePresign resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public RegionStoragePresign(string name, RegionStoragePresignArgs args, CustomResourceOptions? options = null)
            : base("ovh:CloudProject/regionStoragePresign:RegionStoragePresign", name, args ?? new RegionStoragePresignArgs(), MakeResourceOptions(options, ""))
        {
        }

        private RegionStoragePresign(string name, Input<string> id, RegionStoragePresignState? state = null, CustomResourceOptions? options = null)
            : base("ovh:CloudProject/regionStoragePresign:RegionStoragePresign", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/lbrlabs",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing RegionStoragePresign resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static RegionStoragePresign Get(string name, Input<string> id, RegionStoragePresignState? state = null, CustomResourceOptions? options = null)
        {
            return new RegionStoragePresign(name, id, state, options);
        }
    }

    public sealed class RegionStoragePresignArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Define, in seconds, for how long your URL will be valid.
        /// </summary>
        [Input("expire", required: true)]
        public Input<int> Expire { get; set; } = null!;

        /// <summary>
        /// The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
        /// </summary>
        [Input("method", required: true)]
        public Input<string> Method { get; set; } = null!;

        /// <summary>
        /// The name of your S3 storage container/bucket.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The name of the object in your S3 bucket.
        /// </summary>
        [Input("object", required: true)]
        public Input<string> Object { get; set; } = null!;

        /// <summary>
        /// The region in which your storage is located.
        /// Ex.: "GRA".
        /// </summary>
        [Input("regionName", required: true)]
        public Input<string> RegionName { get; set; } = null!;

        /// <summary>
        /// The id of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Input("serviceName", required: true)]
        public Input<string> ServiceName { get; set; } = null!;

        public RegionStoragePresignArgs()
        {
        }
        public static new RegionStoragePresignArgs Empty => new RegionStoragePresignArgs();
    }

    public sealed class RegionStoragePresignState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Define, in seconds, for how long your URL will be valid.
        /// </summary>
        [Input("expire")]
        public Input<int>? Expire { get; set; }

        /// <summary>
        /// The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
        /// </summary>
        [Input("method")]
        public Input<string>? Method { get; set; }

        /// <summary>
        /// The name of your S3 storage container/bucket.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The name of the object in your S3 bucket.
        /// </summary>
        [Input("object")]
        public Input<string>? Object { get; set; }

        /// <summary>
        /// The region in which your storage is located.
        /// Ex.: "GRA".
        /// </summary>
        [Input("regionName")]
        public Input<string>? RegionName { get; set; }

        /// <summary>
        /// The id of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Input("serviceName")]
        public Input<string>? ServiceName { get; set; }

        /// <summary>
        /// Computed URL result.
        /// </summary>
        [Input("url")]
        public Input<string>? Url { get; set; }

        public RegionStoragePresignState()
        {
        }
        public static new RegionStoragePresignState Empty => new RegionStoragePresignState();
    }
}
