alicloud.vpc.CommonBandwithPackageAttachment

Import

The common bandwidth package attachment can be imported using the id, e.g.

 $ pulumi import alicloud:vpc/commonBandwithPackageAttachment:CommonBandwithPackageAttachment foo <bandwidth_package_id>:<instance_id>

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var fooCommonBandwithPackage = new AliCloud.Vpc.CommonBandwithPackage("fooCommonBandwithPackage", new()
    {
        Bandwidth = "2",
        BandwidthPackageName = "test_common_bandwidth_package",
        Description = "test_common_bandwidth_package",
    });

    var fooEipAddress = new AliCloud.Ecs.EipAddress("fooEipAddress", new()
    {
        Bandwidth = "2",
        InternetChargeType = "PayByBandwidth",
    });

    var fooCommonBandwithPackageAttachment = new AliCloud.Vpc.CommonBandwithPackageAttachment("fooCommonBandwithPackageAttachment", new()
    {
        BandwidthPackageId = fooCommonBandwithPackage.Id,
        InstanceId = fooEipAddress.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooCommonBandwithPackage, err := vpc.NewCommonBandwithPackage(ctx, "fooCommonBandwithPackage", &vpc.CommonBandwithPackageArgs{
			Bandwidth:            pulumi.String("2"),
			BandwidthPackageName: pulumi.String("test_common_bandwidth_package"),
			Description:          pulumi.String("test_common_bandwidth_package"),
		})
		if err != nil {
			return err
		}
		fooEipAddress, err := ecs.NewEipAddress(ctx, "fooEipAddress", &ecs.EipAddressArgs{
			Bandwidth:          pulumi.String("2"),
			InternetChargeType: pulumi.String("PayByBandwidth"),
		})
		if err != nil {
			return err
		}
		_, err = vpc.NewCommonBandwithPackageAttachment(ctx, "fooCommonBandwithPackageAttachment", &vpc.CommonBandwithPackageAttachmentArgs{
			BandwidthPackageId: fooCommonBandwithPackage.ID(),
			InstanceId:         fooEipAddress.ID(),
		})
		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.alicloud.vpc.CommonBandwithPackage;
import com.pulumi.alicloud.vpc.CommonBandwithPackageArgs;
import com.pulumi.alicloud.ecs.EipAddress;
import com.pulumi.alicloud.ecs.EipAddressArgs;
import com.pulumi.alicloud.vpc.CommonBandwithPackageAttachment;
import com.pulumi.alicloud.vpc.CommonBandwithPackageAttachmentArgs;
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 fooCommonBandwithPackage = new CommonBandwithPackage("fooCommonBandwithPackage", CommonBandwithPackageArgs.builder()        
            .bandwidth("2")
            .bandwidthPackageName("test_common_bandwidth_package")
            .description("test_common_bandwidth_package")
            .build());

        var fooEipAddress = new EipAddress("fooEipAddress", EipAddressArgs.builder()        
            .bandwidth("2")
            .internetChargeType("PayByBandwidth")
            .build());

        var fooCommonBandwithPackageAttachment = new CommonBandwithPackageAttachment("fooCommonBandwithPackageAttachment", CommonBandwithPackageAttachmentArgs.builder()        
            .bandwidthPackageId(fooCommonBandwithPackage.id())
            .instanceId(fooEipAddress.id())
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

foo_common_bandwith_package = alicloud.vpc.CommonBandwithPackage("fooCommonBandwithPackage",
    bandwidth="2",
    bandwidth_package_name="test_common_bandwidth_package",
    description="test_common_bandwidth_package")
foo_eip_address = alicloud.ecs.EipAddress("fooEipAddress",
    bandwidth="2",
    internet_charge_type="PayByBandwidth")
foo_common_bandwith_package_attachment = alicloud.vpc.CommonBandwithPackageAttachment("fooCommonBandwithPackageAttachment",
    bandwidth_package_id=foo_common_bandwith_package.id,
    instance_id=foo_eip_address.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const fooCommonBandwithPackage = new alicloud.vpc.CommonBandwithPackage("fooCommonBandwithPackage", {
    bandwidth: "2",
    bandwidthPackageName: "test_common_bandwidth_package",
    description: "test_common_bandwidth_package",
});
const fooEipAddress = new alicloud.ecs.EipAddress("fooEipAddress", {
    bandwidth: "2",
    internetChargeType: "PayByBandwidth",
});
const fooCommonBandwithPackageAttachment = new alicloud.vpc.CommonBandwithPackageAttachment("fooCommonBandwithPackageAttachment", {
    bandwidthPackageId: fooCommonBandwithPackage.id,
    instanceId: fooEipAddress.id,
});
resources:
  fooCommonBandwithPackage:
    type: alicloud:vpc:CommonBandwithPackage
    properties:
      bandwidth: '2'
      bandwidthPackageName: test_common_bandwidth_package
      description: test_common_bandwidth_package
  fooEipAddress:
    type: alicloud:ecs:EipAddress
    properties:
      bandwidth: '2'
      internetChargeType: PayByBandwidth
  fooCommonBandwithPackageAttachment:
    type: alicloud:vpc:CommonBandwithPackageAttachment
    properties:
      bandwidthPackageId: ${fooCommonBandwithPackage.id}
      instanceId: ${fooEipAddress.id}

Create CommonBandwithPackageAttachment Resource

new CommonBandwithPackageAttachment(name: string, args: CommonBandwithPackageAttachmentArgs, opts?: CustomResourceOptions);
@overload
def CommonBandwithPackageAttachment(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    bandwidth_package_bandwidth: Optional[str] = None,
                                    bandwidth_package_id: Optional[str] = None,
                                    cancel_common_bandwidth_package_ip_bandwidth: Optional[bool] = None,
                                    instance_id: Optional[str] = None)
@overload
def CommonBandwithPackageAttachment(resource_name: str,
                                    args: CommonBandwithPackageAttachmentArgs,
                                    opts: Optional[ResourceOptions] = None)
func NewCommonBandwithPackageAttachment(ctx *Context, name string, args CommonBandwithPackageAttachmentArgs, opts ...ResourceOption) (*CommonBandwithPackageAttachment, error)
public CommonBandwithPackageAttachment(string name, CommonBandwithPackageAttachmentArgs args, CustomResourceOptions? opts = null)
public CommonBandwithPackageAttachment(String name, CommonBandwithPackageAttachmentArgs args)
public CommonBandwithPackageAttachment(String name, CommonBandwithPackageAttachmentArgs args, CustomResourceOptions options)
type: alicloud:vpc:CommonBandwithPackageAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

CommonBandwithPackageAttachment Resource Properties

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

Inputs

The CommonBandwithPackageAttachment resource accepts the following input properties:

BandwidthPackageId string

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

InstanceId string

The instance_id of the common bandwidth package attachment, the field can't be changed.

BandwidthPackageBandwidth string

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

CancelCommonBandwidthPackageIpBandwidth bool

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

BandwidthPackageId string

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

InstanceId string

The instance_id of the common bandwidth package attachment, the field can't be changed.

BandwidthPackageBandwidth string

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

CancelCommonBandwidthPackageIpBandwidth bool

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

bandwidthPackageId String

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

instanceId String

The instance_id of the common bandwidth package attachment, the field can't be changed.

bandwidthPackageBandwidth String

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

cancelCommonBandwidthPackageIpBandwidth Boolean

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

bandwidthPackageId string

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

instanceId string

The instance_id of the common bandwidth package attachment, the field can't be changed.

bandwidthPackageBandwidth string

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

cancelCommonBandwidthPackageIpBandwidth boolean

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

bandwidth_package_id str

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

instance_id str

The instance_id of the common bandwidth package attachment, the field can't be changed.

bandwidth_package_bandwidth str

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

cancel_common_bandwidth_package_ip_bandwidth bool

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

bandwidthPackageId String

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

instanceId String

The instance_id of the common bandwidth package attachment, the field can't be changed.

bandwidthPackageBandwidth String

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

cancelCommonBandwidthPackageIpBandwidth Boolean

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

Outputs

All input properties are implicitly available as output properties. Additionally, the CommonBandwithPackageAttachment 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 CommonBandwithPackageAttachment Resource

Get an existing CommonBandwithPackageAttachment 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?: CommonBandwithPackageAttachmentState, opts?: CustomResourceOptions): CommonBandwithPackageAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bandwidth_package_bandwidth: Optional[str] = None,
        bandwidth_package_id: Optional[str] = None,
        cancel_common_bandwidth_package_ip_bandwidth: Optional[bool] = None,
        instance_id: Optional[str] = None) -> CommonBandwithPackageAttachment
func GetCommonBandwithPackageAttachment(ctx *Context, name string, id IDInput, state *CommonBandwithPackageAttachmentState, opts ...ResourceOption) (*CommonBandwithPackageAttachment, error)
public static CommonBandwithPackageAttachment Get(string name, Input<string> id, CommonBandwithPackageAttachmentState? state, CustomResourceOptions? opts = null)
public static CommonBandwithPackageAttachment get(String name, Output<String> id, CommonBandwithPackageAttachmentState 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:
BandwidthPackageBandwidth string

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

BandwidthPackageId string

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

CancelCommonBandwidthPackageIpBandwidth bool

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

InstanceId string

The instance_id of the common bandwidth package attachment, the field can't be changed.

BandwidthPackageBandwidth string

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

BandwidthPackageId string

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

CancelCommonBandwidthPackageIpBandwidth bool

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

InstanceId string

The instance_id of the common bandwidth package attachment, the field can't be changed.

bandwidthPackageBandwidth String

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

bandwidthPackageId String

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

cancelCommonBandwidthPackageIpBandwidth Boolean

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

instanceId String

The instance_id of the common bandwidth package attachment, the field can't be changed.

bandwidthPackageBandwidth string

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

bandwidthPackageId string

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

cancelCommonBandwidthPackageIpBandwidth boolean

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

instanceId string

The instance_id of the common bandwidth package attachment, the field can't be changed.

bandwidth_package_bandwidth str

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

bandwidth_package_id str

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

cancel_common_bandwidth_package_ip_bandwidth bool

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

instance_id str

The instance_id of the common bandwidth package attachment, the field can't be changed.

bandwidthPackageBandwidth String

The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.

bandwidthPackageId String

The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.

cancelCommonBandwidthPackageIpBandwidth Boolean

Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.

instanceId String

The instance_id of the common bandwidth package attachment, the field can't be changed.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.