Skip to content

Commit

Permalink
feat(client-workmail): This release adds support for managing user av…
Browse files Browse the repository at this point in the history
…ailability configurations in Amazon WorkMail.
  • Loading branch information
awstools committed Jun 30, 2022
1 parent 5d6f4e6 commit 3e7e5cb
Show file tree
Hide file tree
Showing 13 changed files with 2,225 additions and 12 deletions.
193 changes: 193 additions & 0 deletions clients/client-workmail/src/WorkMail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ import {
CancelMailboxExportJobCommandOutput,
} from "./commands/CancelMailboxExportJobCommand";
import { CreateAliasCommand, CreateAliasCommandInput, CreateAliasCommandOutput } from "./commands/CreateAliasCommand";
import {
CreateAvailabilityConfigurationCommand,
CreateAvailabilityConfigurationCommandInput,
CreateAvailabilityConfigurationCommandOutput,
} from "./commands/CreateAvailabilityConfigurationCommand";
import { CreateGroupCommand, CreateGroupCommandInput, CreateGroupCommandOutput } from "./commands/CreateGroupCommand";
import {
CreateMobileDeviceAccessRuleCommand,
Expand All @@ -40,6 +45,11 @@ import {
DeleteAccessControlRuleCommandOutput,
} from "./commands/DeleteAccessControlRuleCommand";
import { DeleteAliasCommand, DeleteAliasCommandInput, DeleteAliasCommandOutput } from "./commands/DeleteAliasCommand";
import {
DeleteAvailabilityConfigurationCommand,
DeleteAvailabilityConfigurationCommandInput,
DeleteAvailabilityConfigurationCommandOutput,
} from "./commands/DeleteAvailabilityConfigurationCommand";
import {
DeleteEmailMonitoringConfigurationCommand,
DeleteEmailMonitoringConfigurationCommandInput,
Expand Down Expand Up @@ -168,6 +178,11 @@ import {
ListAccessControlRulesCommandOutput,
} from "./commands/ListAccessControlRulesCommand";
import { ListAliasesCommand, ListAliasesCommandInput, ListAliasesCommandOutput } from "./commands/ListAliasesCommand";
import {
ListAvailabilityConfigurationsCommand,
ListAvailabilityConfigurationsCommandInput,
ListAvailabilityConfigurationsCommandOutput,
} from "./commands/ListAvailabilityConfigurationsCommand";
import {
ListGroupMembersCommand,
ListGroupMembersCommandInput,
Expand Down Expand Up @@ -271,11 +286,21 @@ import {
StartMailboxExportJobCommandOutput,
} from "./commands/StartMailboxExportJobCommand";
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import {
TestAvailabilityConfigurationCommand,
TestAvailabilityConfigurationCommandInput,
TestAvailabilityConfigurationCommandOutput,
} from "./commands/TestAvailabilityConfigurationCommand";
import {
UntagResourceCommand,
UntagResourceCommandInput,
UntagResourceCommandOutput,
} from "./commands/UntagResourceCommand";
import {
UpdateAvailabilityConfigurationCommand,
UpdateAvailabilityConfigurationCommandInput,
UpdateAvailabilityConfigurationCommandOutput,
} from "./commands/UpdateAvailabilityConfigurationCommand";
import {
UpdateDefaultMailDomainCommand,
UpdateDefaultMailDomainCommandInput,
Expand Down Expand Up @@ -468,6 +493,38 @@ export class WorkMail extends WorkMailClient {
}
}

/**
* <p>Creates an <code>AvailabilityConfiguration</code> for the given WorkMail organization and domain.</p>
*/
public createAvailabilityConfiguration(
args: CreateAvailabilityConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateAvailabilityConfigurationCommandOutput>;
public createAvailabilityConfiguration(
args: CreateAvailabilityConfigurationCommandInput,
cb: (err: any, data?: CreateAvailabilityConfigurationCommandOutput) => void
): void;
public createAvailabilityConfiguration(
args: CreateAvailabilityConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateAvailabilityConfigurationCommandOutput) => void
): void;
public createAvailabilityConfiguration(
args: CreateAvailabilityConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateAvailabilityConfigurationCommandOutput) => void),
cb?: (err: any, data?: CreateAvailabilityConfigurationCommandOutput) => void
): Promise<CreateAvailabilityConfigurationCommandOutput> | void {
const command = new CreateAvailabilityConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Creates a group that can be used in Amazon WorkMail by calling the <a>RegisterToWorkMail</a> operation.</p>
*/
Expand Down Expand Up @@ -682,6 +739,38 @@ export class WorkMail extends WorkMailClient {
}
}

/**
* <p>Deletes the <code>AvailabilityConfiguration</code> for the given WorkMail organization and domain.</p>
*/
public deleteAvailabilityConfiguration(
args: DeleteAvailabilityConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteAvailabilityConfigurationCommandOutput>;
public deleteAvailabilityConfiguration(
args: DeleteAvailabilityConfigurationCommandInput,
cb: (err: any, data?: DeleteAvailabilityConfigurationCommandOutput) => void
): void;
public deleteAvailabilityConfiguration(
args: DeleteAvailabilityConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteAvailabilityConfigurationCommandOutput) => void
): void;
public deleteAvailabilityConfiguration(
args: DeleteAvailabilityConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteAvailabilityConfigurationCommandOutput) => void),
cb?: (err: any, data?: DeleteAvailabilityConfigurationCommandOutput) => void
): Promise<DeleteAvailabilityConfigurationCommandOutput> | void {
const command = new DeleteAvailabilityConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Deletes the email monitoring configuration for a specified organization.</p>
*/
Expand Down Expand Up @@ -1575,6 +1664,38 @@ export class WorkMail extends WorkMailClient {
}
}

/**
* <p>List all the <code>AvailabilityConfiguration</code>'s for the given WorkMail organization.</p>
*/
public listAvailabilityConfigurations(
args: ListAvailabilityConfigurationsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListAvailabilityConfigurationsCommandOutput>;
public listAvailabilityConfigurations(
args: ListAvailabilityConfigurationsCommandInput,
cb: (err: any, data?: ListAvailabilityConfigurationsCommandOutput) => void
): void;
public listAvailabilityConfigurations(
args: ListAvailabilityConfigurationsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListAvailabilityConfigurationsCommandOutput) => void
): void;
public listAvailabilityConfigurations(
args: ListAvailabilityConfigurationsCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAvailabilityConfigurationsCommandOutput) => void),
cb?: (err: any, data?: ListAvailabilityConfigurationsCommandOutput) => void
): Promise<ListAvailabilityConfigurationsCommandOutput> | void {
const command = new ListAvailabilityConfigurationsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Returns an overview of the members of a group. Users and groups can be members of a
* group.</p>
Expand Down Expand Up @@ -2312,6 +2433,45 @@ export class WorkMail extends WorkMailClient {
}
}

/**
* <p>Performs a test on an availability provider to ensure that access is allowed. For EWS, it verifies the provided credentials can be used to successfully log in. For Lambda, it verifies that the Lambda function can be invoked and that the resource access
* policy was configured to deny anonymous access. An anonymous invocation is one done without providing either a <code>SourceArn</code> or <code>SourceAccount</code> header.</p>
* <note>
* <p>The request must contain either one provider definition (<code>EwsProvider</code> or
* <code>LambdaProvider</code>) or the <code>DomainName</code> parameter. If the
* <code>DomainName</code> parameter is provided, the configuration stored under the
* <code>DomainName</code> will be tested. </p>
* </note>
*/
public testAvailabilityConfiguration(
args: TestAvailabilityConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<TestAvailabilityConfigurationCommandOutput>;
public testAvailabilityConfiguration(
args: TestAvailabilityConfigurationCommandInput,
cb: (err: any, data?: TestAvailabilityConfigurationCommandOutput) => void
): void;
public testAvailabilityConfiguration(
args: TestAvailabilityConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: TestAvailabilityConfigurationCommandOutput) => void
): void;
public testAvailabilityConfiguration(
args: TestAvailabilityConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TestAvailabilityConfigurationCommandOutput) => void),
cb?: (err: any, data?: TestAvailabilityConfigurationCommandOutput) => void
): Promise<TestAvailabilityConfigurationCommandOutput> | void {
const command = new TestAvailabilityConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Untags the specified tags from the specified Amazon WorkMail organization
* resource.</p>
Expand Down Expand Up @@ -2345,6 +2505,39 @@ export class WorkMail extends WorkMailClient {
}
}

/**
* <p>Updates an existing <code>AvailabilityConfiguration</code> for the given WorkMail
* organization and domain.</p>
*/
public updateAvailabilityConfiguration(
args: UpdateAvailabilityConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateAvailabilityConfigurationCommandOutput>;
public updateAvailabilityConfiguration(
args: UpdateAvailabilityConfigurationCommandInput,
cb: (err: any, data?: UpdateAvailabilityConfigurationCommandOutput) => void
): void;
public updateAvailabilityConfiguration(
args: UpdateAvailabilityConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateAvailabilityConfigurationCommandOutput) => void
): void;
public updateAvailabilityConfiguration(
args: UpdateAvailabilityConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateAvailabilityConfigurationCommandOutput) => void),
cb?: (err: any, data?: UpdateAvailabilityConfigurationCommandOutput) => void
): Promise<UpdateAvailabilityConfigurationCommandOutput> | void {
const command = new UpdateAvailabilityConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Updates the default mail domain for an organization. The default mail domain is used by the WorkMail AWS Console to suggest an email address when enabling a mail user. You can only have one default domain.</p>
*/
Expand Down
30 changes: 30 additions & 0 deletions clients/client-workmail/src/WorkMailClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ import {
CancelMailboxExportJobCommandOutput,
} from "./commands/CancelMailboxExportJobCommand";
import { CreateAliasCommandInput, CreateAliasCommandOutput } from "./commands/CreateAliasCommand";
import {
CreateAvailabilityConfigurationCommandInput,
CreateAvailabilityConfigurationCommandOutput,
} from "./commands/CreateAvailabilityConfigurationCommand";
import { CreateGroupCommandInput, CreateGroupCommandOutput } from "./commands/CreateGroupCommand";
import {
CreateMobileDeviceAccessRuleCommandInput,
Expand All @@ -79,6 +83,10 @@ import {
DeleteAccessControlRuleCommandOutput,
} from "./commands/DeleteAccessControlRuleCommand";
import { DeleteAliasCommandInput, DeleteAliasCommandOutput } from "./commands/DeleteAliasCommand";
import {
DeleteAvailabilityConfigurationCommandInput,
DeleteAvailabilityConfigurationCommandOutput,
} from "./commands/DeleteAvailabilityConfigurationCommand";
import {
DeleteEmailMonitoringConfigurationCommandInput,
DeleteEmailMonitoringConfigurationCommandOutput,
Expand Down Expand Up @@ -161,6 +169,10 @@ import {
ListAccessControlRulesCommandOutput,
} from "./commands/ListAccessControlRulesCommand";
import { ListAliasesCommandInput, ListAliasesCommandOutput } from "./commands/ListAliasesCommand";
import {
ListAvailabilityConfigurationsCommandInput,
ListAvailabilityConfigurationsCommandOutput,
} from "./commands/ListAvailabilityConfigurationsCommand";
import { ListGroupMembersCommandInput, ListGroupMembersCommandOutput } from "./commands/ListGroupMembersCommand";
import { ListGroupsCommandInput, ListGroupsCommandOutput } from "./commands/ListGroupsCommand";
import {
Expand Down Expand Up @@ -220,7 +232,15 @@ import {
StartMailboxExportJobCommandOutput,
} from "./commands/StartMailboxExportJobCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import {
TestAvailabilityConfigurationCommandInput,
TestAvailabilityConfigurationCommandOutput,
} from "./commands/TestAvailabilityConfigurationCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import {
UpdateAvailabilityConfigurationCommandInput,
UpdateAvailabilityConfigurationCommandOutput,
} from "./commands/UpdateAvailabilityConfigurationCommand";
import {
UpdateDefaultMailDomainCommandInput,
UpdateDefaultMailDomainCommandOutput,
Expand All @@ -242,13 +262,15 @@ export type ServiceInputTypes =
| AssociateMemberToGroupCommandInput
| CancelMailboxExportJobCommandInput
| CreateAliasCommandInput
| CreateAvailabilityConfigurationCommandInput
| CreateGroupCommandInput
| CreateMobileDeviceAccessRuleCommandInput
| CreateOrganizationCommandInput
| CreateResourceCommandInput
| CreateUserCommandInput
| DeleteAccessControlRuleCommandInput
| DeleteAliasCommandInput
| DeleteAvailabilityConfigurationCommandInput
| DeleteEmailMonitoringConfigurationCommandInput
| DeleteGroupCommandInput
| DeleteMailboxPermissionsCommandInput
Expand Down Expand Up @@ -277,6 +299,7 @@ export type ServiceInputTypes =
| GetMobileDeviceAccessOverrideCommandInput
| ListAccessControlRulesCommandInput
| ListAliasesCommandInput
| ListAvailabilityConfigurationsCommandInput
| ListGroupMembersCommandInput
| ListGroupsCommandInput
| ListMailDomainsCommandInput
Expand All @@ -300,7 +323,9 @@ export type ServiceInputTypes =
| ResetPasswordCommandInput
| StartMailboxExportJobCommandInput
| TagResourceCommandInput
| TestAvailabilityConfigurationCommandInput
| UntagResourceCommandInput
| UpdateAvailabilityConfigurationCommandInput
| UpdateDefaultMailDomainCommandInput
| UpdateMailboxQuotaCommandInput
| UpdateMobileDeviceAccessRuleCommandInput
Expand All @@ -312,13 +337,15 @@ export type ServiceOutputTypes =
| AssociateMemberToGroupCommandOutput
| CancelMailboxExportJobCommandOutput
| CreateAliasCommandOutput
| CreateAvailabilityConfigurationCommandOutput
| CreateGroupCommandOutput
| CreateMobileDeviceAccessRuleCommandOutput
| CreateOrganizationCommandOutput
| CreateResourceCommandOutput
| CreateUserCommandOutput
| DeleteAccessControlRuleCommandOutput
| DeleteAliasCommandOutput
| DeleteAvailabilityConfigurationCommandOutput
| DeleteEmailMonitoringConfigurationCommandOutput
| DeleteGroupCommandOutput
| DeleteMailboxPermissionsCommandOutput
Expand Down Expand Up @@ -347,6 +374,7 @@ export type ServiceOutputTypes =
| GetMobileDeviceAccessOverrideCommandOutput
| ListAccessControlRulesCommandOutput
| ListAliasesCommandOutput
| ListAvailabilityConfigurationsCommandOutput
| ListGroupMembersCommandOutput
| ListGroupsCommandOutput
| ListMailDomainsCommandOutput
Expand All @@ -370,7 +398,9 @@ export type ServiceOutputTypes =
| ResetPasswordCommandOutput
| StartMailboxExportJobCommandOutput
| TagResourceCommandOutput
| TestAvailabilityConfigurationCommandOutput
| UntagResourceCommandOutput
| UpdateAvailabilityConfigurationCommandOutput
| UpdateDefaultMailDomainCommandOutput
| UpdateMailboxQuotaCommandOutput
| UpdateMobileDeviceAccessRuleCommandOutput
Expand Down
Loading

0 comments on commit 3e7e5cb

Please sign in to comment.