Connection

Operate the public network ip of the specified resource. How to use it, see What is Resource Alicloud KVStore Connection.

NOTE: Available in v1.101.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = new AliCloud.KVStore.Connection("default", new AliCloud.KVStore.ConnectionArgs
        {
            ConnectionStringPrefix = "allocatetestupdate",
            InstanceId = "r-abc123456",
            Port = "6370",
        });
    }

}
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 {
		_, err := kvstore.NewConnection(ctx, "_default", &kvstore.ConnectionArgs{
			ConnectionStringPrefix: pulumi.String("allocatetestupdate"),
			InstanceId:             pulumi.String("r-abc123456"),
			Port:                   pulumi.String("6370"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.kvstore.Connection("default",
    connection_string_prefix="allocatetestupdate",
    instance_id="r-abc123456",
    port="6370")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultConnection = new alicloud.kvstore.Connection("default", {
    connectionStringPrefix: "allocatetestupdate",
    instanceId: "r-abc123456",
    port: "6370",
});

Create a Connection Resource

new Connection(name: string, args: ConnectionArgs, opts?: CustomResourceOptions);
@overload
def Connection(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               connection_string_prefix: Optional[str] = None,
               instance_id: Optional[str] = None,
               port: Optional[str] = None)
@overload
def Connection(resource_name: str,
               args: ConnectionArgs,
               opts: Optional[ResourceOptions] = None)
func NewConnection(ctx *Context, name string, args ConnectionArgs, opts ...ResourceOption) (*Connection, error)
public Connection(string name, ConnectionArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Connection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Connection resource accepts the following input properties:

ConnectionStringPrefix string
The prefix of the public endpoint. The prefix can be 8 to 64 characters in length, and can contain lowercase letters and digits. It must start with a lowercase letter.
InstanceId string
The ID of the instance.
Port string
The service port number of the instance.
ConnectionStringPrefix string
The prefix of the public endpoint. The prefix can be 8 to 64 characters in length, and can contain lowercase letters and digits. It must start with a lowercase letter.
InstanceId string
The ID of the instance.
Port string
The service port number of the instance.
connectionStringPrefix string
The prefix of the public endpoint. The prefix can be 8 to 64 characters in length, and can contain lowercase letters and digits. It must start with a lowercase letter.
instanceId string
The ID of the instance.
port string
The service port number of the instance.
connection_string_prefix str
The prefix of the public endpoint. The prefix can be 8 to 64 characters in length, and can contain lowercase letters and digits. It must start with a lowercase letter.
instance_id str
The ID of the instance.
port str
The service port number of the instance.

Outputs

All input properties are implicitly available as output properties. Additionally, the Connection resource produces the following output properties:

ConnectionString string
The public connection string of KVStore DBInstance.
Id string
The provider-assigned unique ID for this managed resource.
ConnectionString string
The public connection string of KVStore DBInstance.
Id string
The provider-assigned unique ID for this managed resource.
connectionString string
The public connection string of KVStore DBInstance.
id string
The provider-assigned unique ID for this managed resource.
connection_string str
The public connection string of KVStore DBInstance.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Connection Resource

Get an existing Connection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ConnectionState, opts?: CustomResourceOptions): Connection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        connection_string: Optional[str] = None,
        connection_string_prefix: Optional[str] = None,
        instance_id: Optional[str] = None,
        port: Optional[str] = None) -> Connection
func GetConnection(ctx *Context, name string, id IDInput, state *ConnectionState, opts ...ResourceOption) (*Connection, error)
public static Connection Get(string name, Input<string> id, ConnectionState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ConnectionString string
The public connection string of KVStore DBInstance.
ConnectionStringPrefix string
The prefix of the public endpoint. The prefix can be 8 to 64 characters in length, and can contain lowercase letters and digits. It must start with a lowercase letter.
InstanceId string
The ID of the instance.
Port string
The service port number of the instance.
ConnectionString string
The public connection string of KVStore DBInstance.
ConnectionStringPrefix string
The prefix of the public endpoint. The prefix can be 8 to 64 characters in length, and can contain lowercase letters and digits. It must start with a lowercase letter.
InstanceId string
The ID of the instance.
Port string
The service port number of the instance.
connectionString string
The public connection string of KVStore DBInstance.
connectionStringPrefix string
The prefix of the public endpoint. The prefix can be 8 to 64 characters in length, and can contain lowercase letters and digits. It must start with a lowercase letter.
instanceId string
The ID of the instance.
port string
The service port number of the instance.
connection_string str
The public connection string of KVStore DBInstance.
connection_string_prefix str
The prefix of the public endpoint. The prefix can be 8 to 64 characters in length, and can contain lowercase letters and digits. It must start with a lowercase letter.
instance_id str
The ID of the instance.
port str
The service port number of the instance.

Import

KVStore connection can be imported using the id, e.g.

 $ pulumi import alicloud:kvstore/connection:Connection example r-abc12345678

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.