aws.directconnect.getLocation
Explore with Pulumi AI
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.getLocationsdata source which retrieves information about all the AWS Direct Connect locations in the current AWS Region.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.directconnect.getLocation({
    locationCode: "CS32A-24FL",
});
import pulumi
import pulumi_aws as aws
example = aws.directconnect.get_location(location_code="CS32A-24FL")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/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
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.DirectConnect.GetLocation.Invoke(new()
    {
        LocationCode = "CS32A-24FL",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.directconnect.DirectconnectFunctions;
import com.pulumi.aws.directconnect.inputs.GetLocationArgs;
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) {
        final var example = DirectconnectFunctions.getLocation(GetLocationArgs.builder()
            .locationCode("CS32A-24FL")
            .build());
    }
}
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)
public static Output<GetLocationResult> getLocation(GetLocationArgs args, InvokeOptions options)
fn::invoke:
  function: aws:directconnect/getLocation:getLocation
  arguments:
    # arguments dictionaryThe following arguments are supported:
- LocationCode string
- Code for the location to retrieve.
- LocationCode string
- Code for the location to retrieve.
- locationCode String
- Code for the location to retrieve.
- locationCode string
- Code for the location to retrieve.
- location_code str
- Code for the location to retrieve.
- locationCode String
- Code for the location to retrieve.
getLocation Result
The following output properties are available:
- AvailableMacsec List<string>Port Speeds 
- The available MAC Security (MACsec) port speeds for the location.
- AvailablePort List<string>Speeds 
- The available port speeds for the location.
- AvailableProviders List<string>
- Names of the service providers for the location.
- Id string
- The provider-assigned unique ID for this managed resource.
- LocationCode string
- LocationName string
- Name of the location. This includes the name of the colocation partner and the physical site of the building.
- AvailableMacsec []stringPort Speeds 
- The available MAC Security (MACsec) port speeds for the location.
- AvailablePort []stringSpeeds 
- The available port speeds for the location.
- AvailableProviders []string
- Names of the service providers for the location.
- Id string
- The provider-assigned unique ID for this managed resource.
- LocationCode string
- LocationName string
- Name of the location. This includes the name of the colocation partner and the physical site of the building.
- availableMacsec List<String>Port Speeds 
- The available MAC Security (MACsec) port speeds for the location.
- availablePort List<String>Speeds 
- The available port speeds for the location.
- availableProviders List<String>
- Names of the service providers for the location.
- id String
- The provider-assigned unique ID for this managed resource.
- locationCode String
- locationName String
- Name of the location. This includes the name of the colocation partner and the physical site of the building.
- availableMacsec string[]Port Speeds 
- The available MAC Security (MACsec) port speeds for the location.
- availablePort string[]Speeds 
- The available port speeds for the location.
- availableProviders string[]
- Names of the service providers for the location.
- id string
- The provider-assigned unique ID for this managed resource.
- locationCode string
- locationName string
- Name of the location. This includes the name of the colocation partner and the physical site of the building.
- available_macsec_ Sequence[str]port_ speeds 
- The available MAC Security (MACsec) port speeds for the location.
- available_port_ Sequence[str]speeds 
- The available port speeds for the location.
- available_providers Sequence[str]
- 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
- Name of the location. This includes the name of the colocation partner and the physical site of the building.
- availableMacsec List<String>Port Speeds 
- The available MAC Security (MACsec) port speeds for the location.
- availablePort List<String>Speeds 
- The available port speeds for the location.
- availableProviders List<String>
- Names of the service providers for the location.
- id String
- The provider-assigned unique ID for this managed resource.
- locationCode String
- locationName String
- Name of the location. This includes the name of the colocation partner and the physical site of the building.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.