Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.cen.getTransitRouterAvailableResources
Explore with Pulumi AI
This data source provides the CEN Transit Router Available Resources of the current Alibaba Cloud user.
NOTE: Available since v1.163.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.cen.getTransitRouterAvailableResources({});
export const masterId = ids.then(ids => ids.resources?.[0]?.masterZones?.[0]);
export const slaveId = ids.then(ids => ids.resources?.[0]?.slaveZones?.[0]);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.cen.get_transit_router_available_resources()
pulumi.export("masterId", ids.resources[0].master_zones[0])
pulumi.export("slaveId", ids.resources[0].slave_zones[0])
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.GetTransitRouterAvailableResources(ctx, &cen.GetTransitRouterAvailableResourcesArgs{}, nil)
if err != nil {
return err
}
ctx.Export("masterId", ids.Resources[0].MasterZones[0])
ctx.Export("slaveId", ids.Resources[0].SlaveZones[0])
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Cen.GetTransitRouterAvailableResources.Invoke();
return new Dictionary<string, object?>
{
["masterId"] = ids.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.MasterZones[0]),
["slaveId"] = ids.Apply(getTransitRouterAvailableResourcesResult => getTransitRouterAvailableResourcesResult.Resources[0]?.SlaveZones[0]),
};
});
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.GetTransitRouterAvailableResourcesArgs;
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.getTransitRouterAvailableResources();
ctx.export("masterId", ids.applyValue(getTransitRouterAvailableResourcesResult -> getTransitRouterAvailableResourcesResult.resources()[0].masterZones()[0]));
ctx.export("slaveId", ids.applyValue(getTransitRouterAvailableResourcesResult -> getTransitRouterAvailableResourcesResult.resources()[0].slaveZones()[0]));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:cen:getTransitRouterAvailableResources
Arguments: {}
outputs:
masterId: ${ids.resources[0].masterZones[0]}
slaveId: ${ids.resources[0].slaveZones[0]}
Using getTransitRouterAvailableResources
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 getTransitRouterAvailableResources(args: GetTransitRouterAvailableResourcesArgs, opts?: InvokeOptions): Promise<GetTransitRouterAvailableResourcesResult>
function getTransitRouterAvailableResourcesOutput(args: GetTransitRouterAvailableResourcesOutputArgs, opts?: InvokeOptions): Output<GetTransitRouterAvailableResourcesResult>
def get_transit_router_available_resources(output_file: Optional[str] = None,
support_multicast: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetTransitRouterAvailableResourcesResult
def get_transit_router_available_resources_output(output_file: Optional[pulumi.Input[str]] = None,
support_multicast: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTransitRouterAvailableResourcesResult]
func GetTransitRouterAvailableResources(ctx *Context, args *GetTransitRouterAvailableResourcesArgs, opts ...InvokeOption) (*GetTransitRouterAvailableResourcesResult, error)
func GetTransitRouterAvailableResourcesOutput(ctx *Context, args *GetTransitRouterAvailableResourcesOutputArgs, opts ...InvokeOption) GetTransitRouterAvailableResourcesResultOutput
> Note: This function is named GetTransitRouterAvailableResources
in the Go SDK.
public static class GetTransitRouterAvailableResources
{
public static Task<GetTransitRouterAvailableResourcesResult> InvokeAsync(GetTransitRouterAvailableResourcesArgs args, InvokeOptions? opts = null)
public static Output<GetTransitRouterAvailableResourcesResult> Invoke(GetTransitRouterAvailableResourcesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTransitRouterAvailableResourcesResult> getTransitRouterAvailableResources(GetTransitRouterAvailableResourcesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cen/getTransitRouterAvailableResources:getTransitRouterAvailableResources
arguments:
# arguments dictionary
The following arguments are supported:
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Support
Multicast bool - Specifies whether to query only the zones in which the multicast feature is supported.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Support
Multicast bool - Specifies whether to query only the zones in which the multicast feature is supported.
- output
File String - File name where to save data source results (after running
pulumi preview
). - support
Multicast Boolean - Specifies whether to query only the zones in which the multicast feature is supported.
- output
File string - File name where to save data source results (after running
pulumi preview
). - support
Multicast boolean - Specifies whether to query only the zones in which the multicast feature is supported.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - support_
multicast bool - Specifies whether to query only the zones in which the multicast feature is supported.
- output
File String - File name where to save data source results (after running
pulumi preview
). - support
Multicast Boolean - Specifies whether to query only the zones in which the multicast feature is supported.
getTransitRouterAvailableResources Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Resources
List<Pulumi.
Ali Cloud. Cen. Outputs. Get Transit Router Available Resources Resource> - A list of Cen Transit Router Available Resources. Each element contains the following attributes:
- Output
File string - Support
Multicast bool - (Available since v1.225.0) Indicates whether the zone supports the multicast feature.
- Id string
- The provider-assigned unique ID for this managed resource.
- Resources
[]Get
Transit Router Available Resources Resource - A list of Cen Transit Router Available Resources. Each element contains the following attributes:
- Output
File string - Support
Multicast bool - (Available since v1.225.0) Indicates whether the zone supports the multicast feature.
- id String
- The provider-assigned unique ID for this managed resource.
- resources
List<Get
Transit Router Available Resources Resource> - A list of Cen Transit Router Available Resources. Each element contains the following attributes:
- output
File String - support
Multicast Boolean - (Available since v1.225.0) Indicates whether the zone supports the multicast feature.
- id string
- The provider-assigned unique ID for this managed resource.
- resources
Get
Transit Router Available Resources Resource[] - A list of Cen Transit Router Available Resources. Each element contains the following attributes:
- output
File string - support
Multicast boolean - (Available since v1.225.0) Indicates whether the zone supports the multicast feature.
- id str
- The provider-assigned unique ID for this managed resource.
- resources
Sequence[Get
Transit Router Available Resources Resource] - A list of Cen Transit Router Available Resources. Each element contains the following attributes:
- output_
file str - support_
multicast bool - (Available since v1.225.0) Indicates whether the zone supports the multicast feature.
- id String
- The provider-assigned unique ID for this managed resource.
- resources List<Property Map>
- A list of Cen Transit Router Available Resources. Each element contains the following attributes:
- output
File String - support
Multicast Boolean - (Available since v1.225.0) Indicates whether the zone supports the multicast feature.
Supporting Types
GetTransitRouterAvailableResourcesResource
- Available
Zones List<string> - (Available since v1.225.0) The list of available zones.
- Master
Zones List<string> - The list of primary zones.
- Slave
Zones List<string> - The list of secondary zones.
- Support
Multicast bool - Specifies whether to query only the zones in which the multicast feature is supported.
- Available
Zones []string - (Available since v1.225.0) The list of available zones.
- Master
Zones []string - The list of primary zones.
- Slave
Zones []string - The list of secondary zones.
- Support
Multicast bool - Specifies whether to query only the zones in which the multicast feature is supported.
- available
Zones List<String> - (Available since v1.225.0) The list of available zones.
- master
Zones List<String> - The list of primary zones.
- slave
Zones List<String> - The list of secondary zones.
- support
Multicast Boolean - Specifies whether to query only the zones in which the multicast feature is supported.
- available
Zones string[] - (Available since v1.225.0) The list of available zones.
- master
Zones string[] - The list of primary zones.
- slave
Zones string[] - The list of secondary zones.
- support
Multicast boolean - Specifies whether to query only the zones in which the multicast feature is supported.
- available_
zones Sequence[str] - (Available since v1.225.0) The list of available zones.
- master_
zones Sequence[str] - The list of primary zones.
- slave_
zones Sequence[str] - The list of secondary zones.
- support_
multicast bool - Specifies whether to query only the zones in which the multicast feature is supported.
- available
Zones List<String> - (Available since v1.225.0) The list of available zones.
- master
Zones List<String> - The list of primary zones.
- slave
Zones List<String> - The list of secondary zones.
- support
Multicast Boolean - Specifies whether to query only the zones in which the multicast feature is supported.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.