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

Description

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide.

Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

Linking your instance to a VPC is sometimes referred to as attaching your instance.

Synopsis

Creating a Request

data AttachClassicLinkVpc Source #

See: newAttachClassicLinkVpc smart constructor.

Constructors

AttachClassicLinkVpc' 

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.

  • groups :: [Text]

    The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

  • instanceId :: Text

    The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

  • vpcId :: Text

    The ID of a ClassicLink-enabled VPC.

Instances

Instances details
ToHeaders AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

ToPath AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

ToQuery AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

AWSRequest AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

Associated Types

type AWSResponse AttachClassicLinkVpc #

Generic AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

Associated Types

type Rep AttachClassicLinkVpc :: Type -> Type #

Read AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

Show AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

NFData AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

Methods

rnf :: AttachClassicLinkVpc -> () #

Eq AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

Hashable AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

type AWSResponse AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

type Rep AttachClassicLinkVpc Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

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

newAttachClassicLinkVpc Source #

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

AttachClassicLinkVpc, attachClassicLinkVpc_groups - The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

AttachClassicLinkVpc, attachClassicLinkVpc_instanceId - The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

AttachClassicLinkVpc, attachClassicLinkVpc_vpcId - The ID of a ClassicLink-enabled VPC.

Request Lenses

attachClassicLinkVpc_dryRun :: Lens' AttachClassicLinkVpc (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.

attachClassicLinkVpc_groups :: Lens' AttachClassicLinkVpc [Text] Source #

The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

attachClassicLinkVpc_instanceId :: Lens' AttachClassicLinkVpc Text Source #

The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

attachClassicLinkVpc_vpcId :: Lens' AttachClassicLinkVpc Text Source #

The ID of a ClassicLink-enabled VPC.

Destructuring the Response

data AttachClassicLinkVpcResponse Source #

See: newAttachClassicLinkVpcResponse smart constructor.

Constructors

AttachClassicLinkVpcResponse' 

Fields

Instances

Instances details
Generic AttachClassicLinkVpcResponse Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

Associated Types

type Rep AttachClassicLinkVpcResponse :: Type -> Type #

Read AttachClassicLinkVpcResponse Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

Show AttachClassicLinkVpcResponse Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

NFData AttachClassicLinkVpcResponse Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

Eq AttachClassicLinkVpcResponse Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

type Rep AttachClassicLinkVpcResponse Source # 
Instance details

Defined in Amazonka.EC2.AttachClassicLinkVpc

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

newAttachClassicLinkVpcResponse Source #

Create a value of AttachClassicLinkVpcResponse 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:return':AttachClassicLinkVpcResponse', attachClassicLinkVpcResponse_return - Returns true if the request succeeds; otherwise, it returns an error.

$sel:httpStatus:AttachClassicLinkVpcResponse', attachClassicLinkVpcResponse_httpStatus - The response's http status code.

Response Lenses

attachClassicLinkVpcResponse_return :: Lens' AttachClassicLinkVpcResponse (Maybe Bool) Source #

Returns true if the request succeeds; otherwise, it returns an error.