@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AwsVpcConfiguration extends Object implements Serializable, Cloneable, StructuredPojo
This structure specifies the VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.
Constructor and Description |
---|
AwsVpcConfiguration() |
Modifier and Type | Method and Description |
---|---|
AwsVpcConfiguration |
clone() |
boolean |
equals(Object obj) |
String |
getAssignPublicIp()
Specifies whether the task's elastic network interface receives a public IP address.
|
List<String> |
getSecurityGroups()
Specifies the security groups associated with the task.
|
List<String> |
getSubnets()
Specifies the subnets associated with the task.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAssignPublicIp(String assignPublicIp)
Specifies whether the task's elastic network interface receives a public IP address.
|
void |
setSecurityGroups(Collection<String> securityGroups)
Specifies the security groups associated with the task.
|
void |
setSubnets(Collection<String> subnets)
Specifies the subnets associated with the task.
|
String |
toString()
Returns a string representation of this object.
|
AwsVpcConfiguration |
withAssignPublicIp(AssignPublicIp assignPublicIp)
Specifies whether the task's elastic network interface receives a public IP address.
|
AwsVpcConfiguration |
withAssignPublicIp(String assignPublicIp)
Specifies whether the task's elastic network interface receives a public IP address.
|
AwsVpcConfiguration |
withSecurityGroups(Collection<String> securityGroups)
Specifies the security groups associated with the task.
|
AwsVpcConfiguration |
withSecurityGroups(String... securityGroups)
Specifies the security groups associated with the task.
|
AwsVpcConfiguration |
withSubnets(Collection<String> subnets)
Specifies the subnets associated with the task.
|
AwsVpcConfiguration |
withSubnets(String... subnets)
Specifies the subnets associated with the task.
|
public void setAssignPublicIp(String assignPublicIp)
Specifies whether the task's elastic network interface receives a public IP address. You can specify
ENABLED
only when LaunchType
in EcsParameters
is set to
FARGATE
.
assignPublicIp
- Specifies whether the task's elastic network interface receives a public IP address. You can specify
ENABLED
only when LaunchType
in EcsParameters
is set to
FARGATE
.AssignPublicIp
public String getAssignPublicIp()
Specifies whether the task's elastic network interface receives a public IP address. You can specify
ENABLED
only when LaunchType
in EcsParameters
is set to
FARGATE
.
ENABLED
only when LaunchType
in EcsParameters
is set to
FARGATE
.AssignPublicIp
public AwsVpcConfiguration withAssignPublicIp(String assignPublicIp)
Specifies whether the task's elastic network interface receives a public IP address. You can specify
ENABLED
only when LaunchType
in EcsParameters
is set to
FARGATE
.
assignPublicIp
- Specifies whether the task's elastic network interface receives a public IP address. You can specify
ENABLED
only when LaunchType
in EcsParameters
is set to
FARGATE
.AssignPublicIp
public AwsVpcConfiguration withAssignPublicIp(AssignPublicIp assignPublicIp)
Specifies whether the task's elastic network interface receives a public IP address. You can specify
ENABLED
only when LaunchType
in EcsParameters
is set to
FARGATE
.
assignPublicIp
- Specifies whether the task's elastic network interface receives a public IP address. You can specify
ENABLED
only when LaunchType
in EcsParameters
is set to
FARGATE
.AssignPublicIp
public List<String> getSecurityGroups()
Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
public void setSecurityGroups(Collection<String> securityGroups)
Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
securityGroups
- Specifies the security groups associated with the task. These security groups must all be in the same VPC.
You can specify as many as five security groups. If you do not specify a security group, the default
security group for the VPC is used.public AwsVpcConfiguration withSecurityGroups(String... securityGroups)
Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
NOTE: This method appends the values to the existing list (if any). Use
setSecurityGroups(java.util.Collection)
or withSecurityGroups(java.util.Collection)
if you want
to override the existing values.
securityGroups
- Specifies the security groups associated with the task. These security groups must all be in the same VPC.
You can specify as many as five security groups. If you do not specify a security group, the default
security group for the VPC is used.public AwsVpcConfiguration withSecurityGroups(Collection<String> securityGroups)
Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.
securityGroups
- Specifies the security groups associated with the task. These security groups must all be in the same VPC.
You can specify as many as five security groups. If you do not specify a security group, the default
security group for the VPC is used.public List<String> getSubnets()
Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
public void setSubnets(Collection<String> subnets)
Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
subnets
- Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify
as many as 16 subnets.public AwsVpcConfiguration withSubnets(String... subnets)
Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
NOTE: This method appends the values to the existing list (if any). Use
setSubnets(java.util.Collection)
or withSubnets(java.util.Collection)
if you want to override
the existing values.
subnets
- Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify
as many as 16 subnets.public AwsVpcConfiguration withSubnets(Collection<String> subnets)
Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.
subnets
- Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify
as many as 16 subnets.public String toString()
toString
in class Object
Object.toString()
public AwsVpcConfiguration clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.