The Availability State HTTP Servlet Extension may be used to obtain a coarse availability state for the Directory Server.
The servlet may be invoked with an HTTP HEAD, GET or POST request without any parameters. The HTTP status code of the response is enough for the caller to determine whether the server considers itself to be AVAILABLE, DEGRADED, or UNAVAILABLE. The status code to use for each of these states is configurable. An override status code can be configured to always be returned by the servlet, regardless of the state of the server.
The response to GET and POST requests may optionally include a body. If it should include a body, then it will be a JSON object (with a Content-Type of application/json) containing the following fields:
The optional additional-response-contents attribute can be used to add custom JSON contents to the response body.
The Availability State HTTP Servlet Extension component inherits from the HTTP Servlet Extension
The properties supported by this managed object are as follows:
Description | A description for this HTTP Servlet Extension |
Default Value | None |
Allowed Values | A string |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | The cross-origin request policy to use for the HTTP Servlet Extension. A cross-origin policy is a group of attributes defining the level of cross-origin request supported by the HTTP Servlet Extension. |
Default Value | No cross-origin policy is defined and no CORS headers are recognized or returned. |
Allowed Values | The DN of any HTTP Servlet Cross Origin Policy. |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies HTTP header fields and values added to response headers for all requests. Values specified here must specify both the header field name and the value in conformance with RFC 2616. Fields may only be specified once; multiple values for the same header should be comma-separated. See RFC 7231 for a standard set of field names. Any response headers configured for this HTTP Servlet Extension will be combined with response headers configured on the corresponding Connection Handler. In the case of duplicates, the headers configured on this HTTP Servlet Extension will be used instead of the headers configured on the Connection Handler. |
Default Value | None |
Allowed Values | Colon-separated header field name and value |
Multi-Valued | Yes |
Required | No |
Admin Action Required | HTTP Connection Handlers hosting this HTTP Servlet Extension must be disabled and then re-enabled, or the server restarted, in order for this change to take effect. |
correlation-id-response-header
Description | Specifies the name of the HTTP response header that will contain a correlation ID value. Example values are "Correlation-Id", "X-Amzn-Trace-Id", and "X-Request-Id". This property can be used to specify a custom response header name for correlation IDs. The value specified here will override the correlation-id-response-header property of the HTTP Connection Handler hosting this HTTP Servlet Extension. If the use-correlation-id-header property of the HTTP Connection Handler hosting this HTTP Servlet Extension is not enabled, then this property will be ignored. |
Default Value | The correlation-id-response-header property of the HTTP Connection Handler hosting this HTTP Servlet Extension will be used. |
Allowed Values | A string |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies the base context path that HTTP clients should use to access this servlet. The value must start with a forward slash and must represent a valid HTTP context path. |
Default Value | None |
Allowed Values | The value must start with a forward slash and must represent a valid HTTP context path. |
Multi-Valued | No |
Required | Yes |
Admin Action Required | The Availability State HTTP Servlet Extension must be disabled and re-enabled for changes to this setting to take effect. In order for this modification to take effect, the component must be restarted, either by disabling and re-enabling it, or by restarting the server |
Description | Specifies the HTTP status code that the servlet should return if the server considers itself to be available. |
Default Value | None |
Allowed Values | An integer value. Lower limit is 100. Upper limit is 599 . |
Multi-Valued | No |
Required | Yes |
Admin Action Required | None. Modification requires no further action |
Description | Specifies the HTTP status code that the servlet should return if the server considers itself to be degraded. |
Default Value | None |
Allowed Values | An integer value. Lower limit is 100. Upper limit is 599 . |
Multi-Valued | No |
Required | Yes |
Admin Action Required | None. Modification requires no further action |
Description | Specifies the HTTP status code that the servlet should return if the server considers itself to be unavailable. |
Default Value | None |
Allowed Values | An integer value. Lower limit is 100. Upper limit is 599 . |
Multi-Valued | No |
Required | Yes |
Admin Action Required | None. Modification requires no further action |
Description | Specifies a HTTP status code that the servlet should always return, regardless of the server's availability. If this value is defined, it will override the availability-based return codes. |
Default Value | None |
Allowed Values | An integer value. Lower limit is 100. Upper limit is 599 . |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Indicates whether the response should include a body that is a JSON object. If a response body should be returned, it will be a JSON object with an "availability-state" field whose value is the string "AVAILABLE", "DEGRADED", or "UNAVAILABLE". |
Default Value | true |
Allowed Values | true false |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | A JSON-formatted string containing additional fields to be returned in the response body. For example, an additional-response-contents value of '{ "key": "value" }' would add the key and value to the root of the JSON response body. |
Default Value | None |
Allowed Values | application/json |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
To list the configured HTTP Servlet Extensions:
dsconfig list-http-servlet-extensions [--property {propertyName}] ...
To view the configuration for an existing HTTP Servlet Extension:
dsconfig get-http-servlet-extension-prop --extension-name {name} [--tab-delimited] [--script-friendly] [--property {propertyName}] ...
To update the configuration for an existing HTTP Servlet Extension:
dsconfig set-http-servlet-extension-prop --extension-name {name} (--set|--add|--remove) {propertyName}:{propertyValue} [(--set|--add|--remove) {propertyName}:{propertyValue}] ...
To create a new Availability State HTTP Servlet Extension:
dsconfig create-http-servlet-extension --extension-name {name} --type availability-state --set base-context-path:{propertyValue} --set available-status-code:{propertyValue} --set degraded-status-code:{propertyValue} --set unavailable-status-code:{propertyValue} [--set {propertyName}:{propertyValue}] ...
To delete an existing HTTP Servlet Extension:
dsconfig delete-http-servlet-extension --extension-name {name}