title: "Bandwidth" title_tag: "huaweicloud.Vpc.Bandwidth" meta_desc: "Documentation for the huaweicloud.Vpc.Bandwidth resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true


Manages a Shared Bandwidth resource within HuaweiCloud.

## Example Usage
using System.Collections.Generic;
using Pulumi;
using Huaweicloud = Pulumi.Huaweicloud;

return await Deployment.RunAsync(() => 
{
    var bandwidth1 = new Huaweicloud.Vpc.Bandwidth("bandwidth1", new()
    {
        Size = 5,
    });

});
package main

import (
    "github.com/huaweicloud/pulumi-huaweicloud/sdk/go/huaweicloud/Vpc"
    "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := Vpc.NewBandwidth(ctx, "bandwidth1", &Vpc.BandwidthArgs{
            Size: pulumi.Int(5),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.huaweicloud.Vpc.Bandwidth;
import com.pulumi.huaweicloud.Vpc.BandwidthArgs;
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 bandwidth1 = new Bandwidth("bandwidth1", BandwidthArgs.builder()        
            .size(5)
            .build());

    }
}
import pulumi
import pulumi_huaweicloud as huaweicloud

bandwidth1 = huaweicloud.vpc.Bandwidth("bandwidth1", size=5)
import * as pulumi from "@pulumi/pulumi";
import * as huaweicloud from "@pulumi/huaweicloud";

const bandwidth1 = new huaweicloud.Vpc.Bandwidth("bandwidth_1", {
    size: 5,
});
resources:
  bandwidth1:
    type: huaweicloud:Vpc:Bandwidth
    properties:
      size: 5

Create Bandwidth Resource {#create}

new Bandwidth(name: string, args: BandwidthArgs, opts?: CustomResourceOptions);
@overload
def Bandwidth(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              charge_mode: Optional[str] = None,
              enterprise_project_id: Optional[str] = None,
              name: Optional[str] = None,
              region: Optional[str] = None,
              size: Optional[int] = None)
@overload
def Bandwidth(resource_name: str,
              args: BandwidthArgs,
              opts: Optional[ResourceOptions] = None)
func NewBandwidth(ctx *Context, name string, args BandwidthArgs, opts ...ResourceOption) (*Bandwidth, error)
public Bandwidth(string name, BandwidthArgs args, CustomResourceOptions? opts = null)
public Bandwidth(String name, BandwidthArgs args)
public Bandwidth(String name, BandwidthArgs args, CustomResourceOptions options)
type: huaweicloud:Vpc:Bandwidth
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BandwidthArgs
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 BandwidthArgs
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 BandwidthArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BandwidthArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BandwidthArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Bandwidth Resource Properties {#properties}

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

Inputs

The Bandwidth resource accepts the following input properties:

Size int

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

ChargeMode string

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

EnterpriseProjectId string

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

Name string

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

Region string

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

Size int

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

ChargeMode string

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

EnterpriseProjectId string

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

Name string

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

Region string

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

size Integer

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

chargeMode String

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

enterpriseProjectId String

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

name String

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

region String

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

size number

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

chargeMode string

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

enterpriseProjectId string

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

name string

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

region string

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

size int

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

charge_mode str

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

enterprise_project_id str

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

name str

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

region str

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

size Number

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

chargeMode String

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

enterpriseProjectId String

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

name String

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

region String

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

Outputs

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

BandwidthType string

Indicates the bandwidth type.

Id string

The provider-assigned unique ID for this managed resource.

Publicips List<BandwidthPublicip>

An array of EIPs that use the bandwidth. The object includes the following:

ShareType string

Indicates whether the bandwidth is shared or dedicated.

Status string

Indicates the bandwidth status.

BandwidthType string

Indicates the bandwidth type.

Id string

The provider-assigned unique ID for this managed resource.

Publicips []BandwidthPublicip

An array of EIPs that use the bandwidth. The object includes the following:

ShareType string

Indicates whether the bandwidth is shared or dedicated.

Status string

Indicates the bandwidth status.

bandwidthType String

Indicates the bandwidth type.

id String

The provider-assigned unique ID for this managed resource.

publicips List<BandwidthPublicip>

An array of EIPs that use the bandwidth. The object includes the following:

shareType String

Indicates whether the bandwidth is shared or dedicated.

status String

Indicates the bandwidth status.

bandwidthType string

Indicates the bandwidth type.

id string

The provider-assigned unique ID for this managed resource.

publicips BandwidthPublicip[]

An array of EIPs that use the bandwidth. The object includes the following:

shareType string

Indicates whether the bandwidth is shared or dedicated.

status string

Indicates the bandwidth status.

bandwidth_type str

Indicates the bandwidth type.

id str

The provider-assigned unique ID for this managed resource.

publicips BandwidthPublicip]

An array of EIPs that use the bandwidth. The object includes the following:

share_type str

Indicates whether the bandwidth is shared or dedicated.

status str

Indicates the bandwidth status.

bandwidthType String

Indicates the bandwidth type.

id String

The provider-assigned unique ID for this managed resource.

publicips List<Property Map>

An array of EIPs that use the bandwidth. The object includes the following:

shareType String

Indicates whether the bandwidth is shared or dedicated.

status String

Indicates the bandwidth status.

Look up Existing Bandwidth Resource {#look-up}

Get an existing Bandwidth 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?: BandwidthState, opts?: CustomResourceOptions): Bandwidth
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bandwidth_type: Optional[str] = None,
        charge_mode: Optional[str] = None,
        enterprise_project_id: Optional[str] = None,
        name: Optional[str] = None,
        publicips: Optional[Sequence[_vpc.BandwidthPublicipArgs]] = None,
        region: Optional[str] = None,
        share_type: Optional[str] = None,
        size: Optional[int] = None,
        status: Optional[str] = None) -> Bandwidth
