All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ecs.model.ProxyConfiguration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for the Amazon EC2 Container Service holds the client classes that are used for communicating with the Amazon EC2 Container Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.ecs.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The configuration details for the App Mesh proxy. *

*

* For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent * and at least version 1.26.0-1 of the ecs-init package to enable a proxy configuration. If your container * instances are launched from the Amazon ECS-optimized AMI version 20190301 or later, then they contain * the required versions of the container agent and ecs-init. For more information, see Amazon ECS-optimized Linux * AMI *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProxyConfiguration implements Serializable, Cloneable, StructuredPojo { /** *

* The proxy type. The only supported value is APPMESH. *

*/ private String type; /** *

* The name of the container that will serve as the App Mesh proxy. *

*/ private String containerName; /** *

* The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as * key-value pairs. *

*
    *
  • *

    * IgnoredUID - (Required) The user ID (UID) of the proxy container as defined by the user * parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If * IgnoredGID is specified, this field can be empty. *

    *
  • *
  • *

    * IgnoredGID - (Required) The group ID (GID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own traffic. * If IgnoredUID is specified, this field can be empty. *

    *
  • *
  • *

    * AppPorts - (Required) The list of ports that the application uses. Network traffic to these ports is * forwarded to the ProxyIngressPort and ProxyEgressPort. *

    *
  • *
  • *

    * ProxyIngressPort - (Required) Specifies the port that incoming traffic to the AppPorts * is directed to. *

    *
  • *
  • *

    * ProxyEgressPort - (Required) Specifies the port that outgoing traffic from the AppPorts * is directed to. *

    *
  • *
  • *

    * EgressIgnoredPorts - (Required) The egress traffic going to the specified ports is ignored and not * redirected to the ProxyEgressPort. It can be an empty list. *

    *
  • *
  • *

    * EgressIgnoredIPs - (Required) The egress traffic going to the specified IP addresses is ignored and * not redirected to the ProxyEgressPort. It can be an empty list. *

    *
  • *
*/ private com.amazonaws.internal.SdkInternalList properties; /** *

* The proxy type. The only supported value is APPMESH. *

* * @param type * The proxy type. The only supported value is APPMESH. * @see ProxyConfigurationType */ public void setType(String type) { this.type = type; } /** *

* The proxy type. The only supported value is APPMESH. *

* * @return The proxy type. The only supported value is APPMESH. * @see ProxyConfigurationType */ public String getType() { return this.type; } /** *

* The proxy type. The only supported value is APPMESH. *

* * @param type * The proxy type. The only supported value is APPMESH. * @return Returns a reference to this object so that method calls can be chained together. * @see ProxyConfigurationType */ public ProxyConfiguration withType(String type) { setType(type); return this; } /** *

* The proxy type. The only supported value is APPMESH. *

* * @param type * The proxy type. The only supported value is APPMESH. * @return Returns a reference to this object so that method calls can be chained together. * @see ProxyConfigurationType */ public ProxyConfiguration withType(ProxyConfigurationType type) { this.type = type.toString(); return this; } /** *

* The name of the container that will serve as the App Mesh proxy. *

* * @param containerName * The name of the container that will serve as the App Mesh proxy. */ public void setContainerName(String containerName) { this.containerName = containerName; } /** *

* The name of the container that will serve as the App Mesh proxy. *

* * @return The name of the container that will serve as the App Mesh proxy. */ public String getContainerName() { return this.containerName; } /** *

* The name of the container that will serve as the App Mesh proxy. *

* * @param containerName * The name of the container that will serve as the App Mesh proxy. * @return Returns a reference to this object so that method calls can be chained together. */ public ProxyConfiguration withContainerName(String containerName) { setContainerName(containerName); return this; } /** *

* The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as * key-value pairs. *

*
    *
  • *

    * IgnoredUID - (Required) The user ID (UID) of the proxy container as defined by the user * parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If * IgnoredGID is specified, this field can be empty. *

    *
  • *
  • *

    * IgnoredGID - (Required) The group ID (GID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own traffic. * If IgnoredUID is specified, this field can be empty. *

    *
  • *
  • *

    * AppPorts - (Required) The list of ports that the application uses. Network traffic to these ports is * forwarded to the ProxyIngressPort and ProxyEgressPort. *

    *
  • *
  • *

    * ProxyIngressPort - (Required) Specifies the port that incoming traffic to the AppPorts * is directed to. *

    *
  • *
  • *

    * ProxyEgressPort - (Required) Specifies the port that outgoing traffic from the AppPorts * is directed to. *

    *
  • *
  • *

    * EgressIgnoredPorts - (Required) The egress traffic going to the specified ports is ignored and not * redirected to the ProxyEgressPort. It can be an empty list. *

    *
  • *
  • *

    * EgressIgnoredIPs - (Required) The egress traffic going to the specified IP addresses is ignored and * not redirected to the ProxyEgressPort. It can be an empty list. *

    *
  • *
* * @return The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, * specified as key-value pairs.

*
    *
  • *

    * IgnoredUID - (Required) The user ID (UID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own * traffic. If IgnoredGID is specified, this field can be empty. *

    *
  • *
  • *

    * IgnoredGID - (Required) The group ID (GID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own * traffic. If IgnoredUID is specified, this field can be empty. *

    *
  • *
  • *

    * AppPorts - (Required) The list of ports that the application uses. Network traffic to these * ports is forwarded to the ProxyIngressPort and ProxyEgressPort. *

    *
  • *
  • *

    * ProxyIngressPort - (Required) Specifies the port that incoming traffic to the * AppPorts is directed to. *

    *
  • *
  • *

    * ProxyEgressPort - (Required) Specifies the port that outgoing traffic from the * AppPorts is directed to. *

    *
  • *
  • *

    * EgressIgnoredPorts - (Required) The egress traffic going to the specified ports is ignored * and not redirected to the ProxyEgressPort. It can be an empty list. *

    *
  • *
  • *

    * EgressIgnoredIPs - (Required) The egress traffic going to the specified IP addresses is * ignored and not redirected to the ProxyEgressPort. It can be an empty list. *

    *
  • */ public java.util.List getProperties() { if (properties == null) { properties = new com.amazonaws.internal.SdkInternalList(); } return properties; } /** *

    * The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as * key-value pairs. *

    *
      *
    • *

      * IgnoredUID - (Required) The user ID (UID) of the proxy container as defined by the user * parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If * IgnoredGID is specified, this field can be empty. *

      *
    • *
    • *

      * IgnoredGID - (Required) The group ID (GID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own traffic. * If IgnoredUID is specified, this field can be empty. *

      *
    • *
    • *

      * AppPorts - (Required) The list of ports that the application uses. Network traffic to these ports is * forwarded to the ProxyIngressPort and ProxyEgressPort. *

      *
    • *
    • *

      * ProxyIngressPort - (Required) Specifies the port that incoming traffic to the AppPorts * is directed to. *

      *
    • *
    • *

      * ProxyEgressPort - (Required) Specifies the port that outgoing traffic from the AppPorts * is directed to. *

      *
    • *
    • *

      * EgressIgnoredPorts - (Required) The egress traffic going to the specified ports is ignored and not * redirected to the ProxyEgressPort. It can be an empty list. *

      *
    • *
    • *

      * EgressIgnoredIPs - (Required) The egress traffic going to the specified IP addresses is ignored and * not redirected to the ProxyEgressPort. It can be an empty list. *

      *
    • *
    * * @param properties * The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, * specified as key-value pairs.

    *
      *
    • *

      * IgnoredUID - (Required) The user ID (UID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own * traffic. If IgnoredGID is specified, this field can be empty. *

      *
    • *
    • *

      * IgnoredGID - (Required) The group ID (GID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own * traffic. If IgnoredUID is specified, this field can be empty. *

      *
    • *
    • *

      * AppPorts - (Required) The list of ports that the application uses. Network traffic to these * ports is forwarded to the ProxyIngressPort and ProxyEgressPort. *

      *
    • *
    • *

      * ProxyIngressPort - (Required) Specifies the port that incoming traffic to the * AppPorts is directed to. *

      *
    • *
    • *

      * ProxyEgressPort - (Required) Specifies the port that outgoing traffic from the * AppPorts is directed to. *

      *
    • *
    • *

      * EgressIgnoredPorts - (Required) The egress traffic going to the specified ports is ignored * and not redirected to the ProxyEgressPort. It can be an empty list. *

      *
    • *
    • *

      * EgressIgnoredIPs - (Required) The egress traffic going to the specified IP addresses is * ignored and not redirected to the ProxyEgressPort. It can be an empty list. *

      *
    • */ public void setProperties(java.util.Collection properties) { if (properties == null) { this.properties = null; return; } this.properties = new com.amazonaws.internal.SdkInternalList(properties); } /** *

      * The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as * key-value pairs. *

      *
        *
      • *

        * IgnoredUID - (Required) The user ID (UID) of the proxy container as defined by the user * parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If * IgnoredGID is specified, this field can be empty. *

        *
      • *
      • *

        * IgnoredGID - (Required) The group ID (GID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own traffic. * If IgnoredUID is specified, this field can be empty. *

        *
      • *
      • *

        * AppPorts - (Required) The list of ports that the application uses. Network traffic to these ports is * forwarded to the ProxyIngressPort and ProxyEgressPort. *

        *
      • *
      • *

        * ProxyIngressPort - (Required) Specifies the port that incoming traffic to the AppPorts * is directed to. *

        *
      • *
      • *

        * ProxyEgressPort - (Required) Specifies the port that outgoing traffic from the AppPorts * is directed to. *

        *
      • *
      • *

        * EgressIgnoredPorts - (Required) The egress traffic going to the specified ports is ignored and not * redirected to the ProxyEgressPort. It can be an empty list. *

        *
      • *
      • *

        * EgressIgnoredIPs - (Required) The egress traffic going to the specified IP addresses is ignored and * not redirected to the ProxyEgressPort. It can be an empty list. *

        *
      • *
      *

      * NOTE: This method appends the values to the existing list (if any). Use * {@link #setProperties(java.util.Collection)} or {@link #withProperties(java.util.Collection)} if you want to * override the existing values. *

      * * @param properties * The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, * specified as key-value pairs.

      *
        *
      • *

        * IgnoredUID - (Required) The user ID (UID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own * traffic. If IgnoredGID is specified, this field can be empty. *

        *
      • *
      • *

        * IgnoredGID - (Required) The group ID (GID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own * traffic. If IgnoredUID is specified, this field can be empty. *

        *
      • *
      • *

        * AppPorts - (Required) The list of ports that the application uses. Network traffic to these * ports is forwarded to the ProxyIngressPort and ProxyEgressPort. *

        *
      • *
      • *

        * ProxyIngressPort - (Required) Specifies the port that incoming traffic to the * AppPorts is directed to. *

        *
      • *
      • *

        * ProxyEgressPort - (Required) Specifies the port that outgoing traffic from the * AppPorts is directed to. *

        *
      • *
      • *

        * EgressIgnoredPorts - (Required) The egress traffic going to the specified ports is ignored * and not redirected to the ProxyEgressPort. It can be an empty list. *

        *
      • *
      • *

        * EgressIgnoredIPs - (Required) The egress traffic going to the specified IP addresses is * ignored and not redirected to the ProxyEgressPort. It can be an empty list. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public ProxyConfiguration withProperties(KeyValuePair... properties) { if (this.properties == null) { setProperties(new com.amazonaws.internal.SdkInternalList(properties.length)); } for (KeyValuePair ele : properties) { this.properties.add(ele); } return this; } /** *

        * The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as * key-value pairs. *

        *
          *
        • *

          * IgnoredUID - (Required) The user ID (UID) of the proxy container as defined by the user * parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If * IgnoredGID is specified, this field can be empty. *

          *
        • *
        • *

          * IgnoredGID - (Required) The group ID (GID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own traffic. * If IgnoredUID is specified, this field can be empty. *

          *
        • *
        • *

          * AppPorts - (Required) The list of ports that the application uses. Network traffic to these ports is * forwarded to the ProxyIngressPort and ProxyEgressPort. *

          *
        • *
        • *

          * ProxyIngressPort - (Required) Specifies the port that incoming traffic to the AppPorts * is directed to. *

          *
        • *
        • *

          * ProxyEgressPort - (Required) Specifies the port that outgoing traffic from the AppPorts * is directed to. *

          *
        • *
        • *

          * EgressIgnoredPorts - (Required) The egress traffic going to the specified ports is ignored and not * redirected to the ProxyEgressPort. It can be an empty list. *

          *
        • *
        • *

          * EgressIgnoredIPs - (Required) The egress traffic going to the specified IP addresses is ignored and * not redirected to the ProxyEgressPort. It can be an empty list. *

          *
        • *
        * * @param properties * The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, * specified as key-value pairs.

        *
          *
        • *

          * IgnoredUID - (Required) The user ID (UID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own * traffic. If IgnoredGID is specified, this field can be empty. *

          *
        • *
        • *

          * IgnoredGID - (Required) The group ID (GID) of the proxy container as defined by the * user parameter in a container definition. This is used to ensure the proxy ignores its own * traffic. If IgnoredUID is specified, this field can be empty. *

          *
        • *
        • *

          * AppPorts - (Required) The list of ports that the application uses. Network traffic to these * ports is forwarded to the ProxyIngressPort and ProxyEgressPort. *

          *
        • *
        • *

          * ProxyIngressPort - (Required) Specifies the port that incoming traffic to the * AppPorts is directed to. *

          *
        • *
        • *

          * ProxyEgressPort - (Required) Specifies the port that outgoing traffic from the * AppPorts is directed to. *

          *
        • *
        • *

          * EgressIgnoredPorts - (Required) The egress traffic going to the specified ports is ignored * and not redirected to the ProxyEgressPort. It can be an empty list. *

          *
        • *
        • *

          * EgressIgnoredIPs - (Required) The egress traffic going to the specified IP addresses is * ignored and not redirected to the ProxyEgressPort. It can be an empty list. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. */ public ProxyConfiguration withProperties(java.util.Collection properties) { setProperties(properties); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getContainerName() != null) sb.append("ContainerName: ").append(getContainerName()).append(","); if (getProperties() != null) sb.append("Properties: ").append(getProperties()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProxyConfiguration == false) return false; ProxyConfiguration other = (ProxyConfiguration) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getContainerName() == null ^ this.getContainerName() == null) return false; if (other.getContainerName() != null && other.getContainerName().equals(this.getContainerName()) == false) return false; if (other.getProperties() == null ^ this.getProperties() == null) return false; if (other.getProperties() != null && other.getProperties().equals(this.getProperties()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getContainerName() == null) ? 0 : getContainerName().hashCode()); hashCode = prime * hashCode + ((getProperties() == null) ? 0 : getProperties().hashCode()); return hashCode; } @Override public ProxyConfiguration clone() { try { return (ProxyConfiguration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.ecs.model.transform.ProxyConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy