delete_organization

WorkMail.Client.delete_organization(**kwargs)

Deletes an WorkMail organization and all underlying AWS resources managed by WorkMail as part of the organization. You can choose whether to delete the associated directory. For more information, see Removing an organization in the WorkMail Administrator Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_organization(
    ClientToken='string',
    OrganizationId='string',
    DeleteDirectory=True|False
)
Parameters
  • ClientToken (string) --

    The idempotency token associated with the request.

    This field is autopopulated if not provided.

  • OrganizationId (string) --

    [REQUIRED]

    The organization ID.

  • DeleteDirectory (boolean) --

    [REQUIRED]

    If true, deletes the AWS Directory Service directory associated with the organization.

Return type

dict

Returns

Response Syntax

{
    'OrganizationId': 'string',
    'State': 'string'
}

Response Structure

  • (dict) --

    • OrganizationId (string) --

      The organization ID.

    • State (string) --

      The state of the organization.

Exceptions

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