func GetBandwidth(ctx *Context, name string, id IDInput, state *BandwidthState, opts ...ResourceOption) (*Bandwidth, error)
public static Bandwidth Get(string name, Input<string> id, BandwidthState? state, CustomResourceOptions? opts = null)
public static Bandwidth get(String name, Output<String> id, BandwidthState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
BandwidthType string

Indicates the bandwidth type.

ChargeMode string

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

EnterpriseProjectId string

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

Name string

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

Publicips List<BandwidthPublicipArgs>

An array of EIPs that use the bandwidth. The object includes the following:

Region string

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

ShareType string

Indicates whether the bandwidth is shared or dedicated.

Size int

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

Status string

Indicates the bandwidth status.

BandwidthType string

Indicates the bandwidth type.

ChargeMode string

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

EnterpriseProjectId string

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

Name string

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

Publicips []BandwidthPublicipArgs

An array of EIPs that use the bandwidth. The object includes the following:

Region string

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

ShareType string

Indicates whether the bandwidth is shared or dedicated.

Size int

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

Status string

Indicates the bandwidth status.

bandwidthType String

Indicates the bandwidth type.

chargeMode String

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

enterpriseProjectId String

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

name String

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

publicips List<BandwidthPublicipArgs>

An array of EIPs that use the bandwidth. The object includes the following:

region String

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

shareType String

Indicates whether the bandwidth is shared or dedicated.

size Integer

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

status String

Indicates the bandwidth status.

bandwidthType string

Indicates the bandwidth type.

chargeMode string

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

enterpriseProjectId string

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

name string

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

publicips BandwidthPublicipArgs[]

An array of EIPs that use the bandwidth. The object includes the following:

region string

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

shareType string

Indicates whether the bandwidth is shared or dedicated.

size number

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

status string

Indicates the bandwidth status.

bandwidth_type str

Indicates the bandwidth type.

charge_mode str

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

enterprise_project_id str

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

name str

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

publicips BandwidthPublicipArgs]

An array of EIPs that use the bandwidth. The object includes the following:

region str

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

share_type str

Indicates whether the bandwidth is shared or dedicated.

size int

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

status str

Indicates the bandwidth status.

bandwidthType String

Indicates the bandwidth type.

chargeMode String

Specifies whether the billing is based on bandwidth or 95th percentile bandwidth (enhanced). Possible values can be bandwidth and 95peak_plus. The default value is bandwidth, and 95peak_plus is only valid for v4 and v5 Customer. Changing this creates a new bandwidth.

enterpriseProjectId String

Specifies the enterprise project id of the Shared Bandwidth. Changing this creates a new bandwidth.

name String

Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (_), hyphens (-), and periods (.).

publicips List<Property Map>

An array of EIPs that use the bandwidth. The object includes the following:

region String

Specifies the region in which to create the Shared Bandwidth. If omitted, the provider-level region will be used. Changing this creates a new bandwidth.

shareType String

Indicates whether the bandwidth is shared or dedicated.

size Number

Specifies the size of the Shared Bandwidth. The value ranges from 5 Mbit/s to 2000 Mbit/s.

status String

Indicates the bandwidth status.

Supporting Types

BandwidthPublicip

Id string

The ID of the EIP or IPv6 port that uses the bandwidth.

IpAddress string

The IPv4 or IPv6 address.

IpVersion int

The IP version, either 4 or 6.

Type string

The EIP type. Possible values are 5_bgp (dynamic BGP) and 5_sbgp (static BGP).

Id string

The ID of the EIP or IPv6 port that uses the bandwidth.

IpAddress string

The IPv4 or IPv6 address.

IpVersion int

The IP version, either 4 or 6.

Type string

The EIP type. Possible values are 5_bgp (dynamic BGP) and 5_sbgp (static BGP).

id String

The ID of the EIP or IPv6 port that uses the bandwidth.

ipAddress String

The IPv4 or IPv6 address.

ipVersion Integer

The IP version, either 4 or 6.

type String

The EIP type. Possible values are 5_bgp (dynamic BGP) and 5_sbgp (static BGP).

id string

The ID of the EIP or IPv6 port that uses the bandwidth.

ipAddress string

The IPv4 or IPv6 address.

ipVersion number

The IP version, either 4 or 6.

type string

The EIP type. Possible values are 5_bgp (dynamic BGP) and 5_sbgp (static BGP).

id str

The ID of the EIP or IPv6 port that uses the bandwidth.

ip_address str

The IPv4 or IPv6 address.

ip_version int

The IP version, either 4 or 6.

type str

The EIP type. Possible values are 5_bgp (dynamic BGP) and 5_sbgp (static BGP).

id String

The ID of the EIP or IPv6 port that uses the bandwidth.

ipAddress String

The IPv4 or IPv6 address.

ipVersion Number

The IP version, either 4 or 6.

type String

The EIP type. Possible values are 5_bgp (dynamic BGP) and 5_sbgp (static BGP).

Import

Shared Bandwidths can be imported using the id, e.g.

 $ pulumi import huaweicloud:Vpc/bandwidth:Bandwidth bandwidth_1 7117d38e-4c8f-4624-a505-bd96b97d024c

Package Details

Repository
https://github.com/huaweicloud/pulumi-huaweicloud
License
Apache-2.0
Notes

This Pulumi package is based on the huaweicloud Terraform Provider.