Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi
alicloud.kvstore.getConnections
Explore with Pulumi AI
This data source can query the public IP of the specified KVStore DBInstance.
NOTE: Available in v1.101.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const example = alicloud.kvstore.getConnections({
ids: "r-wer123456",
});
export const connectionString = example.then(example => example.connections?.[0]?.connectionString);
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
example = alicloud.kvstore.get_connections(ids="r-wer123456")
pulumi.export("connectionString", example.connections[0].connection_string)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kvstore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Declare the data source
example, err := kvstore.GetConnections(ctx, &kvstore.GetConnectionsArgs{
Ids: "r-wer123456",
}, nil)
if err != nil {
return err
}
ctx.Export("connectionString", example.Connections[0].ConnectionString)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Declare the data source
var example = AliCloud.KVStore.GetConnections.Invoke(new()
{
Ids = "r-wer123456",
});
return new Dictionary<string, object?>
{
["connectionString"] = example.Apply(getConnectionsResult => getConnectionsResult.Connections[0]?.ConnectionString),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.kvstore.KvstoreFunctions;
import com.pulumi.alicloud.kvstore.inputs.GetConnectionsArgs;
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 example = KvstoreFunctions.getConnections(GetConnectionsArgs.builder()
.ids("r-wer123456")
.build());
ctx.export("connectionString", example.applyValue(getConnectionsResult -> getConnectionsResult.connections()[0].connectionString()));
}
}
variables:
# Declare the data source
example:
fn::invoke:
Function: alicloud:kvstore:getConnections
Arguments:
ids: r-wer123456
outputs:
connectionString: ${example.connections[0].connectionString}
Using getConnections
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 getConnections(args: GetConnectionsArgs, opts?: InvokeOptions): Promise<GetConnectionsResult>
function getConnectionsOutput(args: GetConnectionsOutputArgs, opts?: InvokeOptions): Output<GetConnectionsResult>
def get_connections(ids: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetConnectionsResult
def get_connections_output(ids: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConnectionsResult]
func GetConnections(ctx *Context, args *GetConnectionsArgs, opts ...InvokeOption) (*GetConnectionsResult, error)
func GetConnectionsOutput(ctx *Context, args *GetConnectionsOutputArgs, opts ...InvokeOption) GetConnectionsResultOutput
> Note: This function is named GetConnections
in the Go SDK.
public static class GetConnections
{
public static Task<GetConnectionsResult> InvokeAsync(GetConnectionsArgs args, InvokeOptions? opts = null)
public static Output<GetConnectionsResult> Invoke(GetConnectionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConnectionsResult> getConnections(GetConnectionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:kvstore/getConnections:getConnections
arguments:
# arguments dictionary
The following arguments are supported:
- Ids string
- A list of KVStore DBInstance ids, only support one item.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids string
- A list of KVStore DBInstance ids, only support one item.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids String
- A list of KVStore DBInstance ids, only support one item.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids string
- A list of KVStore DBInstance ids, only support one item.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids str
- A list of KVStore DBInstance ids, only support one item.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- ids String
- A list of KVStore DBInstance ids, only support one item.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getConnections Result
The following output properties are available:
- Connections
List<Pulumi.
Ali Cloud. KVStore. Outputs. Get Connections Connection> - Public network details of the specified resource. contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids string
- A list of KVStore DBInstance ids.
- Output
File string
- Connections
[]Get
Connections Connection - Public network details of the specified resource. contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids string
- A list of KVStore DBInstance ids.
- Output
File string
- connections
List<Get
Connections Connection> - Public network details of the specified resource. contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids String
- A list of KVStore DBInstance ids.
- output
File String
- connections
Get
Connections Connection[] - Public network details of the specified resource. contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string
- A list of KVStore DBInstance ids.
- output
File string
- connections
Sequence[Get
Connections Connection] - Public network details of the specified resource. contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids str
- A list of KVStore DBInstance ids.
- output_
file str
- connections List<Property Map>
- Public network details of the specified resource. contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids String
- A list of KVStore DBInstance ids.
- output
File String
Supporting Types
GetConnectionsConnection
- Connection
String string - The connection string of the instance.
- Db
Instance stringNet Type - The network type of the instance.
- Expired
Time string - The expiration time of the classic network address.
- Id string
- Instance
Id string - Ip
Address string - The IP address of the instance.
- Port string
- The port number of the instance.
- Upgradeable string
- The remaining validity period of the endpoint of the classic network.
- Vpc
Id string - The ID of the VPC where the instance is deployed.
- Vpc
Instance stringId - The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
- Vswitch
Id string - The ID of the vSwitch.
- Connection
String string - The connection string of the instance.
- Db
Instance stringNet Type - The network type of the instance.
- Expired
Time string - The expiration time of the classic network address.
- Id string
- Instance
Id string - Ip
Address string - The IP address of the instance.
- Port string
- The port number of the instance.
- Upgradeable string
- The remaining validity period of the endpoint of the classic network.
- Vpc
Id string - The ID of the VPC where the instance is deployed.
- Vpc
Instance stringId - The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
- Vswitch
Id string - The ID of the vSwitch.
- connection
String String - The connection string of the instance.
- db
Instance StringNet Type - The network type of the instance.
- expired
Time String - The expiration time of the classic network address.
- id String
- instance
Id String - ip
Address String - The IP address of the instance.
- port String
- The port number of the instance.
- upgradeable String
- The remaining validity period of the endpoint of the classic network.
- vpc
Id String - The ID of the VPC where the instance is deployed.
- vpc
Instance StringId - The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
- vswitch
Id String - The ID of the vSwitch.
- connection
String string - The connection string of the instance.
- db
Instance stringNet Type - The network type of the instance.
- expired
Time string - The expiration time of the classic network address.
- id string
- instance
Id string - ip
Address string - The IP address of the instance.
- port string
- The port number of the instance.
- upgradeable string
- The remaining validity period of the endpoint of the classic network.
- vpc
Id string - The ID of the VPC where the instance is deployed.
- vpc
Instance stringId - The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
- vswitch
Id string - The ID of the vSwitch.
- connection_
string str - The connection string of the instance.
- db_
instance_ strnet_ type - The network type of the instance.
- expired_
time str - The expiration time of the classic network address.
- id str
- instance_
id str - ip_
address str - The IP address of the instance.
- port str
- The port number of the instance.
- upgradeable str
- The remaining validity period of the endpoint of the classic network.
- vpc_
id str - The ID of the VPC where the instance is deployed.
- vpc_
instance_ strid - The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
- vswitch_
id str - The ID of the vSwitch.
- connection
String String - The connection string of the instance.
- db
Instance StringNet Type - The network type of the instance.
- expired
Time String - The expiration time of the classic network address.
- id String
- instance
Id String - ip
Address String - The IP address of the instance.
- port String
- The port number of the instance.
- upgradeable String
- The remaining validity period of the endpoint of the classic network.
- vpc
Id String - The ID of the VPC where the instance is deployed.
- vpc
Instance StringId - The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
- vswitch
Id String - The ID of the vSwitch.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.