volcengine.cen.BandwidthPackageAssociate
Explore with Pulumi AI
Provides a resource to manage cen bandwidth package associate
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooCen = new Volcengine.Cen.Cen("fooCen", new()
{
CenName = "acc-test-cen",
Description = "acc-test",
ProjectName = "default",
Tags = new[]
{
new Volcengine.Cen.Inputs.CenTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
var fooBandwidthPackage = new Volcengine.Cen.BandwidthPackage("fooBandwidthPackage", new()
{
LocalGeographicRegionSetId = "China",
PeerGeographicRegionSetId = "China",
Bandwidth = 2,
CenBandwidthPackageName = "acc-test-cen-bp",
Description = "acc-test",
BillingType = "PrePaid",
PeriodUnit = "Month",
Period = 1,
ProjectName = "default",
Tags = new[]
{
new Volcengine.Cen.Inputs.BandwidthPackageTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
var fooBandwidthPackageAssociate = new Volcengine.Cen.BandwidthPackageAssociate("fooBandwidthPackageAssociate", new()
{
CenBandwidthPackageId = fooBandwidthPackage.Id,
CenId = fooCen.Id,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cen"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooCen, err := cen.NewCen(ctx, "fooCen", &cen.CenArgs{
CenName: pulumi.String("acc-test-cen"),
Description: pulumi.String("acc-test"),
ProjectName: pulumi.String("default"),
Tags: cen.CenTagArray{
&cen.CenTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
fooBandwidthPackage, err := cen.NewBandwidthPackage(ctx, "fooBandwidthPackage", &cen.BandwidthPackageArgs{
LocalGeographicRegionSetId: pulumi.String("China"),
PeerGeographicRegionSetId: pulumi.String("China"),
Bandwidth: pulumi.Int(2),
CenBandwidthPackageName: pulumi.String("acc-test-cen-bp"),
Description: pulumi.String("acc-test"),
BillingType: pulumi.String("PrePaid"),
PeriodUnit: pulumi.String("Month"),
Period: pulumi.Int(1),
ProjectName: pulumi.String("default"),
Tags: cen.BandwidthPackageTagArray{
&cen.BandwidthPackageTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
_, err = cen.NewBandwidthPackageAssociate(ctx, "fooBandwidthPackageAssociate", &cen.BandwidthPackageAssociateArgs{
CenBandwidthPackageId: fooBandwidthPackage.ID(),
CenId: fooCen.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.volcengine.cen.Cen;
import com.pulumi.volcengine.cen.CenArgs;
import com.pulumi.volcengine.cen.inputs.CenTagArgs;
import com.pulumi.volcengine.cen.BandwidthPackage;
import com.pulumi.volcengine.cen.BandwidthPackageArgs;
import com.pulumi.volcengine.cen.inputs.BandwidthPackageTagArgs;
import com.pulumi.volcengine.cen.BandwidthPackageAssociate;
import com.pulumi.volcengine.cen.BandwidthPackageAssociateArgs;
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 fooCen = new Cen("fooCen", CenArgs.builder()
.cenName("acc-test-cen")
.description("acc-test")
.projectName("default")
.tags(CenTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
var fooBandwidthPackage = new BandwidthPackage("fooBandwidthPackage", BandwidthPackageArgs.builder()
.localGeographicRegionSetId("China")
.peerGeographicRegionSetId("China")
.bandwidth(2)
.cenBandwidthPackageName("acc-test-cen-bp")
.description("acc-test")
.billingType("PrePaid")
.periodUnit("Month")
.period(1)
.projectName("default")
.tags(BandwidthPackageTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
var fooBandwidthPackageAssociate = new BandwidthPackageAssociate("fooBandwidthPackageAssociate", BandwidthPackageAssociateArgs.builder()
.cenBandwidthPackageId(fooBandwidthPackage.id())
.cenId(fooCen.id())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_cen = volcengine.cen.Cen("fooCen",
cen_name="acc-test-cen",
description="acc-test",
project_name="default",
tags=[volcengine.cen.CenTagArgs(
key="k1",
value="v1",
)])
foo_bandwidth_package = volcengine.cen.BandwidthPackage("fooBandwidthPackage",
local_geographic_region_set_id="China",
peer_geographic_region_set_id="China",
bandwidth=2,
cen_bandwidth_package_name="acc-test-cen-bp",
description="acc-test",
billing_type="PrePaid",
period_unit="Month",
period=1,
project_name="default",
tags=[volcengine.cen.BandwidthPackageTagArgs(
key="k1",
value="v1",
)])
foo_bandwidth_package_associate = volcengine.cen.BandwidthPackageAssociate("fooBandwidthPackageAssociate",
cen_bandwidth_package_id=foo_bandwidth_package.id,
cen_id=foo_cen.id)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const fooCen = new volcengine.cen.Cen("fooCen", {
cenName: "acc-test-cen",
description: "acc-test",
projectName: "default",
tags: [{
key: "k1",
value: "v1",
}],
});
const fooBandwidthPackage = new volcengine.cen.BandwidthPackage("fooBandwidthPackage", {
localGeographicRegionSetId: "China",
peerGeographicRegionSetId: "China",
bandwidth: 2,
cenBandwidthPackageName: "acc-test-cen-bp",
description: "acc-test",
billingType: "PrePaid",
periodUnit: "Month",
period: 1,
projectName: "default",
tags: [{
key: "k1",
value: "v1",
}],
});
const fooBandwidthPackageAssociate = new volcengine.cen.BandwidthPackageAssociate("fooBandwidthPackageAssociate", {
cenBandwidthPackageId: fooBandwidthPackage.id,
cenId: fooCen.id,
});
resources:
fooCen:
type: volcengine:cen:Cen
properties:
cenName: acc-test-cen
description: acc-test
projectName: default
tags:
- key: k1
value: v1
fooBandwidthPackage:
type: volcengine:cen:BandwidthPackage
properties:
localGeographicRegionSetId: China
peerGeographicRegionSetId: China
bandwidth: 2
cenBandwidthPackageName: acc-test-cen-bp
description: acc-test
billingType: PrePaid
periodUnit: Month
period: 1
projectName: default
tags:
- key: k1
value: v1
fooBandwidthPackageAssociate:
type: volcengine:cen:BandwidthPackageAssociate
properties:
cenBandwidthPackageId: ${fooBandwidthPackage.id}
cenId: ${fooCen.id}
Create BandwidthPackageAssociate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BandwidthPackageAssociate(name: string, args: BandwidthPackageAssociateArgs, opts?: CustomResourceOptions);
@overload
def BandwidthPackageAssociate(resource_name: str,
args: BandwidthPackageAssociateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BandwidthPackageAssociate(resource_name: str,
opts: Optional[ResourceOptions] = None,
cen_bandwidth_package_id: Optional[str] = None,
cen_id: Optional[str] = None)
func NewBandwidthPackageAssociate(ctx *Context, name string, args BandwidthPackageAssociateArgs, opts ...ResourceOption) (*BandwidthPackageAssociate, error)
public BandwidthPackageAssociate(string name, BandwidthPackageAssociateArgs args, CustomResourceOptions? opts = null)
public BandwidthPackageAssociate(String name, BandwidthPackageAssociateArgs args)
public BandwidthPackageAssociate(String name, BandwidthPackageAssociateArgs args, CustomResourceOptions options)
type: volcengine:cen:BandwidthPackageAssociate
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 BandwidthPackageAssociateArgs
- 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 BandwidthPackageAssociateArgs
- 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 BandwidthPackageAssociateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BandwidthPackageAssociateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BandwidthPackageAssociateArgs
- 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 bandwidthPackageAssociateResource = new Volcengine.Cen.BandwidthPackageAssociate("bandwidthPackageAssociateResource", new()
{
CenBandwidthPackageId = "string",
CenId = "string",
});
example, err := cen.NewBandwidthPackageAssociate(ctx, "bandwidthPackageAssociateResource", &cen.BandwidthPackageAssociateArgs{
CenBandwidthPackageId: pulumi.String("string"),
CenId: pulumi.String("string"),
})
var bandwidthPackageAssociateResource = new BandwidthPackageAssociate("bandwidthPackageAssociateResource", BandwidthPackageAssociateArgs.builder()
.cenBandwidthPackageId("string")
.cenId("string")
.build());
bandwidth_package_associate_resource = volcengine.cen.BandwidthPackageAssociate("bandwidthPackageAssociateResource",
cen_bandwidth_package_id="string",
cen_id="string")
const bandwidthPackageAssociateResource = new volcengine.cen.BandwidthPackageAssociate("bandwidthPackageAssociateResource", {
cenBandwidthPackageId: "string",
cenId: "string",
});
type: volcengine:cen:BandwidthPackageAssociate
properties:
cenBandwidthPackageId: string
cenId: string
BandwidthPackageAssociate 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 BandwidthPackageAssociate resource accepts the following input properties:
- Cen
Bandwidth stringPackage Id - The ID of the cen bandwidth package.
- Cen
Id string - The ID of the cen.
- Cen
Bandwidth stringPackage Id - The ID of the cen bandwidth package.
- Cen
Id string - The ID of the cen.
- cen
Bandwidth StringPackage Id - The ID of the cen bandwidth package.
- cen
Id String - The ID of the cen.
- cen
Bandwidth stringPackage Id - The ID of the cen bandwidth package.
- cen
Id string - The ID of the cen.
- cen_
bandwidth_ strpackage_ id - The ID of the cen bandwidth package.
- cen_
id str - The ID of the cen.
- cen
Bandwidth StringPackage Id - The ID of the cen bandwidth package.
- cen
Id String - The ID of the cen.
Outputs
All input properties are implicitly available as output properties. Additionally, the BandwidthPackageAssociate 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 BandwidthPackageAssociate Resource
Get an existing BandwidthPackageAssociate 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?: BandwidthPackageAssociateState, opts?: CustomResourceOptions): BandwidthPackageAssociate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cen_bandwidth_package_id: Optional[str] = None,
cen_id: Optional[str] = None) -> BandwidthPackageAssociate
func GetBandwidthPackageAssociate(ctx *Context, name string, id IDInput, state *BandwidthPackageAssociateState, opts ...ResourceOption) (*BandwidthPackageAssociate, error)
public static BandwidthPackageAssociate Get(string name, Input<string> id, BandwidthPackageAssociateState? state, CustomResourceOptions? opts = null)
public static BandwidthPackageAssociate get(String name, Output<String> id, BandwidthPackageAssociateState 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.
- Cen
Bandwidth stringPackage Id - The ID of the cen bandwidth package.
- Cen
Id string - The ID of the cen.
- Cen
Bandwidth stringPackage Id - The ID of the cen bandwidth package.
- Cen
Id string - The ID of the cen.
- cen
Bandwidth StringPackage Id - The ID of the cen bandwidth package.
- cen
Id String - The ID of the cen.
- cen
Bandwidth stringPackage Id - The ID of the cen bandwidth package.
- cen
Id string - The ID of the cen.
- cen_
bandwidth_ strpackage_ id - The ID of the cen bandwidth package.
- cen_
id str - The ID of the cen.
- cen
Bandwidth StringPackage Id - The ID of the cen bandwidth package.
- cen
Id String - The ID of the cen.
Import
Cen bandwidth package associate can be imported using the CenBandwidthPackageId:CenId, e.g.
$ pulumi import volcengine:cen/bandwidthPackageAssociate:BandwidthPackageAssociate default cbp-4c2zaavbvh5fx****:cen-7qthudw0ll6jmc****
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.