// *** 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 Pulumiverse.Vra.Region
{
    public static class GetRegion
    {
        /// <summary>
        /// This is an example of how to lookup a region data source:
        /// 
        /// **Region data source by id:**
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Region.GetRegion.Invoke(new()
        ///     {
        ///         Id = @var.Vra_region_id,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// **Region data source by filter:**
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Region.GetRegion.Invoke(new()
        ///     {
        ///         Filter = $"name eq '{@var.Vra_region_name}'",
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// **Region data source by cloud account id and region:**
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Region.GetRegion.Invoke(new()
        ///     {
        ///         CloudAccountId = @var.Vra_cloud_account_id,
        ///         Region = @var.Vra_region_external_id,
        ///     });
        /// 
        /// });
        /// ```
        /// </summary>
        public static Task<GetRegionResult> InvokeAsync(GetRegionArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRegionResult>("vra:region/getRegion:getRegion", args ?? new GetRegionArgs(), options.WithDefaults());

        /// <summary>
        /// This is an example of how to lookup a region data source:
        /// 
        /// **Region data source by id:**
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Region.GetRegion.Invoke(new()
        ///     {
        ///         Id = @var.Vra_region_id,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// **Region data source by filter:**
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Region.GetRegion.Invoke(new()
        ///     {
        ///         Filter = $"name eq '{@var.Vra_region_name}'",
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// **Region data source by cloud account id and region:**
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Region.GetRegion.Invoke(new()
        ///     {
        ///         CloudAccountId = @var.Vra_cloud_account_id,
        ///         Region = @var.Vra_region_external_id,
        ///     });
        /// 
        /// });
        /// ```
        /// </summary>
        public static Output<GetRegionResult> Invoke(GetRegionInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRegionResult>("vra:region/getRegion:getRegion", args ?? new GetRegionInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetRegionArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the cloud account the region belongs to.
        /// </summary>
        [Input("cloudAccountId")]
        public string? CloudAccountId { get; set; }

        /// <summary>
        /// Search criteria to narrow down Regions.
        /// </summary>
        [Input("filter")]
        public string? Filter { get; set; }

        /// <summary>
        /// The id of the region instance.
        /// </summary>
        [Input("id")]
        public string? Id { get; set; }

        /// <summary>
        /// The specific region associated with the cloud account. On vSphere, this is the external ID.
        /// </summary>
        [Input("region")]
        public string? Region { get; set; }

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

    public sealed class GetRegionInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of the cloud account the region belongs to.
        /// </summary>
        [Input("cloudAccountId")]
        public Input<string>? CloudAccountId { get; set; }

        /// <summary>
        /// Search criteria to narrow down Regions.
        /// </summary>
        [Input("filter")]
        public Input<string>? Filter { get; set; }

        /// <summary>
        /// The id of the region instance.
        /// </summary>
        [Input("id")]
        public Input<string>? Id { get; set; }

        /// <summary>
        /// The specific region associated with the cloud account. On vSphere, this is the external ID.
        /// </summary>
        [Input("region")]
        public Input<string>? Region { get; set; }

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


    [OutputType]
    public sealed class GetRegionResult
    {
        public readonly string CloudAccountId;
        /// <summary>
        /// Date when the entity was created. The date is in ISO 8601 and UTC.
        /// </summary>
        public readonly string CreatedAt;
        /// <summary>
        /// Unique identifier of region on the provider side.
        /// </summary>
        public readonly string ExternalRegionId;
        public readonly string? Filter;
        public readonly string Id;
        /// <summary>
        /// Name of region on the provider side. In vSphere, the name of the region is different from its id.
        /// </summary>
        public readonly string Name;
        /// <summary>
        /// The id of the organization this entity belongs to.
        /// </summary>
        public readonly string OrgId;
        /// <summary>
        /// Email of the user that owns the entity.
        /// </summary>
        public readonly string Owner;
        public readonly string? Region;
        /// <summary>
        /// Date when the entity was last updated. The date is ISO 8601 and UTC.
        /// </summary>
        public readonly string UpdatedAt;

        [OutputConstructor]
        private GetRegionResult(
            string cloudAccountId,

            string createdAt,

            string externalRegionId,

            string? filter,

            string id,

            string name,

            string orgId,

            string owner,

            string? region,

            string updatedAt)
        {
            CloudAccountId = cloudAccountId;
            CreatedAt = createdAt;
            ExternalRegionId = externalRegionId;
            Filter = filter;
            Id = id;
            Name = name;
            OrgId = orgId;
            Owner = owner;
            Region = region;
            UpdatedAt = updatedAt;
        }
    }
}
