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,
],
});
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,
])
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
})
}
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,
},
});
});
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());
}
}
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}
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 string
- The unique name of the resource.
- args VpcBandwidthAssociateV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args VpcBandwidthAssociateV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcBandwidthAssociateV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var vpcBandwidthAssociateV2Resource = new VpcBandwidthAssociateV2("vpcBandwidthAssociateV2Resource", VpcBandwidthAssociateV2Args.builder()
.bandwidth("string")
.floatingIps("string")
.backupChargeMode("string")
.backupSize(0)
.vpcBandwidthAssociateV2Id("string")
.build());
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")
const vpcBandwidthAssociateV2Resource = new opentelekomcloud.VpcBandwidthAssociateV2("vpcBandwidthAssociateV2Resource", {
bandwidth: "string",
floatingIps: ["string"],
backupChargeMode: "string",
backupSize: 0,
vpcBandwidthAssociateV2Id: "string",
});
type: opentelekomcloud:VpcBandwidthAssociateV2
properties:
backupChargeMode: string
backupSize: 0
bandwidth: string
floatingIps:
- string
vpcBandwidthAssociateV2Id: string
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 string
- Specifies ID of the bandwidth to be assigned.
- Floating
Ips 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.
- Backup
Charge stringMode 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
ortraffic
.Default value is
bandwidth
.- Backup
Size 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
.- Vpc
Bandwidth stringAssociate V2Id
- Bandwidth string
- Specifies ID of the bandwidth to be assigned.
- Floating
Ips []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.
- Backup
Charge stringMode 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
ortraffic
.Default value is
bandwidth
.- Backup
Size 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
.- Vpc
Bandwidth stringAssociate V2Id
- bandwidth String
- Specifies ID of the bandwidth to be assigned.
- floating
Ips 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.
- backup
Charge StringMode 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
ortraffic
.Default value is
bandwidth
.- backup
Size 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
.- vpc
Bandwidth StringAssociate V2Id
- bandwidth string
- Specifies ID of the bandwidth to be assigned.
- floating
Ips 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.
- backup
Charge stringMode 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
ortraffic
.Default value is
bandwidth
.- backup
Size 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
.- vpc
Bandwidth stringAssociate V2Id
- 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.
- backup_
charge_ strmode 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
ortraffic
.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_ strassociate_ v2_ id
- bandwidth String
- Specifies ID of the bandwidth to be assigned.
- floating
Ips 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.
- backup
Charge StringMode 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
ortraffic
.Default value is
bandwidth
.- backup
Size 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
.- vpc
Bandwidth StringAssociate V2Id
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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Backup
Charge stringMode 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
ortraffic
.Default value is
bandwidth
.- Backup
Size 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.
- Floating
Ips 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.
- Vpc
Bandwidth stringAssociate V2Id
- Backup
Charge stringMode 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
ortraffic
.Default value is
bandwidth
.- Backup
Size 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.
- Floating
Ips []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.
- Vpc
Bandwidth stringAssociate V2Id
- backup
Charge StringMode 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
ortraffic
.Default value is
bandwidth
.- backup
Size 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.
- floating
Ips 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.
- vpc
Bandwidth StringAssociate V2Id
- backup
Charge stringMode 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
ortraffic
.Default value is
bandwidth
.- backup
Size 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.
- floating
Ips 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.
- vpc
Bandwidth stringAssociate V2Id
- backup_
charge_ strmode 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
ortraffic
.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_ strassociate_ v2_ id
- backup
Charge StringMode 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
ortraffic
.Default value is
bandwidth
.- backup
Size 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.
- floating
Ips 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.
- vpc
Bandwidth StringAssociate V2Id
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
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.