public class AttachClassicLinkVpcRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<AttachClassicLinkVpcRequest>
AttachClassicLinkVpc operation
.
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.
Constructor and Description |
---|
AttachClassicLinkVpcRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Request<AttachClassicLinkVpcRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.util.List<java.lang.String> |
getGroups()
The ID of one or more of the VPC's security groups.
|
java.lang.String |
getInstanceId()
The ID of an EC2-Classic instance to link to the ClassicLink-enabled
VPC.
|
java.lang.String |
getVpcId()
The ID of a ClassicLink-enabled VPC.
|
int |
hashCode() |
void |
setGroups(java.util.Collection<java.lang.String> groups)
The ID of one or more of the VPC's security groups.
|
void |
setInstanceId(java.lang.String instanceId)
The ID of an EC2-Classic instance to link to the ClassicLink-enabled
VPC.
|
void |
setVpcId(java.lang.String vpcId)
The ID of a ClassicLink-enabled VPC.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AttachClassicLinkVpcRequest |
withGroups(java.util.Collection<java.lang.String> groups)
The ID of one or more of the VPC's security groups.
|
AttachClassicLinkVpcRequest |
withGroups(java.lang.String... groups)
The ID of one or more of the VPC's security groups.
|
AttachClassicLinkVpcRequest |
withInstanceId(java.lang.String instanceId)
The ID of an EC2-Classic instance to link to the ClassicLink-enabled
VPC.
|
AttachClassicLinkVpcRequest |
withVpcId(java.lang.String vpcId)
The ID of a ClassicLink-enabled VPC.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getInstanceId()
public void setInstanceId(java.lang.String instanceId)
instanceId
- The ID of an EC2-Classic instance to link to the ClassicLink-enabled
VPC.public AttachClassicLinkVpcRequest withInstanceId(java.lang.String instanceId)
Returns a reference to this object so that method calls can be chained together.
instanceId
- The ID of an EC2-Classic instance to link to the ClassicLink-enabled
VPC.public java.lang.String getVpcId()
public void setVpcId(java.lang.String vpcId)
vpcId
- The ID of a ClassicLink-enabled VPC.public AttachClassicLinkVpcRequest withVpcId(java.lang.String vpcId)
Returns a reference to this object so that method calls can be chained together.
vpcId
- The ID of a ClassicLink-enabled VPC.public java.util.List<java.lang.String> getGroups()
public void setGroups(java.util.Collection<java.lang.String> groups)
groups
- The ID of one or more of the VPC's security groups. You cannot specify
security groups from a different VPC.public AttachClassicLinkVpcRequest withGroups(java.lang.String... groups)
Returns a reference to this object so that method calls can be chained together.
groups
- The ID of one or more of the VPC's security groups. You cannot specify
security groups from a different VPC.public AttachClassicLinkVpcRequest withGroups(java.util.Collection<java.lang.String> groups)
Returns a reference to this object so that method calls can be chained together.
groups
- The ID of one or more of the VPC's security groups. You cannot specify
security groups from a different VPC.public Request<AttachClassicLinkVpcRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<AttachClassicLinkVpcRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.