Amazon WorkMail

2020/02/12 - Amazon WorkMail - 4 new api methods

Changes  This release adds support for access control rules management in Amazon WorkMail.

DeleteAccessControlRule (new) Link ¶

Deletes an access control rule for the specified WorkMail organization.

See also: AWS API Documentation

Request Syntax

client.delete_access_control_rule(
    OrganizationId='string',
    Name='string'
)
type OrganizationId

string

param OrganizationId

The identifier for the organization.

type Name

string

param Name

[REQUIRED]

The name of the access control rule.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetAccessControlEffect (new) Link ¶

Gets the effects of an organization's access control rules as they apply to a specified IPv4 address, access protocol action, or user ID.

See also: AWS API Documentation

Request Syntax

client.get_access_control_effect(
    OrganizationId='string',
    IpAddress='string',
    Action='string',
    UserId='string'
)
type OrganizationId

string

param OrganizationId

[REQUIRED]

The identifier for the organization.

type IpAddress

string

param IpAddress

[REQUIRED]

The IPv4 address.

type Action

string

param Action

[REQUIRED]

The access protocol action. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .

type UserId

string

param UserId

[REQUIRED]

The user ID.

rtype

dict

returns

Response Syntax

{
    'Effect': 'ALLOW'|'DENY',
    'MatchedRules': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • Effect (string) --

      The rule effect.

    • MatchedRules (list) --

      The rules that match the given parameters, resulting in an effect.

      • (string) --

ListAccessControlRules (new) Link ¶

Lists the access control rules for the specified organization.

See also: AWS API Documentation

Request Syntax

client.list_access_control_rules(
    OrganizationId='string'
)
type OrganizationId

string

param OrganizationId

[REQUIRED]

The identifier for the organization.

rtype

dict

returns

Response Syntax

{
    'Rules': [
        {
            'Name': 'string',
            'Effect': 'ALLOW'|'DENY',
            'Description': 'string',
            'IpRanges': [
                'string',
            ],
            'NotIpRanges': [
                'string',
            ],
            'Actions': [
                'string',
            ],
            'NotActions': [
                'string',
            ],
            'UserIds': [
                'string',
            ],
            'NotUserIds': [
                'string',
            ],
            'DateCreated': datetime(2015, 1, 1),
            'DateModified': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • Rules (list) --

      The access control rules.

      • (dict) --

        A rule that controls access to an Amazon WorkMail organization.

        • Name (string) --

          The rule name.

        • Effect (string) --

          The rule effect.

        • Description (string) --

          The rule description.

        • IpRanges (list) --

          IPv4 CIDR ranges to include in the rule.

          • (string) --

        • NotIpRanges (list) --

          IPv4 CIDR ranges to exclude from the rule.

          • (string) --

        • Actions (list) --

          Access protocol actions to include in the rule. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .

          • (string) --

        • NotActions (list) --

          Access protocol actions to exclude from the rule. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .

          • (string) --

        • UserIds (list) --

          User IDs to include in the rule.

          • (string) --

        • NotUserIds (list) --

          User IDs to exclude from the rule.

          • (string) --

        • DateCreated (datetime) --

          The date that the rule was created.

        • DateModified (datetime) --

          The date that the rule was modified.

PutAccessControlRule (new) Link ¶

Adds a new access control rule for the specified organization. The rule allows or denies access to the organization for the specified IPv4 addresses, access protocol actions, and user IDs. Adding a new rule with the same name as an existing rule replaces the older rule.

See also: AWS API Documentation

Request Syntax

client.put_access_control_rule(
    Name='string',
    Effect='ALLOW'|'DENY',
    Description='string',
    IpRanges=[
        'string',
    ],
    NotIpRanges=[
        'string',
    ],
    Actions=[
        'string',
    ],
    NotActions=[
        'string',
    ],
    UserIds=[
        'string',
    ],
    NotUserIds=[
        'string',
    ],
    OrganizationId='string'
)
type Name

string

param Name

[REQUIRED]

The rule name.

type Effect

string

param Effect

[REQUIRED]

The rule effect.

type Description

string

param Description

[REQUIRED]

The rule description.

type IpRanges

list

param IpRanges

IPv4 CIDR ranges to include in the rule.

  • (string) --

type NotIpRanges

list

param NotIpRanges

IPv4 CIDR ranges to exclude from the rule.

  • (string) --

type Actions

list

param Actions

Access protocol actions to include in the rule. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .

  • (string) --

type NotActions

list

param NotActions

Access protocol actions to exclude from the rule. Valid values include ActiveSync , AutoDiscover , EWS , IMAP , SMTP , WindowsOutlook , and WebMail .

  • (string) --

type UserIds

list

param UserIds

User IDs to include in the rule.

  • (string) --

type NotUserIds

list

param NotUserIds

User IDs to exclude from the rule.

  • (string) --

type OrganizationId

string

param OrganizationId

[REQUIRED]

The identifier of the organization.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --