1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. kvstore
  5. getConnections
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.kvstore.getConnections

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source can query the public IP of the specified Tair (Redis OSS-Compatible) And Memcache (KVStore).

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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  # Declare the data source
  example:
    fn::invoke:
      function: alicloud:kvstore:getConnections
      arguments:
        ids: r-wer123456
outputs:
  connectionString: ${example.connections[0].connectionString}
Copy

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>
Copy
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]
Copy
func GetConnections(ctx *Context, args *GetConnectionsArgs, opts ...InvokeOption) (*GetConnectionsResult, error)
func GetConnectionsOutput(ctx *Context, args *GetConnectionsOutputArgs, opts ...InvokeOption) GetConnectionsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetConnectionsResult> getConnections(GetConnectionsArgs args, InvokeOptions options)
public static Output<GetConnectionsResult> getConnections(GetConnectionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:kvstore/getConnections:getConnections
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids
This property is required.
Changes to this property will trigger replacement.
string
A list of Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids, only support one item.
OutputFile string
File name where to save data source results (after running pulumi preview).
Ids
This property is required.
Changes to this property will trigger replacement.
string
A list of Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids, only support one item.
OutputFile string
File name where to save data source results (after running pulumi preview).
ids
This property is required.
Changes to this property will trigger replacement.
String
A list of Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids, only support one item.
outputFile String
File name where to save data source results (after running pulumi preview).
ids
This property is required.
Changes to this property will trigger replacement.
string
A list of Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids, only support one item.
outputFile string
File name where to save data source results (after running pulumi preview).
ids
This property is required.
Changes to this property will trigger replacement.
str
A list of Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids, only support one item.
output_file str
File name where to save data source results (after running pulumi preview).
ids
This property is required.
Changes to this property will trigger replacement.
String
A list of Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids, only support one item.
outputFile String
File name where to save data source results (after running pulumi preview).

getConnections Result

The following output properties are available:

Connections List<Pulumi.AliCloud.KVStore.Outputs.GetConnectionsConnection>
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 Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids.
OutputFile string
Connections []GetConnectionsConnection
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 Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids.
OutputFile string
connections List<GetConnectionsConnection>
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 Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids.
outputFile String
connections GetConnectionsConnection[]
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 Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids.
outputFile string
connections Sequence[GetConnectionsConnection]
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 Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance 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 Tair (Redis OSS-Compatible) And Memcache (KVStore) Instance ids.
outputFile String

Supporting Types

GetConnectionsConnection

ConnectionString This property is required. string
The connection string of the instance.
DbInstanceNetType This property is required. string
The network type of the instance.
ExpiredTime This property is required. string
The expiration time of the classic network address.
Id This property is required. string
InstanceId This property is required. string
IpAddress This property is required. string
The IP address of the instance.
Port This property is required. string
The port number of the instance.
Upgradeable This property is required. string
The remaining validity period of the endpoint of the classic network.
VpcId This property is required. string
The ID of the VPC where the instance is deployed.
VpcInstanceId This property is required. string
The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
VswitchId This property is required. string
The ID of the vSwitch.
ConnectionString This property is required. string
The connection string of the instance.
DbInstanceNetType This property is required. string
The network type of the instance.
ExpiredTime This property is required. string
The expiration time of the classic network address.
Id This property is required. string
InstanceId This property is required. string
IpAddress This property is required. string
The IP address of the instance.
Port This property is required. string
The port number of the instance.
Upgradeable This property is required. string
The remaining validity period of the endpoint of the classic network.
VpcId This property is required. string
The ID of the VPC where the instance is deployed.
VpcInstanceId This property is required. string
The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
VswitchId This property is required. string
The ID of the vSwitch.
connectionString This property is required. String
The connection string of the instance.
dbInstanceNetType This property is required. String
The network type of the instance.
expiredTime This property is required. String
The expiration time of the classic network address.
id This property is required. String
instanceId This property is required. String
ipAddress This property is required. String
The IP address of the instance.
port This property is required. String
The port number of the instance.
upgradeable This property is required. String
The remaining validity period of the endpoint of the classic network.
vpcId This property is required. String
The ID of the VPC where the instance is deployed.
vpcInstanceId This property is required. String
The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
vswitchId This property is required. String
The ID of the vSwitch.
connectionString This property is required. string
The connection string of the instance.
dbInstanceNetType This property is required. string
The network type of the instance.
expiredTime This property is required. string
The expiration time of the classic network address.
id This property is required. string
instanceId This property is required. string
ipAddress This property is required. string
The IP address of the instance.
port This property is required. string
The port number of the instance.
upgradeable This property is required. string
The remaining validity period of the endpoint of the classic network.
vpcId This property is required. string
The ID of the VPC where the instance is deployed.
vpcInstanceId This property is required. string
The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
vswitchId This property is required. string
The ID of the vSwitch.
connection_string This property is required. str
The connection string of the instance.
db_instance_net_type This property is required. str
The network type of the instance.
expired_time This property is required. str
The expiration time of the classic network address.
id This property is required. str
instance_id This property is required. str
ip_address This property is required. str
The IP address of the instance.
port This property is required. str
The port number of the instance.
upgradeable This property is required. str
The remaining validity period of the endpoint of the classic network.
vpc_id This property is required. str
The ID of the VPC where the instance is deployed.
vpc_instance_id This property is required. str
The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
vswitch_id This property is required. str
The ID of the vSwitch.
connectionString This property is required. String
The connection string of the instance.
dbInstanceNetType This property is required. String
The network type of the instance.
expiredTime This property is required. String
The expiration time of the classic network address.
id This property is required. String
instanceId This property is required. String
ipAddress This property is required. String
The IP address of the instance.
port This property is required. String
The port number of the instance.
upgradeable This property is required. String
The remaining validity period of the endpoint of the classic network.
vpcId This property is required. String
The ID of the VPC where the instance is deployed.
vpcInstanceId This property is required. String
The ID of the instance. It is returned only when the value of the DBInstanceNetType parameter is 2 (indicating VPC).
vswitchId This property is required. 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi