AWS Classic
getLocation
Retrieve information about a specific AWS Direct Connect location in the current AWS Region.
These are the locations that can be specified when configuring aws.directconnect.Connection
or aws.directconnect.LinkAggregationGroup
resources.
Note: This data source is different from the
aws.directconnect.getLocations
data source which retrieves information about all the AWS Direct Connect locations in the current AWS Region.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.DirectConnect.GetLocation.InvokeAsync(new Aws.DirectConnect.GetLocationArgs
{
LocationCode = "CS32A-24FL",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/directconnect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := directconnect.GetLocation(ctx, &directconnect.GetLocationArgs{
LocationCode: "CS32A-24FL",
}, 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(DirectconnectFunctions.getLocation(GetLocationArgs.builder()
.locationCode("CS32A-24FL")
.build()));
}
}
import pulumi
import pulumi_aws as aws
example = aws.directconnect.get_location(location_code="CS32A-24FL")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.directconnect.getLocation({
locationCode: "CS32A-24FL",
}));
variables:
example:
Fn::Invoke:
Function: aws:directconnect:getLocation
Arguments:
locationCode: CS32A-24FL
Using getLocation
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 getLocation(args: GetLocationArgs, opts?: InvokeOptions): Promise<GetLocationResult>
function getLocationOutput(args: GetLocationOutputArgs, opts?: InvokeOptions): Output<GetLocationResult>
def get_location(location_code: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLocationResult
def get_location_output(location_code: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLocationResult]
func GetLocation(ctx *Context, args *GetLocationArgs, opts ...InvokeOption) (*GetLocationResult, error)
func GetLocationOutput(ctx *Context, args *GetLocationOutputArgs, opts ...InvokeOption) GetLocationResultOutput
> Note: This function is named GetLocation
in the Go SDK.
public static class GetLocation
{
public static Task<GetLocationResult> InvokeAsync(GetLocationArgs args, InvokeOptions? opts = null)
public static Output<GetLocationResult> Invoke(GetLocationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLocationResult> getLocation(GetLocationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: aws:directconnect/getLocation:getLocation
Arguments:
# Arguments dictionary
The following arguments are supported:
- Location
Code string The code for the location to retrieve.
- Location
Code string The code for the location to retrieve.
- location
Code String The code for the location to retrieve.
- location
Code string The code for the location to retrieve.
- location_
code str The code for the location to retrieve.
- location
Code String The code for the location to retrieve.
getLocation Result
The following output properties are available:
- Available
Port List<string>Speeds The available port speeds for the location.
- Available
Providers List<string> The names of the service providers for the location.
- Id string
The provider-assigned unique ID for this managed resource.
- Location
Code string - Location
Name string The name of the location. This includes the name of the colocation partner and the physical site of the building.
- Available
Port []stringSpeeds The available port speeds for the location.
- Available
Providers []string The names of the service providers for the location.
- Id string
The provider-assigned unique ID for this managed resource.
- Location
Code string - Location
Name string The name of the location. This includes the name of the colocation partner and the physical site of the building.
- available
Port List<String>Speeds The available port speeds for the location.
- available
Providers List<String> The names of the service providers for the location.
- id String
The provider-assigned unique ID for this managed resource.
- location
Code String - location
Name String The name of the location. This includes the name of the colocation partner and the physical site of the building.
- available
Port string[]Speeds The available port speeds for the location.
- available
Providers string[] The names of the service providers for the location.
- id string
The provider-assigned unique ID for this managed resource.
- location
Code string - location
Name string The name of the location. This includes the name of the colocation partner and the physical site of the building.
- available_
port_ Sequence[str]speeds The available port speeds for the location.
- available_
providers Sequence[str] The names of the service providers for the location.
- id str
The provider-assigned unique ID for this managed resource.
- location_
code str - location_
name str The name of the location. This includes the name of the colocation partner and the physical site of the building.
- available
Port List<String>Speeds The available port speeds for the location.
- available
Providers List<String> The names of the service providers for the location.
- id String
The provider-assigned unique ID for this managed resource.
- location
Code String - location
Name String The name of the location. This includes the name of the colocation partner and the physical site of the building.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.