@SdkInternalApi
    final DBInstance executeStopDBInstance(StopDBInstanceRequest stopDBInstanceRequest) {

        ExecutionContext executionContext = createExecutionContext(stopDBInstanceRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<StopDBInstanceRequest> request = null;
        Response<DBInstance> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new StopDBInstanceRequestMarshaller().marshall(super.beforeMarshalling(stopDBInstanceRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "RDS");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopDBInstance");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            StaxResponseHandler<DBInstance> responseHandler = new StaxResponseHandler<DBInstance>(new DBInstanceStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Stops an Amazon RDS DB instance. When you stop a DB instance, Amazon RDS retains the DB instance's metadata,
including its endpoint, DB parameter group, and option group membership. Amazon RDS also retains the transaction
logs so you can do a point-in-time restore if necessary.
</p>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html"> Stopping an Amazon RDS DB
Instance Temporarily</a> in the <i>Amazon RDS User Guide.</i>
</p>
<note>
<p>
This command doesn't apply to RDS Custom, Aurora MySQL, and Aurora PostgreSQL. For Aurora clusters, use
<code>StopDBCluster</code> instead.
</p>
</note>

@param stopDBInstanceRequest
@return Result of the StopDBInstance operation returned by the service.
@throws DBInstanceNotFoundException
        <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.
@throws InvalidDBInstanceStateException
        The DB instance isn't in a valid state.
@throws DBSnapshotAlreadyExistsException
        <code>DBSnapshotIdentifier</code> is already used by an existing snapshot.
@throws SnapshotQuotaExceededException
        The request would result in the user exceeding the allowed number of DB snapshots.
@throws InvalidDBClusterStateException
        The requested operation can't be performed while the cluster is in this state.
@sample AmazonRDS.StopDBInstance
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance" target="_top">AWS API
     Documentation</a>
aws-java-sdk-rds/src/main/java/com/amazonaws/services/rds/AmazonRDSClient.java