Changes the state of a file transfer protocol-enabled server from OFFLINE to ONLINE. It has no impact on a server that is already ONLINE. An ONLINE server can accept and process file transfer jobs.
The state of STARTING indicates that the server is in an intermediate state, either not fully able to respond, or not fully online. The values of START_FAILED can indicate an error condition.
No response is returned from this call.
Parameters:
-
server_id
(ServerId)
–
A system-assigned unique identifier for a server that you start.
Raises:
Source code in docs_src/capo_transfer/_services/async_transfer.py
| async def start_server(
self,
server_id: "capo_transfer.types.server_id.ServerId",
*,
config_overrides: Optional[AsyncTransferClientConfig] = None,
) -> None:
"""<p>Changes the state of a file transfer protocol-enabled server from <code>OFFLINE</code> to <code>ONLINE</code>. It has no impact on a server that is already <code>ONLINE</code>. An <code>ONLINE</code> server can accept and process file transfer jobs.</p> <p>The state of <code>STARTING</code> indicates that the server is in an intermediate state, either not fully able to respond, or not fully online. The values of <code>START_FAILED</code> can indicate an error condition.</p> <p>No response is returned from this call.</p>
Args:
server_id: <p>A system-assigned unique identifier for a server that you start.</p>
Raises:
capo_transfer.errors.internal_service_error.InternalServiceError: <p>This exception is thrown when an error occurs in the Transfer Family service.</p>
capo_transfer.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
capo_transfer.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.</p>
capo_transfer.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed because the Amazon Web ServicesTransfer Family service is not available.</p>
capo_transfer.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_transfer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_transfer.types.start_server_request.StartServerRequest]",
) -> AsyncOperationResponse[None]:
import capo_transfer._operations.transfer_service.start_server
(
output,
http_response,
) = await capo_transfer._operations.transfer_service.start_server.async_start_server(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartServer")
)
input_: capo_transfer.types.start_server_request.StartServerRequest = {
"server_id": server_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|