alicloud.ga.BandwidthPackageAttachment
Explore with Pulumi AI
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var exampleAccelerator = new AliCloud.Ga.Accelerator("exampleAccelerator", new()
{
Duration = 1,
AutoUseCoupon = true,
Spec = "1",
});
var exampleBandwidthPackage = new AliCloud.Ga.BandwidthPackage("exampleBandwidthPackage", new()
{
Bandwidth = 20,
Type = "Basic",
BandwidthType = "Basic",
Duration = "1",
AutoPay = true,
Ratio = 30,
});
var exampleBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("exampleBandwidthPackageAttachment", new()
{
AcceleratorId = exampleAccelerator.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 {
exampleAccelerator, err := ga.NewAccelerator(ctx, "exampleAccelerator", &ga.AcceleratorArgs{
Duration: pulumi.Int(1),
AutoUseCoupon: pulumi.Bool(true),
Spec: pulumi.String("1"),
})
if err != nil {
return err
}
exampleBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "exampleBandwidthPackage", &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, "exampleBandwidthPackageAttachment", &ga.BandwidthPackageAttachmentArgs{
AcceleratorId: exampleAccelerator.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 exampleAccelerator = new Accelerator("exampleAccelerator", 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(exampleAccelerator.id())
.bandwidthPackageId(exampleBandwidthPackage.id())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
example_accelerator = alicloud.ga.Accelerator("exampleAccelerator",
duration=1,
auto_use_coupon=True,
spec="1")
example_bandwidth_package = alicloud.ga.BandwidthPackage("exampleBandwidthPackage",
bandwidth=20,
type="Basic",
bandwidth_type="Basic",
duration="1",
auto_pay=True,
ratio=30)
example_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("exampleBandwidthPackageAttachment",
accelerator_id=example_accelerator.id,
bandwidth_package_id=example_bandwidth_package.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const exampleAccelerator = new alicloud.ga.Accelerator("exampleAccelerator", {
duration: 1,
autoUseCoupon: true,
spec: "1",
});
const exampleBandwidthPackage = new alicloud.ga.BandwidthPackage("exampleBandwidthPackage", {
bandwidth: 20,
type: "Basic",
bandwidthType: "Basic",
duration: "1",
autoPay: true,
ratio: 30,
});
const exampleBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("exampleBandwidthPackageAttachment", {
acceleratorId: exampleAccelerator.id,
bandwidthPackageId: exampleBandwidthPackage.id,
});
resources:
exampleAccelerator:
type: alicloud:ga:Accelerator
properties:
duration: 1
autoUseCoupon: true
spec: '1'
exampleBandwidthPackage:
type: alicloud:ga:BandwidthPackage
properties:
bandwidth: 20
type: Basic
bandwidthType: Basic
duration: 1
autoPay: true
ratio: 30
exampleBandwidthPackageAttachment:
type: alicloud:ga:BandwidthPackageAttachment
properties:
acceleratorId: ${exampleAccelerator.id}
bandwidthPackageId: ${exampleBandwidthPackage.id}
Create BandwidthPackageAttachment Resource
new BandwidthPackageAttachment(name: string, args: BandwidthPackageAttachmentArgs, opts?: CustomResourceOptions);
@overload
def BandwidthPackageAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
accelerator_id: Optional[str] = None,
bandwidth_package_id: Optional[str] = None)
@overload
def BandwidthPackageAttachment(resource_name: str,
args: BandwidthPackageAttachmentArgs,
opts: Optional[ResourceOptions] = None)
func NewBandwidthPackageAttachment(ctx *Context, name string, args BandwidthPackageAttachmentArgs, opts ...ResourceOption) (*BandwidthPackageAttachment, error)
public BandwidthPackageAttachment(string name, BandwidthPackageAttachmentArgs args, CustomResourceOptions? opts = null)
public BandwidthPackageAttachment(String name, BandwidthPackageAttachmentArgs args)
public BandwidthPackageAttachment(String name, BandwidthPackageAttachmentArgs args, CustomResourceOptions options)
type: alicloud:ga:BandwidthPackageAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BandwidthPackageAttachmentArgs
- 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 BandwidthPackageAttachmentArgs
- 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 BandwidthPackageAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BandwidthPackageAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BandwidthPackageAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BandwidthPackageAttachment 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 BandwidthPackageAttachment resource accepts the following input properties:
- Accelerator
Id string The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- Bandwidth
Package stringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- Accelerator
Id string The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- Bandwidth
Package stringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- accelerator
Id String The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- bandwidth
Package StringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- accelerator
Id string The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- bandwidth
Package stringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- accelerator_
id str The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- bandwidth_
package_ strid The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- accelerator
Id String The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- bandwidth
Package StringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
Outputs
All input properties are implicitly available as output properties. Additionally, the BandwidthPackageAttachment resource produces the following output properties:
- Accelerators List<string>
Accelerators bound with current Bandwidth Package.
- Id string
The provider-assigned unique ID for this managed resource.
- Status string
State of Bandwidth Package.
- Accelerators []string
Accelerators bound with current Bandwidth Package.
- Id string
The provider-assigned unique ID for this managed resource.
- Status string
State of Bandwidth Package.
- accelerators List<String>
Accelerators bound with current Bandwidth Package.
- id String
The provider-assigned unique ID for this managed resource.
- status String
State of Bandwidth Package.
- accelerators string[]
Accelerators bound with current Bandwidth Package.
- id string
The provider-assigned unique ID for this managed resource.
- status string
State of Bandwidth Package.
- accelerators Sequence[str]
Accelerators bound with current Bandwidth Package.
- id str
The provider-assigned unique ID for this managed resource.
- status str
State of Bandwidth Package.
- accelerators List<String>
Accelerators bound with current Bandwidth Package.
- id String
The provider-assigned unique ID for this managed resource.
- status String
State of Bandwidth Package.
Look up Existing BandwidthPackageAttachment Resource
Get an existing BandwidthPackageAttachment 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?: BandwidthPackageAttachmentState, opts?: CustomResourceOptions): BandwidthPackageAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
accelerator_id: Optional[str] = None,
accelerators: Optional[Sequence[str]] = None,
bandwidth_package_id: Optional[str] = None,
status: Optional[str] = None) -> BandwidthPackageAttachment
func GetBandwidthPackageAttachment(ctx *Context, name string, id IDInput, state *BandwidthPackageAttachmentState, opts ...ResourceOption) (*BandwidthPackageAttachment, error)
public static BandwidthPackageAttachment Get(string name, Input<string> id, BandwidthPackageAttachmentState? state, CustomResourceOptions? opts = null)
public static BandwidthPackageAttachment get(String name, Output<String> id, BandwidthPackageAttachmentState 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.
- Accelerator
Id string The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- Accelerators List<string>
Accelerators bound with current Bandwidth Package.
- Bandwidth
Package stringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.- Status string
State of Bandwidth Package.
- Accelerator
Id string The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- Accelerators []string
Accelerators bound with current Bandwidth Package.
- Bandwidth
Package stringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.- Status string
State of Bandwidth Package.
- accelerator
Id String The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- accelerators List<String>
Accelerators bound with current Bandwidth Package.
- bandwidth
Package StringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.- status String
State of Bandwidth Package.
- accelerator
Id string The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- accelerators string[]
Accelerators bound with current Bandwidth Package.
- bandwidth
Package stringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.- status string
State of Bandwidth Package.
- accelerator_
id str The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- accelerators Sequence[str]
Accelerators bound with current Bandwidth Package.
- bandwidth_
package_ strid The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.- status str
State of Bandwidth Package.
- accelerator
Id String The ID of the Global Accelerator instance from which you want to disassociate the bandwidth plan.
- accelerators List<String>
Accelerators bound with current Bandwidth Package.
- bandwidth
Package StringId The ID of the bandwidth plan to disassociate. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.- status String
State of Bandwidth Package.
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
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.