DescribeEntityCommand

Returns basic details about an entity in WorkMail.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { WorkMailClient, DescribeEntityCommand } from "@aws-sdk/client-workmail"; // ES Modules import
// const { WorkMailClient, DescribeEntityCommand } = require("@aws-sdk/client-workmail"); // CommonJS import
const client = new WorkMailClient(config);
const input = { // DescribeEntityRequest
  OrganizationId: "STRING_VALUE", // required
  Email: "STRING_VALUE", // required
};
const command = new DescribeEntityCommand(input);
const response = await client.send(command);
// { // DescribeEntityResponse
//   EntityId: "STRING_VALUE",
//   Name: "STRING_VALUE",
//   Type: "GROUP" || "USER" || "RESOURCE",
// };

DescribeEntityCommand Input

See DescribeEntityCommandInput for more details

Parameter
Type
Description
Email
Required
string | undefined

The email under which the entity exists.

OrganizationId
Required
string | undefined

The identifier for the organization under which the entity exists.

DescribeEntityCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
EntityId
string | undefined

The entity ID under which the entity exists.

Name
string | undefined

Username, GroupName, or ResourceName based on entity type.

Type
EntityType | undefined

Entity type.

Throws

Name
Fault
Details
EntityNotFoundException
client

The identifier supplied for the user, group, or resource does not exist in your organization.

InvalidParameterException
client

One or more of the input parameters don't match the service's restrictions.

OrganizationNotFoundException
client

An operation received a valid organization identifier that either doesn't belong or exist in the system.

OrganizationStateException
client

The organization must have a valid state to perform certain operations on the organization or its members.

WorkMailServiceException
Base exception class for all service exceptions from WorkMail service.