Amazon Macie 2

2021/02/12 - Amazon Macie 2 - 2 new3 updated api methods

Changes  Update macie2 client to latest version

DisassociateFromAdministratorAccount (new) Link ¶

Disassociates a member account from its Amazon Macie administrator account.

See also: AWS API Documentation

Request Syntax

client.disassociate_from_administrator_account()
rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetAdministratorAccount (new) Link ¶

Retrieves information about the Amazon Macie administrator account for an account.

See also: AWS API Documentation

Request Syntax

client.get_administrator_account()
rtype:

dict

returns:

Response Syntax

{
    'administrator': {
        'accountId': 'string',
        'invitationId': 'string',
        'invitedAt': datetime(2015, 1, 1),
        'relationshipStatus': 'Enabled'|'Paused'|'Invited'|'Created'|'Removed'|'Resigned'|'EmailVerificationInProgress'|'EmailVerificationFailed'|'RegionDisabled'|'AccountSuspended'
    }
}

Response Structure

  • (dict) --

    • administrator (dict) --

      The AWS account ID for the administrator account. If the accounts are associated by a Macie membership invitation, this object also provides details about the invitation that was sent to establish the relationship between the accounts.

      • accountId (string) --

        The AWS account ID for the account that sent the invitation.

      • invitationId (string) --

        The unique identifier for the invitation. Amazon Macie uses this identifier to validate the inviter account with the invitee account.

      • invitedAt (datetime) --

        The date and time, in UTC and extended ISO 8601 format, when the invitation was sent.

      • relationshipStatus (string) --

        The status of the relationship between the account that sent the invitation (inviter account) and the account that received the invitation (invitee account).

AcceptInvitation (updated) Link ¶
Changes (request)
{'administratorAccountId': 'string'}

Accepts an Amazon Macie membership invitation that was received from a specific account.

See also: AWS API Documentation

Request Syntax

client.accept_invitation(
    administratorAccountId='string',
    invitationId='string',
    masterAccount='string'
)
type administratorAccountId:

string

param administratorAccountId:

The AWS account ID for the account that sent the invitation.

type invitationId:

string

param invitationId:

[REQUIRED]

The unique identifier for the invitation to accept.

type masterAccount:

string

param masterAccount:

(Deprecated) The AWS account ID for the account that sent the invitation. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

    The request succeeded and there isn't any content to include in the body of the response (No Content).

GetMember (updated) Link ¶
Changes (response)
{'administratorAccountId': 'string'}

Retrieves information about an account that's associated with an Amazon Macie administrator account.

See also: AWS API Documentation

Request Syntax

client.get_member(
    id='string'
)
type id:

string

param id:

[REQUIRED]

The unique identifier for the Amazon Macie resource or account that the request applies to.

rtype:

dict

returns:

Response Syntax

{
    'accountId': 'string',
    'administratorAccountId': 'string',
    'arn': 'string',
    'email': 'string',
    'invitedAt': datetime(2015, 1, 1),
    'masterAccountId': 'string',
    'relationshipStatus': 'Enabled'|'Paused'|'Invited'|'Created'|'Removed'|'Resigned'|'EmailVerificationInProgress'|'EmailVerificationFailed'|'RegionDisabled'|'AccountSuspended',
    'tags': {
        'string': 'string'
    },
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    The request succeeded.

    • accountId (string) --

      The AWS account ID for the account.

    • administratorAccountId (string) --

      The AWS account ID for the administrator account.

    • arn (string) --

      The Amazon Resource Name (ARN) of the account.

    • email (string) --

      The email address for the account.

    • invitedAt (datetime) --

      The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if a Macie invitation hasn't been sent to the account.

    • masterAccountId (string) --

      (Deprecated) The AWS account ID for the administrator account. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.

    • relationshipStatus (string) --

      The current status of the relationship between the account and the administrator account.

    • tags (dict) --

      A map of key-value pairs that identifies the tags (keys and values) that are associated with the member account in Amazon Macie.

      • (string) --

        • (string) --

    • updatedAt (datetime) --

      The date and time, in UTC and extended ISO 8601 format, of the most recent change to the status of the relationship between the account and the administrator account.

ListMembers (updated) Link ¶
Changes (response)
{'members': {'administratorAccountId': 'string'}}

Retrieves information about the accounts that are associated with an Amazon Macie administrator account.

See also: AWS API Documentation

Request Syntax

client.list_members(
    maxResults=123,
    nextToken='string',
    onlyAssociated='string'
)
type maxResults:

integer

param maxResults:

The maximum number of items to include in each page of a paginated response.

type nextToken:

string

param nextToken:

The nextToken string that specifies which page of results to return in a paginated response.

type onlyAssociated:

string

param onlyAssociated:

Specifies which accounts to include in the response, based on the status of an account's relationship with the administrator account. By default, the response includes only current member accounts. To include all accounts, set the value for this parameter to false.

rtype:

dict

returns:

Response Syntax

{
    'members': [
        {
            'accountId': 'string',
            'administratorAccountId': 'string',
            'arn': 'string',
            'email': 'string',
            'invitedAt': datetime(2015, 1, 1),
            'masterAccountId': 'string',
            'relationshipStatus': 'Enabled'|'Paused'|'Invited'|'Created'|'Removed'|'Resigned'|'EmailVerificationInProgress'|'EmailVerificationFailed'|'RegionDisabled'|'AccountSuspended',
            'tags': {
                'string': 'string'
            },
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The request succeeded.

    • members (list) --

      An array of objects, one for each account that's associated with the administrator account and meets the criteria specified by the onlyAssociated request parameter.

      • (dict) --

        Provides information about an account that's associated with an Amazon Macie administrator account.

        • accountId (string) --

          The AWS account ID for the account.

        • administratorAccountId (string) --

          The AWS account ID for the administrator account.

        • arn (string) --

          The Amazon Resource Name (ARN) of the account.

        • email (string) --

          The email address for the account.

        • invitedAt (datetime) --

          The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if a Macie invitation hasn't been sent to the account.

        • masterAccountId (string) --

          (Deprecated) The AWS account ID for the administrator account. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.

        • relationshipStatus (string) --

          The current status of the relationship between the account and the administrator account.

        • tags (dict) --

          A map of key-value pairs that identifies the tags (keys and values) that are associated with the account in Amazon Macie.

          • (string) --

            • (string) --

        • updatedAt (datetime) --

          The date and time, in UTC and extended ISO 8601 format, of the most recent change to the status of the relationship between the account and the administrator account.

    • nextToken (string) --

      The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.