Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data AttachClassicLinkVpc = AttachClassicLinkVpc' {}
- newAttachClassicLinkVpc :: Text -> Text -> AttachClassicLinkVpc
- attachClassicLinkVpc_dryRun :: Lens' AttachClassicLinkVpc (Maybe Bool)
- attachClassicLinkVpc_groups :: Lens' AttachClassicLinkVpc [Text]
- attachClassicLinkVpc_instanceId :: Lens' AttachClassicLinkVpc Text
- attachClassicLinkVpc_vpcId :: Lens' AttachClassicLinkVpc Text
- data AttachClassicLinkVpcResponse = AttachClassicLinkVpcResponse' {
- return' :: Maybe Bool
- httpStatus :: Int
- newAttachClassicLinkVpcResponse :: Int -> AttachClassicLinkVpcResponse
- attachClassicLinkVpcResponse_return :: Lens' AttachClassicLinkVpcResponse (Maybe Bool)
- attachClassicLinkVpcResponse_httpStatus :: Lens' AttachClassicLinkVpcResponse Int
Creating a Request
data AttachClassicLinkVpc Source #
See: newAttachClassicLinkVpc
smart constructor.
AttachClassicLinkVpc' | |
|
Instances
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.
AttachClassicLinkVpcResponse' | |
|
Instances
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.
attachClassicLinkVpcResponse_httpStatus :: Lens' AttachClassicLinkVpcResponse Int Source #
The response's http status code.