Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.cen.getTransitRouterCidrs
Explore with Pulumi AI
This data source provides the Cen Transit Router Cidrs of the current Alibaba Cloud user.
NOTE: Available in v1.193.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.cen.getTransitRouterCidrs({
ids: ["example_id"],
transitRouterId: "tr-6ehx7q2jze8ch5ji0****",
});
export const cenTransitRouterCidrId0 = ids.then(ids => ids.cidrs?.[0]?.id);
const nameRegex = alicloud.cen.getTransitRouterCidrs({
nameRegex: "^my-name",
transitRouterId: "tr-6ehx7q2jze8ch5ji0****",
});
export const cenTransitRouterCidrId1 = nameRegex.then(nameRegex => nameRegex.cidrs?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.cen.get_transit_router_cidrs(ids=["example_id"],
transit_router_id="tr-6ehx7q2jze8ch5ji0****")
pulumi.export("cenTransitRouterCidrId0", ids.cidrs[0].id)
name_regex = alicloud.cen.get_transit_router_cidrs(name_regex="^my-name",
transit_router_id="tr-6ehx7q2jze8ch5ji0****")
pulumi.export("cenTransitRouterCidrId1", name_regex.cidrs[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := cen.GetTransitRouterCidrs(ctx, &cen.GetTransitRouterCidrsArgs{
Ids: []string{
"example_id",
},
TransitRouterId: "tr-6ehx7q2jze8ch5ji0****",
}, nil)
if err != nil {
return err
}
ctx.Export("cenTransitRouterCidrId0", ids.Cidrs[0].Id)
nameRegex, err := cen.GetTransitRouterCidrs(ctx, &cen.GetTransitRouterCidrsArgs{
NameRegex: pulumi.StringRef("^my-name"),
TransitRouterId: "tr-6ehx7q2jze8ch5ji0****",
}, nil)
if err != nil {
return err
}
ctx.Export("cenTransitRouterCidrId1", nameRegex.Cidrs[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Cen.GetTransitRouterCidrs.Invoke(new()
{
Ids = new[]
{
"example_id",
},
TransitRouterId = "tr-6ehx7q2jze8ch5ji0****",
});
var nameRegex = AliCloud.Cen.GetTransitRouterCidrs.Invoke(new()
{
NameRegex = "^my-name",
TransitRouterId = "tr-6ehx7q2jze8ch5ji0****",
});
return new Dictionary<string, object?>
{
["cenTransitRouterCidrId0"] = ids.Apply(getTransitRouterCidrsResult => getTransitRouterCidrsResult.Cidrs[0]?.Id),
["cenTransitRouterCidrId1"] = nameRegex.Apply(getTransitRouterCidrsResult => getTransitRouterCidrsResult.Cidrs[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.inputs.GetTransitRouterCidrsArgs;
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) {
final var ids = CenFunctions.getTransitRouterCidrs(GetTransitRouterCidrsArgs.builder()
.ids("example_id")
.transitRouterId("tr-6ehx7q2jze8ch5ji0****")
.build());
ctx.export("cenTransitRouterCidrId0", ids.applyValue(getTransitRouterCidrsResult -> getTransitRouterCidrsResult.cidrs()[0].id()));
final var nameRegex = CenFunctions.getTransitRouterCidrs(GetTransitRouterCidrsArgs.builder()
.nameRegex("^my-name")
.transitRouterId("tr-6ehx7q2jze8ch5ji0****")
.build());
ctx.export("cenTransitRouterCidrId1", nameRegex.applyValue(getTransitRouterCidrsResult -> getTransitRouterCidrsResult.cidrs()[0].id()));
}
}
variables:
ids:
fn::invoke:
function: alicloud:cen:getTransitRouterCidrs
arguments:
ids:
- example_id
transitRouterId: tr-6ehx7q2jze8ch5ji0****
nameRegex:
fn::invoke:
function: alicloud:cen:getTransitRouterCidrs
arguments:
nameRegex: ^my-name
transitRouterId: tr-6ehx7q2jze8ch5ji0****
outputs:
cenTransitRouterCidrId0: ${ids.cidrs[0].id}
cenTransitRouterCidrId1: ${nameRegex.cidrs[0].id}
Using getTransitRouterCidrs
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 getTransitRouterCidrs(args: GetTransitRouterCidrsArgs, opts?: InvokeOptions): Promise<GetTransitRouterCidrsResult>
function getTransitRouterCidrsOutput(args: GetTransitRouterCidrsOutputArgs, opts?: InvokeOptions): Output<GetTransitRouterCidrsResult>
def get_transit_router_cidrs(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
transit_router_cidr_id: Optional[str] = None,
transit_router_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTransitRouterCidrsResult
def get_transit_router_cidrs_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
transit_router_cidr_id: Optional[pulumi.Input[str]] = None,
transit_router_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTransitRouterCidrsResult]
func GetTransitRouterCidrs(ctx *Context, args *GetTransitRouterCidrsArgs, opts ...InvokeOption) (*GetTransitRouterCidrsResult, error)
func GetTransitRouterCidrsOutput(ctx *Context, args *GetTransitRouterCidrsOutputArgs, opts ...InvokeOption) GetTransitRouterCidrsResultOutput
> Note: This function is named GetTransitRouterCidrs
in the Go SDK.
public static class GetTransitRouterCidrs
{
public static Task<GetTransitRouterCidrsResult> InvokeAsync(GetTransitRouterCidrsArgs args, InvokeOptions? opts = null)
public static Output<GetTransitRouterCidrsResult> Invoke(GetTransitRouterCidrsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTransitRouterCidrsResult> getTransitRouterCidrs(GetTransitRouterCidrsArgs args, InvokeOptions options)
public static Output<GetTransitRouterCidrsResult> getTransitRouterCidrs(GetTransitRouterCidrsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cen/getTransitRouterCidrs:getTransitRouterCidrs
arguments:
# arguments dictionary
The following arguments are supported:
- Transit
Router Id This property is required. Changes to this property will trigger replacement.
- The ID of the transit router.
- Ids
Changes to this property will trigger replacement.
- A list of Cen Transit Router Cidr IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Transit Router Cidr name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Transit
Router Cidr Id Changes to this property will trigger replacement.
- The ID of the transit router cidr.
- Transit
Router Id This property is required. Changes to this property will trigger replacement.
- The ID of the transit router.
- Ids
Changes to this property will trigger replacement.
- A list of Cen Transit Router Cidr IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Transit Router Cidr name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Transit
Router Cidr Id Changes to this property will trigger replacement.
- The ID of the transit router cidr.
- transit
Router Id This property is required. Changes to this property will trigger replacement.
- The ID of the transit router.
- ids
Changes to this property will trigger replacement.
- A list of Cen Transit Router Cidr IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Transit Router Cidr name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - transit
Router Cidr Id Changes to this property will trigger replacement.
- The ID of the transit router cidr.
- transit
Router Id This property is required. Changes to this property will trigger replacement.
- The ID of the transit router.
- ids
Changes to this property will trigger replacement.
- A list of Cen Transit Router Cidr IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Transit Router Cidr name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - transit
Router Cidr Id Changes to this property will trigger replacement.
- The ID of the transit router cidr.
- transit_
router_ id This property is required. Changes to this property will trigger replacement.
- The ID of the transit router.
- ids
Changes to this property will trigger replacement.
- A list of Cen Transit Router Cidr IDs.
- name_
regex Changes to this property will trigger replacement.
- A regex string to filter results by Transit Router Cidr name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - transit_
router_ cidr_ id Changes to this property will trigger replacement.
- The ID of the transit router cidr.
- transit
Router Id This property is required. Changes to this property will trigger replacement.
- The ID of the transit router.
- ids
Changes to this property will trigger replacement.
- A list of Cen Transit Router Cidr IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Transit Router Cidr name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - transit
Router Cidr Id Changes to this property will trigger replacement.
- The ID of the transit router cidr.
getTransitRouterCidrs Result
The following output properties are available:
- Cidrs
List<Pulumi.
Ali Cloud. Cen. Outputs. Get Transit Router Cidrs Cidr> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Transit
Router stringId - Name
Regex string - Output
File string - Transit
Router stringCidr Id
- Cidrs
[]Get
Transit Router Cidrs Cidr - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Transit
Router stringId - Name
Regex string - Output
File string - Transit
Router stringCidr Id
- cidrs
List<Get
Transit Router Cidrs Cidr> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- transit
Router StringId - name
Regex String - output
File String - transit
Router StringCidr Id
- cidrs
Get
Transit Router Cidrs Cidr[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- transit
Router stringId - name
Regex string - output
File string - transit
Router stringCidr Id
- cidrs
Sequence[Get
Transit Router Cidrs Cidr] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- transit_
router_ strid - name_
regex str - output_
file str - transit_
router_ strcidr_ id
- cidrs List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- transit
Router StringId - name
Regex String - output
File String - transit
Router StringCidr Id
Supporting Types
GetTransitRouterCidrsCidr
- Cidr
This property is required. string - The cidr of the transit router.
- Description
This property is required. string - The description of the transit router.
- Family
This property is required. string - The type of the transit router cidr.
- Id
This property is required. string - The ID of the Cen Transit Router Cidr. It formats as
<transit_router_id>:<transit_router_cidr_id>
. - Publish
Cidr Route This property is required. bool - Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table.
- Transit
Router Cidr Id This property is required. string - The ID of the transit router cidr.
- Transit
Router Cidr Name This property is required. string - The name of the transit router.
- Transit
Router Id This property is required. string - The ID of the transit router.
- Cidr
This property is required. string - The cidr of the transit router.
- Description
This property is required. string - The description of the transit router.
- Family
This property is required. string - The type of the transit router cidr.
- Id
This property is required. string - The ID of the Cen Transit Router Cidr. It formats as
<transit_router_id>:<transit_router_cidr_id>
. - Publish
Cidr Route This property is required. bool - Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table.
- Transit
Router Cidr Id This property is required. string - The ID of the transit router cidr.
- Transit
Router Cidr Name This property is required. string - The name of the transit router.
- Transit
Router Id This property is required. string - The ID of the transit router.
- cidr
This property is required. String - The cidr of the transit router.
- description
This property is required. String - The description of the transit router.
- family
This property is required. String - The type of the transit router cidr.
- id
This property is required. String - The ID of the Cen Transit Router Cidr. It formats as
<transit_router_id>:<transit_router_cidr_id>
. - publish
Cidr Route This property is required. Boolean - Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table.
- transit
Router Cidr Id This property is required. String - The ID of the transit router cidr.
- transit
Router Cidr Name This property is required. String - The name of the transit router.
- transit
Router Id This property is required. String - The ID of the transit router.
- cidr
This property is required. string - The cidr of the transit router.
- description
This property is required. string - The description of the transit router.
- family
This property is required. string - The type of the transit router cidr.
- id
This property is required. string - The ID of the Cen Transit Router Cidr. It formats as
<transit_router_id>:<transit_router_cidr_id>
. - publish
Cidr Route This property is required. boolean - Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table.
- transit
Router Cidr Id This property is required. string - The ID of the transit router cidr.
- transit
Router Cidr Name This property is required. string - The name of the transit router.
- transit
Router Id This property is required. string - The ID of the transit router.
- cidr
This property is required. str - The cidr of the transit router.
- description
This property is required. str - The description of the transit router.
- family
This property is required. str - The type of the transit router cidr.
- id
This property is required. str - The ID of the Cen Transit Router Cidr. It formats as
<transit_router_id>:<transit_router_cidr_id>
. - publish_
cidr_ route This property is required. bool - Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table.
- transit_
router_ cidr_ id This property is required. str - The ID of the transit router cidr.
- transit_
router_ cidr_ name This property is required. str - The name of the transit router.
- transit_
router_ id This property is required. str - The ID of the transit router.
- cidr
This property is required. String - The cidr of the transit router.
- description
This property is required. String - The description of the transit router.
- family
This property is required. String - The type of the transit router cidr.
- id
This property is required. String - The ID of the Cen Transit Router Cidr. It formats as
<transit_router_id>:<transit_router_cidr_id>
. - publish
Cidr Route This property is required. Boolean - Whether to allow automatically adding Transit Router Cidr in Transit Router Route Table.
- transit
Router Cidr Id This property is required. String - The ID of the transit router cidr.
- transit
Router Cidr Name This property is required. String - The name of the transit router.
- transit
Router Id This property is required. String - The ID of the transit router.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.