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

Description

Associates a subnet in your VPC or an internet gateway or virtual private gateway attached to your VPC with a route table in your VPC. This association causes traffic from the subnet or gateway to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table later. A route table can be associated with multiple subnets.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide.

Synopsis

Creating a Request

data AssociateRouteTable Source #

See: newAssociateRouteTable smart constructor.

Constructors

AssociateRouteTable' 

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.

  • gatewayId :: Maybe Text

    The ID of the internet gateway or virtual private gateway.

  • subnetId :: Maybe Text

    The ID of the subnet.

  • routeTableId :: Text

    The ID of the route table.

Instances

Instances details
ToHeaders AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

ToPath AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

ToQuery AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

AWSRequest AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

Associated Types

type AWSResponse AssociateRouteTable #

Generic AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

Associated Types

type Rep AssociateRouteTable :: Type -> Type #

Read AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

Show AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

NFData AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

Methods

rnf :: AssociateRouteTable -> () #

Eq AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

Hashable AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

type AWSResponse AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

type Rep AssociateRouteTable Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

type Rep AssociateRouteTable = D1 ('MetaData "AssociateRouteTable" "Amazonka.EC2.AssociateRouteTable" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "AssociateRouteTable'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "gatewayId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "subnetId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "routeTableId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newAssociateRouteTable Source #

Create a value of AssociateRouteTable 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:AssociateRouteTable', associateRouteTable_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.

AssociateRouteTable, associateRouteTable_gatewayId - The ID of the internet gateway or virtual private gateway.

AssociateRouteTable, associateRouteTable_subnetId - The ID of the subnet.

AssociateRouteTable, associateRouteTable_routeTableId - The ID of the route table.

Request Lenses

associateRouteTable_dryRun :: Lens' AssociateRouteTable (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.

associateRouteTable_gatewayId :: Lens' AssociateRouteTable (Maybe Text) Source #

The ID of the internet gateway or virtual private gateway.

Destructuring the Response

data AssociateRouteTableResponse Source #

See: newAssociateRouteTableResponse smart constructor.

Constructors

AssociateRouteTableResponse' 

Fields

Instances

Instances details
Generic AssociateRouteTableResponse Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

Associated Types

type Rep AssociateRouteTableResponse :: Type -> Type #

Read AssociateRouteTableResponse Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

Show AssociateRouteTableResponse Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

NFData AssociateRouteTableResponse Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

Eq AssociateRouteTableResponse Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

type Rep AssociateRouteTableResponse Source # 
Instance details

Defined in Amazonka.EC2.AssociateRouteTable

type Rep AssociateRouteTableResponse = D1 ('MetaData "AssociateRouteTableResponse" "Amazonka.EC2.AssociateRouteTable" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "AssociateRouteTableResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "associationId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "associationState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RouteTableAssociationState)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newAssociateRouteTableResponse Source #

Create a value of AssociateRouteTableResponse 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:

AssociateRouteTableResponse, associateRouteTableResponse_associationId - The route table association ID. This ID is required for disassociating the route table.

AssociateRouteTableResponse, associateRouteTableResponse_associationState - The state of the association.

$sel:httpStatus:AssociateRouteTableResponse', associateRouteTableResponse_httpStatus - The response's http status code.

Response Lenses

associateRouteTableResponse_associationId :: Lens' AssociateRouteTableResponse (Maybe Text) Source #

The route table association ID. This ID is required for disassociating the route table.