Skip to content

Commit a6042dd

Browse files
author
awstools
committed
feat(client-directory-service): This release adds support for describing and updating AWS Managed Microsoft AD set up.
1 parent 6aabe74 commit a6042dd

22 files changed

+2875
-589
lines changed

clients/client-directory-service/src/DirectoryService.ts

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ import {
146146
DescribeTrustsCommandInput,
147147
DescribeTrustsCommandOutput,
148148
} from "./commands/DescribeTrustsCommand";
149+
import {
150+
DescribeUpdateDirectoryCommand,
151+
DescribeUpdateDirectoryCommandInput,
152+
DescribeUpdateDirectoryCommandOutput,
153+
} from "./commands/DescribeUpdateDirectoryCommand";
149154
import {
150155
DisableClientAuthenticationCommand,
151156
DisableClientAuthenticationCommandInput,
@@ -269,6 +274,11 @@ import {
269274
UpdateConditionalForwarderCommandInput,
270275
UpdateConditionalForwarderCommandOutput,
271276
} from "./commands/UpdateConditionalForwarderCommand";
277+
import {
278+
UpdateDirectorySetupCommand,
279+
UpdateDirectorySetupCommandInput,
280+
UpdateDirectorySetupCommandOutput,
281+
} from "./commands/UpdateDirectorySetupCommand";
272282
import {
273283
UpdateNumberOfDomainControllersCommand,
274284
UpdateNumberOfDomainControllersCommandInput,
@@ -1404,6 +1414,40 @@ export class DirectoryService extends DirectoryServiceClient {
14041414
}
14051415
}
14061416

1417+
/**
1418+
* <p>
1419+
* Describes the updates of a directory for a particular update type.
1420+
* </p>
1421+
*/
1422+
public describeUpdateDirectory(
1423+
args: DescribeUpdateDirectoryCommandInput,
1424+
options?: __HttpHandlerOptions
1425+
): Promise<DescribeUpdateDirectoryCommandOutput>;
1426+
public describeUpdateDirectory(
1427+
args: DescribeUpdateDirectoryCommandInput,
1428+
cb: (err: any, data?: DescribeUpdateDirectoryCommandOutput) => void
1429+
): void;
1430+
public describeUpdateDirectory(
1431+
args: DescribeUpdateDirectoryCommandInput,
1432+
options: __HttpHandlerOptions,
1433+
cb: (err: any, data?: DescribeUpdateDirectoryCommandOutput) => void
1434+
): void;
1435+
public describeUpdateDirectory(
1436+
args: DescribeUpdateDirectoryCommandInput,
1437+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeUpdateDirectoryCommandOutput) => void),
1438+
cb?: (err: any, data?: DescribeUpdateDirectoryCommandOutput) => void
1439+
): Promise<DescribeUpdateDirectoryCommandOutput> | void {
1440+
const command = new DescribeUpdateDirectoryCommand(args);
1441+
if (typeof optionsOrCb === "function") {
1442+
this.send(command, optionsOrCb);
1443+
} else if (typeof cb === "function") {
1444+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1445+
this.send(command, optionsOrCb || {}, cb);
1446+
} else {
1447+
return this.send(command, optionsOrCb);
1448+
}
1449+
}
1450+
14071451
/**
14081452
* <p>Disables alternative client authentication methods for the specified directory. </p>
14091453
*/
@@ -2283,6 +2327,40 @@ export class DirectoryService extends DirectoryServiceClient {
22832327
}
22842328
}
22852329

2330+
/**
2331+
* <p>
2332+
* Updates the directory for a particular update type.
2333+
* </p>
2334+
*/
2335+
public updateDirectorySetup(
2336+
args: UpdateDirectorySetupCommandInput,
2337+
options?: __HttpHandlerOptions
2338+
): Promise<UpdateDirectorySetupCommandOutput>;
2339+
public updateDirectorySetup(
2340+
args: UpdateDirectorySetupCommandInput,
2341+
cb: (err: any, data?: UpdateDirectorySetupCommandOutput) => void
2342+
): void;
2343+
public updateDirectorySetup(
2344+
args: UpdateDirectorySetupCommandInput,
2345+
options: __HttpHandlerOptions,
2346+
cb: (err: any, data?: UpdateDirectorySetupCommandOutput) => void
2347+
): void;
2348+
public updateDirectorySetup(
2349+
args: UpdateDirectorySetupCommandInput,
2350+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateDirectorySetupCommandOutput) => void),
2351+
cb?: (err: any, data?: UpdateDirectorySetupCommandOutput) => void
2352+
): Promise<UpdateDirectorySetupCommandOutput> | void {
2353+
const command = new UpdateDirectorySetupCommand(args);
2354+
if (typeof optionsOrCb === "function") {
2355+
this.send(command, optionsOrCb);
2356+
} else if (typeof cb === "function") {
2357+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2358+
this.send(command, optionsOrCb || {}, cb);
2359+
} else {
2360+
return this.send(command, optionsOrCb);
2361+
}
2362+
}
2363+
22862364
/**
22872365
* <p>Adds or removes domain controllers to or from the directory. Based on the difference
22882366
* between current value and new value (provided through this API call), domain controllers will

clients/client-directory-service/src/DirectoryServiceClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ import {
134134
} from "./commands/DescribeSharedDirectoriesCommand";
135135
import { DescribeSnapshotsCommandInput, DescribeSnapshotsCommandOutput } from "./commands/DescribeSnapshotsCommand";
136136
import { DescribeTrustsCommandInput, DescribeTrustsCommandOutput } from "./commands/DescribeTrustsCommand";
137+
import {
138+
DescribeUpdateDirectoryCommandInput,
139+
DescribeUpdateDirectoryCommandOutput,
140+
} from "./commands/DescribeUpdateDirectoryCommand";
137141
import {
138142
DisableClientAuthenticationCommandInput,
139143
DisableClientAuthenticationCommandOutput,
@@ -194,6 +198,10 @@ import {
194198
UpdateConditionalForwarderCommandInput,
195199
UpdateConditionalForwarderCommandOutput,
196200
} from "./commands/UpdateConditionalForwarderCommand";
201+
import {
202+
UpdateDirectorySetupCommandInput,
203+
UpdateDirectorySetupCommandOutput,
204+
} from "./commands/UpdateDirectorySetupCommand";
197205
import {
198206
UpdateNumberOfDomainControllersCommandInput,
199207
UpdateNumberOfDomainControllersCommandOutput,
@@ -238,6 +246,7 @@ export type ServiceInputTypes =
238246
| DescribeSharedDirectoriesCommandInput
239247
| DescribeSnapshotsCommandInput
240248
| DescribeTrustsCommandInput
249+
| DescribeUpdateDirectoryCommandInput
241250
| DisableClientAuthenticationCommandInput
242251
| DisableLDAPSCommandInput
243252
| DisableRadiusCommandInput
@@ -265,6 +274,7 @@ export type ServiceInputTypes =
265274
| StartSchemaExtensionCommandInput
266275
| UnshareDirectoryCommandInput
267276
| UpdateConditionalForwarderCommandInput
277+
| UpdateDirectorySetupCommandInput
268278
| UpdateNumberOfDomainControllersCommandInput
269279
| UpdateRadiusCommandInput
270280
| UpdateSettingsCommandInput
@@ -305,6 +315,7 @@ export type ServiceOutputTypes =
305315
| DescribeSharedDirectoriesCommandOutput
306316
| DescribeSnapshotsCommandOutput
307317
| DescribeTrustsCommandOutput
318+
| DescribeUpdateDirectoryCommandOutput
308319
| DisableClientAuthenticationCommandOutput
309320
| DisableLDAPSCommandOutput
310321
| DisableRadiusCommandOutput
@@ -332,6 +343,7 @@ export type ServiceOutputTypes =
332343
| StartSchemaExtensionCommandOutput
333344
| UnshareDirectoryCommandOutput
334345
| UpdateConditionalForwarderCommandOutput
346+
| UpdateDirectorySetupCommandOutput
335347
| UpdateNumberOfDomainControllersCommandOutput
336348
| UpdateRadiusCommandOutput
337349
| UpdateSettingsCommandOutput
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { DirectoryServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DirectoryServiceClient";
16+
import {
17+
DescribeUpdateDirectoryRequest,
18+
DescribeUpdateDirectoryRequestFilterSensitiveLog,
19+
DescribeUpdateDirectoryResult,
20+
DescribeUpdateDirectoryResultFilterSensitiveLog,
21+
} from "../models/models_0";
22+
import {
23+
deserializeAws_json1_1DescribeUpdateDirectoryCommand,
24+
serializeAws_json1_1DescribeUpdateDirectoryCommand,
25+
} from "../protocols/Aws_json1_1";
26+
27+
export interface DescribeUpdateDirectoryCommandInput extends DescribeUpdateDirectoryRequest {}
28+
export interface DescribeUpdateDirectoryCommandOutput extends DescribeUpdateDirectoryResult, __MetadataBearer {}
29+
30+
/**
31+
* <p>
32+
* Describes the updates of a directory for a particular update type.
33+
* </p>
34+
* @example
35+
* Use a bare-bones client and the command you need to make an API call.
36+
* ```javascript
37+
* import { DirectoryServiceClient, DescribeUpdateDirectoryCommand } from "@aws-sdk/client-directory-service"; // ES Modules import
38+
* // const { DirectoryServiceClient, DescribeUpdateDirectoryCommand } = require("@aws-sdk/client-directory-service"); // CommonJS import
39+
* const client = new DirectoryServiceClient(config);
40+
* const command = new DescribeUpdateDirectoryCommand(input);
41+
* const response = await client.send(command);
42+
* ```
43+
*
44+
* @see {@link DescribeUpdateDirectoryCommandInput} for command's `input` shape.
45+
* @see {@link DescribeUpdateDirectoryCommandOutput} for command's `response` shape.
46+
* @see {@link DirectoryServiceClientResolvedConfig | config} for DirectoryServiceClient's `config` shape.
47+
*
48+
*/
49+
export class DescribeUpdateDirectoryCommand extends $Command<
50+
DescribeUpdateDirectoryCommandInput,
51+
DescribeUpdateDirectoryCommandOutput,
52+
DirectoryServiceClientResolvedConfig
53+
> {
54+
// Start section: command_properties
55+
// End section: command_properties
56+
57+
constructor(readonly input: DescribeUpdateDirectoryCommandInput) {
58+
// Start section: command_constructor
59+
super();
60+
// End section: command_constructor
61+
}
62+
63+
/**
64+
* @internal
65+
*/
66+
resolveMiddleware(
67+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
68+
configuration: DirectoryServiceClientResolvedConfig,
69+
options?: __HttpHandlerOptions
70+
): Handler<DescribeUpdateDirectoryCommandInput, DescribeUpdateDirectoryCommandOutput> {
71+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
72+
73+
const stack = clientStack.concat(this.middlewareStack);
74+
75+
const { logger } = configuration;
76+
const clientName = "DirectoryServiceClient";
77+
const commandName = "DescribeUpdateDirectoryCommand";
78+
const handlerExecutionContext: HandlerExecutionContext = {
79+
logger,
80+
clientName,
81+
commandName,
82+
inputFilterSensitiveLog: DescribeUpdateDirectoryRequestFilterSensitiveLog,
83+
outputFilterSensitiveLog: DescribeUpdateDirectoryResultFilterSensitiveLog,
84+
};
85+
const { requestHandler } = configuration;
86+
return stack.resolve(
87+
(request: FinalizeHandlerArguments<any>) =>
88+
requestHandler.handle(request.request as __HttpRequest, options || {}),
89+
handlerExecutionContext
90+
);
91+
}
92+
93+
private serialize(input: DescribeUpdateDirectoryCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
94+
return serializeAws_json1_1DescribeUpdateDirectoryCommand(input, context);
95+
}
96+
97+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DescribeUpdateDirectoryCommandOutput> {
98+
return deserializeAws_json1_1DescribeUpdateDirectoryCommand(output, context);
99+
}
100+
101+
// Start section: command_body_extra
102+
// End section: command_body_extra
103+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { DirectoryServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DirectoryServiceClient";
16+
import {
17+
UpdateDirectorySetupRequest,
18+
UpdateDirectorySetupRequestFilterSensitiveLog,
19+
UpdateDirectorySetupResult,
20+
UpdateDirectorySetupResultFilterSensitiveLog,
21+
} from "../models/models_0";
22+
import {
23+
deserializeAws_json1_1UpdateDirectorySetupCommand,
24+
serializeAws_json1_1UpdateDirectorySetupCommand,
25+
} from "../protocols/Aws_json1_1";
26+
27+
export interface UpdateDirectorySetupCommandInput extends UpdateDirectorySetupRequest {}
28+
export interface UpdateDirectorySetupCommandOutput extends UpdateDirectorySetupResult, __MetadataBearer {}
29+
30+
/**
31+
* <p>
32+
* Updates the directory for a particular update type.
33+
* </p>
34+
* @example
35+
* Use a bare-bones client and the command you need to make an API call.
36+
* ```javascript
37+
* import { DirectoryServiceClient, UpdateDirectorySetupCommand } from "@aws-sdk/client-directory-service"; // ES Modules import
38+
* // const { DirectoryServiceClient, UpdateDirectorySetupCommand } = require("@aws-sdk/client-directory-service"); // CommonJS import
39+
* const client = new DirectoryServiceClient(config);
40+
* const command = new UpdateDirectorySetupCommand(input);
41+
* const response = await client.send(command);
42+
* ```
43+
*
44+
* @see {@link UpdateDirectorySetupCommandInput} for command's `input` shape.
45+
* @see {@link UpdateDirectorySetupCommandOutput} for command's `response` shape.
46+
* @see {@link DirectoryServiceClientResolvedConfig | config} for DirectoryServiceClient's `config` shape.
47+
*
48+
*/
49+
export class UpdateDirectorySetupCommand extends $Command<
50+
UpdateDirectorySetupCommandInput,
51+
UpdateDirectorySetupCommandOutput,
52+
DirectoryServiceClientResolvedConfig
53+
> {
54+
// Start section: command_properties
55+
// End section: command_properties
56+
57+
constructor(readonly input: UpdateDirectorySetupCommandInput) {
58+
// Start section: command_constructor
59+
super();
60+
// End section: command_constructor
61+
}
62+
63+
/**
64+
* @internal
65+
*/
66+
resolveMiddleware(
67+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
68+
configuration: DirectoryServiceClientResolvedConfig,
69+
options?: __HttpHandlerOptions
70+
): Handler<UpdateDirectorySetupCommandInput, UpdateDirectorySetupCommandOutput> {
71+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
72+
73+
const stack = clientStack.concat(this.middlewareStack);
74+
75+
const { logger } = configuration;
76+
const clientName = "DirectoryServiceClient";
77+
const commandName = "UpdateDirectorySetupCommand";
78+
const handlerExecutionContext: HandlerExecutionContext = {
79+
logger,
80+
clientName,
81+
commandName,
82+
inputFilterSensitiveLog: UpdateDirectorySetupRequestFilterSensitiveLog,
83+
outputFilterSensitiveLog: UpdateDirectorySetupResultFilterSensitiveLog,
84+
};
85+
const { requestHandler } = configuration;
86+
return stack.resolve(
87+
(request: FinalizeHandlerArguments<any>) =>
88+
requestHandler.handle(request.request as __HttpRequest, options || {}),
89+
handlerExecutionContext
90+
);
91+
}
92+
93+
private serialize(input: UpdateDirectorySetupCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
94+
return serializeAws_json1_1UpdateDirectorySetupCommand(input, context);
95+
}
96+
97+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<UpdateDirectorySetupCommandOutput> {
98+
return deserializeAws_json1_1UpdateDirectorySetupCommand(output, context);
99+
}
100+
101+
// Start section: command_body_extra
102+
// End section: command_body_extra
103+
}

clients/client-directory-service/src/commands/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export * from "./DescribeSettingsCommand";
3232
export * from "./DescribeSharedDirectoriesCommand";
3333
export * from "./DescribeSnapshotsCommand";
3434
export * from "./DescribeTrustsCommand";
35+
export * from "./DescribeUpdateDirectoryCommand";
3536
export * from "./DisableClientAuthenticationCommand";
3637
export * from "./DisableLDAPSCommand";
3738
export * from "./DisableRadiusCommand";
@@ -59,6 +60,7 @@ export * from "./ShareDirectoryCommand";
5960
export * from "./StartSchemaExtensionCommand";
6061
export * from "./UnshareDirectoryCommand";
6162
export * from "./UpdateConditionalForwarderCommand";
63+
export * from "./UpdateDirectorySetupCommand";
6264
export * from "./UpdateNumberOfDomainControllersCommand";
6365
export * from "./UpdateRadiusCommand";
6466
export * from "./UpdateSettingsCommand";

0 commit comments

Comments
 (0)