code: public ContainerInstance withRegisteredResources(Resource... registeredResources) {
          if (this.registeredResources == null) {
              setRegisteredResources(new com.amazonaws.internal.SdkInternalList<Resource>(registeredResources.length));
          }
          for (Resource ele : registeredResources) {
              this.registeredResources.add(ele);
          }
          return this;
      }
docs: <p>
  For CPU and memory resource types, this parameter describes the amount of each resource that was available on the
  container instance when the container agent registered it with Amazon ECS. This value represents the total amount
  of CPU and memory that can be allocated on this container instance to tasks. For port resource types, this
  parameter describes the ports that were reserved by the Amazon ECS container agent when it registered the
  container instance with Amazon ECS.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setRegisteredResources(java.util.Collection)} or {@link #withRegisteredResources(java.util.Collection)}
  if you want to override the existing values.
  </p>
  
  @param registeredResources
  For CPU and memory resource types, this parameter describes the amount of each resource that was available
  on the container instance when the container agent registered it with Amazon ECS. This value represents
  the total amount of CPU and memory that can be allocated on this container instance to tasks. For port
  resource types, this parameter describes the ports that were reserved by the Amazon ECS container agent
  when it registered the container instance with Amazon ECS.
  @return Returns a reference to this object so that method calls can be chained together.