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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.ga.Accelerator("default", {
duration: 1,
autoUseCoupon: true,
spec: "1",
});
const defaultBandwidthPackage = new alicloud.ga.BandwidthPackage("default", {
bandwidth: 100,
type: "Basic",
bandwidthType: "Basic",
paymentType: "PayAsYouGo",
billingType: "PayBy95",
ratio: 30,
});
const defaultBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("default", {
acceleratorId: _default.id,
bandwidthPackageId: defaultBandwidthPackage.id,
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ga.Accelerator("default",
duration=1,
auto_use_coupon=True,
spec="1")
default_bandwidth_package = alicloud.ga.BandwidthPackage("default",
bandwidth=100,
type="Basic",
bandwidth_type="Basic",
payment_type="PayAsYouGo",
billing_type="PayBy95",
ratio=30)
default_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("default",
accelerator_id=default.id,
bandwidth_package_id=default_bandwidth_package.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 {
_, err := ga.NewAccelerator(ctx, "default", &ga.AcceleratorArgs{
Duration: pulumi.Int(1),
AutoUseCoupon: pulumi.Bool(true),
Spec: pulumi.String("1"),
})
if err != nil {
return err
}
defaultBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "default", &ga.BandwidthPackageArgs{
Bandwidth: pulumi.Int(100),
Type: pulumi.String("Basic"),
BandwidthType: pulumi.String("Basic"),
PaymentType: pulumi.String("PayAsYouGo"),
BillingType: pulumi.String("PayBy95"),
Ratio: pulumi.Int(30),
})
if err != nil {
return err
}
_, err = ga.NewBandwidthPackageAttachment(ctx, "default", &ga.BandwidthPackageAttachmentArgs{
AcceleratorId: _default.ID(),
BandwidthPackageId: defaultBandwidthPackage.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.Ga.Accelerator("default", new()
{
Duration = 1,
AutoUseCoupon = true,
Spec = "1",
});
var defaultBandwidthPackage = new AliCloud.Ga.BandwidthPackage("default", new()
{
Bandwidth = 100,
Type = "Basic",
BandwidthType = "Basic",
PaymentType = "PayAsYouGo",
BillingType = "PayBy95",
Ratio = 30,
});
var defaultBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("default", new()
{
AcceleratorId = @default.Id,
BandwidthPackageId = defaultBandwidthPackage.Id,
});
});
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 default_ = new Accelerator("default", AcceleratorArgs.builder()
.duration(1)
.autoUseCoupon(true)
.spec("1")
.build());
var defaultBandwidthPackage = new BandwidthPackage("defaultBandwidthPackage", BandwidthPackageArgs.builder()
.bandwidth(100)
.type("Basic")
.bandwidthType("Basic")
.paymentType("PayAsYouGo")
.billingType("PayBy95")
.ratio(30)
.build());
var defaultBandwidthPackageAttachment = new BandwidthPackageAttachment("defaultBandwidthPackageAttachment", BandwidthPackageAttachmentArgs.builder()
.acceleratorId(default_.id())
.bandwidthPackageId(defaultBandwidthPackage.id())
.build());
}
}
resources:
default:
type: alicloud:ga:Accelerator
properties:
duration: 1
autoUseCoupon: true
spec: '1'
defaultBandwidthPackage:
type: alicloud:ga:BandwidthPackage
name: default
properties:
bandwidth: 100
type: Basic
bandwidthType: Basic
paymentType: PayAsYouGo
billingType: PayBy95
ratio: 30
defaultBandwidthPackageAttachment:
type: alicloud:ga:BandwidthPackageAttachment
name: default
properties:
acceleratorId: ${default.id}
bandwidthPackageId: ${defaultBandwidthPackage.id}
Create BandwidthPackageAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BandwidthPackageAttachment(name: string, args: BandwidthPackageAttachmentArgs, opts?: CustomResourceOptions);
@overload
def BandwidthPackageAttachment(resource_name: str,
args: BandwidthPackageAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BandwidthPackageAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
accelerator_id: Optional[str] = None,
bandwidth_package_id: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var alicloudBandwidthPackageAttachmentResource = new AliCloud.Ga.BandwidthPackageAttachment("alicloudBandwidthPackageAttachmentResource", new()
{
AcceleratorId = "string",
BandwidthPackageId = "string",
});
example, err := ga.NewBandwidthPackageAttachment(ctx, "alicloudBandwidthPackageAttachmentResource", &ga.BandwidthPackageAttachmentArgs{
AcceleratorId: pulumi.String("string"),
BandwidthPackageId: pulumi.String("string"),
})
var alicloudBandwidthPackageAttachmentResource = new BandwidthPackageAttachment("alicloudBandwidthPackageAttachmentResource", BandwidthPackageAttachmentArgs.builder()
.acceleratorId("string")
.bandwidthPackageId("string")
.build());
alicloud_bandwidth_package_attachment_resource = alicloud.ga.BandwidthPackageAttachment("alicloudBandwidthPackageAttachmentResource",
accelerator_id="string",
bandwidth_package_id="string")
const alicloudBandwidthPackageAttachmentResource = new alicloud.ga.BandwidthPackageAttachment("alicloudBandwidthPackageAttachmentResource", {
acceleratorId: "string",
bandwidthPackageId: "string",
});
type: alicloud:ga:BandwidthPackageAttachment
properties:
acceleratorId: string
bandwidthPackageId: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BandwidthPackageAttachment resource accepts the following input properties:
- Accelerator
Id string - The ID of the Global Accelerator instance.
- Bandwidth
Package stringId - The ID of the Bandwidth Package. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- Accelerator
Id string - The ID of the Global Accelerator instance.
- Bandwidth
Package stringId - The ID of the Bandwidth Package. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- accelerator
Id String - The ID of the Global Accelerator instance.
- bandwidth
Package StringId - The ID of the Bandwidth Package. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- accelerator
Id string - The ID of the Global Accelerator instance.
- bandwidth
Package stringId - The ID of the Bandwidth Package. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- accelerator_
id str - The ID of the Global Accelerator instance.
- bandwidth_
package_ strid - The ID of the Bandwidth Package. NOTE: From version 1.192.0,
bandwidth_package_id
can be modified.
- accelerator
Id String - The ID of the Global Accelerator instance.
- bandwidth
Package StringId - The ID of the Bandwidth Package. 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.
- Accelerators List<string>
- Accelerators bound with current Bandwidth Package.
- Bandwidth
Package stringId - The ID of the Bandwidth Package. 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.
- Accelerators []string
- Accelerators bound with current Bandwidth Package.
- Bandwidth
Package stringId - The ID of the Bandwidth Package. 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.
- accelerators List<String>
- Accelerators bound with current Bandwidth Package.
- bandwidth
Package StringId - The ID of the Bandwidth Package. 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.
- accelerators string[]
- Accelerators bound with current Bandwidth Package.
- bandwidth
Package stringId - The ID of the Bandwidth Package. 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.
- accelerators Sequence[str]
- Accelerators bound with current Bandwidth Package.
- bandwidth_
package_ strid - The ID of the Bandwidth Package. 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.
- accelerators List<String>
- Accelerators bound with current Bandwidth Package.
- bandwidth
Package StringId - The ID of the Bandwidth Package. 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, e.g.
$ pulumi import alicloud:ga/bandwidthPackageAttachment:BandwidthPackageAttachment example <accelerator_id>:<bandwidth_package_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.