// *** 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 PiersKarsenbarg.Nutanix
{
    public static class GetProtectionRule
    {
        /// <summary>
        /// Describe a Nutanix Protection Rule and its values (if it has them).
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = PiersKarsenbarg.Nutanix;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var protectionRuleTest = new Nutanix.ProtectionRule("protectionRuleTest", new Nutanix.ProtectionRuleArgs
        ///         {
        ///             Description = "test",
        ///             OrderedAvailabilityZoneLists = 
        ///             {
        ///                 new Nutanix.Inputs.ProtectionRuleOrderedAvailabilityZoneListArgs
        ///                 {
        ///                     AvailabilityZoneUrl = "ab788130-0820-4d07-a1b5-b0ba4d3a42asd",
        ///                 },
        ///             },
        ///             AvailabilityZoneConnectivityLists = 
        ///             {
        ///                 new Nutanix.Inputs.ProtectionRuleAvailabilityZoneConnectivityListArgs
        ///                 {
        ///                     SnapshotScheduleLists = 
        ///                     {
        ///                         new Nutanix.Inputs.ProtectionRuleAvailabilityZoneConnectivityListSnapshotScheduleListArgs
        ///                         {
        ///                             RecoveryPointObjectiveSecs = 3600,
        ///                             SnapshotType = "CRASH_CONSISTENT",
        ///                             LocalSnapshotRetentionPolicy = new Nutanix.Inputs.ProtectionRuleAvailabilityZoneConnectivityListSnapshotScheduleListLocalSnapshotRetentionPolicyArgs
        ///                             {
        ///                                 NumSnapshots = 1,
        ///                             },
        ///                         },
        ///                     },
        ///                 },
        ///             },
        ///             CategoryFilter = new Nutanix.Inputs.ProtectionRuleCategoryFilterArgs
        ///             {
        ///                 Params = 
        ///                 {
        ///                     new Nutanix.Inputs.ProtectionRuleCategoryFilterParamArgs
        ///                     {
        ///                         Name = "Environment",
        ///                         Values = 
        ///                         {
        ///                             "Dev",
        ///                         },
        ///                     },
        ///                 },
        ///             },
        ///         });
        ///         var test = Nutanix.GetProtectionRule.Invoke(new Nutanix.GetProtectionRuleInvokeArgs
        ///         {
        ///             ProtectionRuleId = protectionRuleTest.Id,
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetProtectionRuleResult> InvokeAsync(GetProtectionRuleArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetProtectionRuleResult>("nutanix:index/getProtectionRule:getProtectionRule", args ?? new GetProtectionRuleArgs(), options.WithDefaults());

        /// <summary>
        /// Describe a Nutanix Protection Rule and its values (if it has them).
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Nutanix = PiersKarsenbarg.Nutanix;
        /// using Nutanix = Pulumi.Nutanix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var protectionRuleTest = new Nutanix.ProtectionRule("protectionRuleTest", new Nutanix.ProtectionRuleArgs
        ///         {
        ///             Description = "test",
        ///             OrderedAvailabilityZoneLists = 
        ///             {
        ///                 new Nutanix.Inputs.ProtectionRuleOrderedAvailabilityZoneListArgs
        ///                 {
        ///                     AvailabilityZoneUrl = "ab788130-0820-4d07-a1b5-b0ba4d3a42asd",
        ///                 },
        ///             },
        ///             AvailabilityZoneConnectivityLists = 
        ///             {
        ///                 new Nutanix.Inputs.ProtectionRuleAvailabilityZoneConnectivityListArgs
        ///                 {
        ///                     SnapshotScheduleLists = 
        ///                     {
        ///                         new Nutanix.Inputs.ProtectionRuleAvailabilityZoneConnectivityListSnapshotScheduleListArgs
        ///                         {
        ///                             RecoveryPointObjectiveSecs = 3600,
        ///                             SnapshotType = "CRASH_CONSISTENT",
        ///                             LocalSnapshotRetentionPolicy = new Nutanix.Inputs.ProtectionRuleAvailabilityZoneConnectivityListSnapshotScheduleListLocalSnapshotRetentionPolicyArgs
        ///                             {
        ///                                 NumSnapshots = 1,
        ///                             },
        ///                         },
        ///                     },
        ///                 },
        ///             },
        ///             CategoryFilter = new Nutanix.Inputs.ProtectionRuleCategoryFilterArgs
        ///             {
        ///                 Params = 
        ///                 {
        ///                     new Nutanix.Inputs.ProtectionRuleCategoryFilterParamArgs
        ///                     {
        ///                         Name = "Environment",
        ///                         Values = 
        ///                         {
        ///                             "Dev",
        ///                         },
        ///                     },
        ///                 },
        ///             },
        ///         });
        ///         var test = Nutanix.GetProtectionRule.Invoke(new Nutanix.GetProtectionRuleInvokeArgs
        ///         {
        ///             ProtectionRuleId = protectionRuleTest.Id,
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetProtectionRuleResult> Invoke(GetProtectionRuleInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetProtectionRuleResult>("nutanix:index/getProtectionRule:getProtectionRule", args ?? new GetProtectionRuleInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetProtectionRuleArgs : Pulumi.InvokeArgs
    {
        [Input("categories")]
        private List<Inputs.GetProtectionRuleCategoryArgs>? _categories;
        public List<Inputs.GetProtectionRuleCategoryArgs> Categories
        {
            get => _categories ?? (_categories = new List<Inputs.GetProtectionRuleCategoryArgs>());
            set => _categories = value;
        }

        [Input("protectionRuleId")]
        public string? ProtectionRuleId { get; set; }

        [Input("protectionRuleName")]
        public string? ProtectionRuleName { get; set; }

        public GetProtectionRuleArgs()
        {
        }
    }

    public sealed class GetProtectionRuleInvokeArgs : Pulumi.InvokeArgs
    {
        [Input("categories")]
        private InputList<Inputs.GetProtectionRuleCategoryInputArgs>? _categories;
        public InputList<Inputs.GetProtectionRuleCategoryInputArgs> Categories
        {
            get => _categories ?? (_categories = new InputList<Inputs.GetProtectionRuleCategoryInputArgs>());
            set => _categories = value;
        }

        [Input("protectionRuleId")]
        public Input<string>? ProtectionRuleId { get; set; }

        [Input("protectionRuleName")]
        public Input<string>? ProtectionRuleName { get; set; }

        public GetProtectionRuleInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetProtectionRuleResult
    {
        public readonly string ApiVersion;
        /// <summary>
        /// (Required) This encodes the datapipes between various availability zones and\nthe backup policy of the pipes.
        /// * `availability_zone_connectivity_list.destination_availability_zone_index` - (Optional/Computed) Index of the availability zone.
        /// * `availability_zone_connectivity_list.source_availability_zone_index` - (Optional/Computed) Index of the availability zone.
        /// * `availability_zone_connectivity_list.snapshot_schedule_list` - (Optional/Computed) Snapshot schedules for the pair of the availability zones.
        /// * `availability_zone_connectivity_list.snapshot_schedule_list.#.recovery_point_objective_secs` - (Required) "A recovery point objective (RPO) is the maximum acceptable amount of data loss.
        /// * `availability_zone_connectivity_list.snapshot_schedule_list.#.local_snapshot_retention_policy` - (Optional/Computed) This describes the snapshot retention policy for this availability zone.
        /// * `availability_zone_connectivity_list.snapshot_schedule_list.#.local_snapshot_retention_policy.0.num_snapshots` - (Optional/Computed) Number of snapshots need to be retained.
        /// * `availability_zone_connectivity_list.snapshot_schedule_list.#.local_snapshot_retention_policy.0.rollup_retention_policy_multiple` - (Optional/Computed) Multiplier to 'snapshot_interval_type'.
        /// * `availability_zone_connectivity_list.snapshot_schedule_list.#.local_snapshot_retention_policy.0.rollup_retention_policy_snapshot_interval_type` - (Optional/Computed)
        /// * `availability_zone_connectivity_list.snapshot_schedule_list.#.auto_suspend_timeout_secs` - (Optional/Computed) Auto suspend timeout in case of connection failure between the sites.
        /// * `availability_zone_connectivity_list.snapshot_schedule_list.#.snapshot_type` - (Optional/Computed) Crash consistent or Application Consistent snapshot.
        /// * `availability_zone_connectivity_list.snapshot_schedule_list.#.remote_snapshot_retention_policy` - (Optional/Computed) This describes the snapshot retention policy for this availability zone.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetProtectionRuleAvailabilityZoneConnectivityListResult> AvailabilityZoneConnectivityLists;
        public readonly ImmutableArray<Outputs.GetProtectionRuleCategoryResult> Categories;
        /// <summary>
        /// (Optional/Computed)
        /// * `category_filter.0.type` - (Optional/Computed) The type of the filter being used.
        /// * `category_filter.0.kind_list` - (Optional/Computed) List of kinds associated with this filter.
        /// * `category_filter.0.params` - (Optional/Computed) A list of category key and list of values.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetProtectionRuleCategoryFilterResult> CategoryFilters;
        public readonly string Description;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableDictionary<string, string> Metadata;
        /// <summary>
        /// (Optional) the name.
        /// </summary>
        public readonly string Name;
        /// <summary>
        /// (Required) A list of availability zones, each of which, receives a replica\nof the data for the entities protected by this protection rule.
        /// * `ordered_availability_zone_list.#.cluster_uuid` - (Optional/Computed) UUID of specific cluster to which we will be replicating.
        /// * `ordered_availability_zone_list.#.availability_zone_url` - (Optional/Computed) The FQDN or IP address of the availability zone.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetProtectionRuleOrderedAvailabilityZoneListResult> OrderedAvailabilityZoneLists;
        public readonly ImmutableArray<Outputs.GetProtectionRuleOwnerReferenceResult> OwnerReferences;
        public readonly ImmutableArray<Outputs.GetProtectionRuleProjectReferenceResult> ProjectReferences;
        public readonly string? ProtectionRuleId;
        public readonly string? ProtectionRuleName;
        public readonly string StartTime;
        public readonly string State;

        [OutputConstructor]
        private GetProtectionRuleResult(
            string apiVersion,

            ImmutableArray<Outputs.GetProtectionRuleAvailabilityZoneConnectivityListResult> availabilityZoneConnectivityLists,

            ImmutableArray<Outputs.GetProtectionRuleCategoryResult> categories,

            ImmutableArray<Outputs.GetProtectionRuleCategoryFilterResult> categoryFilters,

            string description,

            string id,

            ImmutableDictionary<string, string> metadata,

            string name,

            ImmutableArray<Outputs.GetProtectionRuleOrderedAvailabilityZoneListResult> orderedAvailabilityZoneLists,

            ImmutableArray<Outputs.GetProtectionRuleOwnerReferenceResult> ownerReferences,

            ImmutableArray<Outputs.GetProtectionRuleProjectReferenceResult> projectReferences,

            string? protectionRuleId,

            string? protectionRuleName,

            string startTime,

            string state)
        {
            ApiVersion = apiVersion;
            AvailabilityZoneConnectivityLists = availabilityZoneConnectivityLists;
            Categories = categories;
            CategoryFilters = categoryFilters;
            Description = description;
            Id = id;
            Metadata = metadata;
            Name = name;
            OrderedAvailabilityZoneLists = orderedAvailabilityZoneLists;
            OwnerReferences = ownerReferences;
            ProjectReferences = projectReferences;
            ProtectionRuleId = protectionRuleId;
            ProtectionRuleName = protectionRuleName;
            StartTime = startTime;
            State = state;
        }
    }
}
