1. Packages
  2. Volcengine
  3. API Docs
  4. cen
  5. Cens
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.cen.Cens

Explore with Pulumi AI

Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 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.CensOutput({
    ids: fooCen.map(__item => __item.id),
});
Copy
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.cens_output(ids=[__item.id for __item in foo_cen])
Copy
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.CensOutput(ctx, cen.CensOutputArgs{
Ids: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-functions-volcengine:cen-cens:Cens.pp:14,9-21),
}, nil);
return nil
})
}
Copy
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.Cens.Invoke(new()
    {
        Ids = fooCen.Select(__item => __item.Id).ToList(),
    });

});
Copy
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.CensArgs;
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.Cens(CensArgs.builder()
            .ids(fooCen.stream().map(element -> element.id()).collect(toList()))
            .build());

    }
}
Copy
Coming soon!

Using Cens

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 cens(args: CensArgs, opts?: InvokeOptions): Promise<CensResult>
function censOutput(args: CensOutputArgs, opts?: InvokeOptions): Output<CensResult>
Copy
def 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[CensTag]] = None,
         opts: Optional[InvokeOptions] = None) -> CensResult
def 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[CensTagArgs]]]] = None,
         opts: Optional[InvokeOptions] = None) -> Output[CensResult]
Copy
func Cens(ctx *Context, args *CensArgs, opts ...InvokeOption) (*CensResult, error)
func CensOutput(ctx *Context, args *CensOutputArgs, opts ...InvokeOption) CensResultOutput
Copy
public static class Cens 
{
    public static Task<CensResult> InvokeAsync(CensArgs args, InvokeOptions? opts = null)
    public static Output<CensResult> Invoke(CensInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<CensResult> cens(CensArgs args, InvokeOptions options)
public static Output<CensResult> cens(CensArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: volcengine:cen:Cens
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CenNames List<string>
A list of cen names.
Ids List<string>
A list of cen IDs.
NameRegex string
A Name Regex of cen.
OutputFile string
File name where to save data source results.
Tags List<CensTag>
Tags.
CenNames []string
A list of cen names.
Ids []string
A list of cen IDs.
NameRegex string
A Name Regex of cen.
OutputFile string
File name where to save data source results.
Tags []CensTag
Tags.
cenNames List<String>
A list of cen names.
ids List<String>
A list of cen IDs.
nameRegex String
A Name Regex of cen.
outputFile String
File name where to save data source results.
tags List<CensTag>
Tags.
cenNames string[]
A list of cen names.
ids string[]
A list of cen IDs.
nameRegex string
A Name Regex of cen.
outputFile string
File name where to save data source results.
tags CensTag[]
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.
tags Sequence[CensTag]
Tags.
cenNames List<String>
A list of cen names.
ids List<String>
A list of cen IDs.
nameRegex String
A Name Regex of cen.
outputFile String
File name where to save data source results.
tags List<Property Map>
Tags.

Cens Result

The following output properties are available:

Cens List<CensCen>
The collection of cen query.
Id string
The provider-assigned unique ID for this managed resource.
TotalCount int
The total count of cen query.
CenNames List<string>
Ids List<string>
NameRegex string
OutputFile string
Tags List<CensTag>
Tags.
Cens []CensCen
The collection of cen query.
Id string
The provider-assigned unique ID for this managed resource.
TotalCount int
The total count of cen query.
CenNames []string
Ids []string
NameRegex string
OutputFile string
Tags []CensTag
Tags.
cens List<CensCen>
The collection of cen query.
id String
The provider-assigned unique ID for this managed resource.
totalCount Integer
The total count of cen query.
cenNames List<String>
ids List<String>
nameRegex String
outputFile String
tags List<CensTag>
Tags.
cens CensCen[]
The collection of cen query.
id string
The provider-assigned unique ID for this managed resource.
totalCount number
The total count of cen query.
cenNames string[]
ids string[]
nameRegex string
outputFile string
tags CensTag[]
Tags.
cens Sequence[CensCen]
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
tags Sequence[CensTag]
Tags.
cens List<Property Map>
The collection of cen query.
id String
The provider-assigned unique ID for this managed resource.
totalCount Number
The total count of cen query.
cenNames List<String>
ids List<String>
nameRegex String
outputFile String
tags List<Property Map>
Tags.

Supporting Types

CensCen

AccountId This property is required. string
The account ID of the cen.
CenBandwidthPackageIds This property is required. List<string>
A list of bandwidth package IDs of the cen.
CenId This property is required. string
The ID of the cen.
CenName This property is required. string
The name of the cen.
CreationTime This property is required. string
The create time of the cen.
Description This property is required. string
The description of the cen.
Id This property is required. string
The ID of the cen.
ProjectName This property is required. string
The ProjectName of the cen instance.
Status This property is required. string
The status of the cen.
Tags This property is required. List<CensCenTag>
Tags.
UpdateTime This property is required. string
The update time of the cen.
AccountId This property is required. string
The account ID of the cen.
CenBandwidthPackageIds This property is required. []string
A list of bandwidth package IDs of the cen.
CenId This property is required. string
The ID of the cen.
CenName This property is required. string
The name of the cen.
CreationTime This property is required. string
The create time of the cen.
Description This property is required. string
The description of the cen.
Id This property is required. string
The ID of the cen.
ProjectName This property is required. string
The ProjectName of the cen instance.
Status This property is required. string
The status of the cen.
Tags This property is required. []CensCenTag
Tags.
UpdateTime This property is required. string
The update time of the cen.
accountId This property is required. String
The account ID of the cen.
cenBandwidthPackageIds This property is required. List<String>
A list of bandwidth package IDs of the cen.
cenId This property is required. String
The ID of the cen.
cenName This property is required. String
The name of the cen.
creationTime This property is required. String
The create time of the cen.
description This property is required. String
The description of the cen.
id This property is required. String
The ID of the cen.
projectName This property is required. String
The ProjectName of the cen instance.
status This property is required. String
The status of the cen.
tags This property is required. List<CensCenTag>
Tags.
updateTime This property is required. String
The update time of the cen.
accountId This property is required. string
The account ID of the cen.
cenBandwidthPackageIds This property is required. string[]
A list of bandwidth package IDs of the cen.
cenId This property is required. string
The ID of the cen.
cenName This property is required. string
The name of the cen.
creationTime This property is required. string
The create time of the cen.
description This property is required. string
The description of the cen.
id This property is required. string
The ID of the cen.
projectName This property is required. string
The ProjectName of the cen instance.
status This property is required. string
The status of the cen.
tags This property is required. CensCenTag[]
Tags.
updateTime This property is required. string
The update time of the cen.
account_id This property is required. str
The account ID of the cen.
cen_bandwidth_package_ids This property is required. Sequence[str]
A list of bandwidth package IDs of the cen.
cen_id This property is required. str
The ID of the cen.
cen_name This property is required. str
The name of the cen.
creation_time This property is required. str
The create time of the cen.
description This property is required. str
The description of the cen.
id This property is required. str
The ID of the cen.
project_name This property is required. str
The ProjectName of the cen instance.
status This property is required. str
The status of the cen.
tags This property is required. Sequence[CensCenTag]
Tags.
update_time This property is required. str
The update time of the cen.
accountId This property is required. String
The account ID of the cen.
cenBandwidthPackageIds This property is required. List<String>
A list of bandwidth package IDs of the cen.
cenId This property is required. String
The ID of the cen.
cenName This property is required. String
The name of the cen.
creationTime This property is required. String
The create time of the cen.
description This property is required. String
The description of the cen.
id This property is required. String
The ID of the cen.
projectName This property is required. String
The ProjectName of the cen instance.
status This property is required. String
The status of the cen.
tags This property is required. List<Property Map>
Tags.
updateTime This property is required. String
The update time of the cen.

CensCenTag

Key This property is required. string
The Key of Tags.
Value This property is required. string
The Value of Tags.
Key This property is required. string
The Key of Tags.
Value This property is required. string
The Value of Tags.
key This property is required. String
The Key of Tags.
value This property is required. String
The Value of Tags.
key This property is required. string
The Key of Tags.
value This property is required. string
The Value of Tags.
key This property is required. str
The Key of Tags.
value This property is required. str
The Value of Tags.
key This property is required. String
The Key of Tags.
value This property is required. String
The Value of Tags.

CensTag

Key This property is required. string
The Key of Tags.
Value This property is required. string
The Value of Tags.
Key This property is required. string
The Key of Tags.
Value This property is required. string
The Value of Tags.
key This property is required. String
The Key of Tags.
value This property is required. String
The Value of Tags.
key This property is required. string
The Key of Tags.
value This property is required. string
The Value of Tags.
key This property is required. str
The Key of Tags.
value This property is required. str
The Value of Tags.
key This property is required. String
The Key of Tags.
value This property is required. String
The Value of Tags.

Package Details

Repository
volcengine volcengine/pulumi-volcengine
License
Apache-2.0
Notes
This Pulumi package is based on the volcengine Terraform Provider.
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine