Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of cen attach instances
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooCen = new volcengine.cen.Cen("fooCen", {
cenName: "acc-test-cen",
description: "acc-test",
projectName: "default",
tags: [{
key: "k1",
value: "v1",
}],
});
const fooAttachInstance = new volcengine.cen.AttachInstance("fooAttachInstance", {
cenId: fooCen.id,
instanceId: fooVpc.id,
instanceRegionId: "cn-beijing",
instanceType: "VPC",
});
const fooAttachInstances = volcengine.cen.getAttachInstancesOutput({
cenId: fooAttachInstance.cenId,
});
import pulumi
import pulumi_volcengine as volcengine
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
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_attach_instance = volcengine.cen.AttachInstance("fooAttachInstance",
cen_id=foo_cen.id,
instance_id=foo_vpc.id,
instance_region_id="cn-beijing",
instance_type="VPC")
foo_attach_instances = volcengine.cen.get_attach_instances_output(cen_id=foo_attach_instance.cen_id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cen"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
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
}
fooAttachInstance, err := cen.NewAttachInstance(ctx, "fooAttachInstance", &cen.AttachInstanceArgs{
CenId: fooCen.ID(),
InstanceId: fooVpc.ID(),
InstanceRegionId: pulumi.String("cn-beijing"),
InstanceType: pulumi.String("VPC"),
})
if err != nil {
return err
}
_ = cen.GetAttachInstancesOutput(ctx, cen.GetAttachInstancesOutputArgs{
CenId: fooAttachInstance.CenId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
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 fooAttachInstance = new Volcengine.Cen.AttachInstance("fooAttachInstance", new()
{
CenId = fooCen.Id,
InstanceId = fooVpc.Id,
InstanceRegionId = "cn-beijing",
InstanceType = "VPC",
});
var fooAttachInstances = Volcengine.Cen.GetAttachInstances.Invoke(new()
{
CenId = fooAttachInstance.CenId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.cen.Cen;
import com.pulumi.volcengine.cen.CenArgs;
import com.pulumi.volcengine.cen.inputs.CenTagArgs;
import com.pulumi.volcengine.cen.AttachInstance;
import com.pulumi.volcengine.cen.AttachInstanceArgs;
import com.pulumi.volcengine.cen.CenFunctions;
import com.pulumi.volcengine.cen.inputs.GetAttachInstancesArgs;
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 fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
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 fooAttachInstance = new AttachInstance("fooAttachInstance", AttachInstanceArgs.builder()
.cenId(fooCen.id())
.instanceId(fooVpc.id())
.instanceRegionId("cn-beijing")
.instanceType("VPC")
.build());
final var fooAttachInstances = CenFunctions.getAttachInstances(GetAttachInstancesArgs.builder()
.cenId(fooAttachInstance.cenId())
.build());
}
}
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooCen:
type: volcengine:cen:Cen
properties:
cenName: acc-test-cen
description: acc-test
projectName: default
tags:
- key: k1
value: v1
fooAttachInstance:
type: volcengine:cen:AttachInstance
properties:
cenId: ${fooCen.id}
instanceId: ${fooVpc.id}
instanceRegionId: cn-beijing
instanceType: VPC
variables:
fooAttachInstances:
fn::invoke:
Function: volcengine:cen:getAttachInstances
Arguments:
cenId: ${fooAttachInstance.cenId}
Using getAttachInstances
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAttachInstances(args: GetAttachInstancesArgs, opts?: InvokeOptions): Promise<GetAttachInstancesResult>
function getAttachInstancesOutput(args: GetAttachInstancesOutputArgs, opts?: InvokeOptions): Output<GetAttachInstancesResult>def get_attach_instances(cen_id: Optional[str] = None,
instance_id: Optional[str] = None,
instance_region_id: Optional[str] = None,
instance_type: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAttachInstancesResult
def get_attach_instances_output(cen_id: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
instance_region_id: Optional[pulumi.Input[str]] = None,
instance_type: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAttachInstancesResult]func GetAttachInstances(ctx *Context, args *GetAttachInstancesArgs, opts ...InvokeOption) (*GetAttachInstancesResult, error)
func GetAttachInstancesOutput(ctx *Context, args *GetAttachInstancesOutputArgs, opts ...InvokeOption) GetAttachInstancesResultOutput> Note: This function is named GetAttachInstances in the Go SDK.
public static class GetAttachInstances
{
public static Task<GetAttachInstancesResult> InvokeAsync(GetAttachInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetAttachInstancesResult> Invoke(GetAttachInstancesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAttachInstancesResult> getAttachInstances(GetAttachInstancesArgs args, InvokeOptions options)
public static Output<GetAttachInstancesResult> getAttachInstances(GetAttachInstancesArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:cen/getAttachInstances:getAttachInstances
arguments:
# arguments dictionaryThe following arguments are supported:
- Cen
Id string - A cen ID.
- Instance
Id string - An instance ID.
- Instance
Region stringId - A region id of instance.
- Instance
Type string - An instance type.
- Output
File string - File name where to save data source results.
- Cen
Id string - A cen ID.
- Instance
Id string - An instance ID.
- Instance
Region stringId - A region id of instance.
- Instance
Type string - An instance type.
- Output
File string - File name where to save data source results.
- cen
Id String - A cen ID.
- instance
Id String - An instance ID.
- instance
Region StringId - A region id of instance.
- instance
Type String - An instance type.
- output
File String - File name where to save data source results.
- cen
Id string - A cen ID.
- instance
Id string - An instance ID.
- instance
Region stringId - A region id of instance.
- instance
Type string - An instance type.
- output
File string - File name where to save data source results.
- cen_
id str - A cen ID.
- instance_
id str - An instance ID.
- instance_
region_ strid - A region id of instance.
- instance_
type str - An instance type.
- output_
file str - File name where to save data source results.
- cen
Id String - A cen ID.
- instance
Id String - An instance ID.
- instance
Region StringId - A region id of instance.
- instance
Type String - An instance type.
- output
File String - File name where to save data source results.
getAttachInstances Result
The following output properties are available:
- Attach
Instances List<GetAttach Instances Attach Instance> - The collection of cen attach instance query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of cen attach instance query.
- Cen
Id string - The ID of the cen.
- Instance
Id string - The ID of the instance.
- Instance
Region stringId - The region id of the instance.
- Instance
Type string - The type of the instance.
- Output
File string
- Attach
Instances []GetAttach Instances Attach Instance - The collection of cen attach instance query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of cen attach instance query.
- Cen
Id string - The ID of the cen.
- Instance
Id string - The ID of the instance.
- Instance
Region stringId - The region id of the instance.
- Instance
Type string - The type of the instance.
- Output
File string
- attach
Instances List<GetAttach Instances Attach Instance> - The collection of cen attach instance query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of cen attach instance query.
- cen
Id String - The ID of the cen.
- instance
Id String - The ID of the instance.
- instance
Region StringId - The region id of the instance.
- instance
Type String - The type of the instance.
- output
File String
- attach
Instances GetAttach Instances Attach Instance[] - The collection of cen attach instance query.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of cen attach instance query.
- cen
Id string - The ID of the cen.
- instance
Id string - The ID of the instance.
- instance
Region stringId - The region id of the instance.
- instance
Type string - The type of the instance.
- output
File string
- attach_
instances Sequence[GetAttach Instances Attach Instance] - The collection of cen attach instance query.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of cen attach instance query.
- cen_
id str - The ID of the cen.
- instance_
id str - The ID of the instance.
- instance_
region_ strid - The region id of the instance.
- instance_
type str - The type of the instance.
- output_
file str
- attach
Instances List<Property Map> - The collection of cen attach instance query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of cen attach instance query.
- cen
Id String - The ID of the cen.
- instance
Id String - The ID of the instance.
- instance
Region StringId - The region id of the instance.
- instance
Type String - The type of the instance.
- output
File String
Supporting Types
GetAttachInstancesAttachInstance
- Cen
Id string - A cen ID.
- Creation
Time string - The create time of the cen attaching instance.
- Instance
Id string - An instance ID.
- Instance
Owner stringId - The owner ID of the instance.
- Instance
Region stringId - A region id of instance.
- Instance
Type string - An instance type.
- Status string
- The status of the cen attaching instance.
- Cen
Id string - A cen ID.
- Creation
Time string - The create time of the cen attaching instance.
- Instance
Id string - An instance ID.
- Instance
Owner stringId - The owner ID of the instance.
- Instance
Region stringId - A region id of instance.
- Instance
Type string - An instance type.
- Status string
- The status of the cen attaching instance.
- cen
Id String - A cen ID.
- creation
Time String - The create time of the cen attaching instance.
- instance
Id String - An instance ID.
- instance
Owner StringId - The owner ID of the instance.
- instance
Region StringId - A region id of instance.
- instance
Type String - An instance type.
- status String
- The status of the cen attaching instance.
- cen
Id string - A cen ID.
- creation
Time string - The create time of the cen attaching instance.
- instance
Id string - An instance ID.
- instance
Owner stringId - The owner ID of the instance.
- instance
Region stringId - A region id of instance.
- instance
Type string - An instance type.
- status string
- The status of the cen attaching instance.
- cen_
id str - A cen ID.
- creation_
time str - The create time of the cen attaching instance.
- instance_
id str - An instance ID.
- instance_
owner_ strid - The owner ID of the instance.
- instance_
region_ strid - A region id of instance.
- instance_
type str - An instance type.
- status str
- The status of the cen attaching instance.
- cen
Id String - A cen ID.
- creation
Time String - The create time of the cen attaching instance.
- instance
Id String - An instance ID.
- instance
Owner StringId - The owner ID of the instance.
- instance
Region StringId - A region id of instance.
- instance
Type String - An instance type.
- status String
- The status of the cen attaching instance.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
