snowflake.getConnections
Explore with Pulumi AI
!> V1 release candidate This data source is a release candidate for the V1. We do not expect significant changes in it before the V1. We will welcome any feedback and adjust the data source if needed. Any errors reported will be resolved with a higher priority. We encourage checking this data source out before the V1 release. Please follow the migration guide to use it.
Datasource used to get details of filtered connections. Filtering is aligned with the current possibilities for SHOW CONNECTIONS query. The results of SHOW is encapsulated in one output collection connections
.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as snowflake from "@pulumi/snowflake";
// Simple usage
const simple = snowflake.getConnections({});
export const simpleOutput = simple.then(simple => simple.connections);
// Filtering (like)
const like = snowflake.getConnections({
like: "connection-name",
});
export const likeOutput = like.then(like => like.connections);
// Filtering by prefix (like)
const likePrefix = snowflake.getConnections({
like: "prefix%",
});
export const likePrefixOutput = likePrefix.then(likePrefix => likePrefix.connections);
import pulumi
import pulumi_snowflake as snowflake
# Simple usage
simple = snowflake.get_connections()
pulumi.export("simpleOutput", simple.connections)
# Filtering (like)
like = snowflake.get_connections(like="connection-name")
pulumi.export("likeOutput", like.connections)
# Filtering by prefix (like)
like_prefix = snowflake.get_connections(like="prefix%")
pulumi.export("likePrefixOutput", like_prefix.connections)
package main
import (
"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Simple usage
simple, err := snowflake.GetConnections(ctx, &snowflake.GetConnectionsArgs{}, nil)
if err != nil {
return err
}
ctx.Export("simpleOutput", simple.Connections)
// Filtering (like)
like, err := snowflake.GetConnections(ctx, &snowflake.GetConnectionsArgs{
Like: pulumi.StringRef("connection-name"),
}, nil)
if err != nil {
return err
}
ctx.Export("likeOutput", like.Connections)
// Filtering by prefix (like)
likePrefix, err := snowflake.GetConnections(ctx, &snowflake.GetConnectionsArgs{
Like: pulumi.StringRef("prefix%"),
}, nil)
if err != nil {
return err
}
ctx.Export("likePrefixOutput", likePrefix.Connections)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Snowflake = Pulumi.Snowflake;
return await Deployment.RunAsync(() =>
{
// Simple usage
var simple = Snowflake.GetConnections.Invoke();
// Filtering (like)
var like = Snowflake.GetConnections.Invoke(new()
{
Like = "connection-name",
});
// Filtering by prefix (like)
var likePrefix = Snowflake.GetConnections.Invoke(new()
{
Like = "prefix%",
});
return new Dictionary<string, object?>
{
["simpleOutput"] = simple.Apply(getConnectionsResult => getConnectionsResult.Connections),
["likeOutput"] = like.Apply(getConnectionsResult => getConnectionsResult.Connections),
["likePrefixOutput"] = likePrefix.Apply(getConnectionsResult => getConnectionsResult.Connections),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.snowflake.SnowflakeFunctions;
import com.pulumi.snowflake.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) {
// Simple usage
final var simple = SnowflakeFunctions.getConnections();
ctx.export("simpleOutput", simple.applyValue(getConnectionsResult -> getConnectionsResult.connections()));
// Filtering (like)
final var like = SnowflakeFunctions.getConnections(GetConnectionsArgs.builder()
.like("connection-name")
.build());
ctx.export("likeOutput", like.applyValue(getConnectionsResult -> getConnectionsResult.connections()));
// Filtering by prefix (like)
final var likePrefix = SnowflakeFunctions.getConnections(GetConnectionsArgs.builder()
.like("prefix%")
.build());
ctx.export("likePrefixOutput", likePrefix.applyValue(getConnectionsResult -> getConnectionsResult.connections()));
}
}
variables:
# Simple usage
simple:
fn::invoke:
Function: snowflake:getConnections
Arguments: {}
# Filtering (like)
like:
fn::invoke:
Function: snowflake:getConnections
Arguments:
like: connection-name
# Filtering by prefix (like)
likePrefix:
fn::invoke:
Function: snowflake:getConnections
Arguments:
like: prefix%
outputs:
simpleOutput: ${simple.connections}
likeOutput: ${like.connections}
likePrefixOutput: ${likePrefix.connections}
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(like: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetConnectionsResult
def get_connections_output(like: 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: snowflake:index/getConnections:getConnections
arguments:
# arguments dictionary
The following arguments are supported:
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- like str
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
getConnections Result
The following output properties are available:
- Connections
List<Get
Connections Connection> - Holds the aggregated output of all connections details queries.
- Id string
- The provider-assigned unique ID for this managed resource.
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- Connections
[]Get
Connections Connection - Holds the aggregated output of all connections details queries.
- Id string
- The provider-assigned unique ID for this managed resource.
- Like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- connections
List<Get
Connections Connection> - Holds the aggregated output of all connections details queries.
- id String
- The provider-assigned unique ID for this managed resource.
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- connections
Get
Connections Connection[] - Holds the aggregated output of all connections details queries.
- id string
- The provider-assigned unique ID for this managed resource.
- like string
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- connections
Sequence[Get
Connections Connection] - Holds the aggregated output of all connections details queries.
- id str
- The provider-assigned unique ID for this managed resource.
- like str
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
- connections List<Property Map>
- Holds the aggregated output of all connections details queries.
- id String
- The provider-assigned unique ID for this managed resource.
- like String
- Filters the output with case-insensitive pattern, with support for SQL wildcard characters (
%
and_
).
Supporting Types
GetConnectionsConnection
- Show
Outputs List<GetConnections Connection Show Output> - Holds the output of SHOW CONNECTIONS.
- Show
Outputs []GetConnections Connection Show Output - Holds the output of SHOW CONNECTIONS.
- show
Outputs List<GetConnections Connection Show Output> - Holds the output of SHOW CONNECTIONS.
- show
Outputs GetConnections Connection Show Output[] - Holds the output of SHOW CONNECTIONS.
- show_
outputs Sequence[GetConnections Connection Show Output] - Holds the output of SHOW CONNECTIONS.
- show
Outputs List<Property Map> - Holds the output of SHOW CONNECTIONS.
GetConnectionsConnectionShowOutput
- Account
Locator string - Account
Name string - Comment string
- Connection
Url string - Created
On string - Failover
Allowed List<string>To Accounts - Is
Primary bool - Name string
- Organization
Name string - Primary string
- Region
Group string - Snowflake
Region string
- Account
Locator string - Account
Name string - Comment string
- Connection
Url string - Created
On string - Failover
Allowed []stringTo Accounts - Is
Primary bool - Name string
- Organization
Name string - Primary string
- Region
Group string - Snowflake
Region string
- account
Locator String - account
Name String - comment String
- connection
Url String - created
On String - failover
Allowed List<String>To Accounts - is
Primary Boolean - name String
- organization
Name String - primary String
- region
Group String - snowflake
Region String
- account
Locator string - account
Name string - comment string
- connection
Url string - created
On string - failover
Allowed string[]To Accounts - is
Primary boolean - name string
- organization
Name string - primary string
- region
Group string - snowflake
Region string
- account_
locator str - account_
name str - comment str
- connection_
url str - created_
on str - failover_
allowed_ Sequence[str]to_ accounts - is_
primary bool - name str
- organization_
name str - primary str
- region_
group str - snowflake_
region str
- account
Locator String - account
Name String - comment String
- connection
Url String - created
On String - failover
Allowed List<String>To Accounts - is
Primary Boolean - name String
- organization
Name String - primary String
- region
Group String - snowflake
Region String
Package Details
- Repository
- Snowflake pulumi/pulumi-snowflake
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
snowflake
Terraform Provider.