1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cen
  5. getBandwidthPackages
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.cen.getBandwidthPackages

Explore with Pulumi AI

This data source provides CEN Bandwidth Packages available to the user.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = alicloud.cen.getBandwidthPackages({
    instanceId: "cen-id1",
    nameRegex: "^foo",
});
export const firstCenBandwidthPackageId = example.then(example => example.packages?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.cen.get_bandwidth_packages(instance_id="cen-id1",
    name_regex="^foo")
pulumi.export("firstCenBandwidthPackageId", example.packages[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := cen.GetBandwidthPackages(ctx, &cen.GetBandwidthPackagesArgs{
			InstanceId: pulumi.StringRef("cen-id1"),
			NameRegex:  pulumi.StringRef("^foo"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstCenBandwidthPackageId", example.Packages[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = AliCloud.Cen.GetBandwidthPackages.Invoke(new()
    {
        InstanceId = "cen-id1",
        NameRegex = "^foo",
    });

    return new Dictionary<string, object?>
    {
        ["firstCenBandwidthPackageId"] = example.Apply(getBandwidthPackagesResult => getBandwidthPackagesResult.Packages[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.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 = CenFunctions.getBandwidthPackages(GetBandwidthPackagesArgs.builder()
            .instanceId("cen-id1")
            .nameRegex("^foo")
            .build());

        ctx.export("firstCenBandwidthPackageId", example.applyValue(getBandwidthPackagesResult -> getBandwidthPackagesResult.packages()[0].id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:cen:getBandwidthPackages
      arguments:
        instanceId: cen-id1
        nameRegex: ^foo
outputs:
  firstCenBandwidthPackageId: ${example.packages[0].id}
Copy

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>
Copy
def get_bandwidth_packages(ids: Optional[Sequence[str]] = None,
                           include_reservation_data: Optional[bool] = None,
                           instance_id: Optional[str] = None,
                           name_regex: Optional[str] = None,
                           output_file: Optional[str] = None,
                           status: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetBandwidthPackagesResult
def get_bandwidth_packages_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                           include_reservation_data: Optional[pulumi.Input[bool]] = None,
                           instance_id: Optional[pulumi.Input[str]] = None,
                           name_regex: Optional[pulumi.Input[str]] = None,
                           output_file: Optional[pulumi.Input[str]] = None,
                           status: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetBandwidthPackagesResult]
Copy
func GetBandwidthPackages(ctx *Context, args *GetBandwidthPackagesArgs, opts ...InvokeOption) (*GetBandwidthPackagesResult, error)
func GetBandwidthPackagesOutput(ctx *Context, args *GetBandwidthPackagesOutputArgs, opts ...InvokeOption) GetBandwidthPackagesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetBandwidthPackagesResult> getBandwidthPackages(GetBandwidthPackagesArgs args, InvokeOptions options)
public static Output<GetBandwidthPackagesResult> getBandwidthPackages(GetBandwidthPackagesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cen/getBandwidthPackages:getBandwidthPackages
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
Limit search to a list of specific CEN Bandwidth Package IDs.
IncludeReservationData Changes to this property will trigger replacement. bool
Indicates whether to include renewal data. Valid values: true: Return renewal data in the response. false: Do not return renewal data in the response.
InstanceId Changes to this property will trigger replacement. string
ID of a CEN instance.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter CEN Bandwidth Package by name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
Ids Changes to this property will trigger replacement. []string
Limit search to a list of specific CEN Bandwidth Package IDs.
IncludeReservationData Changes to this property will trigger replacement. bool
Indicates whether to include renewal data. Valid values: true: Return renewal data in the response. false: Do not return renewal data in the response.
InstanceId Changes to this property will trigger replacement. string
ID of a CEN instance.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter CEN Bandwidth Package by name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
ids Changes to this property will trigger replacement. List<String>
Limit search to a list of specific CEN Bandwidth Package IDs.
includeReservationData Changes to this property will trigger replacement. Boolean
Indicates whether to include renewal data. Valid values: true: Return renewal data in the response. false: Do not return renewal data in the response.
instanceId Changes to this property will trigger replacement. String
ID of a CEN instance.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter CEN Bandwidth Package by name.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
ids Changes to this property will trigger replacement. string[]
Limit search to a list of specific CEN Bandwidth Package IDs.
includeReservationData Changes to this property will trigger replacement. boolean
Indicates whether to include renewal data. Valid values: true: Return renewal data in the response. false: Do not return renewal data in the response.
instanceId Changes to this property will trigger replacement. string
ID of a CEN instance.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter CEN Bandwidth Package by name.
outputFile string
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. string
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
ids Changes to this property will trigger replacement. Sequence[str]
Limit search to a list of specific CEN Bandwidth Package IDs.
include_reservation_data Changes to this property will trigger replacement. bool
Indicates whether to include renewal data. Valid values: true: Return renewal data in the response. false: Do not return renewal data in the response.
instance_id Changes to this property will trigger replacement. str
ID of a CEN instance.
name_regex Changes to this property will trigger replacement. str
A regex string to filter CEN Bandwidth Package by name.
output_file str
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. str
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
ids Changes to this property will trigger replacement. List<String>
Limit search to a list of specific CEN Bandwidth Package IDs.
includeReservationData Changes to this property will trigger replacement. Boolean
Indicates whether to include renewal data. Valid values: true: Return renewal data in the response. false: Do not return renewal data in the response.
instanceId Changes to this property will trigger replacement. String
ID of a CEN instance.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter CEN Bandwidth Package by name.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.

getBandwidthPackages Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of specific CEN Bandwidth Package IDs.
Names List<string>
(Available in 1.98.0+) - A list of CEN Bandwidth Package Names.
Packages List<Pulumi.AliCloud.Cen.Outputs.GetBandwidthPackagesPackage>
A list of CEN bandwidth package. Each element contains the following attributes:
IncludeReservationData bool
InstanceId string
The ID of the CEN instance that are associated with the bandwidth package.
NameRegex string
OutputFile string
Status string
Status of the CEN Bandwidth Package in CEN instance, including Idle and InUse.
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of specific CEN Bandwidth Package IDs.
Names []string
(Available in 1.98.0+) - A list of CEN Bandwidth Package Names.
Packages []GetBandwidthPackagesPackage
A list of CEN bandwidth package. Each element contains the following attributes:
IncludeReservationData bool
InstanceId string
The ID of the CEN instance that are associated with the bandwidth package.
NameRegex string
OutputFile string
Status string
Status of the CEN Bandwidth Package in CEN instance, including Idle and InUse.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of specific CEN Bandwidth Package IDs.
names List<String>
(Available in 1.98.0+) - A list of CEN Bandwidth Package Names.
packages List<GetBandwidthPackagesPackage>
A list of CEN bandwidth package. Each element contains the following attributes:
includeReservationData Boolean
instanceId String
The ID of the CEN instance that are associated with the bandwidth package.
nameRegex String
outputFile String
status String
Status of the CEN Bandwidth Package in CEN instance, including Idle and InUse.
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of specific CEN Bandwidth Package IDs.
names string[]
(Available in 1.98.0+) - A list of CEN Bandwidth Package Names.
packages GetBandwidthPackagesPackage[]
A list of CEN bandwidth package. Each element contains the following attributes:
includeReservationData boolean
instanceId string
The ID of the CEN instance that are associated with the bandwidth package.
nameRegex string
outputFile string
status string
Status of the CEN Bandwidth Package in CEN instance, including Idle and InUse.
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of specific CEN Bandwidth Package IDs.
names Sequence[str]
(Available in 1.98.0+) - A list of CEN Bandwidth Package Names.
packages Sequence[GetBandwidthPackagesPackage]
A list of CEN bandwidth package. Each element contains the following attributes:
include_reservation_data bool
instance_id str
The ID of the CEN instance that are associated with the bandwidth package.
name_regex str
output_file str
status str
Status of the CEN Bandwidth Package in CEN instance, including Idle and InUse.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of specific CEN Bandwidth Package IDs.
names List<String>
(Available in 1.98.0+) - A list of CEN Bandwidth Package Names.
packages List<Property Map>
A list of CEN bandwidth package. Each element contains the following attributes:
includeReservationData Boolean
instanceId String
The ID of the CEN instance that are associated with the bandwidth package.
nameRegex String
outputFile String
status String
Status of the CEN Bandwidth Package in CEN instance, including Idle and InUse.

Supporting Types

GetBandwidthPackagesPackage

Bandwidth This property is required. int
The bandwidth in Mbps of the CEN bandwidth package.
BandwidthPackageChargeType This property is required. string
The billing method, including POSTPAY and PREPAY.
BusinessStatus This property is required. string
Status of the CEN Bandwidth Package, including Normal, FinancialLocked and SecurityLocked.
CenBandwidthPackageId This property is required. string
The ID of the bandwidth package.
CenBandwidthPackageName This property is required. string
The name of the bandwidth package.
CenIds This property is required. List<string>
The list of CEN instances that are associated with the bandwidth package.
Description This property is required. string
Description of the CEN Bandwidth Package.
ExpiredTime This property is required. string
GeographicRegionAId This property is required. string
Region ID of the interconnected regions.
GeographicRegionBId This property is required. string
Region ID of the interconnected regions.
GeographicSpanId This property is required. string
The area ID of the cross-area connection.
HasReservationData This property is required. string
Indicates whether renewal data is involved.
Id This property is required. string
ID of the CEN Bandwidth Package.
InstanceId This property is required. string
ID of a CEN instance.
IsCrossBorder This property is required. bool
Indicates whether the bandwidth package is a cross-border bandwidth package.
Name This property is required. string
Name of the CEN Bandwidth Package.
PaymentType This property is required. string
The billing method of the bandwidth package.
ReservationActiveTime This property is required. string
The expiration time of the temporary upgrade.
ReservationBandwidth This property is required. string
The restored bandwidth after the temporary upgrade.
ReservationInternetChargeType This property is required. string
The billing method after the configuration change.
ReservationOrderType This property is required. string
The type of the configuration change.
Status This property is required. string
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
Bandwidth This property is required. int
The bandwidth in Mbps of the CEN bandwidth package.
BandwidthPackageChargeType This property is required. string
The billing method, including POSTPAY and PREPAY.
BusinessStatus This property is required. string
Status of the CEN Bandwidth Package, including Normal, FinancialLocked and SecurityLocked.
CenBandwidthPackageId This property is required. string
The ID of the bandwidth package.
CenBandwidthPackageName This property is required. string
The name of the bandwidth package.
CenIds This property is required. []string
The list of CEN instances that are associated with the bandwidth package.
Description This property is required. string
Description of the CEN Bandwidth Package.
ExpiredTime This property is required. string
GeographicRegionAId This property is required. string
Region ID of the interconnected regions.
GeographicRegionBId This property is required. string
Region ID of the interconnected regions.
GeographicSpanId This property is required. string
The area ID of the cross-area connection.
HasReservationData This property is required. string
Indicates whether renewal data is involved.
Id This property is required. string
ID of the CEN Bandwidth Package.
InstanceId This property is required. string
ID of a CEN instance.
IsCrossBorder This property is required. bool
Indicates whether the bandwidth package is a cross-border bandwidth package.
Name This property is required. string
Name of the CEN Bandwidth Package.
PaymentType This property is required. string
The billing method of the bandwidth package.
ReservationActiveTime This property is required. string
The expiration time of the temporary upgrade.
ReservationBandwidth This property is required. string
The restored bandwidth after the temporary upgrade.
ReservationInternetChargeType This property is required. string
The billing method after the configuration change.
ReservationOrderType This property is required. string
The type of the configuration change.
Status This property is required. string
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
bandwidth This property is required. Integer
The bandwidth in Mbps of the CEN bandwidth package.
bandwidthPackageChargeType This property is required. String
The billing method, including POSTPAY and PREPAY.
businessStatus This property is required. String
Status of the CEN Bandwidth Package, including Normal, FinancialLocked and SecurityLocked.
cenBandwidthPackageId This property is required. String
The ID of the bandwidth package.
cenBandwidthPackageName This property is required. String
The name of the bandwidth package.
cenIds This property is required. List<String>
The list of CEN instances that are associated with the bandwidth package.
description This property is required. String
Description of the CEN Bandwidth Package.
expiredTime This property is required. String
geographicRegionAId This property is required. String
Region ID of the interconnected regions.
geographicRegionBId This property is required. String
Region ID of the interconnected regions.
geographicSpanId This property is required. String
The area ID of the cross-area connection.
hasReservationData This property is required. String
Indicates whether renewal data is involved.
id This property is required. String
ID of the CEN Bandwidth Package.
instanceId This property is required. String
ID of a CEN instance.
isCrossBorder This property is required. Boolean
Indicates whether the bandwidth package is a cross-border bandwidth package.
name This property is required. String
Name of the CEN Bandwidth Package.
paymentType This property is required. String
The billing method of the bandwidth package.
reservationActiveTime This property is required. String
The expiration time of the temporary upgrade.
reservationBandwidth This property is required. String
The restored bandwidth after the temporary upgrade.
reservationInternetChargeType This property is required. String
The billing method after the configuration change.
reservationOrderType This property is required. String
The type of the configuration change.
status This property is required. String
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
bandwidth This property is required. number
The bandwidth in Mbps of the CEN bandwidth package.
bandwidthPackageChargeType This property is required. string
The billing method, including POSTPAY and PREPAY.
businessStatus This property is required. string
Status of the CEN Bandwidth Package, including Normal, FinancialLocked and SecurityLocked.
cenBandwidthPackageId This property is required. string
The ID of the bandwidth package.
cenBandwidthPackageName This property is required. string
The name of the bandwidth package.
cenIds This property is required. string[]
The list of CEN instances that are associated with the bandwidth package.
description This property is required. string
Description of the CEN Bandwidth Package.
expiredTime This property is required. string
geographicRegionAId This property is required. string
Region ID of the interconnected regions.
geographicRegionBId This property is required. string
Region ID of the interconnected regions.
geographicSpanId This property is required. string
The area ID of the cross-area connection.
hasReservationData This property is required. string
Indicates whether renewal data is involved.
id This property is required. string
ID of the CEN Bandwidth Package.
instanceId This property is required. string
ID of a CEN instance.
isCrossBorder This property is required. boolean
Indicates whether the bandwidth package is a cross-border bandwidth package.
name This property is required. string
Name of the CEN Bandwidth Package.
paymentType This property is required. string
The billing method of the bandwidth package.
reservationActiveTime This property is required. string
The expiration time of the temporary upgrade.
reservationBandwidth This property is required. string
The restored bandwidth after the temporary upgrade.
reservationInternetChargeType This property is required. string
The billing method after the configuration change.
reservationOrderType This property is required. string
The type of the configuration change.
status This property is required. string
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
bandwidth This property is required. int
The bandwidth in Mbps of the CEN bandwidth package.
bandwidth_package_charge_type This property is required. str
The billing method, including POSTPAY and PREPAY.
business_status This property is required. str
Status of the CEN Bandwidth Package, including Normal, FinancialLocked and SecurityLocked.
cen_bandwidth_package_id This property is required. str
The ID of the bandwidth package.
cen_bandwidth_package_name This property is required. str
The name of the bandwidth package.
cen_ids This property is required. Sequence[str]
The list of CEN instances that are associated with the bandwidth package.
description This property is required. str
Description of the CEN Bandwidth Package.
expired_time This property is required. str
geographic_region_a_id This property is required. str
Region ID of the interconnected regions.
geographic_region_b_id This property is required. str
Region ID of the interconnected regions.
geographic_span_id This property is required. str
The area ID of the cross-area connection.
has_reservation_data This property is required. str
Indicates whether renewal data is involved.
id This property is required. str
ID of the CEN Bandwidth Package.
instance_id This property is required. str
ID of a CEN instance.
is_cross_border This property is required. bool
Indicates whether the bandwidth package is a cross-border bandwidth package.
name This property is required. str
Name of the CEN Bandwidth Package.
payment_type This property is required. str
The billing method of the bandwidth package.
reservation_active_time This property is required. str
The expiration time of the temporary upgrade.
reservation_bandwidth This property is required. str
The restored bandwidth after the temporary upgrade.
reservation_internet_charge_type This property is required. str
The billing method after the configuration change.
reservation_order_type This property is required. str
The type of the configuration change.
status This property is required. str
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.
bandwidth This property is required. Number
The bandwidth in Mbps of the CEN bandwidth package.
bandwidthPackageChargeType This property is required. String
The billing method, including POSTPAY and PREPAY.
businessStatus This property is required. String
Status of the CEN Bandwidth Package, including Normal, FinancialLocked and SecurityLocked.
cenBandwidthPackageId This property is required. String
The ID of the bandwidth package.
cenBandwidthPackageName This property is required. String
The name of the bandwidth package.
cenIds This property is required. List<String>
The list of CEN instances that are associated with the bandwidth package.
description This property is required. String
Description of the CEN Bandwidth Package.
expiredTime This property is required. String
geographicRegionAId This property is required. String
Region ID of the interconnected regions.
geographicRegionBId This property is required. String
Region ID of the interconnected regions.
geographicSpanId This property is required. String
The area ID of the cross-area connection.
hasReservationData This property is required. String
Indicates whether renewal data is involved.
id This property is required. String
ID of the CEN Bandwidth Package.
instanceId This property is required. String
ID of a CEN instance.
isCrossBorder This property is required. Boolean
Indicates whether the bandwidth package is a cross-border bandwidth package.
name This property is required. String
Name of the CEN Bandwidth Package.
paymentType This property is required. String
The billing method of the bandwidth package.
reservationActiveTime This property is required. String
The expiration time of the temporary upgrade.
reservationBandwidth This property is required. String
The restored bandwidth after the temporary upgrade.
reservationInternetChargeType This property is required. String
The billing method after the configuration change.
reservationOrderType This property is required. String
The type of the configuration change.
status This property is required. String
Status of the CEN Bandwidth Package in CEN instance, Valid value: Idle and InUse.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.