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 cens
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooCen: volcengine.cen.Cen[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
fooCen.push(new volcengine.cen.Cen(`fooCen-${range.value}`, {
cenName: "acc-test-cen",
description: "acc-test",
projectName: "default",
tags: [{
key: "k1",
value: "v1",
}],
}));
}
const fooCens = volcengine.cen.getCensOutput({
ids: fooCen.map(__item => __item.id),
});
import pulumi
import pulumi_volcengine as volcengine
foo_cen = []
for range in [{"value": i} for i in range(0, 2)]:
foo_cen.append(volcengine.cen.Cen(f"fooCen-{range['value']}",
cen_name="acc-test-cen",
description="acc-test",
project_name="default",
tags=[volcengine.cen.CenTagArgs(
key="k1",
value="v1",
)]))
foo_cens = volcengine.cen.get_cens_output(ids=[__item.id for __item in foo_cen])
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 {
var fooCen []*cen.Cen
for index := 0; index < 2; index++ {
key0 := index
_ := index
__res, err := cen.NewCen(ctx, fmt.Sprintf("fooCen-%v", key0), &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
}
fooCen = append(fooCen, __res)
}
_ = cen.GetCensOutput(ctx, cen.GetCensOutputArgs{
Ids: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-functions-volcengine:cen-getCens:getCens.pp:14,9-21),
}, nil);
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooCen = new List<Volcengine.Cen.Cen>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
fooCen.Add(new Volcengine.Cen.Cen($"fooCen-{range.Value}", new()
{
CenName = "acc-test-cen",
Description = "acc-test",
ProjectName = "default",
Tags = new[]
{
new Volcengine.Cen.Inputs.CenTagArgs
{
Key = "k1",
Value = "v1",
},
},
}));
}
var fooCens = Volcengine.Cen.GetCens.Invoke(new()
{
Ids = fooCen.Select(__item => __item.Id).ToList(),
});
});
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.CenFunctions;
import com.pulumi.volcengine.cen.inputs.GetCensArgs;
import com.pulumi.codegen.internal.KeyedValue;
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) {
for (var i = 0; i < 2; i++) {
new Cen("fooCen-" + i, CenArgs.builder()
.cenName("acc-test-cen")
.description("acc-test")
.projectName("default")
.tags(CenTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
}
final var fooCens = CenFunctions.getCens(GetCensArgs.builder()
.ids(fooCen.stream().map(element -> element.id()).collect(toList()))
.build());
}
}
Example coming soon!
Using getCens
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 getCens(args: GetCensArgs, opts?: InvokeOptions): Promise<GetCensResult>
function getCensOutput(args: GetCensOutputArgs, opts?: InvokeOptions): Output<GetCensResult>def get_cens(cen_names: Optional[Sequence[str]] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
tags: Optional[Sequence[GetCensTag]] = None,
opts: Optional[InvokeOptions] = None) -> GetCensResult
def get_cens_output(cen_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetCensTagArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCensResult]func GetCens(ctx *Context, args *GetCensArgs, opts ...InvokeOption) (*GetCensResult, error)
func GetCensOutput(ctx *Context, args *GetCensOutputArgs, opts ...InvokeOption) GetCensResultOutput> Note: This function is named GetCens in the Go SDK.
public static class GetCens
{
public static Task<GetCensResult> InvokeAsync(GetCensArgs args, InvokeOptions? opts = null)
public static Output<GetCensResult> Invoke(GetCensInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCensResult> getCens(GetCensArgs args, InvokeOptions options)
public static Output<GetCensResult> getCens(GetCensArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:cen/getCens:getCens
arguments:
# arguments dictionaryThe following arguments are supported:
- Cen
Names List<string> - A list of cen names.
- Ids List<string>
- A list of cen IDs.
- Name
Regex string - A Name Regex of cen.
- Output
File string - File name where to save data source results.
-
List<Get
Cens Tag> - Tags.
- Cen
Names []string - A list of cen names.
- Ids []string
- A list of cen IDs.
- Name
Regex string - A Name Regex of cen.
- Output
File string - File name where to save data source results.
-
[]Get
Cens Tag - Tags.
- cen
Names List<String> - A list of cen names.
- ids List<String>
- A list of cen IDs.
- name
Regex String - A Name Regex of cen.
- output
File String - File name where to save data source results.
-
List<Get
Cens Tag> - Tags.
- cen
Names string[] - A list of cen names.
- ids string[]
- A list of cen IDs.
- name
Regex string - A Name Regex of cen.
- output
File string - File name where to save data source results.
-
Get
Cens Tag[] - Tags.
- cen_
names Sequence[str] - A list of cen names.
- ids Sequence[str]
- A list of cen IDs.
- name_
regex str - A Name Regex of cen.
- output_
file str - File name where to save data source results.
-
Sequence[Get
Cens Tag] - Tags.
- cen
Names List<String> - A list of cen names.
- ids List<String>
- A list of cen IDs.
- name
Regex String - A Name Regex of cen.
- output
File String - File name where to save data source results.
- List<Property Map>
- Tags.
getCens Result
The following output properties are available:
- Cens
List<Get
Cens Cen> - The collection of cen query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of cen query.
- Cen
Names List<string> - Ids List<string>
- Name
Regex string - Output
File string -
List<Get
Cens Tag> - Tags.
- Cens
[]Get
Cens Cen - The collection of cen query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of cen query.
- Cen
Names []string - Ids []string
- Name
Regex string - Output
File string -
[]Get
Cens Tag - Tags.
- cens
List<Get
Cens Cen> - The collection of cen query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of cen query.
- cen
Names List<String> - ids List<String>
- name
Regex String - output
File String -
List<Get
Cens Tag> - Tags.
- cens
Get
Cens Cen[] - The collection of cen query.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of cen query.
- cen
Names string[] - ids string[]
- name
Regex string - output
File string -
Get
Cens Tag[] - Tags.
- cens
Sequence[Get
Cens Cen] - The collection of cen query.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of cen query.
- cen_
names Sequence[str] - ids Sequence[str]
- name_
regex str - output_
file str -
Sequence[Get
Cens Tag] - Tags.
- cens List<Property Map>
- The collection of cen query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of cen query.
- cen
Names List<String> - ids List<String>
- name
Regex String - output
File String - List<Property Map>
- Tags.
Supporting Types
GetCensCen
- Account
Id string - The account ID of the cen.
- Cen
Bandwidth List<string>Package Ids - A list of bandwidth package IDs of the cen.
- Cen
Id string - The ID of the cen.
- Cen
Name string - The name of the cen.
- Creation
Time string - The create time of the cen.
- Description string
- The description of the cen.
- Id string
- The ID of the cen.
- Project
Name string - The ProjectName of the cen instance.
- Status string
- The status of the cen.
-
List<Get
Cens Cen Tag> - Tags.
- Update
Time string - The update time of the cen.
- Account
Id string - The account ID of the cen.
- Cen
Bandwidth []stringPackage Ids - A list of bandwidth package IDs of the cen.
- Cen
Id string - The ID of the cen.
- Cen
Name string - The name of the cen.
- Creation
Time string - The create time of the cen.
- Description string
- The description of the cen.
- Id string
- The ID of the cen.
- Project
Name string - The ProjectName of the cen instance.
- Status string
- The status of the cen.
-
[]Get
Cens Cen Tag - Tags.
- Update
Time string - The update time of the cen.
- account
Id String - The account ID of the cen.
- cen
Bandwidth List<String>Package Ids - A list of bandwidth package IDs of the cen.
- cen
Id String - The ID of the cen.
- cen
Name String - The name of the cen.
- creation
Time String - The create time of the cen.
- description String
- The description of the cen.
- id String
- The ID of the cen.
- project
Name String - The ProjectName of the cen instance.
- status String
- The status of the cen.
-
List<Get
Cens Cen Tag> - Tags.
- update
Time String - The update time of the cen.
- account
Id string - The account ID of the cen.
- cen
Bandwidth string[]Package Ids - A list of bandwidth package IDs of the cen.
- cen
Id string - The ID of the cen.
- cen
Name string - The name of the cen.
- creation
Time string - The create time of the cen.
- description string
- The description of the cen.
- id string
- The ID of the cen.
- project
Name string - The ProjectName of the cen instance.
- status string
- The status of the cen.
-
Get
Cens Cen Tag[] - Tags.
- update
Time string - The update time of the cen.
- account_
id str - The account ID of the cen.
- cen_
bandwidth_ Sequence[str]package_ ids - A list of bandwidth package IDs of the cen.
- cen_
id str - The ID of the cen.
- cen_
name str - The name of the cen.
- creation_
time str - The create time of the cen.
- description str
- The description of the cen.
- id str
- The ID of the cen.
- project_
name str - The ProjectName of the cen instance.
- status str
- The status of the cen.
-
Sequence[Get
Cens Cen Tag] - Tags.
- update_
time str - The update time of the cen.
- account
Id String - The account ID of the cen.
- cen
Bandwidth List<String>Package Ids - A list of bandwidth package IDs of the cen.
- cen
Id String - The ID of the cen.
- cen
Name String - The name of the cen.
- creation
Time String - The create time of the cen.
- description String
- The description of the cen.
- id String
- The ID of the cen.
- project
Name String - The ProjectName of the cen instance.
- status String
- The status of the cen.
- List<Property Map>
- Tags.
- update
Time String - The update time of the cen.
GetCensCenTag
GetCensTag
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
