1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cen
  5. getBandwidthLimits
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

alicloud.cen.getBandwidthLimits

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const bwl = alicloud.cen.getBandwidthLimits({
        instanceIds: ["cen-id1"],
    });
    export const firstCenBandwidthLimitsLocalRegionId = bwl.then(bwl => bwl.limits?.[0]?.localRegionId);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    bwl = alicloud.cen.get_bandwidth_limits(instance_ids=["cen-id1"])
    pulumi.export("firstCenBandwidthLimitsLocalRegionId", bwl.limits[0].local_region_id)
    
    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 {
    		bwl, err := cen.GetBandwidthLimits(ctx, &cen.GetBandwidthLimitsArgs{
    			InstanceIds: []string{
    				"cen-id1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstCenBandwidthLimitsLocalRegionId", bwl.Limits[0].LocalRegionId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var bwl = AliCloud.Cen.GetBandwidthLimits.Invoke(new()
        {
            InstanceIds = new[]
            {
                "cen-id1",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["firstCenBandwidthLimitsLocalRegionId"] = bwl.Apply(getBandwidthLimitsResult => getBandwidthLimitsResult.Limits[0]?.LocalRegionId),
        };
    });
    
    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.GetBandwidthLimitsArgs;
    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 bwl = CenFunctions.getBandwidthLimits(GetBandwidthLimitsArgs.builder()
                .instanceIds("cen-id1")
                .build());
    
            ctx.export("firstCenBandwidthLimitsLocalRegionId", bwl.applyValue(getBandwidthLimitsResult -> getBandwidthLimitsResult.limits()[0].localRegionId()));
        }
    }
    
    variables:
      bwl:
        fn::invoke:
          Function: alicloud:cen:getBandwidthLimits
          Arguments:
            instanceIds:
              - cen-id1
    outputs:
      firstCenBandwidthLimitsLocalRegionId: ${bwl.limits[0].localRegionId}
    

    Using getBandwidthLimits

    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 getBandwidthLimits(args: GetBandwidthLimitsArgs, opts?: InvokeOptions): Promise<GetBandwidthLimitsResult>
    function getBandwidthLimitsOutput(args: GetBandwidthLimitsOutputArgs, opts?: InvokeOptions): Output<GetBandwidthLimitsResult>
    def get_bandwidth_limits(instance_ids: Optional[Sequence[str]] = None,
                             output_file: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetBandwidthLimitsResult
    def get_bandwidth_limits_output(instance_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetBandwidthLimitsResult]
    func GetBandwidthLimits(ctx *Context, args *GetBandwidthLimitsArgs, opts ...InvokeOption) (*GetBandwidthLimitsResult, error)
    func GetBandwidthLimitsOutput(ctx *Context, args *GetBandwidthLimitsOutputArgs, opts ...InvokeOption) GetBandwidthLimitsResultOutput

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

    public static class GetBandwidthLimits 
    {
        public static Task<GetBandwidthLimitsResult> InvokeAsync(GetBandwidthLimitsArgs args, InvokeOptions? opts = null)
        public static Output<GetBandwidthLimitsResult> Invoke(GetBandwidthLimitsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBandwidthLimitsResult> getBandwidthLimits(GetBandwidthLimitsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cen/getBandwidthLimits:getBandwidthLimits
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceIds List<string>
    A list of CEN instances IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    InstanceIds []string
    A list of CEN instances IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    instanceIds List<String>
    A list of CEN instances IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    instanceIds string[]
    A list of CEN instances IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    instance_ids Sequence[str]
    A list of CEN instances IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    instanceIds List<String>
    A list of CEN instances IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getBandwidthLimits Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Limits List<Pulumi.AliCloud.Cen.Outputs.GetBandwidthLimitsLimit>
    A list of CEN Bandwidth Limits. Each element contains the following attributes:
    InstanceIds List<string>
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Limits []GetBandwidthLimitsLimit
    A list of CEN Bandwidth Limits. Each element contains the following attributes:
    InstanceIds []string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    limits List<GetBandwidthLimitsLimit>
    A list of CEN Bandwidth Limits. Each element contains the following attributes:
    instanceIds List<String>
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    limits GetBandwidthLimitsLimit[]
    A list of CEN Bandwidth Limits. Each element contains the following attributes:
    instanceIds string[]
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    limits Sequence[GetBandwidthLimitsLimit]
    A list of CEN Bandwidth Limits. Each element contains the following attributes:
    instance_ids Sequence[str]
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    limits List<Property Map>
    A list of CEN Bandwidth Limits. Each element contains the following attributes:
    instanceIds List<String>
    outputFile String

    Supporting Types

    GetBandwidthLimitsLimit

    BandwidthLimit int
    The bandwidth limit configured for the interconnected regions communication.
    InstanceId string
    ID of the CEN instance.
    LocalRegionId string
    ID of local region.
    OppositeRegionId string
    ID of opposite region.
    Status string
    Status of the CEN Bandwidth Limit, including "Active" and "Modifying".
    BandwidthLimit int
    The bandwidth limit configured for the interconnected regions communication.
    InstanceId string
    ID of the CEN instance.
    LocalRegionId string
    ID of local region.
    OppositeRegionId string
    ID of opposite region.
    Status string
    Status of the CEN Bandwidth Limit, including "Active" and "Modifying".
    bandwidthLimit Integer
    The bandwidth limit configured for the interconnected regions communication.
    instanceId String
    ID of the CEN instance.
    localRegionId String
    ID of local region.
    oppositeRegionId String
    ID of opposite region.
    status String
    Status of the CEN Bandwidth Limit, including "Active" and "Modifying".
    bandwidthLimit number
    The bandwidth limit configured for the interconnected regions communication.
    instanceId string
    ID of the CEN instance.
    localRegionId string
    ID of local region.
    oppositeRegionId string
    ID of opposite region.
    status string
    Status of the CEN Bandwidth Limit, including "Active" and "Modifying".
    bandwidth_limit int
    The bandwidth limit configured for the interconnected regions communication.
    instance_id str
    ID of the CEN instance.
    local_region_id str
    ID of local region.
    opposite_region_id str
    ID of opposite region.
    status str
    Status of the CEN Bandwidth Limit, including "Active" and "Modifying".
    bandwidthLimit Number
    The bandwidth limit configured for the interconnected regions communication.
    instanceId String
    ID of the CEN instance.
    localRegionId String
    ID of local region.
    oppositeRegionId String
    ID of opposite region.
    status String
    Status of the CEN Bandwidth Limit, including "Active" and "Modifying".

    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.56.0 published on Friday, May 31, 2024 by Pulumi