1. Packages
  2. AWS Classic
  3. API Docs
  4. ec2
  5. CarrierGateway

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.ec2.CarrierGateway

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

    Manages an EC2 Carrier Gateway. See the AWS documentation for more information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2.CarrierGateway("example", {
        vpcId: exampleAwsVpc.id,
        tags: {
            Name: "example-carrier-gateway",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2.CarrierGateway("example",
        vpc_id=example_aws_vpc["id"],
        tags={
            "Name": "example-carrier-gateway",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2.NewCarrierGateway(ctx, "example", &ec2.CarrierGatewayArgs{
    			VpcId: pulumi.Any(exampleAwsVpc.Id),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("example-carrier-gateway"),
    			},
    		})
    		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.Ec2.CarrierGateway("example", new()
        {
            VpcId = exampleAwsVpc.Id,
            Tags = 
            {
                { "Name", "example-carrier-gateway" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.CarrierGateway;
    import com.pulumi.aws.ec2.CarrierGatewayArgs;
    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 CarrierGateway("example", CarrierGatewayArgs.builder()
                .vpcId(exampleAwsVpc.id())
                .tags(Map.of("Name", "example-carrier-gateway"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:CarrierGateway
        properties:
          vpcId: ${exampleAwsVpc.id}
          tags:
            Name: example-carrier-gateway
    

    Create CarrierGateway Resource

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

    Constructor syntax

    new CarrierGateway(name: string, args: CarrierGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def CarrierGateway(resource_name: str,
                       args: CarrierGatewayArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def CarrierGateway(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       vpc_id: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None)
    func NewCarrierGateway(ctx *Context, name string, args CarrierGatewayArgs, opts ...ResourceOption) (*CarrierGateway, error)
    public CarrierGateway(string name, CarrierGatewayArgs args, CustomResourceOptions? opts = null)
    public CarrierGateway(String name, CarrierGatewayArgs args)
    public CarrierGateway(String name, CarrierGatewayArgs args, CustomResourceOptions options)
    
    type: aws:ec2:CarrierGateway
    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 CarrierGatewayArgs
    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 CarrierGatewayArgs
    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 CarrierGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CarrierGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CarrierGatewayArgs
    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 carrierGatewayResource = new Aws.Ec2.CarrierGateway("carrierGatewayResource", new()
    {
        VpcId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := ec2.NewCarrierGateway(ctx, "carrierGatewayResource", &ec2.CarrierGatewayArgs{
    	VpcId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var carrierGatewayResource = new CarrierGateway("carrierGatewayResource", CarrierGatewayArgs.builder()
        .vpcId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    carrier_gateway_resource = aws.ec2.CarrierGateway("carrierGatewayResource",
        vpc_id="string",
        tags={
            "string": "string",
        })
    
    const carrierGatewayResource = new aws.ec2.CarrierGateway("carrierGatewayResource", {
        vpcId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:ec2:CarrierGateway
    properties:
        tags:
            string: string
        vpcId: string
    

    CarrierGateway 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 CarrierGateway resource accepts the following input properties:

    VpcId string
    The ID of the VPC to associate with the carrier gateway.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    VpcId string
    The ID of the VPC to associate with the carrier gateway.
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    vpcId String
    The ID of the VPC to associate with the carrier gateway.
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    vpcId string
    The ID of the VPC to associate with the carrier gateway.
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    vpc_id str
    The ID of the VPC to associate with the carrier gateway.
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    vpcId String
    The ID of the VPC to associate with the carrier gateway.
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    The ARN of the carrier gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerId string
    The AWS account ID of the owner of the carrier gateway.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The ARN of the carrier gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    OwnerId string
    The AWS account ID of the owner of the carrier gateway.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the carrier gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerId String
    The AWS account ID of the owner of the carrier gateway.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The ARN of the carrier gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    ownerId string
    The AWS account ID of the owner of the carrier gateway.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The ARN of the carrier gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    owner_id str
    The AWS account ID of the owner of the carrier gateway.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The ARN of the carrier gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    ownerId String
    The AWS account ID of the owner of the carrier gateway.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing CarrierGateway Resource

    Get an existing CarrierGateway 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?: CarrierGatewayState, opts?: CustomResourceOptions): CarrierGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            owner_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            vpc_id: Optional[str] = None) -> CarrierGateway
    func GetCarrierGateway(ctx *Context, name string, id IDInput, state *CarrierGatewayState, opts ...ResourceOption) (*CarrierGateway, error)
    public static CarrierGateway Get(string name, Input<string> id, CarrierGatewayState? state, CustomResourceOptions? opts = null)
    public static CarrierGateway get(String name, Output<String> id, CarrierGatewayState 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:
    Arn string
    The ARN of the carrier gateway.
    OwnerId string
    The AWS account ID of the owner of the carrier gateway.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VpcId string
    The ID of the VPC to associate with the carrier gateway.
    Arn string
    The ARN of the carrier gateway.
    OwnerId string
    The AWS account ID of the owner of the carrier gateway.
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VpcId string
    The ID of the VPC to associate with the carrier gateway.
    arn String
    The ARN of the carrier gateway.
    ownerId String
    The AWS account ID of the owner of the carrier gateway.
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcId String
    The ID of the VPC to associate with the carrier gateway.
    arn string
    The ARN of the carrier gateway.
    ownerId string
    The AWS account ID of the owner of the carrier gateway.
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcId string
    The ID of the VPC to associate with the carrier gateway.
    arn str
    The ARN of the carrier gateway.
    owner_id str
    The AWS account ID of the owner of the carrier gateway.
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpc_id str
    The ID of the VPC to associate with the carrier gateway.
    arn String
    The ARN of the carrier gateway.
    ownerId String
    The AWS account ID of the owner of the carrier gateway.
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcId String
    The ID of the VPC to associate with the carrier gateway.

    Import

    Using pulumi import, import aws_ec2_carrier_gateway using the carrier gateway’s ID. For example:

    $ pulumi import aws:ec2/carrierGateway:CarrierGateway example cgw-12345
    

    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