public void resizeInstance ( ResizeInstanceRequest request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; if ( request . getCpuCount ( ) <= 0 ) { throw new IllegalArgumentException ( "request cpuCount should be positive." ) ; } if ( request . getMemoryCapacityInGB ( ) <= 0 ) { throw new IllegalArgumentException ( "request memoryCapacityInGB should be positive." ) ; } InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . PUT , INSTANCE_PREFIX , request . getInstanceId ( ) ) ; internalRequest . addParameter ( InstanceAction . resize . name ( ) , null ) ; internalRequest . addParameter ( "clientToken" , request . getClientToken ( ) ) ; fillPayload ( internalRequest , request ) ; this . invokeHttpClient ( internalRequest , AbstractBceResponse . class ) ; }
Resizing the instance owned by the user .