1. Packages
  2. AWS Classic
  3. API Docs
  4. directconnect
  5. getLocation

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.directconnect.getLocation

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    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:

    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:

    AvailableMacsecPortSpeeds List<string>
    The available MAC Security (MACsec) port speeds for the location.
    AvailablePortSpeeds List<string>
    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.
    AvailableMacsecPortSpeeds []string
    The available MAC Security (MACsec) port speeds for the location.
    AvailablePortSpeeds []string
    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.
    availableMacsecPortSpeeds List<String>
    The available MAC Security (MACsec) port speeds for the location.
    availablePortSpeeds List<String>
    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.
    availableMacsecPortSpeeds string[]
    The available MAC Security (MACsec) port speeds for the location.
    availablePortSpeeds string[]
    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_port_speeds Sequence[str]
    The available MAC Security (MACsec) port speeds for the location.
    available_port_speeds Sequence[str]
    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.
    availableMacsecPortSpeeds List<String>
    The available MAC Security (MACsec) port speeds for the location.
    availablePortSpeeds List<String>
    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 aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi