test_availability_configuration

test_availability_configuration(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.test_availability_configuration(
    OrganizationId='string',
    DomainName='string',
    EwsProvider={
        'EwsEndpoint': 'string',
        'EwsUsername': 'string',
        'EwsPassword': 'string'
    },
    LambdaProvider={
        'LambdaArn': 'string'
    }
)
Parameters
  • OrganizationId (string) --

    [REQUIRED]

    The WorkMail organization where the availability provider will be tested.

  • DomainName (string) -- The domain to which the provider applies. If this field is provided, a stored availability provider associated to this domain name will be tested.
  • EwsProvider (dict) --

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

    • EwsEndpoint (string) -- [REQUIRED]

      The endpoint of the remote EWS server.

    • EwsUsername (string) -- [REQUIRED]

      The username used to authenticate the remote EWS server.

    • EwsPassword (string) -- [REQUIRED]

      The password used to authenticate the remote EWS server.

  • LambdaProvider (dict) --

    Describes a Lambda based availability provider.

    • LambdaArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Lambda that acts as the availability provider.

Return type

dict

Returns

Response Syntax

{
    'TestPassed': True|False,
    'FailureReason': 'string'
}

Response Structure

  • (dict) --

    • TestPassed (boolean) --

      Boolean indicating whether the test passed or failed.

    • FailureReason (string) --

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

Exceptions

  • WorkMail.Client.exceptions.OrganizationNotFoundException
  • WorkMail.Client.exceptions.OrganizationStateException
  • WorkMail.Client.exceptions.ResourceNotFoundException
  • WorkMail.Client.exceptions.InvalidParameterException