1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. VpcBandwidthAssociateV2
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.VpcBandwidthAssociateV2

Explore with Pulumi AI

Up-to-date reference of API arguments for VPC bandwidth association you can get at documentation portal

Provides a resource to associate floating IP with a shared bandwidth within Open Telekom Cloud.

Example Usage

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

const ip1 = new opentelekomcloud.NetworkingFloatingipV2("ip1", {});
const ip2 = new opentelekomcloud.NetworkingFloatingipV2("ip2", {});
const band20m = new opentelekomcloud.VpcBandwidthV2("band20m", {size: 20});
const associate = new opentelekomcloud.VpcBandwidthAssociateV2("associate", {
    bandwidth: band20m.vpcBandwidthV2Id,
    floatingIps: [
        ip1.networkingFloatingipV2Id,
        ip2.networkingFloatingipV2Id,
    ],
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

ip1 = opentelekomcloud.NetworkingFloatingipV2("ip1")
ip2 = opentelekomcloud.NetworkingFloatingipV2("ip2")
band20m = opentelekomcloud.VpcBandwidthV2("band20m", size=20)
associate = opentelekomcloud.VpcBandwidthAssociateV2("associate",
    bandwidth=band20m.vpc_bandwidth_v2_id,
    floating_ips=[
        ip1.networking_floatingip_v2_id,
        ip2.networking_floatingip_v2_id,
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ip1, err := opentelekomcloud.NewNetworkingFloatingipV2(ctx, "ip1", nil)
		if err != nil {
			return err
		}
		ip2, err := opentelekomcloud.NewNetworkingFloatingipV2(ctx, "ip2", nil)
		if err != nil {
			return err
		}
		band20m, err := opentelekomcloud.NewVpcBandwidthV2(ctx, "band20m", &opentelekomcloud.VpcBandwidthV2Args{
			Size: pulumi.Float64(20),
		})
		if err != nil {
			return err
		}
		_, err = opentelekomcloud.NewVpcBandwidthAssociateV2(ctx, "associate", &opentelekomcloud.VpcBandwidthAssociateV2Args{
			Bandwidth: band20m.VpcBandwidthV2Id,
			FloatingIps: pulumi.StringArray{
				ip1.NetworkingFloatingipV2Id,
				ip2.NetworkingFloatingipV2Id,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var ip1 = new Opentelekomcloud.NetworkingFloatingipV2("ip1");

    var ip2 = new Opentelekomcloud.NetworkingFloatingipV2("ip2");

    var band20m = new Opentelekomcloud.VpcBandwidthV2("band20m", new()
    {
        Size = 20,
    });

    var associate = new Opentelekomcloud.VpcBandwidthAssociateV2("associate", new()
    {
        Bandwidth = band20m.VpcBandwidthV2Id,
        FloatingIps = new[]
        {
            ip1.NetworkingFloatingipV2Id,
            ip2.NetworkingFloatingipV2Id,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingFloatingipV2;
import com.pulumi.opentelekomcloud.VpcBandwidthV2;
import com.pulumi.opentelekomcloud.VpcBandwidthV2Args;
import com.pulumi.opentelekomcloud.VpcBandwidthAssociateV2;
import com.pulumi.opentelekomcloud.VpcBandwidthAssociateV2Args;
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 ip1 = new NetworkingFloatingipV2("ip1");

        var ip2 = new NetworkingFloatingipV2("ip2");

        var band20m = new VpcBandwidthV2("band20m", VpcBandwidthV2Args.builder()
            .size(20)
            .build());

        var associate = new VpcBandwidthAssociateV2("associate", VpcBandwidthAssociateV2Args.builder()
            .bandwidth(band20m.vpcBandwidthV2Id())
            .floatingIps(            
                ip1.networkingFloatingipV2Id(),
                ip2.networkingFloatingipV2Id())
            .build());

    }
}
Copy
resources:
  ip1:
    type: opentelekomcloud:NetworkingFloatingipV2
  ip2:
    type: opentelekomcloud:NetworkingFloatingipV2
  band20m:
    type: opentelekomcloud:VpcBandwidthV2
    properties:
      size: 20
  associate:
    type: opentelekomcloud:VpcBandwidthAssociateV2
    properties:
      bandwidth: ${band20m.vpcBandwidthV2Id}
      floatingIps:
        - ${ip1.networkingFloatingipV2Id}
        - ${ip2.networkingFloatingipV2Id}
Copy

Create VpcBandwidthAssociateV2 Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VpcBandwidthAssociateV2(name: string, args: VpcBandwidthAssociateV2Args, opts?: CustomResourceOptions);
@overload
def VpcBandwidthAssociateV2(resource_name: str,
                            args: VpcBandwidthAssociateV2Args,
                            opts: Optional[ResourceOptions] = None)

@overload
def VpcBandwidthAssociateV2(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            bandwidth: Optional[str] = None,
                            floating_ips: Optional[Sequence[str]] = None,
                            backup_charge_mode: Optional[str] = None,
                            backup_size: Optional[float] = None,
                            vpc_bandwidth_associate_v2_id: Optional[str] = None)
func NewVpcBandwidthAssociateV2(ctx *Context, name string, args VpcBandwidthAssociateV2Args, opts ...ResourceOption) (*VpcBandwidthAssociateV2, error)
public VpcBandwidthAssociateV2(string name, VpcBandwidthAssociateV2Args args, CustomResourceOptions? opts = null)
public VpcBandwidthAssociateV2(String name, VpcBandwidthAssociateV2Args args)
public VpcBandwidthAssociateV2(String name, VpcBandwidthAssociateV2Args args, CustomResourceOptions options)
type: opentelekomcloud:VpcBandwidthAssociateV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VpcBandwidthAssociateV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VpcBandwidthAssociateV2Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VpcBandwidthAssociateV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VpcBandwidthAssociateV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VpcBandwidthAssociateV2Args
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var vpcBandwidthAssociateV2Resource = new Opentelekomcloud.VpcBandwidthAssociateV2("vpcBandwidthAssociateV2Resource", new()
{
    Bandwidth = "string",
    FloatingIps = new[]
    {
        "string",
    },
    BackupChargeMode = "string",
    BackupSize = 0,
    VpcBandwidthAssociateV2Id = "string",
});
Copy
example, err := opentelekomcloud.NewVpcBandwidthAssociateV2(ctx, "vpcBandwidthAssociateV2Resource", &opentelekomcloud.VpcBandwidthAssociateV2Args{
Bandwidth: pulumi.String("string"),
FloatingIps: pulumi.StringArray{
pulumi.String("string"),
},
BackupChargeMode: pulumi.String("string"),
BackupSize: pulumi.Float64(0),
VpcBandwidthAssociateV2Id: pulumi.String("string"),
})
Copy
var vpcBandwidthAssociateV2Resource = new VpcBandwidthAssociateV2("vpcBandwidthAssociateV2Resource", VpcBandwidthAssociateV2Args.builder()
    .bandwidth("string")
    .floatingIps("string")
    .backupChargeMode("string")
    .backupSize(0)
    .vpcBandwidthAssociateV2Id("string")
    .build());
Copy
vpc_bandwidth_associate_v2_resource = opentelekomcloud.VpcBandwidthAssociateV2("vpcBandwidthAssociateV2Resource",
    bandwidth="string",
    floating_ips=["string"],
    backup_charge_mode="string",
    backup_size=0,
    vpc_bandwidth_associate_v2_id="string")
Copy
const vpcBandwidthAssociateV2Resource = new opentelekomcloud.VpcBandwidthAssociateV2("vpcBandwidthAssociateV2Resource", {
    bandwidth: "string",
    floatingIps: ["string"],
    backupChargeMode: "string",
    backupSize: 0,
    vpcBandwidthAssociateV2Id: "string",
});
Copy
type: opentelekomcloud:VpcBandwidthAssociateV2
properties:
    backupChargeMode: string
    backupSize: 0
    bandwidth: string
    floatingIps:
        - string
    vpcBandwidthAssociateV2Id: string
Copy

VpcBandwidthAssociateV2 Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VpcBandwidthAssociateV2 resource accepts the following input properties:

Bandwidth This property is required. string
Specifies ID of the bandwidth to be assigned.
FloatingIps This property is required. List<string>

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

BackupChargeMode string

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

BackupSize double

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

VpcBandwidthAssociateV2Id string
Bandwidth This property is required. string
Specifies ID of the bandwidth to be assigned.
FloatingIps This property is required. []string

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

BackupChargeMode string

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

BackupSize float64

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

VpcBandwidthAssociateV2Id string
bandwidth This property is required. String
Specifies ID of the bandwidth to be assigned.
floatingIps This property is required. List<String>

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

backupChargeMode String

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

backupSize Double

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

vpcBandwidthAssociateV2Id String
bandwidth This property is required. string
Specifies ID of the bandwidth to be assigned.
floatingIps This property is required. string[]

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

backupChargeMode string

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

backupSize number

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

vpcBandwidthAssociateV2Id string
bandwidth This property is required. str
Specifies ID of the bandwidth to be assigned.
floating_ips This property is required. Sequence[str]

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

backup_charge_mode str

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

backup_size float

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

vpc_bandwidth_associate_v2_id str
bandwidth This property is required. String
Specifies ID of the bandwidth to be assigned.
floatingIps This property is required. List<String>

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

backupChargeMode String

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

backupSize Number

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

vpcBandwidthAssociateV2Id String

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcBandwidthAssociateV2 resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing VpcBandwidthAssociateV2 Resource

Get an existing VpcBandwidthAssociateV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VpcBandwidthAssociateV2State, opts?: CustomResourceOptions): VpcBandwidthAssociateV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backup_charge_mode: Optional[str] = None,
        backup_size: Optional[float] = None,
        bandwidth: Optional[str] = None,
        floating_ips: Optional[Sequence[str]] = None,
        vpc_bandwidth_associate_v2_id: Optional[str] = None) -> VpcBandwidthAssociateV2
func GetVpcBandwidthAssociateV2(ctx *Context, name string, id IDInput, state *VpcBandwidthAssociateV2State, opts ...ResourceOption) (*VpcBandwidthAssociateV2, error)
public static VpcBandwidthAssociateV2 Get(string name, Input<string> id, VpcBandwidthAssociateV2State? state, CustomResourceOptions? opts = null)
public static VpcBandwidthAssociateV2 get(String name, Output<String> id, VpcBandwidthAssociateV2State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:VpcBandwidthAssociateV2    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
BackupChargeMode string

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

BackupSize double

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

Bandwidth string
Specifies ID of the bandwidth to be assigned.
FloatingIps List<string>

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

VpcBandwidthAssociateV2Id string
BackupChargeMode string

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

BackupSize float64

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

Bandwidth string
Specifies ID of the bandwidth to be assigned.
FloatingIps []string

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

VpcBandwidthAssociateV2Id string
backupChargeMode String

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

backupSize Double

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

bandwidth String
Specifies ID of the bandwidth to be assigned.
floatingIps List<String>

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

vpcBandwidthAssociateV2Id String
backupChargeMode string

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

backupSize number

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

bandwidth string
Specifies ID of the bandwidth to be assigned.
floatingIps string[]

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

vpcBandwidthAssociateV2Id string
backup_charge_mode str

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

backup_size float

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

bandwidth str
Specifies ID of the bandwidth to be assigned.
floating_ips Sequence[str]

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

vpc_bandwidth_associate_v2_id str
backupChargeMode String

Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth.

The value can be bandwidth or traffic.

Default value is bandwidth.

backupSize Number

Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth.

Default value is 1.

bandwidth String
Specifies ID of the bandwidth to be assigned.
floatingIps List<String>

Specifies IDs of floating IPs to be added to the bandwidth.

-> After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth.

vpcBandwidthAssociateV2Id String

Import

VPC bandwidth association can be imported using the bandwidth id, e.g.

$ pulumi import opentelekomcloud:index/vpcBandwidthAssociateV2:VpcBandwidthAssociateV2 associate eb187fc8-e482-43eb-a18a-9da947ef89f6
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
License
Notes
This Pulumi package is based on the opentelekomcloud Terraform Provider.