// *** 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.Blockdevice
{
    public static class GetBlockDevice
    {
        /// <summary>
        /// ## ---layout: "vra"
        /// 
        /// page_title: "VMware vRealize Automation: vra.blockdevice.BlockDevice"
        /// description: |-
        ///   Provides a data lookup for vra_block_device.
        /// ---
        /// 
        /// # Data Source: vra.blockdevice.BlockDevice
        /// 
        /// Provides a data lookup for a vra_block_device.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// ### S
        /// 
        /// **Block device data source by its id:**
        /// 
        /// This is an example of how to read a block device data source using its ID.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Blockdevice.GetBlockDevice.Invoke(new()
        ///     {
        ///         Id = @var.Block_device_id,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// **Block device data source filter by name:**
        /// 
        /// This is an example of how to read a block device data source using its name.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Blockdevice.GetBlockDevice.Invoke(new()
        ///     {
        ///         Filter = $"name eq '{@var.Block_device_name}'",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetBlockDeviceResult> InvokeAsync(GetBlockDeviceArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetBlockDeviceResult>("vra:blockdevice/getBlockDevice:getBlockDevice", args ?? new GetBlockDeviceArgs(), options.WithDefaults());

        /// <summary>
        /// ## ---layout: "vra"
        /// 
        /// page_title: "VMware vRealize Automation: vra.blockdevice.BlockDevice"
        /// description: |-
        ///   Provides a data lookup for vra_block_device.
        /// ---
        /// 
        /// # Data Source: vra.blockdevice.BlockDevice
        /// 
        /// Provides a data lookup for a vra_block_device.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// ### S
        /// 
        /// **Block device data source by its id:**
        /// 
        /// This is an example of how to read a block device data source using its ID.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Blockdevice.GetBlockDevice.Invoke(new()
        ///     {
        ///         Id = @var.Block_device_id,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// **Block device data source filter by name:**
        /// 
        /// This is an example of how to read a block device data source using its name.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Blockdevice.GetBlockDevice.Invoke(new()
        ///     {
        ///         Filter = $"name eq '{@var.Block_device_name}'",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetBlockDeviceResult> Invoke(GetBlockDeviceInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetBlockDeviceResult>("vra:blockdevice/getBlockDevice:getBlockDevice", args ?? new GetBlockDeviceInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetBlockDeviceArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Describes machine within the scope of your organization and is not propagated to the cloud.
        /// </summary>
        [Input("description")]
        public string? Description { get; set; }

        /// <summary>
        /// Indicates whether the snapshots of the block-devices should be included in the state. Applicable only for first class block devices.
        /// </summary>
        [Input("expandSnapshots")]
        public bool? ExpandSnapshots { get; set; }

        /// <summary>
        /// Search criteria to filter the list of block devices.
        /// </summary>
        [Input("filter")]
        public string? Filter { get; set; }

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

        [Input("tags")]
        private List<Inputs.GetBlockDeviceTagArgs>? _tags;

        /// <summary>
        /// A set of tag keys and optional values that were set on this resource instance.
        /// example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        /// </summary>
        public List<Inputs.GetBlockDeviceTagArgs> Tags
        {
            get => _tags ?? (_tags = new List<Inputs.GetBlockDeviceTagArgs>());
            set => _tags = value;
        }

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

    public sealed class GetBlockDeviceInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Describes machine within the scope of your organization and is not propagated to the cloud.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Indicates whether the snapshots of the block-devices should be included in the state. Applicable only for first class block devices.
        /// </summary>
        [Input("expandSnapshots")]
        public Input<bool>? ExpandSnapshots { get; set; }

        /// <summary>
        /// Search criteria to filter the list of block devices.
        /// </summary>
        [Input("filter")]
        public Input<string>? Filter { get; set; }

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

        [Input("tags")]
        private InputList<Inputs.GetBlockDeviceTagInputArgs>? _tags;

        /// <summary>
        /// A set of tag keys and optional values that were set on this resource instance.
        /// example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        /// </summary>
        public InputList<Inputs.GetBlockDeviceTagInputArgs> Tags
        {
            get => _tags ?? (_tags = new InputList<Inputs.GetBlockDeviceTagInputArgs>());
            set => _tags = value;
        }

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


    [OutputType]
    public sealed class GetBlockDeviceResult
    {
        /// <summary>
        /// Capacity of the block device in GB.
        /// </summary>
        public readonly int CapacityInGb;
        /// <summary>
        /// Set of ids of the cloud accounts this entity belongs to.
        /// </summary>
        public readonly ImmutableArray<string> CloudAccountIds;
        /// <summary>
        /// Date when the entity was created. The date is in ISO 6801 and UTC.
        /// </summary>
        public readonly string CreatedAt;
        /// <summary>
        /// Additional custom properties that may be used to extend the machine.
        /// </summary>
        public readonly ImmutableDictionary<string, object> CustomProperties;
        /// <summary>
        /// The id of the deployment that is associated with this resource.
        /// </summary>
        public readonly string DeploymentId;
        /// <summary>
        /// Describes machine within the scope of your organization and is not propagated to the cloud.
        /// </summary>
        public readonly string? Description;
        public readonly bool? ExpandSnapshots;
        /// <summary>
        /// External entity Id on the provider side.
        /// </summary>
        public readonly string ExternalId;
        /// <summary>
        /// The external regionId of the resource.
        /// </summary>
        public readonly string ExternalRegionId;
        /// <summary>
        /// The external zoneId of the resource.
        /// </summary>
        public readonly string ExternalZoneId;
        public readonly string? Filter;
        public readonly string Id;
        /// <summary>
        /// HATEOAS of the entity.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetBlockDeviceLinkResult> Links;
        /// <summary>
        /// A human-friendly name used as an identifier in APIs that support this option.
        /// </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;
        /// <summary>
        /// Indicates whether the block device survives a delete action.
        /// </summary>
        public readonly bool Persistent;
        /// <summary>
        /// The id of the project the current user belongs to.
        /// </summary>
        public readonly string ProjectId;
        public readonly ImmutableArray<Outputs.GetBlockDeviceSnapshotResult> Snapshots;
        /// <summary>
        /// Status of the block device.
        /// </summary>
        public readonly string Status;
        /// <summary>
        /// A set of tag keys and optional values that were set on this resource instance.
        /// example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        /// </summary>
        public readonly ImmutableArray<Outputs.GetBlockDeviceTagResult> Tags;
        /// <summary>
        /// Date when the entity was last updated. The date is ISO 8601 and UTC.
        /// </summary>
        public readonly string UpdatedAt;

        [OutputConstructor]
        private GetBlockDeviceResult(
            int capacityInGb,

            ImmutableArray<string> cloudAccountIds,

            string createdAt,

            ImmutableDictionary<string, object> customProperties,

            string deploymentId,

            string? description,

            bool? expandSnapshots,

            string externalId,

            string externalRegionId,

            string externalZoneId,

            string? filter,

            string id,

            ImmutableArray<Outputs.GetBlockDeviceLinkResult> links,

            string name,

            string orgId,

            string owner,

            bool persistent,

            string projectId,

            ImmutableArray<Outputs.GetBlockDeviceSnapshotResult> snapshots,

            string status,

            ImmutableArray<Outputs.GetBlockDeviceTagResult> tags,

            string updatedAt)
        {
            CapacityInGb = capacityInGb;
            CloudAccountIds = cloudAccountIds;
            CreatedAt = createdAt;
            CustomProperties = customProperties;
            DeploymentId = deploymentId;
            Description = description;
            ExpandSnapshots = expandSnapshots;
            ExternalId = externalId;
            ExternalRegionId = externalRegionId;
            ExternalZoneId = externalZoneId;
            Filter = filter;
            Id = id;
            Links = links;
            Name = name;
            OrgId = orgId;
            Owner = owner;
            Persistent = persistent;
            ProjectId = projectId;
            Snapshots = snapshots;
            Status = status;
            Tags = tags;
            UpdatedAt = updatedAt;
        }
    }
}
