Class VpcConfig
- java.lang.Object
-
- com.amazonaws.services.lambda.model.VpcConfig
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class VpcConfig extends Object implements Serializable, Cloneable
If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VpcConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VpcConfig
clone()
boolean
equals(Object obj)
List<String>
getSecurityGroupIds()
A list of one or more security groups IDs in your VPC.List<String>
getSubnetIds()
A list of one or more subnet IDs in your VPC.int
hashCode()
void
setSecurityGroupIds(Collection<String> securityGroupIds)
A list of one or more security groups IDs in your VPC.void
setSubnetIds(Collection<String> subnetIds)
A list of one or more subnet IDs in your VPC.String
toString()
Returns a string representation of this object; useful for testing and debugging.VpcConfig
withSecurityGroupIds(String... securityGroupIds)
A list of one or more security groups IDs in your VPC.VpcConfig
withSecurityGroupIds(Collection<String> securityGroupIds)
A list of one or more security groups IDs in your VPC.VpcConfig
withSubnetIds(String... subnetIds)
A list of one or more subnet IDs in your VPC.VpcConfig
withSubnetIds(Collection<String> subnetIds)
A list of one or more subnet IDs in your VPC.
-
-
-
Method Detail
-
getSubnetIds
public List<String> getSubnetIds()
A list of one or more subnet IDs in your VPC.
- Returns:
- A list of one or more subnet IDs in your VPC.
-
setSubnetIds
public void setSubnetIds(Collection<String> subnetIds)
A list of one or more subnet IDs in your VPC.
- Parameters:
subnetIds
- A list of one or more subnet IDs in your VPC.
-
withSubnetIds
public VpcConfig withSubnetIds(String... subnetIds)
A list of one or more subnet IDs in your VPC.
NOTE: This method appends the values to the existing list (if any). Use
setSubnetIds(java.util.Collection)
orwithSubnetIds(java.util.Collection)
if you want to override the existing values.- Parameters:
subnetIds
- A list of one or more subnet IDs in your VPC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSubnetIds
public VpcConfig withSubnetIds(Collection<String> subnetIds)
A list of one or more subnet IDs in your VPC.
- Parameters:
subnetIds
- A list of one or more subnet IDs in your VPC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getSecurityGroupIds
public List<String> getSecurityGroupIds()
A list of one or more security groups IDs in your VPC.
- Returns:
- A list of one or more security groups IDs in your VPC.
-
setSecurityGroupIds
public void setSecurityGroupIds(Collection<String> securityGroupIds)
A list of one or more security groups IDs in your VPC.
- Parameters:
securityGroupIds
- A list of one or more security groups IDs in your VPC.
-
withSecurityGroupIds
public VpcConfig withSecurityGroupIds(String... securityGroupIds)
A list of one or more security groups IDs in your VPC.
NOTE: This method appends the values to the existing list (if any). Use
setSecurityGroupIds(java.util.Collection)
orwithSecurityGroupIds(java.util.Collection)
if you want to override the existing values.- Parameters:
securityGroupIds
- A list of one or more security groups IDs in your VPC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSecurityGroupIds
public VpcConfig withSecurityGroupIds(Collection<String> securityGroupIds)
A list of one or more security groups IDs in your VPC.
- Parameters:
securityGroupIds
- A list of one or more security groups IDs in your VPC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-