BandwidthPackageAttachment

class BandwidthPackageAttachment : KotlinCustomResource

Provides a Global Accelerator (GA) Bandwidth Package Attachment resource. For information about Global Accelerator (GA) Bandwidth Package Attachment and how to use it, see What is Bandwidth Package Attachment.

NOTE: Available since v1.113.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.ga.Accelerator("example", {
duration: 1,
autoUseCoupon: true,
spec: "1",
});
const exampleBandwidthPackage = new alicloud.ga.BandwidthPackage("example", {
bandwidth: 20,
type: "Basic",
bandwidthType: "Basic",
duration: "1",
autoPay: true,
ratio: 30,
});
const exampleBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("example", {
acceleratorId: example.id,
bandwidthPackageId: exampleBandwidthPackage.id,
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ga.Accelerator("example",
duration=1,
auto_use_coupon=True,
spec="1")
example_bandwidth_package = alicloud.ga.BandwidthPackage("example",
bandwidth=20,
type="Basic",
bandwidth_type="Basic",
duration="1",
auto_pay=True,
ratio=30)
example_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("example",
accelerator_id=example.id,
bandwidth_package_id=example_bandwidth_package.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Ga.Accelerator("example", new()
{
Duration = 1,
AutoUseCoupon = true,
Spec = "1",
});
var exampleBandwidthPackage = new AliCloud.Ga.BandwidthPackage("example", new()
{
Bandwidth = 20,
Type = "Basic",
BandwidthType = "Basic",
Duration = "1",
AutoPay = true,
Ratio = 30,
});
var exampleBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("example", new()
{
AcceleratorId = example.Id,
BandwidthPackageId = exampleBandwidthPackage.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ga.NewAccelerator(ctx, "example", &ga.AcceleratorArgs{
Duration: pulumi.Int(1),
AutoUseCoupon: pulumi.Bool(true),
Spec: pulumi.String("1"),
})
if err != nil {
return err
}
exampleBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "example", &ga.BandwidthPackageArgs{
Bandwidth: pulumi.Int(20),
Type: pulumi.String("Basic"),
BandwidthType: pulumi.String("Basic"),
Duration: pulumi.String("1"),
AutoPay: pulumi.Bool(true),
Ratio: pulumi.Int(30),
})
if err != nil {
return err
}
_, err = ga.NewBandwidthPackageAttachment(ctx, "example", &ga.BandwidthPackageAttachmentArgs{
AcceleratorId: example.ID(),
BandwidthPackageId: exampleBandwidthPackage.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.ga.Accelerator;
import com.pulumi.alicloud.ga.AcceleratorArgs;
import com.pulumi.alicloud.ga.BandwidthPackage;
import com.pulumi.alicloud.ga.BandwidthPackageArgs;
import com.pulumi.alicloud.ga.BandwidthPackageAttachment;
import com.pulumi.alicloud.ga.BandwidthPackageAttachmentArgs;
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 example = new Accelerator("example", AcceleratorArgs.builder()
.duration(1)
.autoUseCoupon(true)
.spec("1")
.build());
var exampleBandwidthPackage = new BandwidthPackage("exampleBandwidthPackage", BandwidthPackageArgs.builder()
.bandwidth(20)
.type("Basic")
.bandwidthType("Basic")
.duration(1)
.autoPay(true)
.ratio(30)
.build());
var exampleBandwidthPackageAttachment = new BandwidthPackageAttachment("exampleBandwidthPackageAttachment", BandwidthPackageAttachmentArgs.builder()
.acceleratorId(example.id())
.bandwidthPackageId(exampleBandwidthPackage.id())
.build());
}
}
resources:
example:
type: alicloud:ga:Accelerator
properties:
duration: 1
autoUseCoupon: true
spec: '1'
exampleBandwidthPackage:
type: alicloud:ga:BandwidthPackage
name: example
properties:
bandwidth: 20
type: Basic
bandwidthType: Basic
duration: 1
autoPay: true
ratio: 30
exampleBandwidthPackageAttachment:
type: alicloud:ga:BandwidthPackageAttachment
name: example
properties:
acceleratorId: ${example.id}
bandwidthPackageId: ${exampleBandwidthPackage.id}

Import

Ga Bandwidth Package Attachment can be imported using the id. Format to <accelerator_id>:<bandwidth_package_id>, e.g.

$ pulumi import alicloud:ga/bandwidthPackageAttachment:BandwidthPackageAttachment example your_accelerator_id:your_bandwidth_package_id

Properties

Link copied to clipboard
val acceleratorId: Output<String>

The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.

Link copied to clipboard
val accelerators: Output<List<String>>

Accelerators bound with current Bandwidth Package.

Link copied to clipboard

The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0, bandwidth_package_id can be modified.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>

State of Bandwidth Package.

Link copied to clipboard
val urn: Output<String>