1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ga
  5. getBandwidthPackages
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi

alicloud.ga.getBandwidthPackages

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi

    This data source provides the Global Accelerator (GA) Bandwidth Packages of the current Alibaba Cloud user.

    NOTE: Available in v1.112.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.ga.getBandwidthPackages({
        ids: ["example_value"],
        nameRegex: "the_resource_name",
    });
    export const firstGaBandwidthPackageId = example.then(example => example.packages?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.ga.get_bandwidth_packages(ids=["example_value"],
        name_regex="the_resource_name")
    pulumi.export("firstGaBandwidthPackageId", example.packages[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ga.GetBandwidthPackages(ctx, &ga.GetBandwidthPackagesArgs{
    			Ids: []string{
    				"example_value",
    			},
    			NameRegex: pulumi.StringRef("the_resource_name"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstGaBandwidthPackageId", example.Packages[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Ga.GetBandwidthPackages.Invoke(new()
        {
            Ids = new[]
            {
                "example_value",
            },
            NameRegex = "the_resource_name",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstGaBandwidthPackageId"] = example.Apply(getBandwidthPackagesResult => getBandwidthPackagesResult.Packages[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ga.GaFunctions;
    import com.pulumi.alicloud.ga.inputs.GetBandwidthPackagesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = GaFunctions.getBandwidthPackages(GetBandwidthPackagesArgs.builder()
                .ids("example_value")
                .nameRegex("the_resource_name")
                .build());
    
            ctx.export("firstGaBandwidthPackageId", example.applyValue(getBandwidthPackagesResult -> getBandwidthPackagesResult.packages()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:ga:getBandwidthPackages
          Arguments:
            ids:
              - example_value
            nameRegex: the_resource_name
    outputs:
      firstGaBandwidthPackageId: ${example.packages[0].id}
    

    Using getBandwidthPackages

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getBandwidthPackages(args: GetBandwidthPackagesArgs, opts?: InvokeOptions): Promise<GetBandwidthPackagesResult>
    function getBandwidthPackagesOutput(args: GetBandwidthPackagesOutputArgs, opts?: InvokeOptions): Output<GetBandwidthPackagesResult>
    def get_bandwidth_packages(enable_details: Optional[bool] = None,
                               ids: Optional[Sequence[str]] = None,
                               name_regex: Optional[str] = None,
                               output_file: Optional[str] = None,
                               status: Optional[str] = None,
                               type: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetBandwidthPackagesResult
    def get_bandwidth_packages_output(enable_details: Optional[pulumi.Input[bool]] = None,
                               ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                               name_regex: Optional[pulumi.Input[str]] = None,
                               output_file: Optional[pulumi.Input[str]] = None,
                               status: Optional[pulumi.Input[str]] = None,
                               type: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetBandwidthPackagesResult]
    func GetBandwidthPackages(ctx *Context, args *GetBandwidthPackagesArgs, opts ...InvokeOption) (*GetBandwidthPackagesResult, error)
    func GetBandwidthPackagesOutput(ctx *Context, args *GetBandwidthPackagesOutputArgs, opts ...InvokeOption) GetBandwidthPackagesResultOutput

    > Note: This function is named GetBandwidthPackages in the Go SDK.

    public static class GetBandwidthPackages 
    {
        public static Task<GetBandwidthPackagesResult> InvokeAsync(GetBandwidthPackagesArgs args, InvokeOptions? opts = null)
        public static Output<GetBandwidthPackagesResult> Invoke(GetBandwidthPackagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBandwidthPackagesResult> getBandwidthPackages(GetBandwidthPackagesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:ga/getBandwidthPackages:getBandwidthPackages
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids List<string>
    A list of Bandwidth Package IDs.
    NameRegex string
    A regex string to filter results by Bandwidth Package name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the bandwidth plan.
    Type string
    The type of the bandwidth packet. China station only supports return to basic.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids []string
    A list of Bandwidth Package IDs.
    NameRegex string
    A regex string to filter results by Bandwidth Package name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the bandwidth plan.
    Type string
    The type of the bandwidth packet. China station only supports return to basic.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Bandwidth Package IDs.
    nameRegex String
    A regex string to filter results by Bandwidth Package name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the bandwidth plan.
    type String
    The type of the bandwidth packet. China station only supports return to basic.
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids string[]
    A list of Bandwidth Package IDs.
    nameRegex string
    A regex string to filter results by Bandwidth Package name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the bandwidth plan.
    type string
    The type of the bandwidth packet. China station only supports return to basic.
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    ids Sequence[str]
    A list of Bandwidth Package IDs.
    name_regex str
    A regex string to filter results by Bandwidth Package name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the bandwidth plan.
    type str
    The type of the bandwidth packet. China station only supports return to basic.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Bandwidth Package IDs.
    nameRegex String
    A regex string to filter results by Bandwidth Package name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the bandwidth plan.
    type String
    The type of the bandwidth packet. China station only supports return to basic.

    getBandwidthPackages Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Packages List<Pulumi.AliCloud.Ga.Outputs.GetBandwidthPackagesPackage>
    EnableDetails bool
    NameRegex string
    OutputFile string
    Status string
    Type string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Packages []GetBandwidthPackagesPackage
    EnableDetails bool
    NameRegex string
    OutputFile string
    Status string
    Type string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    packages List<GetBandwidthPackagesPackage>
    enableDetails Boolean
    nameRegex String
    outputFile String
    status String
    type String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    packages GetBandwidthPackagesPackage[]
    enableDetails boolean
    nameRegex string
    outputFile string
    status string
    type string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    packages Sequence[GetBandwidthPackagesPackage]
    enable_details bool
    name_regex str
    output_file str
    status str
    type str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    packages List<Property Map>
    enableDetails Boolean
    nameRegex String
    outputFile String
    status String
    type String

    Supporting Types

    GetBandwidthPackagesPackage

    Bandwidth int
    The bandwidth value of bandwidth packet.
    BandwidthPackageId string
    The Resource ID of the bandwidth.
    BandwidthPackageName string
    The name of the bandwidth packet.
    BandwidthType string
    The bandwidth type of the bandwidth.
    CbnGeographicRegionIda string
    Interworking area A of cross domain acceleration package. Only international stations support returning this parameter.
    CbnGeographicRegionIdb string
    Interworking area B of cross domain acceleration package. Only international stations support returning this parameter.
    Description string
    The description of bandwidth package.
    ExpiredTime string
    Bandwidth package expiration time.
    Id string
    The ID of the Bandwidth Package.
    PaymentType string
    The payment type of the bandwidth.
    Status string
    The status of the bandwidth plan.
    Type string
    The type of the bandwidth packet. China station only supports return to basic.
    Bandwidth int
    The bandwidth value of bandwidth packet.
    BandwidthPackageId string
    The Resource ID of the bandwidth.
    BandwidthPackageName string
    The name of the bandwidth packet.
    BandwidthType string
    The bandwidth type of the bandwidth.
    CbnGeographicRegionIda string
    Interworking area A of cross domain acceleration package. Only international stations support returning this parameter.
    CbnGeographicRegionIdb string
    Interworking area B of cross domain acceleration package. Only international stations support returning this parameter.
    Description string
    The description of bandwidth package.
    ExpiredTime string
    Bandwidth package expiration time.
    Id string
    The ID of the Bandwidth Package.
    PaymentType string
    The payment type of the bandwidth.
    Status string
    The status of the bandwidth plan.
    Type string
    The type of the bandwidth packet. China station only supports return to basic.
    bandwidth Integer
    The bandwidth value of bandwidth packet.
    bandwidthPackageId String
    The Resource ID of the bandwidth.
    bandwidthPackageName String
    The name of the bandwidth packet.
    bandwidthType String
    The bandwidth type of the bandwidth.
    cbnGeographicRegionIda String
    Interworking area A of cross domain acceleration package. Only international stations support returning this parameter.
    cbnGeographicRegionIdb String
    Interworking area B of cross domain acceleration package. Only international stations support returning this parameter.
    description String
    The description of bandwidth package.
    expiredTime String
    Bandwidth package expiration time.
    id String
    The ID of the Bandwidth Package.
    paymentType String
    The payment type of the bandwidth.
    status String
    The status of the bandwidth plan.
    type String
    The type of the bandwidth packet. China station only supports return to basic.
    bandwidth number
    The bandwidth value of bandwidth packet.
    bandwidthPackageId string
    The Resource ID of the bandwidth.
    bandwidthPackageName string
    The name of the bandwidth packet.
    bandwidthType string
    The bandwidth type of the bandwidth.
    cbnGeographicRegionIda string
    Interworking area A of cross domain acceleration package. Only international stations support returning this parameter.
    cbnGeographicRegionIdb string
    Interworking area B of cross domain acceleration package. Only international stations support returning this parameter.
    description string
    The description of bandwidth package.
    expiredTime string
    Bandwidth package expiration time.
    id string
    The ID of the Bandwidth Package.
    paymentType string
    The payment type of the bandwidth.
    status string
    The status of the bandwidth plan.
    type string
    The type of the bandwidth packet. China station only supports return to basic.
    bandwidth int
    The bandwidth value of bandwidth packet.
    bandwidth_package_id str
    The Resource ID of the bandwidth.
    bandwidth_package_name str
    The name of the bandwidth packet.
    bandwidth_type str
    The bandwidth type of the bandwidth.
    cbn_geographic_region_ida str
    Interworking area A of cross domain acceleration package. Only international stations support returning this parameter.
    cbn_geographic_region_idb str
    Interworking area B of cross domain acceleration package. Only international stations support returning this parameter.
    description str
    The description of bandwidth package.
    expired_time str
    Bandwidth package expiration time.
    id str
    The ID of the Bandwidth Package.
    payment_type str
    The payment type of the bandwidth.
    status str
    The status of the bandwidth plan.
    type str
    The type of the bandwidth packet. China station only supports return to basic.
    bandwidth Number
    The bandwidth value of bandwidth packet.
    bandwidthPackageId String
    The Resource ID of the bandwidth.
    bandwidthPackageName String
    The name of the bandwidth packet.
    bandwidthType String
    The bandwidth type of the bandwidth.
    cbnGeographicRegionIda String
    Interworking area A of cross domain acceleration package. Only international stations support returning this parameter.
    cbnGeographicRegionIdb String
    Interworking area B of cross domain acceleration package. Only international stations support returning this parameter.
    description String
    The description of bandwidth package.
    expiredTime String
    Bandwidth package expiration time.
    id String
    The ID of the Bandwidth Package.
    paymentType String
    The payment type of the bandwidth.
    status String
    The status of the bandwidth plan.
    type String
    The type of the bandwidth packet. China station only supports return to basic.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi