put_server
Adds a new Replicate/Compose Server or updates the server definition (Connection Properties) if the specified server already exists. This method can be used together with AemGetServer in order to update the connection properties of an existing server.
First call AemGetServer, then edit the returned properties as required, and finally, call AemPutServer.
Required User Role: See Required Enterprise Manager permissions.
Syntax
def put_server(
self,
payload,
server
)
Parameters
Parameter | Type | Description |
---|---|---|
payload |
AemServer |
AemReplicateServer or AemComposeServer that is inherited from AemServer. |
host |
string |
The host name or IP address of the server. |
name |
string |
The name of the server. |
description |
string |
The server description. |
port |
string |
The port through which the server is accessed. |
username |
string |
The user name to connect to the Replicate/Compose Server. |
password |
string |
The password to connect to the Replicate/Compose Server.Note The password identifier (GUID) that is returned by GetServer is valid only for the session in which it was generated. Using it in another session (for example as input for PutServer) will result in exception. |
verify_server_certificate |
bool |
Set to "true" to ensure the Server certificate is trusted. As a rule, to reduce the chance of "man-in-the-middle" attacks, this option should always be set to "true".
For information on the different ways of connecting to Qlik Replicate, see Qlik Replicate Server Requirements in the Qlik Enterprise Manager Help. |
monitored |
bool |
Whether to retrieve tasks and messages from this server or not. |
server |
string |
The name of the server. |
Return values
N/A
Errors
All of the general errors as well as the errors listed in the table below.
Error | Message | Description |
---|---|---|
DESERIALIZE_TO_TYPE |
"Failed to deserialize json to type AemServer: {message}" |
Returned when the JSON format is invalid format. For example, such an error will be returned if the JSON contains an unknown role. |
AEM_PUT_SERVER_INNER_ERR |
Failed to put server "{server}". Error: "{message}". |
Returned if Qlik Enterprise Manager encounters an error/exception when trying to PUT the server. |
AEM_INVALID_SERVER_TYPE |
Server type {ServerType} for server "{ServerName}" is not valid. |
Returned when the an invalid server type is specified. |
AEM_NAME_URL_MISMATCH |
The name of the server in the request does not match the one that is specified in the URL. |
Returned when the name of the server in the request does not match the one that is specified in the URL. |
AEM_EMPTY_HOST |
The host is missing from the request. |
Returned when the host is missing from the request. |
AEM_EMPTY_PORT |
The port is missing from the request. |
Returned when the port is missing from the request. |
The username is missing from the request. |
Returned when the user name is missing from the request. |
|
AEM_EMPTY_PASSWORD |
The password is missing from the request. |
Returned when the password is missing from the request. |
AEM_INVALID_PORT |
The port is invalid. |
Returned when the specified port is not valid. |
The user name is invalid. User names cannot exceed 104 characters and can contain all Unicode characters except for the following characters: Forward slash (/), Left square bracket ([), Right square bracket (]), Colon (:), Semicolon (;), Vertical bar (|), Equal sign (=), Plus sign (+), Asterisk (*), Question mark (?), Left angle bracket (<), Right angle bracket (>), Double quote (\"). |
Returned when the specified user name is not valid. |
|
The description is invalid. Descriptions cannot exceed 250 characters. |
Returned when the description exceeds 250 characters. |
|
The host is invalid. Hosts cannot exceed 64 characters and can only contain letters (a-z or A-Z), digits, spaces, dots (.), dashes (-), and underscores (_). |
Returned when the server host name exceeds 64 characters or contains invalid characters. |
|
The name of the server is invalid. Server names cannot exceed 64 characters and can only contain letters (a-z or A-Z), digits, spaces, dots (.), dashes (-), and underscores (_). |
Returned when the server name exceeds 64 characters or contains invalid characters. |
|
AEM_HOST_PORT_ALREADY_EXIST |
Host {name/IP} and port {number} are already in use by another server. |
Returned when both the server host name/IP address and the server port are already in use by another server. |