<reponame>luxifer/pulumi-scaleway<gh_stars>0// *** 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 luxifer.Scaleway
{
    public static class GetObjectBucket
    {
        /// <summary>
        /// Gets information about the Bucket.
        /// For more information, see [the documentation](https://www.scaleway.com/en/docs/object-storage-feature/).
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Scaleway = Pulumi.Scaleway;
        /// using Scaleway = luxifer.Scaleway;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var main = new Scaleway.ObjectBucket("main", new()
        ///     {
        ///         Tags = 
        ///         {
        ///             { "foo", "bar" },
        ///         },
        ///     });
        /// 
        ///     var selected = Scaleway.GetObjectBucket.Invoke(new()
        ///     {
        ///         Name = "bucket.test.com",
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// {{% /example %}}
        /// {{% example %}}
        /// ### Fetching the bucket from a specific project
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Scaleway = Pulumi.Scaleway;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var selected = Scaleway.GetObjectBucket.Invoke(new()
        ///     {
        ///         Name = "bucket.test.com",
        ///         ProjectId = "11111111-1111-1111-1111-111111111111",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetObjectBucketResult> InvokeAsync(GetObjectBucketArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetObjectBucketResult>("scaleway:index/getObjectBucket:getObjectBucket", args ?? new GetObjectBucketArgs(), options.WithDefaults());

        /// <summary>
        /// Gets information about the Bucket.
        /// For more information, see [the documentation](https://www.scaleway.com/en/docs/object-storage-feature/).
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Scaleway = Pulumi.Scaleway;
        /// using Scaleway = luxifer.Scaleway;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var main = new Scaleway.ObjectBucket("main", new()
        ///     {
        ///         Tags = 
        ///         {
        ///             { "foo", "bar" },
        ///         },
        ///     });
        /// 
        ///     var selected = Scaleway.GetObjectBucket.Invoke(new()
        ///     {
        ///         Name = "bucket.test.com",
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// {{% /example %}}
        /// {{% example %}}
        /// ### Fetching the bucket from a specific project
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Scaleway = Pulumi.Scaleway;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var selected = Scaleway.GetObjectBucket.Invoke(new()
        ///     {
        ///         Name = "bucket.test.com",
        ///         ProjectId = "11111111-1111-1111-1111-111111111111",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetObjectBucketResult> Invoke(GetObjectBucketInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetObjectBucketResult>("scaleway:index/getObjectBucket:getObjectBucket", args ?? new GetObjectBucketInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetObjectBucketArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The bucket name.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// `project_id`) The ID of the project the bucket is associated with.
        /// </summary>
        [Input("projectId")]
        public string? ProjectId { get; set; }

        /// <summary>
        /// `region`) The region in which the Object Storage exists.
        /// </summary>
        [Input("region")]
        public string? Region { get; set; }

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

    public sealed class GetObjectBucketInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The bucket name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// `project_id`) The ID of the project the bucket is associated with.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        /// <summary>
        /// `region`) The region in which the Object Storage exists.
        /// </summary>
        [Input("region")]
        public Input<string>? Region { get; set; }

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


    [OutputType]
    public sealed class GetObjectBucketResult
    {
        public readonly string Acl;
        public readonly ImmutableArray<Outputs.GetObjectBucketCorsRuleResult> CorsRules;
        /// <summary>
        /// The endpoint URL of the bucket
        /// </summary>
        public readonly string Endpoint;
        public readonly bool ForceDestroy;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<Outputs.GetObjectBucketLifecycleRuleResult> LifecycleRules;
        public readonly string? Name;
        public readonly bool ObjectLockEnabled;
        public readonly string? ProjectId;
        public readonly string? Region;
        public readonly ImmutableDictionary<string, string> Tags;
        public readonly ImmutableArray<Outputs.GetObjectBucketVersioningResult> Versionings;

        [OutputConstructor]
        private GetObjectBucketResult(
            string acl,

            ImmutableArray<Outputs.GetObjectBucketCorsRuleResult> corsRules,

            string endpoint,

            bool forceDestroy,

            string id,

            ImmutableArray<Outputs.GetObjectBucketLifecycleRuleResult> lifecycleRules,

            string? name,

            bool objectLockEnabled,

            string? projectId,

            string? region,

            ImmutableDictionary<string, string> tags,

            ImmutableArray<Outputs.GetObjectBucketVersioningResult> versionings)
        {
            Acl = acl;
            CorsRules = corsRules;
            Endpoint = endpoint;
            ForceDestroy = forceDestroy;
            Id = id;
            LifecycleRules = lifecycleRules;
            Name = name;
            ObjectLockEnabled = objectLockEnabled;
            ProjectId = projectId;
            Region = region;
            Tags = tags;
            Versionings = versionings;
        }
    }
}
