Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.mongodb.getShardingNetworkPublicAddresses
Explore with Pulumi AI
This data source provides the Mongodb Sharding Network Public Addresses of the current Alibaba Cloud user.
NOTE: Available in v1.149.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.mongodb.getShardingNetworkPublicAddresses({
dbInstanceId: "example_value",
nodeId: "example_value",
role: "Primary",
});
export const mongodbShardingNetworkPublicAddressDbInstanceId1 = example.then(example => example.addresses?.[0]?.dbInstanceId);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.mongodb.get_sharding_network_public_addresses(db_instance_id="example_value",
node_id="example_value",
role="Primary")
pulumi.export("mongodbShardingNetworkPublicAddressDbInstanceId1", example.addresses[0].db_instance_id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mongodb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := mongodb.GetShardingNetworkPublicAddresses(ctx, &mongodb.GetShardingNetworkPublicAddressesArgs{
DbInstanceId: "example_value",
NodeId: pulumi.StringRef("example_value"),
Role: pulumi.StringRef("Primary"),
}, nil)
if err != nil {
return err
}
ctx.Export("mongodbShardingNetworkPublicAddressDbInstanceId1", example.Addresses[0].DbInstanceId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.MongoDB.GetShardingNetworkPublicAddresses.Invoke(new()
{
DbInstanceId = "example_value",
NodeId = "example_value",
Role = "Primary",
});
return new Dictionary<string, object?>
{
["mongodbShardingNetworkPublicAddressDbInstanceId1"] = example.Apply(getShardingNetworkPublicAddressesResult => getShardingNetworkPublicAddressesResult.Addresses[0]?.DbInstanceId),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.mongodb.MongodbFunctions;
import com.pulumi.alicloud.mongodb.inputs.GetShardingNetworkPublicAddressesArgs;
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 example = MongodbFunctions.getShardingNetworkPublicAddresses(GetShardingNetworkPublicAddressesArgs.builder()
.dbInstanceId("example_value")
.nodeId("example_value")
.role("Primary")
.build());
ctx.export("mongodbShardingNetworkPublicAddressDbInstanceId1", example.applyValue(getShardingNetworkPublicAddressesResult -> getShardingNetworkPublicAddressesResult.addresses()[0].dbInstanceId()));
}
}
variables:
example:
fn::invoke:
Function: alicloud:mongodb:getShardingNetworkPublicAddresses
Arguments:
dbInstanceId: example_value
nodeId: example_value
role: Primary
outputs:
mongodbShardingNetworkPublicAddressDbInstanceId1: ${example.addresses[0].dbInstanceId}
Using getShardingNetworkPublicAddresses
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 getShardingNetworkPublicAddresses(args: GetShardingNetworkPublicAddressesArgs, opts?: InvokeOptions): Promise<GetShardingNetworkPublicAddressesResult>
function getShardingNetworkPublicAddressesOutput(args: GetShardingNetworkPublicAddressesOutputArgs, opts?: InvokeOptions): Output<GetShardingNetworkPublicAddressesResult>
def get_sharding_network_public_addresses(db_instance_id: Optional[str] = None,
node_id: Optional[str] = None,
output_file: Optional[str] = None,
role: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetShardingNetworkPublicAddressesResult
def get_sharding_network_public_addresses_output(db_instance_id: Optional[pulumi.Input[str]] = None,
node_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
role: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetShardingNetworkPublicAddressesResult]
func GetShardingNetworkPublicAddresses(ctx *Context, args *GetShardingNetworkPublicAddressesArgs, opts ...InvokeOption) (*GetShardingNetworkPublicAddressesResult, error)
func GetShardingNetworkPublicAddressesOutput(ctx *Context, args *GetShardingNetworkPublicAddressesOutputArgs, opts ...InvokeOption) GetShardingNetworkPublicAddressesResultOutput
> Note: This function is named GetShardingNetworkPublicAddresses
in the Go SDK.
public static class GetShardingNetworkPublicAddresses
{
public static Task<GetShardingNetworkPublicAddressesResult> InvokeAsync(GetShardingNetworkPublicAddressesArgs args, InvokeOptions? opts = null)
public static Output<GetShardingNetworkPublicAddressesResult> Invoke(GetShardingNetworkPublicAddressesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetShardingNetworkPublicAddressesResult> getShardingNetworkPublicAddresses(GetShardingNetworkPublicAddressesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:mongodb/getShardingNetworkPublicAddresses:getShardingNetworkPublicAddresses
arguments:
# arguments dictionary
The following arguments are supported:
- Db
Instance stringId - The db instance id.
- Node
Id string - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - Output
File string - File name where to save data source results (after running
pulumi preview
). - Role string
- The role of the node. Valid values:
Primary
orSecondary
.
- Db
Instance stringId - The db instance id.
- Node
Id string - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - Output
File string - File name where to save data source results (after running
pulumi preview
). - Role string
- The role of the node. Valid values:
Primary
orSecondary
.
- db
Instance StringId - The db instance id.
- node
Id String - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - output
File String - File name where to save data source results (after running
pulumi preview
). - role String
- The role of the node. Valid values:
Primary
orSecondary
.
- db
Instance stringId - The db instance id.
- node
Id string - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - output
File string - File name where to save data source results (after running
pulumi preview
). - role string
- The role of the node. Valid values:
Primary
orSecondary
.
- db_
instance_ strid - The db instance id.
- node_
id str - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - output_
file str - File name where to save data source results (after running
pulumi preview
). - role str
- The role of the node. Valid values:
Primary
orSecondary
.
- db
Instance StringId - The db instance id.
- node
Id String - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - output
File String - File name where to save data source results (after running
pulumi preview
). - role String
- The role of the node. Valid values:
Primary
orSecondary
.
getShardingNetworkPublicAddresses Result
The following output properties are available:
- Addresses
List<Pulumi.
Ali Cloud. Mongo DB. Outputs. Get Sharding Network Public Addresses Address> - Db
Instance stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Node
Id string - Output
File string - Role string
- Addresses
[]Get
Sharding Network Public Addresses Address - Db
Instance stringId - Id string
- The provider-assigned unique ID for this managed resource.
- Node
Id string - Output
File string - Role string
- addresses
List<Get
Sharding Network Public Addresses Address> - db
Instance StringId - id String
- The provider-assigned unique ID for this managed resource.
- node
Id String - output
File String - role String
- addresses
Get
Sharding Network Public Addresses Address[] - db
Instance stringId - id string
- The provider-assigned unique ID for this managed resource.
- node
Id string - output
File string - role string
- addresses
Sequence[Get
Sharding Network Public Addresses Address] - db_
instance_ strid - id str
- The provider-assigned unique ID for this managed resource.
- node_
id str - output_
file str - role str
- addresses List<Property Map>
- db
Instance StringId - id String
- The provider-assigned unique ID for this managed resource.
- node
Id String - output
File String - role String
Supporting Types
GetShardingNetworkPublicAddressesAddress
- Db
Instance stringId - The db instance id.
- Expired
Time string - The remaining duration of the classic network address. Unit:
seconds
. - Ip
Address string - The IP address of the instance.
- Network
Address string - The endpoint of the instance.
- Network
Type string - The network type.
- Node
Id string - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - Node
Type string - The type of the node.
- Port string
- The port number.
- Role string
- The role of the node.
- Vpc
Id string - The ID of the VPC.
- Vswitch
Id string - The vSwitch ID of the VPC.
- Db
Instance stringId - The db instance id.
- Expired
Time string - The remaining duration of the classic network address. Unit:
seconds
. - Ip
Address string - The IP address of the instance.
- Network
Address string - The endpoint of the instance.
- Network
Type string - The network type.
- Node
Id string - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - Node
Type string - The type of the node.
- Port string
- The port number.
- Role string
- The role of the node.
- Vpc
Id string - The ID of the VPC.
- Vswitch
Id string - The vSwitch ID of the VPC.
- db
Instance StringId - The db instance id.
- expired
Time String - The remaining duration of the classic network address. Unit:
seconds
. - ip
Address String - The IP address of the instance.
- network
Address String - The endpoint of the instance.
- network
Type String - The network type.
- node
Id String - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - node
Type String - The type of the node.
- port String
- The port number.
- role String
- The role of the node.
- vpc
Id String - The ID of the VPC.
- vswitch
Id String - The vSwitch ID of the VPC.
- db
Instance stringId - The db instance id.
- expired
Time string - The remaining duration of the classic network address. Unit:
seconds
. - ip
Address string - The IP address of the instance.
- network
Address string - The endpoint of the instance.
- network
Type string - The network type.
- node
Id string - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - node
Type string - The type of the node.
- port string
- The port number.
- role string
- The role of the node.
- vpc
Id string - The ID of the VPC.
- vswitch
Id string - The vSwitch ID of the VPC.
- db_
instance_ strid - The db instance id.
- expired_
time str - The remaining duration of the classic network address. Unit:
seconds
. - ip_
address str - The IP address of the instance.
- network_
address str - The endpoint of the instance.
- network_
type str - The network type.
- node_
id str - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - node_
type str - The type of the node.
- port str
- The port number.
- role str
- The role of the node.
- vpc_
id str - The ID of the VPC.
- vswitch_
id str - The vSwitch ID of the VPC.
- db
Instance StringId - The db instance id.
- expired
Time String - The remaining duration of the classic network address. Unit:
seconds
. - ip
Address String - The IP address of the instance.
- network
Address String - The endpoint of the instance.
- network
Type String - The network type.
- node
Id String - The ID of the
mongos
,shard
, orConfigserver
node in the sharded cluster instance. - node
Type String - The type of the node.
- port String
- The port number.
- role String
- The role of the node.
- vpc
Id String - The ID of the VPC.
- vswitch
Id String - The vSwitch ID of the VPC.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.