amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.CreateVpcPeeringConnection

Description

Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection. The accepter VPC can belong to another Amazon Web Services account and can be in a different Region to the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks.

Limitations and rules apply to a VPC peering connection. For more information, see the limitations section in the VPC Peering Guide.

The owner of the accepter VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed.

Synopsis

Creating a Request

data CreateVpcPeeringConnection Source #

See: newCreateVpcPeeringConnection smart constructor.

Constructors

CreateVpcPeeringConnection' 

Fields

  • dryRun :: Maybe Bool

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • peerOwnerId :: Maybe Text

    The Amazon Web Services account ID of the owner of the accepter VPC.

    Default: Your Amazon Web Services account ID

  • peerRegion :: Maybe Text

    The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.

    Default: The Region in which you make the request.

  • peerVpcId :: Maybe Text

    The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.

  • tagSpecifications :: Maybe [TagSpecification]

    The tags to assign to the peering connection.

  • vpcId :: Maybe Text

    The ID of the requester VPC. You must specify this parameter in the request.

Instances

Instances details
ToHeaders CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

ToPath CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

ToQuery CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

AWSRequest CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

Generic CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

Associated Types

type Rep CreateVpcPeeringConnection :: Type -> Type #

Read CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

Show CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

NFData CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

Eq CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

Hashable CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

type AWSResponse CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

type Rep CreateVpcPeeringConnection Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

type Rep CreateVpcPeeringConnection = D1 ('MetaData "CreateVpcPeeringConnection" "Amazonka.EC2.CreateVpcPeeringConnection" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateVpcPeeringConnection'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "peerOwnerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "peerRegion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "peerVpcId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "tagSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TagSpecification])) :*: S1 ('MetaSel ('Just "vpcId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))))

newCreateVpcPeeringConnection :: CreateVpcPeeringConnection Source #

Create a value of CreateVpcPeeringConnection with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:dryRun:CreateVpcPeeringConnection', createVpcPeeringConnection_dryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

$sel:peerOwnerId:CreateVpcPeeringConnection', createVpcPeeringConnection_peerOwnerId - The Amazon Web Services account ID of the owner of the accepter VPC.

Default: Your Amazon Web Services account ID

$sel:peerRegion:CreateVpcPeeringConnection', createVpcPeeringConnection_peerRegion - The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.

Default: The Region in which you make the request.

$sel:peerVpcId:CreateVpcPeeringConnection', createVpcPeeringConnection_peerVpcId - The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.

CreateVpcPeeringConnection, createVpcPeeringConnection_tagSpecifications - The tags to assign to the peering connection.

CreateVpcPeeringConnection, createVpcPeeringConnection_vpcId - The ID of the requester VPC. You must specify this parameter in the request.

Request Lenses

createVpcPeeringConnection_dryRun :: Lens' CreateVpcPeeringConnection (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

createVpcPeeringConnection_peerOwnerId :: Lens' CreateVpcPeeringConnection (Maybe Text) Source #

The Amazon Web Services account ID of the owner of the accepter VPC.

Default: Your Amazon Web Services account ID

createVpcPeeringConnection_peerRegion :: Lens' CreateVpcPeeringConnection (Maybe Text) Source #

The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.

Default: The Region in which you make the request.

createVpcPeeringConnection_peerVpcId :: Lens' CreateVpcPeeringConnection (Maybe Text) Source #

The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.

createVpcPeeringConnection_vpcId :: Lens' CreateVpcPeeringConnection (Maybe Text) Source #

The ID of the requester VPC. You must specify this parameter in the request.

Destructuring the Response

data CreateVpcPeeringConnectionResponse Source #

Constructors

CreateVpcPeeringConnectionResponse' 

Fields

Instances

Instances details
Generic CreateVpcPeeringConnectionResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

Associated Types

type Rep CreateVpcPeeringConnectionResponse :: Type -> Type #

Read CreateVpcPeeringConnectionResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

Show CreateVpcPeeringConnectionResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

NFData CreateVpcPeeringConnectionResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

Eq CreateVpcPeeringConnectionResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

type Rep CreateVpcPeeringConnectionResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateVpcPeeringConnection

type Rep CreateVpcPeeringConnectionResponse = D1 ('MetaData "CreateVpcPeeringConnectionResponse" "Amazonka.EC2.CreateVpcPeeringConnection" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateVpcPeeringConnectionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "vpcPeeringConnection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VpcPeeringConnection)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateVpcPeeringConnectionResponse Source #

Create a value of CreateVpcPeeringConnectionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreateVpcPeeringConnectionResponse, createVpcPeeringConnectionResponse_vpcPeeringConnection - Information about the VPC peering connection.

$sel:httpStatus:CreateVpcPeeringConnectionResponse', createVpcPeeringConnectionResponse_httpStatus - The response's http status code.

Response Lenses