code: @Override
      public AssignInstanceResult assignInstance(AssignInstanceRequest request) {
          request = beforeClientExecution(request);
          return executeAssignInstance(request);
      }
docs: <p>
  Assign a registered instance to a layer.
  </p>
  <ul>
  <li>
  <p>
  You can assign registered on-premises instances to any layer type.
  </p>
  </li>
  <li>
  <p>
  You can assign registered Amazon EC2 instances only to custom layers.
  </p>
  </li>
  <li>
  <p>
  You cannot use this action with instances that were created with AWS OpsWorks Stacks.
  </p>
  </li>
  </ul>
  <p>
  <b>Required Permissions</b>: To use this action, an AWS Identity and Access Management (IAM) user must have a
  Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more
  information on user permissions, see <a
  href="http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html">Managing User
  Permissions</a>.
  </p>
  
  @param assignInstanceRequest
  @return Result of the AssignInstance operation returned by the service.
  @throws ValidationException
  Indicates that a request was not valid.
  @throws ResourceNotFoundException
  Indicates that a resource was not found.
  @sample AWSOpsWorks.AssignInstance
  @see <a href="http://docs.aws.amazon.com/goto/WebAPI/opsworks-2013-02-18/AssignInstance" target="_top">AWS API
  Documentation</a>