Class 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 Detail

      • VpcConfig

        public VpcConfig()
    • 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) or withSubnetIds(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) or withSecurityGroupIds(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 class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object