<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;

namespace Pulumi.AliCloud.Dns
{
    public static class GetAccessStrategies
    {
        /// <summary>
        /// This data source provides the Alidns Access Strategies of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.152.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Dns.GetAccessStrategies.Invoke(new()
        ///     {
        ///         InstanceId = "example_value",
        ///         StrategyMode = "example_value",
        ///         Ids = new[]
        ///         {
        ///             "example_value-1",
        ///             "example_value-2",
        ///         },
        ///         NameRegex = "the_resource_name",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["alidnsAccessStrategyId1"] = ids.Apply(getAccessStrategiesResult =&gt; getAccessStrategiesResult.Strategies[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetAccessStrategiesResult> InvokeAsync(GetAccessStrategiesArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetAccessStrategiesResult>("alicloud:dns/getAccessStrategies:getAccessStrategies", args ?? new GetAccessStrategiesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Alidns Access Strategies of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.152.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Dns.GetAccessStrategies.Invoke(new()
        ///     {
        ///         InstanceId = "example_value",
        ///         StrategyMode = "example_value",
        ///         Ids = new[]
        ///         {
        ///             "example_value-1",
        ///             "example_value-2",
        ///         },
        ///         NameRegex = "the_resource_name",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["alidnsAccessStrategyId1"] = ids.Apply(getAccessStrategiesResult =&gt; getAccessStrategiesResult.Strategies[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetAccessStrategiesResult> Invoke(GetAccessStrategiesInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetAccessStrategiesResult>("alicloud:dns/getAccessStrategies:getAccessStrategies", args ?? new GetAccessStrategiesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAccessStrategiesArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Default to `false`. Set it to `true` can output more details about resource attributes.
        /// </summary>
        [Input("enableDetails")]
        public bool? EnableDetails { get; set; }

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of Access Strategy IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The Id of the associated instance.
        /// </summary>
        [Input("instanceId", required: true)]
        public string InstanceId { get; set; } = null!;

        /// <summary>
        /// The lang.
        /// </summary>
        [Input("lang")]
        public string? Lang { get; set; }

        /// <summary>
        /// A regex string to filter results by Access Strategy name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

        /// <summary>
        /// The type of the access policy.
        /// </summary>
        [Input("strategyMode", required: true)]
        public string StrategyMode { get; set; } = null!;

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

    public sealed class GetAccessStrategiesInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Default to `false`. Set it to `true` can output more details about resource attributes.
        /// </summary>
        [Input("enableDetails")]
        public Input<bool>? EnableDetails { get; set; }

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of Access Strategy IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The Id of the associated instance.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// The lang.
        /// </summary>
        [Input("lang")]
        public Input<string>? Lang { get; set; }

        /// <summary>
        /// A regex string to filter results by Access Strategy name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

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

        /// <summary>
        /// The type of the access policy.
        /// </summary>
        [Input("strategyMode", required: true)]
        public Input<string> StrategyMode { get; set; } = null!;

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


    [OutputType]
    public sealed class GetAccessStrategiesResult
    {
        public readonly bool? EnableDetails;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string InstanceId;
        public readonly string? Lang;
        public readonly string? NameRegex;
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        public readonly ImmutableArray<Outputs.GetAccessStrategiesStrategyResult> Strategies;
        public readonly string StrategyMode;

        [OutputConstructor]
        private GetAccessStrategiesResult(
            bool? enableDetails,

            string id,

            ImmutableArray<string> ids,

            string instanceId,

            string? lang,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            ImmutableArray<Outputs.GetAccessStrategiesStrategyResult> strategies,

            string strategyMode)
        {
            EnableDetails = enableDetails;
            Id = id;
            Ids = ids;
            InstanceId = instanceId;
            Lang = lang;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            Strategies = strategies;
            StrategyMode = strategyMode;
        }
    }
}
