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

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.Gateway

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

    Provides a Direct Connect Gateway.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.directconnect.Gateway("example", {
        name: "tf-dxg-example",
        amazonSideAsn: "64512",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.directconnect.Gateway("example",
        name="tf-dxg-example",
        amazon_side_asn="64512")
    
    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.NewGateway(ctx, "example", &directconnect.GatewayArgs{
    			Name:          pulumi.String("tf-dxg-example"),
    			AmazonSideAsn: pulumi.String("64512"),
    		})
    		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 = new Aws.DirectConnect.Gateway("example", new()
        {
            Name = "tf-dxg-example",
            AmazonSideAsn = "64512",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.directconnect.Gateway;
    import com.pulumi.aws.directconnect.GatewayArgs;
    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) {
            var example = new Gateway("example", GatewayArgs.builder()
                .name("tf-dxg-example")
                .amazonSideAsn("64512")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:directconnect:Gateway
        properties:
          name: tf-dxg-example
          amazonSideAsn: '64512'
    

    Create Gateway Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Gateway(name: string, args: GatewayArgs, opts?: CustomResourceOptions);
    @overload
    def Gateway(resource_name: str,
                args: GatewayArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Gateway(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                amazon_side_asn: Optional[str] = None,
                name: Optional[str] = None)
    func NewGateway(ctx *Context, name string, args GatewayArgs, opts ...ResourceOption) (*Gateway, error)
    public Gateway(string name, GatewayArgs args, CustomResourceOptions? opts = null)
    public Gateway(String name, GatewayArgs args)
    public Gateway(String name, GatewayArgs args, CustomResourceOptions options)
    
    type: aws:directconnect:Gateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var gatewayResource = new Aws.DirectConnect.Gateway("gatewayResource", new()
    {
        AmazonSideAsn = "string",
        Name = "string",
    });
    
    example, err := directconnect.NewGateway(ctx, "gatewayResource", &directconnect.GatewayArgs{
    	AmazonSideAsn: pulumi.String("string"),
    	Name:          pulumi.String("string"),
    })
    
    var gatewayResource = new Gateway("gatewayResource", GatewayArgs.builder()
        .amazonSideAsn("string")
        .name("string")
        .build());
    
    gateway_resource = aws.directconnect.Gateway("gatewayResource",
        amazon_side_asn="string",
        name="string")
    
    const gatewayResource = new aws.directconnect.Gateway("gatewayResource", {
        amazonSideAsn: "string",
        name: "string",
    });
    
    type: aws:directconnect:Gateway
    properties:
        amazonSideAsn: string
        name: string
    

    Gateway Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Gateway resource accepts the following input properties:

    AmazonSideAsn string
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    Name string
    The name of the connection.
    AmazonSideAsn string
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    Name string
    The name of the connection.
    amazonSideAsn String
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    name String
    The name of the connection.
    amazonSideAsn string
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    name string
    The name of the connection.
    amazon_side_asn str
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    name str
    The name of the connection.
    amazonSideAsn String
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    name String
    The name of the connection.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Gateway resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerAccountId string
    AWS Account ID of the gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerAccountId string
    AWS Account ID of the gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerAccountId String
    AWS Account ID of the gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    ownerAccountId string
    AWS Account ID of the gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    owner_account_id str
    AWS Account ID of the gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerAccountId String
    AWS Account ID of the gateway.

    Look up Existing Gateway Resource

    Get an existing Gateway resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: GatewayState, opts?: CustomResourceOptions): Gateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            amazon_side_asn: Optional[str] = None,
            name: Optional[str] = None,
            owner_account_id: Optional[str] = None) -> Gateway
    func GetGateway(ctx *Context, name string, id IDInput, state *GatewayState, opts ...ResourceOption) (*Gateway, error)
    public static Gateway Get(string name, Input<string> id, GatewayState? state, CustomResourceOptions? opts = null)
    public static Gateway get(String name, Output<String> id, GatewayState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AmazonSideAsn string
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    Name string
    The name of the connection.
    OwnerAccountId string
    AWS Account ID of the gateway.
    AmazonSideAsn string
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    Name string
    The name of the connection.
    OwnerAccountId string
    AWS Account ID of the gateway.
    amazonSideAsn String
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    name String
    The name of the connection.
    ownerAccountId String
    AWS Account ID of the gateway.
    amazonSideAsn string
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    name string
    The name of the connection.
    ownerAccountId string
    AWS Account ID of the gateway.
    amazon_side_asn str
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    name str
    The name of the connection.
    owner_account_id str
    AWS Account ID of the gateway.
    amazonSideAsn String
    The ASN to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294.
    name String
    The name of the connection.
    ownerAccountId String
    AWS Account ID of the gateway.

    Import

    Using pulumi import, import Direct Connect Gateways using the gateway id. For example:

    $ pulumi import aws:directconnect/gateway:Gateway test abcd1234-dcba-5678-be23-cdef9876ab45
    

    To learn more about importing existing cloud resources, see Importing resources.

    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