- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
StopServerCommand
Changes the state of a file transfer protocol-enabled server from ONLINE
to OFFLINE
. An OFFLINE
server cannot accept and process file transfer jobs. Information tied to your server, such as server and user properties, are not affected by stopping your server.
Stopping the server does not reduce or impact your file transfer protocol endpoint billing; you must delete the server to stop being billed.
The state of STOPPING
indicates that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of STOP_FAILED
can indicate an error condition.
No response is returned from this call.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { TransferClient, StopServerCommand } from "@aws-sdk/client-transfer"; // ES Modules import
// const { TransferClient, StopServerCommand } = require("@aws-sdk/client-transfer"); // CommonJS import
const client = new TransferClient(config);
const input = { // StopServerRequest
ServerId: "STRING_VALUE", // required
};
const command = new StopServerCommand(input);
const response = await client.send(command);
// {};
StopServerCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ServerId Required | string | undefined | A system-assigned unique identifier for a server that you stopped. |
StopServerCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServiceError | server | This exception is thrown when an error occurs in the Transfer Family service. |
InvalidRequestException | client | This exception is thrown when the client submits a malformed request. |
ResourceNotFoundException | client | This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service. |
ServiceUnavailableException | server | The request has failed because the Amazon Web ServicesTransfer Family service is not available. |
ThrottlingException | client | The request was denied due to request throttling. |
TransferServiceException | Base exception class for all service exceptions from Transfer service. |