TestAvailabilityConfiguration - Amazon WorkMail

TestAvailabilityConfiguration

Performs a test on an availability provider to ensure that access is allowed. For EWS, it verifies the provided credentials can be used to successfully log in. For Lambda, it verifies that the Lambda function can be invoked and that the resource access policy was configured to deny anonymous access. An anonymous invocation is one done without providing either a SourceArn or SourceAccount header.

Note

The request must contain either one provider definition (EwsProvider or LambdaProvider) or the DomainName parameter. If the DomainName parameter is provided, the configuration stored under the DomainName will be tested.

Request Syntax

{ "DomainName": "string", "EwsProvider": { "EwsEndpoint": "string", "EwsPassword": "string", "EwsUsername": "string" }, "LambdaProvider": { "LambdaArn": "string" }, "OrganizationId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

DomainName

The domain to which the provider applies. If this field is provided, a stored availability provider associated to this domain name will be tested.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 255.

Pattern: [a-zA-Z0-9.-]+

Required: No

EwsProvider

Describes an EWS based availability provider. This is only used as input to the service.

Type: EwsAvailabilityProvider object

Required: No

LambdaProvider

Describes a Lambda based availability provider.

Type: LambdaAvailabilityProvider object

Required: No

OrganizationId

The WorkMail organization where the availability provider will be tested.

Type: String

Length Constraints: Fixed length of 34.

Pattern: ^m-[0-9a-f]{32}$

Required: Yes

Response Syntax

{ "FailureReason": "string", "TestPassed": boolean }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

FailureReason

String containing the reason for a failed test if TestPassed is false.

Type: String

Length Constraints: Maximum length of 256.

TestPassed

Boolean indicating whether the test passed or failed.

Type: Boolean

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidParameterException

One or more of the input parameters don't match the service's restrictions.

HTTP Status Code: 400

OrganizationNotFoundException

An operation received a valid organization identifier that either doesn't belong or exist in the system.

HTTP Status Code: 400

OrganizationStateException

The organization must have a valid state to perform certain operations on the organization or its members.

HTTP Status Code: 400

ResourceNotFoundException

The resource cannot be found.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: