1. Packages
  2. Volcengine
  3. API Docs
  4. cen
  5. InterRegionBandwidths
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.cen.InterRegionBandwidths

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Use this data source to query detailed information of cen inter region bandwidths

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooCen = new Volcengine.Cen.Cen("fooCen", new()
        {
            CenName = "acc-test-cen",
            Description = "acc-test",
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Cen.Inputs.CenTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var fooBandwidthPackage = new Volcengine.Cen.BandwidthPackage("fooBandwidthPackage", new()
        {
            LocalGeographicRegionSetId = "China",
            PeerGeographicRegionSetId = "China",
            Bandwidth = 5,
            CenBandwidthPackageName = "acc-test-cen-bp",
            Description = "acc-test",
            BillingType = "PrePaid",
            PeriodUnit = "Month",
            Period = 1,
            ProjectName = "default",
            Tags = new[]
            {
                new Volcengine.Cen.Inputs.BandwidthPackageTagArgs
                {
                    Key = "k1",
                    Value = "v1",
                },
            },
        });
    
        var fooBandwidthPackageAssociate = new Volcengine.Cen.BandwidthPackageAssociate("fooBandwidthPackageAssociate", new()
        {
            CenBandwidthPackageId = fooBandwidthPackage.Id,
            CenId = fooCen.Id,
        });
    
        var fooInterRegionBandwidth = new Volcengine.Cen.InterRegionBandwidth("fooInterRegionBandwidth", new()
        {
            CenId = fooCen.Id,
            LocalRegionId = "cn-beijing",
            PeerRegionId = "cn-shanghai",
            Bandwidth = 2,
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                fooBandwidthPackageAssociate,
            },
        });
    
        var fooInterRegionBandwidths = Volcengine.Cen.InterRegionBandwidths.Invoke(new()
        {
            Ids = new[]
            {
                fooInterRegionBandwidth.Id,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cen"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooCen, err := cen.NewCen(ctx, "fooCen", &cen.CenArgs{
    			CenName:     pulumi.String("acc-test-cen"),
    			Description: pulumi.String("acc-test"),
    			ProjectName: pulumi.String("default"),
    			Tags: cen.CenTagArray{
    				&cen.CenTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		fooBandwidthPackage, err := cen.NewBandwidthPackage(ctx, "fooBandwidthPackage", &cen.BandwidthPackageArgs{
    			LocalGeographicRegionSetId: pulumi.String("China"),
    			PeerGeographicRegionSetId:  pulumi.String("China"),
    			Bandwidth:                  pulumi.Int(5),
    			CenBandwidthPackageName:    pulumi.String("acc-test-cen-bp"),
    			Description:                pulumi.String("acc-test"),
    			BillingType:                pulumi.String("PrePaid"),
    			PeriodUnit:                 pulumi.String("Month"),
    			Period:                     pulumi.Int(1),
    			ProjectName:                pulumi.String("default"),
    			Tags: cen.BandwidthPackageTagArray{
    				&cen.BandwidthPackageTagArgs{
    					Key:   pulumi.String("k1"),
    					Value: pulumi.String("v1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		fooBandwidthPackageAssociate, err := cen.NewBandwidthPackageAssociate(ctx, "fooBandwidthPackageAssociate", &cen.BandwidthPackageAssociateArgs{
    			CenBandwidthPackageId: fooBandwidthPackage.ID(),
    			CenId:                 fooCen.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooInterRegionBandwidth, err := cen.NewInterRegionBandwidth(ctx, "fooInterRegionBandwidth", &cen.InterRegionBandwidthArgs{
    			CenId:         fooCen.ID(),
    			LocalRegionId: pulumi.String("cn-beijing"),
    			PeerRegionId:  pulumi.String("cn-shanghai"),
    			Bandwidth:     pulumi.Int(2),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			fooBandwidthPackageAssociate,
    		}))
    		if err != nil {
    			return err
    		}
    		_ = cen.InterRegionBandwidthsOutput(ctx, cen.InterRegionBandwidthsOutputArgs{
    			Ids: pulumi.StringArray{
    				fooInterRegionBandwidth.ID(),
    			},
    		}, nil)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.cen.Cen;
    import com.pulumi.volcengine.cen.CenArgs;
    import com.pulumi.volcengine.cen.inputs.CenTagArgs;
    import com.pulumi.volcengine.cen.BandwidthPackage;
    import com.pulumi.volcengine.cen.BandwidthPackageArgs;
    import com.pulumi.volcengine.cen.inputs.BandwidthPackageTagArgs;
    import com.pulumi.volcengine.cen.BandwidthPackageAssociate;
    import com.pulumi.volcengine.cen.BandwidthPackageAssociateArgs;
    import com.pulumi.volcengine.cen.InterRegionBandwidth;
    import com.pulumi.volcengine.cen.InterRegionBandwidthArgs;
    import com.pulumi.volcengine.cen.CenFunctions;
    import com.pulumi.volcengine.cen.inputs.InterRegionBandwidthsArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            var fooCen = new Cen("fooCen", CenArgs.builder()        
                .cenName("acc-test-cen")
                .description("acc-test")
                .projectName("default")
                .tags(CenTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var fooBandwidthPackage = new BandwidthPackage("fooBandwidthPackage", BandwidthPackageArgs.builder()        
                .localGeographicRegionSetId("China")
                .peerGeographicRegionSetId("China")
                .bandwidth(5)
                .cenBandwidthPackageName("acc-test-cen-bp")
                .description("acc-test")
                .billingType("PrePaid")
                .periodUnit("Month")
                .period(1)
                .projectName("default")
                .tags(BandwidthPackageTagArgs.builder()
                    .key("k1")
                    .value("v1")
                    .build())
                .build());
    
            var fooBandwidthPackageAssociate = new BandwidthPackageAssociate("fooBandwidthPackageAssociate", BandwidthPackageAssociateArgs.builder()        
                .cenBandwidthPackageId(fooBandwidthPackage.id())
                .cenId(fooCen.id())
                .build());
    
            var fooInterRegionBandwidth = new InterRegionBandwidth("fooInterRegionBandwidth", InterRegionBandwidthArgs.builder()        
                .cenId(fooCen.id())
                .localRegionId("cn-beijing")
                .peerRegionId("cn-shanghai")
                .bandwidth(2)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(fooBandwidthPackageAssociate)
                    .build());
    
            final var fooInterRegionBandwidths = CenFunctions.InterRegionBandwidths(InterRegionBandwidthsArgs.builder()
                .ids(fooInterRegionBandwidth.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_cen = volcengine.cen.Cen("fooCen",
        cen_name="acc-test-cen",
        description="acc-test",
        project_name="default",
        tags=[volcengine.cen.CenTagArgs(
            key="k1",
            value="v1",
        )])
    foo_bandwidth_package = volcengine.cen.BandwidthPackage("fooBandwidthPackage",
        local_geographic_region_set_id="China",
        peer_geographic_region_set_id="China",
        bandwidth=5,
        cen_bandwidth_package_name="acc-test-cen-bp",
        description="acc-test",
        billing_type="PrePaid",
        period_unit="Month",
        period=1,
        project_name="default",
        tags=[volcengine.cen.BandwidthPackageTagArgs(
            key="k1",
            value="v1",
        )])
    foo_bandwidth_package_associate = volcengine.cen.BandwidthPackageAssociate("fooBandwidthPackageAssociate",
        cen_bandwidth_package_id=foo_bandwidth_package.id,
        cen_id=foo_cen.id)
    foo_inter_region_bandwidth = volcengine.cen.InterRegionBandwidth("fooInterRegionBandwidth",
        cen_id=foo_cen.id,
        local_region_id="cn-beijing",
        peer_region_id="cn-shanghai",
        bandwidth=2,
        opts=pulumi.ResourceOptions(depends_on=[foo_bandwidth_package_associate]))
    foo_inter_region_bandwidths = volcengine.cen.inter_region_bandwidths_output(ids=[foo_inter_region_bandwidth.id])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooCen = new volcengine.cen.Cen("fooCen", {
        cenName: "acc-test-cen",
        description: "acc-test",
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const fooBandwidthPackage = new volcengine.cen.BandwidthPackage("fooBandwidthPackage", {
        localGeographicRegionSetId: "China",
        peerGeographicRegionSetId: "China",
        bandwidth: 5,
        cenBandwidthPackageName: "acc-test-cen-bp",
        description: "acc-test",
        billingType: "PrePaid",
        periodUnit: "Month",
        period: 1,
        projectName: "default",
        tags: [{
            key: "k1",
            value: "v1",
        }],
    });
    const fooBandwidthPackageAssociate = new volcengine.cen.BandwidthPackageAssociate("fooBandwidthPackageAssociate", {
        cenBandwidthPackageId: fooBandwidthPackage.id,
        cenId: fooCen.id,
    });
    const fooInterRegionBandwidth = new volcengine.cen.InterRegionBandwidth("fooInterRegionBandwidth", {
        cenId: fooCen.id,
        localRegionId: "cn-beijing",
        peerRegionId: "cn-shanghai",
        bandwidth: 2,
    }, {
        dependsOn: [fooBandwidthPackageAssociate],
    });
    const fooInterRegionBandwidths = volcengine.cen.InterRegionBandwidthsOutput({
        ids: [fooInterRegionBandwidth.id],
    });
    
    resources:
      fooCen:
        type: volcengine:cen:Cen
        properties:
          cenName: acc-test-cen
          description: acc-test
          projectName: default
          tags:
            - key: k1
              value: v1
      fooBandwidthPackage:
        type: volcengine:cen:BandwidthPackage
        properties:
          localGeographicRegionSetId: China
          peerGeographicRegionSetId: China
          bandwidth: 5
          cenBandwidthPackageName: acc-test-cen-bp
          description: acc-test
          billingType: PrePaid
          periodUnit: Month
          period: 1
          projectName: default
          tags:
            - key: k1
              value: v1
      fooBandwidthPackageAssociate:
        type: volcengine:cen:BandwidthPackageAssociate
        properties:
          cenBandwidthPackageId: ${fooBandwidthPackage.id}
          cenId: ${fooCen.id}
      fooInterRegionBandwidth:
        type: volcengine:cen:InterRegionBandwidth
        properties:
          cenId: ${fooCen.id}
          localRegionId: cn-beijing
          peerRegionId: cn-shanghai
          bandwidth: 2
        options:
          dependson:
            - ${fooBandwidthPackageAssociate}
    variables:
      fooInterRegionBandwidths:
        fn::invoke:
          Function: volcengine:cen:InterRegionBandwidths
          Arguments:
            ids:
              - ${fooInterRegionBandwidth.id}
    

    Using InterRegionBandwidths

    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 interRegionBandwidths(args: InterRegionBandwidthsArgs, opts?: InvokeOptions): Promise<InterRegionBandwidthsResult>
    function interRegionBandwidthsOutput(args: InterRegionBandwidthsOutputArgs, opts?: InvokeOptions): Output<InterRegionBandwidthsResult>
    def inter_region_bandwidths(ids: Optional[Sequence[str]] = None,
                                output_file: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> InterRegionBandwidthsResult
    def inter_region_bandwidths_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                output_file: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[InterRegionBandwidthsResult]
    func InterRegionBandwidths(ctx *Context, args *InterRegionBandwidthsArgs, opts ...InvokeOption) (*InterRegionBandwidthsResult, error)
    func InterRegionBandwidthsOutput(ctx *Context, args *InterRegionBandwidthsOutputArgs, opts ...InvokeOption) InterRegionBandwidthsResultOutput
    public static class InterRegionBandwidths 
    {
        public static Task<InterRegionBandwidthsResult> InvokeAsync(InterRegionBandwidthsArgs args, InvokeOptions? opts = null)
        public static Output<InterRegionBandwidthsResult> Invoke(InterRegionBandwidthsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<InterRegionBandwidthsResult> interRegionBandwidths(InterRegionBandwidthsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: volcengine:cen:InterRegionBandwidths
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of cen inter region bandwidth IDs.
    OutputFile string
    File name where to save data source results.
    Ids []string
    A list of cen inter region bandwidth IDs.
    OutputFile string
    File name where to save data source results.
    ids List<String>
    A list of cen inter region bandwidth IDs.
    outputFile String
    File name where to save data source results.
    ids string[]
    A list of cen inter region bandwidth IDs.
    outputFile string
    File name where to save data source results.
    ids Sequence[str]
    A list of cen inter region bandwidth IDs.
    output_file str
    File name where to save data source results.
    ids List<String>
    A list of cen inter region bandwidth IDs.
    outputFile String
    File name where to save data source results.

    InterRegionBandwidths Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    InterRegionBandwidths List<InterRegionBandwidthsInterRegionBandwidth>
    The collection of cen inter region bandwidth query.
    TotalCount int
    The total count of cen inter region bandwidth query.
    Ids List<string>
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    InterRegionBandwidths []InterRegionBandwidthsInterRegionBandwidth
    The collection of cen inter region bandwidth query.
    TotalCount int
    The total count of cen inter region bandwidth query.
    Ids []string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    interRegionBandwidths List<InterRegionBandwidthsInterRegionBandwidth>
    The collection of cen inter region bandwidth query.
    totalCount Integer
    The total count of cen inter region bandwidth query.
    ids List<String>
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    interRegionBandwidths InterRegionBandwidthsInterRegionBandwidth[]
    The collection of cen inter region bandwidth query.
    totalCount number
    The total count of cen inter region bandwidth query.
    ids string[]
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    inter_region_bandwidths Sequence[InterRegionBandwidthsInterRegionBandwidth]
    The collection of cen inter region bandwidth query.
    total_count int
    The total count of cen inter region bandwidth query.
    ids Sequence[str]
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    interRegionBandwidths List<Property Map>
    The collection of cen inter region bandwidth query.
    totalCount Number
    The total count of cen inter region bandwidth query.
    ids List<String>
    outputFile String

    Supporting Types

    InterRegionBandwidthsInterRegionBandwidth

    Bandwidth int
    The bandwidth of the cen inter region bandwidth.
    CenId string
    The cen ID of the cen inter region bandwidth.
    CreationTime string
    The create time of the cen inter region bandwidth.
    Id string
    The ID of the cen inter region bandwidth.
    InterRegionBandwidthId string
    The ID of the cen inter region bandwidth.
    LocalRegionId string
    The local region id of the cen inter region bandwidth.
    PeerRegionId string
    The peer region id of the cen inter region bandwidth.
    Status string
    The status of the cen inter region bandwidth.
    UpdateTime string
    The update time of the cen inter region bandwidth.
    Bandwidth int
    The bandwidth of the cen inter region bandwidth.
    CenId string
    The cen ID of the cen inter region bandwidth.
    CreationTime string
    The create time of the cen inter region bandwidth.
    Id string
    The ID of the cen inter region bandwidth.
    InterRegionBandwidthId string
    The ID of the cen inter region bandwidth.
    LocalRegionId string
    The local region id of the cen inter region bandwidth.
    PeerRegionId string
    The peer region id of the cen inter region bandwidth.
    Status string
    The status of the cen inter region bandwidth.
    UpdateTime string
    The update time of the cen inter region bandwidth.
    bandwidth Integer
    The bandwidth of the cen inter region bandwidth.
    cenId String
    The cen ID of the cen inter region bandwidth.
    creationTime String
    The create time of the cen inter region bandwidth.
    id String
    The ID of the cen inter region bandwidth.
    interRegionBandwidthId String
    The ID of the cen inter region bandwidth.
    localRegionId String
    The local region id of the cen inter region bandwidth.
    peerRegionId String
    The peer region id of the cen inter region bandwidth.
    status String
    The status of the cen inter region bandwidth.
    updateTime String
    The update time of the cen inter region bandwidth.
    bandwidth number
    The bandwidth of the cen inter region bandwidth.
    cenId string
    The cen ID of the cen inter region bandwidth.
    creationTime string
    The create time of the cen inter region bandwidth.
    id string
    The ID of the cen inter region bandwidth.
    interRegionBandwidthId string
    The ID of the cen inter region bandwidth.
    localRegionId string
    The local region id of the cen inter region bandwidth.
    peerRegionId string
    The peer region id of the cen inter region bandwidth.
    status string
    The status of the cen inter region bandwidth.
    updateTime string
    The update time of the cen inter region bandwidth.
    bandwidth int
    The bandwidth of the cen inter region bandwidth.
    cen_id str
    The cen ID of the cen inter region bandwidth.
    creation_time str
    The create time of the cen inter region bandwidth.
    id str
    The ID of the cen inter region bandwidth.
    inter_region_bandwidth_id str
    The ID of the cen inter region bandwidth.
    local_region_id str
    The local region id of the cen inter region bandwidth.
    peer_region_id str
    The peer region id of the cen inter region bandwidth.
    status str
    The status of the cen inter region bandwidth.
    update_time str
    The update time of the cen inter region bandwidth.
    bandwidth Number
    The bandwidth of the cen inter region bandwidth.
    cenId String
    The cen ID of the cen inter region bandwidth.
    creationTime String
    The create time of the cen inter region bandwidth.
    id String
    The ID of the cen inter region bandwidth.
    interRegionBandwidthId String
    The ID of the cen inter region bandwidth.
    localRegionId String
    The local region id of the cen inter region bandwidth.
    peerRegionId String
    The peer region id of the cen inter region bandwidth.
    status String
    The status of the cen inter region bandwidth.
    updateTime String
    The update time of the cen inter region bandwidth.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine