WorkMail / Client / list_resources

list_resources#

WorkMail.Client.list_resources(**kwargs)#

Returns summaries of the organization’s resources.

See also: AWS API Documentation

Request Syntax

response = client.list_resources(
    OrganizationId='string',
    NextToken='string',
    MaxResults=123,
    Filters={
        'NamePrefix': 'string',
        'PrimaryEmailPrefix': 'string',
        'State': 'ENABLED'|'DISABLED'|'DELETED'
    }
)
Parameters:
  • OrganizationId (string) –

    [REQUIRED]

    The identifier for the organization under which the resources exist.

  • NextToken (string) – The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • MaxResults (integer) – The maximum number of results to return in a single call.

  • Filters (dict) –

    Limit the resource search results based on the filter criteria. You can only use one filter per request.

    • NamePrefix (string) –

      Filters only resource that start with the entered name prefix .

    • PrimaryEmailPrefix (string) –

      Filters only resource with the provided primary email prefix.

    • State (string) –

      Filters only resource with the provided state.

Return type:

dict

Returns:

Response Syntax

{
    'Resources': [
        {
            'Id': 'string',
            'Email': 'string',
            'Name': 'string',
            'Type': 'ROOM'|'EQUIPMENT',
            'State': 'ENABLED'|'DISABLED'|'DELETED',
            'EnabledDate': datetime(2015, 1, 1),
            'DisabledDate': datetime(2015, 1, 1),
            'Description': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Resources (list) –

      One page of the organization’s resource representation.

      • (dict) –

        The representation of a resource.

        • Id (string) –

          The identifier of the resource.

        • Email (string) –

          The email of the resource.

        • Name (string) –

          The name of the resource.

        • Type (string) –

          The type of the resource: equipment or room.

        • State (string) –

          The state of the resource, which can be ENABLED, DISABLED, or DELETED.

        • EnabledDate (datetime) –

          The date indicating when the resource was enabled for WorkMail use.

        • DisabledDate (datetime) –

          The date indicating when the resource was disabled from WorkMail use.

        • Description (string) –

          Resource description.

    • NextToken (string) –

      The token used to paginate through all the organization’s resources. While results are still available, it has an associated value. When the last page is reached, the token is empty.

Exceptions

  • WorkMail.Client.exceptions.InvalidParameterException

  • WorkMail.Client.exceptions.OrganizationNotFoundException

  • WorkMail.Client.exceptions.OrganizationStateException

  • WorkMail.Client.exceptions.UnsupportedOperationException