<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks// *** 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.Vpc
{
    public static class GetCommonBandwidthPackages
    {
        /// <summary>
        /// This data source provides a list of Common Bandwidth Packages owned by an Alibaba Cloud account.
        /// 
        /// &gt; **NOTE:** Available in 1.36.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var fooCommonBandwithPackage = new AliCloud.Vpc.CommonBandwithPackage("fooCommonBandwithPackage", new()
        ///     {
        ///         Bandwidth = "2",
        ///         Description = "tf-testAcc-CommonBandwidthPackage",
        ///     });
        /// 
        ///     var fooCommonBandwidthPackages = AliCloud.Vpc.GetCommonBandwidthPackages.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             fooCommonBandwithPackage.Id,
        ///         },
        ///         NameRegex = "^tf-testAcc.*",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// ## Public ip addresses Block
        ///   
        ///   The public ip addresses mapping supports the following:
        ///   
        ///   * `ip_address`   - The address of the EIP.
        ///   * `allocation_id` - The ID of the EIP instance.
        ///   * `bandwidth_package_ip_relation_status` - The IP relation status of bandwidth package.
        /// </summary>
        public static Task<GetCommonBandwidthPackagesResult> InvokeAsync(GetCommonBandwidthPackagesArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetCommonBandwidthPackagesResult>("alicloud:vpc/getCommonBandwidthPackages:getCommonBandwidthPackages", args ?? new GetCommonBandwidthPackagesArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides a list of Common Bandwidth Packages owned by an Alibaba Cloud account.
        /// 
        /// &gt; **NOTE:** Available in 1.36.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var fooCommonBandwithPackage = new AliCloud.Vpc.CommonBandwithPackage("fooCommonBandwithPackage", new()
        ///     {
        ///         Bandwidth = "2",
        ///         Description = "tf-testAcc-CommonBandwidthPackage",
        ///     });
        /// 
        ///     var fooCommonBandwidthPackages = AliCloud.Vpc.GetCommonBandwidthPackages.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             fooCommonBandwithPackage.Id,
        ///         },
        ///         NameRegex = "^tf-testAcc.*",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// ## Public ip addresses Block
        ///   
        ///   The public ip addresses mapping supports the following:
        ///   
        ///   * `ip_address`   - The address of the EIP.
        ///   * `allocation_id` - The ID of the EIP instance.
        ///   * `bandwidth_package_ip_relation_status` - The IP relation status of bandwidth package.
        /// </summary>
        public static Output<GetCommonBandwidthPackagesResult> Invoke(GetCommonBandwidthPackagesInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetCommonBandwidthPackagesResult>("alicloud:vpc/getCommonBandwidthPackages:getCommonBandwidthPackages", args ?? new GetCommonBandwidthPackagesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetCommonBandwidthPackagesArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of bandwidth package.
        /// </summary>
        [Input("bandwidthPackageName")]
        public string? BandwidthPackageName { get; set; }

        /// <summary>
        /// Specifies whether to precheck only the request.
        /// </summary>
        [Input("dryRun")]
        public bool? DryRun { get; set; }

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

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

        /// <summary>
        /// Specifies whether to return data of orders that have not taken effect.
        /// </summary>
        [Input("includeReservationData")]
        public bool? IncludeReservationData { get; set; }

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

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

        /// <summary>
        /// The Id of resource group which the common bandwidth package belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public string? ResourceGroupId { get; set; }

        /// <summary>
        /// The status of bandwidth package. Valid values: `Available` and `Pending`.
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

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

    public sealed class GetCommonBandwidthPackagesInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The name of bandwidth package.
        /// </summary>
        [Input("bandwidthPackageName")]
        public Input<string>? BandwidthPackageName { get; set; }

        /// <summary>
        /// Specifies whether to precheck only the request.
        /// </summary>
        [Input("dryRun")]
        public Input<bool>? DryRun { get; set; }

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

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

        /// <summary>
        /// Specifies whether to return data of orders that have not taken effect.
        /// </summary>
        [Input("includeReservationData")]
        public Input<bool>? IncludeReservationData { get; set; }

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

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

        /// <summary>
        /// The Id of resource group which the common bandwidth package belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// The status of bandwidth package. Valid values: `Available` and `Pending`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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


    [OutputType]
    public sealed class GetCommonBandwidthPackagesResult
    {
        /// <summary>
        /// The name of bandwidth package.
        /// </summary>
        public readonly string? BandwidthPackageName;
        public readonly bool? DryRun;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// (Optional) A list of Common Bandwidth Packages IDs.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        public readonly bool? IncludeReservationData;
        public readonly string? NameRegex;
        /// <summary>
        /// A list of Common Bandwidth Packages names.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        /// <summary>
        /// A list of Common Bandwidth Packages. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetCommonBandwidthPackagesPackageResult> Packages;
        /// <summary>
        /// The Id of resource group which the common bandwidth package belongs.
        /// </summary>
        public readonly string? ResourceGroupId;
        /// <summary>
        /// Status of the Common Bandwidth Package.
        /// </summary>
        public readonly string? Status;

        [OutputConstructor]
        private GetCommonBandwidthPackagesResult(
            string? bandwidthPackageName,

            bool? dryRun,

            string id,

            ImmutableArray<string> ids,

            bool? includeReservationData,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            ImmutableArray<Outputs.GetCommonBandwidthPackagesPackageResult> packages,

            string? resourceGroupId,

            string? status)
        {
            BandwidthPackageName = bandwidthPackageName;
            DryRun = dryRun;
            Id = id;
            Ids = ids;
            IncludeReservationData = includeReservationData;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            Packages = packages;
            ResourceGroupId = resourceGroupId;
            Status = status;
        }
    }
}
