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.getLocations
data 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)
// 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 - Code for the location to retrieve.
- Location
Code string - Code for the location to retrieve.
- location
Code String - Code for the location to retrieve.
- location
Code string - Code for the location to retrieve.
- location_
code str - Code for the location to retrieve.
- location
Code String - Code for the location to retrieve.
getLocation Result
The following output properties are available:
- Available
Macsec List<string>Port Speeds - The available MAC Security (MACsec) port speeds for the location.
- Available
Port List<string>Speeds - The available port speeds for the location.
- Available
Providers List<string> - 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 - Name of the location. This includes the name of the colocation partner and the physical site of the building.
- Available
Macsec []stringPort Speeds - The available MAC Security (MACsec) port speeds for the location.
- Available
Port []stringSpeeds - The available port speeds for the location.
- Available
Providers []string - 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 - Name of the location. This includes the name of the colocation partner and the physical site of the building.
- available
Macsec List<String>Port Speeds - The available MAC Security (MACsec) port speeds for the location.
- available
Port List<String>Speeds - The available port speeds for the location.
- available
Providers List<String> - 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 - Name of the location. This includes the name of the colocation partner and the physical site of the building.
- available
Macsec string[]Port Speeds - The available MAC Security (MACsec) port speeds for the location.
- available
Port string[]Speeds - The available port speeds for the location.
- available
Providers string[] - 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 - 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.
- available
Macsec List<String>Port Speeds - The available MAC Security (MACsec) port speeds for the location.
- available
Port List<String>Speeds - The available port speeds for the location.
- available
Providers List<String> - 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 - 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
aws
Terraform Provider.