alicloud.polardb.getGlobalDatabaseNetworks
This data source provides the PolarDB Global Database Networks of the current Alibaba Cloud user.
NOTE: Available in v1.181.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.PolarDB.GetGlobalDatabaseNetworks.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var description = AliCloud.PolarDB.GetGlobalDatabaseNetworks.Invoke(new()
{
Description = "example_description",
});
return new Dictionary<string, object?>
{
["polardbGlobalDatabaseNetworkId1"] = ids.Apply(getGlobalDatabaseNetworksResult => getGlobalDatabaseNetworksResult.Networks[0]?.Id),
["polardbGlobalDatabaseNetworkId2"] = description.Apply(getGlobalDatabaseNetworksResult => getGlobalDatabaseNetworksResult.Networks[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/polardb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := polardb.GetGlobalDatabaseNetworks(ctx, &polardb.GetGlobalDatabaseNetworksArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("polardbGlobalDatabaseNetworkId1", ids.Networks[0].Id)
description, err := polardb.GetGlobalDatabaseNetworks(ctx, &polardb.GetGlobalDatabaseNetworksArgs{
Description: pulumi.StringRef("example_description"),
}, nil)
if err != nil {
return err
}
ctx.Export("polardbGlobalDatabaseNetworkId2", description.Networks[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.polardb.PolardbFunctions;
import com.pulumi.alicloud.polardb.inputs.GetGlobalDatabaseNetworksArgs;
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 = PolardbFunctions.getGlobalDatabaseNetworks(GetGlobalDatabaseNetworksArgs.builder()
.ids("example_id")
.build());
ctx.export("polardbGlobalDatabaseNetworkId1", ids.applyValue(getGlobalDatabaseNetworksResult -> getGlobalDatabaseNetworksResult.networks()[0].id()));
final var description = PolardbFunctions.getGlobalDatabaseNetworks(GetGlobalDatabaseNetworksArgs.builder()
.description("example_description")
.build());
ctx.export("polardbGlobalDatabaseNetworkId2", description.applyValue(getGlobalDatabaseNetworksResult -> getGlobalDatabaseNetworksResult.networks()[0].id()));
}
}
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.polardb.get_global_database_networks(ids=["example_id"])
pulumi.export("polardbGlobalDatabaseNetworkId1", ids.networks[0].id)
description = alicloud.polardb.get_global_database_networks(description="example_description")
pulumi.export("polardbGlobalDatabaseNetworkId2", description.networks[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.polardb.getGlobalDatabaseNetworks({
ids: ["example_id"],
});
export const polardbGlobalDatabaseNetworkId1 = ids.then(ids => ids.networks?.[0]?.id);
const description = alicloud.polardb.getGlobalDatabaseNetworks({
description: "example_description",
});
export const polardbGlobalDatabaseNetworkId2 = description.then(description => description.networks?.[0]?.id);
variables:
ids:
fn::invoke:
Function: alicloud:polardb:getGlobalDatabaseNetworks
Arguments:
ids:
- example_id
description:
fn::invoke:
Function: alicloud:polardb:getGlobalDatabaseNetworks
Arguments:
description: example_description
outputs:
polardbGlobalDatabaseNetworkId1: ${ids.networks[0].id}
polardbGlobalDatabaseNetworkId2: ${description.networks[0].id}
Using getGlobalDatabaseNetworks
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 getGlobalDatabaseNetworks(args: GetGlobalDatabaseNetworksArgs, opts?: InvokeOptions): Promise<GetGlobalDatabaseNetworksResult>
function getGlobalDatabaseNetworksOutput(args: GetGlobalDatabaseNetworksOutputArgs, opts?: InvokeOptions): Output<GetGlobalDatabaseNetworksResult>
def get_global_database_networks(db_cluster_id: Optional[str] = None,
description: Optional[str] = None,
gdn_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetGlobalDatabaseNetworksResult
def get_global_database_networks_output(db_cluster_id: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
gdn_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGlobalDatabaseNetworksResult]
func GetGlobalDatabaseNetworks(ctx *Context, args *GetGlobalDatabaseNetworksArgs, opts ...InvokeOption) (*GetGlobalDatabaseNetworksResult, error)
func GetGlobalDatabaseNetworksOutput(ctx *Context, args *GetGlobalDatabaseNetworksOutputArgs, opts ...InvokeOption) GetGlobalDatabaseNetworksResultOutput
> Note: This function is named GetGlobalDatabaseNetworks
in the Go SDK.
public static class GetGlobalDatabaseNetworks
{
public static Task<GetGlobalDatabaseNetworksResult> InvokeAsync(GetGlobalDatabaseNetworksArgs args, InvokeOptions? opts = null)
public static Output<GetGlobalDatabaseNetworksResult> Invoke(GetGlobalDatabaseNetworksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGlobalDatabaseNetworksResult> getGlobalDatabaseNetworks(GetGlobalDatabaseNetworksArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:polardb/getGlobalDatabaseNetworks:getGlobalDatabaseNetworks
arguments:
# arguments dictionary
The following arguments are supported:
- Db
Cluster stringId The ID of the PolarDB cluster.
- Description string
The description of the Global Database Network.
- Gdn
Id string The ID of the Global Database Network.
- Ids List<string>
A list of Global Database Network IDs.
- Output
File string - Page
Number int - Page
Size int - Status string
The status of the Global Database Network.
- Db
Cluster stringId The ID of the PolarDB cluster.
- Description string
The description of the Global Database Network.
- Gdn
Id string The ID of the Global Database Network.
- Ids []string
A list of Global Database Network IDs.
- Output
File string - Page
Number int - Page
Size int - Status string
The status of the Global Database Network.
- db
Cluster StringId The ID of the PolarDB cluster.
- description String
The description of the Global Database Network.
- gdn
Id String The ID of the Global Database Network.
- ids List<String>
A list of Global Database Network IDs.
- output
File String - page
Number Integer - page
Size Integer - status String
The status of the Global Database Network.
- db
Cluster stringId The ID of the PolarDB cluster.
- description string
The description of the Global Database Network.
- gdn
Id string The ID of the Global Database Network.
- ids string[]
A list of Global Database Network IDs.
- output
File string - page
Number number - page
Size number - status string
The status of the Global Database Network.
- db_
cluster_ strid The ID of the PolarDB cluster.
- description str
The description of the Global Database Network.
- gdn_
id str The ID of the Global Database Network.
- ids Sequence[str]
A list of Global Database Network IDs.
- output_
file str - page_
number int - page_
size int - status str
The status of the Global Database Network.
- db
Cluster StringId The ID of the PolarDB cluster.
- description String
The description of the Global Database Network.
- gdn
Id String The ID of the Global Database Network.
- ids List<String>
A list of Global Database Network IDs.
- output
File String - page
Number Number - page
Size Number - status String
The status of the Global Database Network.
getGlobalDatabaseNetworks Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Networks
List<Pulumi.
Ali Cloud. Polar DB. Outputs. Get Global Database Networks Network> - Db
Cluster stringId - Description string
- Gdn
Id string - Output
File string - Page
Number int - Page
Size int - Status string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Networks
[]Get
Global Database Networks Network - Db
Cluster stringId - Description string
- Gdn
Id string - Output
File string - Page
Number int - Page
Size int - Status string
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- networks
List<Get
Global Database Networks Network> - db
Cluster StringId - description String
- gdn
Id String - output
File String - page
Number Integer - page
Size Integer - status String
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- networks
Get
Global Database Networks Network[] - db
Cluster stringId - description string
- gdn
Id string - output
File string - page
Number number - page
Size number - status string
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- networks
Sequence[Get
Global Database Networks Network] - db_
cluster_ strid - description str
- gdn_
id str - output_
file str - page_
number int - page_
size int - status str
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- networks List<Property Map>
- db
Cluster StringId - description String
- gdn
Id String - output
File String - page
Number Number - page
Size Number - status String
Supporting Types
GetGlobalDatabaseNetworksNetwork
- Create
Time string The time when the Global Database Network was created. The time is in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.
- Db
Clusters List<Pulumi.Ali Cloud. Polar DB. Inputs. Get Global Database Networks Network Db Cluster> The details of each cluster in the Global Database Network.
- Db
Type string The type of the database engine. Only MySQL is supported.
- Db
Version string The version number of the database engine. Only the 8.0 version is supported.
- Description string
The description of the Global Database Network.
- Gdn
Id string The ID of the Global Database Network.
- Id string
The ID of the Global Database Network.
- Status string
The status of the Global Database Network.
- Create
Time string The time when the Global Database Network was created. The time is in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.
- Db
Clusters []GetGlobal Database Networks Network Db Cluster The details of each cluster in the Global Database Network.
- Db
Type string The type of the database engine. Only MySQL is supported.
- Db
Version string The version number of the database engine. Only the 8.0 version is supported.
- Description string
The description of the Global Database Network.
- Gdn
Id string The ID of the Global Database Network.
- Id string
The ID of the Global Database Network.
- Status string
The status of the Global Database Network.
- create
Time String The time when the Global Database Network was created. The time is in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.
- db
Clusters List<GetGlobal Database Networks Network Db Cluster> The details of each cluster in the Global Database Network.
- db
Type String The type of the database engine. Only MySQL is supported.
- db
Version String The version number of the database engine. Only the 8.0 version is supported.
- description String
The description of the Global Database Network.
- gdn
Id String The ID of the Global Database Network.
- id String
The ID of the Global Database Network.
- status String
The status of the Global Database Network.
- create
Time string The time when the Global Database Network was created. The time is in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.
- db
Clusters GetGlobal Database Networks Network Db Cluster[] The details of each cluster in the Global Database Network.
- db
Type string The type of the database engine. Only MySQL is supported.
- db
Version string The version number of the database engine. Only the 8.0 version is supported.
- description string
The description of the Global Database Network.
- gdn
Id string The ID of the Global Database Network.
- id string
The ID of the Global Database Network.
- status string
The status of the Global Database Network.
- create_
time str The time when the Global Database Network was created. The time is in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.
- db_
clusters Sequence[GetGlobal Database Networks Network Db Cluster] The details of each cluster in the Global Database Network.
- db_
type str The type of the database engine. Only MySQL is supported.
- db_
version str The version number of the database engine. Only the 8.0 version is supported.
- description str
The description of the Global Database Network.
- gdn_
id str The ID of the Global Database Network.
- id str
The ID of the Global Database Network.
- status str
The status of the Global Database Network.
- create
Time String The time when the Global Database Network was created. The time is in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.
- db
Clusters List<Property Map> The details of each cluster in the Global Database Network.
- db
Type String The type of the database engine. Only MySQL is supported.
- db
Version String The version number of the database engine. Only the 8.0 version is supported.
- description String
The description of the Global Database Network.
- gdn
Id String The ID of the Global Database Network.
- id String
The ID of the Global Database Network.
- status String
The status of the Global Database Network.
GetGlobalDatabaseNetworksNetworkDbCluster
- Db
Cluster stringId The ID of the PolarDB cluster.
- Region
Id string The region ID of the cluster.
- Role string
The role of the cluster.
- Db
Cluster stringId The ID of the PolarDB cluster.
- Region
Id string The region ID of the cluster.
- Role string
The role of the cluster.
- db
Cluster StringId The ID of the PolarDB cluster.
- region
Id String The region ID of the cluster.
- role String
The role of the cluster.
- db
Cluster stringId The ID of the PolarDB cluster.
- region
Id string The region ID of the cluster.
- role string
The role of the cluster.
- db_
cluster_ strid The ID of the PolarDB cluster.
- region_
id str The region ID of the cluster.
- role str
The role of the cluster.
- db
Cluster StringId The ID of the PolarDB cluster.
- region
Id String The region ID of the cluster.
- role String
The role of the cluster.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.