Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.rds.getCrossRegions
Explore with Pulumi AI
This data source provides an available area for remote disaster recovery for RDS.
NOTE: Available in v1.193.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const crossRegions = alicloud.rds.getCrossRegions({});
export const firstRdsCrossRegions = regions.ids[0];
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
cross_regions = alicloud.rds.get_cross_regions()
pulumi.export("firstRdsCrossRegions", regions["ids"])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Declare the data source
_, err := rds.GetCrossRegions(ctx, nil, nil)
if err != nil {
return err
}
ctx.Export("firstRdsCrossRegions", regions.Ids[0])
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Declare the data source
var crossRegions = AliCloud.Rds.GetCrossRegions.Invoke();
return new Dictionary<string, object?>
{
["firstRdsCrossRegions"] = regions.Ids[0],
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.rds.RdsFunctions;
import com.pulumi.alicloud.rds.inputs.GetCrossRegionsArgs;
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) {
// Declare the data source
final var crossRegions = RdsFunctions.getCrossRegions();
ctx.export("firstRdsCrossRegions", regions.ids()[0]);
}
}
variables:
# Declare the data source
crossRegions:
fn::invoke:
Function: alicloud:rds:getCrossRegions
Arguments: {}
outputs:
firstRdsCrossRegions: ${regions.ids[0]}
Using getCrossRegions
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 getCrossRegions(args: GetCrossRegionsArgs, opts?: InvokeOptions): Promise<GetCrossRegionsResult>
function getCrossRegionsOutput(args: GetCrossRegionsOutputArgs, opts?: InvokeOptions): Output<GetCrossRegionsResult>
def get_cross_regions(output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCrossRegionsResult
def get_cross_regions_output(output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCrossRegionsResult]
func GetCrossRegions(ctx *Context, args *GetCrossRegionsArgs, opts ...InvokeOption) (*GetCrossRegionsResult, error)
func GetCrossRegionsOutput(ctx *Context, args *GetCrossRegionsOutputArgs, opts ...InvokeOption) GetCrossRegionsResultOutput
> Note: This function is named GetCrossRegions
in the Go SDK.
public static class GetCrossRegions
{
public static Task<GetCrossRegionsResult> InvokeAsync(GetCrossRegionsArgs args, InvokeOptions? opts = null)
public static Output<GetCrossRegionsResult> Invoke(GetCrossRegionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCrossRegionsResult> getCrossRegions(GetCrossRegionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:rds/getCrossRegions:getCrossRegions
arguments:
# arguments dictionary
The following arguments are supported:
- Output
File string
- Output
File string
- output
File String
- output
File string
- output_
file str
- output
File String
getCrossRegions Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of region IDs.
- Regions
List<Pulumi.
Ali Cloud. Rds. Outputs. Get Cross Regions Region> - The list of destination regions that support cross-region backup. Each element contains the following attributes:
- Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of region IDs.
- Regions
[]Get
Cross Regions Region - The list of destination regions that support cross-region backup. Each element contains the following attributes:
- Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of region IDs.
- regions
List<Get
Cross Regions Region> - The list of destination regions that support cross-region backup. Each element contains the following attributes:
- output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of region IDs.
- regions
Get
Cross Regions Region[] - The list of destination regions that support cross-region backup. Each element contains the following attributes:
- output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of region IDs.
- regions
Sequence[Get
Cross Regions Region] - The list of destination regions that support cross-region backup. Each element contains the following attributes:
- output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of region IDs.
- regions List<Property Map>
- The list of destination regions that support cross-region backup. Each element contains the following attributes:
- output
File String
Supporting Types
GetCrossRegionsRegion
- Id string
- ID of the region.
- Id string
- ID of the region.
- id String
- ID of the region.
- id string
- ID of the region.
- id str
- ID of the region.
- id String
- ID of the region.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.