AWS Classic
getConnection
Retrieve information about a connection.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.NetworkManager.GetConnection.InvokeAsync(new Aws.NetworkManager.GetConnectionArgs
{
GlobalNetworkId = @var.Global_network_id,
ConnectionId = @var.Connection_id,
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/networkmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networkmanager.LookupConnection(ctx, &networkmanager.LookupConnectionArgs{
GlobalNetworkId: _var.Global_network_id,
ConnectionId: _var.Connection_id,
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Output.of(NetworkmanagerFunctions.getConnection(GetConnectionArgs.builder()
.globalNetworkId(var_.getGlobal_network_id())
.connectionId(var_.getConnection_id())
.build()));
}
}
import pulumi
import pulumi_aws as aws
example = aws.networkmanager.get_connection(global_network_id=var["global_network_id"],
connection_id=var["connection_id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.networkmanager.getConnection({
globalNetworkId: _var.global_network_id,
connectionId: _var.connection_id,
});
variables:
example:
Fn::Invoke:
Function: aws:networkmanager:getConnection
Arguments:
globalNetworkId: ${var.global_network_id}
connectionId: ${var.connection_id}
Using getConnection
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 getConnection(args: GetConnectionArgs, opts?: InvokeOptions): Promise<GetConnectionResult>
function getConnectionOutput(args: GetConnectionOutputArgs, opts?: InvokeOptions): Output<GetConnectionResult>
def get_connection(connection_id: Optional[str] = None,
global_network_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetConnectionResult
def get_connection_output(connection_id: Optional[pulumi.Input[str]] = None,
global_network_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConnectionResult]
func LookupConnection(ctx *Context, args *LookupConnectionArgs, opts ...InvokeOption) (*LookupConnectionResult, error)
func LookupConnectionOutput(ctx *Context, args *LookupConnectionOutputArgs, opts ...InvokeOption) LookupConnectionResultOutput
> Note: This function is named LookupConnection
in the Go SDK.
public static class GetConnection
{
public static Task<GetConnectionResult> InvokeAsync(GetConnectionArgs args, InvokeOptions? opts = null)
public static Output<GetConnectionResult> Invoke(GetConnectionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: aws:networkmanager/getConnection:getConnection
Arguments:
# Arguments dictionary
The following arguments are supported:
- Connection
Id string The id of the specific connection to retrieve.
- Global
Network stringId The ID of the Global Network of the connection to retrieve.
- Dictionary<string, string>
Key-value tags for the connection.
- Connection
Id string The id of the specific connection to retrieve.
- Global
Network stringId The ID of the Global Network of the connection to retrieve.
- map[string]string
Key-value tags for the connection.
- connection
Id String The id of the specific connection to retrieve.
- global
Network StringId The ID of the Global Network of the connection to retrieve.
- Map
Key-value tags for the connection.
- connection
Id string The id of the specific connection to retrieve.
- global
Network stringId The ID of the Global Network of the connection to retrieve.
- {[key: string]: string}
Key-value tags for the connection.
- connection_
id str The id of the specific connection to retrieve.
- global_
network_ strid The ID of the Global Network of the connection to retrieve.
- Mapping[str, str]
Key-value tags for the connection.
- connection
Id String The id of the specific connection to retrieve.
- global
Network StringId The ID of the Global Network of the connection to retrieve.
- Map
Key-value tags for the connection.
getConnection Result
The following output properties are available:
- Arn string
The ARN of the connection.
- Connected
Device stringId The ID of the second device in the connection.
- Connected
Link stringId The ID of the link for the second device.
- Connection
Id string - Description string
A description of the connection.
- Device
Id string The ID of the first device in the connection.
- Global
Network stringId - Id string
The provider-assigned unique ID for this managed resource.
- Link
Id string The ID of the link for the first device.
- Dictionary<string, string>
Key-value tags for the connection.
- Arn string
The ARN of the connection.
- Connected
Device stringId The ID of the second device in the connection.
- Connected
Link stringId The ID of the link for the second device.
- Connection
Id string - Description string
A description of the connection.
- Device
Id string The ID of the first device in the connection.
- Global
Network stringId - Id string
The provider-assigned unique ID for this managed resource.
- Link
Id string The ID of the link for the first device.
- map[string]string
Key-value tags for the connection.
- arn String
The ARN of the connection.
- connected
Device StringId The ID of the second device in the connection.
- connected
Link StringId The ID of the link for the second device.
- connection
Id String - description String
A description of the connection.
- device
Id String The ID of the first device in the connection.
- global
Network StringId - id String
The provider-assigned unique ID for this managed resource.
- link
Id String The ID of the link for the first device.
- Map
Key-value tags for the connection.
- arn string
The ARN of the connection.
- connected
Device stringId The ID of the second device in the connection.
- connected
Link stringId The ID of the link for the second device.
- connection
Id string - description string
A description of the connection.
- device
Id string The ID of the first device in the connection.
- global
Network stringId - id string
The provider-assigned unique ID for this managed resource.
- link
Id string The ID of the link for the first device.
- {[key: string]: string}
Key-value tags for the connection.
- arn str
The ARN of the connection.
- connected_
device_ strid The ID of the second device in the connection.
- connected_
link_ strid The ID of the link for the second device.
- connection_
id str - description str
A description of the connection.
- device_
id str The ID of the first device in the connection.
- global_
network_ strid - id str
The provider-assigned unique ID for this managed resource.
- link_
id str The ID of the link for the first device.
- Mapping[str, str]
Key-value tags for the connection.
- arn String
The ARN of the connection.
- connected
Device StringId The ID of the second device in the connection.
- connected
Link StringId The ID of the link for the second device.
- connection
Id String - description String
A description of the connection.
- device
Id String The ID of the first device in the connection.
- global
Network StringId - id String
The provider-assigned unique ID for this managed resource.
- link
Id String The ID of the link for the first device.
- Map
Key-value tags for the connection.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.