Amazon WorkMail

2022/06/30 - Amazon WorkMail - 5 new api methods

Changes  This release adds support for managing user availability configurations in Amazon WorkMail.

ListAvailabilityConfigurations (new) Link ¶

List all the AvailabilityConfiguration 's for the given WorkMail organization.

See also: AWS API Documentation

Request Syntax

client.list_availability_configurations(
    OrganizationId='string',
    MaxResults=123,
    NextToken='string'
)
type OrganizationId

string

param OrganizationId

[REQUIRED]

The Amazon WorkMail organization for which the AvailabilityConfiguration 's will be listed.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call.

type NextToken

string

param NextToken

The token to use to retrieve the next page of results. The first call does not require a token.

rtype

dict

returns

Response Syntax

{
    'AvailabilityConfigurations': [
        {
            'DomainName': 'string',
            'ProviderType': 'EWS'|'LAMBDA',
            'EwsProvider': {
                'EwsEndpoint': 'string',
                'EwsUsername': 'string'
            },
            'LambdaProvider': {
                'LambdaArn': 'string'
            },
            'DateCreated': datetime(2015, 1, 1),
            'DateModified': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AvailabilityConfigurations (list) --

      The list of AvailabilityConfiguration 's that exist for the specified Amazon WorkMail organization.

      • (dict) --

        List all the AvailabilityConfiguration 's for the given WorkMail organization.

        • DomainName (string) --

          Displays the domain to which the provider applies.

        • ProviderType (string) --

          Displays the provider type that applies to this domain.

        • EwsProvider (dict) --

          If ProviderType is EWS , then this field contains RedactedEwsAvailabilityProvider . Otherwise, it is not requried.

          • EwsEndpoint (string) --

            The endpoint of the remote EWS server.

          • EwsUsername (string) --

            The username used to authenticate the remote EWS server.

        • LambdaProvider (dict) --

          If ProviderType is LAMBDA then this field contains LambdaAvailabilityProvider . Otherwise, it is not required.

          • LambdaArn (string) --

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

        • DateCreated (datetime) --

          The date and time at which the availability configuration was created.

        • DateModified (datetime) --

          The date and time at which the availability configuration was last modified.

    • NextToken (string) --

      The token to use to retrieve the next page of results. The value is null when there are no further results to return.

TestAvailabilityConfiguration (new) Link ¶

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

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

string

param OrganizationId

[REQUIRED]

The Amazon WorkMail organization where the availability provider will be tested.

type DomainName

string

param 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 EwsProvider

dict

param EwsProvider

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.

type LambdaProvider

dict

param LambdaProvider

Describes a Lambda based availability provider.

  • LambdaArn (string) -- [REQUIRED]

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

rtype

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.

UpdateAvailabilityConfiguration (new) Link ¶

Updates an existing AvailabilityConfiguration for the given WorkMail organization and domain.

See also: AWS API Documentation

Request Syntax

client.update_availability_configuration(
    OrganizationId='string',
    DomainName='string',
    EwsProvider={
        'EwsEndpoint': 'string',
        'EwsUsername': 'string',
        'EwsPassword': 'string'
    },
    LambdaProvider={
        'LambdaArn': 'string'
    }
)
type OrganizationId

string

param OrganizationId

[REQUIRED]

The Amazon WorkMail organization for which the AvailabilityConfiguration will be updated.

type DomainName

string

param DomainName

[REQUIRED]

The domain to which the provider applies the availability configuration.

type EwsProvider

dict

param EwsProvider

The EWS availability provider definition. The request must contain exactly one provider definition, either EwsProvider or LambdaProvider . The previously stored provider will be overridden by the one provided.

  • 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.

type LambdaProvider

dict

param LambdaProvider

The Lambda availability provider definition. The request must contain exactly one provider definition, either EwsProvider or LambdaProvider . The previously stored provider will be overridden by the one provided.

  • LambdaArn (string) -- [REQUIRED]

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

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteAvailabilityConfiguration (new) Link ¶

Deletes the AvailabilityConfiguration for the given WorkMail organization and domain.

See also: AWS API Documentation

Request Syntax

client.delete_availability_configuration(
    OrganizationId='string',
    DomainName='string'
)
type OrganizationId

string

param OrganizationId

[REQUIRED]

The Amazon WorkMail organization for which the AvailabilityConfiguration will be deleted.

type DomainName

string

param DomainName

[REQUIRED]

The domain for which the AvailabilityConfiguration will be deleted.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateAvailabilityConfiguration (new) Link ¶

Creates an AvailabilityConfiguration for the given WorkMail organization and domain.

See also: AWS API Documentation

Request Syntax

client.create_availability_configuration(
    ClientToken='string',
    OrganizationId='string',
    DomainName='string',
    EwsProvider={
        'EwsEndpoint': 'string',
        'EwsUsername': 'string',
        'EwsPassword': 'string'
    },
    LambdaProvider={
        'LambdaArn': 'string'
    }
)
type ClientToken

string

param ClientToken

An idempotent token that ensures that an API request is executed only once.

This field is autopopulated if not provided.

type OrganizationId

string

param OrganizationId

[REQUIRED]

The Amazon WorkMail organization for which the AvailabilityConfiguration will be created.

type DomainName

string

param DomainName

[REQUIRED]

The domain to which the provider applies.

type EwsProvider

dict

param EwsProvider

Exchange Web Services (EWS) availability provider definition. The request must contain exactly one provider definition, either EwsProvider or LambdaProvider .

  • 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.

type LambdaProvider

dict

param LambdaProvider

Lambda availability provider definition. The request must contain exactly one provider definition, either EwsProvider or LambdaProvider .

  • LambdaArn (string) -- [REQUIRED]

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

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --