Skip to content

Commit 8adfed1

Browse files
authored
feat: update clients as of 11/18/2020 (#1700)
* feat: update aws sdk v3 with latest client models * feat: update clients 11.19.20
1 parent 723ec4d commit 8adfed1

File tree

203 files changed

+63792
-31786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+63792
-31786
lines changed

clients/client-backup/Backup.ts

+82-9
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ import {
5959
DescribeCopyJobCommandInput,
6060
DescribeCopyJobCommandOutput,
6161
} from "./commands/DescribeCopyJobCommand";
62+
import {
63+
DescribeGlobalSettingsCommand,
64+
DescribeGlobalSettingsCommandInput,
65+
DescribeGlobalSettingsCommandOutput,
66+
} from "./commands/DescribeGlobalSettingsCommand";
6267
import {
6368
DescribeProtectedResourceCommand,
6469
DescribeProtectedResourceCommandInput,
@@ -221,6 +226,11 @@ import {
221226
UpdateBackupPlanCommandInput,
222227
UpdateBackupPlanCommandOutput,
223228
} from "./commands/UpdateBackupPlanCommand";
229+
import {
230+
UpdateGlobalSettingsCommand,
231+
UpdateGlobalSettingsCommandInput,
232+
UpdateGlobalSettingsCommandOutput,
233+
} from "./commands/UpdateGlobalSettingsCommand";
224234
import {
225235
UpdateRecoveryPointLifecycleCommand,
226236
UpdateRecoveryPointLifecycleCommandInput,
@@ -676,6 +686,38 @@ export class Backup extends BackupClient {
676686
}
677687
}
678688

689+
/**
690+
* <p>The current feature settings for the AWS Account.</p>
691+
*/
692+
public describeGlobalSettings(
693+
args: DescribeGlobalSettingsCommandInput,
694+
options?: __HttpHandlerOptions
695+
): Promise<DescribeGlobalSettingsCommandOutput>;
696+
public describeGlobalSettings(
697+
args: DescribeGlobalSettingsCommandInput,
698+
cb: (err: any, data?: DescribeGlobalSettingsCommandOutput) => void
699+
): void;
700+
public describeGlobalSettings(
701+
args: DescribeGlobalSettingsCommandInput,
702+
options: __HttpHandlerOptions,
703+
cb: (err: any, data?: DescribeGlobalSettingsCommandOutput) => void
704+
): void;
705+
public describeGlobalSettings(
706+
args: DescribeGlobalSettingsCommandInput,
707+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeGlobalSettingsCommandOutput) => void),
708+
cb?: (err: any, data?: DescribeGlobalSettingsCommandOutput) => void
709+
): Promise<DescribeGlobalSettingsCommandOutput> | void {
710+
const command = new DescribeGlobalSettingsCommand(args);
711+
if (typeof optionsOrCb === "function") {
712+
this.send(command, optionsOrCb);
713+
} else if (typeof cb === "function") {
714+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
715+
this.send(command, optionsOrCb || {}, cb);
716+
} else {
717+
return this.send(command, optionsOrCb);
718+
}
719+
}
720+
679721
/**
680722
* <p>Returns information about a saved resource, including the last time it was backed up,
681723
* its Amazon Resource Name (ARN), and the AWS service type of the saved resource.</p>
@@ -743,10 +785,9 @@ export class Backup extends BackupClient {
743785
}
744786

745787
/**
746-
* <p>Returns the current service opt-in settings for the Region. If the service has a value
747-
* set to <code>true</code>, AWS Backup tries to protect that service's resources in this
748-
* Region, when included in an on-demand backup or scheduled backup plan. If the value is set
749-
* to <code>false</code> for a service, AWS Backup does not try to protect that service's
788+
* <p>Returns the current service opt-in settings for the Region. If service-opt-in is enabled for a service,
789+
* AWS Backup tries to protect that service's resources in this Region, when the resource is included in an on-demand backup or scheduled backup plan.
790+
* Otherwise, AWS Backup does not try to protect that service's resources in this Region, AWS Backup does not try to protect that service's
750791
* resources in this Region.</p>
751792
*/
752793
public describeRegionSettings(
@@ -1778,6 +1819,39 @@ export class Backup extends BackupClient {
17781819
}
17791820
}
17801821

1822+
/**
1823+
* <p>Updates the current global settings for the AWS Account. Use the
1824+
* <code>DescribeGlobalSettings</code> API to determine the current settings.</p>
1825+
*/
1826+
public updateGlobalSettings(
1827+
args: UpdateGlobalSettingsCommandInput,
1828+
options?: __HttpHandlerOptions
1829+
): Promise<UpdateGlobalSettingsCommandOutput>;
1830+
public updateGlobalSettings(
1831+
args: UpdateGlobalSettingsCommandInput,
1832+
cb: (err: any, data?: UpdateGlobalSettingsCommandOutput) => void
1833+
): void;
1834+
public updateGlobalSettings(
1835+
args: UpdateGlobalSettingsCommandInput,
1836+
options: __HttpHandlerOptions,
1837+
cb: (err: any, data?: UpdateGlobalSettingsCommandOutput) => void
1838+
): void;
1839+
public updateGlobalSettings(
1840+
args: UpdateGlobalSettingsCommandInput,
1841+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateGlobalSettingsCommandOutput) => void),
1842+
cb?: (err: any, data?: UpdateGlobalSettingsCommandOutput) => void
1843+
): Promise<UpdateGlobalSettingsCommandOutput> | void {
1844+
const command = new UpdateGlobalSettingsCommand(args);
1845+
if (typeof optionsOrCb === "function") {
1846+
this.send(command, optionsOrCb);
1847+
} else if (typeof cb === "function") {
1848+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1849+
this.send(command, optionsOrCb || {}, cb);
1850+
} else {
1851+
return this.send(command, optionsOrCb);
1852+
}
1853+
}
1854+
17811855
/**
17821856
* <p>Sets the transition lifecycle of a recovery point.</p>
17831857
* <p>The lifecycle defines when a protected resource is transitioned to cold storage and when
@@ -1818,11 +1892,10 @@ export class Backup extends BackupClient {
18181892
}
18191893

18201894
/**
1821-
* <p>Updates the current service opt-in settings for the Region. If the service has a value
1822-
* set to <code>true</code>, AWS Backup tries to protect that service's resources in this
1823-
* Region, when included in an on-demand backup or scheduled backup plan. If the value is set
1824-
* to <code>false</code> for a service, AWS Backup does not try to protect that service's
1825-
* resources in this Region.</p>
1895+
* <p>Updates the current service opt-in settings for the Region. If service-opt-in is enabled for a service,
1896+
* AWS Backup tries to protect that service's resources in this Region, when the resource is included in an on-demand backup or scheduled backup plan.
1897+
* Otherwise, AWS Backup does not try to protect that service's resources in this Region. Use the <code>DescribeRegionSettings</code> API to determine the
1898+
* resource types that are supported.</p>
18261899
*/
18271900
public updateRegionSettings(
18281901
args: UpdateRegionSettingsCommandInput,

clients/client-backup/BackupClient.ts

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ import {
2828
DescribeBackupVaultCommandOutput,
2929
} from "./commands/DescribeBackupVaultCommand";
3030
import { DescribeCopyJobCommandInput, DescribeCopyJobCommandOutput } from "./commands/DescribeCopyJobCommand";
31+
import {
32+
DescribeGlobalSettingsCommandInput,
33+
DescribeGlobalSettingsCommandOutput,
34+
} from "./commands/DescribeGlobalSettingsCommand";
3135
import {
3236
DescribeProtectedResourceCommandInput,
3337
DescribeProtectedResourceCommandOutput,
@@ -116,6 +120,10 @@ import { StopBackupJobCommandInput, StopBackupJobCommandOutput } from "./command
116120
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
117121
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
118122
import { UpdateBackupPlanCommandInput, UpdateBackupPlanCommandOutput } from "./commands/UpdateBackupPlanCommand";
123+
import {
124+
UpdateGlobalSettingsCommandInput,
125+
UpdateGlobalSettingsCommandOutput,
126+
} from "./commands/UpdateGlobalSettingsCommand";
119127
import {
120128
UpdateRecoveryPointLifecycleCommandInput,
121129
UpdateRecoveryPointLifecycleCommandOutput,
@@ -186,6 +194,7 @@ export type ServiceInputTypes =
186194
| DescribeBackupJobCommandInput
187195
| DescribeBackupVaultCommandInput
188196
| DescribeCopyJobCommandInput
197+
| DescribeGlobalSettingsCommandInput
189198
| DescribeProtectedResourceCommandInput
190199
| DescribeRecoveryPointCommandInput
191200
| DescribeRegionSettingsCommandInput
@@ -220,6 +229,7 @@ export type ServiceInputTypes =
220229
| TagResourceCommandInput
221230
| UntagResourceCommandInput
222231
| UpdateBackupPlanCommandInput
232+
| UpdateGlobalSettingsCommandInput
223233
| UpdateRecoveryPointLifecycleCommandInput
224234
| UpdateRegionSettingsCommandInput;
225235

@@ -236,6 +246,7 @@ export type ServiceOutputTypes =
236246
| DescribeBackupJobCommandOutput
237247
| DescribeBackupVaultCommandOutput
238248
| DescribeCopyJobCommandOutput
249+
| DescribeGlobalSettingsCommandOutput
239250
| DescribeProtectedResourceCommandOutput
240251
| DescribeRecoveryPointCommandOutput
241252
| DescribeRegionSettingsCommandOutput
@@ -270,6 +281,7 @@ export type ServiceOutputTypes =
270281
| TagResourceCommandOutput
271282
| UntagResourceCommandOutput
272283
| UpdateBackupPlanCommandOutput
284+
| UpdateGlobalSettingsCommandOutput
273285
| UpdateRecoveryPointLifecycleCommandOutput
274286
| UpdateRegionSettingsCommandOutput;
275287

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import { BackupClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BackupClient";
2+
import { DescribeGlobalSettingsInput, DescribeGlobalSettingsOutput } from "../models/models_0";
3+
import {
4+
deserializeAws_restJson1DescribeGlobalSettingsCommand,
5+
serializeAws_restJson1DescribeGlobalSettingsCommand,
6+
} from "../protocols/Aws_restJson1";
7+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
8+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
9+
import { Command as $Command } from "@aws-sdk/smithy-client";
10+
import {
11+
FinalizeHandlerArguments,
12+
Handler,
13+
HandlerExecutionContext,
14+
MiddlewareStack,
15+
HttpHandlerOptions as __HttpHandlerOptions,
16+
MetadataBearer as __MetadataBearer,
17+
SerdeContext as __SerdeContext,
18+
} from "@aws-sdk/types";
19+
20+
export type DescribeGlobalSettingsCommandInput = DescribeGlobalSettingsInput;
21+
export type DescribeGlobalSettingsCommandOutput = DescribeGlobalSettingsOutput & __MetadataBearer;
22+
23+
export class DescribeGlobalSettingsCommand extends $Command<
24+
DescribeGlobalSettingsCommandInput,
25+
DescribeGlobalSettingsCommandOutput,
26+
BackupClientResolvedConfig
27+
> {
28+
// Start section: command_properties
29+
// End section: command_properties
30+
31+
constructor(readonly input: DescribeGlobalSettingsCommandInput) {
32+
// Start section: command_constructor
33+
super();
34+
// End section: command_constructor
35+
}
36+
37+
resolveMiddleware(
38+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
39+
configuration: BackupClientResolvedConfig,
40+
options?: __HttpHandlerOptions
41+
): Handler<DescribeGlobalSettingsCommandInput, DescribeGlobalSettingsCommandOutput> {
42+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
43+
44+
const stack = clientStack.concat(this.middlewareStack);
45+
46+
const { logger } = configuration;
47+
const clientName = "BackupClient";
48+
const commandName = "DescribeGlobalSettingsCommand";
49+
const handlerExecutionContext: HandlerExecutionContext = {
50+
logger,
51+
clientName,
52+
commandName,
53+
inputFilterSensitiveLog: DescribeGlobalSettingsInput.filterSensitiveLog,
54+
outputFilterSensitiveLog: DescribeGlobalSettingsOutput.filterSensitiveLog,
55+
};
56+
57+
if (typeof logger.info === "function") {
58+
logger.info({
59+
clientName,
60+
commandName,
61+
});
62+
}
63+
64+
const { requestHandler } = configuration;
65+
return stack.resolve(
66+
(request: FinalizeHandlerArguments<any>) =>
67+
requestHandler.handle(request.request as __HttpRequest, options || {}),
68+
handlerExecutionContext
69+
);
70+
}
71+
72+
private serialize(input: DescribeGlobalSettingsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
73+
return serializeAws_restJson1DescribeGlobalSettingsCommand(input, context);
74+
}
75+
76+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DescribeGlobalSettingsCommandOutput> {
77+
return deserializeAws_restJson1DescribeGlobalSettingsCommand(output, context);
78+
}
79+
80+
// Start section: command_body_extra
81+
// End section: command_body_extra
82+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import { BackupClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BackupClient";
2+
import { UpdateGlobalSettingsInput } from "../models/models_0";
3+
import {
4+
deserializeAws_restJson1UpdateGlobalSettingsCommand,
5+
serializeAws_restJson1UpdateGlobalSettingsCommand,
6+
} from "../protocols/Aws_restJson1";
7+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
8+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
9+
import { Command as $Command } from "@aws-sdk/smithy-client";
10+
import {
11+
FinalizeHandlerArguments,
12+
Handler,
13+
HandlerExecutionContext,
14+
MiddlewareStack,
15+
HttpHandlerOptions as __HttpHandlerOptions,
16+
MetadataBearer as __MetadataBearer,
17+
SerdeContext as __SerdeContext,
18+
} from "@aws-sdk/types";
19+
20+
export type UpdateGlobalSettingsCommandInput = UpdateGlobalSettingsInput;
21+
export type UpdateGlobalSettingsCommandOutput = __MetadataBearer;
22+
23+
export class UpdateGlobalSettingsCommand extends $Command<
24+
UpdateGlobalSettingsCommandInput,
25+
UpdateGlobalSettingsCommandOutput,
26+
BackupClientResolvedConfig
27+
> {
28+
// Start section: command_properties
29+
// End section: command_properties
30+
31+
constructor(readonly input: UpdateGlobalSettingsCommandInput) {
32+
// Start section: command_constructor
33+
super();
34+
// End section: command_constructor
35+
}
36+
37+
resolveMiddleware(
38+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
39+
configuration: BackupClientResolvedConfig,
40+
options?: __HttpHandlerOptions
41+
): Handler<UpdateGlobalSettingsCommandInput, UpdateGlobalSettingsCommandOutput> {
42+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
43+
44+
const stack = clientStack.concat(this.middlewareStack);
45+
46+
const { logger } = configuration;
47+
const clientName = "BackupClient";
48+
const commandName = "UpdateGlobalSettingsCommand";
49+
const handlerExecutionContext: HandlerExecutionContext = {
50+
logger,
51+
clientName,
52+
commandName,
53+
inputFilterSensitiveLog: UpdateGlobalSettingsInput.filterSensitiveLog,
54+
outputFilterSensitiveLog: (output: any) => output,
55+
};
56+
57+
if (typeof logger.info === "function") {
58+
logger.info({
59+
clientName,
60+
commandName,
61+
});
62+
}
63+
64+
const { requestHandler } = configuration;
65+
return stack.resolve(
66+
(request: FinalizeHandlerArguments<any>) =>
67+
requestHandler.handle(request.request as __HttpRequest, options || {}),
68+
handlerExecutionContext
69+
);
70+
}
71+
72+
private serialize(input: UpdateGlobalSettingsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
73+
return serializeAws_restJson1UpdateGlobalSettingsCommand(input, context);
74+
}
75+
76+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<UpdateGlobalSettingsCommandOutput> {
77+
return deserializeAws_restJson1UpdateGlobalSettingsCommand(output, context);
78+
}
79+
80+
// Start section: command_body_extra
81+
// End section: command_body_extra
82+
}

clients/client-backup/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export * from "./commands/DeleteRecoveryPointCommand";
1212
export * from "./commands/DescribeBackupJobCommand";
1313
export * from "./commands/DescribeBackupVaultCommand";
1414
export * from "./commands/DescribeCopyJobCommand";
15+
export * from "./commands/DescribeGlobalSettingsCommand";
1516
export * from "./commands/DescribeProtectedResourceCommand";
1617
export * from "./commands/DescribeRecoveryPointCommand";
1718
export * from "./commands/DescribeRegionSettingsCommand";
@@ -58,6 +59,7 @@ export * from "./commands/StopBackupJobCommand";
5859
export * from "./commands/TagResourceCommand";
5960
export * from "./commands/UntagResourceCommand";
6061
export * from "./commands/UpdateBackupPlanCommand";
62+
export * from "./commands/UpdateGlobalSettingsCommand";
6163
export * from "./commands/UpdateRecoveryPointLifecycleCommand";
6264
export * from "./commands/UpdateRegionSettingsCommand";
6365
export * from "./pagination/Interfaces";

0 commit comments

Comments
 (0)