<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 TencentCloudIAC.PulumiPackage.Tencentcloud.ApiGateway
{
    public static class GetUsagePlans
    {
        /// <summary>
        /// Use this data source to query API gateway usage plans.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var plan = new Tencentcloud.ApiGateway.UsagePlan("plan", new Tencentcloud.ApiGateway.UsagePlanArgs
        ///         {
        ///             UsagePlanName = "my_plan",
        ///             UsagePlanDesc = "nice plan",
        ///             MaxRequestNum = 100,
        ///             MaxRequestNumPreSec = 10,
        ///         });
        ///         var name = Tencentcloud.ApiGateway.GetUsagePlans.Invoke(new Tencentcloud.ApiGateway.GetUsagePlansInvokeArgs
        ///         {
        ///             UsagePlanName = plan.UsagePlanName,
        ///         });
        ///         var id = Tencentcloud.ApiGateway.GetUsagePlans.Invoke(new Tencentcloud.ApiGateway.GetUsagePlansInvokeArgs
        ///         {
        ///             UsagePlanId = plan.Id,
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetUsagePlansResult> InvokeAsync(GetUsagePlansArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetUsagePlansResult>("tencentcloud:ApiGateway/getUsagePlans:getUsagePlans", args ?? new GetUsagePlansArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query API gateway usage plans.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var plan = new Tencentcloud.ApiGateway.UsagePlan("plan", new Tencentcloud.ApiGateway.UsagePlanArgs
        ///         {
        ///             UsagePlanName = "my_plan",
        ///             UsagePlanDesc = "nice plan",
        ///             MaxRequestNum = 100,
        ///             MaxRequestNumPreSec = 10,
        ///         });
        ///         var name = Tencentcloud.ApiGateway.GetUsagePlans.Invoke(new Tencentcloud.ApiGateway.GetUsagePlansInvokeArgs
        ///         {
        ///             UsagePlanName = plan.UsagePlanName,
        ///         });
        ///         var id = Tencentcloud.ApiGateway.GetUsagePlans.Invoke(new Tencentcloud.ApiGateway.GetUsagePlansInvokeArgs
        ///         {
        ///             UsagePlanId = plan.Id,
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetUsagePlansResult> Invoke(GetUsagePlansInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetUsagePlansResult>("tencentcloud:ApiGateway/getUsagePlans:getUsagePlans", args ?? new GetUsagePlansInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetUsagePlansArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public string? ResultOutputFile { get; set; }

        /// <summary>
        /// ID of the usage plan.
        /// </summary>
        [Input("usagePlanId")]
        public string? UsagePlanId { get; set; }

        /// <summary>
        /// Name of the usage plan.
        /// </summary>
        [Input("usagePlanName")]
        public string? UsagePlanName { get; set; }

        public GetUsagePlansArgs()
        {
        }
    }

    public sealed class GetUsagePlansInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public Input<string>? ResultOutputFile { get; set; }

        /// <summary>
        /// ID of the usage plan.
        /// </summary>
        [Input("usagePlanId")]
        public Input<string>? UsagePlanId { get; set; }

        /// <summary>
        /// Name of the usage plan.
        /// </summary>
        [Input("usagePlanName")]
        public Input<string>? UsagePlanName { get; set; }

        public GetUsagePlansInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetUsagePlansResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of usage plans.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetUsagePlansListResult> Lists;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// ID of the usage plan.
        /// </summary>
        public readonly string? UsagePlanId;
        /// <summary>
        /// Name of the usage plan.
        /// </summary>
        public readonly string? UsagePlanName;

        [OutputConstructor]
        private GetUsagePlansResult(
            string id,

            ImmutableArray<Outputs.GetUsagePlansListResult> lists,

            string? resultOutputFile,

            string? usagePlanId,

            string? usagePlanName)
        {
            Id = id;
            Lists = lists;
            ResultOutputFile = resultOutputFile;
            UsagePlanId = usagePlanId;
            UsagePlanName = usagePlanName;
        }
    }
}
