diff --git a/clients/client-amplifybackend/src/AmplifyBackend.ts b/clients/client-amplifybackend/src/AmplifyBackend.ts index 23d0dc820111..7ca35f7fa68e 100644 --- a/clients/client-amplifybackend/src/AmplifyBackend.ts +++ b/clients/client-amplifybackend/src/AmplifyBackend.ts @@ -26,6 +26,11 @@ import { CreateBackendConfigCommandInput, CreateBackendConfigCommandOutput, } from "./commands/CreateBackendConfigCommand"; +import { + CreateBackendStorageCommand, + CreateBackendStorageCommandInput, + CreateBackendStorageCommandOutput, +} from "./commands/CreateBackendStorageCommand"; import { CreateTokenCommand, CreateTokenCommandInput, CreateTokenCommandOutput } from "./commands/CreateTokenCommand"; import { DeleteBackendAPICommand, @@ -42,6 +47,11 @@ import { DeleteBackendCommandInput, DeleteBackendCommandOutput, } from "./commands/DeleteBackendCommand"; +import { + DeleteBackendStorageCommand, + DeleteBackendStorageCommandInput, + DeleteBackendStorageCommandOutput, +} from "./commands/DeleteBackendStorageCommand"; import { DeleteTokenCommand, DeleteTokenCommandInput, DeleteTokenCommandOutput } from "./commands/DeleteTokenCommand"; import { GenerateBackendAPIModelsCommand, @@ -69,17 +79,32 @@ import { GetBackendJobCommandInput, GetBackendJobCommandOutput, } from "./commands/GetBackendJobCommand"; +import { + GetBackendStorageCommand, + GetBackendStorageCommandInput, + GetBackendStorageCommandOutput, +} from "./commands/GetBackendStorageCommand"; import { GetTokenCommand, GetTokenCommandInput, GetTokenCommandOutput } from "./commands/GetTokenCommand"; import { ImportBackendAuthCommand, ImportBackendAuthCommandInput, ImportBackendAuthCommandOutput, } from "./commands/ImportBackendAuthCommand"; +import { + ImportBackendStorageCommand, + ImportBackendStorageCommandInput, + ImportBackendStorageCommandOutput, +} from "./commands/ImportBackendStorageCommand"; import { ListBackendJobsCommand, ListBackendJobsCommandInput, ListBackendJobsCommandOutput, } from "./commands/ListBackendJobsCommand"; +import { + ListS3BucketsCommand, + ListS3BucketsCommandInput, + ListS3BucketsCommandOutput, +} from "./commands/ListS3BucketsCommand"; import { RemoveAllBackendsCommand, RemoveAllBackendsCommandInput, @@ -110,6 +135,11 @@ import { UpdateBackendJobCommandInput, UpdateBackendJobCommandOutput, } from "./commands/UpdateBackendJobCommand"; +import { + UpdateBackendStorageCommand, + UpdateBackendStorageCommandInput, + UpdateBackendStorageCommandOutput, +} from "./commands/UpdateBackendStorageCommand"; /** *

AWS Amplify Admin API

@@ -272,6 +302,38 @@ export class AmplifyBackend extends AmplifyBackendClient { } } + /** + *

Creates a backend storage resource.

+ */ + public createBackendStorage( + args: CreateBackendStorageCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createBackendStorage( + args: CreateBackendStorageCommandInput, + cb: (err: any, data?: CreateBackendStorageCommandOutput) => void + ): void; + public createBackendStorage( + args: CreateBackendStorageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateBackendStorageCommandOutput) => void + ): void; + public createBackendStorage( + args: CreateBackendStorageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateBackendStorageCommandOutput) => void), + cb?: (err: any, data?: CreateBackendStorageCommandOutput) => void + ): Promise | void { + const command = new CreateBackendStorageCommand(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); + } + } + /** *

Generates a one-time challenge code to authenticate a user into your Amplify Admin UI.

*/ @@ -394,6 +456,38 @@ export class AmplifyBackend extends AmplifyBackendClient { } } + /** + *

Removes the specified backend storage resource.

+ */ + public deleteBackendStorage( + args: DeleteBackendStorageCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteBackendStorage( + args: DeleteBackendStorageCommandInput, + cb: (err: any, data?: DeleteBackendStorageCommandOutput) => void + ): void; + public deleteBackendStorage( + args: DeleteBackendStorageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteBackendStorageCommandOutput) => void + ): void; + public deleteBackendStorage( + args: DeleteBackendStorageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteBackendStorageCommandOutput) => void), + cb?: (err: any, data?: DeleteBackendStorageCommandOutput) => void + ): Promise | void { + const command = new DeleteBackendStorageCommand(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); + } + } + /** *

Deletes the challenge token based on the given appId and sessionId.

*/ @@ -606,6 +700,38 @@ export class AmplifyBackend extends AmplifyBackendClient { } } + /** + *

Gets details for a backend storage resource.

+ */ + public getBackendStorage( + args: GetBackendStorageCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getBackendStorage( + args: GetBackendStorageCommandInput, + cb: (err: any, data?: GetBackendStorageCommandOutput) => void + ): void; + public getBackendStorage( + args: GetBackendStorageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetBackendStorageCommandOutput) => void + ): void; + public getBackendStorage( + args: GetBackendStorageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetBackendStorageCommandOutput) => void), + cb?: (err: any, data?: GetBackendStorageCommandOutput) => void + ): Promise | void { + const command = new GetBackendStorageCommand(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); + } + } + /** *

Gets the challenge token based on the given appId and sessionId.

*/ @@ -664,6 +790,38 @@ export class AmplifyBackend extends AmplifyBackendClient { } } + /** + *

Imports an existing backend storage resource.

+ */ + public importBackendStorage( + args: ImportBackendStorageCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public importBackendStorage( + args: ImportBackendStorageCommandInput, + cb: (err: any, data?: ImportBackendStorageCommandOutput) => void + ): void; + public importBackendStorage( + args: ImportBackendStorageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ImportBackendStorageCommandOutput) => void + ): void; + public importBackendStorage( + args: ImportBackendStorageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ImportBackendStorageCommandOutput) => void), + cb?: (err: any, data?: ImportBackendStorageCommandOutput) => void + ): Promise | void { + const command = new ImportBackendStorageCommand(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); + } + } + /** *

Lists the jobs for the backend of an Amplify app.

*/ @@ -696,6 +854,38 @@ export class AmplifyBackend extends AmplifyBackendClient { } } + /** + *

The list of S3 buckets in your account.

+ */ + public listS3Buckets( + args: ListS3BucketsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listS3Buckets( + args: ListS3BucketsCommandInput, + cb: (err: any, data?: ListS3BucketsCommandOutput) => void + ): void; + public listS3Buckets( + args: ListS3BucketsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListS3BucketsCommandOutput) => void + ): void; + public listS3Buckets( + args: ListS3BucketsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListS3BucketsCommandOutput) => void), + cb?: (err: any, data?: ListS3BucketsCommandOutput) => void + ): Promise | void { + const command = new ListS3BucketsCommand(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); + } + } + /** *

Removes all backend environments from your Amplify project.

*/ @@ -887,4 +1077,36 @@ export class AmplifyBackend extends AmplifyBackendClient { return this.send(command, optionsOrCb); } } + + /** + *

Updates an existing backend storage resource.

+ */ + public updateBackendStorage( + args: UpdateBackendStorageCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateBackendStorage( + args: UpdateBackendStorageCommandInput, + cb: (err: any, data?: UpdateBackendStorageCommandOutput) => void + ): void; + public updateBackendStorage( + args: UpdateBackendStorageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateBackendStorageCommandOutput) => void + ): void; + public updateBackendStorage( + args: UpdateBackendStorageCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateBackendStorageCommandOutput) => void), + cb?: (err: any, data?: UpdateBackendStorageCommandOutput) => void + ): Promise | void { + const command = new UpdateBackendStorageCommand(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); + } + } } diff --git a/clients/client-amplifybackend/src/AmplifyBackendClient.ts b/clients/client-amplifybackend/src/AmplifyBackendClient.ts index cbaa54558159..ee0f552c6e2d 100644 --- a/clients/client-amplifybackend/src/AmplifyBackendClient.ts +++ b/clients/client-amplifybackend/src/AmplifyBackendClient.ts @@ -57,10 +57,18 @@ import { CreateBackendConfigCommandInput, CreateBackendConfigCommandOutput, } from "./commands/CreateBackendConfigCommand"; +import { + CreateBackendStorageCommandInput, + CreateBackendStorageCommandOutput, +} from "./commands/CreateBackendStorageCommand"; import { CreateTokenCommandInput, CreateTokenCommandOutput } from "./commands/CreateTokenCommand"; import { DeleteBackendAPICommandInput, DeleteBackendAPICommandOutput } from "./commands/DeleteBackendAPICommand"; import { DeleteBackendAuthCommandInput, DeleteBackendAuthCommandOutput } from "./commands/DeleteBackendAuthCommand"; import { DeleteBackendCommandInput, DeleteBackendCommandOutput } from "./commands/DeleteBackendCommand"; +import { + DeleteBackendStorageCommandInput, + DeleteBackendStorageCommandOutput, +} from "./commands/DeleteBackendStorageCommand"; import { DeleteTokenCommandInput, DeleteTokenCommandOutput } from "./commands/DeleteTokenCommand"; import { GenerateBackendAPIModelsCommandInput, @@ -74,9 +82,15 @@ import { import { GetBackendAuthCommandInput, GetBackendAuthCommandOutput } from "./commands/GetBackendAuthCommand"; import { GetBackendCommandInput, GetBackendCommandOutput } from "./commands/GetBackendCommand"; import { GetBackendJobCommandInput, GetBackendJobCommandOutput } from "./commands/GetBackendJobCommand"; +import { GetBackendStorageCommandInput, GetBackendStorageCommandOutput } from "./commands/GetBackendStorageCommand"; import { GetTokenCommandInput, GetTokenCommandOutput } from "./commands/GetTokenCommand"; import { ImportBackendAuthCommandInput, ImportBackendAuthCommandOutput } from "./commands/ImportBackendAuthCommand"; +import { + ImportBackendStorageCommandInput, + ImportBackendStorageCommandOutput, +} from "./commands/ImportBackendStorageCommand"; import { ListBackendJobsCommandInput, ListBackendJobsCommandOutput } from "./commands/ListBackendJobsCommand"; +import { ListS3BucketsCommandInput, ListS3BucketsCommandOutput } from "./commands/ListS3BucketsCommand"; import { RemoveAllBackendsCommandInput, RemoveAllBackendsCommandOutput } from "./commands/RemoveAllBackendsCommand"; import { RemoveBackendConfigCommandInput, @@ -89,6 +103,10 @@ import { UpdateBackendConfigCommandOutput, } from "./commands/UpdateBackendConfigCommand"; import { UpdateBackendJobCommandInput, UpdateBackendJobCommandOutput } from "./commands/UpdateBackendJobCommand"; +import { + UpdateBackendStorageCommandInput, + UpdateBackendStorageCommandOutput, +} from "./commands/UpdateBackendStorageCommand"; import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; export type ServiceInputTypes = @@ -97,10 +115,12 @@ export type ServiceInputTypes = | CreateBackendAuthCommandInput | CreateBackendCommandInput | CreateBackendConfigCommandInput + | CreateBackendStorageCommandInput | CreateTokenCommandInput | DeleteBackendAPICommandInput | DeleteBackendAuthCommandInput | DeleteBackendCommandInput + | DeleteBackendStorageCommandInput | DeleteTokenCommandInput | GenerateBackendAPIModelsCommandInput | GetBackendAPICommandInput @@ -108,15 +128,19 @@ export type ServiceInputTypes = | GetBackendAuthCommandInput | GetBackendCommandInput | GetBackendJobCommandInput + | GetBackendStorageCommandInput | GetTokenCommandInput | ImportBackendAuthCommandInput + | ImportBackendStorageCommandInput | ListBackendJobsCommandInput + | ListS3BucketsCommandInput | RemoveAllBackendsCommandInput | RemoveBackendConfigCommandInput | UpdateBackendAPICommandInput | UpdateBackendAuthCommandInput | UpdateBackendConfigCommandInput - | UpdateBackendJobCommandInput; + | UpdateBackendJobCommandInput + | UpdateBackendStorageCommandInput; export type ServiceOutputTypes = | CloneBackendCommandOutput @@ -124,10 +148,12 @@ export type ServiceOutputTypes = | CreateBackendAuthCommandOutput | CreateBackendCommandOutput | CreateBackendConfigCommandOutput + | CreateBackendStorageCommandOutput | CreateTokenCommandOutput | DeleteBackendAPICommandOutput | DeleteBackendAuthCommandOutput | DeleteBackendCommandOutput + | DeleteBackendStorageCommandOutput | DeleteTokenCommandOutput | GenerateBackendAPIModelsCommandOutput | GetBackendAPICommandOutput @@ -135,15 +161,19 @@ export type ServiceOutputTypes = | GetBackendAuthCommandOutput | GetBackendCommandOutput | GetBackendJobCommandOutput + | GetBackendStorageCommandOutput | GetTokenCommandOutput | ImportBackendAuthCommandOutput + | ImportBackendStorageCommandOutput | ListBackendJobsCommandOutput + | ListS3BucketsCommandOutput | RemoveAllBackendsCommandOutput | RemoveBackendConfigCommandOutput | UpdateBackendAPICommandOutput | UpdateBackendAuthCommandOutput | UpdateBackendConfigCommandOutput - | UpdateBackendJobCommandOutput; + | UpdateBackendJobCommandOutput + | UpdateBackendStorageCommandOutput; export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { /** diff --git a/clients/client-amplifybackend/src/commands/CreateBackendStorageCommand.ts b/clients/client-amplifybackend/src/commands/CreateBackendStorageCommand.ts new file mode 100644 index 000000000000..b955679972de --- /dev/null +++ b/clients/client-amplifybackend/src/commands/CreateBackendStorageCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmplifyBackendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmplifyBackendClient"; +import { CreateBackendStorageRequest, CreateBackendStorageResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateBackendStorageCommand, + serializeAws_restJson1CreateBackendStorageCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateBackendStorageCommandInput extends CreateBackendStorageRequest {} +export interface CreateBackendStorageCommandOutput extends CreateBackendStorageResponse, __MetadataBearer {} + +/** + *

Creates a backend storage resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmplifyBackendClient, CreateBackendStorageCommand } from "@aws-sdk/client-amplifybackend"; // ES Modules import + * // const { AmplifyBackendClient, CreateBackendStorageCommand } = require("@aws-sdk/client-amplifybackend"); // CommonJS import + * const client = new AmplifyBackendClient(config); + * const command = new CreateBackendStorageCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateBackendStorageCommandInput} for command's `input` shape. + * @see {@link CreateBackendStorageCommandOutput} for command's `response` shape. + * @see {@link AmplifyBackendClientResolvedConfig | config} for AmplifyBackendClient's `config` shape. + * + */ +export class CreateBackendStorageCommand extends $Command< + CreateBackendStorageCommandInput, + CreateBackendStorageCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateBackendStorageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmplifyBackendClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmplifyBackendClient"; + const commandName = "CreateBackendStorageCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateBackendStorageRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateBackendStorageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateBackendStorageCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateBackendStorageCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateBackendStorageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amplifybackend/src/commands/DeleteBackendStorageCommand.ts b/clients/client-amplifybackend/src/commands/DeleteBackendStorageCommand.ts new file mode 100644 index 000000000000..52c46ca8e1af --- /dev/null +++ b/clients/client-amplifybackend/src/commands/DeleteBackendStorageCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmplifyBackendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmplifyBackendClient"; +import { DeleteBackendStorageRequest, DeleteBackendStorageResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteBackendStorageCommand, + serializeAws_restJson1DeleteBackendStorageCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteBackendStorageCommandInput extends DeleteBackendStorageRequest {} +export interface DeleteBackendStorageCommandOutput extends DeleteBackendStorageResponse, __MetadataBearer {} + +/** + *

Removes the specified backend storage resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmplifyBackendClient, DeleteBackendStorageCommand } from "@aws-sdk/client-amplifybackend"; // ES Modules import + * // const { AmplifyBackendClient, DeleteBackendStorageCommand } = require("@aws-sdk/client-amplifybackend"); // CommonJS import + * const client = new AmplifyBackendClient(config); + * const command = new DeleteBackendStorageCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteBackendStorageCommandInput} for command's `input` shape. + * @see {@link DeleteBackendStorageCommandOutput} for command's `response` shape. + * @see {@link AmplifyBackendClientResolvedConfig | config} for AmplifyBackendClient's `config` shape. + * + */ +export class DeleteBackendStorageCommand extends $Command< + DeleteBackendStorageCommandInput, + DeleteBackendStorageCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteBackendStorageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmplifyBackendClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmplifyBackendClient"; + const commandName = "DeleteBackendStorageCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteBackendStorageRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteBackendStorageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteBackendStorageCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteBackendStorageCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteBackendStorageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amplifybackend/src/commands/GetBackendStorageCommand.ts b/clients/client-amplifybackend/src/commands/GetBackendStorageCommand.ts new file mode 100644 index 000000000000..984527cd50de --- /dev/null +++ b/clients/client-amplifybackend/src/commands/GetBackendStorageCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmplifyBackendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmplifyBackendClient"; +import { GetBackendStorageRequest, GetBackendStorageResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetBackendStorageCommand, + serializeAws_restJson1GetBackendStorageCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetBackendStorageCommandInput extends GetBackendStorageRequest {} +export interface GetBackendStorageCommandOutput extends GetBackendStorageResponse, __MetadataBearer {} + +/** + *

Gets details for a backend storage resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmplifyBackendClient, GetBackendStorageCommand } from "@aws-sdk/client-amplifybackend"; // ES Modules import + * // const { AmplifyBackendClient, GetBackendStorageCommand } = require("@aws-sdk/client-amplifybackend"); // CommonJS import + * const client = new AmplifyBackendClient(config); + * const command = new GetBackendStorageCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetBackendStorageCommandInput} for command's `input` shape. + * @see {@link GetBackendStorageCommandOutput} for command's `response` shape. + * @see {@link AmplifyBackendClientResolvedConfig | config} for AmplifyBackendClient's `config` shape. + * + */ +export class GetBackendStorageCommand extends $Command< + GetBackendStorageCommandInput, + GetBackendStorageCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetBackendStorageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmplifyBackendClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmplifyBackendClient"; + const commandName = "GetBackendStorageCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetBackendStorageRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetBackendStorageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetBackendStorageCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetBackendStorageCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetBackendStorageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amplifybackend/src/commands/ImportBackendStorageCommand.ts b/clients/client-amplifybackend/src/commands/ImportBackendStorageCommand.ts new file mode 100644 index 000000000000..6eccc9ed04a1 --- /dev/null +++ b/clients/client-amplifybackend/src/commands/ImportBackendStorageCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmplifyBackendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmplifyBackendClient"; +import { ImportBackendStorageRequest, ImportBackendStorageResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ImportBackendStorageCommand, + serializeAws_restJson1ImportBackendStorageCommand, +} from "../protocols/Aws_restJson1"; + +export interface ImportBackendStorageCommandInput extends ImportBackendStorageRequest {} +export interface ImportBackendStorageCommandOutput extends ImportBackendStorageResponse, __MetadataBearer {} + +/** + *

Imports an existing backend storage resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmplifyBackendClient, ImportBackendStorageCommand } from "@aws-sdk/client-amplifybackend"; // ES Modules import + * // const { AmplifyBackendClient, ImportBackendStorageCommand } = require("@aws-sdk/client-amplifybackend"); // CommonJS import + * const client = new AmplifyBackendClient(config); + * const command = new ImportBackendStorageCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ImportBackendStorageCommandInput} for command's `input` shape. + * @see {@link ImportBackendStorageCommandOutput} for command's `response` shape. + * @see {@link AmplifyBackendClientResolvedConfig | config} for AmplifyBackendClient's `config` shape. + * + */ +export class ImportBackendStorageCommand extends $Command< + ImportBackendStorageCommandInput, + ImportBackendStorageCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ImportBackendStorageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmplifyBackendClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmplifyBackendClient"; + const commandName = "ImportBackendStorageCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ImportBackendStorageRequest.filterSensitiveLog, + outputFilterSensitiveLog: ImportBackendStorageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ImportBackendStorageCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ImportBackendStorageCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ImportBackendStorageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amplifybackend/src/commands/ListS3BucketsCommand.ts b/clients/client-amplifybackend/src/commands/ListS3BucketsCommand.ts new file mode 100644 index 000000000000..2b66a41ca37b --- /dev/null +++ b/clients/client-amplifybackend/src/commands/ListS3BucketsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmplifyBackendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmplifyBackendClient"; +import { ListS3BucketsRequest, ListS3BucketsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListS3BucketsCommand, + serializeAws_restJson1ListS3BucketsCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListS3BucketsCommandInput extends ListS3BucketsRequest {} +export interface ListS3BucketsCommandOutput extends ListS3BucketsResponse, __MetadataBearer {} + +/** + *

The list of S3 buckets in your account.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmplifyBackendClient, ListS3BucketsCommand } from "@aws-sdk/client-amplifybackend"; // ES Modules import + * // const { AmplifyBackendClient, ListS3BucketsCommand } = require("@aws-sdk/client-amplifybackend"); // CommonJS import + * const client = new AmplifyBackendClient(config); + * const command = new ListS3BucketsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListS3BucketsCommandInput} for command's `input` shape. + * @see {@link ListS3BucketsCommandOutput} for command's `response` shape. + * @see {@link AmplifyBackendClientResolvedConfig | config} for AmplifyBackendClient's `config` shape. + * + */ +export class ListS3BucketsCommand extends $Command< + ListS3BucketsCommandInput, + ListS3BucketsCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListS3BucketsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmplifyBackendClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmplifyBackendClient"; + const commandName = "ListS3BucketsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListS3BucketsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListS3BucketsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListS3BucketsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListS3BucketsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListS3BucketsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amplifybackend/src/commands/UpdateBackendStorageCommand.ts b/clients/client-amplifybackend/src/commands/UpdateBackendStorageCommand.ts new file mode 100644 index 000000000000..f431e26f7afd --- /dev/null +++ b/clients/client-amplifybackend/src/commands/UpdateBackendStorageCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AmplifyBackendClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AmplifyBackendClient"; +import { UpdateBackendStorageRequest, UpdateBackendStorageResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateBackendStorageCommand, + serializeAws_restJson1UpdateBackendStorageCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateBackendStorageCommandInput extends UpdateBackendStorageRequest {} +export interface UpdateBackendStorageCommandOutput extends UpdateBackendStorageResponse, __MetadataBearer {} + +/** + *

Updates an existing backend storage resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AmplifyBackendClient, UpdateBackendStorageCommand } from "@aws-sdk/client-amplifybackend"; // ES Modules import + * // const { AmplifyBackendClient, UpdateBackendStorageCommand } = require("@aws-sdk/client-amplifybackend"); // CommonJS import + * const client = new AmplifyBackendClient(config); + * const command = new UpdateBackendStorageCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateBackendStorageCommandInput} for command's `input` shape. + * @see {@link UpdateBackendStorageCommandOutput} for command's `response` shape. + * @see {@link AmplifyBackendClientResolvedConfig | config} for AmplifyBackendClient's `config` shape. + * + */ +export class UpdateBackendStorageCommand extends $Command< + UpdateBackendStorageCommandInput, + UpdateBackendStorageCommandOutput, + AmplifyBackendClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateBackendStorageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AmplifyBackendClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AmplifyBackendClient"; + const commandName = "UpdateBackendStorageCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateBackendStorageRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateBackendStorageResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateBackendStorageCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateBackendStorageCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateBackendStorageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-amplifybackend/src/commands/index.ts b/clients/client-amplifybackend/src/commands/index.ts index a6ecae648e4d..376e68c67688 100644 --- a/clients/client-amplifybackend/src/commands/index.ts +++ b/clients/client-amplifybackend/src/commands/index.ts @@ -3,10 +3,12 @@ export * from "./CreateBackendAPICommand"; export * from "./CreateBackendAuthCommand"; export * from "./CreateBackendCommand"; export * from "./CreateBackendConfigCommand"; +export * from "./CreateBackendStorageCommand"; export * from "./CreateTokenCommand"; export * from "./DeleteBackendAPICommand"; export * from "./DeleteBackendAuthCommand"; export * from "./DeleteBackendCommand"; +export * from "./DeleteBackendStorageCommand"; export * from "./DeleteTokenCommand"; export * from "./GenerateBackendAPIModelsCommand"; export * from "./GetBackendAPICommand"; @@ -14,12 +16,16 @@ export * from "./GetBackendAPIModelsCommand"; export * from "./GetBackendAuthCommand"; export * from "./GetBackendCommand"; export * from "./GetBackendJobCommand"; +export * from "./GetBackendStorageCommand"; export * from "./GetTokenCommand"; export * from "./ImportBackendAuthCommand"; +export * from "./ImportBackendStorageCommand"; export * from "./ListBackendJobsCommand"; +export * from "./ListS3BucketsCommand"; export * from "./RemoveAllBackendsCommand"; export * from "./RemoveBackendConfigCommand"; export * from "./UpdateBackendAPICommand"; export * from "./UpdateBackendAuthCommand"; export * from "./UpdateBackendConfigCommand"; export * from "./UpdateBackendJobCommand"; +export * from "./UpdateBackendStorageCommand"; diff --git a/clients/client-amplifybackend/src/models/models_0.ts b/clients/client-amplifybackend/src/models/models_0.ts index 57d35944f1cd..8da92836b051 100644 --- a/clients/client-amplifybackend/src/models/models_0.ts +++ b/clients/client-amplifybackend/src/models/models_0.ts @@ -205,7 +205,7 @@ export interface CreateBackendRequest { BackendEnvironmentName: string | undefined; /** - *

The resource configuration for the create backend request.

+ *

The resource configuration for creating backend storage.

*/ ResourceConfig?: ResourceConfig; @@ -1077,6 +1077,140 @@ export namespace CreateBackendConfigResponse { }); } +export enum AuthenticatedElement { + CREATE_AND_UPDATE = "CREATE_AND_UPDATE", + DELETE = "DELETE", + READ = "READ", +} + +export enum UnAuthenticatedElement { + CREATE_AND_UPDATE = "CREATE_AND_UPDATE", + DELETE = "DELETE", + READ = "READ", +} + +/** + *

Describes the read, write, and delete permissions users have against your storage S3 bucket.

+ */ +export interface BackendStoragePermissions { + /** + *

Lists all authenticated user read, write, and delete permissions for your S3 bucket.

+ */ + Authenticated: (AuthenticatedElement | string)[] | undefined; + + /** + *

Lists all unauthenticated user read, write, and delete permissions for your S3 bucket.

+ */ + UnAuthenticated?: (UnAuthenticatedElement | string)[]; +} + +export namespace BackendStoragePermissions { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BackendStoragePermissions): any => ({ + ...obj, + }); +} + +export enum ServiceName { + S3 = "S3", +} + +/** + *

The resource configuration for creating backend storage.

+ */ +export interface CreateBackendStorageResourceConfig { + /** + *

The name of the S3 bucket.

+ */ + BucketName?: string; + + /** + *

The authorization configuration for the storage S3 bucket.

+ */ + Permissions: BackendStoragePermissions | undefined; + + /** + *

The name of the storage service.

+ */ + ServiceName: ServiceName | string | undefined; +} + +export namespace CreateBackendStorageResourceConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateBackendStorageResourceConfig): any => ({ + ...obj, + }); +} + +/** + *

The request body for CreateBackendStorage.

+ */ +export interface CreateBackendStorageRequest { + /** + *

The app ID.

+ */ + AppId: string | undefined; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName: string | undefined; + + /** + *

The resource configuration for creating backend storage.

+ */ + ResourceConfig: CreateBackendStorageResourceConfig | undefined; + + /** + *

The name of the storage resource.

+ */ + ResourceName: string | undefined; +} + +export namespace CreateBackendStorageRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateBackendStorageRequest): any => ({ + ...obj, + }); +} + +export interface CreateBackendStorageResponse { + /** + *

The app ID.

+ */ + AppId?: string; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName?: string; + + /** + *

The ID for the job.

+ */ + JobId?: string; + + /** + *

The current status of the request.

+ */ + Status?: string; +} + +export namespace CreateBackendStorageResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateBackendStorageResponse): any => ({ + ...obj, + }); +} + export interface CreateTokenRequest { /** *

The app ID.

@@ -1331,6 +1465,71 @@ export namespace DeleteBackendAuthResponse { }); } +/** + *

The request body for DeleteBackendStorage.

+ */ +export interface DeleteBackendStorageRequest { + /** + *

The app ID.

+ */ + AppId: string | undefined; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName: string | undefined; + + /** + *

The name of the storage resource.

+ */ + ResourceName: string | undefined; + + /** + *

The name of the storage service.

+ */ + ServiceName: ServiceName | string | undefined; +} + +export namespace DeleteBackendStorageRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteBackendStorageRequest): any => ({ + ...obj, + }); +} + +export interface DeleteBackendStorageResponse { + /** + *

The app ID.

+ */ + AppId?: string; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName?: string; + + /** + *

The ID for the job.

+ */ + JobId?: string; + + /** + *

The current status of the request.

+ */ + Status?: string; +} + +export namespace DeleteBackendStorageResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteBackendStorageResponse): any => ({ + ...obj, + }); +} + export interface DeleteTokenRequest { /** *

The app ID.

@@ -1775,6 +1974,100 @@ export namespace GetBackendJobResponse { }); } +/** + *

The request body for GetBackendStorage.

+ */ +export interface GetBackendStorageRequest { + /** + *

The app ID.

+ */ + AppId: string | undefined; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName: string | undefined; + + /** + *

The name of the storage resource.

+ */ + ResourceName: string | undefined; +} + +export namespace GetBackendStorageRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetBackendStorageRequest): any => ({ + ...obj, + }); +} + +/** + *

The details for a backend storage resource.

+ */ +export interface GetBackendStorageResourceConfig { + /** + *

The name of the S3 bucket.

+ */ + BucketName?: string; + + /** + *

Returns True if the storage resource has been imported.

+ */ + Imported: boolean | undefined; + + /** + *

The authorization configuration for the storage S3 bucket.

+ */ + Permissions?: BackendStoragePermissions; + + /** + *

The name of the storage service.

+ */ + ServiceName: ServiceName | string | undefined; +} + +export namespace GetBackendStorageResourceConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetBackendStorageResourceConfig): any => ({ + ...obj, + }); +} + +export interface GetBackendStorageResponse { + /** + *

The app ID.

+ */ + AppId?: string; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName?: string; + + /** + *

The resource configuration for the backend storage resource.

+ */ + ResourceConfig?: GetBackendStorageResourceConfig; + + /** + *

The name of the storage resource.

+ */ + ResourceName?: string; +} + +export namespace GetBackendStorageResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetBackendStorageResponse): any => ({ + ...obj, + }); +} + export interface GetTokenRequest { /** *

The app ID.

@@ -1912,6 +2205,71 @@ export namespace ImportBackendAuthResponse { }); } +/** + *

The request body for ImportBackendStorage.

+ */ +export interface ImportBackendStorageRequest { + /** + *

The app ID.

+ */ + AppId: string | undefined; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName: string | undefined; + + /** + *

The name of the S3 bucket.

+ */ + BucketName?: string; + + /** + *

The name of the storage service.

+ */ + ServiceName: ServiceName | string | undefined; +} + +export namespace ImportBackendStorageRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ImportBackendStorageRequest): any => ({ + ...obj, + }); +} + +export interface ImportBackendStorageResponse { + /** + *

The app ID.

+ */ + AppId?: string; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName?: string; + + /** + *

The ID for the job.

+ */ + JobId?: string; + + /** + *

The current status of the request.

+ */ + Status?: string; +} + +export namespace ImportBackendStorageResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ImportBackendStorageResponse): any => ({ + ...obj, + }); +} + /** *

The request body for ListBackendJobs.

*/ @@ -2036,6 +2394,70 @@ export namespace ListBackendJobsResponse { }); } +/** + *

The request body for S3Buckets.

+ */ +export interface ListS3BucketsRequest { + /** + *

Reserved for future use.

+ */ + NextToken?: string; +} + +export namespace ListS3BucketsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListS3BucketsRequest): any => ({ + ...obj, + }); +} + +/** + *

Describes the metadata of the S3 bucket.

+ */ +export interface S3BucketInfo { + /** + *

The creation date of the S3 bucket.

+ */ + CreationDate?: string; + + /** + *

The name of the S3 bucket.

+ */ + Name?: string; +} + +export namespace S3BucketInfo { + /** + * @internal + */ + export const filterSensitiveLog = (obj: S3BucketInfo): any => ({ + ...obj, + }); +} + +export interface ListS3BucketsResponse { + /** + *

The list of S3 buckets.

+ */ + Buckets?: S3BucketInfo[]; + + /** + *

Reserved for future use.

+ */ + NextToken?: string; +} + +export namespace ListS3BucketsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListS3BucketsResponse): any => ({ + ...obj, + }); +} + /** *

The request body for RemoveAllBackends.

*/ @@ -2664,3 +3086,92 @@ export namespace UpdateBackendJobResponse { ...obj, }); } + +/** + *

The resource configuration for updating backend storage.

+ */ +export interface UpdateBackendStorageResourceConfig { + /** + *

The authorization configuration for the storage S3 bucket.

+ */ + Permissions: BackendStoragePermissions | undefined; + + /** + *

The name of the storage service.

+ */ + ServiceName: ServiceName | string | undefined; +} + +export namespace UpdateBackendStorageResourceConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateBackendStorageResourceConfig): any => ({ + ...obj, + }); +} + +/** + *

The request body for UpdateBackendStorage.

+ */ +export interface UpdateBackendStorageRequest { + /** + *

The app ID.

+ */ + AppId: string | undefined; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName: string | undefined; + + /** + *

The resource configuration for updating backend storage.

+ */ + ResourceConfig: UpdateBackendStorageResourceConfig | undefined; + + /** + *

The name of the storage resource.

+ */ + ResourceName: string | undefined; +} + +export namespace UpdateBackendStorageRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateBackendStorageRequest): any => ({ + ...obj, + }); +} + +export interface UpdateBackendStorageResponse { + /** + *

The app ID.

+ */ + AppId?: string; + + /** + *

The name of the backend environment.

+ */ + BackendEnvironmentName?: string; + + /** + *

The ID for the job.

+ */ + JobId?: string; + + /** + *

The current status of the request.

+ */ + Status?: string; +} + +export namespace UpdateBackendStorageResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateBackendStorageResponse): any => ({ + ...obj, + }); +} diff --git a/clients/client-amplifybackend/src/protocols/Aws_restJson1.ts b/clients/client-amplifybackend/src/protocols/Aws_restJson1.ts index 80938561b135..7c7a8eaa2803 100644 --- a/clients/client-amplifybackend/src/protocols/Aws_restJson1.ts +++ b/clients/client-amplifybackend/src/protocols/Aws_restJson1.ts @@ -24,10 +24,18 @@ import { CreateBackendConfigCommandInput, CreateBackendConfigCommandOutput, } from "../commands/CreateBackendConfigCommand"; +import { + CreateBackendStorageCommandInput, + CreateBackendStorageCommandOutput, +} from "../commands/CreateBackendStorageCommand"; import { CreateTokenCommandInput, CreateTokenCommandOutput } from "../commands/CreateTokenCommand"; import { DeleteBackendAPICommandInput, DeleteBackendAPICommandOutput } from "../commands/DeleteBackendAPICommand"; import { DeleteBackendAuthCommandInput, DeleteBackendAuthCommandOutput } from "../commands/DeleteBackendAuthCommand"; import { DeleteBackendCommandInput, DeleteBackendCommandOutput } from "../commands/DeleteBackendCommand"; +import { + DeleteBackendStorageCommandInput, + DeleteBackendStorageCommandOutput, +} from "../commands/DeleteBackendStorageCommand"; import { DeleteTokenCommandInput, DeleteTokenCommandOutput } from "../commands/DeleteTokenCommand"; import { GenerateBackendAPIModelsCommandInput, @@ -41,9 +49,15 @@ import { import { GetBackendAuthCommandInput, GetBackendAuthCommandOutput } from "../commands/GetBackendAuthCommand"; import { GetBackendCommandInput, GetBackendCommandOutput } from "../commands/GetBackendCommand"; import { GetBackendJobCommandInput, GetBackendJobCommandOutput } from "../commands/GetBackendJobCommand"; +import { GetBackendStorageCommandInput, GetBackendStorageCommandOutput } from "../commands/GetBackendStorageCommand"; import { GetTokenCommandInput, GetTokenCommandOutput } from "../commands/GetTokenCommand"; import { ImportBackendAuthCommandInput, ImportBackendAuthCommandOutput } from "../commands/ImportBackendAuthCommand"; +import { + ImportBackendStorageCommandInput, + ImportBackendStorageCommandOutput, +} from "../commands/ImportBackendStorageCommand"; import { ListBackendJobsCommandInput, ListBackendJobsCommandOutput } from "../commands/ListBackendJobsCommand"; +import { ListS3BucketsCommandInput, ListS3BucketsCommandOutput } from "../commands/ListS3BucketsCommand"; import { RemoveAllBackendsCommandInput, RemoveAllBackendsCommandOutput } from "../commands/RemoveAllBackendsCommand"; import { RemoveBackendConfigCommandInput, @@ -56,8 +70,13 @@ import { UpdateBackendConfigCommandOutput, } from "../commands/UpdateBackendConfigCommand"; import { UpdateBackendJobCommandInput, UpdateBackendJobCommandOutput } from "../commands/UpdateBackendJobCommand"; +import { + UpdateBackendStorageCommandInput, + UpdateBackendStorageCommandOutput, +} from "../commands/UpdateBackendStorageCommand"; import { AdditionalConstraintsElement, + AuthenticatedElement, BackendAPIAppSyncAuthSettings, BackendAPIAuthType, BackendAPIConflictResolution, @@ -65,6 +84,7 @@ import { BackendAuthAppleProviderConfig, BackendAuthSocialProviderConfig, BackendJobRespObj, + BackendStoragePermissions, BadRequestException, CreateBackendAuthForgotPasswordConfig, CreateBackendAuthIdentityPoolConfig, @@ -73,18 +93,22 @@ import { CreateBackendAuthPasswordPolicyConfig, CreateBackendAuthResourceConfig, CreateBackendAuthUserPoolConfig, + CreateBackendStorageResourceConfig, EmailSettings, GatewayTimeoutException, + GetBackendStorageResourceConfig, LoginAuthConfigReqObj, MfaTypesElement, NotFoundException, OAuthScopesElement, RequiredSignUpAttributesElement, ResourceConfig, + S3BucketInfo, Settings, SmsSettings, SocialProviderSettings, TooManyRequestsException, + UnAuthenticatedElement, UpdateBackendAuthForgotPasswordConfig, UpdateBackendAuthIdentityPoolConfig, UpdateBackendAuthMFAConfig, @@ -92,6 +116,7 @@ import { UpdateBackendAuthPasswordPolicyConfig, UpdateBackendAuthResourceConfig, UpdateBackendAuthUserPoolConfig, + UpdateBackendStorageResourceConfig, } from "../models/models_0"; export const serializeAws_restJson1CloneBackendCommand = async ( @@ -283,6 +308,45 @@ export const serializeAws_restJson1CreateBackendConfigCommand = async ( }); }; +export const serializeAws_restJson1CreateBackendStorageCommand = async ( + input: CreateBackendStorageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/storage"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + let body: any; + body = JSON.stringify({ + ...(input.BackendEnvironmentName !== undefined && + input.BackendEnvironmentName !== null && { backendEnvironmentName: input.BackendEnvironmentName }), + ...(input.ResourceConfig !== undefined && + input.ResourceConfig !== null && { + resourceConfig: serializeAws_restJson1CreateBackendStorageResourceConfig(input.ResourceConfig, context), + }), + ...(input.ResourceName !== undefined && input.ResourceName !== null && { resourceName: input.ResourceName }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1CreateTokenCommand = async ( input: CreateTokenCommandInput, context: __SerdeContext @@ -443,6 +507,51 @@ export const serializeAws_restJson1DeleteBackendAuthCommand = async ( }); }; +export const serializeAws_restJson1DeleteBackendStorageCommand = async ( + input: DeleteBackendStorageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/backend/{AppId}/storage/{BackendEnvironmentName}/remove"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceName !== undefined && input.ResourceName !== null && { resourceName: input.ResourceName }), + ...(input.ServiceName !== undefined && input.ServiceName !== null && { serviceName: input.ServiceName }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1DeleteTokenCommand = async ( input: DeleteTokenCommandInput, context: __SerdeContext @@ -744,6 +853,50 @@ export const serializeAws_restJson1GetBackendJobCommand = async ( }); }; +export const serializeAws_restJson1GetBackendStorageCommand = async ( + input: GetBackendStorageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/backend/{AppId}/storage/{BackendEnvironmentName}/details"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceName !== undefined && input.ResourceName !== null && { resourceName: input.ResourceName }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1GetTokenCommand = async ( input: GetTokenCommandInput, context: __SerdeContext @@ -831,6 +984,51 @@ export const serializeAws_restJson1ImportBackendAuthCommand = async ( }); }; +export const serializeAws_restJson1ImportBackendStorageCommand = async ( + input: ImportBackendStorageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/backend/{AppId}/storage/{BackendEnvironmentName}/import"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.BucketName !== undefined && input.BucketName !== null && { bucketName: input.BucketName }), + ...(input.ServiceName !== undefined && input.ServiceName !== null && { serviceName: input.ServiceName }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1ListBackendJobsCommand = async ( input: ListBackendJobsCommandInput, context: __SerdeContext @@ -879,6 +1077,30 @@ export const serializeAws_restJson1ListBackendJobsCommand = async ( }); }; +export const serializeAws_restJson1ListS3BucketsCommand = async ( + input: ListS3BucketsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/s3Buckets"; + let body: any; + body = JSON.stringify({ + ...(input.NextToken !== undefined && input.NextToken !== null && { nextToken: input.NextToken }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1RemoveAllBackendsCommand = async ( input: RemoveAllBackendsCommandInput, context: __SerdeContext @@ -1129,6 +1351,54 @@ export const serializeAws_restJson1UpdateBackendJobCommand = async ( }); }; +export const serializeAws_restJson1UpdateBackendStorageCommand = async ( + input: UpdateBackendStorageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/backend/{AppId}/storage/{BackendEnvironmentName}"; + if (input.AppId !== undefined) { + const labelValue: string = input.AppId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AppId."); + } + resolvedPath = resolvedPath.replace("{AppId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AppId."); + } + if (input.BackendEnvironmentName !== undefined) { + const labelValue: string = input.BackendEnvironmentName; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: BackendEnvironmentName."); + } + resolvedPath = resolvedPath.replace("{BackendEnvironmentName}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: BackendEnvironmentName."); + } + let body: any; + body = JSON.stringify({ + ...(input.ResourceConfig !== undefined && + input.ResourceConfig !== null && { + resourceConfig: serializeAws_restJson1UpdateBackendStorageResourceConfig(input.ResourceConfig, context), + }), + ...(input.ResourceName !== undefined && input.ResourceName !== null && { resourceName: input.ResourceName }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const deserializeAws_restJson1CloneBackendCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -1616,40 +1886,40 @@ const deserializeAws_restJson1CreateBackendConfigCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateTokenCommand = async ( +export const deserializeAws_restJson1CreateBackendStorageCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateTokenCommandError(output, context); + return deserializeAws_restJson1CreateBackendStorageCommandError(output, context); } - const contents: CreateTokenCommandOutput = { + const contents: CreateBackendStorageCommandOutput = { $metadata: deserializeMetadata(output), AppId: undefined, - ChallengeCode: undefined, - SessionId: undefined, - Ttl: undefined, + BackendEnvironmentName: undefined, + JobId: undefined, + Status: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data.appId !== undefined && data.appId !== null) { contents.AppId = __expectString(data.appId); } - if (data.challengeCode !== undefined && data.challengeCode !== null) { - contents.ChallengeCode = __expectString(data.challengeCode); + if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) { + contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); } - if (data.sessionId !== undefined && data.sessionId !== null) { - contents.SessionId = __expectString(data.sessionId); + if (data.jobId !== undefined && data.jobId !== null) { + contents.JobId = __expectString(data.jobId); } - if (data.ttl !== undefined && data.ttl !== null) { - contents.Ttl = __expectString(data.ttl); + if (data.status !== undefined && data.status !== null) { + contents.Status = __expectString(data.status); } return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateTokenCommandError = async ( +const deserializeAws_restJson1CreateBackendStorageCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -1707,12 +1977,103 @@ const deserializeAws_restJson1CreateTokenCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteBackendCommand = async ( +export const deserializeAws_restJson1CreateTokenCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteBackendCommandError(output, context); + return deserializeAws_restJson1CreateTokenCommandError(output, context); + } + const contents: CreateTokenCommandOutput = { + $metadata: deserializeMetadata(output), + AppId: undefined, + ChallengeCode: undefined, + SessionId: undefined, + Ttl: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.appId !== undefined && data.appId !== null) { + contents.AppId = __expectString(data.appId); + } + if (data.challengeCode !== undefined && data.challengeCode !== null) { + contents.ChallengeCode = __expectString(data.challengeCode); + } + if (data.sessionId !== undefined && data.sessionId !== null) { + contents.SessionId = __expectString(data.sessionId); + } + if (data.ttl !== undefined && data.ttl !== null) { + contents.Ttl = __expectString(data.ttl); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateTokenCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.amplifybackend#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GatewayTimeoutException": + case "com.amazonaws.amplifybackend#GatewayTimeoutException": + response = { + ...(await deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.amplifybackend#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.amplifybackend#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteBackendCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteBackendCommandError(output, context); } const contents: DeleteBackendCommandOutput = { $metadata: deserializeMetadata(output), @@ -2004,6 +2365,97 @@ const deserializeAws_restJson1DeleteBackendAuthCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1DeleteBackendStorageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteBackendStorageCommandError(output, context); + } + const contents: DeleteBackendStorageCommandOutput = { + $metadata: deserializeMetadata(output), + AppId: undefined, + BackendEnvironmentName: undefined, + JobId: undefined, + Status: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.appId !== undefined && data.appId !== null) { + contents.AppId = __expectString(data.appId); + } + if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) { + contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); + } + if (data.jobId !== undefined && data.jobId !== null) { + contents.JobId = __expectString(data.jobId); + } + if (data.status !== undefined && data.status !== null) { + contents.Status = __expectString(data.status); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteBackendStorageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.amplifybackend#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GatewayTimeoutException": + case "com.amazonaws.amplifybackend#GatewayTimeoutException": + response = { + ...(await deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.amplifybackend#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.amplifybackend#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1DeleteTokenCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -2665,40 +3117,321 @@ const deserializeAws_restJson1GetBackendJobCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetTokenCommand = async ( +export const deserializeAws_restJson1GetBackendStorageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetBackendStorageCommandError(output, context); + } + const contents: GetBackendStorageCommandOutput = { + $metadata: deserializeMetadata(output), + AppId: undefined, + BackendEnvironmentName: undefined, + ResourceConfig: undefined, + ResourceName: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.appId !== undefined && data.appId !== null) { + contents.AppId = __expectString(data.appId); + } + if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) { + contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); + } + if (data.resourceConfig !== undefined && data.resourceConfig !== null) { + contents.ResourceConfig = deserializeAws_restJson1GetBackendStorageResourceConfig(data.resourceConfig, context); + } + if (data.resourceName !== undefined && data.resourceName !== null) { + contents.ResourceName = __expectString(data.resourceName); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetBackendStorageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.amplifybackend#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GatewayTimeoutException": + case "com.amazonaws.amplifybackend#GatewayTimeoutException": + response = { + ...(await deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.amplifybackend#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.amplifybackend#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetTokenCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetTokenCommandError(output, context); + } + const contents: GetTokenCommandOutput = { + $metadata: deserializeMetadata(output), + AppId: undefined, + ChallengeCode: undefined, + SessionId: undefined, + Ttl: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.appId !== undefined && data.appId !== null) { + contents.AppId = __expectString(data.appId); + } + if (data.challengeCode !== undefined && data.challengeCode !== null) { + contents.ChallengeCode = __expectString(data.challengeCode); + } + if (data.sessionId !== undefined && data.sessionId !== null) { + contents.SessionId = __expectString(data.sessionId); + } + if (data.ttl !== undefined && data.ttl !== null) { + contents.Ttl = __expectString(data.ttl); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetTokenCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.amplifybackend#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GatewayTimeoutException": + case "com.amazonaws.amplifybackend#GatewayTimeoutException": + response = { + ...(await deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.amplifybackend#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.amplifybackend#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ImportBackendAuthCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ImportBackendAuthCommandError(output, context); + } + const contents: ImportBackendAuthCommandOutput = { + $metadata: deserializeMetadata(output), + AppId: undefined, + BackendEnvironmentName: undefined, + Error: undefined, + JobId: undefined, + Operation: undefined, + Status: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.appId !== undefined && data.appId !== null) { + contents.AppId = __expectString(data.appId); + } + if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) { + contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); + } + if (data.error !== undefined && data.error !== null) { + contents.Error = __expectString(data.error); + } + if (data.jobId !== undefined && data.jobId !== null) { + contents.JobId = __expectString(data.jobId); + } + if (data.operation !== undefined && data.operation !== null) { + contents.Operation = __expectString(data.operation); + } + if (data.status !== undefined && data.status !== null) { + contents.Status = __expectString(data.status); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ImportBackendAuthCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.amplifybackend#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GatewayTimeoutException": + case "com.amazonaws.amplifybackend#GatewayTimeoutException": + response = { + ...(await deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.amplifybackend#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.amplifybackend#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ImportBackendStorageCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetTokenCommandError(output, context); + return deserializeAws_restJson1ImportBackendStorageCommandError(output, context); } - const contents: GetTokenCommandOutput = { + const contents: ImportBackendStorageCommandOutput = { $metadata: deserializeMetadata(output), AppId: undefined, - ChallengeCode: undefined, - SessionId: undefined, - Ttl: undefined, + BackendEnvironmentName: undefined, + JobId: undefined, + Status: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data.appId !== undefined && data.appId !== null) { contents.AppId = __expectString(data.appId); } - if (data.challengeCode !== undefined && data.challengeCode !== null) { - contents.ChallengeCode = __expectString(data.challengeCode); + if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) { + contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); } - if (data.sessionId !== undefined && data.sessionId !== null) { - contents.SessionId = __expectString(data.sessionId); + if (data.jobId !== undefined && data.jobId !== null) { + contents.JobId = __expectString(data.jobId); } - if (data.ttl !== undefined && data.ttl !== null) { - contents.Ttl = __expectString(data.ttl); + if (data.status !== undefined && data.status !== null) { + contents.Status = __expectString(data.status); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetTokenCommandError = async ( +const deserializeAws_restJson1ImportBackendStorageCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2756,48 +3489,32 @@ const deserializeAws_restJson1GetTokenCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ImportBackendAuthCommand = async ( +export const deserializeAws_restJson1ListBackendJobsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ImportBackendAuthCommandError(output, context); + return deserializeAws_restJson1ListBackendJobsCommandError(output, context); } - const contents: ImportBackendAuthCommandOutput = { + const contents: ListBackendJobsCommandOutput = { $metadata: deserializeMetadata(output), - AppId: undefined, - BackendEnvironmentName: undefined, - Error: undefined, - JobId: undefined, - Operation: undefined, - Status: undefined, + Jobs: undefined, + NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId !== undefined && data.appId !== null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error !== undefined && data.error !== null) { - contents.Error = __expectString(data.error); - } - if (data.jobId !== undefined && data.jobId !== null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation !== undefined && data.operation !== null) { - contents.Operation = __expectString(data.operation); + if (data.jobs !== undefined && data.jobs !== null) { + contents.Jobs = deserializeAws_restJson1ListOfBackendJobRespObj(data.jobs, context); } - if (data.status !== undefined && data.status !== null) { - contents.Status = __expectString(data.status); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.NextToken = __expectString(data.nextToken); } return Promise.resolve(contents); }; -const deserializeAws_restJson1ImportBackendAuthCommandError = async ( +const deserializeAws_restJson1ListBackendJobsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2855,21 +3572,21 @@ const deserializeAws_restJson1ImportBackendAuthCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListBackendJobsCommand = async ( +export const deserializeAws_restJson1ListS3BucketsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListBackendJobsCommandError(output, context); + return deserializeAws_restJson1ListS3BucketsCommandError(output, context); } - const contents: ListBackendJobsCommandOutput = { + const contents: ListS3BucketsCommandOutput = { $metadata: deserializeMetadata(output), - Jobs: undefined, + Buckets: undefined, NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobs !== undefined && data.jobs !== null) { - contents.Jobs = deserializeAws_restJson1ListOfBackendJobRespObj(data.jobs, context); + if (data.buckets !== undefined && data.buckets !== null) { + contents.Buckets = deserializeAws_restJson1ListOfS3BucketInfo(data.buckets, context); } if (data.nextToken !== undefined && data.nextToken !== null) { contents.NextToken = __expectString(data.nextToken); @@ -2877,10 +3594,10 @@ export const deserializeAws_restJson1ListBackendJobsCommand = async ( return Promise.resolve(contents); }; -const deserializeAws_restJson1ListBackendJobsCommandError = async ( +const deserializeAws_restJson1ListS3BucketsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3508,6 +4225,97 @@ const deserializeAws_restJson1UpdateBackendJobCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1UpdateBackendStorageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateBackendStorageCommandError(output, context); + } + const contents: UpdateBackendStorageCommandOutput = { + $metadata: deserializeMetadata(output), + AppId: undefined, + BackendEnvironmentName: undefined, + JobId: undefined, + Status: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.appId !== undefined && data.appId !== null) { + contents.AppId = __expectString(data.appId); + } + if (data.backendEnvironmentName !== undefined && data.backendEnvironmentName !== null) { + contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); + } + if (data.jobId !== undefined && data.jobId !== null) { + contents.JobId = __expectString(data.jobId); + } + if (data.status !== undefined && data.status !== null) { + contents.Status = __expectString(data.status); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateBackendStorageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.amplifybackend#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "GatewayTimeoutException": + case "com.amazonaws.amplifybackend#GatewayTimeoutException": + response = { + ...(await deserializeAws_restJson1GatewayTimeoutExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.amplifybackend#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyRequestsException": + case "com.amazonaws.amplifybackend#TooManyRequestsException": + response = { + ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + const deserializeAws_restJson1BadRequestExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -3671,6 +4479,22 @@ const serializeAws_restJson1BackendAuthSocialProviderConfig = ( }; }; +const serializeAws_restJson1BackendStoragePermissions = ( + input: BackendStoragePermissions, + context: __SerdeContext +): any => { + return { + ...(input.Authenticated !== undefined && + input.Authenticated !== null && { + authenticated: serializeAws_restJson1ListOfAuthenticatedElement(input.Authenticated, context), + }), + ...(input.UnAuthenticated !== undefined && + input.UnAuthenticated !== null && { + unAuthenticated: serializeAws_restJson1ListOfUnAuthenticatedElement(input.UnAuthenticated, context), + }), + }; +}; + const serializeAws_restJson1CreateBackendAuthForgotPasswordConfig = ( input: CreateBackendAuthForgotPasswordConfig, context: __SerdeContext @@ -3804,6 +4628,20 @@ const serializeAws_restJson1CreateBackendAuthUserPoolConfig = ( }; }; +const serializeAws_restJson1CreateBackendStorageResourceConfig = ( + input: CreateBackendStorageResourceConfig, + context: __SerdeContext +): any => { + return { + ...(input.BucketName !== undefined && input.BucketName !== null && { bucketName: input.BucketName }), + ...(input.Permissions !== undefined && + input.Permissions !== null && { + permissions: serializeAws_restJson1BackendStoragePermissions(input.Permissions, context), + }), + ...(input.ServiceName !== undefined && input.ServiceName !== null && { serviceName: input.ServiceName }), + }; +}; + const serializeAws_restJson1EmailSettings = (input: EmailSettings, context: __SerdeContext): any => { return { ...(input.EmailMessage !== undefined && input.EmailMessage !== null && { emailMessage: input.EmailMessage }), @@ -3836,6 +4674,20 @@ const serializeAws_restJson1ListOfAdditionalConstraintsElement = ( }); }; +const serializeAws_restJson1ListOfAuthenticatedElement = ( + input: (AuthenticatedElement | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1ListOfBackendAPIAuthType = (input: BackendAPIAuthType[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -3889,6 +4741,20 @@ const serializeAws_restJson1ListOfRequiredSignUpAttributesElement = ( }); }; +const serializeAws_restJson1ListOfUnAuthenticatedElement = ( + input: (UnAuthenticatedElement | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1LoginAuthConfigReqObj = (input: LoginAuthConfigReqObj, context: __SerdeContext): any => { return { ...(input.AwsCognitoIdentityPoolId !== undefined && @@ -4063,6 +4929,19 @@ const serializeAws_restJson1UpdateBackendAuthUserPoolConfig = ( }; }; +const serializeAws_restJson1UpdateBackendStorageResourceConfig = ( + input: UpdateBackendStorageResourceConfig, + context: __SerdeContext +): any => { + return { + ...(input.Permissions !== undefined && + input.Permissions !== null && { + permissions: serializeAws_restJson1BackendStoragePermissions(input.Permissions, context), + }), + ...(input.ServiceName !== undefined && input.ServiceName !== null && { serviceName: input.ServiceName }), + }; +}; + const deserializeAws_restJson1BackendAPIAppSyncAuthSettings = ( output: any, context: __SerdeContext @@ -4156,6 +5035,22 @@ const deserializeAws_restJson1BackendJobRespObj = (output: any, context: __Serde } as any; }; +const deserializeAws_restJson1BackendStoragePermissions = ( + output: any, + context: __SerdeContext +): BackendStoragePermissions => { + return { + Authenticated: + output.authenticated !== undefined && output.authenticated !== null + ? deserializeAws_restJson1ListOfAuthenticatedElement(output.authenticated, context) + : undefined, + UnAuthenticated: + output.unAuthenticated !== undefined && output.unAuthenticated !== null + ? deserializeAws_restJson1ListOfUnAuthenticatedElement(output.unAuthenticated, context) + : undefined, + } as any; +}; + const deserializeAws_restJson1CreateBackendAuthForgotPasswordConfig = ( output: any, context: __SerdeContext @@ -4290,6 +5185,21 @@ const deserializeAws_restJson1EmailSettings = (output: any, context: __SerdeCont } as any; }; +const deserializeAws_restJson1GetBackendStorageResourceConfig = ( + output: any, + context: __SerdeContext +): GetBackendStorageResourceConfig => { + return { + BucketName: __expectString(output.bucketName), + Imported: __expectBoolean(output.imported), + Permissions: + output.permissions !== undefined && output.permissions !== null + ? deserializeAws_restJson1BackendStoragePermissions(output.permissions, context) + : undefined, + ServiceName: __expectString(output.serviceName), + } as any; +}; + const deserializeAws_restJson1ListOf__string = (output: any, context: __SerdeContext): string[] => { return (output || []) .filter((e: any) => e != null) @@ -4315,6 +5225,20 @@ const deserializeAws_restJson1ListOfAdditionalConstraintsElement = ( }); }; +const deserializeAws_restJson1ListOfAuthenticatedElement = ( + output: any, + context: __SerdeContext +): (AuthenticatedElement | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + const deserializeAws_restJson1ListOfBackendAPIAuthType = ( output: any, context: __SerdeContext @@ -4382,6 +5306,31 @@ const deserializeAws_restJson1ListOfRequiredSignUpAttributesElement = ( }); }; +const deserializeAws_restJson1ListOfS3BucketInfo = (output: any, context: __SerdeContext): S3BucketInfo[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1S3BucketInfo(entry, context); + }); +}; + +const deserializeAws_restJson1ListOfUnAuthenticatedElement = ( + output: any, + context: __SerdeContext +): (UnAuthenticatedElement | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + const deserializeAws_restJson1LoginAuthConfigReqObj = (output: any, context: __SerdeContext): LoginAuthConfigReqObj => { return { AwsCognitoIdentityPoolId: __expectString(output.aws_cognito_identity_pool_id), @@ -4391,6 +5340,13 @@ const deserializeAws_restJson1LoginAuthConfigReqObj = (output: any, context: __S } as any; }; +const deserializeAws_restJson1S3BucketInfo = (output: any, context: __SerdeContext): S3BucketInfo => { + return { + CreationDate: __expectString(output.creationDate), + Name: __expectString(output.name), + } as any; +}; + const deserializeAws_restJson1Settings = (output: any, context: __SerdeContext): Settings => { return { MfaTypes: diff --git a/clients/client-api-gateway/src/models/models_0.ts b/clients/client-api-gateway/src/models/models_0.ts index 11ae8719ef6d..6f61441268c5 100644 --- a/clients/client-api-gateway/src/models/models_0.ts +++ b/clients/client-api-gateway/src/models/models_0.ts @@ -2742,7 +2742,7 @@ export interface MethodSetting { loggingLevel?: string; /** - *

Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

+ *

Specifies whether full requests and responses are logged for this method, which affects the log entries pushed to Amazon CloudWatch Logs. This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don't enable this option for production APIs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

*/ dataTraceEnabled?: boolean; diff --git a/clients/client-appconfigdata/.gitignore b/clients/client-appconfigdata/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-appconfigdata/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-appconfigdata/LICENSE b/clients/client-appconfigdata/LICENSE new file mode 100644 index 000000000000..f9e0c8672bca --- /dev/null +++ b/clients/client-appconfigdata/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-appconfigdata/README.md b/clients/client-appconfigdata/README.md new file mode 100644 index 000000000000..08bafdfd7936 --- /dev/null +++ b/clients/client-appconfigdata/README.md @@ -0,0 +1,203 @@ +# @aws-sdk/client-appconfigdata + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-appconfigdata/latest.svg)](https://www.npmjs.com/package/@aws-sdk/client-appconfigdata) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-appconfigdata.svg)](https://www.npmjs.com/package/@aws-sdk/client-appconfigdata) + +## Description + +AWS SDK for JavaScript AppConfigData Client for Node.js, Browser and React Native. + +

Use the AppConfigData API, a capability of AWS AppConfig, to retrieve deployed configuration.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-appconfigdata +using your favorite package manager: + +- `npm install @aws-sdk/client-appconfigdata` +- `yarn add @aws-sdk/client-appconfigdata` +- `pnpm add @aws-sdk/client-appconfigdata` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `AppConfigDataClient` and +the commands you need, for example `GetLatestConfigurationCommand`: + +```js +// ES5 example +const { AppConfigDataClient, GetLatestConfigurationCommand } = require("@aws-sdk/client-appconfigdata"); +``` + +```ts +// ES6+ example +import { AppConfigDataClient, GetLatestConfigurationCommand } from "@aws-sdk/client-appconfigdata"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new AppConfigDataClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new GetLatestConfigurationCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // proccess err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-appconfigdata"; +const client = new AWS.AppConfigData({ region: "REGION" }); + +// async/await. +try { + const data = await client.getLatestConfiguration(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .getLatestConfiguration(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.getLatestConfiguration(params, (err, data) => { + // proccess err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-appconfigdata` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. diff --git a/clients/client-appconfigdata/jest.config.js b/clients/client-appconfigdata/jest.config.js new file mode 100644 index 000000000000..02eed352c6a8 --- /dev/null +++ b/clients/client-appconfigdata/jest.config.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.spec.ts", "!**/*.browser.spec.ts", "!**/*.integ.spec.ts"], +}; diff --git a/clients/client-appconfigdata/package.json b/clients/client-appconfigdata/package.json new file mode 100644 index 000000000000..d3ef166e5234 --- /dev/null +++ b/clients/client-appconfigdata/package.json @@ -0,0 +1,94 @@ +{ + "name": "@aws-sdk/client-appconfigdata", + "description": "AWS SDK for JavaScript Appconfigdata Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "yarn build:cjs && yarn build:es && yarn build:types", + "build:cjs": "tsc -p tsconfig.json", + "build:docs": "yarn clean:docs && typedoc ./", + "build:es": "tsc -p tsconfig.es.json", + "build:types": "tsc -p tsconfig.types.json", + "clean": "yarn clean:dist && yarn clean:docs", + "clean:dist": "rimraf ./dist-*", + "clean:docs": "rimraf ./docs", + "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4", + "test": "jest --coverage --passWithNoTests" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "2.0.0", + "@aws-crypto/sha256-js": "2.0.0", + "@aws-sdk/client-sts": "3.41.0", + "@aws-sdk/config-resolver": "3.40.0", + "@aws-sdk/credential-provider-node": "3.41.0", + "@aws-sdk/fetch-http-handler": "3.40.0", + "@aws-sdk/hash-node": "3.40.0", + "@aws-sdk/invalid-dependency": "3.40.0", + "@aws-sdk/middleware-content-length": "3.40.0", + "@aws-sdk/middleware-host-header": "3.40.0", + "@aws-sdk/middleware-logger": "3.40.0", + "@aws-sdk/middleware-retry": "3.40.0", + "@aws-sdk/middleware-serde": "3.40.0", + "@aws-sdk/middleware-signing": "3.40.0", + "@aws-sdk/middleware-stack": "3.40.0", + "@aws-sdk/middleware-user-agent": "3.40.0", + "@aws-sdk/node-config-provider": "3.40.0", + "@aws-sdk/node-http-handler": "3.40.0", + "@aws-sdk/protocol-http": "3.40.0", + "@aws-sdk/smithy-client": "3.41.0", + "@aws-sdk/types": "3.40.0", + "@aws-sdk/url-parser": "3.40.0", + "@aws-sdk/util-base64-browser": "3.37.0", + "@aws-sdk/util-base64-node": "3.37.0", + "@aws-sdk/util-body-length-browser": "3.37.0", + "@aws-sdk/util-body-length-node": "3.37.0", + "@aws-sdk/util-user-agent-browser": "3.40.0", + "@aws-sdk/util-user-agent-node": "3.40.0", + "@aws-sdk/util-utf8-browser": "3.37.0", + "@aws-sdk/util-utf8-node": "3.37.0", + "tslib": "^2.3.0" + }, + "devDependencies": { + "@aws-sdk/service-client-documentation-generator": "3.38.0", + "@types/node": "^12.7.5", + "downlevel-dts": "0.7.0", + "jest": "^26.1.0", + "rimraf": "^3.0.0", + "ts-jest": "^26.4.1", + "typedoc": "^0.19.2", + "typescript": "~4.3.5" + }, + "engines": { + "node": ">=10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-appconfigdata", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-appconfigdata" + } +} diff --git a/clients/client-appconfigdata/src/AppConfigData.ts b/clients/client-appconfigdata/src/AppConfigData.ts new file mode 100644 index 000000000000..6df70e578ffa --- /dev/null +++ b/clients/client-appconfigdata/src/AppConfigData.ts @@ -0,0 +1,92 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +import { AppConfigDataClient } from "./AppConfigDataClient"; +import { + GetLatestConfigurationCommand, + GetLatestConfigurationCommandInput, + GetLatestConfigurationCommandOutput, +} from "./commands/GetLatestConfigurationCommand"; +import { + StartConfigurationSessionCommand, + StartConfigurationSessionCommandInput, + StartConfigurationSessionCommandOutput, +} from "./commands/StartConfigurationSessionCommand"; + +/** + *

Use the AppConfigData API, a capability of AWS AppConfig, to retrieve deployed configuration.

+ */ +export class AppConfigData extends AppConfigDataClient { + /** + *

Retrieves the latest deployed configuration. This API may return empty Configuration data if the client already has the latest version. See StartConfigurationSession to obtain an InitialConfigurationToken to call this API.

+ * + *

Each call to GetLatestConfiguration returns a new ConfigurationToken (NextPollConfigurationToken + * in the response). This new token MUST be provided to the next call to GetLatestConfiguration when + * polling for configuration updates.

+ *

To avoid excess charges, we recommend that you include the + * ClientConfigurationVersion value with every call to + * GetConfiguration. This value must be saved on your client. Subsequent + * calls to GetConfiguration must pass this value by using the + * ClientConfigurationVersion parameter.

+ *
+ */ + public getLatestConfiguration( + args: GetLatestConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getLatestConfiguration( + args: GetLatestConfigurationCommandInput, + cb: (err: any, data?: GetLatestConfigurationCommandOutput) => void + ): void; + public getLatestConfiguration( + args: GetLatestConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetLatestConfigurationCommandOutput) => void + ): void; + public getLatestConfiguration( + args: GetLatestConfigurationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetLatestConfigurationCommandOutput) => void), + cb?: (err: any, data?: GetLatestConfigurationCommandOutput) => void + ): Promise | void { + const command = new GetLatestConfigurationCommand(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); + } + } + + /** + *

Starts a configuration session used to retrieve a deployed configuration. See the GetLatestConfiguration API for more details.

+ */ + public startConfigurationSession( + args: StartConfigurationSessionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startConfigurationSession( + args: StartConfigurationSessionCommandInput, + cb: (err: any, data?: StartConfigurationSessionCommandOutput) => void + ): void; + public startConfigurationSession( + args: StartConfigurationSessionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartConfigurationSessionCommandOutput) => void + ): void; + public startConfigurationSession( + args: StartConfigurationSessionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartConfigurationSessionCommandOutput) => void), + cb?: (err: any, data?: StartConfigurationSessionCommandOutput) => void + ): Promise | void { + const command = new StartConfigurationSessionCommand(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); + } + } +} diff --git a/clients/client-appconfigdata/src/AppConfigDataClient.ts b/clients/client-appconfigdata/src/AppConfigDataClient.ts new file mode 100644 index 000000000000..7bcab36275a7 --- /dev/null +++ b/clients/client-appconfigdata/src/AppConfigDataClient.ts @@ -0,0 +1,254 @@ +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig, +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@aws-sdk/smithy-client"; +import { + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + RegionInfoProvider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@aws-sdk/types"; + +import { + GetLatestConfigurationCommandInput, + GetLatestConfigurationCommandOutput, +} from "./commands/GetLatestConfigurationCommand"; +import { + StartConfigurationSessionCommandInput, + StartConfigurationSessionCommandOutput, +} from "./commands/StartConfigurationSessionCommand"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; + +export type ServiceInputTypes = GetLatestConfigurationCommandInput | StartConfigurationSessionCommandInput; + +export type ServiceOutputTypes = GetLatestConfigurationCommandOutput | StartConfigurationSessionCommandOutput; + +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link __Hash} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: (body: any) => number | undefined; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dyanamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Fetch related hostname, signing name or signing region with given region. + * @internal + */ + regionInfoProvider?: RegionInfoProvider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; +} + +type AppConfigDataClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig; +/** + * The configuration interface of AppConfigDataClient class constructor that set the region, credentials and other options. + */ +export interface AppConfigDataClientConfig extends AppConfigDataClientConfigType {} + +type AppConfigDataClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig; +/** + * The resolved configuration interface of AppConfigDataClient class. This is resolved and normalized from the {@link AppConfigDataClientConfig | constructor configuration interface}. + */ +export interface AppConfigDataClientResolvedConfig extends AppConfigDataClientResolvedConfigType {} + +/** + *

Use the AppConfigData API, a capability of AWS AppConfig, to retrieve deployed configuration.

+ */ +export class AppConfigDataClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + AppConfigDataClientResolvedConfig +> { + /** + * The resolved configuration of AppConfigDataClient class. This is resolved and normalized from the {@link AppConfigDataClientConfig | constructor configuration interface}. + */ + readonly config: AppConfigDataClientResolvedConfig; + + constructor(configuration: AppConfigDataClientConfig) { + const _config_0 = __getRuntimeConfig(configuration); + const _config_1 = resolveRegionConfig(_config_0); + const _config_2 = resolveEndpointsConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveHostHeaderConfig(_config_3); + const _config_5 = resolveAwsAuthConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-appconfigdata/src/commands/GetLatestConfigurationCommand.ts b/clients/client-appconfigdata/src/commands/GetLatestConfigurationCommand.ts new file mode 100644 index 000000000000..4617f2e33943 --- /dev/null +++ b/clients/client-appconfigdata/src/commands/GetLatestConfigurationCommand.ts @@ -0,0 +1,105 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AppConfigDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppConfigDataClient"; +import { GetLatestConfigurationRequest, GetLatestConfigurationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetLatestConfigurationCommand, + serializeAws_restJson1GetLatestConfigurationCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetLatestConfigurationCommandInput extends GetLatestConfigurationRequest {} +export interface GetLatestConfigurationCommandOutput extends GetLatestConfigurationResponse, __MetadataBearer {} + +/** + *

Retrieves the latest deployed configuration. This API may return empty Configuration data if the client already has the latest version. See StartConfigurationSession to obtain an InitialConfigurationToken to call this API.

+ * + *

Each call to GetLatestConfiguration returns a new ConfigurationToken (NextPollConfigurationToken + * in the response). This new token MUST be provided to the next call to GetLatestConfiguration when + * polling for configuration updates.

+ *

To avoid excess charges, we recommend that you include the + * ClientConfigurationVersion value with every call to + * GetConfiguration. This value must be saved on your client. Subsequent + * calls to GetConfiguration must pass this value by using the + * ClientConfigurationVersion parameter.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppConfigDataClient, GetLatestConfigurationCommand } from "@aws-sdk/client-appconfigdata"; // ES Modules import + * // const { AppConfigDataClient, GetLatestConfigurationCommand } = require("@aws-sdk/client-appconfigdata"); // CommonJS import + * const client = new AppConfigDataClient(config); + * const command = new GetLatestConfigurationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetLatestConfigurationCommandInput} for command's `input` shape. + * @see {@link GetLatestConfigurationCommandOutput} for command's `response` shape. + * @see {@link AppConfigDataClientResolvedConfig | config} for AppConfigDataClient's `config` shape. + * + */ +export class GetLatestConfigurationCommand extends $Command< + GetLatestConfigurationCommandInput, + GetLatestConfigurationCommandOutput, + AppConfigDataClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetLatestConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppConfigDataClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppConfigDataClient"; + const commandName = "GetLatestConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetLatestConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetLatestConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetLatestConfigurationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetLatestConfigurationCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetLatestConfigurationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appconfigdata/src/commands/StartConfigurationSessionCommand.ts b/clients/client-appconfigdata/src/commands/StartConfigurationSessionCommand.ts new file mode 100644 index 000000000000..859e592d8ea3 --- /dev/null +++ b/clients/client-appconfigdata/src/commands/StartConfigurationSessionCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { AppConfigDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppConfigDataClient"; +import { StartConfigurationSessionRequest, StartConfigurationSessionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StartConfigurationSessionCommand, + serializeAws_restJson1StartConfigurationSessionCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartConfigurationSessionCommandInput extends StartConfigurationSessionRequest {} +export interface StartConfigurationSessionCommandOutput extends StartConfigurationSessionResponse, __MetadataBearer {} + +/** + *

Starts a configuration session used to retrieve a deployed configuration. See the GetLatestConfiguration API for more details.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppConfigDataClient, StartConfigurationSessionCommand } from "@aws-sdk/client-appconfigdata"; // ES Modules import + * // const { AppConfigDataClient, StartConfigurationSessionCommand } = require("@aws-sdk/client-appconfigdata"); // CommonJS import + * const client = new AppConfigDataClient(config); + * const command = new StartConfigurationSessionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartConfigurationSessionCommandInput} for command's `input` shape. + * @see {@link StartConfigurationSessionCommandOutput} for command's `response` shape. + * @see {@link AppConfigDataClientResolvedConfig | config} for AppConfigDataClient's `config` shape. + * + */ +export class StartConfigurationSessionCommand extends $Command< + StartConfigurationSessionCommandInput, + StartConfigurationSessionCommandOutput, + AppConfigDataClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartConfigurationSessionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: AppConfigDataClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "AppConfigDataClient"; + const commandName = "StartConfigurationSessionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartConfigurationSessionRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartConfigurationSessionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartConfigurationSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartConfigurationSessionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1StartConfigurationSessionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-appconfigdata/src/commands/index.ts b/clients/client-appconfigdata/src/commands/index.ts new file mode 100644 index 000000000000..8c331a4b6dfe --- /dev/null +++ b/clients/client-appconfigdata/src/commands/index.ts @@ -0,0 +1,2 @@ +export * from "./GetLatestConfigurationCommand"; +export * from "./StartConfigurationSessionCommand"; diff --git a/clients/client-appconfigdata/src/endpoints.ts b/clients/client-appconfigdata/src/endpoints.ts new file mode 100644 index 000000000000..9cad5eba5350 --- /dev/null +++ b/clients/client-appconfigdata/src/endpoints.ts @@ -0,0 +1,134 @@ +import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; + +const regionHash: RegionHash = {}; + +const partitionHash: PartitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "appconfigdata.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "appconfigdata-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "appconfigdata-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "appconfigdata.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + regionRegex: "^cn\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "appconfigdata.{region}.amazonaws.com.cn", + tags: [], + }, + { + hostname: "appconfigdata-fips.{region}.amazonaws.com.cn", + tags: ["fips"], + }, + { + hostname: "appconfigdata-fips.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack", "fips"], + }, + { + hostname: "appconfigdata.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack"], + }, + ], + }, + "aws-iso": { + regions: ["us-iso-east-1", "us-iso-west-1"], + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "appconfigdata.{region}.c2s.ic.gov", + tags: [], + }, + { + hostname: "appconfigdata-fips.{region}.c2s.ic.gov", + tags: ["fips"], + }, + ], + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "appconfigdata.{region}.sc2s.sgov.gov", + tags: [], + }, + { + hostname: "appconfigdata-fips.{region}.sc2s.sgov.gov", + tags: ["fips"], + }, + ], + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-west-1"], + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "appconfigdata.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "appconfigdata-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "appconfigdata-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "appconfigdata.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, +}; + +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => + getRegionInfo(region, { + ...options, + signingService: "appconfig", + regionHash, + partitionHash, + }); diff --git a/clients/client-appconfigdata/src/index.ts b/clients/client-appconfigdata/src/index.ts new file mode 100644 index 000000000000..abd33080caf0 --- /dev/null +++ b/clients/client-appconfigdata/src/index.ts @@ -0,0 +1,4 @@ +export * from "./AppConfigData"; +export * from "./AppConfigDataClient"; +export * from "./commands"; +export * from "./models"; diff --git a/clients/client-appconfigdata/src/models/index.ts b/clients/client-appconfigdata/src/models/index.ts new file mode 100644 index 000000000000..09c5d6e09b8c --- /dev/null +++ b/clients/client-appconfigdata/src/models/index.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/clients/client-appconfigdata/src/models/models_0.ts b/clients/client-appconfigdata/src/models/models_0.ts new file mode 100644 index 000000000000..27373c802f39 --- /dev/null +++ b/clients/client-appconfigdata/src/models/models_0.ts @@ -0,0 +1,319 @@ +import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; + +export enum InvalidParameterProblem { + /** + * The parameter was corrupted and could not be understood by the service. + */ + CORRUPTED = "Corrupted", + /** + * The parameter was expired and can no longer be used. + */ + EXPIRED = "Expired", + /** + * The client called the service before the time specified in the poll interval. + */ + POLL_INTERVAL_NOT_SATISFIED = "PollIntervalNotSatisfied", +} + +/** + *

Contains details about an invalid parameter.

+ */ +export interface InvalidParameterDetail { + /** + *

Detail describing why an individual parameter did not satisfy the constraints specified by the service

+ */ + Problem?: InvalidParameterProblem | string; +} + +export namespace InvalidParameterDetail { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidParameterDetail): any => ({ + ...obj, + }); +} + +/** + *

Details describing why the request was invalid

+ */ +export type BadRequestDetails = BadRequestDetails.InvalidParametersMember | BadRequestDetails.$UnknownMember; + +export namespace BadRequestDetails { + /** + *

Present if the Reason for the bad request was 'InvalidParameters'

+ */ + export interface InvalidParametersMember { + InvalidParameters: { [key: string]: InvalidParameterDetail }; + $unknown?: never; + } + + export interface $UnknownMember { + InvalidParameters?: never; + $unknown: [string, any]; + } + + export interface Visitor { + InvalidParameters: (value: { [key: string]: InvalidParameterDetail }) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: BadRequestDetails, visitor: Visitor): T => { + if (value.InvalidParameters !== undefined) return visitor.InvalidParameters(value.InvalidParameters); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; + + /** + * @internal + */ + export const filterSensitiveLog = (obj: BadRequestDetails): any => { + if (obj.InvalidParameters !== undefined) + return { + InvalidParameters: Object.entries(obj.InvalidParameters).reduce( + (acc: any, [key, value]: [string, InvalidParameterDetail]) => ({ + ...acc, + [key]: InvalidParameterDetail.filterSensitiveLog(value), + }), + {} + ), + }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; + }; +} + +export enum BadRequestReason { + /** + * Indicates there was a problem with one or more of the parameters. + * See InvalidParameters in the BadRequestDetails for more information. + */ + INVALID_PARAMETERS = "InvalidParameters", +} + +/** + *

The input fails to satisfy the constraints specified by the service.

+ */ +export interface BadRequestException extends __SmithyException, $MetadataBearer { + name: "BadRequestException"; + $fault: "client"; + Message?: string; + /** + *

Code indicating the reason the request was invalid.

+ */ + Reason?: BadRequestReason | string; + + /** + *

Details describing why the request was invalid

+ */ + Details?: BadRequestDetails; +} + +export namespace BadRequestException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BadRequestException): any => ({ + ...obj, + ...(obj.Details && { Details: BadRequestDetails.filterSensitiveLog(obj.Details) }), + }); +} + +/** + *

There was an internal failure in the service.

+ */ +export interface InternalServerException extends __SmithyException, $MetadataBearer { + name: "InternalServerException"; + $fault: "server"; + Message?: string; +} + +export namespace InternalServerException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InternalServerException): any => ({ + ...obj, + }); +} + +export enum ResourceType { + /** + * Resource type value for the Application resource. + */ + APPLICATION = "Application", + /** + * Resource type value for the Configuration resource. + */ + CONFIGURATION = "Configuration", + /** + * Resource type value for the ConfigurationProfile resource. + */ + CONFIGURATION_PROFILE = "ConfigurationProfile", + /** + * Resource type value for the Deployment resource. + */ + DEPLOYMENT = "Deployment", + /** + * Resource type value for the Environment resource. + */ + ENVIRONMENT = "Environment", +} + +/** + *

The requested resource could not be found.

+ */ +export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { + name: "ResourceNotFoundException"; + $fault: "client"; + Message?: string; + /** + *

The type of resource that was not found.

+ */ + ResourceType?: ResourceType | string; + + /** + *

A map indicating which parameters in the request reference the resource that was not found.

+ */ + ReferencedBy?: { [key: string]: string }; +} + +export namespace ResourceNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ + ...obj, + }); +} + +/** + *

Request parameters for the StartConfigurationSession API.

+ */ +export interface StartConfigurationSessionRequest { + /** + *

The application ID or the application name.

+ */ + ApplicationIdentifier: string | undefined; + + /** + *

The environment ID or the environment name.

+ */ + EnvironmentIdentifier: string | undefined; + + /** + *

The configuration profile ID or the configuration profile name.

+ */ + ConfigurationProfileIdentifier: string | undefined; + + /** + *

The interval at which your client will poll for configuration. If provided, the service + * will throw a BadRequestException if the client polls before the specified poll interval. By default, + * client poll intervals are not enforced.

+ */ + RequiredMinimumPollIntervalInSeconds?: number; +} + +export namespace StartConfigurationSessionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartConfigurationSessionRequest): any => ({ + ...obj, + }); +} + +/** + *

Response parameters for the StartConfigurationSession API.

+ */ +export interface StartConfigurationSessionResponse { + /** + *

Token encapsulating state about the configuration session. Provide this token to the GetLatestConfiguration API to retrieve configuration data.

+ * + *

This token should only be used once in your first call to GetLatestConfiguration. You MUST use the + * new token in the GetConfiguration response (NextPollConfigurationToken) in each subsequent call to + * GetLatestConfiguration.

+ *
+ */ + InitialConfigurationToken?: string; +} + +export namespace StartConfigurationSessionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartConfigurationSessionResponse): any => ({ + ...obj, + }); +} + +/** + *

The request was denied due to request throttling.

+ */ +export interface ThrottlingException extends __SmithyException, $MetadataBearer { + name: "ThrottlingException"; + $fault: "client"; + Message?: string; +} + +export namespace ThrottlingException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ThrottlingException): any => ({ + ...obj, + }); +} + +/** + *

Request parameters for the GetLatestConfiguration API

+ */ +export interface GetLatestConfigurationRequest { + /** + *

Token describing the current state of the configuration session. To obtain a token, first call the StartConfigurationSession API. Note that every call to GetLatestConfiguration will return a new ConfigurationToken (NextPollConfigurationToken in the response) and MUST be provided to subsequent GetLatestConfiguration API calls.

+ */ + ConfigurationToken: string | undefined; +} + +export namespace GetLatestConfigurationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetLatestConfigurationRequest): any => ({ + ...obj, + }); +} + +/** + *

Response parameters for the GetLatestConfiguration API

+ */ +export interface GetLatestConfigurationResponse { + /** + *

The latest token describing the current state of the configuration session. This MUST be provided to the next call to GetLatestConfiguration.

+ */ + NextPollConfigurationToken?: string; + + /** + *

The amount of time the client should wait before polling for configuration updates again. See RequiredMinimumPollIntervalInSeconds to set the desired poll interval.

+ */ + NextPollIntervalInSeconds?: number; + + /** + *

A standard MIME type describing the format of the configuration content.

+ */ + ContentType?: string; + + /** + *

The data of the configuration. Note that this may be empty if the client already has the latest version of configuration.

+ */ + Configuration?: Uint8Array; +} + +export namespace GetLatestConfigurationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetLatestConfigurationResponse): any => ({ + ...obj, + ...(obj.Configuration && { Configuration: SENSITIVE_STRING }), + }); +} diff --git a/clients/client-appconfigdata/src/protocols/Aws_restJson1.ts b/clients/client-appconfigdata/src/protocols/Aws_restJson1.ts new file mode 100644 index 000000000000..2cdc776ea99e --- /dev/null +++ b/clients/client-appconfigdata/src/protocols/Aws_restJson1.ts @@ -0,0 +1,458 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { + expectNonNull as __expectNonNull, + expectObject as __expectObject, + expectString as __expectString, + expectUnion as __expectUnion, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + strictParseInt32 as __strictParseInt32, +} from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, + SmithyException as __SmithyException, +} from "@aws-sdk/types"; + +import { + GetLatestConfigurationCommandInput, + GetLatestConfigurationCommandOutput, +} from "../commands/GetLatestConfigurationCommand"; +import { + StartConfigurationSessionCommandInput, + StartConfigurationSessionCommandOutput, +} from "../commands/StartConfigurationSessionCommand"; +import { + BadRequestDetails, + BadRequestException, + InternalServerException, + InvalidParameterDetail, + ResourceNotFoundException, + ThrottlingException, +} from "../models/models_0"; + +export const serializeAws_restJson1GetLatestConfigurationCommand = async ( + input: GetLatestConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration"; + const query: any = { + ...(input.ConfigurationToken !== undefined && { configuration_token: input.ConfigurationToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1StartConfigurationSessionCommand = async ( + input: StartConfigurationSessionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configurationsessions"; + let body: any; + body = JSON.stringify({ + ...(input.ApplicationIdentifier !== undefined && + input.ApplicationIdentifier !== null && { ApplicationIdentifier: input.ApplicationIdentifier }), + ...(input.ConfigurationProfileIdentifier !== undefined && + input.ConfigurationProfileIdentifier !== null && { + ConfigurationProfileIdentifier: input.ConfigurationProfileIdentifier, + }), + ...(input.EnvironmentIdentifier !== undefined && + input.EnvironmentIdentifier !== null && { EnvironmentIdentifier: input.EnvironmentIdentifier }), + ...(input.RequiredMinimumPollIntervalInSeconds !== undefined && + input.RequiredMinimumPollIntervalInSeconds !== null && { + RequiredMinimumPollIntervalInSeconds: input.RequiredMinimumPollIntervalInSeconds, + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1GetLatestConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetLatestConfigurationCommandError(output, context); + } + const contents: GetLatestConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + Configuration: undefined, + ContentType: undefined, + NextPollConfigurationToken: undefined, + NextPollIntervalInSeconds: undefined, + }; + if (output.headers["next-poll-configuration-token"] !== undefined) { + contents.NextPollConfigurationToken = output.headers["next-poll-configuration-token"]; + } + if (output.headers["next-poll-interval-in-seconds"] !== undefined) { + contents.NextPollIntervalInSeconds = __strictParseInt32(output.headers["next-poll-interval-in-seconds"]); + } + if (output.headers["content-type"] !== undefined) { + contents.ContentType = output.headers["content-type"]; + } + const data: any = await collectBody(output.body, context); + contents.Configuration = data; + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetLatestConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appconfigdata#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.appconfigdata#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.appconfigdata#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.appconfigdata#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartConfigurationSessionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1StartConfigurationSessionCommandError(output, context); + } + const contents: StartConfigurationSessionCommandOutput = { + $metadata: deserializeMetadata(output), + InitialConfigurationToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.InitialConfigurationToken !== undefined && data.InitialConfigurationToken !== null) { + contents.InitialConfigurationToken = __expectString(data.InitialConfigurationToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartConfigurationSessionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.appconfigdata#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.appconfigdata#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.appconfigdata#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.appconfigdata#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +const deserializeAws_restJson1BadRequestExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: BadRequestException = { + name: "BadRequestException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Details: undefined, + Message: undefined, + Reason: undefined, + }; + const data: any = parsedOutput.body; + if (data.Details !== undefined && data.Details !== null) { + contents.Details = deserializeAws_restJson1BadRequestDetails(__expectUnion(data.Details), context); + } + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + if (data.Reason !== undefined && data.Reason !== null) { + contents.Reason = __expectString(data.Reason); + } + return contents; +}; + +const deserializeAws_restJson1InternalServerExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: InternalServerException = { + name: "InternalServerException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + }; + const data: any = parsedOutput.body; + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + return contents; +}; + +const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ResourceNotFoundException = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + ReferencedBy: undefined, + ResourceType: undefined, + }; + const data: any = parsedOutput.body; + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + if (data.ReferencedBy !== undefined && data.ReferencedBy !== null) { + contents.ReferencedBy = deserializeAws_restJson1StringMap(data.ReferencedBy, context); + } + if (data.ResourceType !== undefined && data.ResourceType !== null) { + contents.ResourceType = __expectString(data.ResourceType); + } + return contents; +}; + +const deserializeAws_restJson1ThrottlingExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ThrottlingException = { + name: "ThrottlingException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + }; + const data: any = parsedOutput.body; + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + return contents; +}; + +const deserializeAws_restJson1BadRequestDetails = (output: any, context: __SerdeContext): BadRequestDetails => { + if (output.InvalidParameters !== undefined && output.InvalidParameters !== null) { + return { + InvalidParameters: deserializeAws_restJson1InvalidParameterMap(output.InvalidParameters, context), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +const deserializeAws_restJson1InvalidParameterDetail = ( + output: any, + context: __SerdeContext +): InvalidParameterDetail => { + return { + Problem: __expectString(output.Problem), + } as any; +}; + +const deserializeAws_restJson1InvalidParameterMap = ( + output: any, + context: __SerdeContext +): { [key: string]: InvalidParameterDetail } => { + return Object.entries(output).reduce( + (acc: { [key: string]: InvalidParameterDetail }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_restJson1InvalidParameterDetail(value, context), + }; + }, + {} + ); +}; + +const deserializeAws_restJson1StringMap = (output: any, context: __SerdeContext): { [key: string]: string } => { + return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: __expectString(value) as any, + }; + }, {}); +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const isSerializableHeaderValue = (value: any): boolean => + value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string): string => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + + return ""; +}; diff --git a/clients/client-appconfigdata/src/runtimeConfig.browser.ts b/clients/client-appconfigdata/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..c4b8813c7c63 --- /dev/null +++ b/clients/client-appconfigdata/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; +import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; +import { invalidProvider } from "@aws-sdk/invalid-dependency"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; +import { AppConfigDataClientConfig } from "./AppConfigDataClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: AppConfigDataClientConfig) => { + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new FetchHttpHandler(), + retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-appconfigdata/src/runtimeConfig.native.ts b/clients/client-appconfigdata/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..230b0ebcd886 --- /dev/null +++ b/clients/client-appconfigdata/src/runtimeConfig.native.ts @@ -0,0 +1,17 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { AppConfigDataClientConfig } from "./AppConfigDataClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: AppConfigDataClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-appconfigdata/src/runtimeConfig.shared.ts b/clients/client-appconfigdata/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..9af63a1ab17c --- /dev/null +++ b/clients/client-appconfigdata/src/runtimeConfig.shared.ts @@ -0,0 +1,17 @@ +import { Logger as __Logger } from "@aws-sdk/types"; +import { parseUrl } from "@aws-sdk/url-parser"; + +import { AppConfigDataClientConfig } from "./AppConfigDataClient"; +import { defaultRegionInfoProvider } from "./endpoints"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: AppConfigDataClientConfig) => ({ + apiVersion: "2021-11-11", + disableHostPrefix: config?.disableHostPrefix ?? false, + logger: config?.logger ?? ({} as __Logger), + regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider, + serviceId: config?.serviceId ?? "AppConfigData", + urlParser: config?.urlParser ?? parseUrl, +}); diff --git a/clients/client-appconfigdata/src/runtimeConfig.ts b/clients/client-appconfigdata/src/runtimeConfig.ts new file mode 100644 index 000000000000..1061d5f63ca2 --- /dev/null +++ b/clients/client-appconfigdata/src/runtimeConfig.ts @@ -0,0 +1,53 @@ +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { Hash } from "@aws-sdk/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; +import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; +import { AppConfigDataClientConfig } from "./AppConfigDataClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: AppConfigDataClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new NodeHttpHandler(), + retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-appconfigdata/tsconfig.es.json b/clients/client-appconfigdata/tsconfig.es.json new file mode 100644 index 000000000000..4c72364cd1a0 --- /dev/null +++ b/clients/client-appconfigdata/tsconfig.es.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], + "outDir": "dist-es" + } +} diff --git a/clients/client-appconfigdata/tsconfig.json b/clients/client-appconfigdata/tsconfig.json new file mode 100644 index 000000000000..093039289c53 --- /dev/null +++ b/clients/client-appconfigdata/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "alwaysStrict": true, + "target": "ES2018", + "module": "commonjs", + "strict": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "outDir": "dist-cjs", + "removeComments": true + }, + "typedocOptions": { + "exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"], + "excludeNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "includeDeclarations": true, + "stripInternal": true, + "readme": "README.md", + "mode": "file", + "out": "docs", + "theme": "minimal", + "plugin": ["@aws-sdk/service-client-documentation-generator"] + }, + "exclude": ["test/**/*"] +} diff --git a/clients/client-appconfigdata/tsconfig.types.json b/clients/client-appconfigdata/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-appconfigdata/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-appstream/src/models/models_0.ts b/clients/client-appstream/src/models/models_0.ts index ceff5c0119c6..31d02fa16f18 100644 --- a/clients/client-appstream/src/models/models_0.ts +++ b/clients/client-appstream/src/models/models_0.ts @@ -1634,7 +1634,7 @@ export namespace NetworkAccessConfiguration { }); } -export type PlatformType = "WINDOWS" | "WINDOWS_SERVER_2016" | "WINDOWS_SERVER_2019"; +export type PlatformType = "AMAZON_LINUX2" | "WINDOWS" | "WINDOWS_SERVER_2016" | "WINDOWS_SERVER_2019"; export enum ImageBuilderState { DELETING = "DELETING", diff --git a/clients/client-appstream/src/protocols/Aws_json1_1.ts b/clients/client-appstream/src/protocols/Aws_json1_1.ts index 697c9259ff6f..e672a3c0a9dd 100644 --- a/clients/client-appstream/src/protocols/Aws_json1_1.ts +++ b/clients/client-appstream/src/protocols/Aws_json1_1.ts @@ -3072,6 +3072,14 @@ const deserializeAws_json1_1DescribeUsersCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "OperationNotPermittedException": + case "com.amazonaws.appstream#OperationNotPermittedException": + response = { + ...(await deserializeAws_json1_1OperationNotPermittedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ResourceNotFoundException": case "com.amazonaws.appstream#ResourceNotFoundException": response = { diff --git a/clients/client-cloudtrail/src/models/models_0.ts b/clients/client-cloudtrail/src/models/models_0.ts index ddd19533b729..d6614e414b68 100644 --- a/clients/client-cloudtrail/src/models/models_0.ts +++ b/clients/client-cloudtrail/src/models/models_0.ts @@ -326,11 +326,55 @@ export interface AdvancedFieldSelector { * resources.type * - This field is required. * resources.type can only use the Equals operator, and the - * value can be one of the following: AWS::S3::Object, - * AWS::S3::AccessPoint, - * AWS::Lambda::Function, AWS::DynamoDB::Table, - * AWS::S3Outposts::Object, AWS::ManagedBlockchain::Node, - * AWS::S3ObjectLambda::AccessPoint, or AWS::EC2::Snapshot. + * value can be one of the following:

+ *
    + *
  • + *

    + * AWS::S3::Object + *

    + *
  • + *
  • + *

    + * AWS::Lambda::Function + *

    + *
  • + *
  • + *

    + * AWS::DynamoDB::Table + *

    + *
  • + *
  • + *

    + * AWS::S3Outposts::Object + *

    + *
  • + *
  • + *

    + * AWS::ManagedBlockchain::Node + *

    + *
  • + *
  • + *

    + * AWS::S3ObjectLambda::AccessPoint + *

    + *
  • + *
  • + *

    + * AWS::EC2::Snapshot + *

    + *
  • + *
  • + *

    + * AWS::S3::AccessPoint + *

    + *
  • + *
  • + *

    + * AWS::DynamoDB::Stream + *

    + *
  • + *
+ *

* You can have only one resources.type field per selector. To log data * events on more than one resource type, add another selector.

* @@ -339,7 +383,7 @@ export interface AdvancedFieldSelector { * * resources.ARN * - You can use any operator with - * resources.ARN, but if you use Equals or NotEquals, the + * resources.ARN, but if you use Equals or NotEquals, the * value must exactly match the ARN of a valid resource of the type you've specified in * the template as the value of resources.type. For example, if resources.type equals * AWS::S3::Object, the ARN must be in one of the following formats. To @@ -391,7 +435,7 @@ export interface AdvancedFieldSelector { *
    *
  • *

    - * arn::dynamodb:::table: + * arn::dynamodb:::table/ *

    *
  • *
@@ -435,6 +479,15 @@ export interface AdvancedFieldSelector { *

* * + *

When resources.type equals AWS::DynamoDB::Stream, and the operator is set to + * Equals or NotEquals, the ARN must be in the following format:

+ *
    + *
  • + *

    + * arn::dynamodb:::table//stream/ + *

    + *
  • + *
* * */ @@ -1635,12 +1688,60 @@ export namespace GetEventSelectorsRequest { export interface DataResource { /** *

The resource type in which you want to log data events. You can specify - * AWS::S3::Object, AWS::Lambda::Function, or - * AWS::DynamoDB::Table resources.

- *

The AWS::S3Outposts::Object, AWS::ManagedBlockchain::Node, - * AWS::S3ObjectLambda::AccessPoint, and AWS::EC2::Snapshot resource types are not valid in basic - * event selectors. To log data events on these resource types, use advanced event - * selectors.

+ * the following basic event selector resource types:

+ *
    + *
  • + *

    + * AWS::S3::Object + *

    + *
  • + *
  • + *

    + * AWS::Lambda::Function + *

    + *
  • + *
  • + *

    + * AWS::DynamoDB::Table + *

    + *
  • + *
+ *

The following resource types are also availble through advanced event selectors. + * Basic event selector resource types are valid in advanced event selectors, but + * advanced event selector resource types are not valid in basic event selectors. + * For more information, see AdvancedFieldSelector$Field.

+ *
    + *
  • + *

    + * AWS::S3Outposts::Object + *

    + *
  • + *
  • + *

    + * AWS::ManagedBlockchain::Node + *

    + *
  • + *
  • + *

    + * AWS::S3ObjectLambda::AccessPoint + *

    + *
  • + *
  • + *

    + * AWS::EC2::Snapshot + *

    + *
  • + *
  • + *

    + * AWS::S3::AccessPoint + *

    + *
  • + *
  • + *

    + * AWS::DynamoDB::Stream + *

    + *
  • + *
*/ Type?: string; @@ -1836,6 +1937,7 @@ export namespace GetInsightSelectorsRequest { export enum InsightType { ApiCallRateInsight = "ApiCallRateInsight", + ApiErrorRateInsight = "ApiErrorRateInsight", } /** diff --git a/clients/client-connect/README.md b/clients/client-connect/README.md index 9ff2373a703c..351d69986ce6 100644 --- a/clients/client-connect/README.md +++ b/clients/client-connect/README.md @@ -17,7 +17,7 @@ to the number of requests that you can make per second. For more information, se Service Quotas in the Amazon Connect Administrator Guide.

You can connect -programmatically to an Amazon Web Services service by using an endpoint. For a list of Amazon Connect endpoints, see +programmatically to an AWS service by using an endpoint. For a list of Amazon Connect endpoints, see Amazon Connect Endpoints.

diff --git a/clients/client-connect/src/Connect.ts b/clients/client-connect/src/Connect.ts index cd6cffca5516..94fb62ba596f 100644 --- a/clients/client-connect/src/Connect.ts +++ b/clients/client-connect/src/Connect.ts @@ -133,6 +133,11 @@ import { DescribeAgentStatusCommandInput, DescribeAgentStatusCommandOutput, } from "./commands/DescribeAgentStatusCommand"; +import { + DescribeContactCommand, + DescribeContactCommandInput, + DescribeContactCommandOutput, +} from "./commands/DescribeContactCommand"; import { DescribeContactFlowCommand, DescribeContactFlowCommandInput, @@ -269,6 +274,11 @@ import { ListContactFlowsCommandInput, ListContactFlowsCommandOutput, } from "./commands/ListContactFlowsCommand"; +import { + ListContactReferencesCommand, + ListContactReferencesCommandInput, + ListContactReferencesCommandOutput, +} from "./commands/ListContactReferencesCommand"; import { ListHoursOfOperationsCommand, ListHoursOfOperationsCommandInput, @@ -420,6 +430,11 @@ import { UpdateContactAttributesCommandInput, UpdateContactAttributesCommandOutput, } from "./commands/UpdateContactAttributesCommand"; +import { + UpdateContactCommand, + UpdateContactCommandInput, + UpdateContactCommandOutput, +} from "./commands/UpdateContactCommand"; import { UpdateContactFlowContentCommand, UpdateContactFlowContentCommandInput, @@ -430,6 +445,11 @@ import { UpdateContactFlowNameCommandInput, UpdateContactFlowNameCommandOutput, } from "./commands/UpdateContactFlowNameCommand"; +import { + UpdateContactScheduleCommand, + UpdateContactScheduleCommandInput, + UpdateContactScheduleCommandOutput, +} from "./commands/UpdateContactScheduleCommand"; import { UpdateHoursOfOperationCommand, UpdateHoursOfOperationCommandInput, @@ -553,7 +573,7 @@ import { ConnectClient } from "./ConnectClient"; * Service Quotas in the Amazon Connect Administrator Guide.

*

You can * connect - * programmatically to an Amazon Web Services service by using an endpoint. For a list of Amazon Connect endpoints, see + * programmatically to an AWS service by using an endpoint. For a list of Amazon Connect endpoints, see * Amazon Connect * Endpoints.

* @@ -964,7 +984,7 @@ export class Connect extends ConnectClient { } /** - *

Creates an Amazon Web Services resource association with an Amazon Connect instance.

+ *

Creates an AWS resource association with an Amazon Connect instance.

*/ public createIntegrationAssociation( args: CreateIntegrationAssociationCommandInput, @@ -1280,7 +1300,7 @@ export class Connect extends ConnectClient { } /** - *

Deletes an Amazon Web Services resource association from an Amazon Connect instance. The association must not have + *

Deletes an AWS resource association from an Amazon Connect instance. The association must not have * any use cases associated with it.

*/ public deleteIntegrationAssociation( @@ -1504,6 +1524,42 @@ export class Connect extends ConnectClient { } } + /** + *

This API is in preview release for Amazon Connect and is subject to change.

+ *

Describes the specified contact.

+ * + *

Contact information is available in Amazon Connect for 24 months, and then it is deleted.

+ *
+ */ + public describeContact( + args: DescribeContactCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeContact( + args: DescribeContactCommandInput, + cb: (err: any, data?: DescribeContactCommandOutput) => void + ): void; + public describeContact( + args: DescribeContactCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeContactCommandOutput) => void + ): void; + public describeContact( + args: DescribeContactCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeContactCommandOutput) => void), + cb?: (err: any, data?: DescribeContactCommandOutput) => void + ): Promise | void { + const command = new DescribeContactCommand(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); + } + } + /** *

Describes the specified contact flow.

*

You can also create and update contact flows using the Amazon Connect @@ -2374,8 +2430,8 @@ export class Connect extends ConnectClient { /** *

This API is in preview release for Amazon Connect and is subject to change.

- *

For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated with the - * instance.

+ *

For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently + * associated with the instance.

*/ public listBots(args: ListBotsCommandInput, options?: __HttpHandlerOptions): Promise; public listBots(args: ListBotsCommandInput, cb: (err: any, data?: ListBotsCommandOutput) => void): void; @@ -2436,6 +2492,40 @@ export class Connect extends ConnectClient { } } + /** + *

This API is in preview release for Amazon Connect and is subject to change.

+ *

For the specified referenceTypes, returns a list of references associated with + * the contact.

+ */ + public listContactReferences( + args: ListContactReferencesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listContactReferences( + args: ListContactReferencesCommandInput, + cb: (err: any, data?: ListContactReferencesCommandOutput) => void + ): void; + public listContactReferences( + args: ListContactReferencesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListContactReferencesCommandOutput) => void + ): void; + public listContactReferences( + args: ListContactReferencesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListContactReferencesCommandOutput) => void), + cb?: (err: any, data?: ListContactReferencesCommandOutput) => void + ): Promise | void { + const command = new ListContactReferencesCommand(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); + } + } + /** *

Provides information about the hours of operation for the specified Amazon Connect instance.

*

For more information about hours of operation, see Set the Hours of Operation for a @@ -2574,7 +2664,7 @@ export class Connect extends ConnectClient { } /** - *

Provides summary information about the Amazon Web Services resource associations for the specified Amazon Connect + *

Provides summary information about the AWS resource associations for the specified Amazon Connect * instance.

*/ public listIntegrationAssociations( @@ -2959,8 +3049,7 @@ export class Connect extends ConnectClient { } /** - *

This API is in preview release for Amazon Connect and is subject to change.

- *

Provides summary information about the security profiles for the specified Amazon Connect + *

Provides summary information about the security profiles for the specified Amazon Connect * instance.

*

For more information about security profiles, see Security Profiles in the * Amazon Connect Administrator Guide.

@@ -3247,7 +3336,7 @@ export class Connect extends ConnectClient { /** *

Initiates real-time message streaming for a new chat contact.

*

For more information about message streaming, see Enable real-time chat message - * streaming in the Amazon Connect Administrator Guide.

+ * streaming in the Amazon Connect Administrator Guide.

*/ public startContactStreaming( args: StartContactStreamingCommandInput, @@ -3295,8 +3384,9 @@ export class Connect extends ConnectClient { *
* *

Campaign calls are not allowed by default. Before you can make a call with - * TrafficType = CAMPAIGN, you must submit a service quota increase request. For more information, see - * Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

+ * TrafficType = CAMPAIGN, you must submit a service quota increase + * request. For more information, see Amazon Connect Service Quotas + * in the Amazon Connect Administrator Guide.

*
*/ public startOutboundVoiceContact( @@ -3329,7 +3419,8 @@ export class Connect extends ConnectClient { } /** - *

Initiates a contact flow to start a new task.

+ *

Initiates a contact flow to start a new task immediately or at a future date and + * time.

*/ public startTaskContact( args: StartTaskContactCommandInput, @@ -3497,8 +3588,8 @@ export class Connect extends ConnectClient { /** *

Adds the specified tags to the specified resource.

- *

The supported resource types are users, routing profiles, queues, quick connects, - * contact flows, agent status, and hours of operation.

+ *

The supported resource types are users, routing profiles, queues, quick connects, contact + * flows, agent status, and hours of operation.

*

For sample policies that use tags, see Amazon Connect Identity-Based * Policy Examples in the Amazon Connect Administrator Guide.

*/ @@ -3590,6 +3681,44 @@ export class Connect extends ConnectClient { } } + /** + *

This API is in preview release for Amazon Connect and is subject to change.

+ *

Adds or updates user defined contact information associated with the specified contact. At + * least one field to be updated must be present in the request.

+ * + *

You can add or update user-defined contact information for both ongoing and completed + * contacts.

+ *
+ */ + public updateContact( + args: UpdateContactCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateContact( + args: UpdateContactCommandInput, + cb: (err: any, data?: UpdateContactCommandOutput) => void + ): void; + public updateContact( + args: UpdateContactCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateContactCommandOutput) => void + ): void; + public updateContact( + args: UpdateContactCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateContactCommandOutput) => void), + cb?: (err: any, data?: UpdateContactCommandOutput) => void + ): Promise | void { + const command = new UpdateContactCommand(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); + } + } + /** *

Creates or updates * user-defined contact attributes @@ -3709,6 +3838,38 @@ export class Connect extends ConnectClient { } } + /** + *

Updates the scheduled time of a task contact that is already scheduled.

+ */ + public updateContactSchedule( + args: UpdateContactScheduleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateContactSchedule( + args: UpdateContactScheduleCommandInput, + cb: (err: any, data?: UpdateContactScheduleCommandOutput) => void + ): void; + public updateContactSchedule( + args: UpdateContactScheduleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateContactScheduleCommandOutput) => void + ): void; + public updateContactSchedule( + args: UpdateContactScheduleCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateContactScheduleCommandOutput) => void), + cb?: (err: any, data?: UpdateContactScheduleCommandOutput) => void + ): Promise | void { + const command = new UpdateContactScheduleCommand(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); + } + } + /** *

Updates the hours of operation.

*/ diff --git a/clients/client-connect/src/ConnectClient.ts b/clients/client-connect/src/ConnectClient.ts index ea94233daf79..4c1d636d4df7 100644 --- a/clients/client-connect/src/ConnectClient.ts +++ b/clients/client-connect/src/ConnectClient.ts @@ -126,6 +126,7 @@ import { DescribeAgentStatusCommandInput, DescribeAgentStatusCommandOutput, } from "./commands/DescribeAgentStatusCommand"; +import { DescribeContactCommandInput, DescribeContactCommandOutput } from "./commands/DescribeContactCommand"; import { DescribeContactFlowCommandInput, DescribeContactFlowCommandOutput, @@ -208,6 +209,10 @@ import { } from "./commands/ListApprovedOriginsCommand"; import { ListBotsCommandInput, ListBotsCommandOutput } from "./commands/ListBotsCommand"; import { ListContactFlowsCommandInput, ListContactFlowsCommandOutput } from "./commands/ListContactFlowsCommand"; +import { + ListContactReferencesCommandInput, + ListContactReferencesCommandOutput, +} from "./commands/ListContactReferencesCommand"; import { ListHoursOfOperationsCommandInput, ListHoursOfOperationsCommandOutput, @@ -303,6 +308,7 @@ import { UpdateContactAttributesCommandInput, UpdateContactAttributesCommandOutput, } from "./commands/UpdateContactAttributesCommand"; +import { UpdateContactCommandInput, UpdateContactCommandOutput } from "./commands/UpdateContactCommand"; import { UpdateContactFlowContentCommandInput, UpdateContactFlowContentCommandOutput, @@ -311,6 +317,10 @@ import { UpdateContactFlowNameCommandInput, UpdateContactFlowNameCommandOutput, } from "./commands/UpdateContactFlowNameCommand"; +import { + UpdateContactScheduleCommandInput, + UpdateContactScheduleCommandOutput, +} from "./commands/UpdateContactScheduleCommand"; import { UpdateHoursOfOperationCommandInput, UpdateHoursOfOperationCommandOutput, @@ -425,6 +435,7 @@ export type ServiceInputTypes = | DeleteUserCommandInput | DeleteUserHierarchyGroupCommandInput | DescribeAgentStatusCommandInput + | DescribeContactCommandInput | DescribeContactFlowCommandInput | DescribeHoursOfOperationCommandInput | DescribeInstanceAttributeCommandInput @@ -453,6 +464,7 @@ export type ServiceInputTypes = | ListApprovedOriginsCommandInput | ListBotsCommandInput | ListContactFlowsCommandInput + | ListContactReferencesCommandInput | ListHoursOfOperationsCommandInput | ListInstanceAttributesCommandInput | ListInstanceStorageConfigsCommandInput @@ -488,8 +500,10 @@ export type ServiceInputTypes = | UntagResourceCommandInput | UpdateAgentStatusCommandInput | UpdateContactAttributesCommandInput + | UpdateContactCommandInput | UpdateContactFlowContentCommandInput | UpdateContactFlowNameCommandInput + | UpdateContactScheduleCommandInput | UpdateHoursOfOperationCommandInput | UpdateInstanceAttributeCommandInput | UpdateInstanceStorageConfigCommandInput @@ -543,6 +557,7 @@ export type ServiceOutputTypes = | DeleteUserCommandOutput | DeleteUserHierarchyGroupCommandOutput | DescribeAgentStatusCommandOutput + | DescribeContactCommandOutput | DescribeContactFlowCommandOutput | DescribeHoursOfOperationCommandOutput | DescribeInstanceAttributeCommandOutput @@ -571,6 +586,7 @@ export type ServiceOutputTypes = | ListApprovedOriginsCommandOutput | ListBotsCommandOutput | ListContactFlowsCommandOutput + | ListContactReferencesCommandOutput | ListHoursOfOperationsCommandOutput | ListInstanceAttributesCommandOutput | ListInstanceStorageConfigsCommandOutput @@ -606,8 +622,10 @@ export type ServiceOutputTypes = | UntagResourceCommandOutput | UpdateAgentStatusCommandOutput | UpdateContactAttributesCommandOutput + | UpdateContactCommandOutput | UpdateContactFlowContentCommandOutput | UpdateContactFlowNameCommandOutput + | UpdateContactScheduleCommandOutput | UpdateHoursOfOperationCommandOutput | UpdateInstanceAttributeCommandOutput | UpdateInstanceStorageConfigCommandOutput @@ -790,7 +808,7 @@ export interface ConnectClientResolvedConfig extends ConnectClientResolvedConfig * Service Quotas in the Amazon Connect Administrator Guide.

*

You can * connect - * programmatically to an Amazon Web Services service by using an endpoint. For a list of Amazon Connect endpoints, see + * programmatically to an AWS service by using an endpoint. For a list of Amazon Connect endpoints, see * Amazon Connect * Endpoints.

* diff --git a/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts b/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts index f0b43988b3d4..c8fb789a161c 100644 --- a/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts +++ b/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts @@ -24,7 +24,7 @@ export interface CreateIntegrationAssociationCommandOutput __MetadataBearer {} /** - *

Creates an Amazon Web Services resource association with an Amazon Connect instance.

+ *

Creates an AWS resource association with an Amazon Connect instance.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts b/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts index 0001ef05059e..61ad8bd04595 100644 --- a/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts +++ b/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts @@ -22,7 +22,7 @@ export interface DeleteIntegrationAssociationCommandInput extends DeleteIntegrat export interface DeleteIntegrationAssociationCommandOutput extends __MetadataBearer {} /** - *

Deletes an Amazon Web Services resource association from an Amazon Connect instance. The association must not have + *

Deletes an AWS resource association from an Amazon Connect instance. The association must not have * any use cases associated with it.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-connect/src/commands/DescribeContactCommand.ts b/clients/client-connect/src/commands/DescribeContactCommand.ts new file mode 100644 index 000000000000..ec3e21b69716 --- /dev/null +++ b/clients/client-connect/src/commands/DescribeContactCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { DescribeContactRequest, DescribeContactResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeContactCommand, + serializeAws_restJson1DescribeContactCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeContactCommandInput extends DescribeContactRequest {} +export interface DescribeContactCommandOutput extends DescribeContactResponse, __MetadataBearer {} + +/** + *

This API is in preview release for Amazon Connect and is subject to change.

+ *

Describes the specified contact.

+ * + *

Contact information is available in Amazon Connect for 24 months, and then it is deleted.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, DescribeContactCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, DescribeContactCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new DescribeContactCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeContactCommandInput} for command's `input` shape. + * @see {@link DescribeContactCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class DescribeContactCommand extends $Command< + DescribeContactCommandInput, + DescribeContactCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeContactCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "DescribeContactCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeContactRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeContactResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeContactCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeContactCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DescribeContactCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/ListBotsCommand.ts b/clients/client-connect/src/commands/ListBotsCommand.ts index 60c2b702780f..72448f4edb40 100644 --- a/clients/client-connect/src/commands/ListBotsCommand.ts +++ b/clients/client-connect/src/commands/ListBotsCommand.ts @@ -23,8 +23,8 @@ export interface ListBotsCommandOutput extends ListBotsResponse, __MetadataBeare /** *

This API is in preview release for Amazon Connect and is subject to change.

- *

For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated with the - * instance.

+ *

For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently + * associated with the instance.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/commands/ListContactReferencesCommand.ts b/clients/client-connect/src/commands/ListContactReferencesCommand.ts new file mode 100644 index 000000000000..c700e85a6859 --- /dev/null +++ b/clients/client-connect/src/commands/ListContactReferencesCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { ListContactReferencesRequest, ListContactReferencesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListContactReferencesCommand, + serializeAws_restJson1ListContactReferencesCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListContactReferencesCommandInput extends ListContactReferencesRequest {} +export interface ListContactReferencesCommandOutput extends ListContactReferencesResponse, __MetadataBearer {} + +/** + *

This API is in preview release for Amazon Connect and is subject to change.

+ *

For the specified referenceTypes, returns a list of references associated with + * the contact.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, ListContactReferencesCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, ListContactReferencesCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new ListContactReferencesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListContactReferencesCommandInput} for command's `input` shape. + * @see {@link ListContactReferencesCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class ListContactReferencesCommand extends $Command< + ListContactReferencesCommandInput, + ListContactReferencesCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListContactReferencesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "ListContactReferencesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListContactReferencesRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListContactReferencesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListContactReferencesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListContactReferencesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListContactReferencesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts b/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts index 0dd04a73306d..0eb674db8f79 100644 --- a/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts +++ b/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts @@ -24,7 +24,7 @@ export interface ListIntegrationAssociationsCommandOutput __MetadataBearer {} /** - *

Provides summary information about the Amazon Web Services resource associations for the specified Amazon Connect + *

Provides summary information about the AWS resource associations for the specified Amazon Connect * instance.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-connect/src/commands/ListSecurityProfilesCommand.ts b/clients/client-connect/src/commands/ListSecurityProfilesCommand.ts index 2dfe6db0e51e..f07730c3db47 100644 --- a/clients/client-connect/src/commands/ListSecurityProfilesCommand.ts +++ b/clients/client-connect/src/commands/ListSecurityProfilesCommand.ts @@ -22,8 +22,7 @@ export interface ListSecurityProfilesCommandInput extends ListSecurityProfilesRe export interface ListSecurityProfilesCommandOutput extends ListSecurityProfilesResponse, __MetadataBearer {} /** - *

This API is in preview release for Amazon Connect and is subject to change.

- *

Provides summary information about the security profiles for the specified Amazon Connect + *

Provides summary information about the security profiles for the specified Amazon Connect * instance.

*

For more information about security profiles, see Security Profiles in the * Amazon Connect Administrator Guide.

diff --git a/clients/client-connect/src/commands/StartContactStreamingCommand.ts b/clients/client-connect/src/commands/StartContactStreamingCommand.ts index 5b5ac9c46134..16e22efaeac7 100644 --- a/clients/client-connect/src/commands/StartContactStreamingCommand.ts +++ b/clients/client-connect/src/commands/StartContactStreamingCommand.ts @@ -24,7 +24,7 @@ export interface StartContactStreamingCommandOutput extends StartContactStreamin /** *

Initiates real-time message streaming for a new chat contact.

*

For more information about message streaming, see Enable real-time chat message - * streaming in the Amazon Connect Administrator Guide.

+ * streaming in the Amazon Connect Administrator Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/commands/StartOutboundVoiceContactCommand.ts b/clients/client-connect/src/commands/StartOutboundVoiceContactCommand.ts index 19ee523292e5..1a4fffb45c33 100644 --- a/clients/client-connect/src/commands/StartOutboundVoiceContactCommand.ts +++ b/clients/client-connect/src/commands/StartOutboundVoiceContactCommand.ts @@ -38,8 +38,9 @@ export interface StartOutboundVoiceContactCommandOutput extends StartOutboundVoi *
* *

Campaign calls are not allowed by default. Before you can make a call with - * TrafficType = CAMPAIGN, you must submit a service quota increase request. For more information, see - * Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

+ * TrafficType = CAMPAIGN, you must submit a service quota increase + * request. For more information, see Amazon Connect Service Quotas + * in the Amazon Connect Administrator Guide.

*
* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-connect/src/commands/StartTaskContactCommand.ts b/clients/client-connect/src/commands/StartTaskContactCommand.ts index e3c565da1159..b1151c137799 100644 --- a/clients/client-connect/src/commands/StartTaskContactCommand.ts +++ b/clients/client-connect/src/commands/StartTaskContactCommand.ts @@ -22,7 +22,8 @@ export interface StartTaskContactCommandInput extends StartTaskContactRequest {} export interface StartTaskContactCommandOutput extends StartTaskContactResponse, __MetadataBearer {} /** - *

Initiates a contact flow to start a new task.

+ *

Initiates a contact flow to start a new task immediately or at a future date and + * time.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/commands/TagResourceCommand.ts b/clients/client-connect/src/commands/TagResourceCommand.ts index 4e72e8b00a2b..6c7ad52745b1 100644 --- a/clients/client-connect/src/commands/TagResourceCommand.ts +++ b/clients/client-connect/src/commands/TagResourceCommand.ts @@ -23,8 +23,8 @@ export interface TagResourceCommandOutput extends __MetadataBearer {} /** *

Adds the specified tags to the specified resource.

- *

The supported resource types are users, routing profiles, queues, quick connects, - * contact flows, agent status, and hours of operation.

+ *

The supported resource types are users, routing profiles, queues, quick connects, contact + * flows, agent status, and hours of operation.

*

For sample policies that use tags, see Amazon Connect Identity-Based * Policy Examples in the Amazon Connect Administrator Guide.

* @example diff --git a/clients/client-connect/src/commands/UpdateContactCommand.ts b/clients/client-connect/src/commands/UpdateContactCommand.ts new file mode 100644 index 000000000000..775eee20324e --- /dev/null +++ b/clients/client-connect/src/commands/UpdateContactCommand.ts @@ -0,0 +1,101 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { UpdateContactRequest, UpdateContactResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateContactCommand, + serializeAws_restJson1UpdateContactCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateContactCommandInput extends UpdateContactRequest {} +export interface UpdateContactCommandOutput extends UpdateContactResponse, __MetadataBearer {} + +/** + *

This API is in preview release for Amazon Connect and is subject to change.

+ *

Adds or updates user defined contact information associated with the specified contact. At + * least one field to be updated must be present in the request.

+ * + *

You can add or update user-defined contact information for both ongoing and completed + * contacts.

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, UpdateContactCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, UpdateContactCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new UpdateContactCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateContactCommandInput} for command's `input` shape. + * @see {@link UpdateContactCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class UpdateContactCommand extends $Command< + UpdateContactCommandInput, + UpdateContactCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateContactCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "UpdateContactCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateContactRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateContactResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateContactCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateContactCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateContactCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/UpdateContactScheduleCommand.ts b/clients/client-connect/src/commands/UpdateContactScheduleCommand.ts new file mode 100644 index 000000000000..944e0db99529 --- /dev/null +++ b/clients/client-connect/src/commands/UpdateContactScheduleCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { UpdateContactScheduleRequest, UpdateContactScheduleResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateContactScheduleCommand, + serializeAws_restJson1UpdateContactScheduleCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateContactScheduleCommandInput extends UpdateContactScheduleRequest {} +export interface UpdateContactScheduleCommandOutput extends UpdateContactScheduleResponse, __MetadataBearer {} + +/** + *

Updates the scheduled time of a task contact that is already scheduled.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, UpdateContactScheduleCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, UpdateContactScheduleCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new UpdateContactScheduleCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateContactScheduleCommandInput} for command's `input` shape. + * @see {@link UpdateContactScheduleCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class UpdateContactScheduleCommand extends $Command< + UpdateContactScheduleCommandInput, + UpdateContactScheduleCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateContactScheduleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "UpdateContactScheduleCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateContactScheduleRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateContactScheduleResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateContactScheduleCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateContactScheduleCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateContactScheduleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/UpdateQueueNameCommand.ts b/clients/client-connect/src/commands/UpdateQueueNameCommand.ts index fc8d29284f44..8b8a89ff1d67 100644 --- a/clients/client-connect/src/commands/UpdateQueueNameCommand.ts +++ b/clients/client-connect/src/commands/UpdateQueueNameCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateQueueNameRequest } from "../models/models_0"; +import { UpdateQueueNameRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateQueueNameCommand, serializeAws_restJson1UpdateQueueNameCommand, diff --git a/clients/client-connect/src/commands/UpdateQueueOutboundCallerConfigCommand.ts b/clients/client-connect/src/commands/UpdateQueueOutboundCallerConfigCommand.ts index 3dad403e26ec..3441bec0682c 100644 --- a/clients/client-connect/src/commands/UpdateQueueOutboundCallerConfigCommand.ts +++ b/clients/client-connect/src/commands/UpdateQueueOutboundCallerConfigCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateQueueOutboundCallerConfigRequest } from "../models/models_0"; +import { UpdateQueueOutboundCallerConfigRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateQueueOutboundCallerConfigCommand, serializeAws_restJson1UpdateQueueOutboundCallerConfigCommand, diff --git a/clients/client-connect/src/commands/UpdateQueueStatusCommand.ts b/clients/client-connect/src/commands/UpdateQueueStatusCommand.ts index 3f13bb04c7a0..405a408dc4bf 100644 --- a/clients/client-connect/src/commands/UpdateQueueStatusCommand.ts +++ b/clients/client-connect/src/commands/UpdateQueueStatusCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateQueueStatusRequest } from "../models/models_0"; +import { UpdateQueueStatusRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateQueueStatusCommand, serializeAws_restJson1UpdateQueueStatusCommand, diff --git a/clients/client-connect/src/commands/UpdateQuickConnectConfigCommand.ts b/clients/client-connect/src/commands/UpdateQuickConnectConfigCommand.ts index 1122dc47d734..8a63d330035d 100644 --- a/clients/client-connect/src/commands/UpdateQuickConnectConfigCommand.ts +++ b/clients/client-connect/src/commands/UpdateQuickConnectConfigCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateQuickConnectConfigRequest } from "../models/models_0"; +import { UpdateQuickConnectConfigRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateQuickConnectConfigCommand, serializeAws_restJson1UpdateQuickConnectConfigCommand, diff --git a/clients/client-connect/src/commands/UpdateQuickConnectNameCommand.ts b/clients/client-connect/src/commands/UpdateQuickConnectNameCommand.ts index 1e2943de7ab7..3db2437bf18d 100644 --- a/clients/client-connect/src/commands/UpdateQuickConnectNameCommand.ts +++ b/clients/client-connect/src/commands/UpdateQuickConnectNameCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateQuickConnectNameRequest } from "../models/models_0"; +import { UpdateQuickConnectNameRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateQuickConnectNameCommand, serializeAws_restJson1UpdateQuickConnectNameCommand, diff --git a/clients/client-connect/src/commands/UpdateRoutingProfileConcurrencyCommand.ts b/clients/client-connect/src/commands/UpdateRoutingProfileConcurrencyCommand.ts index d0bbe39888c1..72f2fa694dde 100644 --- a/clients/client-connect/src/commands/UpdateRoutingProfileConcurrencyCommand.ts +++ b/clients/client-connect/src/commands/UpdateRoutingProfileConcurrencyCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateRoutingProfileConcurrencyRequest } from "../models/models_0"; +import { UpdateRoutingProfileConcurrencyRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateRoutingProfileConcurrencyCommand, serializeAws_restJson1UpdateRoutingProfileConcurrencyCommand, diff --git a/clients/client-connect/src/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.ts b/clients/client-connect/src/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.ts index 34032af5e529..a3bfd35bc83a 100644 --- a/clients/client-connect/src/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.ts +++ b/clients/client-connect/src/commands/UpdateRoutingProfileDefaultOutboundQueueCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateRoutingProfileDefaultOutboundQueueRequest } from "../models/models_0"; +import { UpdateRoutingProfileDefaultOutboundQueueRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateRoutingProfileDefaultOutboundQueueCommand, serializeAws_restJson1UpdateRoutingProfileDefaultOutboundQueueCommand, diff --git a/clients/client-connect/src/commands/UpdateRoutingProfileNameCommand.ts b/clients/client-connect/src/commands/UpdateRoutingProfileNameCommand.ts index 9a72b519595b..686046aad3bd 100644 --- a/clients/client-connect/src/commands/UpdateRoutingProfileNameCommand.ts +++ b/clients/client-connect/src/commands/UpdateRoutingProfileNameCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateRoutingProfileNameRequest } from "../models/models_0"; +import { UpdateRoutingProfileNameRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateRoutingProfileNameCommand, serializeAws_restJson1UpdateRoutingProfileNameCommand, diff --git a/clients/client-connect/src/commands/UpdateRoutingProfileQueuesCommand.ts b/clients/client-connect/src/commands/UpdateRoutingProfileQueuesCommand.ts index 25e63a4289b7..d340685ba7d4 100644 --- a/clients/client-connect/src/commands/UpdateRoutingProfileQueuesCommand.ts +++ b/clients/client-connect/src/commands/UpdateRoutingProfileQueuesCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateRoutingProfileQueuesRequest } from "../models/models_0"; +import { UpdateRoutingProfileQueuesRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateRoutingProfileQueuesCommand, serializeAws_restJson1UpdateRoutingProfileQueuesCommand, diff --git a/clients/client-connect/src/commands/UpdateSecurityProfileCommand.ts b/clients/client-connect/src/commands/UpdateSecurityProfileCommand.ts index 3a71bdbaeab7..e7d638cca592 100644 --- a/clients/client-connect/src/commands/UpdateSecurityProfileCommand.ts +++ b/clients/client-connect/src/commands/UpdateSecurityProfileCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateSecurityProfileRequest } from "../models/models_0"; +import { UpdateSecurityProfileRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateSecurityProfileCommand, serializeAws_restJson1UpdateSecurityProfileCommand, diff --git a/clients/client-connect/src/commands/UpdateUserHierarchyCommand.ts b/clients/client-connect/src/commands/UpdateUserHierarchyCommand.ts index 40446560cc7d..31f8a170260b 100644 --- a/clients/client-connect/src/commands/UpdateUserHierarchyCommand.ts +++ b/clients/client-connect/src/commands/UpdateUserHierarchyCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateUserHierarchyRequest } from "../models/models_0"; +import { UpdateUserHierarchyRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateUserHierarchyCommand, serializeAws_restJson1UpdateUserHierarchyCommand, diff --git a/clients/client-connect/src/commands/UpdateUserHierarchyGroupNameCommand.ts b/clients/client-connect/src/commands/UpdateUserHierarchyGroupNameCommand.ts index 95d9b9cbb73f..ac5c3930d960 100644 --- a/clients/client-connect/src/commands/UpdateUserHierarchyGroupNameCommand.ts +++ b/clients/client-connect/src/commands/UpdateUserHierarchyGroupNameCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateUserHierarchyGroupNameRequest } from "../models/models_0"; +import { UpdateUserHierarchyGroupNameRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateUserHierarchyGroupNameCommand, serializeAws_restJson1UpdateUserHierarchyGroupNameCommand, diff --git a/clients/client-connect/src/commands/UpdateUserHierarchyStructureCommand.ts b/clients/client-connect/src/commands/UpdateUserHierarchyStructureCommand.ts index eff4874c2e13..b7e661b8f15c 100644 --- a/clients/client-connect/src/commands/UpdateUserHierarchyStructureCommand.ts +++ b/clients/client-connect/src/commands/UpdateUserHierarchyStructureCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateUserHierarchyStructureRequest } from "../models/models_0"; +import { UpdateUserHierarchyStructureRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateUserHierarchyStructureCommand, serializeAws_restJson1UpdateUserHierarchyStructureCommand, diff --git a/clients/client-connect/src/commands/UpdateUserIdentityInfoCommand.ts b/clients/client-connect/src/commands/UpdateUserIdentityInfoCommand.ts index 66e60610777b..01e586ec6ae5 100644 --- a/clients/client-connect/src/commands/UpdateUserIdentityInfoCommand.ts +++ b/clients/client-connect/src/commands/UpdateUserIdentityInfoCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateUserIdentityInfoRequest } from "../models/models_0"; +import { UpdateUserIdentityInfoRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateUserIdentityInfoCommand, serializeAws_restJson1UpdateUserIdentityInfoCommand, diff --git a/clients/client-connect/src/commands/index.ts b/clients/client-connect/src/commands/index.ts index 35aeebbd2abb..2a6c46bf339d 100644 --- a/clients/client-connect/src/commands/index.ts +++ b/clients/client-connect/src/commands/index.ts @@ -27,6 +27,7 @@ export * from "./DeleteUseCaseCommand"; export * from "./DeleteUserCommand"; export * from "./DeleteUserHierarchyGroupCommand"; export * from "./DescribeAgentStatusCommand"; +export * from "./DescribeContactCommand"; export * from "./DescribeContactFlowCommand"; export * from "./DescribeHoursOfOperationCommand"; export * from "./DescribeInstanceAttributeCommand"; @@ -55,6 +56,7 @@ export * from "./ListAgentStatusesCommand"; export * from "./ListApprovedOriginsCommand"; export * from "./ListBotsCommand"; export * from "./ListContactFlowsCommand"; +export * from "./ListContactReferencesCommand"; export * from "./ListHoursOfOperationsCommand"; export * from "./ListInstanceAttributesCommand"; export * from "./ListInstanceStorageConfigsCommand"; @@ -90,8 +92,10 @@ export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateAgentStatusCommand"; export * from "./UpdateContactAttributesCommand"; +export * from "./UpdateContactCommand"; export * from "./UpdateContactFlowContentCommand"; export * from "./UpdateContactFlowNameCommand"; +export * from "./UpdateContactScheduleCommand"; export * from "./UpdateHoursOfOperationCommand"; export * from "./UpdateInstanceAttributeCommand"; export * from "./UpdateInstanceStorageConfigCommand"; diff --git a/clients/client-connect/src/models/models_0.ts b/clients/client-connect/src/models/models_0.ts index 81d1fbad4d16..231602b770e1 100644 --- a/clients/client-connect/src/models/models_0.ts +++ b/clients/client-connect/src/models/models_0.ts @@ -19,6 +19,30 @@ export namespace AccessDeniedException { }); } +/** + *

Information about the agent who accepted the contact.

+ */ +export interface AgentInfo { + /** + *

The identifier of the agent who accepted the contact.

+ */ + Id?: string; + + /** + *

The timestamp when the contact was connected to the agent.

+ */ + ConnectedToAgentTimestamp?: Date; +} + +export namespace AgentInfo { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AgentInfo): any => ({ + ...obj, + }); +} + export enum AgentStatusState { DISABLED = "DISABLED", ENABLED = "ENABLED", @@ -70,7 +94,7 @@ export interface AgentStatus { State?: AgentStatusState | string; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -823,7 +847,7 @@ export interface CreateAgentStatusRequest { DisplayOrder?: number; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -1081,7 +1105,7 @@ export interface CreateHoursOfOperationRequest { Config: HoursOfOperationConfig[] | undefined; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -1230,7 +1254,7 @@ export interface CreateIntegrationAssociationRequest { SourceType?: SourceType | string; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -1331,7 +1355,7 @@ export interface CreateQueueRequest { QuickConnectIds?: string[]; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -1498,7 +1522,7 @@ export interface CreateQuickConnectRequest { QuickConnectConfig: QuickConnectConfig | undefined; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -1519,8 +1543,7 @@ export interface CreateQuickConnectResponse { QuickConnectARN?: string; /** - *

The identifier for the quick connect. - *

+ *

The identifier for the quick connect.

*/ QuickConnectId?: string; } @@ -1653,7 +1676,7 @@ export interface CreateSecurityProfileRequest { InstanceId: string | undefined; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -1711,7 +1734,7 @@ export interface CreateUseCaseRequest { UseCaseType: UseCaseType | string | undefined; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -2198,6 +2221,163 @@ export namespace DescribeAgentStatusResponse { }); } +export interface DescribeContactRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier of the initial contact.

+ */ + ContactId: string | undefined; +} + +export namespace DescribeContactRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeContactRequest): any => ({ + ...obj, + }); +} + +export enum ContactInitiationMethod { + API = "API", + CALLBACK = "CALLBACK", + INBOUND = "INBOUND", + OUTBOUND = "OUTBOUND", + QUEUE_TRANSFER = "QUEUE_TRANSFER", + TRANSFER = "TRANSFER", +} + +/** + *

If this contact was queued, this contains information about the queue.

+ */ +export interface QueueInfo { + /** + *

The identifier of the agent who accepted the contact.

+ */ + Id?: string; + + /** + *

The timestamp when the contact was added to the queue.

+ */ + EnqueueTimestamp?: Date; +} + +export namespace QueueInfo { + /** + * @internal + */ + export const filterSensitiveLog = (obj: QueueInfo): any => ({ + ...obj, + }); +} + +/** + *

Contains information about a contact.

+ */ +export interface Contact { + /** + *

The Amazon Resource Name (ARN) for the contact.

+ */ + Arn?: string; + + /** + *

The identifier for the contact.

+ */ + Id?: string; + + /** + *

If this contact is related to other contacts, this is the ID of the initial contact.

+ */ + InitialContactId?: string; + + /** + *

If this contact is not the first contact, this is the ID of the previous contact.

+ */ + PreviousContactId?: string; + + /** + *

Indicates how the contact was initiated.

+ */ + InitiationMethod?: ContactInitiationMethod | string; + + /** + *

The name of the contact.

+ */ + Name?: string; + + /** + *

The description of the contact.

+ */ + Description?: string; + + /** + *

How the contact reached your contact center.

+ */ + Channel?: Channel | string; + + /** + *

If this contact was queued, this contains information about the queue.

+ */ + QueueInfo?: QueueInfo; + + /** + *

Information about the agent who accepted the contact.

+ */ + AgentInfo?: AgentInfo; + + /** + *

The date and time this contact was initiated, in UTC time. For INBOUND, this is when the + * contact arrived. For OUTBOUND, this is when the agent began dialing. For CALLBACK, this is when + * the callback contact was created. For TRANSFER and QUEUE_TRANSFER, this is when the transfer was + * initiated. For API, this is when the request arrived.

+ */ + InitiationTimestamp?: Date; + + /** + *

The timestamp when the customer endpoint disconnected from Amazon Connect.

+ */ + DisconnectTimestamp?: Date; + + /** + *

The timestamp when contact was last updated.

+ */ + LastUpdateTimestamp?: Date; + + /** + *

The timestamp, in Unix epoch time format, at which to start running the inbound flow.

+ */ + ScheduledTimestamp?: Date; +} + +export namespace Contact { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Contact): any => ({ + ...obj, + }); +} + +export interface DescribeContactResponse { + /** + *

Information about the contact.

+ */ + Contact?: Contact; +} + +export namespace DescribeContactResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeContactResponse): any => ({ + ...obj, + }); +} + /** *

The contact flow has not been published.

*/ @@ -2359,7 +2539,7 @@ export interface HoursOfOperation { Config?: HoursOfOperationConfig[]; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -2700,7 +2880,7 @@ export interface Queue { Status?: QueueStatus | string; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -2781,7 +2961,7 @@ export interface QuickConnect { QuickConnectConfig?: QuickConnectConfig; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -2954,7 +3134,7 @@ export interface SecurityProfile { Description?: string; /** - *

The tags used to organize, track, or control access for this resource.

+ *

One or more tags.

*/ Tags?: { [key: string]: string }; } @@ -3733,11 +3913,11 @@ export interface GetCurrentMetricDataRequest { *
*

Unit: SECONDS

*

When you use groupings, Unit says SECONDS and the Value is returned in SECONDS.

- *

When you do not use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For - * example, if you get a response like this:

+ *

When you do not use groupings, Unit says SECONDS but the Value is returned in + * MILLISECONDS. For example, if you get a response like this:

*

* { "Metric": { "Name": "OLDEST_CONTACT_AGE", "Unit": "SECONDS" }, "Value": 24113.0 - * }

+ * }

*

The actual OLDEST_CONTACT_AGE is 24 seconds.

* *

Name in real-time metrics report: Oldest @@ -4643,6 +4823,187 @@ export namespace ListContactFlowsResponse { }); } +export enum ReferenceType { + ATTACHMENT = "ATTACHMENT", + URL = "URL", +} + +export interface ListContactReferencesRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier of the initial contact.

+ */ + ContactId: string | undefined; + + /** + *

The type of reference.

+ */ + ReferenceTypes: (ReferenceType | string)[] | undefined; + + /** + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ * + *

This is not expected to be set since the value returned in the previous response is always + * null.

+ *
+ */ + NextToken?: string; +} + +export namespace ListContactReferencesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListContactReferencesRequest): any => ({ + ...obj, + }); +} + +export enum ReferenceStatus { + APPROVED = "APPROVED", + REJECTED = "REJECTED", +} + +/** + *

Information about the attachment reference if the referenceType is ATTACHMENT. Otherwise, null.

+ */ +export interface AttachmentReference { + /** + *

Identifier of the attachment reference.

+ */ + Name?: string; + + /** + *

Contains the location path of the attachment reference.

+ */ + Value?: string; + + /** + *

Status of an attachment reference type.

+ */ + Status?: ReferenceStatus | string; +} + +export namespace AttachmentReference { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AttachmentReference): any => ({ + ...obj, + }); +} + +/** + *

The URL reference.

+ */ +export interface UrlReference { + /** + *

Identifier of the URL reference.

+ */ + Name?: string; + + /** + *

A valid URL.

+ */ + Value?: string; +} + +export namespace UrlReference { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UrlReference): any => ({ + ...obj, + }); +} + +/** + *

Contains summary information about a reference. ReferenceSummary contains only one non null field between the URL and attachment based on the reference type.

+ */ +export type ReferenceSummary = + | ReferenceSummary.AttachmentMember + | ReferenceSummary.UrlMember + | ReferenceSummary.$UnknownMember; + +export namespace ReferenceSummary { + /** + *

Information about Url reference if the referenceType is URL. Otherwise, null.

+ */ + export interface UrlMember { + Url: UrlReference; + Attachment?: never; + $unknown?: never; + } + + /** + *

Information about the attachment reference if the referenceType is ATTACHMENT. Otherwise, null.

+ */ + export interface AttachmentMember { + Url?: never; + Attachment: AttachmentReference; + $unknown?: never; + } + + export interface $UnknownMember { + Url?: never; + Attachment?: never; + $unknown: [string, any]; + } + + export interface Visitor { + Url: (value: UrlReference) => T; + Attachment: (value: AttachmentReference) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: ReferenceSummary, visitor: Visitor): T => { + if (value.Url !== undefined) return visitor.Url(value.Url); + if (value.Attachment !== undefined) return visitor.Attachment(value.Attachment); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; + + /** + * @internal + */ + export const filterSensitiveLog = (obj: ReferenceSummary): any => { + if (obj.Url !== undefined) return { Url: UrlReference.filterSensitiveLog(obj.Url) }; + if (obj.Attachment !== undefined) return { Attachment: AttachmentReference.filterSensitiveLog(obj.Attachment) }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; + }; +} + +export interface ListContactReferencesResponse { + /** + *

Information about the contact flows.

+ */ + ReferenceSummaryList?: ReferenceSummary[]; + + /** + *

If there are additional results, this is the token for the next set of results.

+ * + *

This is always returned as null in the response.

+ *
+ */ + NextToken?: string; +} + +export namespace ListContactReferencesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListContactReferencesResponse): any => ({ + ...obj, + ...(obj.ReferenceSummaryList && { + ReferenceSummaryList: obj.ReferenceSummaryList.map((item) => ReferenceSummary.filterSensitiveLog(item)), + }), + }); +} + export interface ListHoursOfOperationsRequest { /** *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

@@ -4934,7 +5295,7 @@ export interface ListIntegrationAssociationsRequest { InstanceId: string | undefined; /** - *

The type of integration.

+ *

*/ IntegrationType?: IntegrationType | string; @@ -5063,7 +5424,7 @@ export namespace ListLambdaFunctionsRequest { export interface ListLambdaFunctionsResponse { /** - *

The Lambda function ARNs associated with the specified instance.

+ *

The Lambdafunction ARNs associated with the specified instance.

*/ LambdaFunctions?: string[]; @@ -5095,7 +5456,8 @@ export interface ListLexBotsRequest { NextToken?: string; /** - *

The maximum number of results to return per page. If no value is specified, the default is 10.

+ *

The maximum number of results to return per page. If no value is specified, the default is 10. + *

*/ MaxResults?: number; } @@ -6850,8 +7212,8 @@ export interface StartOutboundVoiceContactRequest { /** *

Denotes the class of traffic. Calls with different traffic types are handled differently by * Amazon Connect. The default value is GENERAL. Use CAMPAIGN if - * EnableAnswerMachineDetection is set to true. For all other cases, use - * GENERAL.

+ * EnableAnswerMachineDetection is set to true. For all other cases, use + * GENERAL.

*/ TrafficType?: TrafficType | string; } @@ -6881,23 +7243,18 @@ export namespace StartOutboundVoiceContactResponse { }); } -export enum ReferenceType { - URL = "URL", -} - /** *

A link that an agent selects to complete a given task. You can have up to 4,096 UTF-8 bytes * across all references for a contact.

*/ export interface Reference { /** - *

A formatted URL that displays to an agent in the Contact Control Panel (CCP)

+ *

A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).

*/ Value: string | undefined; /** - *

A valid - * URL.

+ *

The type of the reference. Only URL type can be added or updated on a contact.

*/ Type: ReferenceType | string | undefined; } @@ -6962,6 +7319,11 @@ export interface StartTaskContactRequest { * request.

*/ ClientToken?: string; + + /** + *

The timestamp, in Unix Epoch seconds format, at which to start running the inbound contact flow. The scheduled time cannot be in the past. It must be within up to 6 days in future.

+ */ + ScheduledTime?: Date; } export namespace StartTaskContactRequest { @@ -7244,10 +7606,58 @@ export namespace UpdateAgentStatusRequest { }); } -export interface UpdateContactAttributesRequest { +export interface UpdateContactRequest { /** - *

The identifier of the contact. This is the identifier of the contact associated with the - * first interaction with the contact center.

+ *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier of the contact. This is the identifier of the contact associated with the + * first interaction with your contact center.

+ */ + ContactId: string | undefined; + + /** + *

The name of the contact.

+ */ + Name?: string; + + /** + *

The description of the contact.

+ */ + Description?: string; + + /** + *

A formatted URL that is shown to an agent in the Contact Control Panel (CCP).

+ */ + References?: { [key: string]: Reference }; +} + +export namespace UpdateContactRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateContactRequest): any => ({ + ...obj, + }); +} + +export interface UpdateContactResponse {} + +export namespace UpdateContactResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateContactResponse): any => ({ + ...obj, + }); +} + +export interface UpdateContactAttributesRequest { + /** + *

The identifier of the contact. This is the identifier of the contact associated with the + * first interaction with the contact center.

*/ InitialContactId: string | undefined; @@ -7344,6 +7754,43 @@ export namespace UpdateContactFlowNameRequest { }); } +export interface UpdateContactScheduleRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier of the contact.

+ */ + ContactId: string | undefined; + + /** + *

The timestamp, in Unix Epoch seconds format, at which to start running the inbound contact flow. The scheduled time cannot be in the past. It must be within up to 6 days in future.

+ */ + ScheduledTime: Date | undefined; +} + +export namespace UpdateContactScheduleRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateContactScheduleRequest): any => ({ + ...obj, + }); +} + +export interface UpdateContactScheduleResponse {} + +export namespace UpdateContactScheduleResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateContactScheduleResponse): any => ({ + ...obj, + }); +} + export interface UpdateHoursOfOperationRequest { /** *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

@@ -7394,7 +7841,8 @@ export interface UpdateInstanceAttributeRequest { /** *

The type of attribute.

* - *

Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact Amazon Web Services Support for allowlisting.

+ *

Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, + * contact AWS Support for allowlisting.

*
*/ AttributeType: InstanceAttributeType | string | undefined; @@ -7496,444 +7944,3 @@ export namespace UpdateQueueMaxContactsRequest { ...obj, }); } - -export interface UpdateQueueNameRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - - /** - *

The identifier for the queue.

- */ - QueueId: string | undefined; - - /** - *

The name of the queue.

- */ - Name?: string; - - /** - *

The description of the queue.

- */ - Description?: string; -} - -export namespace UpdateQueueNameRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateQueueNameRequest): any => ({ - ...obj, - }); -} - -export interface UpdateQueueOutboundCallerConfigRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - - /** - *

The identifier for the queue.

- */ - QueueId: string | undefined; - - /** - *

The outbound caller ID name, number, and outbound whisper flow.

- */ - OutboundCallerConfig: OutboundCallerConfig | undefined; -} - -export namespace UpdateQueueOutboundCallerConfigRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateQueueOutboundCallerConfigRequest): any => ({ - ...obj, - }); -} - -export interface UpdateQueueStatusRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - - /** - *

The identifier for the queue.

- */ - QueueId: string | undefined; - - /** - *

The status of the queue.

- */ - Status: QueueStatus | string | undefined; -} - -export namespace UpdateQueueStatusRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateQueueStatusRequest): any => ({ - ...obj, - }); -} - -export interface UpdateQuickConnectConfigRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - - /** - *

The identifier for the quick connect.

- */ - QuickConnectId: string | undefined; - - /** - *

Information about the configuration settings for the quick connect.

- */ - QuickConnectConfig: QuickConnectConfig | undefined; -} - -export namespace UpdateQuickConnectConfigRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateQuickConnectConfigRequest): any => ({ - ...obj, - }); -} - -export interface UpdateQuickConnectNameRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - - /** - *

The identifier for the quick connect.

- */ - QuickConnectId: string | undefined; - - /** - *

The name of the quick connect.

- */ - Name?: string; - - /** - *

The description of the quick connect.

- */ - Description?: string; -} - -export namespace UpdateQuickConnectNameRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateQuickConnectNameRequest): any => ({ - ...obj, - }); -} - -export interface UpdateRoutingProfileConcurrencyRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - - /** - *

The identifier of the routing profile.

- */ - RoutingProfileId: string | undefined; - - /** - *

The channels that agents can handle in the Contact Control Panel (CCP).

- */ - MediaConcurrencies: MediaConcurrency[] | undefined; -} - -export namespace UpdateRoutingProfileConcurrencyRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateRoutingProfileConcurrencyRequest): any => ({ - ...obj, - }); -} - -export interface UpdateRoutingProfileDefaultOutboundQueueRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - - /** - *

The identifier of the routing profile.

- */ - RoutingProfileId: string | undefined; - - /** - *

The identifier for the default outbound queue.

- */ - DefaultOutboundQueueId: string | undefined; -} - -export namespace UpdateRoutingProfileDefaultOutboundQueueRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateRoutingProfileDefaultOutboundQueueRequest): any => ({ - ...obj, - }); -} - -export interface UpdateRoutingProfileNameRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - - /** - *

The identifier of the routing profile.

- */ - RoutingProfileId: string | undefined; - - /** - *

The name of the routing profile. Must not be more than 127 characters.

- */ - Name?: string; - - /** - *

The description of the routing profile. Must not be more than 250 characters.

- */ - Description?: string; -} - -export namespace UpdateRoutingProfileNameRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateRoutingProfileNameRequest): any => ({ - ...obj, - }); -} - -export interface UpdateRoutingProfileQueuesRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - - /** - *

The identifier of the routing profile.

- */ - RoutingProfileId: string | undefined; - - /** - *

The queues to be updated for this routing profile. - * Queues must first be associated to the routing - * profile. You can do this using AssociateRoutingProfileQueues.

- */ - QueueConfigs: RoutingProfileQueueConfig[] | undefined; -} - -export namespace UpdateRoutingProfileQueuesRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateRoutingProfileQueuesRequest): any => ({ - ...obj, - }); -} - -export interface UpdateSecurityProfileRequest { - /** - *

The description of the security profile.

- */ - Description?: string; - - /** - *

The permissions granted to a security profile.

- */ - Permissions?: string[]; - - /** - *

The identifier for the security profle.

- */ - SecurityProfileId: string | undefined; - - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; -} - -export namespace UpdateSecurityProfileRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateSecurityProfileRequest): any => ({ - ...obj, - }); -} - -export interface UpdateUserHierarchyRequest { - /** - *

The identifier of the hierarchy group.

- */ - HierarchyGroupId?: string; - - /** - *

The identifier of the user account.

- */ - UserId: string | undefined; - - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; -} - -export namespace UpdateUserHierarchyRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateUserHierarchyRequest): any => ({ - ...obj, - }); -} - -export interface UpdateUserHierarchyGroupNameRequest { - /** - *

The name of the hierarchy group. Must not be more than 100 characters.

- */ - Name: string | undefined; - - /** - *

The identifier of the hierarchy group.

- */ - HierarchyGroupId: string | undefined; - - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; -} - -export namespace UpdateUserHierarchyGroupNameRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateUserHierarchyGroupNameRequest): any => ({ - ...obj, - }); -} - -/** - *

Contains information about the hierarchy level to update.

- */ -export interface HierarchyLevelUpdate { - /** - *

The name of the user hierarchy level. Must not be more than 50 characters.

- */ - Name: string | undefined; -} - -export namespace HierarchyLevelUpdate { - /** - * @internal - */ - export const filterSensitiveLog = (obj: HierarchyLevelUpdate): any => ({ - ...obj, - }); -} - -/** - *

Contains information about the level hierarchy to update.

- */ -export interface HierarchyStructureUpdate { - /** - *

The - * update - * for level one.

- */ - LevelOne?: HierarchyLevelUpdate; - - /** - *

The update for level two.

- */ - LevelTwo?: HierarchyLevelUpdate; - - /** - *

The update for level three.

- */ - LevelThree?: HierarchyLevelUpdate; - - /** - *

The update for level four.

- */ - LevelFour?: HierarchyLevelUpdate; - - /** - *

The update for level five.

- */ - LevelFive?: HierarchyLevelUpdate; -} - -export namespace HierarchyStructureUpdate { - /** - * @internal - */ - export const filterSensitiveLog = (obj: HierarchyStructureUpdate): any => ({ - ...obj, - }); -} - -export interface UpdateUserHierarchyStructureRequest { - /** - *

The hierarchy levels to update.

- */ - HierarchyStructure: HierarchyStructureUpdate | undefined; - - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; -} - -export namespace UpdateUserHierarchyStructureRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateUserHierarchyStructureRequest): any => ({ - ...obj, - }); -} - -export interface UpdateUserIdentityInfoRequest { - /** - *

The identity information for the user.

- */ - IdentityInfo: UserIdentityInfo | undefined; - - /** - *

The identifier of the user account.

- */ - UserId: string | undefined; - - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; -} - -export namespace UpdateUserIdentityInfoRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateUserIdentityInfoRequest): any => ({ - ...obj, - }); -} diff --git a/clients/client-connect/src/models/models_1.ts b/clients/client-connect/src/models/models_1.ts index 86a3d5522d3c..685d4d778657 100644 --- a/clients/client-connect/src/models/models_1.ts +++ b/clients/client-connect/src/models/models_1.ts @@ -1,4 +1,453 @@ -import { UserPhoneConfig } from "./models_0"; +import { + MediaConcurrency, + OutboundCallerConfig, + QueueStatus, + QuickConnectConfig, + RoutingProfileQueueConfig, + UserIdentityInfo, + UserPhoneConfig, +} from "./models_0"; + +export interface UpdateQueueNameRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier for the queue.

+ */ + QueueId: string | undefined; + + /** + *

The name of the queue.

+ */ + Name?: string; + + /** + *

The description of the queue.

+ */ + Description?: string; +} + +export namespace UpdateQueueNameRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateQueueNameRequest): any => ({ + ...obj, + }); +} + +export interface UpdateQueueOutboundCallerConfigRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier for the queue.

+ */ + QueueId: string | undefined; + + /** + *

The outbound caller ID name, number, and outbound whisper flow.

+ */ + OutboundCallerConfig: OutboundCallerConfig | undefined; +} + +export namespace UpdateQueueOutboundCallerConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateQueueOutboundCallerConfigRequest): any => ({ + ...obj, + }); +} + +export interface UpdateQueueStatusRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier for the queue.

+ */ + QueueId: string | undefined; + + /** + *

The status of the queue.

+ */ + Status: QueueStatus | string | undefined; +} + +export namespace UpdateQueueStatusRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateQueueStatusRequest): any => ({ + ...obj, + }); +} + +export interface UpdateQuickConnectConfigRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier for the quick connect.

+ */ + QuickConnectId: string | undefined; + + /** + *

Information about the configuration settings for the quick connect.

+ */ + QuickConnectConfig: QuickConnectConfig | undefined; +} + +export namespace UpdateQuickConnectConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateQuickConnectConfigRequest): any => ({ + ...obj, + }); +} + +export interface UpdateQuickConnectNameRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier for the quick connect.

+ */ + QuickConnectId: string | undefined; + + /** + *

The name of the quick connect.

+ */ + Name?: string; + + /** + *

The description of the quick connect.

+ */ + Description?: string; +} + +export namespace UpdateQuickConnectNameRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateQuickConnectNameRequest): any => ({ + ...obj, + }); +} + +export interface UpdateRoutingProfileConcurrencyRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier of the routing profile.

+ */ + RoutingProfileId: string | undefined; + + /** + *

The channels that agents can handle in the Contact Control Panel (CCP).

+ */ + MediaConcurrencies: MediaConcurrency[] | undefined; +} + +export namespace UpdateRoutingProfileConcurrencyRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateRoutingProfileConcurrencyRequest): any => ({ + ...obj, + }); +} + +export interface UpdateRoutingProfileDefaultOutboundQueueRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier of the routing profile.

+ */ + RoutingProfileId: string | undefined; + + /** + *

The identifier for the default outbound queue.

+ */ + DefaultOutboundQueueId: string | undefined; +} + +export namespace UpdateRoutingProfileDefaultOutboundQueueRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateRoutingProfileDefaultOutboundQueueRequest): any => ({ + ...obj, + }); +} + +export interface UpdateRoutingProfileNameRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier of the routing profile.

+ */ + RoutingProfileId: string | undefined; + + /** + *

The name of the routing profile. Must not be more than 127 characters.

+ */ + Name?: string; + + /** + *

The description of the routing profile. Must not be more than 250 characters.

+ */ + Description?: string; +} + +export namespace UpdateRoutingProfileNameRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateRoutingProfileNameRequest): any => ({ + ...obj, + }); +} + +export interface UpdateRoutingProfileQueuesRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; + + /** + *

The identifier of the routing profile.

+ */ + RoutingProfileId: string | undefined; + + /** + *

The queues to be updated for this routing profile. + * Queues must first be associated to the routing + * profile. You can do this using AssociateRoutingProfileQueues.

+ */ + QueueConfigs: RoutingProfileQueueConfig[] | undefined; +} + +export namespace UpdateRoutingProfileQueuesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateRoutingProfileQueuesRequest): any => ({ + ...obj, + }); +} + +export interface UpdateSecurityProfileRequest { + /** + *

The description of the security profile.

+ */ + Description?: string; + + /** + *

The permissions granted to a security profile.

+ */ + Permissions?: string[]; + + /** + *

The identifier for the security profle.

+ */ + SecurityProfileId: string | undefined; + + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; +} + +export namespace UpdateSecurityProfileRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateSecurityProfileRequest): any => ({ + ...obj, + }); +} + +export interface UpdateUserHierarchyRequest { + /** + *

The identifier of the hierarchy group.

+ */ + HierarchyGroupId?: string; + + /** + *

The identifier of the user account.

+ */ + UserId: string | undefined; + + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; +} + +export namespace UpdateUserHierarchyRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateUserHierarchyRequest): any => ({ + ...obj, + }); +} + +export interface UpdateUserHierarchyGroupNameRequest { + /** + *

The name of the hierarchy group. Must not be more than 100 characters.

+ */ + Name: string | undefined; + + /** + *

The identifier of the hierarchy group.

+ */ + HierarchyGroupId: string | undefined; + + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; +} + +export namespace UpdateUserHierarchyGroupNameRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateUserHierarchyGroupNameRequest): any => ({ + ...obj, + }); +} + +/** + *

Contains information about the hierarchy level to update.

+ */ +export interface HierarchyLevelUpdate { + /** + *

The name of the user hierarchy level. Must not be more than 50 characters.

+ */ + Name: string | undefined; +} + +export namespace HierarchyLevelUpdate { + /** + * @internal + */ + export const filterSensitiveLog = (obj: HierarchyLevelUpdate): any => ({ + ...obj, + }); +} + +/** + *

Contains information about the level hierarchy to update.

+ */ +export interface HierarchyStructureUpdate { + /** + *

The + * update + * for level one.

+ */ + LevelOne?: HierarchyLevelUpdate; + + /** + *

The update for level two.

+ */ + LevelTwo?: HierarchyLevelUpdate; + + /** + *

The update for level three.

+ */ + LevelThree?: HierarchyLevelUpdate; + + /** + *

The update for level four.

+ */ + LevelFour?: HierarchyLevelUpdate; + + /** + *

The update for level five.

+ */ + LevelFive?: HierarchyLevelUpdate; +} + +export namespace HierarchyStructureUpdate { + /** + * @internal + */ + export const filterSensitiveLog = (obj: HierarchyStructureUpdate): any => ({ + ...obj, + }); +} + +export interface UpdateUserHierarchyStructureRequest { + /** + *

The hierarchy levels to update.

+ */ + HierarchyStructure: HierarchyStructureUpdate | undefined; + + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; +} + +export namespace UpdateUserHierarchyStructureRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateUserHierarchyStructureRequest): any => ({ + ...obj, + }); +} + +export interface UpdateUserIdentityInfoRequest { + /** + *

The identity information for the user.

+ */ + IdentityInfo: UserIdentityInfo | undefined; + + /** + *

The identifier of the user account.

+ */ + UserId: string | undefined; + + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId: string | undefined; +} + +export namespace UpdateUserIdentityInfoRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateUserIdentityInfoRequest): any => ({ + ...obj, + }); +} export interface UpdateUserPhoneConfigRequest { /** diff --git a/clients/client-connect/src/pagination/ListContactReferencesPaginator.ts b/clients/client-connect/src/pagination/ListContactReferencesPaginator.ts new file mode 100644 index 000000000000..0fcb84d6c245 --- /dev/null +++ b/clients/client-connect/src/pagination/ListContactReferencesPaginator.ts @@ -0,0 +1,58 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListContactReferencesCommand, + ListContactReferencesCommandInput, + ListContactReferencesCommandOutput, +} from "../commands/ListContactReferencesCommand"; +import { Connect } from "../Connect"; +import { ConnectClient } from "../ConnectClient"; +import { ConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: ConnectClient, + input: ListContactReferencesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListContactReferencesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Connect, + input: ListContactReferencesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listContactReferences(input, ...args); +}; +export async function* paginateListContactReferences( + config: ConnectPaginationConfiguration, + input: ListContactReferencesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListContactReferencesCommandOutput; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof Connect) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof ConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Connect | ConnectClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-connect/src/pagination/index.ts b/clients/client-connect/src/pagination/index.ts index 32fd56f341a8..fb1cad8b4b84 100644 --- a/clients/client-connect/src/pagination/index.ts +++ b/clients/client-connect/src/pagination/index.ts @@ -5,6 +5,7 @@ export * from "./ListAgentStatusesPaginator"; export * from "./ListApprovedOriginsPaginator"; export * from "./ListBotsPaginator"; export * from "./ListContactFlowsPaginator"; +export * from "./ListContactReferencesPaginator"; export * from "./ListHoursOfOperationsPaginator"; export * from "./ListInstanceAttributesPaginator"; export * from "./ListInstanceStorageConfigsPaginator"; diff --git a/clients/client-connect/src/protocols/Aws_restJson1.ts b/clients/client-connect/src/protocols/Aws_restJson1.ts index 1437ce934121..d962dd10996e 100644 --- a/clients/client-connect/src/protocols/Aws_restJson1.ts +++ b/clients/client-connect/src/protocols/Aws_restJson1.ts @@ -6,6 +6,7 @@ import { expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, + expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, @@ -97,6 +98,7 @@ import { DescribeAgentStatusCommandInput, DescribeAgentStatusCommandOutput, } from "../commands/DescribeAgentStatusCommand"; +import { DescribeContactCommandInput, DescribeContactCommandOutput } from "../commands/DescribeContactCommand"; import { DescribeContactFlowCommandInput, DescribeContactFlowCommandOutput, @@ -179,6 +181,10 @@ import { } from "../commands/ListApprovedOriginsCommand"; import { ListBotsCommandInput, ListBotsCommandOutput } from "../commands/ListBotsCommand"; import { ListContactFlowsCommandInput, ListContactFlowsCommandOutput } from "../commands/ListContactFlowsCommand"; +import { + ListContactReferencesCommandInput, + ListContactReferencesCommandOutput, +} from "../commands/ListContactReferencesCommand"; import { ListHoursOfOperationsCommandInput, ListHoursOfOperationsCommandOutput, @@ -274,6 +280,7 @@ import { UpdateContactAttributesCommandInput, UpdateContactAttributesCommandOutput, } from "../commands/UpdateContactAttributesCommand"; +import { UpdateContactCommandInput, UpdateContactCommandOutput } from "../commands/UpdateContactCommand"; import { UpdateContactFlowContentCommandInput, UpdateContactFlowContentCommandOutput, @@ -282,6 +289,10 @@ import { UpdateContactFlowNameCommandInput, UpdateContactFlowNameCommandOutput, } from "../commands/UpdateContactFlowNameCommand"; +import { + UpdateContactScheduleCommandInput, + UpdateContactScheduleCommandOutput, +} from "../commands/UpdateContactScheduleCommand"; import { UpdateHoursOfOperationCommandInput, UpdateHoursOfOperationCommandOutput, @@ -366,13 +377,16 @@ import { } from "../commands/UpdateUserSecurityProfilesCommand"; import { AccessDeniedException, + AgentInfo, AgentStatus, AgentStatusSummary, AnswerMachineDetectionConfig, + AttachmentReference, Attribute, Channel, ChatMessage, ChatStreamingConfiguration, + Contact, ContactFlow, ContactFlowNotPublishedException, ContactFlowSummary, @@ -390,10 +404,8 @@ import { HierarchyGroup, HierarchyGroupSummary, HierarchyLevel, - HierarchyLevelUpdate, HierarchyPath, HierarchyStructure, - HierarchyStructureUpdate, HistoricalMetric, HistoricalMetricData, HistoricalMetricResult, @@ -426,6 +438,7 @@ import { ProblemDetail, PromptSummary, Queue, + QueueInfo, QueueQuickConnectConfig, QueueReference, QueueSummary, @@ -433,6 +446,7 @@ import { QuickConnectConfig, QuickConnectSummary, Reference, + ReferenceSummary, ResourceConflictException, ResourceInUseException, ResourceNotFoundException, @@ -448,6 +462,7 @@ import { ServiceQuotaExceededException, Threshold, ThrottlingException, + UrlReference, UseCase, User, UserIdentityInfo, @@ -457,6 +472,7 @@ import { UserSummary, VoiceRecordingConfiguration, } from "../models/models_0"; +import { HierarchyLevelUpdate, HierarchyStructureUpdate } from "../models/models_1"; export const serializeAws_restJson1AssociateApprovedOriginCommand = async ( input: AssociateApprovedOriginCommandInput, @@ -1605,6 +1621,44 @@ export const serializeAws_restJson1DescribeAgentStatusCommand = async ( }); }; +export const serializeAws_restJson1DescribeContactCommand = async ( + input: DescribeContactCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contacts/{InstanceId}/{ContactId}"; + if (input.InstanceId !== undefined) { + const labelValue: string = input.InstanceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: InstanceId."); + } + resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: InstanceId."); + } + if (input.ContactId !== undefined) { + const labelValue: string = input.ContactId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ContactId."); + } + resolvedPath = resolvedPath.replace("{ContactId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: ContactId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1DescribeContactFlowCommand = async ( input: DescribeContactFlowCommandInput, context: __SerdeContext @@ -2668,6 +2722,52 @@ export const serializeAws_restJson1ListContactFlowsCommand = async ( }); }; +export const serializeAws_restJson1ListContactReferencesCommand = async ( + input: ListContactReferencesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/contact/references/{InstanceId}/{ContactId}"; + if (input.InstanceId !== undefined) { + const labelValue: string = input.InstanceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: InstanceId."); + } + resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: InstanceId."); + } + if (input.ContactId !== undefined) { + const labelValue: string = input.ContactId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ContactId."); + } + resolvedPath = resolvedPath.replace("{ContactId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: ContactId."); + } + const query: any = { + ...(input.ReferenceTypes !== undefined && { + referenceTypes: (input.ReferenceTypes || []).map((_entry) => _entry as any), + }), + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restJson1ListHoursOfOperationsCommand = async ( input: ListHoursOfOperationsCommandInput, context: __SerdeContext @@ -3618,6 +3718,8 @@ export const serializeAws_restJson1StartTaskContactCommand = async ( input.PreviousContactId !== null && { PreviousContactId: input.PreviousContactId }), ...(input.References !== undefined && input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) }), + ...(input.ScheduledTime !== undefined && + input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) }), }); return new __HttpRequest({ protocol, @@ -3852,6 +3954,52 @@ export const serializeAws_restJson1UpdateAgentStatusCommand = async ( }); }; +export const serializeAws_restJson1UpdateContactCommand = async ( + input: UpdateContactCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contacts/{InstanceId}/{ContactId}"; + if (input.InstanceId !== undefined) { + const labelValue: string = input.InstanceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: InstanceId."); + } + resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: InstanceId."); + } + if (input.ContactId !== undefined) { + const labelValue: string = input.ContactId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ContactId."); + } + resolvedPath = resolvedPath.replace("{ContactId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: ContactId."); + } + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.References !== undefined && + input.References !== null && { References: serializeAws_restJson1ContactReferences(input.References, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1UpdateContactAttributesCommand = async ( input: UpdateContactAttributesCommandInput, context: __SerdeContext @@ -3969,6 +4117,33 @@ export const serializeAws_restJson1UpdateContactFlowNameCommand = async ( }); }; +export const serializeAws_restJson1UpdateContactScheduleCommand = async ( + input: UpdateContactScheduleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/schedule"; + let body: any; + body = JSON.stringify({ + ...(input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId }), + ...(input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId }), + ...(input.ScheduledTime !== undefined && + input.ScheduledTime !== null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1UpdateHoursOfOperationCommand = async ( input: UpdateHoursOfOperationCommandInput, context: __SerdeContext @@ -7720,6 +7895,93 @@ const deserializeAws_restJson1DescribeAgentStatusCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1DescribeContactCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeContactCommandError(output, context); + } + const contents: DescribeContactCommandOutput = { + $metadata: deserializeMetadata(output), + Contact: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Contact !== undefined && data.Contact !== null) { + contents.Contact = deserializeAws_restJson1Contact(data.Contact, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeContactCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1DescribeContactFlowCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -10126,6 +10388,97 @@ const deserializeAws_restJson1ListContactFlowsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1ListContactReferencesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListContactReferencesCommandError(output, context); + } + const contents: ListContactReferencesCommandOutput = { + $metadata: deserializeMetadata(output), + NextToken: undefined, + ReferenceSummaryList: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + if (data.ReferenceSummaryList !== undefined && data.ReferenceSummaryList !== null) { + contents.ReferenceSummaryList = deserializeAws_restJson1ReferenceSummaryList(data.ReferenceSummaryList, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListContactReferencesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1ListHoursOfOperationsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -13099,6 +13452,89 @@ const deserializeAws_restJson1UpdateAgentStatusCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1UpdateContactCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateContactCommandError(output, context); + } + const contents: UpdateContactCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateContactCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1UpdateContactAttributesCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -13356,6 +13792,97 @@ const deserializeAws_restJson1UpdateContactFlowNameCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1UpdateContactScheduleCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateContactScheduleCommandError(output, context); + } + const contents: UpdateContactScheduleCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateContactScheduleCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.connect#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1UpdateHoursOfOperationCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -16021,6 +16548,16 @@ const serializeAws_restJson1VoiceRecordingConfiguration = ( }; }; +const deserializeAws_restJson1AgentInfo = (output: any, context: __SerdeContext): AgentInfo => { + return { + ConnectedToAgentTimestamp: + output.ConnectedToAgentTimestamp !== undefined && output.ConnectedToAgentTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConnectedToAgentTimestamp))) + : undefined, + Id: __expectString(output.Id), + } as any; +}; + const deserializeAws_restJson1AgentStatus = (output: any, context: __SerdeContext): AgentStatus => { return { AgentStatusARN: __expectString(output.AgentStatusARN), @@ -16057,6 +16594,14 @@ const deserializeAws_restJson1AgentStatusSummaryList = (output: any, context: __ }); }; +const deserializeAws_restJson1AttachmentReference = (output: any, context: __SerdeContext): AttachmentReference => { + return { + Name: __expectString(output.Name), + Status: __expectString(output.Status), + Value: __expectString(output.Value), + } as any; +}; + const deserializeAws_restJson1Attribute = (output: any, context: __SerdeContext): Attribute => { return { AttributeType: __expectString(output.AttributeType), @@ -16087,6 +16632,43 @@ const deserializeAws_restJson1AttributesList = (output: any, context: __SerdeCon }); }; +const deserializeAws_restJson1Contact = (output: any, context: __SerdeContext): Contact => { + return { + AgentInfo: + output.AgentInfo !== undefined && output.AgentInfo !== null + ? deserializeAws_restJson1AgentInfo(output.AgentInfo, context) + : undefined, + Arn: __expectString(output.Arn), + Channel: __expectString(output.Channel), + Description: __expectString(output.Description), + DisconnectTimestamp: + output.DisconnectTimestamp !== undefined && output.DisconnectTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisconnectTimestamp))) + : undefined, + Id: __expectString(output.Id), + InitialContactId: __expectString(output.InitialContactId), + InitiationMethod: __expectString(output.InitiationMethod), + InitiationTimestamp: + output.InitiationTimestamp !== undefined && output.InitiationTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InitiationTimestamp))) + : undefined, + LastUpdateTimestamp: + output.LastUpdateTimestamp !== undefined && output.LastUpdateTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp))) + : undefined, + Name: __expectString(output.Name), + PreviousContactId: __expectString(output.PreviousContactId), + QueueInfo: + output.QueueInfo !== undefined && output.QueueInfo !== null + ? deserializeAws_restJson1QueueInfo(output.QueueInfo, context) + : undefined, + ScheduledTimestamp: + output.ScheduledTimestamp !== undefined && output.ScheduledTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScheduledTimestamp))) + : undefined, + } as any; +}; + const deserializeAws_restJson1ContactFlow = (output: any, context: __SerdeContext): ContactFlow => { return { Arn: __expectString(output.Arn), @@ -16793,6 +17375,16 @@ const deserializeAws_restJson1Queue = (output: any, context: __SerdeContext): Qu } as any; }; +const deserializeAws_restJson1QueueInfo = (output: any, context: __SerdeContext): QueueInfo => { + return { + EnqueueTimestamp: + output.EnqueueTimestamp !== undefined && output.EnqueueTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnqueueTimestamp))) + : undefined, + Id: __expectString(output.Id), + } as any; +}; + const deserializeAws_restJson1QueueQuickConnectConfig = ( output: any, context: __SerdeContext @@ -16888,6 +17480,31 @@ const deserializeAws_restJson1QuickConnectSummaryList = ( }); }; +const deserializeAws_restJson1ReferenceSummary = (output: any, context: __SerdeContext): ReferenceSummary => { + if (output.Attachment !== undefined && output.Attachment !== null) { + return { + Attachment: deserializeAws_restJson1AttachmentReference(output.Attachment, context), + }; + } + if (output.Url !== undefined && output.Url !== null) { + return { + Url: deserializeAws_restJson1UrlReference(output.Url, context), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +const deserializeAws_restJson1ReferenceSummaryList = (output: any, context: __SerdeContext): ReferenceSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ReferenceSummary(__expectUnion(entry), context); + }); +}; + const deserializeAws_restJson1RoutingProfile = (output: any, context: __SerdeContext): RoutingProfile => { return { DefaultOutboundQueueId: __expectString(output.DefaultOutboundQueueId), @@ -17059,6 +17676,13 @@ const deserializeAws_restJson1Threshold = (output: any, context: __SerdeContext) } as any; }; +const deserializeAws_restJson1UrlReference = (output: any, context: __SerdeContext): UrlReference => { + return { + Name: __expectString(output.Name), + Value: __expectString(output.Value), + } as any; +}; + const deserializeAws_restJson1UseCase = (output: any, context: __SerdeContext): UseCase => { return { UseCaseArn: __expectString(output.UseCaseArn), diff --git a/clients/client-database-migration-service/src/DatabaseMigrationService.ts b/clients/client-database-migration-service/src/DatabaseMigrationService.ts index 5fc85159673f..d83a73545345 100644 --- a/clients/client-database-migration-service/src/DatabaseMigrationService.ts +++ b/clients/client-database-migration-service/src/DatabaseMigrationService.ts @@ -1407,12 +1407,9 @@ export class DatabaseMigrationService extends DatabaseMigrationServiceClient { /** *

Returns the task assessment results from the Amazon S3 bucket that DMS creates in your - * Amazon Web Services account. This action always returns the - * latest results.

- *

For more information about DMS task assessments, see - * Creating a task assessment report - * in the - * Database Migration Service User Guide.

+ * Amazon Web Services account. This action always returns the latest results.

+ *

For more information about DMS task assessments, see Creating a task assessment + * report in the Database Migration Service User Guide.

*/ public describeReplicationTaskAssessmentResults( args: DescribeReplicationTaskAssessmentResultsCommandInput, diff --git a/clients/client-database-migration-service/src/commands/DescribeReplicationTaskAssessmentResultsCommand.ts b/clients/client-database-migration-service/src/commands/DescribeReplicationTaskAssessmentResultsCommand.ts index 1f692a860020..9724580261e5 100644 --- a/clients/client-database-migration-service/src/commands/DescribeReplicationTaskAssessmentResultsCommand.ts +++ b/clients/client-database-migration-service/src/commands/DescribeReplicationTaskAssessmentResultsCommand.ts @@ -33,12 +33,9 @@ export interface DescribeReplicationTaskAssessmentResultsCommandOutput /** *

Returns the task assessment results from the Amazon S3 bucket that DMS creates in your - * Amazon Web Services account. This action always returns the - * latest results.

- *

For more information about DMS task assessments, see - * Creating a task assessment report - * in the - * Database Migration Service User Guide.

+ * Amazon Web Services account. This action always returns the latest results.

+ *

For more information about DMS task assessments, see Creating a task assessment + * report in the Database Migration Service User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-database-migration-service/src/models/models_0.ts b/clients/client-database-migration-service/src/models/models_0.ts index ddadcbb05834..69e303d28ddc 100644 --- a/clients/client-database-migration-service/src/models/models_0.ts +++ b/clients/client-database-migration-service/src/models/models_0.ts @@ -682,7 +682,7 @@ export namespace DynamoDbSettings { } /** - *

Provides information that defines an Elasticsearch endpoint.

+ *

Provides information that defines an OpenSearch endpoint.

*/ export interface ElasticsearchSettings { /** @@ -692,7 +692,7 @@ export interface ElasticsearchSettings { ServiceAccessRoleArn: string | undefined; /** - *

The endpoint for the Elasticsearch cluster. DMS uses HTTPS if a transport + *

The endpoint for the OpenSearch cluster. DMS uses HTTPS if a transport * protocol (http/https) is not specified.

*/ EndpointUri: string | undefined; @@ -701,7 +701,7 @@ export interface ElasticsearchSettings { *

The maximum percentage of records that can fail to be written before a full load * operation stops.

*

To avoid early failure, this counter is only effective after 1000 records - * are transferred. Elasticsearch also has the concept of error monitoring during the + * are transferred. OpenSearch also has the concept of error monitoring during the * last 10 minutes of an Observation Window. If transfer of all records fail in the * last 10 minutes, the full load operation stops.

*/ @@ -709,7 +709,7 @@ export interface ElasticsearchSettings { /** *

The maximum number of seconds for which DMS retries failed API requests to the - * Elasticsearch cluster.

+ * OpenSearch cluster.

*/ ErrorRetryDuration?: number; } @@ -728,6 +728,139 @@ export enum ReplicationEndpointTypeValue { TARGET = "target", } +export enum TargetDbType { + MULTIPLE_DATABASES = "multiple-databases", + SPECIFIC_DATABASE = "specific-database", +} + +/** + *

Settings in JSON format for the source GCP MySQL endpoint.

+ */ +export interface GcpMySQLSettings { + /** + *

Specifies a script to run immediately after DMS connects to the endpoint. + * The migration task continues running regardless if the SQL statement succeeds or fails.

+ * + *

For this parameter, provide the code of the script itself, not the name of a file containing the script.

+ */ + AfterConnectScript?: string; + + /** + *

Adjusts the behavior of DMS when migrating from an SQL Server source database + * that is hosted as part of an Always On availability group cluster. If you need DMS + * to poll all the nodes in the Always On cluster for transaction backups, set this attribute to false.

+ */ + CleanSourceMetadataOnMismatch?: boolean; + + /** + *

Database name for the endpoint. For a MySQL source or target endpoint, don't explicitly specify + * the database using the DatabaseName request parameter on either the CreateEndpoint + * or ModifyEndpoint API call. Specifying DatabaseName when you create or modify a + * MySQL endpoint replicates all the task tables to this single database. For MySQL endpoints, you specify + * the database only when you specify the schema in the table-mapping rules of the DMS task.

+ */ + DatabaseName?: string; + + /** + *

Specifies how often to check the binary log for new changes/events when the database is idle. The default is five seconds.

+ *

Example: eventsPollInterval=5; + *

+ *

In the example, DMS checks for changes in the binary logs every five seconds.

+ */ + EventsPollInterval?: number; + + /** + *

Specifies where to migrate source tables on the target, either to a single database or multiple databases.

+ *

Example: targetDbType=MULTIPLE_DATABASES + *

+ */ + TargetDbType?: TargetDbType | string; + + /** + *

Specifies the maximum size (in KB) of any .csv file used to transfer data to a MySQL-compatible database.

+ *

Example: maxFileSize=512 + *

+ */ + MaxFileSize?: number; + + /** + *

Improves performance when loading data into the MySQL-compatible target database. Specifies how many + * threads to use to load the data into the MySQL-compatible target database. Setting a large number of + * threads can have an adverse effect on database performance, because a separate connection is required + * for each thread. The default is one.

+ * + *

Example: parallelLoadThreads=1 + *

+ */ + ParallelLoadThreads?: number; + + /** + *

Endpoint connection password.

+ */ + Password?: string; + + /** + *

+ */ + Port?: number; + + /** + *

Endpoint TCP port.

+ */ + ServerName?: string; + + /** + *

Specifies the time zone for the source MySQL database.

+ * + *

Example: serverTimezone=US/Pacific; + *

+ * + *

Note: Do not enclose time zones in single quotes.

+ */ + ServerTimezone?: string; + + /** + *

Endpoint connection user name.

+ */ + Username?: string; + + /** + *

The full Amazon Resource Name (ARN) of the IAM role that specifies DMS + * as the trusted entity and grants the required permissions to access the value in + * SecretsManagerSecret. The role must allow the iam:PassRole action. + * SecretsManagerSecret has the value of the Amazon Web Services Secrets Manager secret + * that allows access to the MySQL endpoint.

+ * + *

You can specify one of two sets of values for these permissions. You can specify + * the values for this setting and SecretsManagerSecretId. Or you can specify clear-text + * values for UserName, Password, ServerName, and Port. + * You can't specify both. For more information on creating this SecretsManagerSecret + * and the SecretsManagerAccessRoleArn and SecretsManagerSecretId required to + * access it, see Using secrets to access Database Migration Service resources in the + * Database Migration Service User Guide. + * + *

+ *
+ */ + SecretsManagerAccessRoleArn?: string; + + /** + *

The full ARN, partial ARN, or friendly name of the SecretsManagerSecret + * that contains the MySQL endpoint connection details.

+ */ + SecretsManagerSecretId?: string; +} + +export namespace GcpMySQLSettings { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GcpMySQLSettings): any => ({ + ...obj, + ...(obj.Password && { Password: SENSITIVE_STRING }), + }); +} + /** *

Provides information that defines an IBM Db2 LUW endpoint.

*/ @@ -1321,11 +1454,6 @@ export namespace MongoDbSettings { }); } -export enum TargetDbType { - MULTIPLE_DATABASES = "multiple-databases", - SPECIFIC_DATABASE = "specific-database", -} - /** *

Provides information that defines a MySQL endpoint.

*/ @@ -1359,7 +1487,7 @@ export interface MySQLSettings { /** *

Specifies how often to check the binary log for new - * changes/events when the database is idle.

+ * changes/events when the database is idle. The default is five seconds.

*

Example: eventsPollInterval=5; *

*

In the example, DMS checks for changes in the binary @@ -1387,7 +1515,7 @@ export interface MySQLSettings { *

Improves performance when loading data into the MySQL-compatible target database. * Specifies how many threads to use to load the data into the MySQL-compatible target * database. Setting a large number of threads can have an adverse effect on database - * performance, because a separate connection is required for each thread.

+ * performance, because a separate connection is required for each thread. The default is one.

*

Example: parallelLoadThreads=1 *

*/ @@ -2009,7 +2137,7 @@ export interface PostgreSQLSettings { Password?: string; /** - *

Endpoint TCP port.

+ *

Endpoint TCP port. The default is 5432.

*/ Port?: number; @@ -2905,6 +3033,17 @@ export interface S3Settings { */ CdcPath?: string; + /** + *

When set to true, this parameter uses the task start time as the timestamp column value instead of + * the time data is written to target. For full load, when useTaskStartTimeForFullLoadTimestamp + * is set to true, each row of the timestamp column contains the task start time. For CDC loads, + * each row of the timestamp column contains the transaction commit time.

+ * + *

When useTaskStartTimeForFullLoadTimestamp is set to false, the full load timestamp + * in the timestamp column increments with the time data arrives at the target.

+ */ + UseTaskStartTimeForFullLoadTimestamp?: boolean; + /** *

A value that enables DMS to specify a predefined (canned) access control list for * objects created in an Amazon S3 bucket as .csv or .parquet files. For more information @@ -3025,7 +3164,7 @@ export interface SybaseSettings { Password?: string; /** - *

Endpoint TCP port.

+ *

Endpoint TCP port. The default is 5000.

*/ Port?: number; @@ -3094,8 +3233,8 @@ export interface CreateEndpointMessage { /** *

The type of engine for the endpoint. Valid values, depending on the * EndpointType value, include "mysql", "oracle", - * "postgres", "mariadb", "aurora", - * "aurora-postgresql", "redshift", "s3", + * "postgres", "mariadb", "aurora", + * "aurora-postgresql", "opensearch", "redshift", "s3", * "db2", "azuredb", "sybase", "dynamodb", "mongodb", * "kinesis", "kafka", "elasticsearch", "docdb", * "sqlserver", and "neptune".

@@ -3242,8 +3381,8 @@ export interface CreateEndpointMessage { KafkaSettings?: KafkaSettings; /** - *

Settings in JSON format for the target Elasticsearch endpoint. For more information - * about the available settings, see Extra Connection Attributes When Using Elasticsearch as a Target for DMS in + *

Settings in JSON format for the target OpenSearch endpoint. For more information + * about the available settings, see Extra Connection Attributes When Using OpenSearch as a Target for DMS in * the Database Migration Service User Guide.

*/ ElasticsearchSettings?: ElasticsearchSettings; @@ -3343,6 +3482,11 @@ export interface CreateEndpointMessage { *

Settings in JSON format for the target Redis endpoint.

*/ RedisSettings?: RedisSettings; + + /** + *

Settings in JSON format for the source GCP MySQL endpoint.

+ */ + GcpMySQLSettings?: GcpMySQLSettings; } export namespace CreateEndpointMessage { @@ -3367,6 +3511,7 @@ export namespace CreateEndpointMessage { ...(obj.IBMDb2Settings && { IBMDb2Settings: IBMDb2Settings.filterSensitiveLog(obj.IBMDb2Settings) }), ...(obj.DocDbSettings && { DocDbSettings: DocDbSettings.filterSensitiveLog(obj.DocDbSettings) }), ...(obj.RedisSettings && { RedisSettings: RedisSettings.filterSensitiveLog(obj.RedisSettings) }), + ...(obj.GcpMySQLSettings && { GcpMySQLSettings: GcpMySQLSettings.filterSensitiveLog(obj.GcpMySQLSettings) }), }); } @@ -3407,7 +3552,7 @@ export interface Endpoint { /** *

The database engine name. Valid values, depending on the EndpointType, include * "mysql", "oracle", "postgres", - * "mariadb", "aurora", "aurora-postgresql", + * "mariadb", "aurora", "aurora-postgresql", "opensearch", * "redshift", "s3", "db2", "azuredb", * "sybase", "dynamodb", "mongodb", * "kinesis", "kafka", "elasticsearch", @@ -3506,25 +3651,7 @@ export interface Endpoint { S3Settings?: S3Settings; /** - *

The settings in JSON format for the DMS transfer type of source endpoint.

- *

Possible settings include the following:

- *
    - *
  • - *

    - * ServiceAccessRoleArn - - The Amazon Resource Name (ARN) used by the service access IAM role. - * The role must allow the iam:PassRole action.

    - *
  • - *
  • - *

    - * BucketName - The name of the S3 bucket to use.

    - *
  • - *
- *

Shorthand syntax for these settings is as follows: - * ServiceAccessRoleArn=string,BucketName=string, - *

- *

JSON syntax for these settings is as follows: { "ServiceAccessRoleArn": - * "string", "BucketName": "string"} - *

+ *

The settings for the DMS Transfer type source. For more information, see the DmsTransferSettings structure.

*/ DmsTransferSettings?: DmsTransferSettings; @@ -3547,7 +3674,7 @@ export interface Endpoint { KafkaSettings?: KafkaSettings; /** - *

The settings for the Elasticsearch source endpoint. For more information, see the + *

The settings for the OpenSearch source endpoint. For more information, see the * ElasticsearchSettings structure.

*/ ElasticsearchSettings?: ElasticsearchSettings; @@ -3610,6 +3737,11 @@ export interface Endpoint { * RedisSettings structure.

*/ RedisSettings?: RedisSettings; + + /** + *

Settings in JSON format for the source GCP MySQL endpoint.

+ */ + GcpMySQLSettings?: GcpMySQLSettings; } export namespace Endpoint { @@ -3633,6 +3765,7 @@ export namespace Endpoint { ...(obj.IBMDb2Settings && { IBMDb2Settings: IBMDb2Settings.filterSensitiveLog(obj.IBMDb2Settings) }), ...(obj.DocDbSettings && { DocDbSettings: DocDbSettings.filterSensitiveLog(obj.DocDbSettings) }), ...(obj.RedisSettings && { RedisSettings: RedisSettings.filterSensitiveLog(obj.RedisSettings) }), + ...(obj.GcpMySQLSettings && { GcpMySQLSettings: GcpMySQLSettings.filterSensitiveLog(obj.GcpMySQLSettings) }), }); } @@ -3910,7 +4043,7 @@ export namespace KMSAccessDeniedFault { } /** - *

The specified master key (CMK) isn't enabled.

+ *

The specified KMS key isn't enabled.

*/ export interface KMSDisabledFault extends __SmithyException, $MetadataBearer { name: "KMSDisabledFault"; @@ -5243,7 +5376,7 @@ export namespace CreateReplicationTaskResponse { export interface DeleteCertificateMessage { /** - *

The Amazon Resource Name (ARN) of the deleted certificate.

+ *

The Amazon Resource Name (ARN) of the certificate.

*/ CertificateArn: string | undefined; } @@ -5280,7 +5413,8 @@ export interface Certificate { CertificatePem?: string; /** - *

The location of an imported Oracle Wallet certificate for use with SSL.

+ *

The location of an imported Oracle Wallet certificate for use with SSL. Example: filebase64("${path.root}/rds-ca-2019-root.sso") + *

*/ CertificateWallet?: Uint8Array; @@ -5844,7 +5978,8 @@ export namespace Filter { export interface DescribeCertificatesMessage { /** - *

Filters applied to the certificates described in the form of key-value pairs.

+ *

Filters applied to the certificates described in the form of key-value pairs. + * Valid values are certificate-arn and certificate-id.

*/ Filters?: Filter[]; @@ -6361,7 +6496,7 @@ export interface DescribeEventsMessage { EventCategories?: string[]; /** - *

Filters applied to events.

+ *

Filters applied to events. The only valid filter is replication-instance-id.

*/ Filters?: Filter[]; @@ -6470,6 +6605,7 @@ export interface DescribeEventSubscriptionsMessage { /** *

Filters applied to event subscriptions.

+ *

Valid filter names: event-subscription-arn | event-subscription-id

*/ Filters?: Filter[]; @@ -7725,8 +7861,9 @@ export interface ImportCertificateMessage { /** *

The location of an imported Oracle Wallet certificate for use with SSL. Provide the name of a .sso file - * using the fileb:// prefix. You can't provide the certificate inline. - *

+ * using the fileb:// prefix. You can't provide the certificate inline.

+ *

Example: filebase64("${path.root}/rds-ca-2019-root.sso") + *

*/ CertificateWallet?: Uint8Array; @@ -7853,7 +7990,7 @@ export interface ModifyEndpointMessage { *

The type of engine for the endpoint. Valid values, depending on the EndpointType, * include * "mysql", "oracle", "postgres", - * "mariadb", "aurora", "aurora-postgresql", + * "mariadb", "aurora", "aurora-postgresql", "opensearch", * "redshift", "s3", "db2", "azuredb", * "sybase", "dynamodb", "mongodb", * "kinesis", "kafka", "elasticsearch", @@ -7977,8 +8114,8 @@ export interface ModifyEndpointMessage { KafkaSettings?: KafkaSettings; /** - *

Settings in JSON format for the target Elasticsearch endpoint. For more information - * about the available settings, see Extra Connection Attributes When Using Elasticsearch as a Target for DMS in + *

Settings in JSON format for the target OpenSearch endpoint. For more information + * about the available settings, see Extra Connection Attributes When Using OpenSearch as a Target for DMS in * the Database Migration Service User Guide. *

*/ @@ -8094,6 +8231,11 @@ export interface ModifyEndpointMessage { * are replaced with the exact settings that you specify.

*/ ExactSettings?: boolean; + + /** + *

Settings in JSON format for the source GCP MySQL endpoint.

+ */ + GcpMySQLSettings?: GcpMySQLSettings; } export namespace ModifyEndpointMessage { @@ -8118,6 +8260,7 @@ export namespace ModifyEndpointMessage { ...(obj.IBMDb2Settings && { IBMDb2Settings: IBMDb2Settings.filterSensitiveLog(obj.IBMDb2Settings) }), ...(obj.DocDbSettings && { DocDbSettings: DocDbSettings.filterSensitiveLog(obj.DocDbSettings) }), ...(obj.RedisSettings && { RedisSettings: RedisSettings.filterSensitiveLog(obj.RedisSettings) }), + ...(obj.GcpMySQLSettings && { GcpMySQLSettings: GcpMySQLSettings.filterSensitiveLog(obj.GcpMySQLSettings) }), }); } @@ -8801,7 +8944,13 @@ export interface StartReplicationTaskMessage { ReplicationTaskArn: string | undefined; /** - *

A type of replication task.

+ *

The type of replication task to start.

+ *

When the migration type is full-load or full-load-and-cdc, the only valid value + * for the first run of the task is start-replication. You use reload-target to restart + * the task and resume-processing to resume the task.

+ *

When the migration type is cdc, you use start-replication to start or restart + * the task, and resume-processing to resume the task. reload-target is not a valid value for + * a task with migration type of cdc.

*/ StartReplicationTaskType: StartReplicationTaskTypeValue | string | undefined; diff --git a/clients/client-database-migration-service/src/protocols/Aws_json1_1.ts b/clients/client-database-migration-service/src/protocols/Aws_json1_1.ts index 90ee0b55c9a3..81471f2bda75 100644 --- a/clients/client-database-migration-service/src/protocols/Aws_json1_1.ts +++ b/clients/client-database-migration-service/src/protocols/Aws_json1_1.ts @@ -290,6 +290,7 @@ import { EventCategoryGroup, EventSubscription, Filter, + GcpMySQLSettings, IBMDb2Settings, ImportCertificateMessage, ImportCertificateResponse, @@ -5301,6 +5302,10 @@ const serializeAws_json1_1CreateEndpointMessage = (input: CreateEndpointMessage, input.ExternalTableDefinition !== null && { ExternalTableDefinition: input.ExternalTableDefinition }), ...(input.ExtraConnectionAttributes !== undefined && input.ExtraConnectionAttributes !== null && { ExtraConnectionAttributes: input.ExtraConnectionAttributes }), + ...(input.GcpMySQLSettings !== undefined && + input.GcpMySQLSettings !== null && { + GcpMySQLSettings: serializeAws_json1_1GcpMySQLSettings(input.GcpMySQLSettings, context), + }), ...(input.IBMDb2Settings !== undefined && input.IBMDb2Settings !== null && { IBMDb2Settings: serializeAws_json1_1IBMDb2Settings(input.IBMDb2Settings, context), @@ -5925,6 +5930,34 @@ const serializeAws_json1_1FilterValueList = (input: string[], context: __SerdeCo }); }; +const serializeAws_json1_1GcpMySQLSettings = (input: GcpMySQLSettings, context: __SerdeContext): any => { + return { + ...(input.AfterConnectScript !== undefined && + input.AfterConnectScript !== null && { AfterConnectScript: input.AfterConnectScript }), + ...(input.CleanSourceMetadataOnMismatch !== undefined && + input.CleanSourceMetadataOnMismatch !== null && { + CleanSourceMetadataOnMismatch: input.CleanSourceMetadataOnMismatch, + }), + ...(input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName }), + ...(input.EventsPollInterval !== undefined && + input.EventsPollInterval !== null && { EventsPollInterval: input.EventsPollInterval }), + ...(input.MaxFileSize !== undefined && input.MaxFileSize !== null && { MaxFileSize: input.MaxFileSize }), + ...(input.ParallelLoadThreads !== undefined && + input.ParallelLoadThreads !== null && { ParallelLoadThreads: input.ParallelLoadThreads }), + ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }), + ...(input.Port !== undefined && input.Port !== null && { Port: input.Port }), + ...(input.SecretsManagerAccessRoleArn !== undefined && + input.SecretsManagerAccessRoleArn !== null && { SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn }), + ...(input.SecretsManagerSecretId !== undefined && + input.SecretsManagerSecretId !== null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), + ...(input.ServerName !== undefined && input.ServerName !== null && { ServerName: input.ServerName }), + ...(input.ServerTimezone !== undefined && + input.ServerTimezone !== null && { ServerTimezone: input.ServerTimezone }), + ...(input.TargetDbType !== undefined && input.TargetDbType !== null && { TargetDbType: input.TargetDbType }), + ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }), + }; +}; + const serializeAws_json1_1IBMDb2Settings = (input: IBMDb2Settings, context: __SerdeContext): any => { return { ...(input.CurrentLsn !== undefined && input.CurrentLsn !== null && { CurrentLsn: input.CurrentLsn }), @@ -6123,6 +6156,10 @@ const serializeAws_json1_1ModifyEndpointMessage = (input: ModifyEndpointMessage, input.ExternalTableDefinition !== null && { ExternalTableDefinition: input.ExternalTableDefinition }), ...(input.ExtraConnectionAttributes !== undefined && input.ExtraConnectionAttributes !== null && { ExtraConnectionAttributes: input.ExtraConnectionAttributes }), + ...(input.GcpMySQLSettings !== undefined && + input.GcpMySQLSettings !== null && { + GcpMySQLSettings: serializeAws_json1_1GcpMySQLSettings(input.GcpMySQLSettings, context), + }), ...(input.IBMDb2Settings !== undefined && input.IBMDb2Settings !== null && { IBMDb2Settings: serializeAws_json1_1IBMDb2Settings(input.IBMDb2Settings, context), @@ -6643,6 +6680,10 @@ const serializeAws_json1_1S3Settings = (input: S3Settings, context: __SerdeConte input.TimestampColumnName !== null && { TimestampColumnName: input.TimestampColumnName }), ...(input.UseCsvNoSupValue !== undefined && input.UseCsvNoSupValue !== null && { UseCsvNoSupValue: input.UseCsvNoSupValue }), + ...(input.UseTaskStartTimeForFullLoadTimestamp !== undefined && + input.UseTaskStartTimeForFullLoadTimestamp !== null && { + UseTaskStartTimeForFullLoadTimestamp: input.UseTaskStartTimeForFullLoadTimestamp, + }), }; }; @@ -7433,6 +7474,10 @@ const deserializeAws_json1_1Endpoint = (output: any, context: __SerdeContext): E ExternalId: __expectString(output.ExternalId), ExternalTableDefinition: __expectString(output.ExternalTableDefinition), ExtraConnectionAttributes: __expectString(output.ExtraConnectionAttributes), + GcpMySQLSettings: + output.GcpMySQLSettings !== undefined && output.GcpMySQLSettings !== null + ? deserializeAws_json1_1GcpMySQLSettings(output.GcpMySQLSettings, context) + : undefined, IBMDb2Settings: output.IBMDb2Settings !== undefined && output.IBMDb2Settings !== null ? deserializeAws_json1_1IBMDb2Settings(output.IBMDb2Settings, context) @@ -7635,6 +7680,25 @@ const deserializeAws_json1_1EventSubscriptionsList = (output: any, context: __Se }); }; +const deserializeAws_json1_1GcpMySQLSettings = (output: any, context: __SerdeContext): GcpMySQLSettings => { + return { + AfterConnectScript: __expectString(output.AfterConnectScript), + CleanSourceMetadataOnMismatch: __expectBoolean(output.CleanSourceMetadataOnMismatch), + DatabaseName: __expectString(output.DatabaseName), + EventsPollInterval: __expectInt32(output.EventsPollInterval), + MaxFileSize: __expectInt32(output.MaxFileSize), + ParallelLoadThreads: __expectInt32(output.ParallelLoadThreads), + Password: __expectString(output.Password), + Port: __expectInt32(output.Port), + SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), + SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), + ServerName: __expectString(output.ServerName), + ServerTimezone: __expectString(output.ServerTimezone), + TargetDbType: __expectString(output.TargetDbType), + Username: __expectString(output.Username), + } as any; +}; + const deserializeAws_json1_1IBMDb2Settings = (output: any, context: __SerdeContext): IBMDb2Settings => { return { CurrentLsn: __expectString(output.CurrentLsn), @@ -8651,6 +8715,7 @@ const deserializeAws_json1_1S3Settings = (output: any, context: __SerdeContext): ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), TimestampColumnName: __expectString(output.TimestampColumnName), UseCsvNoSupValue: __expectBoolean(output.UseCsvNoSupValue), + UseTaskStartTimeForFullLoadTimestamp: __expectBoolean(output.UseTaskStartTimeForFullLoadTimestamp), } as any; }; diff --git a/clients/client-devops-guru/README.md b/clients/client-devops-guru/README.md index 6fb9e8b728f3..6ef3585111c2 100644 --- a/clients/client-devops-guru/README.md +++ b/clients/client-devops-guru/README.md @@ -7,22 +7,20 @@ AWS SDK for JavaScript DevOpsGuru Client for Node.js, Browser and React Native. -

Amazon DevOps Guru is a fully managed service that helps you identify anomalous behavior in business -critical operational applications. You specify the AWS resources that you want DevOps Guru to cover, -then the Amazon CloudWatch metrics and AWS CloudTrail events related to those resources are analyzed. When -anomalous behavior is detected, DevOps Guru creates an insight that includes -recommendations, related events, and related metrics that can help you improve your -operational applications. For more information, see What is Amazon DevOps Guru.

- -

-You can specify 1 or 2 Amazon Simple Notification Service topics so you are notified every time a new insight is created. You can also enable DevOps Guru to generate -an OpsItem in AWS Systems Manager for each insight to help you manage and track your work addressing insights. -

- -

-To learn about the DevOps Guru workflow, see How DevOps Guru works. To -learn about DevOps Guru concepts, see Concepts in DevOps Guru. -

+

Amazon DevOps Guru is a fully managed service that helps you identify anomalous behavior in +business critical operational applications. You specify the Amazon Web Services resources that you +want DevOps Guru to cover, then the Amazon CloudWatch metrics and Amazon Web Services CloudTrail events related to those +resources are analyzed. When anomalous behavior is detected, DevOps Guru creates an +insight that includes recommendations, related events, and +related metrics that can help you improve your operational applications. For more +information, see What is Amazon DevOps Guru.

+ +

You can specify 1 or 2 Amazon Simple Notification Service topics so you are notified every time a new insight +is created. You can also enable DevOps Guru to generate an OpsItem in Amazon Web Services Systems Manager for each +insight to help you manage and track your work addressing insights.

+ +

To learn about the DevOps Guru workflow, see How DevOps Guru works. To +learn about DevOps Guru concepts, see Concepts in DevOps Guru.

## Installing diff --git a/clients/client-devops-guru/src/DevOpsGuru.ts b/clients/client-devops-guru/src/DevOpsGuru.ts index 96c1b81b166f..4efc47d77778 100644 --- a/clients/client-devops-guru/src/DevOpsGuru.ts +++ b/clients/client-devops-guru/src/DevOpsGuru.ts @@ -30,6 +30,21 @@ import { DescribeInsightCommandInput, DescribeInsightCommandOutput, } from "./commands/DescribeInsightCommand"; +import { + DescribeOrganizationHealthCommand, + DescribeOrganizationHealthCommandInput, + DescribeOrganizationHealthCommandOutput, +} from "./commands/DescribeOrganizationHealthCommand"; +import { + DescribeOrganizationOverviewCommand, + DescribeOrganizationOverviewCommandInput, + DescribeOrganizationOverviewCommandOutput, +} from "./commands/DescribeOrganizationOverviewCommand"; +import { + DescribeOrganizationResourceCollectionHealthCommand, + DescribeOrganizationResourceCollectionHealthCommandInput, + DescribeOrganizationResourceCollectionHealthCommandOutput, +} from "./commands/DescribeOrganizationResourceCollectionHealthCommand"; import { DescribeResourceCollectionHealthCommand, DescribeResourceCollectionHealthCommandInput, @@ -66,6 +81,11 @@ import { ListNotificationChannelsCommandInput, ListNotificationChannelsCommandOutput, } from "./commands/ListNotificationChannelsCommand"; +import { + ListOrganizationInsightsCommand, + ListOrganizationInsightsCommandInput, + ListOrganizationInsightsCommandOutput, +} from "./commands/ListOrganizationInsightsCommand"; import { ListRecommendationsCommand, ListRecommendationsCommandInput, @@ -82,6 +102,11 @@ import { SearchInsightsCommandInput, SearchInsightsCommandOutput, } from "./commands/SearchInsightsCommand"; +import { + SearchOrganizationInsightsCommand, + SearchOrganizationInsightsCommandInput, + SearchOrganizationInsightsCommandOutput, +} from "./commands/SearchOrganizationInsightsCommand"; import { StartCostEstimationCommand, StartCostEstimationCommandInput, @@ -100,36 +125,32 @@ import { import { DevOpsGuruClient } from "./DevOpsGuruClient"; /** - *

Amazon DevOps Guru is a fully managed service that helps you identify anomalous behavior in business - * critical operational applications. You specify the AWS resources that you want DevOps Guru to cover, - * then the Amazon CloudWatch metrics and AWS CloudTrail events related to those resources are analyzed. When - * anomalous behavior is detected, DevOps Guru creates an insight that includes - * recommendations, related events, and related metrics that can help you improve your - * operational applications. For more information, see What is Amazon DevOps Guru.

+ *

Amazon DevOps Guru is a fully managed service that helps you identify anomalous behavior in + * business critical operational applications. You specify the Amazon Web Services resources that you + * want DevOps Guru to cover, then the Amazon CloudWatch metrics and Amazon Web Services CloudTrail events related to those + * resources are analyzed. When anomalous behavior is detected, DevOps Guru creates an + * insight that includes recommendations, related events, and + * related metrics that can help you improve your operational applications. For more + * information, see What is Amazon DevOps Guru.

* - *

- * You can specify 1 or 2 Amazon Simple Notification Service topics so you are notified every time a new insight is created. You can also enable DevOps Guru to generate - * an OpsItem in AWS Systems Manager for each insight to help you manage and track your work addressing insights. - *

+ *

You can specify 1 or 2 Amazon Simple Notification Service topics so you are notified every time a new insight + * is created. You can also enable DevOps Guru to generate an OpsItem in Amazon Web Services Systems Manager for each + * insight to help you manage and track your work addressing insights.

* - *

- * To learn about the DevOps Guru workflow, see How DevOps Guru works. To - * learn about DevOps Guru concepts, see Concepts in DevOps Guru. - *

+ *

To learn about the DevOps Guru workflow, see How DevOps Guru works. To + * learn about DevOps Guru concepts, see Concepts in DevOps Guru.

*/ export class DevOpsGuru extends DevOpsGuruClient { /** - *

- * Adds a notification channel to DevOps Guru. A notification channel is used to notify you about important DevOps Guru events, such as when an insight is generated. - *

- * + *

Adds a notification channel to DevOps Guru. A notification channel is used to notify you + * about important DevOps Guru events, such as when an insight is generated.

*

If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission * to it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. * For more information, see Permissions * for cross account Amazon SNS topics.

- *

If you use an Amazon SNS topic that is encrypted by an AWS Key Management Service customer-managed key (CMK), then you must add permissions + *

If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions * to the CMK. For more information, see Permissions for - * AWS KMS–encrypted Amazon SNS topics.

+ * Amazon Web Services KMS–encrypted Amazon SNS topics.

*/ public addNotificationChannel( args: AddNotificationChannelCommandInput, @@ -161,10 +182,9 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns the number of open reactive insights, the number of open proactive insights, and the number of metrics analyzed in your AWS account. - * Use these numbers to gauge the health of operations in your AWS account. - *

+ *

Returns the number of open reactive insights, the number of open proactive insights, + * and the number of metrics analyzed in your Amazon Web Services account. Use these numbers to gauge the + * health of operations in your Amazon Web Services account.

*/ public describeAccountHealth( args: DescribeAccountHealthCommandInput, @@ -196,10 +216,9 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * For the time range passed in, returns the number of open reactive insight that were created, the number of open proactive insights - * that were created, and the Mean Time to Recover (MTTR) for all closed reactive insights. - *

+ *

For the time range passed in, returns the number of open reactive insight that were + * created, the number of open proactive insights that were created, and the Mean Time to Recover (MTTR) for all + * closed reactive insights.

*/ public describeAccountOverview( args: DescribeAccountOverviewCommandInput, @@ -231,9 +250,7 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns details about an anomaly that you specify using its ID. - *

+ *

Returns details about an anomaly that you specify using its ID.

*/ public describeAnomaly( args: DescribeAnomalyCommandInput, @@ -265,8 +282,7 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns the most recent feedback submitted in the current AWS account and Region. + *

Returns the most recent feedback submitted in the current Amazon Web Services account and Region. *

*/ public describeFeedback( @@ -299,9 +315,7 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns details about an insight that you specify using its ID. - *

+ *

Returns details about an insight that you specify using its ID.

*/ public describeInsight( args: DescribeInsightCommandInput, @@ -333,11 +347,112 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns the number of open proactive insights, open reactive insights, and the Mean Time to Recover (MTTR) for all closed insights in - * resource collections in your account. You specify the type of AWS resources collection. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

Returns active insights, predictive insights, and resource hours analyzed in last + * hour.

+ */ + public describeOrganizationHealth( + args: DescribeOrganizationHealthCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeOrganizationHealth( + args: DescribeOrganizationHealthCommandInput, + cb: (err: any, data?: DescribeOrganizationHealthCommandOutput) => void + ): void; + public describeOrganizationHealth( + args: DescribeOrganizationHealthCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeOrganizationHealthCommandOutput) => void + ): void; + public describeOrganizationHealth( + args: DescribeOrganizationHealthCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeOrganizationHealthCommandOutput) => void), + cb?: (err: any, data?: DescribeOrganizationHealthCommandOutput) => void + ): Promise | void { + const command = new DescribeOrganizationHealthCommand(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); + } + } + + /** + *

Returns an overview of your organization's history based on the specified time range. + * The overview includes the total reactive and proactive insights.

+ */ + public describeOrganizationOverview( + args: DescribeOrganizationOverviewCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeOrganizationOverview( + args: DescribeOrganizationOverviewCommandInput, + cb: (err: any, data?: DescribeOrganizationOverviewCommandOutput) => void + ): void; + public describeOrganizationOverview( + args: DescribeOrganizationOverviewCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeOrganizationOverviewCommandOutput) => void + ): void; + public describeOrganizationOverview( + args: DescribeOrganizationOverviewCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeOrganizationOverviewCommandOutput) => void), + cb?: (err: any, data?: DescribeOrganizationOverviewCommandOutput) => void + ): Promise | void { + const command = new DescribeOrganizationOverviewCommand(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); + } + } + + /** + *

Provides an overview of your system's health. If additional member accounts are part + * of your organization, you can filter those accounts using the AccountIds + * field.

+ */ + public describeOrganizationResourceCollectionHealth( + args: DescribeOrganizationResourceCollectionHealthCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeOrganizationResourceCollectionHealth( + args: DescribeOrganizationResourceCollectionHealthCommandInput, + cb: (err: any, data?: DescribeOrganizationResourceCollectionHealthCommandOutput) => void + ): void; + public describeOrganizationResourceCollectionHealth( + args: DescribeOrganizationResourceCollectionHealthCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeOrganizationResourceCollectionHealthCommandOutput) => void + ): void; + public describeOrganizationResourceCollectionHealth( + args: DescribeOrganizationResourceCollectionHealthCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DescribeOrganizationResourceCollectionHealthCommandOutput) => void), + cb?: (err: any, data?: DescribeOrganizationResourceCollectionHealthCommandOutput) => void + ): Promise | void { + const command = new DescribeOrganizationResourceCollectionHealthCommand(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); + } + } + + /** + *

Returns the number of open proactive insights, open reactive insights, and the Mean Time to Recover (MTTR) + * for all closed insights in resource collections in your account. You specify the type of + * Amazon Web Services resources collection. The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ public describeResourceCollectionHealth( args: DescribeResourceCollectionHealthCommandInput, @@ -369,11 +484,9 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns the integration status of services that are integrated with DevOps Guru. + *

Returns the integration status of services that are integrated with DevOps Guru. * The one service that can be integrated with DevOps Guru - * is AWS Systems Manager, which can be used to create an OpsItem for each generated insight. - *

+ * is Amazon Web Services Systems Manager, which can be used to create an OpsItem for each generated insight.

*/ public describeServiceIntegration( args: DescribeServiceIntegrationCommandInput, @@ -405,7 +518,7 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

Returns an estimate of the monthly cost for DevOps Guru to analyze your AWS resources. + *

Returns an estimate of the monthly cost for DevOps Guru to analyze your Amazon Web Services resources. * For more information, * see Estimate your * Amazon DevOps Guru costs and @@ -441,10 +554,9 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns lists AWS resources that are of the specified resource collection type. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

Returns lists Amazon Web Services resources that are of the specified resource collection type. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ public getResourceCollection( args: GetResourceCollectionCommandInput, @@ -476,9 +588,8 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns a list of the anomalies that belong to an insight that you specify using its ID. - *

+ *

Returns a list of the anomalies that belong to an insight that you specify using its + * ID.

*/ public listAnomaliesForInsight( args: ListAnomaliesForInsightCommandInput, @@ -510,9 +621,8 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns a list of the events emitted by the resources that are evaluated by DevOps Guru. You can use filters to specify which events are returned. - *

+ *

Returns a list of the events emitted by the resources that are evaluated by DevOps Guru. + * You can use filters to specify which events are returned.

*/ public listEvents(args: ListEventsCommandInput, options?: __HttpHandlerOptions): Promise; public listEvents(args: ListEventsCommandInput, cb: (err: any, data?: ListEventsCommandOutput) => void): void; @@ -538,10 +648,9 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns a list of insights in your AWS account. You can specify which insights are returned by their start time and - * status (ONGOING, CLOSED, or ANY). - *

+ *

Returns a list of insights in your Amazon Web Services account. You can specify which insights are + * returned by their start time and status (ONGOING, CLOSED, or + * ANY).

*/ public listInsights( args: ListInsightsCommandInput, @@ -570,11 +679,10 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns a list of notification channels configured for DevOps Guru. Each notification channel is used to notify you when - * DevOps Guru generates an insight that contains information about how to improve your operations. The one - * supported notification channel is Amazon Simple Notification Service (Amazon SNS). - *

+ *

Returns a list of notification channels configured for DevOps Guru. Each notification + * channel is used to notify you when DevOps Guru generates an insight that contains information + * about how to improve your operations. The one + * supported notification channel is Amazon Simple Notification Service (Amazon SNS).

*/ public listNotificationChannels( args: ListNotificationChannelsCommandInput, @@ -606,9 +714,40 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns a list of a specified insight's recommendations. Each recommendation includes a list of related metrics and a list of related events. - *

+ *

Returns a list of insights associated with the account or OU Id.

+ */ + public listOrganizationInsights( + args: ListOrganizationInsightsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listOrganizationInsights( + args: ListOrganizationInsightsCommandInput, + cb: (err: any, data?: ListOrganizationInsightsCommandOutput) => void + ): void; + public listOrganizationInsights( + args: ListOrganizationInsightsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListOrganizationInsightsCommandOutput) => void + ): void; + public listOrganizationInsights( + args: ListOrganizationInsightsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListOrganizationInsightsCommandOutput) => void), + cb?: (err: any, data?: ListOrganizationInsightsCommandOutput) => void + ): Promise | void { + const command = new ListOrganizationInsightsCommand(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); + } + } + + /** + *

Returns a list of a specified insight's recommendations. Each recommendation includes + * a list of related metrics and a list of related events.

*/ public listRecommendations( args: ListRecommendationsCommandInput, @@ -640,9 +779,7 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Collects customer feedback about the specified insight. - *

+ *

Collects customer feedback about the specified insight.

*/ public putFeedback(args: PutFeedbackCommandInput, options?: __HttpHandlerOptions): Promise; public putFeedback(args: PutFeedbackCommandInput, cb: (err: any, data?: PutFeedbackCommandOutput) => void): void; @@ -668,10 +805,9 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Removes a notification channel from DevOps Guru. A notification channel is used to notify you when DevOps Guru generates an insight - * that contains information about how to improve your operations. - *

+ *

Removes a notification channel from DevOps Guru. A notification channel is used to notify + * you when DevOps Guru generates an insight that contains information about how to improve your + * operations.

*/ public removeNotificationChannel( args: RemoveNotificationChannelCommandInput, @@ -703,15 +839,14 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Returns a list of insights in your AWS account. You can specify which insights are returned by their start time, one or more statuses - * (ONGOING, CLOSED, and CLOSED), one or more severities (LOW, MEDIUM, - * and HIGH), and type (REACTIVE or PROACTIVE). - *

- *

- * Use the Filters parameter to specify status and severity - * search parameters. Use the Type parameter to specify REACTIVE or PROACTIVE in your search. - *

+ *

Returns a list of insights in your Amazon Web Services account. You can specify which insights are + * returned by their start time, one or more statuses (ONGOING, + * CLOSED, and CLOSED), one or more severities + * (LOW, MEDIUM, and HIGH), and type + * (REACTIVE or PROACTIVE).

+ *

Use the Filters parameter to specify status and severity search + * parameters. Use the Type parameter to specify REACTIVE or + * PROACTIVE in your search.

*/ public searchInsights( args: SearchInsightsCommandInput, @@ -743,7 +878,47 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

Starts the creation of an estimate of the monthly cost to analyze your AWS resources.

+ *

Returns a list of insights in your organization. You can specify which insights are + * returned by their start time, one or more statuses (ONGOING, + * CLOSED, and CLOSED), one or more severities + * (LOW, MEDIUM, and HIGH), and type + * (REACTIVE or PROACTIVE).

+ *

Use the Filters parameter to specify status and severity search + * parameters. Use the Type parameter to specify REACTIVE or + * PROACTIVE in your search.

+ */ + public searchOrganizationInsights( + args: SearchOrganizationInsightsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public searchOrganizationInsights( + args: SearchOrganizationInsightsCommandInput, + cb: (err: any, data?: SearchOrganizationInsightsCommandOutput) => void + ): void; + public searchOrganizationInsights( + args: SearchOrganizationInsightsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchOrganizationInsightsCommandOutput) => void + ): void; + public searchOrganizationInsights( + args: SearchOrganizationInsightsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: SearchOrganizationInsightsCommandOutput) => void), + cb?: (err: any, data?: SearchOrganizationInsightsCommandOutput) => void + ): Promise | void { + const command = new SearchOrganizationInsightsCommand(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); + } + } + + /** + *

Starts the creation of an estimate of the monthly cost to analyze your Amazon Web Services + * resources.

*/ public startCostEstimation( args: StartCostEstimationCommandInput, @@ -776,9 +951,9 @@ export class DevOpsGuru extends DevOpsGuruClient { /** *

Updates the collection of resources that DevOps Guru analyzes. - * The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. This method also creates the IAM role required for you - * to use DevOps Guru.

+ * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks. This method also creates the IAM role required for + * you to use DevOps Guru.

*/ public updateResourceCollection( args: UpdateResourceCollectionCommandInput, @@ -810,10 +985,9 @@ export class DevOpsGuru extends DevOpsGuruClient { } /** - *

- * Enables or disables integration with a service that can be integrated with DevOps Guru. The one service that can be integrated with - * DevOps Guru is AWS Systems Manager, which can be used to create an OpsItem for each generated insight. - *

+ *

Enables or disables integration with a service that can be integrated with DevOps Guru. The + * one service that can be integrated with DevOps Guru is Amazon Web Services Systems Manager, which can be used to create + * an OpsItem for each generated insight.

*/ public updateServiceIntegration( args: UpdateServiceIntegrationCommandInput, diff --git a/clients/client-devops-guru/src/DevOpsGuruClient.ts b/clients/client-devops-guru/src/DevOpsGuruClient.ts index fc38ff6a45d0..9f2ee5a576e1 100644 --- a/clients/client-devops-guru/src/DevOpsGuruClient.ts +++ b/clients/client-devops-guru/src/DevOpsGuruClient.ts @@ -64,6 +64,18 @@ import { import { DescribeAnomalyCommandInput, DescribeAnomalyCommandOutput } from "./commands/DescribeAnomalyCommand"; import { DescribeFeedbackCommandInput, DescribeFeedbackCommandOutput } from "./commands/DescribeFeedbackCommand"; import { DescribeInsightCommandInput, DescribeInsightCommandOutput } from "./commands/DescribeInsightCommand"; +import { + DescribeOrganizationHealthCommandInput, + DescribeOrganizationHealthCommandOutput, +} from "./commands/DescribeOrganizationHealthCommand"; +import { + DescribeOrganizationOverviewCommandInput, + DescribeOrganizationOverviewCommandOutput, +} from "./commands/DescribeOrganizationOverviewCommand"; +import { + DescribeOrganizationResourceCollectionHealthCommandInput, + DescribeOrganizationResourceCollectionHealthCommandOutput, +} from "./commands/DescribeOrganizationResourceCollectionHealthCommand"; import { DescribeResourceCollectionHealthCommandInput, DescribeResourceCollectionHealthCommandOutput, @@ -87,6 +99,10 @@ import { ListNotificationChannelsCommandInput, ListNotificationChannelsCommandOutput, } from "./commands/ListNotificationChannelsCommand"; +import { + ListOrganizationInsightsCommandInput, + ListOrganizationInsightsCommandOutput, +} from "./commands/ListOrganizationInsightsCommand"; import { ListRecommendationsCommandInput, ListRecommendationsCommandOutput, @@ -97,6 +113,10 @@ import { RemoveNotificationChannelCommandOutput, } from "./commands/RemoveNotificationChannelCommand"; import { SearchInsightsCommandInput, SearchInsightsCommandOutput } from "./commands/SearchInsightsCommand"; +import { + SearchOrganizationInsightsCommandInput, + SearchOrganizationInsightsCommandOutput, +} from "./commands/SearchOrganizationInsightsCommand"; import { StartCostEstimationCommandInput, StartCostEstimationCommandOutput, @@ -118,6 +138,9 @@ export type ServiceInputTypes = | DescribeAnomalyCommandInput | DescribeFeedbackCommandInput | DescribeInsightCommandInput + | DescribeOrganizationHealthCommandInput + | DescribeOrganizationOverviewCommandInput + | DescribeOrganizationResourceCollectionHealthCommandInput | DescribeResourceCollectionHealthCommandInput | DescribeServiceIntegrationCommandInput | GetCostEstimationCommandInput @@ -126,10 +149,12 @@ export type ServiceInputTypes = | ListEventsCommandInput | ListInsightsCommandInput | ListNotificationChannelsCommandInput + | ListOrganizationInsightsCommandInput | ListRecommendationsCommandInput | PutFeedbackCommandInput | RemoveNotificationChannelCommandInput | SearchInsightsCommandInput + | SearchOrganizationInsightsCommandInput | StartCostEstimationCommandInput | UpdateResourceCollectionCommandInput | UpdateServiceIntegrationCommandInput; @@ -141,6 +166,9 @@ export type ServiceOutputTypes = | DescribeAnomalyCommandOutput | DescribeFeedbackCommandOutput | DescribeInsightCommandOutput + | DescribeOrganizationHealthCommandOutput + | DescribeOrganizationOverviewCommandOutput + | DescribeOrganizationResourceCollectionHealthCommandOutput | DescribeResourceCollectionHealthCommandOutput | DescribeServiceIntegrationCommandOutput | GetCostEstimationCommandOutput @@ -149,10 +177,12 @@ export type ServiceOutputTypes = | ListEventsCommandOutput | ListInsightsCommandOutput | ListNotificationChannelsCommandOutput + | ListOrganizationInsightsCommandOutput | ListRecommendationsCommandOutput | PutFeedbackCommandOutput | RemoveNotificationChannelCommandOutput | SearchInsightsCommandOutput + | SearchOrganizationInsightsCommandOutput | StartCostEstimationCommandOutput | UpdateResourceCollectionCommandOutput | UpdateServiceIntegrationCommandOutput; @@ -306,22 +336,20 @@ type DevOpsGuruClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHa export interface DevOpsGuruClientResolvedConfig extends DevOpsGuruClientResolvedConfigType {} /** - *

Amazon DevOps Guru is a fully managed service that helps you identify anomalous behavior in business - * critical operational applications. You specify the AWS resources that you want DevOps Guru to cover, - * then the Amazon CloudWatch metrics and AWS CloudTrail events related to those resources are analyzed. When - * anomalous behavior is detected, DevOps Guru creates an insight that includes - * recommendations, related events, and related metrics that can help you improve your - * operational applications. For more information, see What is Amazon DevOps Guru.

+ *

Amazon DevOps Guru is a fully managed service that helps you identify anomalous behavior in + * business critical operational applications. You specify the Amazon Web Services resources that you + * want DevOps Guru to cover, then the Amazon CloudWatch metrics and Amazon Web Services CloudTrail events related to those + * resources are analyzed. When anomalous behavior is detected, DevOps Guru creates an + * insight that includes recommendations, related events, and + * related metrics that can help you improve your operational applications. For more + * information, see What is Amazon DevOps Guru.

* - *

- * You can specify 1 or 2 Amazon Simple Notification Service topics so you are notified every time a new insight is created. You can also enable DevOps Guru to generate - * an OpsItem in AWS Systems Manager for each insight to help you manage and track your work addressing insights. - *

+ *

You can specify 1 or 2 Amazon Simple Notification Service topics so you are notified every time a new insight + * is created. You can also enable DevOps Guru to generate an OpsItem in Amazon Web Services Systems Manager for each + * insight to help you manage and track your work addressing insights.

* - *

- * To learn about the DevOps Guru workflow, see How DevOps Guru works. To - * learn about DevOps Guru concepts, see Concepts in DevOps Guru. - *

+ *

To learn about the DevOps Guru workflow, see How DevOps Guru works. To + * learn about DevOps Guru concepts, see Concepts in DevOps Guru.

*/ export class DevOpsGuruClient extends __Client< __HttpHandlerOptions, diff --git a/clients/client-devops-guru/src/commands/AddNotificationChannelCommand.ts b/clients/client-devops-guru/src/commands/AddNotificationChannelCommand.ts index 184f3126de0d..22b22a8f58c7 100644 --- a/clients/client-devops-guru/src/commands/AddNotificationChannelCommand.ts +++ b/clients/client-devops-guru/src/commands/AddNotificationChannelCommand.ts @@ -22,17 +22,15 @@ export interface AddNotificationChannelCommandInput extends AddNotificationChann export interface AddNotificationChannelCommandOutput extends AddNotificationChannelResponse, __MetadataBearer {} /** - *

- * Adds a notification channel to DevOps Guru. A notification channel is used to notify you about important DevOps Guru events, such as when an insight is generated. - *

- * + *

Adds a notification channel to DevOps Guru. A notification channel is used to notify you + * about important DevOps Guru events, such as when an insight is generated.

*

If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission * to it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. * For more information, see Permissions * for cross account Amazon SNS topics.

- *

If you use an Amazon SNS topic that is encrypted by an AWS Key Management Service customer-managed key (CMK), then you must add permissions + *

If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions * to the CMK. For more information, see Permissions for - * AWS KMS–encrypted Amazon SNS topics.

+ * Amazon Web Services KMS–encrypted Amazon SNS topics.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/DescribeAccountHealthCommand.ts b/clients/client-devops-guru/src/commands/DescribeAccountHealthCommand.ts index 2e9c540c4bd0..2b61f74a970e 100644 --- a/clients/client-devops-guru/src/commands/DescribeAccountHealthCommand.ts +++ b/clients/client-devops-guru/src/commands/DescribeAccountHealthCommand.ts @@ -22,10 +22,9 @@ export interface DescribeAccountHealthCommandInput extends DescribeAccountHealth export interface DescribeAccountHealthCommandOutput extends DescribeAccountHealthResponse, __MetadataBearer {} /** - *

- * Returns the number of open reactive insights, the number of open proactive insights, and the number of metrics analyzed in your AWS account. - * Use these numbers to gauge the health of operations in your AWS account. - *

+ *

Returns the number of open reactive insights, the number of open proactive insights, + * and the number of metrics analyzed in your Amazon Web Services account. Use these numbers to gauge the + * health of operations in your Amazon Web Services account.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/DescribeAccountOverviewCommand.ts b/clients/client-devops-guru/src/commands/DescribeAccountOverviewCommand.ts index f7baa22faad8..8483faaed97f 100644 --- a/clients/client-devops-guru/src/commands/DescribeAccountOverviewCommand.ts +++ b/clients/client-devops-guru/src/commands/DescribeAccountOverviewCommand.ts @@ -22,10 +22,9 @@ export interface DescribeAccountOverviewCommandInput extends DescribeAccountOver export interface DescribeAccountOverviewCommandOutput extends DescribeAccountOverviewResponse, __MetadataBearer {} /** - *

- * For the time range passed in, returns the number of open reactive insight that were created, the number of open proactive insights - * that were created, and the Mean Time to Recover (MTTR) for all closed reactive insights. - *

+ *

For the time range passed in, returns the number of open reactive insight that were + * created, the number of open proactive insights that were created, and the Mean Time to Recover (MTTR) for all + * closed reactive insights.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/DescribeAnomalyCommand.ts b/clients/client-devops-guru/src/commands/DescribeAnomalyCommand.ts index 09d1b9fa6db2..2855b5627af9 100644 --- a/clients/client-devops-guru/src/commands/DescribeAnomalyCommand.ts +++ b/clients/client-devops-guru/src/commands/DescribeAnomalyCommand.ts @@ -22,9 +22,7 @@ export interface DescribeAnomalyCommandInput extends DescribeAnomalyRequest {} export interface DescribeAnomalyCommandOutput extends DescribeAnomalyResponse, __MetadataBearer {} /** - *

- * Returns details about an anomaly that you specify using its ID. - *

+ *

Returns details about an anomaly that you specify using its ID.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/DescribeFeedbackCommand.ts b/clients/client-devops-guru/src/commands/DescribeFeedbackCommand.ts index 285d6a0c729b..2aac781ef475 100644 --- a/clients/client-devops-guru/src/commands/DescribeFeedbackCommand.ts +++ b/clients/client-devops-guru/src/commands/DescribeFeedbackCommand.ts @@ -22,8 +22,7 @@ export interface DescribeFeedbackCommandInput extends DescribeFeedbackRequest {} export interface DescribeFeedbackCommandOutput extends DescribeFeedbackResponse, __MetadataBearer {} /** - *

- * Returns the most recent feedback submitted in the current AWS account and Region. + *

Returns the most recent feedback submitted in the current Amazon Web Services account and Region. *

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-devops-guru/src/commands/DescribeInsightCommand.ts b/clients/client-devops-guru/src/commands/DescribeInsightCommand.ts index bc82f146501b..89be2e734b7b 100644 --- a/clients/client-devops-guru/src/commands/DescribeInsightCommand.ts +++ b/clients/client-devops-guru/src/commands/DescribeInsightCommand.ts @@ -22,9 +22,7 @@ export interface DescribeInsightCommandInput extends DescribeInsightRequest {} export interface DescribeInsightCommandOutput extends DescribeInsightResponse, __MetadataBearer {} /** - *

- * Returns details about an insight that you specify using its ID. - *

+ *

Returns details about an insight that you specify using its ID.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/DescribeOrganizationHealthCommand.ts b/clients/client-devops-guru/src/commands/DescribeOrganizationHealthCommand.ts new file mode 100644 index 000000000000..364bfc7dd1eb --- /dev/null +++ b/clients/client-devops-guru/src/commands/DescribeOrganizationHealthCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DevOpsGuruClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DevOpsGuruClient"; +import { DescribeOrganizationHealthRequest, DescribeOrganizationHealthResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeOrganizationHealthCommand, + serializeAws_restJson1DescribeOrganizationHealthCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeOrganizationHealthCommandInput extends DescribeOrganizationHealthRequest {} +export interface DescribeOrganizationHealthCommandOutput extends DescribeOrganizationHealthResponse, __MetadataBearer {} + +/** + *

Returns active insights, predictive insights, and resource hours analyzed in last + * hour.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DevOpsGuruClient, DescribeOrganizationHealthCommand } from "@aws-sdk/client-devops-guru"; // ES Modules import + * // const { DevOpsGuruClient, DescribeOrganizationHealthCommand } = require("@aws-sdk/client-devops-guru"); // CommonJS import + * const client = new DevOpsGuruClient(config); + * const command = new DescribeOrganizationHealthCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeOrganizationHealthCommandInput} for command's `input` shape. + * @see {@link DescribeOrganizationHealthCommandOutput} for command's `response` shape. + * @see {@link DevOpsGuruClientResolvedConfig | config} for DevOpsGuruClient's `config` shape. + * + */ +export class DescribeOrganizationHealthCommand extends $Command< + DescribeOrganizationHealthCommandInput, + DescribeOrganizationHealthCommandOutput, + DevOpsGuruClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeOrganizationHealthCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DevOpsGuruClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DevOpsGuruClient"; + const commandName = "DescribeOrganizationHealthCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeOrganizationHealthRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeOrganizationHealthResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeOrganizationHealthCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeOrganizationHealthCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DescribeOrganizationHealthCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-devops-guru/src/commands/DescribeOrganizationOverviewCommand.ts b/clients/client-devops-guru/src/commands/DescribeOrganizationOverviewCommand.ts new file mode 100644 index 000000000000..b6874bf07e20 --- /dev/null +++ b/clients/client-devops-guru/src/commands/DescribeOrganizationOverviewCommand.ts @@ -0,0 +1,101 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DevOpsGuruClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DevOpsGuruClient"; +import { DescribeOrganizationOverviewRequest, DescribeOrganizationOverviewResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeOrganizationOverviewCommand, + serializeAws_restJson1DescribeOrganizationOverviewCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeOrganizationOverviewCommandInput extends DescribeOrganizationOverviewRequest {} +export interface DescribeOrganizationOverviewCommandOutput + extends DescribeOrganizationOverviewResponse, + __MetadataBearer {} + +/** + *

Returns an overview of your organization's history based on the specified time range. + * The overview includes the total reactive and proactive insights.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DevOpsGuruClient, DescribeOrganizationOverviewCommand } from "@aws-sdk/client-devops-guru"; // ES Modules import + * // const { DevOpsGuruClient, DescribeOrganizationOverviewCommand } = require("@aws-sdk/client-devops-guru"); // CommonJS import + * const client = new DevOpsGuruClient(config); + * const command = new DescribeOrganizationOverviewCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeOrganizationOverviewCommandInput} for command's `input` shape. + * @see {@link DescribeOrganizationOverviewCommandOutput} for command's `response` shape. + * @see {@link DevOpsGuruClientResolvedConfig | config} for DevOpsGuruClient's `config` shape. + * + */ +export class DescribeOrganizationOverviewCommand extends $Command< + DescribeOrganizationOverviewCommandInput, + DescribeOrganizationOverviewCommandOutput, + DevOpsGuruClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeOrganizationOverviewCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DevOpsGuruClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DevOpsGuruClient"; + const commandName = "DescribeOrganizationOverviewCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeOrganizationOverviewRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeOrganizationOverviewResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeOrganizationOverviewCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeOrganizationOverviewCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DescribeOrganizationOverviewCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-devops-guru/src/commands/DescribeOrganizationResourceCollectionHealthCommand.ts b/clients/client-devops-guru/src/commands/DescribeOrganizationResourceCollectionHealthCommand.ts new file mode 100644 index 000000000000..0ccd34e0ba48 --- /dev/null +++ b/clients/client-devops-guru/src/commands/DescribeOrganizationResourceCollectionHealthCommand.ts @@ -0,0 +1,112 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DevOpsGuruClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DevOpsGuruClient"; +import { + DescribeOrganizationResourceCollectionHealthRequest, + DescribeOrganizationResourceCollectionHealthResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand, + serializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeOrganizationResourceCollectionHealthCommandInput + extends DescribeOrganizationResourceCollectionHealthRequest {} +export interface DescribeOrganizationResourceCollectionHealthCommandOutput + extends DescribeOrganizationResourceCollectionHealthResponse, + __MetadataBearer {} + +/** + *

Provides an overview of your system's health. If additional member accounts are part + * of your organization, you can filter those accounts using the AccountIds + * field.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DevOpsGuruClient, DescribeOrganizationResourceCollectionHealthCommand } from "@aws-sdk/client-devops-guru"; // ES Modules import + * // const { DevOpsGuruClient, DescribeOrganizationResourceCollectionHealthCommand } = require("@aws-sdk/client-devops-guru"); // CommonJS import + * const client = new DevOpsGuruClient(config); + * const command = new DescribeOrganizationResourceCollectionHealthCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeOrganizationResourceCollectionHealthCommandInput} for command's `input` shape. + * @see {@link DescribeOrganizationResourceCollectionHealthCommandOutput} for command's `response` shape. + * @see {@link DevOpsGuruClientResolvedConfig | config} for DevOpsGuruClient's `config` shape. + * + */ +export class DescribeOrganizationResourceCollectionHealthCommand extends $Command< + DescribeOrganizationResourceCollectionHealthCommandInput, + DescribeOrganizationResourceCollectionHealthCommandOutput, + DevOpsGuruClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeOrganizationResourceCollectionHealthCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DevOpsGuruClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DescribeOrganizationResourceCollectionHealthCommandInput, + DescribeOrganizationResourceCollectionHealthCommandOutput + > { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DevOpsGuruClient"; + const commandName = "DescribeOrganizationResourceCollectionHealthCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeOrganizationResourceCollectionHealthRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeOrganizationResourceCollectionHealthResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DescribeOrganizationResourceCollectionHealthCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-devops-guru/src/commands/DescribeResourceCollectionHealthCommand.ts b/clients/client-devops-guru/src/commands/DescribeResourceCollectionHealthCommand.ts index 8f9ee3645c2b..15bbc1f692b0 100644 --- a/clients/client-devops-guru/src/commands/DescribeResourceCollectionHealthCommand.ts +++ b/clients/client-devops-guru/src/commands/DescribeResourceCollectionHealthCommand.ts @@ -24,11 +24,10 @@ export interface DescribeResourceCollectionHealthCommandOutput __MetadataBearer {} /** - *

- * Returns the number of open proactive insights, open reactive insights, and the Mean Time to Recover (MTTR) for all closed insights in - * resource collections in your account. You specify the type of AWS resources collection. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

Returns the number of open proactive insights, open reactive insights, and the Mean Time to Recover (MTTR) + * for all closed insights in resource collections in your account. You specify the type of + * Amazon Web Services resources collection. The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/DescribeServiceIntegrationCommand.ts b/clients/client-devops-guru/src/commands/DescribeServiceIntegrationCommand.ts index 49d86b2a64bd..b229e597222f 100644 --- a/clients/client-devops-guru/src/commands/DescribeServiceIntegrationCommand.ts +++ b/clients/client-devops-guru/src/commands/DescribeServiceIntegrationCommand.ts @@ -22,11 +22,9 @@ export interface DescribeServiceIntegrationCommandInput extends DescribeServiceI export interface DescribeServiceIntegrationCommandOutput extends DescribeServiceIntegrationResponse, __MetadataBearer {} /** - *

- * Returns the integration status of services that are integrated with DevOps Guru. + *

Returns the integration status of services that are integrated with DevOps Guru. * The one service that can be integrated with DevOps Guru - * is AWS Systems Manager, which can be used to create an OpsItem for each generated insight. - *

+ * is Amazon Web Services Systems Manager, which can be used to create an OpsItem for each generated insight.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/GetCostEstimationCommand.ts b/clients/client-devops-guru/src/commands/GetCostEstimationCommand.ts index 625249d947bf..cbbc8951354c 100644 --- a/clients/client-devops-guru/src/commands/GetCostEstimationCommand.ts +++ b/clients/client-devops-guru/src/commands/GetCostEstimationCommand.ts @@ -22,7 +22,7 @@ export interface GetCostEstimationCommandInput extends GetCostEstimationRequest export interface GetCostEstimationCommandOutput extends GetCostEstimationResponse, __MetadataBearer {} /** - *

Returns an estimate of the monthly cost for DevOps Guru to analyze your AWS resources. + *

Returns an estimate of the monthly cost for DevOps Guru to analyze your Amazon Web Services resources. * For more information, * see Estimate your * Amazon DevOps Guru costs and diff --git a/clients/client-devops-guru/src/commands/GetResourceCollectionCommand.ts b/clients/client-devops-guru/src/commands/GetResourceCollectionCommand.ts index 69ebd1a5472d..7ecaabe90af6 100644 --- a/clients/client-devops-guru/src/commands/GetResourceCollectionCommand.ts +++ b/clients/client-devops-guru/src/commands/GetResourceCollectionCommand.ts @@ -22,10 +22,9 @@ export interface GetResourceCollectionCommandInput extends GetResourceCollection export interface GetResourceCollectionCommandOutput extends GetResourceCollectionResponse, __MetadataBearer {} /** - *

- * Returns lists AWS resources that are of the specified resource collection type. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

Returns lists Amazon Web Services resources that are of the specified resource collection type. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/ListAnomaliesForInsightCommand.ts b/clients/client-devops-guru/src/commands/ListAnomaliesForInsightCommand.ts index 3f9fd15e7f90..e278fa777d86 100644 --- a/clients/client-devops-guru/src/commands/ListAnomaliesForInsightCommand.ts +++ b/clients/client-devops-guru/src/commands/ListAnomaliesForInsightCommand.ts @@ -22,9 +22,8 @@ export interface ListAnomaliesForInsightCommandInput extends ListAnomaliesForIns export interface ListAnomaliesForInsightCommandOutput extends ListAnomaliesForInsightResponse, __MetadataBearer {} /** - *

- * Returns a list of the anomalies that belong to an insight that you specify using its ID. - *

+ *

Returns a list of the anomalies that belong to an insight that you specify using its + * ID.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/ListEventsCommand.ts b/clients/client-devops-guru/src/commands/ListEventsCommand.ts index 235c09920794..4b6b384741fb 100644 --- a/clients/client-devops-guru/src/commands/ListEventsCommand.ts +++ b/clients/client-devops-guru/src/commands/ListEventsCommand.ts @@ -22,9 +22,8 @@ export interface ListEventsCommandInput extends ListEventsRequest {} export interface ListEventsCommandOutput extends ListEventsResponse, __MetadataBearer {} /** - *

- * Returns a list of the events emitted by the resources that are evaluated by DevOps Guru. You can use filters to specify which events are returned. - *

+ *

Returns a list of the events emitted by the resources that are evaluated by DevOps Guru. + * You can use filters to specify which events are returned.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/ListInsightsCommand.ts b/clients/client-devops-guru/src/commands/ListInsightsCommand.ts index 6e39352de389..745ba3179d0a 100644 --- a/clients/client-devops-guru/src/commands/ListInsightsCommand.ts +++ b/clients/client-devops-guru/src/commands/ListInsightsCommand.ts @@ -22,10 +22,9 @@ export interface ListInsightsCommandInput extends ListInsightsRequest {} export interface ListInsightsCommandOutput extends ListInsightsResponse, __MetadataBearer {} /** - *

- * Returns a list of insights in your AWS account. You can specify which insights are returned by their start time and - * status (ONGOING, CLOSED, or ANY). - *

+ *

Returns a list of insights in your Amazon Web Services account. You can specify which insights are + * returned by their start time and status (ONGOING, CLOSED, or + * ANY).

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/ListNotificationChannelsCommand.ts b/clients/client-devops-guru/src/commands/ListNotificationChannelsCommand.ts index 825523aa1ecb..acbf6d91ae4b 100644 --- a/clients/client-devops-guru/src/commands/ListNotificationChannelsCommand.ts +++ b/clients/client-devops-guru/src/commands/ListNotificationChannelsCommand.ts @@ -22,11 +22,10 @@ export interface ListNotificationChannelsCommandInput extends ListNotificationCh export interface ListNotificationChannelsCommandOutput extends ListNotificationChannelsResponse, __MetadataBearer {} /** - *

- * Returns a list of notification channels configured for DevOps Guru. Each notification channel is used to notify you when - * DevOps Guru generates an insight that contains information about how to improve your operations. The one - * supported notification channel is Amazon Simple Notification Service (Amazon SNS). - *

+ *

Returns a list of notification channels configured for DevOps Guru. Each notification + * channel is used to notify you when DevOps Guru generates an insight that contains information + * about how to improve your operations. The one + * supported notification channel is Amazon Simple Notification Service (Amazon SNS).

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/ListOrganizationInsightsCommand.ts b/clients/client-devops-guru/src/commands/ListOrganizationInsightsCommand.ts new file mode 100644 index 000000000000..e4b898f2414c --- /dev/null +++ b/clients/client-devops-guru/src/commands/ListOrganizationInsightsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DevOpsGuruClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DevOpsGuruClient"; +import { ListOrganizationInsightsRequest, ListOrganizationInsightsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListOrganizationInsightsCommand, + serializeAws_restJson1ListOrganizationInsightsCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListOrganizationInsightsCommandInput extends ListOrganizationInsightsRequest {} +export interface ListOrganizationInsightsCommandOutput extends ListOrganizationInsightsResponse, __MetadataBearer {} + +/** + *

Returns a list of insights associated with the account or OU Id.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DevOpsGuruClient, ListOrganizationInsightsCommand } from "@aws-sdk/client-devops-guru"; // ES Modules import + * // const { DevOpsGuruClient, ListOrganizationInsightsCommand } = require("@aws-sdk/client-devops-guru"); // CommonJS import + * const client = new DevOpsGuruClient(config); + * const command = new ListOrganizationInsightsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListOrganizationInsightsCommandInput} for command's `input` shape. + * @see {@link ListOrganizationInsightsCommandOutput} for command's `response` shape. + * @see {@link DevOpsGuruClientResolvedConfig | config} for DevOpsGuruClient's `config` shape. + * + */ +export class ListOrganizationInsightsCommand extends $Command< + ListOrganizationInsightsCommandInput, + ListOrganizationInsightsCommandOutput, + DevOpsGuruClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListOrganizationInsightsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DevOpsGuruClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DevOpsGuruClient"; + const commandName = "ListOrganizationInsightsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListOrganizationInsightsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListOrganizationInsightsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListOrganizationInsightsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListOrganizationInsightsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListOrganizationInsightsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-devops-guru/src/commands/ListRecommendationsCommand.ts b/clients/client-devops-guru/src/commands/ListRecommendationsCommand.ts index 59502feb22c3..e443fc29c0fc 100644 --- a/clients/client-devops-guru/src/commands/ListRecommendationsCommand.ts +++ b/clients/client-devops-guru/src/commands/ListRecommendationsCommand.ts @@ -22,9 +22,8 @@ export interface ListRecommendationsCommandInput extends ListRecommendationsRequ export interface ListRecommendationsCommandOutput extends ListRecommendationsResponse, __MetadataBearer {} /** - *

- * Returns a list of a specified insight's recommendations. Each recommendation includes a list of related metrics and a list of related events. - *

+ *

Returns a list of a specified insight's recommendations. Each recommendation includes + * a list of related metrics and a list of related events.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/PutFeedbackCommand.ts b/clients/client-devops-guru/src/commands/PutFeedbackCommand.ts index 412de53e8bc7..da7b4b594b4b 100644 --- a/clients/client-devops-guru/src/commands/PutFeedbackCommand.ts +++ b/clients/client-devops-guru/src/commands/PutFeedbackCommand.ts @@ -22,9 +22,7 @@ export interface PutFeedbackCommandInput extends PutFeedbackRequest {} export interface PutFeedbackCommandOutput extends PutFeedbackResponse, __MetadataBearer {} /** - *

- * Collects customer feedback about the specified insight. - *

+ *

Collects customer feedback about the specified insight.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/RemoveNotificationChannelCommand.ts b/clients/client-devops-guru/src/commands/RemoveNotificationChannelCommand.ts index ee63fe68a7b7..545421af333f 100644 --- a/clients/client-devops-guru/src/commands/RemoveNotificationChannelCommand.ts +++ b/clients/client-devops-guru/src/commands/RemoveNotificationChannelCommand.ts @@ -22,10 +22,9 @@ export interface RemoveNotificationChannelCommandInput extends RemoveNotificatio export interface RemoveNotificationChannelCommandOutput extends RemoveNotificationChannelResponse, __MetadataBearer {} /** - *

- * Removes a notification channel from DevOps Guru. A notification channel is used to notify you when DevOps Guru generates an insight - * that contains information about how to improve your operations. - *

+ *

Removes a notification channel from DevOps Guru. A notification channel is used to notify + * you when DevOps Guru generates an insight that contains information about how to improve your + * operations.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/SearchInsightsCommand.ts b/clients/client-devops-guru/src/commands/SearchInsightsCommand.ts index fec896805434..5f39b174160d 100644 --- a/clients/client-devops-guru/src/commands/SearchInsightsCommand.ts +++ b/clients/client-devops-guru/src/commands/SearchInsightsCommand.ts @@ -22,15 +22,14 @@ export interface SearchInsightsCommandInput extends SearchInsightsRequest {} export interface SearchInsightsCommandOutput extends SearchInsightsResponse, __MetadataBearer {} /** - *

- * Returns a list of insights in your AWS account. You can specify which insights are returned by their start time, one or more statuses - * (ONGOING, CLOSED, and CLOSED), one or more severities (LOW, MEDIUM, - * and HIGH), and type (REACTIVE or PROACTIVE). - *

- *

- * Use the Filters parameter to specify status and severity - * search parameters. Use the Type parameter to specify REACTIVE or PROACTIVE in your search. - *

+ *

Returns a list of insights in your Amazon Web Services account. You can specify which insights are + * returned by their start time, one or more statuses (ONGOING, + * CLOSED, and CLOSED), one or more severities + * (LOW, MEDIUM, and HIGH), and type + * (REACTIVE or PROACTIVE).

+ *

Use the Filters parameter to specify status and severity search + * parameters. Use the Type parameter to specify REACTIVE or + * PROACTIVE in your search.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/SearchOrganizationInsightsCommand.ts b/clients/client-devops-guru/src/commands/SearchOrganizationInsightsCommand.ts new file mode 100644 index 000000000000..3b3af2d45e84 --- /dev/null +++ b/clients/client-devops-guru/src/commands/SearchOrganizationInsightsCommand.ts @@ -0,0 +1,105 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DevOpsGuruClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DevOpsGuruClient"; +import { SearchOrganizationInsightsRequest, SearchOrganizationInsightsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1SearchOrganizationInsightsCommand, + serializeAws_restJson1SearchOrganizationInsightsCommand, +} from "../protocols/Aws_restJson1"; + +export interface SearchOrganizationInsightsCommandInput extends SearchOrganizationInsightsRequest {} +export interface SearchOrganizationInsightsCommandOutput extends SearchOrganizationInsightsResponse, __MetadataBearer {} + +/** + *

Returns a list of insights in your organization. You can specify which insights are + * returned by their start time, one or more statuses (ONGOING, + * CLOSED, and CLOSED), one or more severities + * (LOW, MEDIUM, and HIGH), and type + * (REACTIVE or PROACTIVE).

+ *

Use the Filters parameter to specify status and severity search + * parameters. Use the Type parameter to specify REACTIVE or + * PROACTIVE in your search.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DevOpsGuruClient, SearchOrganizationInsightsCommand } from "@aws-sdk/client-devops-guru"; // ES Modules import + * // const { DevOpsGuruClient, SearchOrganizationInsightsCommand } = require("@aws-sdk/client-devops-guru"); // CommonJS import + * const client = new DevOpsGuruClient(config); + * const command = new SearchOrganizationInsightsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link SearchOrganizationInsightsCommandInput} for command's `input` shape. + * @see {@link SearchOrganizationInsightsCommandOutput} for command's `response` shape. + * @see {@link DevOpsGuruClientResolvedConfig | config} for DevOpsGuruClient's `config` shape. + * + */ +export class SearchOrganizationInsightsCommand extends $Command< + SearchOrganizationInsightsCommandInput, + SearchOrganizationInsightsCommandOutput, + DevOpsGuruClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: SearchOrganizationInsightsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DevOpsGuruClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DevOpsGuruClient"; + const commandName = "SearchOrganizationInsightsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: SearchOrganizationInsightsRequest.filterSensitiveLog, + outputFilterSensitiveLog: SearchOrganizationInsightsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: SearchOrganizationInsightsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1SearchOrganizationInsightsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1SearchOrganizationInsightsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-devops-guru/src/commands/StartCostEstimationCommand.ts b/clients/client-devops-guru/src/commands/StartCostEstimationCommand.ts index c8c93f5a6783..93e34fb914b9 100644 --- a/clients/client-devops-guru/src/commands/StartCostEstimationCommand.ts +++ b/clients/client-devops-guru/src/commands/StartCostEstimationCommand.ts @@ -22,7 +22,8 @@ export interface StartCostEstimationCommandInput extends StartCostEstimationRequ export interface StartCostEstimationCommandOutput extends StartCostEstimationResponse, __MetadataBearer {} /** - *

Starts the creation of an estimate of the monthly cost to analyze your AWS resources.

+ *

Starts the creation of an estimate of the monthly cost to analyze your Amazon Web Services + * resources.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/UpdateResourceCollectionCommand.ts b/clients/client-devops-guru/src/commands/UpdateResourceCollectionCommand.ts index 8e40f9b00b72..695b5cf2add3 100644 --- a/clients/client-devops-guru/src/commands/UpdateResourceCollectionCommand.ts +++ b/clients/client-devops-guru/src/commands/UpdateResourceCollectionCommand.ts @@ -23,9 +23,9 @@ export interface UpdateResourceCollectionCommandOutput extends UpdateResourceCol /** *

Updates the collection of resources that DevOps Guru analyzes. - * The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. This method also creates the IAM role required for you - * to use DevOps Guru.

+ * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks. This method also creates the IAM role required for + * you to use DevOps Guru.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/UpdateServiceIntegrationCommand.ts b/clients/client-devops-guru/src/commands/UpdateServiceIntegrationCommand.ts index 4ea42dfe642c..9b4757fbf07f 100644 --- a/clients/client-devops-guru/src/commands/UpdateServiceIntegrationCommand.ts +++ b/clients/client-devops-guru/src/commands/UpdateServiceIntegrationCommand.ts @@ -22,10 +22,9 @@ export interface UpdateServiceIntegrationCommandInput extends UpdateServiceInteg export interface UpdateServiceIntegrationCommandOutput extends UpdateServiceIntegrationResponse, __MetadataBearer {} /** - *

- * Enables or disables integration with a service that can be integrated with DevOps Guru. The one service that can be integrated with - * DevOps Guru is AWS Systems Manager, which can be used to create an OpsItem for each generated insight. - *

+ *

Enables or disables integration with a service that can be integrated with DevOps Guru. The + * one service that can be integrated with DevOps Guru is Amazon Web Services Systems Manager, which can be used to create + * an OpsItem for each generated insight.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-devops-guru/src/commands/index.ts b/clients/client-devops-guru/src/commands/index.ts index 892e05585765..629c5d78bab2 100644 --- a/clients/client-devops-guru/src/commands/index.ts +++ b/clients/client-devops-guru/src/commands/index.ts @@ -4,6 +4,9 @@ export * from "./DescribeAccountOverviewCommand"; export * from "./DescribeAnomalyCommand"; export * from "./DescribeFeedbackCommand"; export * from "./DescribeInsightCommand"; +export * from "./DescribeOrganizationHealthCommand"; +export * from "./DescribeOrganizationOverviewCommand"; +export * from "./DescribeOrganizationResourceCollectionHealthCommand"; export * from "./DescribeResourceCollectionHealthCommand"; export * from "./DescribeServiceIntegrationCommand"; export * from "./GetCostEstimationCommand"; @@ -12,10 +15,12 @@ export * from "./ListAnomaliesForInsightCommand"; export * from "./ListEventsCommand"; export * from "./ListInsightsCommand"; export * from "./ListNotificationChannelsCommand"; +export * from "./ListOrganizationInsightsCommand"; export * from "./ListRecommendationsCommand"; export * from "./PutFeedbackCommand"; export * from "./RemoveNotificationChannelCommand"; export * from "./SearchInsightsCommand"; +export * from "./SearchOrganizationInsightsCommand"; export * from "./StartCostEstimationCommand"; export * from "./UpdateResourceCollectionCommand"; export * from "./UpdateServiceIntegrationCommand"; diff --git a/clients/client-devops-guru/src/models/models_0.ts b/clients/client-devops-guru/src/models/models_0.ts index db39464e2234..bdef64bf006b 100644 --- a/clients/client-devops-guru/src/models/models_0.ts +++ b/clients/client-devops-guru/src/models/models_0.ts @@ -1,9 +1,10 @@ import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; /** - *

You don't have permissions to perform the requested operation. The user or role that is making the request must have at - * least one IAM permissions policy attached that grants the required permissions. For more information, see - * Access Management in the IAM User Guide.

+ *

You don't have permissions to perform the requested operation. The user or role that + * is making the request must have at least one IAM permissions policy attached that grants + * the required permissions. For more information, see Access Management in the + * IAM User Guide.

*/ export interface AccessDeniedException extends __SmithyException, $MetadataBearer { name: "AccessDeniedException"; @@ -20,16 +21,70 @@ export namespace AccessDeniedException { }); } +/** + *

Information about the number of open reactive and proactive insights that can be used + * to gauge the health of your system.

+ */ +export interface AccountInsightHealth { + /** + *

An integer that specifies the number of open proactive insights in your Amazon Web Services + * account.

+ */ + OpenProactiveInsights?: number; + + /** + *

An integer that specifies the number of open reactive insights in your Amazon Web Services + * account.

+ */ + OpenReactiveInsights?: number; +} + +export namespace AccountInsightHealth { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AccountInsightHealth): any => ({ + ...obj, + }); +} + +/** + *

Returns the number of open reactive insights, the number of open proactive insights, + * and the number of metrics analyzed in your Amazon Web Services account. Use these numbers to gauge the + * health of operations in your Amazon Web Services account.

+ */ +export interface AccountHealth { + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountId?: string; + + /** + *

Information about the health of the Amazon Web Services resources in your account, including the + * number of open proactive, open reactive insights, and the Mean Time to Recover (MTTR) of closed insights. + *

+ */ + Insight?: AccountInsightHealth; +} + +export namespace AccountHealth { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AccountHealth): any => ({ + ...obj, + }); +} + /** *

Contains the Amazon Resource Name (ARN) of an Amazon Simple Notification Service topic.

- * - *

If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission + *

If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission * to it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. * For more information, see Permissions * for cross account Amazon SNS topics.

- *

If you use an Amazon SNS topic that is encrypted by an AWS Key Management Service customer-managed key (CMK), then you must add permissions + *

If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions * to the CMK. For more information, see Permissions for - * AWS KMS–encrypted Amazon SNS topics.

+ * Amazon Web Services KMS–encrypted Amazon SNS topics.

*/ export interface SnsChannelConfig { /** @@ -54,17 +109,15 @@ export namespace SnsChannelConfig { */ export interface NotificationChannelConfig { /** - *

- * Information about a notification channel configured in DevOps Guru to send notifications when insights are created. - *

- * - *

If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission + *

Information about a notification channel configured in DevOps Guru to send notifications + * when insights are created.

+ *

If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission * to it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. * For more information, see Permissions * for cross account Amazon SNS topics.

- *

If you use an Amazon SNS topic that is encrypted by an AWS Key Management Service customer-managed key (CMK), then you must add permissions + *

If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions * to the CMK. For more information, see Permissions for - * AWS KMS–encrypted Amazon SNS topics.

+ * Amazon Web Services KMS–encrypted Amazon SNS topics.

*/ Sns: SnsChannelConfig | undefined; } @@ -81,7 +134,7 @@ export namespace NotificationChannelConfig { export interface AddNotificationChannelRequest { /** *

A NotificationChannelConfig object that specifies what type of - * notification channel to add. The one + * notification channel to add. The one * supported notification channel is Amazon Simple Notification Service (Amazon SNS).

*/ Config: NotificationChannelConfig | undefined; @@ -98,9 +151,7 @@ export namespace AddNotificationChannelRequest { export interface AddNotificationChannelResponse { /** - *

- * The ID of the added notification channel. - *

+ *

The ID of the added notification channel.

*/ Id: string | undefined; } @@ -115,25 +166,19 @@ export namespace AddNotificationChannelResponse { } /** - *

- * An exception that is thrown when a conflict occurs. - *

+ *

An exception that is thrown when a conflict occurs.

*/ export interface ConflictException extends __SmithyException, $MetadataBearer { name: "ConflictException"; $fault: "client"; Message: string | undefined; /** - *

- * The ID of the AWS resource in which a conflict occurred. - *

+ *

The ID of the Amazon Web Services resource in which a conflict occurred.

*/ ResourceId: string | undefined; /** - *

- * The type of the AWS resource in which a conflict occurred. - *

+ *

The type of the Amazon Web Services resource in which a conflict occurred.

*/ ResourceType: string | undefined; } @@ -155,10 +200,8 @@ export interface InternalServerException extends __SmithyException, $MetadataBea $fault: "server"; Message: string | undefined; /** - *

- * The number of seconds after which the action that caused the internal server - * exception can be retried. - *

+ *

The number of seconds after which the action that caused the internal server + * exception can be retried.

*/ RetryAfterSeconds?: number; } @@ -180,16 +223,12 @@ export interface ResourceNotFoundException extends __SmithyException, $MetadataB $fault: "client"; Message: string | undefined; /** - *

- * The ID of the AWS resource that could not be found. - *

+ *

The ID of the Amazon Web Services resource that could not be found.

*/ ResourceId: string | undefined; /** - *

- * The type of the AWS resource that could not be found. - *

+ *

The type of the Amazon Web Services resource that could not be found.

*/ ResourceType: string | undefined; } @@ -229,24 +268,18 @@ export interface ThrottlingException extends __SmithyException, $MetadataBearer $fault: "client"; Message: string | undefined; /** - *

- * The code of the quota that was exceeded, causing the throttling exception. - *

+ *

The code of the quota that was exceeded, causing the throttling exception.

*/ QuotaCode?: string; /** - *

- * The code of the service that caused the throttling exception. - *

+ *

The code of the service that caused the throttling exception.

*/ ServiceCode?: string; /** - *

- * The number of seconds after which the action that caused the throttling - * exception can be retried. - *

+ *

The number of seconds after which the action that caused the throttling exception can + * be retried.

*/ RetryAfterSeconds?: number; } @@ -261,23 +294,17 @@ export namespace ThrottlingException { } /** - *

- * The field associated with the validation exception. - *

+ *

The field associated with the validation exception.

*/ export interface ValidationExceptionField { /** - *

- * The name of the field. - *

+ *

The name of the field.

*/ Name: string | undefined; /** - *

- * The message associated with the validation exception with information to help - * determine its cause. - *

+ *

The message associated with the validation exception with information to help + * determine its cause.

*/ Message: string | undefined; } @@ -299,31 +326,24 @@ export enum ValidationExceptionReason { } /** - *

- * Contains information about data passed in to a field during a request that is not valid. - *

+ *

Contains information about data passed in to a field during a request that is not + * valid.

*/ export interface ValidationException extends __SmithyException, $MetadataBearer { name: "ValidationException"; $fault: "client"; /** - *

- * A message that describes the validation exception. - *

+ *

A message that describes the validation exception.

*/ Message: string | undefined; /** - *

- * The reason the validation exception was thrown. - *

+ *

The reason the validation exception was thrown.

*/ Reason?: ValidationExceptionReason | string; /** - *

- * An array of fields that are associated with the validation exception. - *

+ *

An array of fields that are associated with the validation exception.

*/ Fields?: ValidationExceptionField[]; } @@ -338,24 +358,18 @@ export namespace ValidationException { } /** - *

- * A time range that specifies when DevOps Guru opens and then closes an anomaly. This is different from - * AnomalyTimeRange, which specifies the time range when DevOps Guru actually observes - * the anomalous behavior. - *

+ *

A time range that specifies when DevOps Guru opens and then closes an anomaly. This + * is different from AnomalyTimeRange, which specifies the time range when + * DevOps Guru actually observes the anomalous behavior.

*/ export interface AnomalyReportedTimeRange { /** - *

- * The time when an anomaly is opened. - *

+ *

The time when an anomaly is opened.

*/ OpenTime: Date | undefined; /** - *

- * The time when an anomaly is closed. - *

+ *

The time when an anomaly is closed.

*/ CloseTime?: Date; } @@ -376,23 +390,19 @@ export enum AnomalySeverity { } /** - *

The dimension of a Amazon CloudWatch metric that is used when DevOps Guru analyzes the resources in your - * account for operational problems and anomalous behavior. A dimension is a name/value pair - * that is part of the identity of a metric. A metric can have up to 10 dimensions. For more - * information, see Dimensions in the Amazon CloudWatch User Guide.

+ *

The dimension of a Amazon CloudWatch metric that is used when DevOps Guru analyzes the resources in + * your account for operational problems and anomalous behavior. A dimension is a + * name/value pair that is part of the identity of a metric. A metric can have up to 10 + * dimensions. For more information, see Dimensions in the Amazon CloudWatch User Guide.

*/ export interface CloudWatchMetricsDimension { /** - *

- * The name of the CloudWatch dimension. - *

+ *

The name of the CloudWatch dimension.

*/ Name?: string; /** - *

- * The value of the CloudWatch dimension. - *

+ *

The value of the CloudWatch dimension.

*/ Value?: string; } @@ -406,6 +416,62 @@ export namespace CloudWatchMetricsDimension { }); } +export enum CloudWatchMetricDataStatusCode { + COMPLETE = "Complete", + INTERNAL_ERROR = "InternalError", + PARTIAL_DATA = "PartialData", +} + +/** + *

A pair that contains metric values at the respective timestamp.

+ */ +export interface TimestampMetricValuePair { + /** + *

A Timestamp that specifies the time the event occurred.

+ */ + Timestamp?: Date; + + /** + *

Value of the anomalous metric data point at respective Timestamp.

+ */ + MetricValue?: number; +} + +export namespace TimestampMetricValuePair { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TimestampMetricValuePair): any => ({ + ...obj, + }); +} + +/** + *

Contains information about the analyzed metrics that displayed anomalous behavior. + *

+ */ +export interface CloudWatchMetricsDataSummary { + /** + *

This is a list of cloudwatch metric values at given timestamp.

+ */ + TimestampMetricValuePairList?: TimestampMetricValuePair[]; + + /** + *

This is enum of the status showing whether the metric value pair list has Partial or + * Complete data or there was an error.

+ */ + StatusCode?: CloudWatchMetricDataStatusCode | string; +} + +export namespace CloudWatchMetricsDataSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CloudWatchMetricsDataSummary): any => ({ + ...obj, + }); +} + export enum CloudWatchMetricsStat { AVERAGE = "Average", MAXIMUM = "Maximum", @@ -418,55 +484,46 @@ export enum CloudWatchMetricsStat { } /** - *

- * Information about an Amazon CloudWatch metric. - *

+ *

Information about an Amazon CloudWatch metric.

*/ export interface CloudWatchMetricsDetail { /** - *

- * The name of the CloudWatch metric. - *

+ *

The name of the CloudWatch metric.

*/ MetricName?: string; /** - *

- * The namespace of the CloudWatch metric. A namespace is a container for CloudWatch metrics. + *

The namespace of the CloudWatch metric. A namespace is a container for CloudWatch metrics. *

*/ Namespace?: string; /** - *

- * An array of CloudWatch dimensions associated with - *

+ *

An array of CloudWatch dimensions associated with

*/ Dimensions?: CloudWatchMetricsDimension[]; /** - *

- * The type of statistic associated with the CloudWatch metric. For more information, see - * Statistics in the - * Amazon CloudWatch User Guide. - *

+ *

The type of statistic associated with the CloudWatch metric. For more information, see + * Statistics in the Amazon CloudWatch User Guide.

*/ Stat?: CloudWatchMetricsStat | string; /** - *

- * The unit of measure used for the CloudWatch metric. For example, Bytes, Seconds, - * Count, and Percent. - *

+ *

The unit of measure used for the CloudWatch metric. For example, Bytes, + * Seconds, Count, and Percent.

*/ Unit?: string; /** - *

- * The length of time associated with the CloudWatch metric in number of seconds. - *

+ *

The length of time associated with the CloudWatch metric in number of seconds.

*/ Period?: number; + + /** + *

This object returns anomaly metric data.

+ */ + MetricDataSummary?: CloudWatchMetricsDataSummary; } export namespace CloudWatchMetricsDetail { @@ -479,8 +536,8 @@ export namespace CloudWatchMetricsDetail { } /** - *

Details about the source of the anomalous operational data that triggered the anomaly. The - * one supported source is Amazon CloudWatch metrics.

+ *

Details about the source of the anomalous operational data that triggered the + * anomaly. The one supported source is Amazon CloudWatch metrics.

*/ export interface AnomalySourceDetails { /** @@ -505,17 +562,13 @@ export enum AnomalyStatus { } /** - *

- * A time range that specifies when the observed unusual behavior in an anomaly started and ended. This is different from - * AnomalyReportedTimeRange, which specifies the time range when DevOps Guru opens and then closes - * an anomaly. - *

+ *

A time range that specifies when the observed unusual behavior in an anomaly started + * and ended. This is different from AnomalyReportedTimeRange, which specifies + * the time range when DevOps Guru opens and then closes an anomaly.

*/ export interface AnomalyTimeRange { /** - *

- * The time when the anomalous behavior started. - *

+ *

The time when the anomalous behavior started.

*/ StartTime: Date | undefined; @@ -547,29 +600,26 @@ export namespace DescribeAccountHealthRequest { export interface DescribeAccountHealthResponse { /** - *

- * An integer that specifies the number of open reactive insights in your AWS account. - *

+ *

An integer that specifies the number of open reactive insights in your Amazon Web Services account. + *

*/ OpenReactiveInsights: number | undefined; /** - *

- * An integer that specifies the number of open proactive insights in your AWS account. - *

+ *

An integer that specifies the number of open proactive insights in your Amazon Web Services + * account.

*/ OpenProactiveInsights: number | undefined; /** - *

- * An integer that specifies the number of metrics that have been analyzed in your AWS account. - *

+ *

An integer that specifies the number of metrics that have been analyzed in your Amazon Web Services + * account.

*/ MetricsAnalyzed: number | undefined; /** - *

The number of Amazon DevOps Guru resource analysis hours billed to the current AWS account in the last hour. - *

+ *

The number of Amazon DevOps Guru resource analysis hours billed to the current Amazon Web Services account in + * the last hour.

*/ ResourceHours: number | undefined; } @@ -585,18 +635,16 @@ export namespace DescribeAccountHealthResponse { export interface DescribeAccountOverviewRequest { /** - *

- * The start of the time range passed in. The start time granularity is at the - * day level. The floor of the start time is used. Returned information occurred after this day. - *

+ *

The start of the time range passed in. The start time granularity is at the day + * level. The floor of the start time is used. Returned information occurred after this + * day.

*/ FromTime: Date | undefined; /** - *

- * The end of the time range passed in. The start time granularity is at the - * day level. The floor of the start time is used. Returned information occurred before this day. If this is not specified, then the current day is used. - *

+ *

The end of the time range passed in. The start time granularity is at the day level. + * The floor of the start time is used. Returned information occurred before this day. If + * this is not specified, then the current day is used.

*/ ToTime?: Date; } @@ -612,26 +660,20 @@ export namespace DescribeAccountOverviewRequest { export interface DescribeAccountOverviewResponse { /** - *

- * An integer that specifies the number of open reactive insights in your AWS account that were created during the - * time range passed in. - *

+ *

An integer that specifies the number of open reactive insights in your Amazon Web Services account + * that were created during the time range passed in.

*/ ReactiveInsights: number | undefined; /** - *

- * An integer that specifies the number of open proactive insights in your AWS account that were created during the - * time range passed in. - *

+ *

An integer that specifies the number of open proactive insights in your Amazon Web Services account + * that were created during the time range passed in.

*/ ProactiveInsights: number | undefined; /** - *

- * The Mean Time to Recover (MTTR) for all closed insights that were created during the - * time range passed in. - *

+ *

The Mean Time to Recover (MTTR) for all closed insights that were created during the time range passed in. + *

*/ MeanTimeToRecoverInMilliseconds: number | undefined; } @@ -647,11 +689,14 @@ export namespace DescribeAccountOverviewResponse { export interface DescribeAnomalyRequest { /** - *

- * The ID of the anomaly. - *

+ *

The ID of the anomaly.

*/ Id: string | undefined; + + /** + *

The ID of the member account.

+ */ + AccountId?: string; } export namespace DescribeAnomalyRequest { @@ -664,22 +709,18 @@ export namespace DescribeAnomalyRequest { } /** - *

- * The time range during which anomalous behavior in a proactive anomaly or an insight is expected to occur. - *

+ *

The time range during which anomalous behavior in a proactive anomaly or an insight + * is expected to occur.

*/ export interface PredictionTimeRange { /** - *

- * The time range during which a metric limit is expected to be exceeded. This applies to proactive insights only. - *

+ *

The time range during which a metric limit is expected to be exceeded. This applies + * to proactive insights only.

*/ StartTime: Date | undefined; /** - *

- * The time when the behavior in a proactive insight is expected to end. - *

+ *

The time when the behavior in a proactive insight is expected to end.

*/ EndTime?: Date; } @@ -694,17 +735,14 @@ export namespace PredictionTimeRange { } /** - *

- * Information about AWS CloudFormation stacks. You can use up to 500 stacks to specify which AWS resources in your account to analyze. - * For more information, see Stacks - * in the AWS CloudFormation User Guide. - *

+ *

Information about Amazon Web Services CloudFormation stacks. You can use up to 500 + * stacks to specify which Amazon Web Services resources in your account to analyze. For more + * information, see Stacks in the + * Amazon Web Services CloudFormation User Guide.

*/ export interface CloudFormationCollection { /** - *

- * An array of CloudFormation stack names. - *

+ *

An array of CloudFormation stack names.

*/ StackNames?: string[]; } @@ -719,16 +757,14 @@ export namespace CloudFormationCollection { } /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ export interface ResourceCollection { /** - *

An array of the names of AWS CloudFormation stacks. The stacks define AWS resources - * that DevOps Guru analyzes. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

An array of the names of Amazon Web Services CloudFormation stacks. The stacks define Amazon Web Services resources that + * DevOps Guru analyzes. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ CloudFormation?: CloudFormationCollection; } @@ -743,43 +779,34 @@ export namespace ResourceCollection { } /** - *

Information about an anomaly. This object is returned by ListAnomalies.

+ *

Information about an anomaly. This object is returned by + * ListAnomalies.

*/ export interface ProactiveAnomaly { /** - *

- * The ID of a proactive anomaly. - *

+ *

The ID of a proactive anomaly.

*/ Id?: string; /** - *

- * The severity of a proactive anomaly. - *

+ *

The severity of a proactive anomaly.

*/ Severity?: AnomalySeverity | string; /** - *

- * The status of a proactive anomaly. - *

+ *

The status of a proactive anomaly.

*/ Status?: AnomalyStatus | string; /** - *

- * The time of the anomaly's most recent update. - *

+ *

The time of the anomaly's most recent update.

*/ UpdateTime?: Date; /** - *

- * A time range that specifies when the observed unusual behavior in an anomaly started and ended. This is different from - * AnomalyReportedTimeRange, which specifies the time range when DevOps Guru opens and then closes - * an anomaly. - *

+ *

A time range that specifies when the observed unusual behavior in an anomaly started + * and ended. This is different from AnomalyReportedTimeRange, which specifies + * the time range when DevOps Guru opens and then closes an anomaly.

*/ AnomalyTimeRange?: AnomalyTimeRange; @@ -791,39 +818,33 @@ export interface ProactiveAnomaly { AnomalyReportedTimeRange?: AnomalyReportedTimeRange; /** - *

- * The time range during which anomalous behavior in a proactive anomaly or an insight is expected to occur. - *

+ *

The time range during which anomalous behavior in a proactive anomaly or an insight + * is expected to occur.

*/ PredictionTimeRange?: PredictionTimeRange; /** - *

- * Details about the source of the analyzed operational data that triggered the anomaly. The one supported source is Amazon CloudWatch metrics. - *

+ *

Details about the source of the analyzed operational data that triggered the anomaly. + * The one supported source is Amazon CloudWatch metrics.

*/ SourceDetails?: AnomalySourceDetails; /** - *

- * The ID of the insight that contains this anomaly. An insight is composed of related anomalies. - *

+ *

The ID of the insight that contains this anomaly. An insight is composed of related + * anomalies.

*/ AssociatedInsightId?: string; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; /** - *

- * A threshold that was exceeded by behavior in analyzed resources. Exceeding this - * threshold is related to the anomalous behavior that generated this anomaly. - *

+ *

A threshold that was exceeded by behavior in analyzed resources. Exceeding this + * threshold is related to the anomalous behavior that generated this anomaly.

*/ Limit?: number; } @@ -838,7 +859,8 @@ export namespace ProactiveAnomaly { } /** - *

Details about a reactive anomaly. This object is returned by ListAnomalies.

+ *

Details about a reactive anomaly. This object is returned by + * ListAnomalies.

*/ export interface ReactiveAnomaly { /** @@ -852,18 +874,14 @@ export interface ReactiveAnomaly { Severity?: AnomalySeverity | string; /** - *

- * The status of the anomaly. - *

+ *

The status of the anomaly.

*/ Status?: AnomalyStatus | string; /** - *

- * A time range that specifies when the observed unusual behavior in an anomaly started and ended. This is different from - * AnomalyReportedTimeRange, which specifies the time range when DevOps Guru opens and then closes - * an anomaly. - *

+ *

A time range that specifies when the observed unusual behavior in an anomaly started + * and ended. This is different from AnomalyReportedTimeRange, which specifies + * the time range when DevOps Guru opens and then closes an anomaly.

*/ AnomalyTimeRange?: AnomalyTimeRange; @@ -875,24 +893,21 @@ export interface ReactiveAnomaly { AnomalyReportedTimeRange?: AnomalyReportedTimeRange; /** - *

- * Details about the source of the analyzed operational data that triggered the anomaly. The one supported source is Amazon CloudWatch metrics. - *

+ *

Details about the source of the analyzed operational data that triggered the anomaly. + * The one supported source is Amazon CloudWatch metrics.

*/ SourceDetails?: AnomalySourceDetails; /** - *

- * The ID of the insight that contains this anomaly. An insight is composed of related anomalies. - *

+ *

The ID of the insight that contains this anomaly. An insight is composed of related + * anomalies.

*/ AssociatedInsightId?: string; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; } @@ -908,16 +923,12 @@ export namespace ReactiveAnomaly { export interface DescribeAnomalyResponse { /** - *

- * A ReactiveAnomaly object that represents the requested anomaly. - *

+ *

A ReactiveAnomaly object that represents the requested anomaly.

*/ ProactiveAnomaly?: ProactiveAnomaly; /** - *

- * A ProactiveAnomaly object that represents the requested anomaly. - *

+ *

A ProactiveAnomaly object that represents the requested anomaly.

*/ ReactiveAnomaly?: ReactiveAnomaly; } @@ -933,9 +944,7 @@ export namespace DescribeAnomalyResponse { export interface DescribeFeedbackRequest { /** - *

- * The ID of the insight for which the feedback was provided. - *

+ *

The ID of the insight for which the feedback was provided.

*/ InsightId?: string; } @@ -958,22 +967,16 @@ export enum InsightFeedbackOption { } /** - *

- * Information about insight feedback received from a customer. - *

+ *

Information about insight feedback received from a customer.

*/ export interface InsightFeedback { /** - *

- * The insight feedback ID. - *

+ *

The insight feedback ID.

*/ Id?: string; /** - *

- * The feedback provided by the customer. - *

+ *

The feedback provided by the customer.

*/ Feedback?: InsightFeedbackOption | string; } @@ -989,9 +992,7 @@ export namespace InsightFeedback { export interface DescribeFeedbackResponse { /** - *

- * Information about insight feedback received from a customer. - *

+ *

Information about insight feedback received from a customer.

*/ InsightFeedback?: InsightFeedback; } @@ -1007,11 +1008,14 @@ export namespace DescribeFeedbackResponse { export interface DescribeInsightRequest { /** - *

- * The ID of the insight. - *

+ *

The ID of the insight.

*/ Id: string | undefined; + + /** + *

The ID of the member account in the organization.

+ */ + AccountId?: string; } export namespace DescribeInsightRequest { @@ -1029,16 +1033,12 @@ export namespace DescribeInsightRequest { */ export interface InsightTimeRange { /** - *

- * The time when the behavior described in an insight started. - *

+ *

The time when the behavior described in an insight started.

*/ StartTime: Date | undefined; /** - *

- * The time when the behavior described in an insight ended. - *

+ *

The time when the behavior described in an insight ended.

*/ EndTime?: Date; } @@ -1064,7 +1064,8 @@ export enum InsightStatus { } /** - *

Details about a proactive insight. This object is returned by ListInsights.

+ *

Details about a proactive insight. This object is returned by + * ListInsights.

*/ export interface ProactiveInsight { /** @@ -1094,25 +1095,21 @@ export interface ProactiveInsight { InsightTimeRange?: InsightTimeRange; /** - *

- * The time range during which anomalous behavior in a proactive anomaly or an insight is expected to occur. - *

+ *

The time range during which anomalous behavior in a proactive anomaly or an insight + * is expected to occur.

*/ PredictionTimeRange?: PredictionTimeRange; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; /** - *

- * The ID of the AWS System Manager OpsItem created for this insight. You must enable - * the creation of OpstItems insights before they are created for each insight. - *

+ *

The ID of the Amazon Web Services System Manager OpsItem created for this insight. You must enable + * the creation of OpstItems insights before they are created for each insight.

*/ SsmOpsItemId?: string; } @@ -1127,36 +1124,27 @@ export namespace ProactiveInsight { } /** - *

- * Information about a reactive insight. This object is returned by ListInsights. - *

+ *

Information about a reactive insight. This object is returned by + * ListInsights.

*/ export interface ReactiveInsight { /** - *

- * The ID of a reactive insight. - *

+ *

The ID of a reactive insight.

*/ Id?: string; /** - *

- * The name of a reactive insight. - *

+ *

The name of a reactive insight.

*/ Name?: string; /** - *

- * The severity of a reactive insight. - *

+ *

The severity of a reactive insight.

*/ Severity?: InsightSeverity | string; /** - *

- * The status of a reactive insight. - *

+ *

The status of a reactive insight.

*/ Status?: InsightStatus | string; @@ -1167,18 +1155,15 @@ export interface ReactiveInsight { InsightTimeRange?: InsightTimeRange; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; /** - *

- * The ID of the AWS System Manager OpsItem created for this insight. You must enable - * the creation of OpstItems insights before they are created for each insight. - *

+ *

The ID of the Amazon Web Services System Manager OpsItem created for this insight. You must enable + * the creation of OpstItems insights before they are created for each insight.

*/ SsmOpsItemId?: string; } @@ -1194,16 +1179,12 @@ export namespace ReactiveInsight { export interface DescribeInsightResponse { /** - *

- * A ProactiveInsight object that represents the requested insight. - *

+ *

A ProactiveInsight object that represents the requested insight.

*/ ProactiveInsight?: ProactiveInsight; /** - *

- * A ReactiveInsight object that represents the requested insight. - *

+ *

A ReactiveInsight object that represents the requested insight.

*/ ReactiveInsight?: ReactiveInsight; } @@ -1217,66 +1198,188 @@ export namespace DescribeInsightResponse { }); } -export enum ResourceCollectionType { - AWS_CLOUD_FORMATION = "AWS_CLOUD_FORMATION", - AWS_SERVICE = "AWS_SERVICE", -} - -export interface DescribeResourceCollectionHealthRequest { +export interface DescribeOrganizationHealthRequest { /** - *

- * An AWS resource collection type. This type specifies how analyzed AWS resources are defined. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

The ID of the Amazon Web Services account.

*/ - ResourceCollectionType: ResourceCollectionType | string | undefined; + AccountIds?: string[]; /** - *

The pagination token to use to retrieve - * the next page of results for this operation. If this value is null, it retrieves the first page.

+ *

The ID of the organizational unit.

*/ - NextToken?: string; + OrganizationalUnitIds?: string[]; } -export namespace DescribeResourceCollectionHealthRequest { +export namespace DescribeOrganizationHealthRequest { /** * @internal */ - export const filterSensitiveLog = (obj: DescribeResourceCollectionHealthRequest): any => ({ + export const filterSensitiveLog = (obj: DescribeOrganizationHealthRequest): any => ({ ...obj, }); } -/** - *

- * Information about the number of open reactive and proactive insights that can be - * used to gauge the health of your system. - *

- */ -export interface InsightHealth { +export interface DescribeOrganizationHealthResponse { /** - *

- * The number of open proactive insights. - *

+ *

An integer that specifies the number of open reactive insights in your Amazon Web Services + * account.

*/ - OpenProactiveInsights?: number; + OpenReactiveInsights: number | undefined; /** - *

- * The number of open reactive insights. - *

+ *

An integer that specifies the number of open proactive insights in your Amazon Web Services + * account.

*/ - OpenReactiveInsights?: number; + OpenProactiveInsights: number | undefined; /** - *

- * The Meant Time to Recover (MTTR) for the insight. - *

+ *

An integer that specifies the number of metrics that have been analyzed in your + * organization.

*/ - MeanTimeToRecoverInMilliseconds?: number; + MetricsAnalyzed: number | undefined; + + /** + *

The number of Amazon DevOps Guru resource analysis hours billed to the current Amazon Web Services account in + * the last hour.

+ */ + ResourceHours: number | undefined; } -export namespace InsightHealth { +export namespace DescribeOrganizationHealthResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeOrganizationHealthResponse): any => ({ + ...obj, + }); +} + +export interface DescribeOrganizationOverviewRequest { + /** + *

The start of the time range passed in. The start time granularity is at the day + * level. The floor of the start time is used. Returned information occurred after this + * day.

+ */ + FromTime: Date | undefined; + + /** + *

The end of the time range passed in. The start time granularity is at the day level. + * The floor of the start time is used. Returned information occurred before this day. If + * this is not specified, then the current day is used.

+ */ + ToTime?: Date; + + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountIds?: string[]; + + /** + *

The ID of the organizational unit.

+ */ + OrganizationalUnitIds?: string[]; +} + +export namespace DescribeOrganizationOverviewRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeOrganizationOverviewRequest): any => ({ + ...obj, + }); +} + +export interface DescribeOrganizationOverviewResponse { + /** + *

An integer that specifies the number of open reactive insights in your Amazon Web Services + * account.

+ */ + ReactiveInsights: number | undefined; + + /** + *

An integer that specifies the number of open proactive insights in your Amazon Web Services + * account.

+ */ + ProactiveInsights: number | undefined; +} + +export namespace DescribeOrganizationOverviewResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeOrganizationOverviewResponse): any => ({ + ...obj, + }); +} + +export enum OrganizationResourceCollectionType { + AWS_ACCOUNT = "AWS_ACCOUNT", + AWS_CLOUD_FORMATION = "AWS_CLOUD_FORMATION", + AWS_SERVICE = "AWS_SERVICE", +} + +export interface DescribeOrganizationResourceCollectionHealthRequest { + /** + *

An Amazon Web Services resource collection type. This type specifies how analyzed Amazon Web Services resources + * are defined. The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

+ */ + OrganizationResourceCollectionType: OrganizationResourceCollectionType | string | undefined; + + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountIds?: string[]; + + /** + *

The ID of the organizational unit.

+ */ + OrganizationalUnitIds?: string[]; + + /** + *

The pagination token to use to retrieve + * the next page of results for this operation. If this value is null, it retrieves the first page.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to return with a single call. + * To retrieve the remaining results, make another call with the returned nextToken value.

+ */ + MaxResults?: number; +} + +export namespace DescribeOrganizationResourceCollectionHealthRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeOrganizationResourceCollectionHealthRequest): any => ({ + ...obj, + }); +} + +/** + *

Information about the number of open reactive and proactive insights that can be used + * to gauge the health of your system.

+ */ +export interface InsightHealth { + /** + *

The number of open proactive insights.

+ */ + OpenProactiveInsights?: number; + + /** + *

The number of open reactive insights.

+ */ + OpenReactiveInsights?: number; + + /** + *

The Meant Time to Recover (MTTR) for the insight.

+ */ + MeanTimeToRecoverInMilliseconds?: number; +} + +export namespace InsightHealth { /** * @internal */ @@ -1286,23 +1389,19 @@ export namespace InsightHealth { } /** - *

- * Information about the health of AWS resources in your account that are specified by an AWS CloudFormation stack. - *

+ *

Information about the health of Amazon Web Services resources in your account that are specified by + * an Amazon Web Services CloudFormation stack.

*/ export interface CloudFormationHealth { /** - *

- * The name of the CloudFormation stack. - *

+ *

The name of the CloudFormation stack.

*/ StackName?: string; /** - *

- * Information about the health of the AWS resources in your account that are specified by an AWS CloudFormation stack, including - * the number of open proactive, open reactive insights, and the Mean Time to Recover (MTTR) of closed insights. - *

+ *

Information about the health of the Amazon Web Services resources in your account that are + * specified by an Amazon Web Services CloudFormation stack, including the number of open proactive, open reactive + * insights, and the Mean Time to Recover (MTTR) of closed insights.

*/ Insight?: InsightHealth; } @@ -1317,16 +1416,17 @@ export namespace CloudFormationHealth { } /** - *

Contains the number of open proactive and reactive insights in an analyzed AWS service.

+ *

Contains the number of open proactive and reactive insights in an analyzed Amazon Web Services + * service.

*/ export interface ServiceInsightHealth { /** - *

The number of open proactive insights in the AWS service

+ *

The number of open proactive insights in the Amazon Web Services service

*/ OpenProactiveInsights?: number; /** - *

The number of open reactive insights in the AWS service

+ *

The number of open reactive insights in the Amazon Web Services service

*/ OpenReactiveInsights?: number; } @@ -1369,17 +1469,18 @@ export enum ServiceName { } /** - *

Represents the health of an AWS service.

+ *

Represents the health of an Amazon Web Services service.

*/ export interface ServiceHealth { /** - *

The name of the AWS service.

+ *

The name of the Amazon Web Services service.

*/ ServiceName?: ServiceName | string; /** - *

Represents the health of an AWS service. This is a ServiceInsightHealth that - * contains the number of open proactive and reactive insights for this service.

+ *

Represents the health of an Amazon Web Services service. This is a ServiceInsightHealth + * that contains the number of open proactive and reactive insights for this + * service.

*/ Insight?: ServiceInsightHealth; } @@ -1393,18 +1494,81 @@ export namespace ServiceHealth { }); } +export interface DescribeOrganizationResourceCollectionHealthResponse { + /** + *

The returned CloudFormationHealthOverview object that contains an + * InsightHealthOverview object with the requested system health + * information.

+ */ + CloudFormation?: CloudFormationHealth[]; + + /** + *

An array of ServiceHealth objects that describes the health of the Amazon Web Services + * services associated with the resources in the collection.

+ */ + Service?: ServiceHealth[]; + + /** + *

The name of the organization's account.

+ */ + Account?: AccountHealth[]; + + /** + *

The pagination token to use to retrieve + * the next page of results for this operation. If there are no more pages, this value is null.

+ */ + NextToken?: string; +} + +export namespace DescribeOrganizationResourceCollectionHealthResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeOrganizationResourceCollectionHealthResponse): any => ({ + ...obj, + }); +} + +export enum ResourceCollectionType { + AWS_CLOUD_FORMATION = "AWS_CLOUD_FORMATION", + AWS_SERVICE = "AWS_SERVICE", +} + +export interface DescribeResourceCollectionHealthRequest { + /** + *

An Amazon Web Services resource collection type. This type specifies how analyzed Amazon Web Services resources + * are defined. The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

+ */ + ResourceCollectionType: ResourceCollectionType | string | undefined; + + /** + *

The pagination token to use to retrieve + * the next page of results for this operation. If this value is null, it retrieves the first page.

+ */ + NextToken?: string; +} + +export namespace DescribeResourceCollectionHealthRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeResourceCollectionHealthRequest): any => ({ + ...obj, + }); +} + export interface DescribeResourceCollectionHealthResponse { /** - *

- * The returned CloudFormationHealthOverview object that contains an InsightHealthOverview object with - * the requested system health information. - *

+ *

The returned CloudFormationHealthOverview object that contains an + * InsightHealthOverview object with the requested system health + * information.

*/ CloudFormation: CloudFormationHealth[] | undefined; /** - *

An array of ServiceHealth objects that describes the health of the AWS services - * associated with the resources in the collection.

+ *

An array of ServiceHealth objects that describes the health of the Amazon Web Services + * services associated with the resources in the collection.

*/ Service?: ServiceHealth[]; @@ -1441,15 +1605,13 @@ export enum OptInStatus { } /** - *

- * Information about whether DevOps Guru is configured to create an OpsItem in AWS Systems Manager OpsCenter for each created insight. - *

+ *

Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager + * OpsCenter for each created insight.

*/ export interface OpsCenterIntegration { /** - *

- * Specifies if DevOps Guru is enabled to create an AWS Systems Manager OpsItem for each created insight. - *

+ *

Specifies if DevOps Guru is enabled to create an Amazon Web Services Systems Manager OpsItem for each created + * insight.

*/ OptInStatus?: OptInStatus | string; } @@ -1464,15 +1626,13 @@ export namespace OpsCenterIntegration { } /** - *

- * Information about the integration of DevOps Guru with another AWS service, such as AWS Systems Manager. - *

+ *

Information about the integration of DevOps Guru with another Amazon Web Services service, such as + * Amazon Web Services Systems Manager.

*/ export interface ServiceIntegrationConfig { /** - *

- * Information about whether DevOps Guru is configured to create an OpsItem in AWS Systems Manager OpsCenter for each created insight. - *

+ *

Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager + * OpsCenter for each created insight.

*/ OpsCenter?: OpsCenterIntegration; } @@ -1488,9 +1648,8 @@ export namespace ServiceIntegrationConfig { export interface DescribeServiceIntegrationResponse { /** - *

- * Information about the integration of DevOps Guru with another AWS service, such as AWS Systems Manager. - *

+ *

Information about the integration of DevOps Guru with another Amazon Web Services service, such as + * Amazon Web Services Systems Manager.

*/ ServiceIntegration?: ServiceIntegrationConfig; } @@ -1527,24 +1686,23 @@ export enum CostEstimationServiceResourceState { } /** - *

An object that contains information about the estimated monthly cost to - * analyze an AWS resource. For more information, + *

An object that contains information about the estimated monthly cost to analyze an + * Amazon Web Services resource. For more information, * see Estimate your * Amazon DevOps Guru costs and * Amazon DevOps Guru pricing.

*/ export interface ServiceResourceCost { /** - *

The type of the AWS resource.

+ *

The type of the Amazon Web Services resource.

*/ Type?: string; /** *

The state of the resource. The resource is ACTIVE if it produces metrics, - * events, or logs within an hour, otherwise it is INACTIVE. You pay for - * the number of active AWS resource hours analyzed for each resource. Inactive resources are - * not charged. - *

+ * events, or logs within an hour, otherwise it is INACTIVE. You pay for the + * number of active Amazon Web Services resource hours analyzed for each resource. Inactive resources are + * not charged.

*/ State?: CostEstimationServiceResourceState | string; @@ -1564,7 +1722,8 @@ export interface ServiceResourceCost { UnitCost?: number; /** - *

The total estimated monthly cost to analyze the active resources for this resource.

+ *

The total estimated monthly cost to analyze the active resources for this + * resource.

*/ Cost?: number; } @@ -1579,10 +1738,11 @@ export namespace ServiceResourceCost { } /** - *

Information about an AWS CloudFormation stack used to create a monthly cost estimate for DevOps Guru to analyze - * AWS resources. The maximum number of stacks you can specify for a cost estimate is one. The estimate created is for the cost - * to analyze the AWS resources defined by the stack. For more information, see Stacks - * in the AWS CloudFormation User Guide.

+ *

Information about an Amazon Web Services CloudFormation stack used to create a monthly cost estimate + * for DevOps Guru to analyze Amazon Web Services resources. The maximum number of stacks you can specify for a + * cost estimate is one. The estimate created is for the cost to analyze the Amazon Web Services + * resources defined by the stack. For more information, see Stacks in the + * Amazon Web Services CloudFormation User Guide.

*/ export interface CloudFormationCostEstimationResourceCollectionFilter { /** @@ -1601,16 +1761,15 @@ export namespace CloudFormationCostEstimationResourceCollectionFilter { } /** - *

Information about a filter used to specify which AWS resources are analyzed to create - * a monthly DevOps Guru cost estimate. For more information, + *

Information about a filter used to specify which Amazon Web Services resources are analyzed to + * create a monthly DevOps Guru cost estimate. For more information, * see Estimate your * Amazon DevOps Guru costs and - * Amazon DevOps Guru pricing. - *

+ * Amazon DevOps Guru pricing.

*/ export interface CostEstimationResourceCollectionFilter { /** - *

An object that specifies the CloudFormation stack that defines the AWS resources + *

An object that specifies the CloudFormation stack that defines the Amazon Web Services resources * used to create a monthly estimate for DevOps Guru.

*/ CloudFormation?: CloudFormationCostEstimationResourceCollectionFilter; @@ -1656,19 +1815,21 @@ export namespace CostEstimationTimeRange { export interface GetCostEstimationResponse { /** - *

The collection of the AWS resources used to create your monthly DevOps Guru cost estimate.

+ *

The collection of the Amazon Web Services resources used to create your monthly DevOps Guru cost + * estimate.

*/ ResourceCollection?: CostEstimationResourceCollectionFilter; /** *

The status of creating this cost estimate. If it's still in progress, the status - * ONGOING is returned. If it is finished, the status COMPLETED is returned.

+ * ONGOING is returned. If it is finished, the status + * COMPLETED is returned.

*/ Status?: CostEstimationStatus | string; /** - *

An array of ResourceCost objects that each contains details - * about the monthly cost estimate to analyze one of your AWS resources.

+ *

An array of ResourceCost objects that each contains details about the + * monthly cost estimate to analyze one of your Amazon Web Services resources.

*/ Costs?: ServiceResourceCost[]; @@ -1678,9 +1839,9 @@ export interface GetCostEstimationResponse { TimeRange?: CostEstimationTimeRange; /** - *

The estimated monthly cost to analyze the AWS resources. - * This value is the sum of the estimated costs to analyze each resource in the Costs - * object in this response.

+ *

The estimated monthly cost to analyze the Amazon Web Services resources. This value is the sum of + * the estimated costs to analyze each resource in the Costs object in this + * response.

*/ TotalCost?: number; @@ -1702,10 +1863,8 @@ export namespace GetCostEstimationResponse { export interface GetResourceCollectionRequest { /** - *

- * The type of AWS resource collections to return. The one valid value is CLOUD_FORMATION for - * AWS CloudFormation stacks. - *

+ *

The type of Amazon Web Services resource collections to return. The one valid value is + * CLOUD_FORMATION for Amazon Web Services CloudFormation stacks.

*/ ResourceCollectionType: ResourceCollectionType | string | undefined; @@ -1726,17 +1885,14 @@ export namespace GetResourceCollectionRequest { } /** - *

- * Information about AWS CloudFormation stacks. You can use up to 500 stacks to specify which AWS resources in your account to analyze. - * For more information, see Stacks - * in the AWS CloudFormation User Guide. - *

+ *

Information about Amazon Web Services CloudFormation stacks. You can use up to 500 + * stacks to specify which Amazon Web Services resources in your account to analyze. For more + * information, see Stacks in the + * Amazon Web Services CloudFormation User Guide.

*/ export interface CloudFormationCollectionFilter { /** - *

- * An array of CloudFormation stack names. - *

+ *

An array of CloudFormation stack names.

*/ StackNames?: string[]; } @@ -1751,17 +1907,15 @@ export namespace CloudFormationCollectionFilter { } /** - *

- * Information about a filter used to specify which AWS resources are analyzed for anomalous behavior by DevOps Guru. - *

+ *

Information about a filter used to specify which Amazon Web Services resources are analyzed for + * anomalous behavior by DevOps Guru.

*/ export interface ResourceCollectionFilter { /** - *

- * Information about AWS CloudFormation stacks. You can use up to 500 stacks to specify which AWS resources in your account to analyze. - * For more information, see Stacks - * in the AWS CloudFormation User Guide. - *

+ *

Information about Amazon Web Services CloudFormation stacks. You can use up to 500 + * stacks to specify which Amazon Web Services resources in your account to analyze. For more + * information, see Stacks in the + * Amazon Web Services CloudFormation User Guide.

*/ CloudFormation?: CloudFormationCollectionFilter; } @@ -1777,10 +1931,9 @@ export namespace ResourceCollectionFilter { export interface GetResourceCollectionResponse { /** - *

- * The requested list of AWS resource collections. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

The requested list of Amazon Web Services resource collections. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollectionFilter; @@ -1801,22 +1954,17 @@ export namespace GetResourceCollectionResponse { } /** - *

- * A time range used to specify when the behavior of an insight or anomaly started. + *

A time range used to specify when the behavior of an insight or anomaly started. *

*/ export interface StartTimeRange { /** - *

- * The start time of the time range. - *

+ *

The start time of the time range.

*/ FromTime?: Date; /** - *

- * The end time of the time range. - *

+ *

The end time of the time range.

*/ ToTime?: Date; } @@ -1832,17 +1980,13 @@ export namespace StartTimeRange { export interface ListAnomaliesForInsightRequest { /** - *

- * The ID of the insight. The returned anomalies belong to this insight. - *

+ *

The ID of the insight. The returned anomalies belong to this insight.

*/ InsightId: string | undefined; /** - *

- * A time range used to specify when the requested anomalies started. All returned anomalies started - * during this time range. - *

+ *

A time range used to specify when the requested anomalies started. All returned + * anomalies started during this time range.

*/ StartTimeRange?: StartTimeRange; @@ -1857,6 +2001,11 @@ export interface ListAnomaliesForInsightRequest { * the next page of results for this operation. If this value is null, it retrieves the first page.

*/ NextToken?: string; + + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountId?: string; } export namespace ListAnomaliesForInsightRequest { @@ -1870,7 +2019,7 @@ export namespace ListAnomaliesForInsightRequest { /** *

Details about a proactive anomaly. This object is returned by - * DescribeAnomaly. + * DescribeAnomaly. *

*/ export interface ProactiveAnomalySummary { @@ -1890,18 +2039,14 @@ export interface ProactiveAnomalySummary { Status?: AnomalyStatus | string; /** - *

- * The time of the anomaly's most recent update. - *

+ *

The time of the anomaly's most recent update.

*/ UpdateTime?: Date; /** - *

- * A time range that specifies when the observed unusual behavior in an anomaly started and ended. This is different from - * AnomalyReportedTimeRange, which specifies the time range when DevOps Guru opens and then closes - * an anomaly. - *

+ *

A time range that specifies when the observed unusual behavior in an anomaly started + * and ended. This is different from AnomalyReportedTimeRange, which specifies + * the time range when DevOps Guru opens and then closes an anomaly.

*/ AnomalyTimeRange?: AnomalyTimeRange; @@ -1913,39 +2058,33 @@ export interface ProactiveAnomalySummary { AnomalyReportedTimeRange?: AnomalyReportedTimeRange; /** - *

- * The time range during which anomalous behavior in a proactive anomaly or an insight is expected to occur. - *

+ *

The time range during which anomalous behavior in a proactive anomaly or an insight + * is expected to occur.

*/ PredictionTimeRange?: PredictionTimeRange; /** - *

- * Details about the source of the analyzed operational data that triggered the anomaly. The one supported source is Amazon CloudWatch metrics. - *

+ *

Details about the source of the analyzed operational data that triggered the anomaly. + * The one supported source is Amazon CloudWatch metrics.

*/ SourceDetails?: AnomalySourceDetails; /** - *

- * The ID of the insight that contains this anomaly. An insight is composed of related anomalies. - *

+ *

The ID of the insight that contains this anomaly. An insight is composed of related + * anomalies.

*/ AssociatedInsightId?: string; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; /** - *

- * A threshold that was exceeded by behavior in analyzed resources. Exceeding this - * threshold is related to the anomalous behavior that generated this anomaly. - *

+ *

A threshold that was exceeded by behavior in analyzed resources. Exceeding this + * threshold is related to the anomalous behavior that generated this anomaly.

*/ Limit?: number; } @@ -1961,37 +2100,29 @@ export namespace ProactiveAnomalySummary { /** *

Details about a reactive anomaly. This object is returned by - * DescribeAnomaly. + * DescribeAnomaly. *

*/ export interface ReactiveAnomalySummary { /** - *

- * The ID of the reactive anomaly. - *

+ *

The ID of the reactive anomaly.

*/ Id?: string; /** - *

- * The severity of the reactive anomaly. - *

+ *

The severity of the reactive anomaly.

*/ Severity?: AnomalySeverity | string; /** - *

- * The status of the reactive anomaly. - *

+ *

The status of the reactive anomaly.

*/ Status?: AnomalyStatus | string; /** - *

- * A time range that specifies when the observed unusual behavior in an anomaly started and ended. This is different from - * AnomalyReportedTimeRange, which specifies the time range when DevOps Guru opens and then closes - * an anomaly. - *

+ *

A time range that specifies when the observed unusual behavior in an anomaly started + * and ended. This is different from AnomalyReportedTimeRange, which specifies + * the time range when DevOps Guru opens and then closes an anomaly.

*/ AnomalyTimeRange?: AnomalyTimeRange; @@ -2003,24 +2134,21 @@ export interface ReactiveAnomalySummary { AnomalyReportedTimeRange?: AnomalyReportedTimeRange; /** - *

- * Details about the source of the analyzed operational data that triggered the anomaly. The one supported source is Amazon CloudWatch metrics. - *

+ *

Details about the source of the analyzed operational data that triggered the anomaly. + * The one supported source is Amazon CloudWatch metrics.

*/ SourceDetails?: AnomalySourceDetails; /** - *

- * The ID of the insight that contains this anomaly. An insight is composed of related anomalies. - *

+ *

The ID of the insight that contains this anomaly. An insight is composed of related + * anomalies.

*/ AssociatedInsightId?: string; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; } @@ -2036,16 +2164,14 @@ export namespace ReactiveAnomalySummary { export interface ListAnomaliesForInsightResponse { /** - *

- * An array of ProactiveAnomalySummary objects that represent the requested anomalies - *

+ *

An array of ProactiveAnomalySummary objects that represent the requested + * anomalies

*/ ProactiveAnomalies?: ProactiveAnomalySummary[]; /** - *

- * An array of ReactiveAnomalySummary objects that represent the requested anomalies - *

+ *

An array of ReactiveAnomalySummary objects that represent the requested + * anomalies

*/ ReactiveAnomalies?: ReactiveAnomalySummary[]; @@ -2079,23 +2205,18 @@ export enum EventClass { } /** - *

- * The time range during which an AWS event occurred. AWS resource events and metrics are analyzed by DevOps Guru to find anomalous behavior and - * provide recommendations to improve your operational solutions. - *

+ *

The time range during which an Amazon Web Services event occurred. Amazon Web Services resource events and + * metrics are analyzed by DevOps Guru to find anomalous behavior and provide recommendations to + * improve your operational solutions.

*/ export interface EventTimeRange { /** - *

- * The time when the event started. - *

+ *

The time when the event started.

*/ FromTime: Date | undefined; /** - *

- * The time when the event ended. - *

+ *

The time when the event ended.

*/ ToTime: Date | undefined; } @@ -2110,15 +2231,12 @@ export namespace EventTimeRange { } /** - *

- * Filters you can use to specify which events are returned when ListEvents is called. - *

+ *

Filters you can use to specify which events are returned when ListEvents + * is called.

*/ export interface ListEventsFilters { /** - *

- * An ID of an insight that is related to the events you want to filter for. - *

+ *

An ID of an insight that is related to the events you want to filter for.

*/ InsightId?: string; @@ -2128,31 +2246,26 @@ export interface ListEventsFilters { EventTimeRange?: EventTimeRange; /** - *

- * The class of the events you want to filter for, such as an infrastructure change, a deployment, or a schema change. - *

+ *

The class of the events you want to filter for, such as an infrastructure change, a + * deployment, or a schema change.

*/ EventClass?: EventClass | string; /** - *

- * The AWS source that emitted the events you want to filter for. - *

+ *

The Amazon Web Services source that emitted the events you want to filter for.

*/ EventSource?: string; /** - *

- * The source, AWS_CLOUD_TRAIL or AWS_CODE_DEPLOY, of the events you want returned. - *

+ *

The source, AWS_CLOUD_TRAIL or AWS_CODE_DEPLOY, of the + * events you want returned.

*/ DataSource?: EventDataSource | string; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; } @@ -2168,9 +2281,8 @@ export namespace ListEventsFilters { export interface ListEventsRequest { /** - *

- * A ListEventsFilters object used to specify which events to return. - *

+ *

A ListEventsFilters object used to specify which events to return. + *

*/ Filters: ListEventsFilters | undefined; @@ -2185,6 +2297,11 @@ export interface ListEventsRequest { * the next page of results for this operation. If this value is null, it retrieves the first page.

*/ NextToken?: string; + + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountId?: string; } export namespace ListEventsRequest { @@ -2197,30 +2314,23 @@ export namespace ListEventsRequest { } /** - *

- * The AWS resource that emitted an event. AWS resource events and metrics are analyzed by DevOps Guru to find anomalous behavior and - * provide recommendations to improve your operational solutions. - *

+ *

The Amazon Web Services resource that emitted an event. Amazon Web Services resource events and metrics are + * analyzed by DevOps Guru to find anomalous behavior and provide recommendations to improve your + * operational solutions.

*/ export interface EventResource { /** - *

- * The type of resource that emitted an event. - *

+ *

The type of resource that emitted an event.

*/ Type?: string; /** - *

- * The name of the resource that emitted an event. - *

+ *

The name of the resource that emitted an event.

*/ Name?: string; /** - *

- * The Amazon Resource Name (ARN) of the resource that emitted an event. - *

+ *

The Amazon Resource Name (ARN) of the resource that emitted an event.

*/ Arn?: string; } @@ -2235,24 +2345,20 @@ export namespace EventResource { } /** - *

- * An AWS resource event. AWS resource events and metrics are analyzed by DevOps Guru to find anomalous behavior and - * provide recommendations to improve your operational solutions. - *

+ *

An Amazon Web Services resource event. Amazon Web Services resource events and metrics are analyzed by DevOps Guru to + * find anomalous behavior and provide recommendations to improve your operational + * solutions.

*/ export interface Event { /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; /** - *

- * The ID of the event. - *

+ *

The ID of the event.

*/ Id?: string; @@ -2262,37 +2368,30 @@ export interface Event { Time?: Date; /** - *

- * The AWS source that emitted the event. - *

+ *

The Amazon Web Services source that emitted the event.

*/ EventSource?: string; /** - *

- * The name of the event. - *

+ *

The name of the event.

*/ Name?: string; /** - *

- * The source, AWS_CLOUD_TRAIL or AWS_CODE_DEPLOY, where DevOps Guru analysis found the event. - *

+ *

The source, AWS_CLOUD_TRAIL or AWS_CODE_DEPLOY, where DevOps Guru + * analysis found the event.

*/ DataSource?: EventDataSource | string; /** - *

- * The class of the event. The class specifies what the event is related to, such as an infrastructure change, a deployment, or a schema change. - *

+ *

The class of the event. The class specifies what the event is related to, such as an + * infrastructure change, a deployment, or a schema change.

*/ EventClass?: EventClass | string; /** - *

- * An EventResource object that contains information about the resource that emitted the event. - *

+ *

An EventResource object that contains information about the resource + * that emitted the event.

*/ Resources?: EventResource[]; } @@ -2308,9 +2407,7 @@ export namespace Event { export interface ListEventsResponse { /** - *

- * A list of the requested events. - *

+ *

A list of the requested events.

*/ Events: Event[] | undefined; @@ -2336,22 +2433,18 @@ export enum InsightType { } /** - *

- * Used to filter for insights that have any status. - *

+ *

Used to filter for insights that have any status.

*/ export interface ListInsightsAnyStatusFilter { /** - *

- * Use to filter for either REACTIVE or PROACTIVE insights. - *

+ *

Use to filter for either REACTIVE or PROACTIVE insights. + *

*/ Type: InsightType | string | undefined; /** - *

- * A time range used to specify when the behavior of the filtered insights started. - *

+ *

A time range used to specify when the behavior of the filtered insights started. + *

*/ StartTimeRange: StartTimeRange | undefined; } @@ -2366,22 +2459,17 @@ export namespace ListInsightsAnyStatusFilter { } /** - *

- * A range of time that specifies when anomalous behavior in an anomaly or insight ended. - *

+ *

A range of time that specifies when anomalous behavior in an anomaly or insight + * ended.

*/ export interface EndTimeRange { /** - *

- * The earliest end time in the time range. - *

+ *

The earliest end time in the time range.

*/ FromTime?: Date; /** - *

- * The latest end time in the time range. - *

+ *

The latest end time in the time range.

*/ ToTime?: Date; } @@ -2396,22 +2484,18 @@ export namespace EndTimeRange { } /** - *

- * Used to filter for insights that have the status CLOSED. - *

+ *

Used to filter for insights that have the status CLOSED.

*/ export interface ListInsightsClosedStatusFilter { /** - *

- * Use to filter for either REACTIVE or PROACTIVE insights. - *

+ *

Use to filter for either REACTIVE or PROACTIVE insights. + *

*/ Type: InsightType | string | undefined; /** - *

- * A time range used to specify when the behavior of the filtered insights ended. - *

+ *

A time range used to specify when the behavior of the filtered insights ended. + *

*/ EndTimeRange: EndTimeRange | undefined; } @@ -2426,15 +2510,12 @@ export namespace ListInsightsClosedStatusFilter { } /** - *

- * Used to filter for insights that have the status ONGOING. - *

+ *

Used to filter for insights that have the status ONGOING.

*/ export interface ListInsightsOngoingStatusFilter { /** - *

- * Use to filter for either REACTIVE or PROACTIVE insights. - *

+ *

Use to filter for either REACTIVE or PROACTIVE insights. + *

*/ Type: InsightType | string | undefined; } @@ -2449,32 +2530,25 @@ export namespace ListInsightsOngoingStatusFilter { } /** - *

- * A filter used by ListInsights to specify which insights to return. - *

+ *

A filter used by ListInsights to specify which insights to return. + *

*/ export interface ListInsightsStatusFilter { /** - *

- * A ListInsightsAnyStatusFilter that specifies ongoing insights - * that are either REACTIVE or PROACTIVE. - *

+ *

A ListInsightsAnyStatusFilter that specifies ongoing insights that are + * either REACTIVE or PROACTIVE.

*/ Ongoing?: ListInsightsOngoingStatusFilter; /** - *

- * A ListInsightsClosedStatusFilter that specifies closed insights that are - * either REACTIVE or PROACTIVE. - *

+ *

A ListInsightsClosedStatusFilter that specifies closed insights that are + * either REACTIVE or PROACTIVE.

*/ Closed?: ListInsightsClosedStatusFilter; /** - *

- * A ListInsightsAnyStatusFilter that specifies insights of any status - * that are either REACTIVE or PROACTIVE. - *

+ *

A ListInsightsAnyStatusFilter that specifies insights of any status that + * are either REACTIVE or PROACTIVE.

*/ Any?: ListInsightsAnyStatusFilter; } @@ -2490,9 +2564,8 @@ export namespace ListInsightsStatusFilter { export interface ListInsightsRequest { /** - *

- * A filter used to filter the returned insights by their status. You can specify one status filter. - *

+ *

A filter used to filter the returned insights by their status. You can specify one + * status filter.

*/ StatusFilter: ListInsightsStatusFilter | undefined; @@ -2519,11 +2592,11 @@ export namespace ListInsightsRequest { } /** - *

A collection of the names of AWS services.

+ *

A collection of the names of Amazon Web Services services.

*/ export interface ServiceCollection { /** - *

An array of strings that each specifies the name of an AWS service.

+ *

An array of strings that each specifies the name of an Amazon Web Services service.

*/ ServiceNames?: (ServiceName | string)[]; } @@ -2539,7 +2612,7 @@ export namespace ServiceCollection { /** *

Details about a proactive insight. This object is returned by - * DescribeInsight. + * DescribeInsight. *

*/ export interface ProactiveInsightSummary { @@ -2570,22 +2643,20 @@ export interface ProactiveInsightSummary { InsightTimeRange?: InsightTimeRange; /** - *

- * The time range during which anomalous behavior in a proactive anomaly or an insight is expected to occur. - *

+ *

The time range during which anomalous behavior in a proactive anomaly or an insight + * is expected to occur.

*/ PredictionTimeRange?: PredictionTimeRange; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; /** - *

A collection of the names of AWS services.

+ *

A collection of the names of Amazon Web Services services.

*/ ServiceCollection?: ServiceCollection; } @@ -2606,30 +2677,22 @@ export namespace ProactiveInsightSummary { */ export interface ReactiveInsightSummary { /** - *

- * The ID of a reactive summary. - *

+ *

The ID of a reactive summary.

*/ Id?: string; /** - *

- * The name of a reactive insight. - *

+ *

The name of a reactive insight.

*/ Name?: string; /** - *

- * The severity of a reactive insight. - *

+ *

The severity of a reactive insight.

*/ Severity?: InsightSeverity | string; /** - *

- * The status of a reactive insight. - *

+ *

The status of a reactive insight.

*/ Status?: InsightStatus | string; @@ -2640,15 +2703,14 @@ export interface ReactiveInsightSummary { InsightTimeRange?: InsightTimeRange; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; /** - *

A collection of the names of AWS services.

+ *

A collection of the names of Amazon Web Services services.

*/ ServiceCollection?: ServiceCollection; } @@ -2664,16 +2726,12 @@ export namespace ReactiveInsightSummary { export interface ListInsightsResponse { /** - *

- * The returned list of proactive insights. - *

+ *

The returned list of proactive insights.

*/ ProactiveInsights?: ProactiveInsightSummary[]; /** - *

- * The returned list of reactive insights. - *

+ *

The returned list of reactive insights.

*/ ReactiveInsights?: ReactiveInsightSummary[]; @@ -2711,32 +2769,26 @@ export namespace ListNotificationChannelsRequest { } /** - *

- * Information about a notification channel. A notification channel is used to notify you when DevOps Guru creates an insight. - * The one - * supported notification channel is Amazon Simple Notification Service (Amazon SNS). - *

- * + *

Information about a notification channel. A notification channel is used to notify + * you when DevOps Guru creates an insight. The one + * supported notification channel is Amazon Simple Notification Service (Amazon SNS).

*

If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission * to it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. * For more information, see Permissions * for cross account Amazon SNS topics.

- *

If you use an Amazon SNS topic that is encrypted by an AWS Key Management Service customer-managed key (CMK), then you must add permissions + *

If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions * to the CMK. For more information, see Permissions for - * AWS KMS–encrypted Amazon SNS topics.

+ * Amazon Web Services KMS–encrypted Amazon SNS topics.

*/ export interface NotificationChannel { /** - *

- * The ID of a notification channel. - *

+ *

The ID of a notification channel.

*/ Id?: string; /** - *

- * A NotificationChannelConfig object that contains information about configured notification channels. - *

+ *

A NotificationChannelConfig object that contains information about + * configured notification channels.

*/ Config?: NotificationChannelConfig; } @@ -2752,9 +2804,7 @@ export namespace NotificationChannel { export interface ListNotificationChannelsResponse { /** - *

- * An array that contains the requested notification channels. - *

+ *

An array that contains the requested notification channels.

*/ Channels?: NotificationChannel[]; @@ -2774,6 +2824,206 @@ export namespace ListNotificationChannelsResponse { }); } +export interface ListOrganizationInsightsRequest { + /** + *

A filter used by ListInsights to specify which insights to return. + *

+ */ + StatusFilter: ListInsightsStatusFilter | undefined; + + /** + *

The maximum number of results to return with a single call. + * To retrieve the remaining results, make another call with the returned nextToken value.

+ */ + MaxResults?: number; + + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountIds?: string[]; + + /** + *

The ID of the organizational unit.

+ */ + OrganizationalUnitIds?: string[]; + + /** + *

The pagination token to use to retrieve + * the next page of results for this operation. If this value is null, it retrieves the first page.

+ */ + NextToken?: string; +} + +export namespace ListOrganizationInsightsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListOrganizationInsightsRequest): any => ({ + ...obj, + }); +} + +/** + *

Details about a proactive insight. This object is returned by + * DescribeInsight.

+ */ +export interface ProactiveOrganizationInsightSummary { + /** + *

The ID of the insight summary.

+ */ + Id?: string; + + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountId?: string; + + /** + *

The ID of the organizational unit.

+ */ + OrganizationalUnitId?: string; + + /** + *

The name of the insight summary.

+ */ + Name?: string; + + /** + *

An array of severity values used to search for insights.

+ */ + Severity?: InsightSeverity | string; + + /** + *

An array of status values used to search for insights.

+ */ + Status?: InsightStatus | string; + + /** + *

A time ranged that specifies when the observed behavior in an insight started and + * ended.

+ */ + InsightTimeRange?: InsightTimeRange; + + /** + *

The time range during which anomalous behavior in a proactive anomaly or an insight + * is expected to occur.

+ */ + PredictionTimeRange?: PredictionTimeRange; + + /** + *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

+ */ + ResourceCollection?: ResourceCollection; + + /** + *

A collection of the names of Amazon Web Services services.

+ */ + ServiceCollection?: ServiceCollection; +} + +export namespace ProactiveOrganizationInsightSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ProactiveOrganizationInsightSummary): any => ({ + ...obj, + }); +} + +/** + *

Information about a reactive insight. This object is returned by + * DescribeInsight.

+ */ +export interface ReactiveOrganizationInsightSummary { + /** + *

The ID of the insight summary.

+ */ + Id?: string; + + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountId?: string; + + /** + *

The ID of the organizational unit.

+ */ + OrganizationalUnitId?: string; + + /** + *

The name of the insight summary.

+ */ + Name?: string; + + /** + *

An array of severity values used to search for insights.

+ */ + Severity?: InsightSeverity | string; + + /** + *

An array of status values used to search for insights.

+ */ + Status?: InsightStatus | string; + + /** + *

A time ranged that specifies when the observed behavior in an insight started and + * ended.

+ */ + InsightTimeRange?: InsightTimeRange; + + /** + *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

+ */ + ResourceCollection?: ResourceCollection; + + /** + *

A collection of the names of Amazon Web Services services.

+ */ + ServiceCollection?: ServiceCollection; +} + +export namespace ReactiveOrganizationInsightSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ReactiveOrganizationInsightSummary): any => ({ + ...obj, + }); +} + +export interface ListOrganizationInsightsResponse { + /** + *

An integer that specifies the number of open proactive insights in your Amazon Web Services + * account.

+ */ + ProactiveInsights?: ProactiveOrganizationInsightSummary[]; + + /** + *

An integer that specifies the number of open reactive insights in your Amazon Web Services + * account.

+ */ + ReactiveInsights?: ReactiveOrganizationInsightSummary[]; + + /** + *

The pagination token to use to retrieve + * the next page of results for this operation. If there are no more pages, this value is null.

+ */ + NextToken?: string; +} + +export namespace ListOrganizationInsightsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListOrganizationInsightsResponse): any => ({ + ...obj, + }); +} + export enum Locale { DE_DE = "DE_DE", EN_GB = "EN_GB", @@ -2790,9 +3040,7 @@ export enum Locale { export interface ListRecommendationsRequest { /** - *

- * The ID of the requested insight. - *

+ *

The ID of the requested insight.

*/ InsightId: string | undefined; @@ -2806,6 +3054,11 @@ export interface ListRecommendationsRequest { *

A locale that specifies the language to use for recommendations.

*/ Locale?: Locale | string; + + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountId?: string; } export namespace ListRecommendationsRequest { @@ -2818,22 +3071,16 @@ export namespace ListRecommendationsRequest { } /** - *

- * Information about a resource in which DevOps Guru detected anomalous behavior. - *

+ *

Information about a resource in which DevOps Guru detected anomalous behavior.

*/ export interface RecommendationRelatedAnomalyResource { /** - *

- * The name of the resource. - *

+ *

The name of the resource.

*/ Name?: string; /** - *

- * The type of the resource. - *

+ *

The type of the resource.

*/ Type?: string; } @@ -2848,10 +3095,8 @@ export namespace RecommendationRelatedAnomalyResource { } /** - *

- * Information about an Amazon CloudWatch metric that is analyzed by DevOps Guru. It is one of many analyzed metrics - * that are used to generate insights. - *

+ *

Information about an Amazon CloudWatch metric that is analyzed by DevOps Guru. It is one of many + * analyzed metrics that are used to generate insights.

*/ export interface RecommendationRelatedCloudWatchMetricsSourceDetail { /** @@ -2875,10 +3120,8 @@ export namespace RecommendationRelatedCloudWatchMetricsSourceDetail { } /** - *

- * Contains an array of RecommendationRelatedCloudWatchMetricsSourceDetail objects that contain the name - * and namespace of an Amazon CloudWatch metric. - *

+ *

Contains an array of RecommendationRelatedCloudWatchMetricsSourceDetail + * objects that contain the name and namespace of an Amazon CloudWatch metric.

*/ export interface RecommendationRelatedAnomalySourceDetail { /** @@ -2898,23 +3141,18 @@ export namespace RecommendationRelatedAnomalySourceDetail { } /** - *

- * Information about an anomaly that is related to a recommendation. - *

+ *

Information about an anomaly that is related to a recommendation.

*/ export interface RecommendationRelatedAnomaly { /** - *

- * An array of objects that represent resources in which DevOps Guru detected anomalous behavior. Each object contains the name - * and type of the resource. - *

+ *

An array of objects that represent resources in which DevOps Guru detected anomalous + * behavior. Each object contains the name and type of the resource.

*/ Resources?: RecommendationRelatedAnomalyResource[]; /** - *

- * Information about where the anomalous behavior related the recommendation was found. For example, details in Amazon CloudWatch metrics. - *

+ *

Information about where the anomalous behavior related the recommendation was found. + * For example, details in Amazon CloudWatch metrics.

*/ SourceDetails?: RecommendationRelatedAnomalySourceDetail[]; } @@ -2929,24 +3167,19 @@ export namespace RecommendationRelatedAnomaly { } /** - *

- * Information about an AWS resource that emitted and event that is related to a recommendation in an insight. - *

+ *

Information about an Amazon Web Services resource that emitted and event that is related to a + * recommendation in an insight.

*/ export interface RecommendationRelatedEventResource { /** - *

- * The name of the resource that emitted the event. This corresponds to the Name field in an - * EventResource object. - *

+ *

The name of the resource that emitted the event. This corresponds to the + * Name field in an EventResource object.

*/ Name?: string; /** - *

- * The type of the resource that emitted the event. This corresponds to the Type field in an - * EventResource object. - *

+ *

The type of the resource that emitted the event. This corresponds to the + * Type field in an EventResource object.

*/ Type?: string; } @@ -2961,24 +3194,18 @@ export namespace RecommendationRelatedEventResource { } /** - *

- * Information about an event that is related to a recommendation. - *

+ *

Information about an event that is related to a recommendation.

*/ export interface RecommendationRelatedEvent { /** - *

- * The name of the event. This corresponds to the Name field in an - * Event object. - *

+ *

The name of the event. This corresponds to the Name field in an + * Event object.

*/ Name?: string; /** - *

- * A ResourceCollection object that contains arrays of the names of AWS - * CloudFormation stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A ResourceCollection object that contains arrays of the names of Amazon Web Services + * CloudFormation stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ Resources?: RecommendationRelatedEventResource[]; } @@ -2998,44 +3225,34 @@ export namespace RecommendationRelatedEvent { */ export interface Recommendation { /** - *

- * A description of the problem. - *

+ *

A description of the problem.

*/ Description?: string; /** - *

- * A hyperlink to information to help you address the problem. - *

+ *

A hyperlink to information to help you address the problem.

*/ Link?: string; /** - *

- * The name of the recommendation. - *

+ *

The name of the recommendation.

*/ Name?: string; /** - *

- * The reason DevOps Guru flagged the anomalous behavior as a problem. - *

+ *

The reason DevOps Guru flagged the anomalous behavior as a problem.

*/ Reason?: string; /** - *

- * Events that are related to the problem. Use these events to learn more about what's happening and to help address the issue. - *

+ *

Events that are related to the problem. Use these events to learn more about what's + * happening and to help address the issue.

*/ RelatedEvents?: RecommendationRelatedEvent[]; /** - *

- * Anomalies that are related to the problem. Use these Anomalies to learn more about what's happening and to help address the issue. - *

+ *

Anomalies that are related to the problem. Use these Anomalies to learn more about + * what's happening and to help address the issue.

*/ RelatedAnomalies?: RecommendationRelatedAnomaly[]; } @@ -3051,9 +3268,7 @@ export namespace Recommendation { export interface ListRecommendationsResponse { /** - *

- * An array of the requested recommendations. - *

+ *

An array of the requested recommendations.

*/ Recommendations?: Recommendation[]; @@ -3075,9 +3290,7 @@ export namespace ListRecommendationsResponse { export interface PutFeedbackRequest { /** - *

- * The feedback from customers is about the recommendations in this insight. - *

+ *

The feedback from customers is about the recommendations in this insight.

*/ InsightFeedback?: InsightFeedback; } @@ -3104,9 +3317,7 @@ export namespace PutFeedbackResponse { export interface RemoveNotificationChannelRequest { /** - *

- * The ID of the notification channel to be removed. - *

+ *

The ID of the notification channel to be removed.

*/ Id: string | undefined; } @@ -3132,36 +3343,29 @@ export namespace RemoveNotificationChannelResponse { } /** - *

- * Specifies one or more severity values and one or more status values that are used to search - * for insights. - *

+ *

Specifies one or more severity values and one or more status values that are used to + * search for insights.

*/ export interface SearchInsightsFilters { /** - *

- * An array of severity values used to search for insights. - *

+ *

An array of severity values used to search for insights.

*/ Severities?: (InsightSeverity | string)[]; /** - *

- * An array of status values used to search for insights. - *

+ *

An array of status values used to search for insights.

*/ Statuses?: (InsightStatus | string)[]; /** - *

- * A collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze - * only the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ ResourceCollection?: ResourceCollection; /** - *

A collection of the names of AWS services.

+ *

A collection of the names of Amazon Web Services services.

*/ ServiceCollection?: ServiceCollection; } @@ -3177,16 +3381,14 @@ export namespace SearchInsightsFilters { export interface SearchInsightsRequest { /** - *

- * The start of the time range passed in. Returned insights occurred after this time. - *

+ *

The start of the time range passed in. Returned insights occurred after this time. + *

*/ StartTimeRange: StartTimeRange | undefined; /** - *

- * A SearchInsightsFilters object that is used to set the severity and status filters on your insight search. - *

+ *

A SearchInsightsFilters object that is used to set the severity and + * status filters on your insight search.

*/ Filters?: SearchInsightsFilters; @@ -3203,9 +3405,8 @@ export interface SearchInsightsRequest { NextToken?: string; /** - *

- * The type of insights you are searching for (REACTIVE or PROACTIVE). - *

+ *

The type of insights you are searching for (REACTIVE or + * PROACTIVE).

*/ Type: InsightType | string | undefined; } @@ -3221,16 +3422,12 @@ export namespace SearchInsightsRequest { export interface SearchInsightsResponse { /** - *

- * The returned proactive insights. - *

+ *

The returned proactive insights.

*/ ProactiveInsights?: ProactiveInsightSummary[]; /** - *

- * The returned reactive insights. - *

+ *

The returned reactive insights.

*/ ReactiveInsights?: ReactiveInsightSummary[]; @@ -3250,9 +3447,121 @@ export namespace SearchInsightsResponse { }); } +/** + *

Filters you can use to specify which events are returned when ListEvents + * is called.

+ */ +export interface SearchOrganizationInsightsFilters { + /** + *

An array of severity values used to search for insights.

+ */ + Severities?: (InsightSeverity | string)[]; + + /** + *

An array of status values used to search for insights.

+ */ + Statuses?: (InsightStatus | string)[]; + + /** + *

A collection of Amazon Web Services resources supported by DevOps Guru. + * The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze + * only the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

+ */ + ResourceCollection?: ResourceCollection; + + /** + *

A collection of the names of Amazon Web Services services.

+ */ + ServiceCollection?: ServiceCollection; +} + +export namespace SearchOrganizationInsightsFilters { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchOrganizationInsightsFilters): any => ({ + ...obj, + }); +} + +export interface SearchOrganizationInsightsRequest { + /** + *

The ID of the Amazon Web Services account.

+ */ + AccountIds: string[] | undefined; + + /** + *

A time range used to specify when the behavior of an insight or anomaly started. + *

+ */ + StartTimeRange: StartTimeRange | undefined; + + /** + *

A SearchOrganizationInsightsFilters object that is used to set the + * severity and status filters on your insight search.

+ */ + Filters?: SearchOrganizationInsightsFilters; + + /** + *

The maximum number of results to return with a single call. + * To retrieve the remaining results, make another call with the returned nextToken value.

+ */ + MaxResults?: number; + + /** + *

The pagination token to use to retrieve + * the next page of results for this operation. If this value is null, it retrieves the first page.

+ */ + NextToken?: string; + + /** + *

The type of insights you are searching for (REACTIVE or + * PROACTIVE).

+ */ + Type: InsightType | string | undefined; +} + +export namespace SearchOrganizationInsightsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchOrganizationInsightsRequest): any => ({ + ...obj, + }); +} + +export interface SearchOrganizationInsightsResponse { + /** + *

An integer that specifies the number of open proactive insights in your Amazon Web Services + * account.

+ */ + ProactiveInsights?: ProactiveInsightSummary[]; + + /** + *

An integer that specifies the number of open reactive insights in your Amazon Web Services + * account.

+ */ + ReactiveInsights?: ReactiveInsightSummary[]; + + /** + *

The pagination token to use to retrieve + * the next page of results for this operation. If there are no more pages, this value is null.

+ */ + NextToken?: string; +} + +export namespace SearchOrganizationInsightsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchOrganizationInsightsResponse): any => ({ + ...obj, + }); +} + export interface StartCostEstimationRequest { /** - *

The collection of AWS resources used to create a monthly DevOps Guru cost estimate.

+ *

The collection of Amazon Web Services resources used to create a monthly DevOps Guru cost estimate.

*/ ResourceCollection: CostEstimationResourceCollectionFilter | undefined; @@ -3288,12 +3597,12 @@ export enum UpdateResourceCollectionAction { } /** - *

Contains the names of AWS CloudFormation stacks used to update a collection of stacks. You can specify up to 500 AWS CloudFormation stacks.

+ *

Contains the names of Amazon Web Services CloudFormation stacks used to update a collection of stacks. + * You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ export interface UpdateCloudFormationCollectionFilter { /** - *

- * An array of the names of the AWS CloudFormation stacks to update. You can specify up to 500 AWS CloudFormation stacks. + *

An array of the names of the Amazon Web Services CloudFormation stacks to update. You can specify up to 500 Amazon Web Services CloudFormation stacks. *

*/ StackNames?: string[]; @@ -3309,15 +3618,11 @@ export namespace UpdateCloudFormationCollectionFilter { } /** - *

- * Contains information used to update a collection of AWS resources. - *

+ *

Contains information used to update a collection of Amazon Web Services resources.

*/ export interface UpdateResourceCollectionFilter { /** - *

- * An collection of AWS CloudFormation stacks. You can specify up to 500 AWS CloudFormation stacks. - *

+ *

An collection of Amazon Web Services CloudFormation stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

*/ CloudFormation?: UpdateCloudFormationCollectionFilter; } @@ -3333,16 +3638,13 @@ export namespace UpdateResourceCollectionFilter { export interface UpdateResourceCollectionRequest { /** - *

- * Specifies if the resource collection in the request is added or deleted to the resource collection. - *

+ *

Specifies if the resource collection in the request is added or deleted to the + * resource collection.

*/ Action: UpdateResourceCollectionAction | string | undefined; /** - *

- * Contains information used to update a collection of AWS resources. - *

+ *

Contains information used to update a collection of Amazon Web Services resources.

*/ ResourceCollection: UpdateResourceCollectionFilter | undefined; } @@ -3368,15 +3670,13 @@ export namespace UpdateResourceCollectionResponse { } /** - *

- * Information about whether DevOps Guru is configured to create an OpsItem in AWS Systems Manager OpsCenter for each created insight. - *

+ *

Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager + * OpsCenter for each created insight.

*/ export interface OpsCenterIntegrationConfig { /** - *

- * Specifies if DevOps Guru is enabled to create an AWS Systems Manager OpsItem for each created insight. - *

+ *

Specifies if DevOps Guru is enabled to create an Amazon Web Services Systems Manager OpsItem for each created + * insight.

*/ OptInStatus?: OptInStatus | string; } @@ -3391,15 +3691,13 @@ export namespace OpsCenterIntegrationConfig { } /** - *

- * Information about updating the integration status of an AWS service, such as AWS Systems Manager, with DevOps Guru. - *

+ *

Information about updating the integration status of an Amazon Web Services service, such as + * Amazon Web Services Systems Manager, with DevOps Guru.

*/ export interface UpdateServiceIntegrationConfig { /** - *

- * Information about whether DevOps Guru is configured to create an OpsItem in AWS Systems Manager OpsCenter for each created insight. - *

+ *

Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager + * OpsCenter for each created insight.

*/ OpsCenter?: OpsCenterIntegrationConfig; } @@ -3415,10 +3713,8 @@ export namespace UpdateServiceIntegrationConfig { export interface UpdateServiceIntegrationRequest { /** - *

- * An IntegratedServiceConfig object used to specify the integrated service you want to update, and whether you - * want to update it to enabled or disabled. - *

+ *

An IntegratedServiceConfig object used to specify the integrated service + * you want to update, and whether you want to update it to enabled or disabled.

*/ ServiceIntegration: UpdateServiceIntegrationConfig | undefined; } diff --git a/clients/client-devops-guru/src/pagination/DescribeOrganizationResourceCollectionHealthPaginator.ts b/clients/client-devops-guru/src/pagination/DescribeOrganizationResourceCollectionHealthPaginator.ts new file mode 100644 index 000000000000..dc32b5719f84 --- /dev/null +++ b/clients/client-devops-guru/src/pagination/DescribeOrganizationResourceCollectionHealthPaginator.ts @@ -0,0 +1,58 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + DescribeOrganizationResourceCollectionHealthCommand, + DescribeOrganizationResourceCollectionHealthCommandInput, + DescribeOrganizationResourceCollectionHealthCommandOutput, +} from "../commands/DescribeOrganizationResourceCollectionHealthCommand"; +import { DevOpsGuru } from "../DevOpsGuru"; +import { DevOpsGuruClient } from "../DevOpsGuruClient"; +import { DevOpsGuruPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DevOpsGuruClient, + input: DescribeOrganizationResourceCollectionHealthCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new DescribeOrganizationResourceCollectionHealthCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: DevOpsGuru, + input: DescribeOrganizationResourceCollectionHealthCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.describeOrganizationResourceCollectionHealth(input, ...args); +}; +export async function* paginateDescribeOrganizationResourceCollectionHealth( + config: DevOpsGuruPaginationConfiguration, + input: DescribeOrganizationResourceCollectionHealthCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: DescribeOrganizationResourceCollectionHealthCommandOutput; + while (hasNext) { + input.NextToken = token; + if (config.client instanceof DevOpsGuru) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DevOpsGuruClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected DevOpsGuru | DevOpsGuruClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-devops-guru/src/pagination/ListOrganizationInsightsPaginator.ts b/clients/client-devops-guru/src/pagination/ListOrganizationInsightsPaginator.ts new file mode 100644 index 000000000000..d8727c687eed --- /dev/null +++ b/clients/client-devops-guru/src/pagination/ListOrganizationInsightsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListOrganizationInsightsCommand, + ListOrganizationInsightsCommandInput, + ListOrganizationInsightsCommandOutput, +} from "../commands/ListOrganizationInsightsCommand"; +import { DevOpsGuru } from "../DevOpsGuru"; +import { DevOpsGuruClient } from "../DevOpsGuruClient"; +import { DevOpsGuruPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DevOpsGuruClient, + input: ListOrganizationInsightsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListOrganizationInsightsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: DevOpsGuru, + input: ListOrganizationInsightsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listOrganizationInsights(input, ...args); +}; +export async function* paginateListOrganizationInsights( + config: DevOpsGuruPaginationConfiguration, + input: ListOrganizationInsightsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListOrganizationInsightsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof DevOpsGuru) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DevOpsGuruClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected DevOpsGuru | DevOpsGuruClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-devops-guru/src/pagination/SearchOrganizationInsightsPaginator.ts b/clients/client-devops-guru/src/pagination/SearchOrganizationInsightsPaginator.ts new file mode 100644 index 000000000000..bbbea2f9d244 --- /dev/null +++ b/clients/client-devops-guru/src/pagination/SearchOrganizationInsightsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + SearchOrganizationInsightsCommand, + SearchOrganizationInsightsCommandInput, + SearchOrganizationInsightsCommandOutput, +} from "../commands/SearchOrganizationInsightsCommand"; +import { DevOpsGuru } from "../DevOpsGuru"; +import { DevOpsGuruClient } from "../DevOpsGuruClient"; +import { DevOpsGuruPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DevOpsGuruClient, + input: SearchOrganizationInsightsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new SearchOrganizationInsightsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: DevOpsGuru, + input: SearchOrganizationInsightsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.searchOrganizationInsights(input, ...args); +}; +export async function* paginateSearchOrganizationInsights( + config: DevOpsGuruPaginationConfiguration, + input: SearchOrganizationInsightsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: SearchOrganizationInsightsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof DevOpsGuru) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DevOpsGuruClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected DevOpsGuru | DevOpsGuruClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-devops-guru/src/pagination/index.ts b/clients/client-devops-guru/src/pagination/index.ts index f8e59ab8b352..4684acbfe9a7 100644 --- a/clients/client-devops-guru/src/pagination/index.ts +++ b/clients/client-devops-guru/src/pagination/index.ts @@ -1,3 +1,4 @@ +export * from "./DescribeOrganizationResourceCollectionHealthPaginator"; export * from "./DescribeResourceCollectionHealthPaginator"; export * from "./GetCostEstimationPaginator"; export * from "./GetResourceCollectionPaginator"; @@ -6,5 +7,7 @@ export * from "./ListAnomaliesForInsightPaginator"; export * from "./ListEventsPaginator"; export * from "./ListInsightsPaginator"; export * from "./ListNotificationChannelsPaginator"; +export * from "./ListOrganizationInsightsPaginator"; export * from "./ListRecommendationsPaginator"; export * from "./SearchInsightsPaginator"; +export * from "./SearchOrganizationInsightsPaginator"; diff --git a/clients/client-devops-guru/src/protocols/Aws_restJson1.ts b/clients/client-devops-guru/src/protocols/Aws_restJson1.ts index a879a2817db7..8e56f1ed1f1f 100644 --- a/clients/client-devops-guru/src/protocols/Aws_restJson1.ts +++ b/clients/client-devops-guru/src/protocols/Aws_restJson1.ts @@ -35,6 +35,18 @@ import { import { DescribeAnomalyCommandInput, DescribeAnomalyCommandOutput } from "../commands/DescribeAnomalyCommand"; import { DescribeFeedbackCommandInput, DescribeFeedbackCommandOutput } from "../commands/DescribeFeedbackCommand"; import { DescribeInsightCommandInput, DescribeInsightCommandOutput } from "../commands/DescribeInsightCommand"; +import { + DescribeOrganizationHealthCommandInput, + DescribeOrganizationHealthCommandOutput, +} from "../commands/DescribeOrganizationHealthCommand"; +import { + DescribeOrganizationOverviewCommandInput, + DescribeOrganizationOverviewCommandOutput, +} from "../commands/DescribeOrganizationOverviewCommand"; +import { + DescribeOrganizationResourceCollectionHealthCommandInput, + DescribeOrganizationResourceCollectionHealthCommandOutput, +} from "../commands/DescribeOrganizationResourceCollectionHealthCommand"; import { DescribeResourceCollectionHealthCommandInput, DescribeResourceCollectionHealthCommandOutput, @@ -58,6 +70,10 @@ import { ListNotificationChannelsCommandInput, ListNotificationChannelsCommandOutput, } from "../commands/ListNotificationChannelsCommand"; +import { + ListOrganizationInsightsCommandInput, + ListOrganizationInsightsCommandOutput, +} from "../commands/ListOrganizationInsightsCommand"; import { ListRecommendationsCommandInput, ListRecommendationsCommandOutput, @@ -68,6 +84,10 @@ import { RemoveNotificationChannelCommandOutput, } from "../commands/RemoveNotificationChannelCommand"; import { SearchInsightsCommandInput, SearchInsightsCommandOutput } from "../commands/SearchInsightsCommand"; +import { + SearchOrganizationInsightsCommandInput, + SearchOrganizationInsightsCommandOutput, +} from "../commands/SearchOrganizationInsightsCommand"; import { StartCostEstimationCommandInput, StartCostEstimationCommandOutput, @@ -82,6 +102,8 @@ import { } from "../commands/UpdateServiceIntegrationCommand"; import { AccessDeniedException, + AccountHealth, + AccountInsightHealth, AnomalyReportedTimeRange, AnomalySourceDetails, AnomalyTimeRange, @@ -89,6 +111,7 @@ import { CloudFormationCollectionFilter, CloudFormationCostEstimationResourceCollectionFilter, CloudFormationHealth, + CloudWatchMetricsDataSummary, CloudWatchMetricsDetail, CloudWatchMetricsDimension, ConflictException, @@ -118,10 +141,12 @@ import { ProactiveAnomalySummary, ProactiveInsight, ProactiveInsightSummary, + ProactiveOrganizationInsightSummary, ReactiveAnomaly, ReactiveAnomalySummary, ReactiveInsight, ReactiveInsightSummary, + ReactiveOrganizationInsightSummary, Recommendation, RecommendationRelatedAnomaly, RecommendationRelatedAnomalyResource, @@ -133,6 +158,7 @@ import { ResourceCollectionFilter, ResourceNotFoundException, SearchInsightsFilters, + SearchOrganizationInsightsFilters, ServiceCollection, ServiceHealth, ServiceInsightHealth, @@ -143,6 +169,7 @@ import { SnsChannelConfig, StartTimeRange, ThrottlingException, + TimestampMetricValuePair, UpdateCloudFormationCollectionFilter, UpdateResourceCollectionFilter, UpdateServiceIntegrationConfig, @@ -239,6 +266,9 @@ export const serializeAws_restJson1DescribeAnomalyCommand = async ( } else { throw new Error("No value provided for input HTTP label: Id."); } + const query: any = { + ...(input.AccountId !== undefined && { AccountId: input.AccountId }), + }; let body: any; return new __HttpRequest({ protocol, @@ -247,6 +277,7 @@ export const serializeAws_restJson1DescribeAnomalyCommand = async ( method: "GET", headers, path: resolvedPath, + query, body, }); }; @@ -291,6 +322,9 @@ export const serializeAws_restJson1DescribeInsightCommand = async ( } else { throw new Error("No value provided for input HTTP label: Id."); } + const query: any = { + ...(input.AccountId !== undefined && { AccountId: input.AccountId }), + }; let body: any; return new __HttpRequest({ protocol, @@ -299,6 +333,104 @@ export const serializeAws_restJson1DescribeInsightCommand = async ( method: "GET", headers, path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1DescribeOrganizationHealthCommand = async ( + input: DescribeOrganizationHealthCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health"; + let body: any; + body = JSON.stringify({ + ...(input.AccountIds !== undefined && + input.AccountIds !== null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }), + ...(input.OrganizationalUnitIds !== undefined && + input.OrganizationalUnitIds !== null && { + OrganizationalUnitIds: serializeAws_restJson1OrganizationalUnitIdList(input.OrganizationalUnitIds, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DescribeOrganizationOverviewCommand = async ( + input: DescribeOrganizationOverviewCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/overview"; + let body: any; + body = JSON.stringify({ + ...(input.AccountIds !== undefined && + input.AccountIds !== null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }), + ...(input.FromTime !== undefined && + input.FromTime !== null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }), + ...(input.OrganizationalUnitIds !== undefined && + input.OrganizationalUnitIds !== null && { + OrganizationalUnitIds: serializeAws_restJson1OrganizationalUnitIdList(input.OrganizationalUnitIds, context), + }), + ...(input.ToTime !== undefined && input.ToTime !== null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = async ( + input: DescribeOrganizationResourceCollectionHealthCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health/resource-collection"; + let body: any; + body = JSON.stringify({ + ...(input.AccountIds !== undefined && + input.AccountIds !== null && { AccountIds: serializeAws_restJson1AccountIdList(input.AccountIds, context) }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.OrganizationResourceCollectionType !== undefined && + input.OrganizationResourceCollectionType !== null && { + OrganizationResourceCollectionType: input.OrganizationResourceCollectionType, + }), + ...(input.OrganizationalUnitIds !== undefined && + input.OrganizationalUnitIds !== null && { + OrganizationalUnitIds: serializeAws_restJson1OrganizationalUnitIdList(input.OrganizationalUnitIds, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, body, }); }; @@ -437,6 +569,7 @@ export const serializeAws_restJson1ListAnomaliesForInsightCommand = async ( } let body: any; body = JSON.stringify({ + ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }), ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), ...(input.StartTimeRange !== undefined && @@ -466,6 +599,7 @@ export const serializeAws_restJson1ListEventsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/events"; let body: any; body = JSON.stringify({ + ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }), ...(input.Filters !== undefined && input.Filters !== null && { Filters: serializeAws_restJson1ListEventsFilters(input.Filters, context) }), ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), @@ -535,6 +669,46 @@ export const serializeAws_restJson1ListNotificationChannelsCommand = async ( }); }; +export const serializeAws_restJson1ListOrganizationInsightsCommand = async ( + input: ListOrganizationInsightsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights"; + let body: any; + body = JSON.stringify({ + ...(input.AccountIds !== undefined && + input.AccountIds !== null && { + AccountIds: serializeAws_restJson1ListInsightsAccountIdList(input.AccountIds, context), + }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.OrganizationalUnitIds !== undefined && + input.OrganizationalUnitIds !== null && { + OrganizationalUnitIds: serializeAws_restJson1ListInsightsOrganizationalUnitIdList( + input.OrganizationalUnitIds, + context + ), + }), + ...(input.StatusFilter !== undefined && + input.StatusFilter !== null && { + StatusFilter: serializeAws_restJson1ListInsightsStatusFilter(input.StatusFilter, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1ListRecommendationsCommand = async ( input: ListRecommendationsCommandInput, context: __SerdeContext @@ -546,6 +720,7 @@ export const serializeAws_restJson1ListRecommendationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recommendations"; let body: any; body = JSON.stringify({ + ...(input.AccountId !== undefined && input.AccountId !== null && { AccountId: input.AccountId }), ...(input.InsightId !== undefined && input.InsightId !== null && { InsightId: input.InsightId }), ...(input.Locale !== undefined && input.Locale !== null && { Locale: input.Locale }), ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), @@ -648,6 +823,45 @@ export const serializeAws_restJson1SearchInsightsCommand = async ( }); }; +export const serializeAws_restJson1SearchOrganizationInsightsCommand = async ( + input: SearchOrganizationInsightsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights/search"; + let body: any; + body = JSON.stringify({ + ...(input.AccountIds !== undefined && + input.AccountIds !== null && { + AccountIds: serializeAws_restJson1SearchInsightsAccountIdList(input.AccountIds, context), + }), + ...(input.Filters !== undefined && + input.Filters !== null && { + Filters: serializeAws_restJson1SearchOrganizationInsightsFilters(input.Filters, context), + }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.StartTimeRange !== undefined && + input.StartTimeRange !== null && { + StartTimeRange: serializeAws_restJson1StartTimeRange(input.StartTimeRange, context), + }), + ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1StartCostEstimationCommand = async ( input: StartCostEstimationCommandInput, context: __SerdeContext @@ -1284,36 +1498,40 @@ const deserializeAws_restJson1DescribeInsightCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DescribeResourceCollectionHealthCommand = async ( +export const deserializeAws_restJson1DescribeOrganizationHealthCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1DescribeResourceCollectionHealthCommandError(output, context); + return deserializeAws_restJson1DescribeOrganizationHealthCommandError(output, context); } - const contents: DescribeResourceCollectionHealthCommandOutput = { + const contents: DescribeOrganizationHealthCommandOutput = { $metadata: deserializeMetadata(output), - CloudFormation: undefined, - NextToken: undefined, - Service: undefined, + MetricsAnalyzed: undefined, + OpenProactiveInsights: undefined, + OpenReactiveInsights: undefined, + ResourceHours: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CloudFormation !== undefined && data.CloudFormation !== null) { - contents.CloudFormation = deserializeAws_restJson1CloudFormationHealths(data.CloudFormation, context); + if (data.MetricsAnalyzed !== undefined && data.MetricsAnalyzed !== null) { + contents.MetricsAnalyzed = __expectInt32(data.MetricsAnalyzed); } - if (data.NextToken !== undefined && data.NextToken !== null) { - contents.NextToken = __expectString(data.NextToken); + if (data.OpenProactiveInsights !== undefined && data.OpenProactiveInsights !== null) { + contents.OpenProactiveInsights = __expectInt32(data.OpenProactiveInsights); } - if (data.Service !== undefined && data.Service !== null) { - contents.Service = deserializeAws_restJson1ServiceHealths(data.Service, context); + if (data.OpenReactiveInsights !== undefined && data.OpenReactiveInsights !== null) { + contents.OpenReactiveInsights = __expectInt32(data.OpenReactiveInsights); + } + if (data.ResourceHours !== undefined && data.ResourceHours !== null) { + contents.ResourceHours = __expectLong(data.ResourceHours); } return Promise.resolve(contents); }; -const deserializeAws_restJson1DescribeResourceCollectionHealthCommandError = async ( +const deserializeAws_restJson1DescribeOrganizationHealthCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -1371,28 +1589,32 @@ const deserializeAws_restJson1DescribeResourceCollectionHealthCommandError = asy return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DescribeServiceIntegrationCommand = async ( +export const deserializeAws_restJson1DescribeOrganizationOverviewCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1DescribeServiceIntegrationCommandError(output, context); + return deserializeAws_restJson1DescribeOrganizationOverviewCommandError(output, context); } - const contents: DescribeServiceIntegrationCommandOutput = { + const contents: DescribeOrganizationOverviewCommandOutput = { $metadata: deserializeMetadata(output), - ServiceIntegration: undefined, + ProactiveInsights: undefined, + ReactiveInsights: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ServiceIntegration !== undefined && data.ServiceIntegration !== null) { - contents.ServiceIntegration = deserializeAws_restJson1ServiceIntegrationConfig(data.ServiceIntegration, context); + if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) { + contents.ProactiveInsights = __expectInt32(data.ProactiveInsights); + } + if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) { + contents.ReactiveInsights = __expectInt32(data.ReactiveInsights); } return Promise.resolve(contents); }; -const deserializeAws_restJson1DescribeServiceIntegrationCommandError = async ( +const deserializeAws_restJson1DescribeOrganizationOverviewCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -1450,51 +1672,40 @@ const deserializeAws_restJson1DescribeServiceIntegrationCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetCostEstimationCommand = async ( +export const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetCostEstimationCommandError(output, context); + return deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommandError(output, context); } - const contents: GetCostEstimationCommandOutput = { + const contents: DescribeOrganizationResourceCollectionHealthCommandOutput = { $metadata: deserializeMetadata(output), - Costs: undefined, + Account: undefined, + CloudFormation: undefined, NextToken: undefined, - ResourceCollection: undefined, - Status: undefined, - TimeRange: undefined, - TotalCost: undefined, + Service: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Costs !== undefined && data.Costs !== null) { - contents.Costs = deserializeAws_restJson1ServiceResourceCosts(data.Costs, context); + if (data.Account !== undefined && data.Account !== null) { + contents.Account = deserializeAws_restJson1AccountHealths(data.Account, context); + } + if (data.CloudFormation !== undefined && data.CloudFormation !== null) { + contents.CloudFormation = deserializeAws_restJson1CloudFormationHealths(data.CloudFormation, context); } if (data.NextToken !== undefined && data.NextToken !== null) { contents.NextToken = __expectString(data.NextToken); } - if (data.ResourceCollection !== undefined && data.ResourceCollection !== null) { - contents.ResourceCollection = deserializeAws_restJson1CostEstimationResourceCollectionFilter( - data.ResourceCollection, - context - ); - } - if (data.Status !== undefined && data.Status !== null) { - contents.Status = __expectString(data.Status); - } - if (data.TimeRange !== undefined && data.TimeRange !== null) { - contents.TimeRange = deserializeAws_restJson1CostEstimationTimeRange(data.TimeRange, context); - } - if (data.TotalCost !== undefined && data.TotalCost !== null) { - contents.TotalCost = __limitedParseDouble(data.TotalCost); + if (data.Service !== undefined && data.Service !== null) { + contents.Service = deserializeAws_restJson1ServiceHealths(data.Service, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetCostEstimationCommandError = async ( +const deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -1519,14 +1730,6 @@ const deserializeAws_restJson1GetCostEstimationCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.devopsguru#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.devopsguru#ThrottlingException": response = { @@ -1560,32 +1763,36 @@ const deserializeAws_restJson1GetCostEstimationCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetResourceCollectionCommand = async ( +export const deserializeAws_restJson1DescribeResourceCollectionHealthCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetResourceCollectionCommandError(output, context); + return deserializeAws_restJson1DescribeResourceCollectionHealthCommandError(output, context); } - const contents: GetResourceCollectionCommandOutput = { + const contents: DescribeResourceCollectionHealthCommandOutput = { $metadata: deserializeMetadata(output), + CloudFormation: undefined, NextToken: undefined, - ResourceCollection: undefined, + Service: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.CloudFormation !== undefined && data.CloudFormation !== null) { + contents.CloudFormation = deserializeAws_restJson1CloudFormationHealths(data.CloudFormation, context); + } if (data.NextToken !== undefined && data.NextToken !== null) { contents.NextToken = __expectString(data.NextToken); } - if (data.ResourceCollection !== undefined && data.ResourceCollection !== null) { - contents.ResourceCollection = deserializeAws_restJson1ResourceCollectionFilter(data.ResourceCollection, context); + if (data.Service !== undefined && data.Service !== null) { + contents.Service = deserializeAws_restJson1ServiceHealths(data.Service, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetResourceCollectionCommandError = async ( +const deserializeAws_restJson1DescribeResourceCollectionHealthCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -1610,14 +1817,286 @@ const deserializeAws_restJson1GetResourceCollectionCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.devopsguru#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; + case "ThrottlingException": + case "com.amazonaws.devopsguru#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.devopsguru#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeServiceIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeServiceIntegrationCommandError(output, context); + } + const contents: DescribeServiceIntegrationCommandOutput = { + $metadata: deserializeMetadata(output), + ServiceIntegration: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.ServiceIntegration !== undefined && data.ServiceIntegration !== null) { + contents.ServiceIntegration = deserializeAws_restJson1ServiceIntegrationConfig(data.ServiceIntegration, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeServiceIntegrationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.devopsguru#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.devopsguru#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.devopsguru#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.devopsguru#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetCostEstimationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetCostEstimationCommandError(output, context); + } + const contents: GetCostEstimationCommandOutput = { + $metadata: deserializeMetadata(output), + Costs: undefined, + NextToken: undefined, + ResourceCollection: undefined, + Status: undefined, + TimeRange: undefined, + TotalCost: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Costs !== undefined && data.Costs !== null) { + contents.Costs = deserializeAws_restJson1ServiceResourceCosts(data.Costs, context); + } + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + if (data.ResourceCollection !== undefined && data.ResourceCollection !== null) { + contents.ResourceCollection = deserializeAws_restJson1CostEstimationResourceCollectionFilter( + data.ResourceCollection, + context + ); + } + if (data.Status !== undefined && data.Status !== null) { + contents.Status = __expectString(data.Status); + } + if (data.TimeRange !== undefined && data.TimeRange !== null) { + contents.TimeRange = deserializeAws_restJson1CostEstimationTimeRange(data.TimeRange, context); + } + if (data.TotalCost !== undefined && data.TotalCost !== null) { + contents.TotalCost = __limitedParseDouble(data.TotalCost); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetCostEstimationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.devopsguru#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.devopsguru#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.devopsguru#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.devopsguru#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.devopsguru#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetResourceCollectionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetResourceCollectionCommandError(output, context); + } + const contents: GetResourceCollectionCommandOutput = { + $metadata: deserializeMetadata(output), + NextToken: undefined, + ResourceCollection: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + if (data.ResourceCollection !== undefined && data.ResourceCollection !== null) { + contents.ResourceCollection = deserializeAws_restJson1ResourceCollectionFilter(data.ResourceCollection, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetResourceCollectionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.devopsguru#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.devopsguru#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.devopsguru#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.devopsguru#ThrottlingException": response = { @@ -2007,6 +2486,93 @@ const deserializeAws_restJson1ListNotificationChannelsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1ListOrganizationInsightsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListOrganizationInsightsCommandError(output, context); + } + const contents: ListOrganizationInsightsCommandOutput = { + $metadata: deserializeMetadata(output), + NextToken: undefined, + ProactiveInsights: undefined, + ReactiveInsights: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) { + contents.ProactiveInsights = deserializeAws_restJson1ProactiveOrganizationInsights(data.ProactiveInsights, context); + } + if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) { + contents.ReactiveInsights = deserializeAws_restJson1ReactiveOrganizationInsights(data.ReactiveInsights, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListOrganizationInsightsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.devopsguru#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.devopsguru#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.devopsguru#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.devopsguru#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1ListRecommendationsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -2032,7 +2598,90 @@ export const deserializeAws_restJson1ListRecommendationsCommand = async ( const deserializeAws_restJson1ListRecommendationsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.devopsguru#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.devopsguru#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.devopsguru#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.devopsguru#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.devopsguru#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1PutFeedbackCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1PutFeedbackCommandError(output, context); + } + const contents: PutFeedbackCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1PutFeedbackCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2049,6 +2698,14 @@ const deserializeAws_restJson1ListRecommendationsCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ConflictException": + case "com.amazonaws.devopsguru#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.devopsguru#InternalServerException": response = { @@ -2098,24 +2755,24 @@ const deserializeAws_restJson1ListRecommendationsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1PutFeedbackCommand = async ( +export const deserializeAws_restJson1RemoveNotificationChannelCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1PutFeedbackCommandError(output, context); + return deserializeAws_restJson1RemoveNotificationChannelCommandError(output, context); } - const contents: PutFeedbackCommandOutput = { + const contents: RemoveNotificationChannelCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1PutFeedbackCommandError = async ( +const deserializeAws_restJson1RemoveNotificationChannelCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2189,24 +2846,36 @@ const deserializeAws_restJson1PutFeedbackCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1RemoveNotificationChannelCommand = async ( +export const deserializeAws_restJson1SearchInsightsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1RemoveNotificationChannelCommandError(output, context); + return deserializeAws_restJson1SearchInsightsCommandError(output, context); } - const contents: RemoveNotificationChannelCommandOutput = { + const contents: SearchInsightsCommandOutput = { $metadata: deserializeMetadata(output), + NextToken: undefined, + ProactiveInsights: undefined, + ReactiveInsights: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + if (data.ProactiveInsights !== undefined && data.ProactiveInsights !== null) { + contents.ProactiveInsights = deserializeAws_restJson1ProactiveInsights(data.ProactiveInsights, context); + } + if (data.ReactiveInsights !== undefined && data.ReactiveInsights !== null) { + contents.ReactiveInsights = deserializeAws_restJson1ReactiveInsights(data.ReactiveInsights, context); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1RemoveNotificationChannelCommandError = async ( +const deserializeAws_restJson1SearchInsightsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2223,14 +2892,6 @@ const deserializeAws_restJson1RemoveNotificationChannelCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.devopsguru#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.devopsguru#InternalServerException": response = { @@ -2239,14 +2900,6 @@ const deserializeAws_restJson1RemoveNotificationChannelCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.devopsguru#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.devopsguru#ThrottlingException": response = { @@ -2280,14 +2933,14 @@ const deserializeAws_restJson1RemoveNotificationChannelCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1SearchInsightsCommand = async ( +export const deserializeAws_restJson1SearchOrganizationInsightsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1SearchInsightsCommandError(output, context); + return deserializeAws_restJson1SearchOrganizationInsightsCommandError(output, context); } - const contents: SearchInsightsCommandOutput = { + const contents: SearchOrganizationInsightsCommandOutput = { $metadata: deserializeMetadata(output), NextToken: undefined, ProactiveInsights: undefined, @@ -2306,10 +2959,10 @@ export const deserializeAws_restJson1SearchInsightsCommand = async ( return Promise.resolve(contents); }; -const deserializeAws_restJson1SearchInsightsCommandError = async ( +const deserializeAws_restJson1SearchOrganizationInsightsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2783,6 +3436,17 @@ const deserializeAws_restJson1ValidationExceptionResponse = async ( return contents; }; +const serializeAws_restJson1AccountIdList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1CloudFormationCollection = ( input: CloudFormationCollection, context: __SerdeContext @@ -2893,6 +3557,17 @@ const serializeAws_restJson1ListEventsFilters = (input: ListEventsFilters, conte }; }; +const serializeAws_restJson1ListInsightsAccountIdList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1ListInsightsAnyStatusFilter = ( input: ListInsightsAnyStatusFilter, context: __SerdeContext @@ -2926,6 +3601,17 @@ const serializeAws_restJson1ListInsightsOngoingStatusFilter = ( }; }; +const serializeAws_restJson1ListInsightsOrganizationalUnitIdList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1ListInsightsStatusFilter = ( input: ListInsightsStatusFilter, context: __SerdeContext @@ -2961,6 +3647,17 @@ const serializeAws_restJson1OpsCenterIntegrationConfig = ( }; }; +const serializeAws_restJson1OrganizationalUnitIdList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1ResourceCollection = (input: ResourceCollection, context: __SerdeContext): any => { return { ...(input.CloudFormation !== undefined && @@ -2970,6 +3667,17 @@ const serializeAws_restJson1ResourceCollection = (input: ResourceCollection, con }; }; +const serializeAws_restJson1SearchInsightsAccountIdList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1SearchInsightsFilters = (input: SearchInsightsFilters, context: __SerdeContext): any => { return { ...(input.ResourceCollection !== undefined && @@ -2987,6 +3695,26 @@ const serializeAws_restJson1SearchInsightsFilters = (input: SearchInsightsFilter }; }; +const serializeAws_restJson1SearchOrganizationInsightsFilters = ( + input: SearchOrganizationInsightsFilters, + context: __SerdeContext +): any => { + return { + ...(input.ResourceCollection !== undefined && + input.ResourceCollection !== null && { + ResourceCollection: serializeAws_restJson1ResourceCollection(input.ResourceCollection, context), + }), + ...(input.ServiceCollection !== undefined && + input.ServiceCollection !== null && { + ServiceCollection: serializeAws_restJson1ServiceCollection(input.ServiceCollection, context), + }), + ...(input.Severities !== undefined && + input.Severities !== null && { Severities: serializeAws_restJson1InsightSeverities(input.Severities, context) }), + ...(input.Statuses !== undefined && + input.Statuses !== null && { Statuses: serializeAws_restJson1InsightStatuses(input.Statuses, context) }), + }; +}; + const serializeAws_restJson1ServiceCollection = (input: ServiceCollection, context: __SerdeContext): any => { return { ...(input.ServiceNames !== undefined && @@ -3075,6 +3803,34 @@ const serializeAws_restJson1UpdateStackNames = (input: string[], context: __Serd }); }; +const deserializeAws_restJson1AccountHealth = (output: any, context: __SerdeContext): AccountHealth => { + return { + AccountId: __expectString(output.AccountId), + Insight: + output.Insight !== undefined && output.Insight !== null + ? deserializeAws_restJson1AccountInsightHealth(output.Insight, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1AccountHealths = (output: any, context: __SerdeContext): AccountHealth[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1AccountHealth(entry, context); + }); +}; + +const deserializeAws_restJson1AccountInsightHealth = (output: any, context: __SerdeContext): AccountInsightHealth => { + return { + OpenProactiveInsights: __expectInt32(output.OpenProactiveInsights), + OpenReactiveInsights: __expectInt32(output.OpenReactiveInsights), + } as any; +}; + const deserializeAws_restJson1AnomalyReportedTimeRange = ( output: any, context: __SerdeContext @@ -3184,6 +3940,19 @@ const deserializeAws_restJson1CloudFormationHealths = ( }); }; +const deserializeAws_restJson1CloudWatchMetricsDataSummary = ( + output: any, + context: __SerdeContext +): CloudWatchMetricsDataSummary => { + return { + StatusCode: __expectString(output.StatusCode), + TimestampMetricValuePairList: + output.TimestampMetricValuePairList !== undefined && output.TimestampMetricValuePairList !== null + ? deserializeAws_restJson1TimestampMetricValuePairList(output.TimestampMetricValuePairList, context) + : undefined, + } as any; +}; + const deserializeAws_restJson1CloudWatchMetricsDetail = ( output: any, context: __SerdeContext @@ -3193,6 +3962,10 @@ const deserializeAws_restJson1CloudWatchMetricsDetail = ( output.Dimensions !== undefined && output.Dimensions !== null ? deserializeAws_restJson1CloudWatchMetricsDimensions(output.Dimensions, context) : undefined, + MetricDataSummary: + output.MetricDataSummary !== undefined && output.MetricDataSummary !== null + ? deserializeAws_restJson1CloudWatchMetricsDataSummary(output.MetricDataSummary, context) + : undefined, MetricName: __expectString(output.MetricName), Namespace: __expectString(output.Namespace), Period: __expectInt32(output.Period), @@ -3545,6 +4318,50 @@ const deserializeAws_restJson1ProactiveInsightSummary = ( } as any; }; +const deserializeAws_restJson1ProactiveOrganizationInsights = ( + output: any, + context: __SerdeContext +): ProactiveOrganizationInsightSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ProactiveOrganizationInsightSummary(entry, context); + }); +}; + +const deserializeAws_restJson1ProactiveOrganizationInsightSummary = ( + output: any, + context: __SerdeContext +): ProactiveOrganizationInsightSummary => { + return { + AccountId: __expectString(output.AccountId), + Id: __expectString(output.Id), + InsightTimeRange: + output.InsightTimeRange !== undefined && output.InsightTimeRange !== null + ? deserializeAws_restJson1InsightTimeRange(output.InsightTimeRange, context) + : undefined, + Name: __expectString(output.Name), + OrganizationalUnitId: __expectString(output.OrganizationalUnitId), + PredictionTimeRange: + output.PredictionTimeRange !== undefined && output.PredictionTimeRange !== null + ? deserializeAws_restJson1PredictionTimeRange(output.PredictionTimeRange, context) + : undefined, + ResourceCollection: + output.ResourceCollection !== undefined && output.ResourceCollection !== null + ? deserializeAws_restJson1ResourceCollection(output.ResourceCollection, context) + : undefined, + ServiceCollection: + output.ServiceCollection !== undefined && output.ServiceCollection !== null + ? deserializeAws_restJson1ServiceCollection(output.ServiceCollection, context) + : undefined, + Severity: __expectString(output.Severity), + Status: __expectString(output.Status), + } as any; +}; + const deserializeAws_restJson1ReactiveAnomalies = (output: any, context: __SerdeContext): ReactiveAnomalySummary[] => { return (output || []) .filter((e: any) => e != null) @@ -3662,6 +4479,46 @@ const deserializeAws_restJson1ReactiveInsightSummary = ( } as any; }; +const deserializeAws_restJson1ReactiveOrganizationInsights = ( + output: any, + context: __SerdeContext +): ReactiveOrganizationInsightSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ReactiveOrganizationInsightSummary(entry, context); + }); +}; + +const deserializeAws_restJson1ReactiveOrganizationInsightSummary = ( + output: any, + context: __SerdeContext +): ReactiveOrganizationInsightSummary => { + return { + AccountId: __expectString(output.AccountId), + Id: __expectString(output.Id), + InsightTimeRange: + output.InsightTimeRange !== undefined && output.InsightTimeRange !== null + ? deserializeAws_restJson1InsightTimeRange(output.InsightTimeRange, context) + : undefined, + Name: __expectString(output.Name), + OrganizationalUnitId: __expectString(output.OrganizationalUnitId), + ResourceCollection: + output.ResourceCollection !== undefined && output.ResourceCollection !== null + ? deserializeAws_restJson1ResourceCollection(output.ResourceCollection, context) + : undefined, + ServiceCollection: + output.ServiceCollection !== undefined && output.ServiceCollection !== null + ? deserializeAws_restJson1ServiceCollection(output.ServiceCollection, context) + : undefined, + Severity: __expectString(output.Severity), + Status: __expectString(output.Status), + } as any; +}; + const deserializeAws_restJson1Recommendation = (output: any, context: __SerdeContext): Recommendation => { return { Description: __expectString(output.Description), @@ -3964,6 +4821,33 @@ const deserializeAws_restJson1StackNames = (output: any, context: __SerdeContext }); }; +const deserializeAws_restJson1TimestampMetricValuePair = ( + output: any, + context: __SerdeContext +): TimestampMetricValuePair => { + return { + MetricValue: __limitedParseDouble(output.MetricValue), + Timestamp: + output.Timestamp !== undefined && output.Timestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) + : undefined, + } as any; +}; + +const deserializeAws_restJson1TimestampMetricValuePairList = ( + output: any, + context: __SerdeContext +): TimestampMetricValuePair[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1TimestampMetricValuePair(entry, context); + }); +}; + const deserializeAws_restJson1ValidationExceptionField = ( output: any, context: __SerdeContext diff --git a/clients/client-drs/.gitignore b/clients/client-drs/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-drs/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-drs/LICENSE b/clients/client-drs/LICENSE new file mode 100644 index 000000000000..f9e0c8672bca --- /dev/null +++ b/clients/client-drs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-drs/README.md b/clients/client-drs/README.md new file mode 100644 index 000000000000..b1c6938721ad --- /dev/null +++ b/clients/client-drs/README.md @@ -0,0 +1,203 @@ +# @aws-sdk/client-drs + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-drs/latest.svg)](https://www.npmjs.com/package/@aws-sdk/client-drs) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-drs.svg)](https://www.npmjs.com/package/@aws-sdk/client-drs) + +## Description + +AWS SDK for JavaScript Drs Client for Node.js, Browser and React Native. + +

AWS Elastic Disaster Recovery Service.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-drs +using your favorite package manager: + +- `npm install @aws-sdk/client-drs` +- `yarn add @aws-sdk/client-drs` +- `pnpm add @aws-sdk/client-drs` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `DrsClient` and +the commands you need, for example `CreateReplicationConfigurationTemplateCommand`: + +```js +// ES5 example +const { DrsClient, CreateReplicationConfigurationTemplateCommand } = require("@aws-sdk/client-drs"); +``` + +```ts +// ES6+ example +import { DrsClient, CreateReplicationConfigurationTemplateCommand } from "@aws-sdk/client-drs"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new DrsClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new CreateReplicationConfigurationTemplateCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // proccess err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-drs"; +const client = new AWS.Drs({ region: "REGION" }); + +// async/await. +try { + const data = await client.createReplicationConfigurationTemplate(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .createReplicationConfigurationTemplate(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.createReplicationConfigurationTemplate(params, (err, data) => { + // proccess err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-drs` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. diff --git a/clients/client-drs/jest.config.js b/clients/client-drs/jest.config.js new file mode 100644 index 000000000000..02eed352c6a8 --- /dev/null +++ b/clients/client-drs/jest.config.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.spec.ts", "!**/*.browser.spec.ts", "!**/*.integ.spec.ts"], +}; diff --git a/clients/client-drs/package.json b/clients/client-drs/package.json new file mode 100644 index 000000000000..22510b116da4 --- /dev/null +++ b/clients/client-drs/package.json @@ -0,0 +1,94 @@ +{ + "name": "@aws-sdk/client-drs", + "description": "AWS SDK for JavaScript Drs Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "yarn build:cjs && yarn build:es && yarn build:types", + "build:cjs": "tsc -p tsconfig.json", + "build:docs": "yarn clean:docs && typedoc ./", + "build:es": "tsc -p tsconfig.es.json", + "build:types": "tsc -p tsconfig.types.json", + "clean": "yarn clean:dist && yarn clean:docs", + "clean:dist": "rimraf ./dist-*", + "clean:docs": "rimraf ./docs", + "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4", + "test": "jest --coverage --passWithNoTests" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "2.0.0", + "@aws-crypto/sha256-js": "2.0.0", + "@aws-sdk/client-sts": "3.41.0", + "@aws-sdk/config-resolver": "3.40.0", + "@aws-sdk/credential-provider-node": "3.41.0", + "@aws-sdk/fetch-http-handler": "3.40.0", + "@aws-sdk/hash-node": "3.40.0", + "@aws-sdk/invalid-dependency": "3.40.0", + "@aws-sdk/middleware-content-length": "3.40.0", + "@aws-sdk/middleware-host-header": "3.40.0", + "@aws-sdk/middleware-logger": "3.40.0", + "@aws-sdk/middleware-retry": "3.40.0", + "@aws-sdk/middleware-serde": "3.40.0", + "@aws-sdk/middleware-signing": "3.40.0", + "@aws-sdk/middleware-stack": "3.40.0", + "@aws-sdk/middleware-user-agent": "3.40.0", + "@aws-sdk/node-config-provider": "3.40.0", + "@aws-sdk/node-http-handler": "3.40.0", + "@aws-sdk/protocol-http": "3.40.0", + "@aws-sdk/smithy-client": "3.41.0", + "@aws-sdk/types": "3.40.0", + "@aws-sdk/url-parser": "3.40.0", + "@aws-sdk/util-base64-browser": "3.37.0", + "@aws-sdk/util-base64-node": "3.37.0", + "@aws-sdk/util-body-length-browser": "3.37.0", + "@aws-sdk/util-body-length-node": "3.37.0", + "@aws-sdk/util-user-agent-browser": "3.40.0", + "@aws-sdk/util-user-agent-node": "3.40.0", + "@aws-sdk/util-utf8-browser": "3.37.0", + "@aws-sdk/util-utf8-node": "3.37.0", + "tslib": "^2.3.0" + }, + "devDependencies": { + "@aws-sdk/service-client-documentation-generator": "3.38.0", + "@types/node": "^12.7.5", + "downlevel-dts": "0.7.0", + "jest": "^26.1.0", + "rimraf": "^3.0.0", + "ts-jest": "^26.4.1", + "typedoc": "^0.19.2", + "typescript": "~4.3.5" + }, + "engines": { + "node": ">=10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-drs", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-drs" + } +} diff --git a/clients/client-drs/src/Drs.ts b/clients/client-drs/src/Drs.ts new file mode 100644 index 000000000000..946ef7ff898d --- /dev/null +++ b/clients/client-drs/src/Drs.ts @@ -0,0 +1,1065 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +import { + CreateReplicationConfigurationTemplateCommand, + CreateReplicationConfigurationTemplateCommandInput, + CreateReplicationConfigurationTemplateCommandOutput, +} from "./commands/CreateReplicationConfigurationTemplateCommand"; +import { DeleteJobCommand, DeleteJobCommandInput, DeleteJobCommandOutput } from "./commands/DeleteJobCommand"; +import { + DeleteRecoveryInstanceCommand, + DeleteRecoveryInstanceCommandInput, + DeleteRecoveryInstanceCommandOutput, +} from "./commands/DeleteRecoveryInstanceCommand"; +import { + DeleteReplicationConfigurationTemplateCommand, + DeleteReplicationConfigurationTemplateCommandInput, + DeleteReplicationConfigurationTemplateCommandOutput, +} from "./commands/DeleteReplicationConfigurationTemplateCommand"; +import { + DeleteSourceServerCommand, + DeleteSourceServerCommandInput, + DeleteSourceServerCommandOutput, +} from "./commands/DeleteSourceServerCommand"; +import { + DescribeJobLogItemsCommand, + DescribeJobLogItemsCommandInput, + DescribeJobLogItemsCommandOutput, +} from "./commands/DescribeJobLogItemsCommand"; +import { + DescribeJobsCommand, + DescribeJobsCommandInput, + DescribeJobsCommandOutput, +} from "./commands/DescribeJobsCommand"; +import { + DescribeRecoveryInstancesCommand, + DescribeRecoveryInstancesCommandInput, + DescribeRecoveryInstancesCommandOutput, +} from "./commands/DescribeRecoveryInstancesCommand"; +import { + DescribeRecoverySnapshotsCommand, + DescribeRecoverySnapshotsCommandInput, + DescribeRecoverySnapshotsCommandOutput, +} from "./commands/DescribeRecoverySnapshotsCommand"; +import { + DescribeReplicationConfigurationTemplatesCommand, + DescribeReplicationConfigurationTemplatesCommandInput, + DescribeReplicationConfigurationTemplatesCommandOutput, +} from "./commands/DescribeReplicationConfigurationTemplatesCommand"; +import { + DescribeSourceServersCommand, + DescribeSourceServersCommandInput, + DescribeSourceServersCommandOutput, +} from "./commands/DescribeSourceServersCommand"; +import { + DisconnectRecoveryInstanceCommand, + DisconnectRecoveryInstanceCommandInput, + DisconnectRecoveryInstanceCommandOutput, +} from "./commands/DisconnectRecoveryInstanceCommand"; +import { + DisconnectSourceServerCommand, + DisconnectSourceServerCommandInput, + DisconnectSourceServerCommandOutput, +} from "./commands/DisconnectSourceServerCommand"; +import { + GetFailbackReplicationConfigurationCommand, + GetFailbackReplicationConfigurationCommandInput, + GetFailbackReplicationConfigurationCommandOutput, +} from "./commands/GetFailbackReplicationConfigurationCommand"; +import { + GetLaunchConfigurationCommand, + GetLaunchConfigurationCommandInput, + GetLaunchConfigurationCommandOutput, +} from "./commands/GetLaunchConfigurationCommand"; +import { + GetReplicationConfigurationCommand, + GetReplicationConfigurationCommandInput, + GetReplicationConfigurationCommandOutput, +} from "./commands/GetReplicationConfigurationCommand"; +import { + InitializeServiceCommand, + InitializeServiceCommandInput, + InitializeServiceCommandOutput, +} from "./commands/InitializeServiceCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + RetryDataReplicationCommand, + RetryDataReplicationCommandInput, + RetryDataReplicationCommandOutput, +} from "./commands/RetryDataReplicationCommand"; +import { + StartFailbackLaunchCommand, + StartFailbackLaunchCommandInput, + StartFailbackLaunchCommandOutput, +} from "./commands/StartFailbackLaunchCommand"; +import { + StartRecoveryCommand, + StartRecoveryCommandInput, + StartRecoveryCommandOutput, +} from "./commands/StartRecoveryCommand"; +import { + StopFailbackCommand, + StopFailbackCommandInput, + StopFailbackCommandOutput, +} from "./commands/StopFailbackCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + TerminateRecoveryInstancesCommand, + TerminateRecoveryInstancesCommandInput, + TerminateRecoveryInstancesCommandOutput, +} from "./commands/TerminateRecoveryInstancesCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateFailbackReplicationConfigurationCommand, + UpdateFailbackReplicationConfigurationCommandInput, + UpdateFailbackReplicationConfigurationCommandOutput, +} from "./commands/UpdateFailbackReplicationConfigurationCommand"; +import { + UpdateLaunchConfigurationCommand, + UpdateLaunchConfigurationCommandInput, + UpdateLaunchConfigurationCommandOutput, +} from "./commands/UpdateLaunchConfigurationCommand"; +import { + UpdateReplicationConfigurationCommand, + UpdateReplicationConfigurationCommandInput, + UpdateReplicationConfigurationCommandOutput, +} from "./commands/UpdateReplicationConfigurationCommand"; +import { + UpdateReplicationConfigurationTemplateCommand, + UpdateReplicationConfigurationTemplateCommandInput, + UpdateReplicationConfigurationTemplateCommandOutput, +} from "./commands/UpdateReplicationConfigurationTemplateCommand"; +import { DrsClient } from "./DrsClient"; + +/** + *

AWS Elastic Disaster Recovery Service.

+ */ +export class Drs extends DrsClient { + /** + *

Creates a new ReplicationConfigurationTemplate.

+ */ + public createReplicationConfigurationTemplate( + args: CreateReplicationConfigurationTemplateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createReplicationConfigurationTemplate( + args: CreateReplicationConfigurationTemplateCommandInput, + cb: (err: any, data?: CreateReplicationConfigurationTemplateCommandOutput) => void + ): void; + public createReplicationConfigurationTemplate( + args: CreateReplicationConfigurationTemplateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateReplicationConfigurationTemplateCommandOutput) => void + ): void; + public createReplicationConfigurationTemplate( + args: CreateReplicationConfigurationTemplateCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateReplicationConfigurationTemplateCommandOutput) => void), + cb?: (err: any, data?: CreateReplicationConfigurationTemplateCommandOutput) => void + ): Promise | void { + const command = new CreateReplicationConfigurationTemplateCommand(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); + } + } + + /** + *

Deletes a single Job by ID.

+ */ + public deleteJob(args: DeleteJobCommandInput, options?: __HttpHandlerOptions): Promise; + public deleteJob(args: DeleteJobCommandInput, cb: (err: any, data?: DeleteJobCommandOutput) => void): void; + public deleteJob( + args: DeleteJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteJobCommandOutput) => void + ): void; + public deleteJob( + args: DeleteJobCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteJobCommandOutput) => void), + cb?: (err: any, data?: DeleteJobCommandOutput) => void + ): Promise | void { + const command = new DeleteJobCommand(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); + } + } + + /** + *

Deletes a single Recovery Instance by ID. This deletes the Recovery Instance resource from Elastic Disaster Recovery. The Recovery Instance must be disconnected first in order to delete it.

+ */ + public deleteRecoveryInstance( + args: DeleteRecoveryInstanceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteRecoveryInstance( + args: DeleteRecoveryInstanceCommandInput, + cb: (err: any, data?: DeleteRecoveryInstanceCommandOutput) => void + ): void; + public deleteRecoveryInstance( + args: DeleteRecoveryInstanceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRecoveryInstanceCommandOutput) => void + ): void; + public deleteRecoveryInstance( + args: DeleteRecoveryInstanceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteRecoveryInstanceCommandOutput) => void), + cb?: (err: any, data?: DeleteRecoveryInstanceCommandOutput) => void + ): Promise | void { + const command = new DeleteRecoveryInstanceCommand(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); + } + } + + /** + *

Deletes a single Replication Configuration Template by ID

+ */ + public deleteReplicationConfigurationTemplate( + args: DeleteReplicationConfigurationTemplateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteReplicationConfigurationTemplate( + args: DeleteReplicationConfigurationTemplateCommandInput, + cb: (err: any, data?: DeleteReplicationConfigurationTemplateCommandOutput) => void + ): void; + public deleteReplicationConfigurationTemplate( + args: DeleteReplicationConfigurationTemplateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteReplicationConfigurationTemplateCommandOutput) => void + ): void; + public deleteReplicationConfigurationTemplate( + args: DeleteReplicationConfigurationTemplateCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteReplicationConfigurationTemplateCommandOutput) => void), + cb?: (err: any, data?: DeleteReplicationConfigurationTemplateCommandOutput) => void + ): Promise | void { + const command = new DeleteReplicationConfigurationTemplateCommand(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); + } + } + + /** + *

Deletes a single Source Server by ID. The Source Server must be disconnected first.

+ */ + public deleteSourceServer( + args: DeleteSourceServerCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteSourceServer( + args: DeleteSourceServerCommandInput, + cb: (err: any, data?: DeleteSourceServerCommandOutput) => void + ): void; + public deleteSourceServer( + args: DeleteSourceServerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteSourceServerCommandOutput) => void + ): void; + public deleteSourceServer( + args: DeleteSourceServerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteSourceServerCommandOutput) => void), + cb?: (err: any, data?: DeleteSourceServerCommandOutput) => void + ): Promise | void { + const command = new DeleteSourceServerCommand(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); + } + } + + /** + *

Retrieves a detailed Job log with pagination.

+ */ + public describeJobLogItems( + args: DescribeJobLogItemsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeJobLogItems( + args: DescribeJobLogItemsCommandInput, + cb: (err: any, data?: DescribeJobLogItemsCommandOutput) => void + ): void; + public describeJobLogItems( + args: DescribeJobLogItemsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeJobLogItemsCommandOutput) => void + ): void; + public describeJobLogItems( + args: DescribeJobLogItemsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeJobLogItemsCommandOutput) => void), + cb?: (err: any, data?: DescribeJobLogItemsCommandOutput) => void + ): Promise | void { + const command = new DescribeJobLogItemsCommand(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); + } + } + + /** + *

Returns a list of Jobs. Use the JobsID and fromDate and toDate filters to limit which jobs are returned. The response is sorted by creationDataTime - latest date first. Jobs are created by the StartRecovery, TerminateRecoveryInstances and StartFailbackLaunch APIs. Jobs are also created by DiagnosticLaunch and TerminateDiagnosticInstances, which are APIs available only to *Support* and only used in response to relevant support tickets.

+ */ + public describeJobs( + args: DescribeJobsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeJobs(args: DescribeJobsCommandInput, cb: (err: any, data?: DescribeJobsCommandOutput) => void): void; + public describeJobs( + args: DescribeJobsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeJobsCommandOutput) => void + ): void; + public describeJobs( + args: DescribeJobsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeJobsCommandOutput) => void), + cb?: (err: any, data?: DescribeJobsCommandOutput) => void + ): Promise | void { + const command = new DescribeJobsCommand(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); + } + } + + /** + *

Lists all Recovery Instances or multiple Recovery Instances by ID.

+ */ + public describeRecoveryInstances( + args: DescribeRecoveryInstancesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeRecoveryInstances( + args: DescribeRecoveryInstancesCommandInput, + cb: (err: any, data?: DescribeRecoveryInstancesCommandOutput) => void + ): void; + public describeRecoveryInstances( + args: DescribeRecoveryInstancesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeRecoveryInstancesCommandOutput) => void + ): void; + public describeRecoveryInstances( + args: DescribeRecoveryInstancesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeRecoveryInstancesCommandOutput) => void), + cb?: (err: any, data?: DescribeRecoveryInstancesCommandOutput) => void + ): Promise | void { + const command = new DescribeRecoveryInstancesCommand(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); + } + } + + /** + *

Lists all Recovery Snapshots for a single Source Server.

+ */ + public describeRecoverySnapshots( + args: DescribeRecoverySnapshotsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeRecoverySnapshots( + args: DescribeRecoverySnapshotsCommandInput, + cb: (err: any, data?: DescribeRecoverySnapshotsCommandOutput) => void + ): void; + public describeRecoverySnapshots( + args: DescribeRecoverySnapshotsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeRecoverySnapshotsCommandOutput) => void + ): void; + public describeRecoverySnapshots( + args: DescribeRecoverySnapshotsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeRecoverySnapshotsCommandOutput) => void), + cb?: (err: any, data?: DescribeRecoverySnapshotsCommandOutput) => void + ): Promise | void { + const command = new DescribeRecoverySnapshotsCommand(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); + } + } + + /** + *

Lists all ReplicationConfigurationTemplates, filtered by Source Server IDs.

+ */ + public describeReplicationConfigurationTemplates( + args: DescribeReplicationConfigurationTemplatesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeReplicationConfigurationTemplates( + args: DescribeReplicationConfigurationTemplatesCommandInput, + cb: (err: any, data?: DescribeReplicationConfigurationTemplatesCommandOutput) => void + ): void; + public describeReplicationConfigurationTemplates( + args: DescribeReplicationConfigurationTemplatesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeReplicationConfigurationTemplatesCommandOutput) => void + ): void; + public describeReplicationConfigurationTemplates( + args: DescribeReplicationConfigurationTemplatesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DescribeReplicationConfigurationTemplatesCommandOutput) => void), + cb?: (err: any, data?: DescribeReplicationConfigurationTemplatesCommandOutput) => void + ): Promise | void { + const command = new DescribeReplicationConfigurationTemplatesCommand(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); + } + } + + /** + *

Lists all Source Servers or multiple Source Servers filtered by ID.

+ */ + public describeSourceServers( + args: DescribeSourceServersCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeSourceServers( + args: DescribeSourceServersCommandInput, + cb: (err: any, data?: DescribeSourceServersCommandOutput) => void + ): void; + public describeSourceServers( + args: DescribeSourceServersCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeSourceServersCommandOutput) => void + ): void; + public describeSourceServers( + args: DescribeSourceServersCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeSourceServersCommandOutput) => void), + cb?: (err: any, data?: DescribeSourceServersCommandOutput) => void + ): Promise | void { + const command = new DescribeSourceServersCommand(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); + } + } + + /** + *

Disconnect a Recovery Instance from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Recovery Instance will be terminated / deleted within 90 minutes. If the agent on the Recovery Instance has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the Recovery Instance will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.

+ */ + public disconnectRecoveryInstance( + args: DisconnectRecoveryInstanceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public disconnectRecoveryInstance( + args: DisconnectRecoveryInstanceCommandInput, + cb: (err: any, data?: DisconnectRecoveryInstanceCommandOutput) => void + ): void; + public disconnectRecoveryInstance( + args: DisconnectRecoveryInstanceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisconnectRecoveryInstanceCommandOutput) => void + ): void; + public disconnectRecoveryInstance( + args: DisconnectRecoveryInstanceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DisconnectRecoveryInstanceCommandOutput) => void), + cb?: (err: any, data?: DisconnectRecoveryInstanceCommandOutput) => void + ): Promise | void { + const command = new DisconnectRecoveryInstanceCommand(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); + } + } + + /** + *

Disconnects a specific Source Server from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Source Server will be terminated / deleted within 90 minutes. You cannot disconnect a Source Server if it has a Recovery Instance. If the agent on the Source Server has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the SourceServer will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.

+ */ + public disconnectSourceServer( + args: DisconnectSourceServerCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public disconnectSourceServer( + args: DisconnectSourceServerCommandInput, + cb: (err: any, data?: DisconnectSourceServerCommandOutput) => void + ): void; + public disconnectSourceServer( + args: DisconnectSourceServerCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisconnectSourceServerCommandOutput) => void + ): void; + public disconnectSourceServer( + args: DisconnectSourceServerCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DisconnectSourceServerCommandOutput) => void), + cb?: (err: any, data?: DisconnectSourceServerCommandOutput) => void + ): Promise | void { + const command = new DisconnectSourceServerCommand(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); + } + } + + /** + *

Lists all Failback ReplicationConfigurations, filtered by Recovery Instance ID.

+ */ + public getFailbackReplicationConfiguration( + args: GetFailbackReplicationConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getFailbackReplicationConfiguration( + args: GetFailbackReplicationConfigurationCommandInput, + cb: (err: any, data?: GetFailbackReplicationConfigurationCommandOutput) => void + ): void; + public getFailbackReplicationConfiguration( + args: GetFailbackReplicationConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetFailbackReplicationConfigurationCommandOutput) => void + ): void; + public getFailbackReplicationConfiguration( + args: GetFailbackReplicationConfigurationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetFailbackReplicationConfigurationCommandOutput) => void), + cb?: (err: any, data?: GetFailbackReplicationConfigurationCommandOutput) => void + ): Promise | void { + const command = new GetFailbackReplicationConfigurationCommand(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); + } + } + + /** + *

Gets a LaunchConfiguration, filtered by Source Server IDs.

+ */ + public getLaunchConfiguration( + args: GetLaunchConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getLaunchConfiguration( + args: GetLaunchConfigurationCommandInput, + cb: (err: any, data?: GetLaunchConfigurationCommandOutput) => void + ): void; + public getLaunchConfiguration( + args: GetLaunchConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetLaunchConfigurationCommandOutput) => void + ): void; + public getLaunchConfiguration( + args: GetLaunchConfigurationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetLaunchConfigurationCommandOutput) => void), + cb?: (err: any, data?: GetLaunchConfigurationCommandOutput) => void + ): Promise | void { + const command = new GetLaunchConfigurationCommand(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); + } + } + + /** + *

Gets a ReplicationConfiguration, filtered by Source Server ID.

+ */ + public getReplicationConfiguration( + args: GetReplicationConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getReplicationConfiguration( + args: GetReplicationConfigurationCommandInput, + cb: (err: any, data?: GetReplicationConfigurationCommandOutput) => void + ): void; + public getReplicationConfiguration( + args: GetReplicationConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetReplicationConfigurationCommandOutput) => void + ): void; + public getReplicationConfiguration( + args: GetReplicationConfigurationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetReplicationConfigurationCommandOutput) => void), + cb?: (err: any, data?: GetReplicationConfigurationCommandOutput) => void + ): Promise | void { + const command = new GetReplicationConfigurationCommand(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); + } + } + + /** + *

Initialize Elastic Disaster Recovery.

+ */ + public initializeService( + args: InitializeServiceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public initializeService( + args: InitializeServiceCommandInput, + cb: (err: any, data?: InitializeServiceCommandOutput) => void + ): void; + public initializeService( + args: InitializeServiceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: InitializeServiceCommandOutput) => void + ): void; + public initializeService( + args: InitializeServiceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: InitializeServiceCommandOutput) => void), + cb?: (err: any, data?: InitializeServiceCommandOutput) => void + ): Promise | void { + const command = new InitializeServiceCommand(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); + } + } + + /** + *

List all tags for your Elastic Disaster Recovery resources.

+ */ + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTagsForResourceCommandOutput) => void), + cb?: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): Promise | void { + const command = new ListTagsForResourceCommand(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); + } + } + + /** + *

Causes the data replication initiation sequence to begin immediately upon next Handshake for the specified Source Server ID, regardless of when the previous initiation started. This command will work only if the Source Server is stalled or is in a DISCONNECTED or STOPPED state.

+ */ + public retryDataReplication( + args: RetryDataReplicationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public retryDataReplication( + args: RetryDataReplicationCommandInput, + cb: (err: any, data?: RetryDataReplicationCommandOutput) => void + ): void; + public retryDataReplication( + args: RetryDataReplicationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: RetryDataReplicationCommandOutput) => void + ): void; + public retryDataReplication( + args: RetryDataReplicationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RetryDataReplicationCommandOutput) => void), + cb?: (err: any, data?: RetryDataReplicationCommandOutput) => void + ): Promise | void { + const command = new RetryDataReplicationCommand(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); + } + } + + /** + *

Initiates a Job for launching the machine that is being failed back to from the specified Recovery Instance. This will run conversion on the failback client and will reboot your machine, thus completing the failback process.

+ */ + public startFailbackLaunch( + args: StartFailbackLaunchCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startFailbackLaunch( + args: StartFailbackLaunchCommandInput, + cb: (err: any, data?: StartFailbackLaunchCommandOutput) => void + ): void; + public startFailbackLaunch( + args: StartFailbackLaunchCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartFailbackLaunchCommandOutput) => void + ): void; + public startFailbackLaunch( + args: StartFailbackLaunchCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartFailbackLaunchCommandOutput) => void), + cb?: (err: any, data?: StartFailbackLaunchCommandOutput) => void + ): Promise | void { + const command = new StartFailbackLaunchCommand(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); + } + } + + /** + *

Launches Recovery Instances for the specified Source Servers. For each Source Server you may choose a point in time snapshot to launch from, or use an on demand snapshot.

+ */ + public startRecovery( + args: StartRecoveryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startRecovery( + args: StartRecoveryCommandInput, + cb: (err: any, data?: StartRecoveryCommandOutput) => void + ): void; + public startRecovery( + args: StartRecoveryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartRecoveryCommandOutput) => void + ): void; + public startRecovery( + args: StartRecoveryCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartRecoveryCommandOutput) => void), + cb?: (err: any, data?: StartRecoveryCommandOutput) => void + ): Promise | void { + const command = new StartRecoveryCommand(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); + } + } + + /** + *

Stops the failback process for a specified Recovery Instance. This changes the Failback State of the Recovery Instance back to FAILBACK_NOT_STARTED.

+ */ + public stopFailback( + args: StopFailbackCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public stopFailback(args: StopFailbackCommandInput, cb: (err: any, data?: StopFailbackCommandOutput) => void): void; + public stopFailback( + args: StopFailbackCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StopFailbackCommandOutput) => void + ): void; + public stopFailback( + args: StopFailbackCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StopFailbackCommandOutput) => void), + cb?: (err: any, data?: StopFailbackCommandOutput) => void + ): Promise | void { + const command = new StopFailbackCommand(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); + } + } + + /** + *

Adds or overwrites only the specified tags for the specified Elastic Disaster Recovery resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value.

+ */ + public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + public tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TagResourceCommandOutput) => void), + cb?: (err: any, data?: TagResourceCommandOutput) => void + ): Promise | void { + const command = new TagResourceCommand(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); + } + } + + /** + *

Initiates a Job for terminating the EC2 resources associated with the specified Recovery Instances, and then will delete the Recovery Instances from the Elastic Disaster Recovery service.

+ */ + public terminateRecoveryInstances( + args: TerminateRecoveryInstancesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public terminateRecoveryInstances( + args: TerminateRecoveryInstancesCommandInput, + cb: (err: any, data?: TerminateRecoveryInstancesCommandOutput) => void + ): void; + public terminateRecoveryInstances( + args: TerminateRecoveryInstancesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TerminateRecoveryInstancesCommandOutput) => void + ): void; + public terminateRecoveryInstances( + args: TerminateRecoveryInstancesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TerminateRecoveryInstancesCommandOutput) => void), + cb?: (err: any, data?: TerminateRecoveryInstancesCommandOutput) => void + ): Promise | void { + const command = new TerminateRecoveryInstancesCommand(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); + } + } + + /** + *

Deletes the specified set of tags from the specified set of Elastic Disaster Recovery resources.

+ */ + public untagResource( + args: UntagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public untagResource( + args: UntagResourceCommandInput, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UntagResourceCommandOutput) => void), + cb?: (err: any, data?: UntagResourceCommandOutput) => void + ): Promise | void { + const command = new UntagResourceCommand(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); + } + } + + /** + *

Allows you to update the failback replication configuration of a Recovery Instance by ID.

+ */ + public updateFailbackReplicationConfiguration( + args: UpdateFailbackReplicationConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateFailbackReplicationConfiguration( + args: UpdateFailbackReplicationConfigurationCommandInput, + cb: (err: any, data?: UpdateFailbackReplicationConfigurationCommandOutput) => void + ): void; + public updateFailbackReplicationConfiguration( + args: UpdateFailbackReplicationConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateFailbackReplicationConfigurationCommandOutput) => void + ): void; + public updateFailbackReplicationConfiguration( + args: UpdateFailbackReplicationConfigurationCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateFailbackReplicationConfigurationCommandOutput) => void), + cb?: (err: any, data?: UpdateFailbackReplicationConfigurationCommandOutput) => void + ): Promise | void { + const command = new UpdateFailbackReplicationConfigurationCommand(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); + } + } + + /** + *

Updates a LaunchConfiguration by Source Server ID.

+ */ + public updateLaunchConfiguration( + args: UpdateLaunchConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateLaunchConfiguration( + args: UpdateLaunchConfigurationCommandInput, + cb: (err: any, data?: UpdateLaunchConfigurationCommandOutput) => void + ): void; + public updateLaunchConfiguration( + args: UpdateLaunchConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateLaunchConfigurationCommandOutput) => void + ): void; + public updateLaunchConfiguration( + args: UpdateLaunchConfigurationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateLaunchConfigurationCommandOutput) => void), + cb?: (err: any, data?: UpdateLaunchConfigurationCommandOutput) => void + ): Promise | void { + const command = new UpdateLaunchConfigurationCommand(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); + } + } + + /** + *

Allows you to update a ReplicationConfiguration by Source Server ID.

+ */ + public updateReplicationConfiguration( + args: UpdateReplicationConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateReplicationConfiguration( + args: UpdateReplicationConfigurationCommandInput, + cb: (err: any, data?: UpdateReplicationConfigurationCommandOutput) => void + ): void; + public updateReplicationConfiguration( + args: UpdateReplicationConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateReplicationConfigurationCommandOutput) => void + ): void; + public updateReplicationConfiguration( + args: UpdateReplicationConfigurationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateReplicationConfigurationCommandOutput) => void), + cb?: (err: any, data?: UpdateReplicationConfigurationCommandOutput) => void + ): Promise | void { + const command = new UpdateReplicationConfigurationCommand(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); + } + } + + /** + *

Updates a ReplicationConfigurationTemplate by ID.

+ */ + public updateReplicationConfigurationTemplate( + args: UpdateReplicationConfigurationTemplateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateReplicationConfigurationTemplate( + args: UpdateReplicationConfigurationTemplateCommandInput, + cb: (err: any, data?: UpdateReplicationConfigurationTemplateCommandOutput) => void + ): void; + public updateReplicationConfigurationTemplate( + args: UpdateReplicationConfigurationTemplateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateReplicationConfigurationTemplateCommandOutput) => void + ): void; + public updateReplicationConfigurationTemplate( + args: UpdateReplicationConfigurationTemplateCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateReplicationConfigurationTemplateCommandOutput) => void), + cb?: (err: any, data?: UpdateReplicationConfigurationTemplateCommandOutput) => void + ): Promise | void { + const command = new UpdateReplicationConfigurationTemplateCommand(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); + } + } +} diff --git a/clients/client-drs/src/DrsClient.ts b/clients/client-drs/src/DrsClient.ts new file mode 100644 index 000000000000..bf22498520a8 --- /dev/null +++ b/clients/client-drs/src/DrsClient.ts @@ -0,0 +1,396 @@ +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig, +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@aws-sdk/smithy-client"; +import { + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + RegionInfoProvider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@aws-sdk/types"; + +import { + CreateReplicationConfigurationTemplateCommandInput, + CreateReplicationConfigurationTemplateCommandOutput, +} from "./commands/CreateReplicationConfigurationTemplateCommand"; +import { DeleteJobCommandInput, DeleteJobCommandOutput } from "./commands/DeleteJobCommand"; +import { + DeleteRecoveryInstanceCommandInput, + DeleteRecoveryInstanceCommandOutput, +} from "./commands/DeleteRecoveryInstanceCommand"; +import { + DeleteReplicationConfigurationTemplateCommandInput, + DeleteReplicationConfigurationTemplateCommandOutput, +} from "./commands/DeleteReplicationConfigurationTemplateCommand"; +import { DeleteSourceServerCommandInput, DeleteSourceServerCommandOutput } from "./commands/DeleteSourceServerCommand"; +import { + DescribeJobLogItemsCommandInput, + DescribeJobLogItemsCommandOutput, +} from "./commands/DescribeJobLogItemsCommand"; +import { DescribeJobsCommandInput, DescribeJobsCommandOutput } from "./commands/DescribeJobsCommand"; +import { + DescribeRecoveryInstancesCommandInput, + DescribeRecoveryInstancesCommandOutput, +} from "./commands/DescribeRecoveryInstancesCommand"; +import { + DescribeRecoverySnapshotsCommandInput, + DescribeRecoverySnapshotsCommandOutput, +} from "./commands/DescribeRecoverySnapshotsCommand"; +import { + DescribeReplicationConfigurationTemplatesCommandInput, + DescribeReplicationConfigurationTemplatesCommandOutput, +} from "./commands/DescribeReplicationConfigurationTemplatesCommand"; +import { + DescribeSourceServersCommandInput, + DescribeSourceServersCommandOutput, +} from "./commands/DescribeSourceServersCommand"; +import { + DisconnectRecoveryInstanceCommandInput, + DisconnectRecoveryInstanceCommandOutput, +} from "./commands/DisconnectRecoveryInstanceCommand"; +import { + DisconnectSourceServerCommandInput, + DisconnectSourceServerCommandOutput, +} from "./commands/DisconnectSourceServerCommand"; +import { + GetFailbackReplicationConfigurationCommandInput, + GetFailbackReplicationConfigurationCommandOutput, +} from "./commands/GetFailbackReplicationConfigurationCommand"; +import { + GetLaunchConfigurationCommandInput, + GetLaunchConfigurationCommandOutput, +} from "./commands/GetLaunchConfigurationCommand"; +import { + GetReplicationConfigurationCommandInput, + GetReplicationConfigurationCommandOutput, +} from "./commands/GetReplicationConfigurationCommand"; +import { InitializeServiceCommandInput, InitializeServiceCommandOutput } from "./commands/InitializeServiceCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + RetryDataReplicationCommandInput, + RetryDataReplicationCommandOutput, +} from "./commands/RetryDataReplicationCommand"; +import { + StartFailbackLaunchCommandInput, + StartFailbackLaunchCommandOutput, +} from "./commands/StartFailbackLaunchCommand"; +import { StartRecoveryCommandInput, StartRecoveryCommandOutput } from "./commands/StartRecoveryCommand"; +import { StopFailbackCommandInput, StopFailbackCommandOutput } from "./commands/StopFailbackCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + TerminateRecoveryInstancesCommandInput, + TerminateRecoveryInstancesCommandOutput, +} from "./commands/TerminateRecoveryInstancesCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { + UpdateFailbackReplicationConfigurationCommandInput, + UpdateFailbackReplicationConfigurationCommandOutput, +} from "./commands/UpdateFailbackReplicationConfigurationCommand"; +import { + UpdateLaunchConfigurationCommandInput, + UpdateLaunchConfigurationCommandOutput, +} from "./commands/UpdateLaunchConfigurationCommand"; +import { + UpdateReplicationConfigurationCommandInput, + UpdateReplicationConfigurationCommandOutput, +} from "./commands/UpdateReplicationConfigurationCommand"; +import { + UpdateReplicationConfigurationTemplateCommandInput, + UpdateReplicationConfigurationTemplateCommandOutput, +} from "./commands/UpdateReplicationConfigurationTemplateCommand"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; + +export type ServiceInputTypes = + | CreateReplicationConfigurationTemplateCommandInput + | DeleteJobCommandInput + | DeleteRecoveryInstanceCommandInput + | DeleteReplicationConfigurationTemplateCommandInput + | DeleteSourceServerCommandInput + | DescribeJobLogItemsCommandInput + | DescribeJobsCommandInput + | DescribeRecoveryInstancesCommandInput + | DescribeRecoverySnapshotsCommandInput + | DescribeReplicationConfigurationTemplatesCommandInput + | DescribeSourceServersCommandInput + | DisconnectRecoveryInstanceCommandInput + | DisconnectSourceServerCommandInput + | GetFailbackReplicationConfigurationCommandInput + | GetLaunchConfigurationCommandInput + | GetReplicationConfigurationCommandInput + | InitializeServiceCommandInput + | ListTagsForResourceCommandInput + | RetryDataReplicationCommandInput + | StartFailbackLaunchCommandInput + | StartRecoveryCommandInput + | StopFailbackCommandInput + | TagResourceCommandInput + | TerminateRecoveryInstancesCommandInput + | UntagResourceCommandInput + | UpdateFailbackReplicationConfigurationCommandInput + | UpdateLaunchConfigurationCommandInput + | UpdateReplicationConfigurationCommandInput + | UpdateReplicationConfigurationTemplateCommandInput; + +export type ServiceOutputTypes = + | CreateReplicationConfigurationTemplateCommandOutput + | DeleteJobCommandOutput + | DeleteRecoveryInstanceCommandOutput + | DeleteReplicationConfigurationTemplateCommandOutput + | DeleteSourceServerCommandOutput + | DescribeJobLogItemsCommandOutput + | DescribeJobsCommandOutput + | DescribeRecoveryInstancesCommandOutput + | DescribeRecoverySnapshotsCommandOutput + | DescribeReplicationConfigurationTemplatesCommandOutput + | DescribeSourceServersCommandOutput + | DisconnectRecoveryInstanceCommandOutput + | DisconnectSourceServerCommandOutput + | GetFailbackReplicationConfigurationCommandOutput + | GetLaunchConfigurationCommandOutput + | GetReplicationConfigurationCommandOutput + | InitializeServiceCommandOutput + | ListTagsForResourceCommandOutput + | RetryDataReplicationCommandOutput + | StartFailbackLaunchCommandOutput + | StartRecoveryCommandOutput + | StopFailbackCommandOutput + | TagResourceCommandOutput + | TerminateRecoveryInstancesCommandOutput + | UntagResourceCommandOutput + | UpdateFailbackReplicationConfigurationCommandOutput + | UpdateLaunchConfigurationCommandOutput + | UpdateReplicationConfigurationCommandOutput + | UpdateReplicationConfigurationTemplateCommandOutput; + +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link __Hash} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: (body: any) => number | undefined; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dyanamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Fetch related hostname, signing name or signing region with given region. + * @internal + */ + regionInfoProvider?: RegionInfoProvider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; +} + +type DrsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig; +/** + * The configuration interface of DrsClient class constructor that set the region, credentials and other options. + */ +export interface DrsClientConfig extends DrsClientConfigType {} + +type DrsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig; +/** + * The resolved configuration interface of DrsClient class. This is resolved and normalized from the {@link DrsClientConfig | constructor configuration interface}. + */ +export interface DrsClientResolvedConfig extends DrsClientResolvedConfigType {} + +/** + *

AWS Elastic Disaster Recovery Service.

+ */ +export class DrsClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + DrsClientResolvedConfig +> { + /** + * The resolved configuration of DrsClient class. This is resolved and normalized from the {@link DrsClientConfig | constructor configuration interface}. + */ + readonly config: DrsClientResolvedConfig; + + constructor(configuration: DrsClientConfig) { + const _config_0 = __getRuntimeConfig(configuration); + const _config_1 = resolveRegionConfig(_config_0); + const _config_2 = resolveEndpointsConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveHostHeaderConfig(_config_3); + const _config_5 = resolveAwsAuthConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-drs/src/commands/CreateReplicationConfigurationTemplateCommand.ts b/clients/client-drs/src/commands/CreateReplicationConfigurationTemplateCommand.ts new file mode 100644 index 000000000000..b664c98fff23 --- /dev/null +++ b/clients/client-drs/src/commands/CreateReplicationConfigurationTemplateCommand.ts @@ -0,0 +1,104 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { CreateReplicationConfigurationTemplateRequest, ReplicationConfigurationTemplate } from "../models/models_0"; +import { + deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand, + serializeAws_restJson1CreateReplicationConfigurationTemplateCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateReplicationConfigurationTemplateCommandInput + extends CreateReplicationConfigurationTemplateRequest {} +export interface CreateReplicationConfigurationTemplateCommandOutput + extends ReplicationConfigurationTemplate, + __MetadataBearer {} + +/** + *

Creates a new ReplicationConfigurationTemplate.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, CreateReplicationConfigurationTemplateCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, CreateReplicationConfigurationTemplateCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new CreateReplicationConfigurationTemplateCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateReplicationConfigurationTemplateCommandInput} for command's `input` shape. + * @see {@link CreateReplicationConfigurationTemplateCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class CreateReplicationConfigurationTemplateCommand extends $Command< + CreateReplicationConfigurationTemplateCommandInput, + CreateReplicationConfigurationTemplateCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateReplicationConfigurationTemplateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "CreateReplicationConfigurationTemplateCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateReplicationConfigurationTemplateRequest.filterSensitiveLog, + outputFilterSensitiveLog: ReplicationConfigurationTemplate.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateReplicationConfigurationTemplateCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1CreateReplicationConfigurationTemplateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DeleteJobCommand.ts b/clients/client-drs/src/commands/DeleteJobCommand.ts new file mode 100644 index 000000000000..99d56f90a5e9 --- /dev/null +++ b/clients/client-drs/src/commands/DeleteJobCommand.ts @@ -0,0 +1,91 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DeleteJobRequest, DeleteJobResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteJobCommand, + serializeAws_restJson1DeleteJobCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteJobCommandInput extends DeleteJobRequest {} +export interface DeleteJobCommandOutput extends DeleteJobResponse, __MetadataBearer {} + +/** + *

Deletes a single Job by ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DeleteJobCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DeleteJobCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DeleteJobCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteJobCommandInput} for command's `input` shape. + * @see {@link DeleteJobCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DeleteJobCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteJobCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DeleteJobCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteJobRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteJobResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteJobCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteJobCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DeleteRecoveryInstanceCommand.ts b/clients/client-drs/src/commands/DeleteRecoveryInstanceCommand.ts new file mode 100644 index 000000000000..2627f86c1b3b --- /dev/null +++ b/clients/client-drs/src/commands/DeleteRecoveryInstanceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DeleteRecoveryInstanceRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteRecoveryInstanceCommand, + serializeAws_restJson1DeleteRecoveryInstanceCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteRecoveryInstanceCommandInput extends DeleteRecoveryInstanceRequest {} +export interface DeleteRecoveryInstanceCommandOutput extends __MetadataBearer {} + +/** + *

Deletes a single Recovery Instance by ID. This deletes the Recovery Instance resource from Elastic Disaster Recovery. The Recovery Instance must be disconnected first in order to delete it.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DeleteRecoveryInstanceCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DeleteRecoveryInstanceCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DeleteRecoveryInstanceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteRecoveryInstanceCommandInput} for command's `input` shape. + * @see {@link DeleteRecoveryInstanceCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DeleteRecoveryInstanceCommand extends $Command< + DeleteRecoveryInstanceCommandInput, + DeleteRecoveryInstanceCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteRecoveryInstanceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DeleteRecoveryInstanceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteRecoveryInstanceRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteRecoveryInstanceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteRecoveryInstanceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteRecoveryInstanceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DeleteReplicationConfigurationTemplateCommand.ts b/clients/client-drs/src/commands/DeleteReplicationConfigurationTemplateCommand.ts new file mode 100644 index 000000000000..c1023731500b --- /dev/null +++ b/clients/client-drs/src/commands/DeleteReplicationConfigurationTemplateCommand.ts @@ -0,0 +1,107 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { + DeleteReplicationConfigurationTemplateRequest, + DeleteReplicationConfigurationTemplateResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommand, + serializeAws_restJson1DeleteReplicationConfigurationTemplateCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteReplicationConfigurationTemplateCommandInput + extends DeleteReplicationConfigurationTemplateRequest {} +export interface DeleteReplicationConfigurationTemplateCommandOutput + extends DeleteReplicationConfigurationTemplateResponse, + __MetadataBearer {} + +/** + *

Deletes a single Replication Configuration Template by ID

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DeleteReplicationConfigurationTemplateCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DeleteReplicationConfigurationTemplateCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DeleteReplicationConfigurationTemplateCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteReplicationConfigurationTemplateCommandInput} for command's `input` shape. + * @see {@link DeleteReplicationConfigurationTemplateCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DeleteReplicationConfigurationTemplateCommand extends $Command< + DeleteReplicationConfigurationTemplateCommandInput, + DeleteReplicationConfigurationTemplateCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteReplicationConfigurationTemplateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DeleteReplicationConfigurationTemplateCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteReplicationConfigurationTemplateRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteReplicationConfigurationTemplateResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteReplicationConfigurationTemplateCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteReplicationConfigurationTemplateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DeleteSourceServerCommand.ts b/clients/client-drs/src/commands/DeleteSourceServerCommand.ts new file mode 100644 index 000000000000..f472143d7306 --- /dev/null +++ b/clients/client-drs/src/commands/DeleteSourceServerCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DeleteSourceServerRequest, DeleteSourceServerResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteSourceServerCommand, + serializeAws_restJson1DeleteSourceServerCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteSourceServerCommandInput extends DeleteSourceServerRequest {} +export interface DeleteSourceServerCommandOutput extends DeleteSourceServerResponse, __MetadataBearer {} + +/** + *

Deletes a single Source Server by ID. The Source Server must be disconnected first.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DeleteSourceServerCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DeleteSourceServerCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DeleteSourceServerCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteSourceServerCommandInput} for command's `input` shape. + * @see {@link DeleteSourceServerCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DeleteSourceServerCommand extends $Command< + DeleteSourceServerCommandInput, + DeleteSourceServerCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteSourceServerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DeleteSourceServerCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteSourceServerRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteSourceServerResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteSourceServerCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteSourceServerCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteSourceServerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DescribeJobLogItemsCommand.ts b/clients/client-drs/src/commands/DescribeJobLogItemsCommand.ts new file mode 100644 index 000000000000..e58ec831d174 --- /dev/null +++ b/clients/client-drs/src/commands/DescribeJobLogItemsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DescribeJobLogItemsRequest, DescribeJobLogItemsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeJobLogItemsCommand, + serializeAws_restJson1DescribeJobLogItemsCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeJobLogItemsCommandInput extends DescribeJobLogItemsRequest {} +export interface DescribeJobLogItemsCommandOutput extends DescribeJobLogItemsResponse, __MetadataBearer {} + +/** + *

Retrieves a detailed Job log with pagination.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DescribeJobLogItemsCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DescribeJobLogItemsCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DescribeJobLogItemsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeJobLogItemsCommandInput} for command's `input` shape. + * @see {@link DescribeJobLogItemsCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DescribeJobLogItemsCommand extends $Command< + DescribeJobLogItemsCommandInput, + DescribeJobLogItemsCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeJobLogItemsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DescribeJobLogItemsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeJobLogItemsRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeJobLogItemsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeJobLogItemsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeJobLogItemsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DescribeJobLogItemsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DescribeJobsCommand.ts b/clients/client-drs/src/commands/DescribeJobsCommand.ts new file mode 100644 index 000000000000..4f4ea6477bce --- /dev/null +++ b/clients/client-drs/src/commands/DescribeJobsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DescribeJobsRequest, DescribeJobsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeJobsCommand, + serializeAws_restJson1DescribeJobsCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeJobsCommandInput extends DescribeJobsRequest {} +export interface DescribeJobsCommandOutput extends DescribeJobsResponse, __MetadataBearer {} + +/** + *

Returns a list of Jobs. Use the JobsID and fromDate and toDate filters to limit which jobs are returned. The response is sorted by creationDataTime - latest date first. Jobs are created by the StartRecovery, TerminateRecoveryInstances and StartFailbackLaunch APIs. Jobs are also created by DiagnosticLaunch and TerminateDiagnosticInstances, which are APIs available only to *Support* and only used in response to relevant support tickets.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DescribeJobsCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DescribeJobsCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DescribeJobsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeJobsCommandInput} for command's `input` shape. + * @see {@link DescribeJobsCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DescribeJobsCommand extends $Command< + DescribeJobsCommandInput, + DescribeJobsCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeJobsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DescribeJobsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeJobsRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeJobsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeJobsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeJobsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DescribeJobsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DescribeRecoveryInstancesCommand.ts b/clients/client-drs/src/commands/DescribeRecoveryInstancesCommand.ts new file mode 100644 index 000000000000..ced0917897b6 --- /dev/null +++ b/clients/client-drs/src/commands/DescribeRecoveryInstancesCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DescribeRecoveryInstancesRequest, DescribeRecoveryInstancesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeRecoveryInstancesCommand, + serializeAws_restJson1DescribeRecoveryInstancesCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeRecoveryInstancesCommandInput extends DescribeRecoveryInstancesRequest {} +export interface DescribeRecoveryInstancesCommandOutput extends DescribeRecoveryInstancesResponse, __MetadataBearer {} + +/** + *

Lists all Recovery Instances or multiple Recovery Instances by ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DescribeRecoveryInstancesCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DescribeRecoveryInstancesCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DescribeRecoveryInstancesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeRecoveryInstancesCommandInput} for command's `input` shape. + * @see {@link DescribeRecoveryInstancesCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DescribeRecoveryInstancesCommand extends $Command< + DescribeRecoveryInstancesCommandInput, + DescribeRecoveryInstancesCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeRecoveryInstancesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DescribeRecoveryInstancesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeRecoveryInstancesRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeRecoveryInstancesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeRecoveryInstancesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeRecoveryInstancesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DescribeRecoveryInstancesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DescribeRecoverySnapshotsCommand.ts b/clients/client-drs/src/commands/DescribeRecoverySnapshotsCommand.ts new file mode 100644 index 000000000000..a32da9ce400b --- /dev/null +++ b/clients/client-drs/src/commands/DescribeRecoverySnapshotsCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DescribeRecoverySnapshotsRequest, DescribeRecoverySnapshotsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeRecoverySnapshotsCommand, + serializeAws_restJson1DescribeRecoverySnapshotsCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeRecoverySnapshotsCommandInput extends DescribeRecoverySnapshotsRequest {} +export interface DescribeRecoverySnapshotsCommandOutput extends DescribeRecoverySnapshotsResponse, __MetadataBearer {} + +/** + *

Lists all Recovery Snapshots for a single Source Server.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DescribeRecoverySnapshotsCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DescribeRecoverySnapshotsCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DescribeRecoverySnapshotsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeRecoverySnapshotsCommandInput} for command's `input` shape. + * @see {@link DescribeRecoverySnapshotsCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DescribeRecoverySnapshotsCommand extends $Command< + DescribeRecoverySnapshotsCommandInput, + DescribeRecoverySnapshotsCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeRecoverySnapshotsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DescribeRecoverySnapshotsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeRecoverySnapshotsRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeRecoverySnapshotsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeRecoverySnapshotsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeRecoverySnapshotsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DescribeRecoverySnapshotsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DescribeReplicationConfigurationTemplatesCommand.ts b/clients/client-drs/src/commands/DescribeReplicationConfigurationTemplatesCommand.ts new file mode 100644 index 000000000000..a7bab4eb6261 --- /dev/null +++ b/clients/client-drs/src/commands/DescribeReplicationConfigurationTemplatesCommand.ts @@ -0,0 +1,110 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { + DescribeReplicationConfigurationTemplatesRequest, + DescribeReplicationConfigurationTemplatesResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand, + serializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeReplicationConfigurationTemplatesCommandInput + extends DescribeReplicationConfigurationTemplatesRequest {} +export interface DescribeReplicationConfigurationTemplatesCommandOutput + extends DescribeReplicationConfigurationTemplatesResponse, + __MetadataBearer {} + +/** + *

Lists all ReplicationConfigurationTemplates, filtered by Source Server IDs.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DescribeReplicationConfigurationTemplatesCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DescribeReplicationConfigurationTemplatesCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DescribeReplicationConfigurationTemplatesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeReplicationConfigurationTemplatesCommandInput} for command's `input` shape. + * @see {@link DescribeReplicationConfigurationTemplatesCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DescribeReplicationConfigurationTemplatesCommand extends $Command< + DescribeReplicationConfigurationTemplatesCommandInput, + DescribeReplicationConfigurationTemplatesCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeReplicationConfigurationTemplatesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DescribeReplicationConfigurationTemplatesCommandInput, + DescribeReplicationConfigurationTemplatesCommandOutput + > { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DescribeReplicationConfigurationTemplatesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeReplicationConfigurationTemplatesRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeReplicationConfigurationTemplatesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DescribeReplicationConfigurationTemplatesCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DescribeSourceServersCommand.ts b/clients/client-drs/src/commands/DescribeSourceServersCommand.ts new file mode 100644 index 000000000000..64399e51231a --- /dev/null +++ b/clients/client-drs/src/commands/DescribeSourceServersCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DescribeSourceServersRequest, DescribeSourceServersResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeSourceServersCommand, + serializeAws_restJson1DescribeSourceServersCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeSourceServersCommandInput extends DescribeSourceServersRequest {} +export interface DescribeSourceServersCommandOutput extends DescribeSourceServersResponse, __MetadataBearer {} + +/** + *

Lists all Source Servers or multiple Source Servers filtered by ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DescribeSourceServersCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DescribeSourceServersCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DescribeSourceServersCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeSourceServersCommandInput} for command's `input` shape. + * @see {@link DescribeSourceServersCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DescribeSourceServersCommand extends $Command< + DescribeSourceServersCommandInput, + DescribeSourceServersCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeSourceServersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DescribeSourceServersCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeSourceServersRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeSourceServersResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeSourceServersCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeSourceServersCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DescribeSourceServersCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DisconnectRecoveryInstanceCommand.ts b/clients/client-drs/src/commands/DisconnectRecoveryInstanceCommand.ts new file mode 100644 index 000000000000..ae8dc6702526 --- /dev/null +++ b/clients/client-drs/src/commands/DisconnectRecoveryInstanceCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DisconnectRecoveryInstanceRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DisconnectRecoveryInstanceCommand, + serializeAws_restJson1DisconnectRecoveryInstanceCommand, +} from "../protocols/Aws_restJson1"; + +export interface DisconnectRecoveryInstanceCommandInput extends DisconnectRecoveryInstanceRequest {} +export interface DisconnectRecoveryInstanceCommandOutput extends __MetadataBearer {} + +/** + *

Disconnect a Recovery Instance from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Recovery Instance will be terminated / deleted within 90 minutes. If the agent on the Recovery Instance has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the Recovery Instance will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DisconnectRecoveryInstanceCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DisconnectRecoveryInstanceCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DisconnectRecoveryInstanceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DisconnectRecoveryInstanceCommandInput} for command's `input` shape. + * @see {@link DisconnectRecoveryInstanceCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DisconnectRecoveryInstanceCommand extends $Command< + DisconnectRecoveryInstanceCommandInput, + DisconnectRecoveryInstanceCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisconnectRecoveryInstanceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DisconnectRecoveryInstanceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DisconnectRecoveryInstanceRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DisconnectRecoveryInstanceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DisconnectRecoveryInstanceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DisconnectRecoveryInstanceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/DisconnectSourceServerCommand.ts b/clients/client-drs/src/commands/DisconnectSourceServerCommand.ts new file mode 100644 index 000000000000..697113e1c471 --- /dev/null +++ b/clients/client-drs/src/commands/DisconnectSourceServerCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { DisconnectSourceServerRequest, SourceServer } from "../models/models_0"; +import { + deserializeAws_restJson1DisconnectSourceServerCommand, + serializeAws_restJson1DisconnectSourceServerCommand, +} from "../protocols/Aws_restJson1"; + +export interface DisconnectSourceServerCommandInput extends DisconnectSourceServerRequest {} +export interface DisconnectSourceServerCommandOutput extends SourceServer, __MetadataBearer {} + +/** + *

Disconnects a specific Source Server from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Source Server will be terminated / deleted within 90 minutes. You cannot disconnect a Source Server if it has a Recovery Instance. If the agent on the Source Server has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the SourceServer will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, DisconnectSourceServerCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, DisconnectSourceServerCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new DisconnectSourceServerCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DisconnectSourceServerCommandInput} for command's `input` shape. + * @see {@link DisconnectSourceServerCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class DisconnectSourceServerCommand extends $Command< + DisconnectSourceServerCommandInput, + DisconnectSourceServerCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisconnectSourceServerCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "DisconnectSourceServerCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DisconnectSourceServerRequest.filterSensitiveLog, + outputFilterSensitiveLog: SourceServer.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DisconnectSourceServerCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DisconnectSourceServerCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DisconnectSourceServerCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/GetFailbackReplicationConfigurationCommand.ts b/clients/client-drs/src/commands/GetFailbackReplicationConfigurationCommand.ts new file mode 100644 index 000000000000..3f65b71a6215 --- /dev/null +++ b/clients/client-drs/src/commands/GetFailbackReplicationConfigurationCommand.ts @@ -0,0 +1,106 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { + GetFailbackReplicationConfigurationRequest, + GetFailbackReplicationConfigurationResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1GetFailbackReplicationConfigurationCommand, + serializeAws_restJson1GetFailbackReplicationConfigurationCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetFailbackReplicationConfigurationCommandInput extends GetFailbackReplicationConfigurationRequest {} +export interface GetFailbackReplicationConfigurationCommandOutput + extends GetFailbackReplicationConfigurationResponse, + __MetadataBearer {} + +/** + *

Lists all Failback ReplicationConfigurations, filtered by Recovery Instance ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, GetFailbackReplicationConfigurationCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, GetFailbackReplicationConfigurationCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new GetFailbackReplicationConfigurationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetFailbackReplicationConfigurationCommandInput} for command's `input` shape. + * @see {@link GetFailbackReplicationConfigurationCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class GetFailbackReplicationConfigurationCommand extends $Command< + GetFailbackReplicationConfigurationCommandInput, + GetFailbackReplicationConfigurationCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetFailbackReplicationConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "GetFailbackReplicationConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetFailbackReplicationConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetFailbackReplicationConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetFailbackReplicationConfigurationCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1GetFailbackReplicationConfigurationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1GetFailbackReplicationConfigurationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/GetLaunchConfigurationCommand.ts b/clients/client-drs/src/commands/GetLaunchConfigurationCommand.ts new file mode 100644 index 000000000000..f883726cbd19 --- /dev/null +++ b/clients/client-drs/src/commands/GetLaunchConfigurationCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { GetLaunchConfigurationRequest, LaunchConfiguration } from "../models/models_0"; +import { + deserializeAws_restJson1GetLaunchConfigurationCommand, + serializeAws_restJson1GetLaunchConfigurationCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetLaunchConfigurationCommandInput extends GetLaunchConfigurationRequest {} +export interface GetLaunchConfigurationCommandOutput extends LaunchConfiguration, __MetadataBearer {} + +/** + *

Gets a LaunchConfiguration, filtered by Source Server IDs.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, GetLaunchConfigurationCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, GetLaunchConfigurationCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new GetLaunchConfigurationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetLaunchConfigurationCommandInput} for command's `input` shape. + * @see {@link GetLaunchConfigurationCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class GetLaunchConfigurationCommand extends $Command< + GetLaunchConfigurationCommandInput, + GetLaunchConfigurationCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetLaunchConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "GetLaunchConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetLaunchConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: LaunchConfiguration.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetLaunchConfigurationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetLaunchConfigurationCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetLaunchConfigurationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/GetReplicationConfigurationCommand.ts b/clients/client-drs/src/commands/GetReplicationConfigurationCommand.ts new file mode 100644 index 000000000000..1888f97c2526 --- /dev/null +++ b/clients/client-drs/src/commands/GetReplicationConfigurationCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { GetReplicationConfigurationRequest, ReplicationConfiguration } from "../models/models_0"; +import { + deserializeAws_restJson1GetReplicationConfigurationCommand, + serializeAws_restJson1GetReplicationConfigurationCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetReplicationConfigurationCommandInput extends GetReplicationConfigurationRequest {} +export interface GetReplicationConfigurationCommandOutput extends ReplicationConfiguration, __MetadataBearer {} + +/** + *

Gets a ReplicationConfiguration, filtered by Source Server ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, GetReplicationConfigurationCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, GetReplicationConfigurationCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new GetReplicationConfigurationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetReplicationConfigurationCommandInput} for command's `input` shape. + * @see {@link GetReplicationConfigurationCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class GetReplicationConfigurationCommand extends $Command< + GetReplicationConfigurationCommandInput, + GetReplicationConfigurationCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetReplicationConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "GetReplicationConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetReplicationConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: ReplicationConfiguration.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetReplicationConfigurationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetReplicationConfigurationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1GetReplicationConfigurationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/InitializeServiceCommand.ts b/clients/client-drs/src/commands/InitializeServiceCommand.ts new file mode 100644 index 000000000000..334e8f9fca71 --- /dev/null +++ b/clients/client-drs/src/commands/InitializeServiceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { InitializeServiceRequest, InitializeServiceResponse } from "../models/models_0"; +import { + deserializeAws_restJson1InitializeServiceCommand, + serializeAws_restJson1InitializeServiceCommand, +} from "../protocols/Aws_restJson1"; + +export interface InitializeServiceCommandInput extends InitializeServiceRequest {} +export interface InitializeServiceCommandOutput extends InitializeServiceResponse, __MetadataBearer {} + +/** + *

Initialize Elastic Disaster Recovery.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, InitializeServiceCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, InitializeServiceCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new InitializeServiceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link InitializeServiceCommandInput} for command's `input` shape. + * @see {@link InitializeServiceCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class InitializeServiceCommand extends $Command< + InitializeServiceCommandInput, + InitializeServiceCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: InitializeServiceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "InitializeServiceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: InitializeServiceRequest.filterSensitiveLog, + outputFilterSensitiveLog: InitializeServiceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: InitializeServiceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1InitializeServiceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1InitializeServiceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/ListTagsForResourceCommand.ts b/clients/client-drs/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..c7a538ca0345 --- /dev/null +++ b/clients/client-drs/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListTagsForResourceCommand, + serializeAws_restJson1ListTagsForResourceCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + *

List all tags for your Elastic Disaster Recovery resources.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, ListTagsForResourceCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, ListTagsForResourceCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListTagsForResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListTagsForResourceResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListTagsForResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListTagsForResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListTagsForResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/RetryDataReplicationCommand.ts b/clients/client-drs/src/commands/RetryDataReplicationCommand.ts new file mode 100644 index 000000000000..f270d414f528 --- /dev/null +++ b/clients/client-drs/src/commands/RetryDataReplicationCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { RetryDataReplicationRequest, SourceServer } from "../models/models_0"; +import { + deserializeAws_restJson1RetryDataReplicationCommand, + serializeAws_restJson1RetryDataReplicationCommand, +} from "../protocols/Aws_restJson1"; + +export interface RetryDataReplicationCommandInput extends RetryDataReplicationRequest {} +export interface RetryDataReplicationCommandOutput extends SourceServer, __MetadataBearer {} + +/** + *

Causes the data replication initiation sequence to begin immediately upon next Handshake for the specified Source Server ID, regardless of when the previous initiation started. This command will work only if the Source Server is stalled or is in a DISCONNECTED or STOPPED state.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, RetryDataReplicationCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, RetryDataReplicationCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new RetryDataReplicationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link RetryDataReplicationCommandInput} for command's `input` shape. + * @see {@link RetryDataReplicationCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class RetryDataReplicationCommand extends $Command< + RetryDataReplicationCommandInput, + RetryDataReplicationCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: RetryDataReplicationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "RetryDataReplicationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: RetryDataReplicationRequest.filterSensitiveLog, + outputFilterSensitiveLog: SourceServer.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: RetryDataReplicationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1RetryDataReplicationCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1RetryDataReplicationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/StartFailbackLaunchCommand.ts b/clients/client-drs/src/commands/StartFailbackLaunchCommand.ts new file mode 100644 index 000000000000..000746ab1558 --- /dev/null +++ b/clients/client-drs/src/commands/StartFailbackLaunchCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { StartFailbackLaunchRequest, StartFailbackLaunchResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StartFailbackLaunchCommand, + serializeAws_restJson1StartFailbackLaunchCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartFailbackLaunchCommandInput extends StartFailbackLaunchRequest {} +export interface StartFailbackLaunchCommandOutput extends StartFailbackLaunchResponse, __MetadataBearer {} + +/** + *

Initiates a Job for launching the machine that is being failed back to from the specified Recovery Instance. This will run conversion on the failback client and will reboot your machine, thus completing the failback process.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, StartFailbackLaunchCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, StartFailbackLaunchCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new StartFailbackLaunchCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartFailbackLaunchCommandInput} for command's `input` shape. + * @see {@link StartFailbackLaunchCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class StartFailbackLaunchCommand extends $Command< + StartFailbackLaunchCommandInput, + StartFailbackLaunchCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartFailbackLaunchCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "StartFailbackLaunchCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartFailbackLaunchRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartFailbackLaunchResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartFailbackLaunchCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartFailbackLaunchCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StartFailbackLaunchCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/StartRecoveryCommand.ts b/clients/client-drs/src/commands/StartRecoveryCommand.ts new file mode 100644 index 000000000000..119a0127ff7b --- /dev/null +++ b/clients/client-drs/src/commands/StartRecoveryCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { StartRecoveryRequest, StartRecoveryResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StartRecoveryCommand, + serializeAws_restJson1StartRecoveryCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartRecoveryCommandInput extends StartRecoveryRequest {} +export interface StartRecoveryCommandOutput extends StartRecoveryResponse, __MetadataBearer {} + +/** + *

Launches Recovery Instances for the specified Source Servers. For each Source Server you may choose a point in time snapshot to launch from, or use an on demand snapshot.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, StartRecoveryCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, StartRecoveryCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new StartRecoveryCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartRecoveryCommandInput} for command's `input` shape. + * @see {@link StartRecoveryCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class StartRecoveryCommand extends $Command< + StartRecoveryCommandInput, + StartRecoveryCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartRecoveryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "StartRecoveryCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartRecoveryRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartRecoveryResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartRecoveryCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartRecoveryCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StartRecoveryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/StopFailbackCommand.ts b/clients/client-drs/src/commands/StopFailbackCommand.ts new file mode 100644 index 000000000000..f095ed96563d --- /dev/null +++ b/clients/client-drs/src/commands/StopFailbackCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { StopFailbackRequest } from "../models/models_0"; +import { + deserializeAws_restJson1StopFailbackCommand, + serializeAws_restJson1StopFailbackCommand, +} from "../protocols/Aws_restJson1"; + +export interface StopFailbackCommandInput extends StopFailbackRequest {} +export interface StopFailbackCommandOutput extends __MetadataBearer {} + +/** + *

Stops the failback process for a specified Recovery Instance. This changes the Failback State of the Recovery Instance back to FAILBACK_NOT_STARTED.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, StopFailbackCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, StopFailbackCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new StopFailbackCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StopFailbackCommandInput} for command's `input` shape. + * @see {@link StopFailbackCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class StopFailbackCommand extends $Command< + StopFailbackCommandInput, + StopFailbackCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StopFailbackCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "StopFailbackCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StopFailbackRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StopFailbackCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StopFailbackCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StopFailbackCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/TagResourceCommand.ts b/clients/client-drs/src/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..f9e72cf3b18e --- /dev/null +++ b/clients/client-drs/src/commands/TagResourceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { TagResourceRequest } from "../models/models_0"; +import { + deserializeAws_restJson1TagResourceCommand, + serializeAws_restJson1TagResourceCommand, +} from "../protocols/Aws_restJson1"; + +export interface TagResourceCommandInput extends TagResourceRequest {} +export interface TagResourceCommandOutput extends __MetadataBearer {} + +/** + *

Adds or overwrites only the specified tags for the specified Elastic Disaster Recovery resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, TagResourceCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, TagResourceCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: TagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: TagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1TagResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1TagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/TerminateRecoveryInstancesCommand.ts b/clients/client-drs/src/commands/TerminateRecoveryInstancesCommand.ts new file mode 100644 index 000000000000..2b1896cf101e --- /dev/null +++ b/clients/client-drs/src/commands/TerminateRecoveryInstancesCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { TerminateRecoveryInstancesRequest, TerminateRecoveryInstancesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1TerminateRecoveryInstancesCommand, + serializeAws_restJson1TerminateRecoveryInstancesCommand, +} from "../protocols/Aws_restJson1"; + +export interface TerminateRecoveryInstancesCommandInput extends TerminateRecoveryInstancesRequest {} +export interface TerminateRecoveryInstancesCommandOutput extends TerminateRecoveryInstancesResponse, __MetadataBearer {} + +/** + *

Initiates a Job for terminating the EC2 resources associated with the specified Recovery Instances, and then will delete the Recovery Instances from the Elastic Disaster Recovery service.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, TerminateRecoveryInstancesCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, TerminateRecoveryInstancesCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new TerminateRecoveryInstancesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link TerminateRecoveryInstancesCommandInput} for command's `input` shape. + * @see {@link TerminateRecoveryInstancesCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class TerminateRecoveryInstancesCommand extends $Command< + TerminateRecoveryInstancesCommandInput, + TerminateRecoveryInstancesCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TerminateRecoveryInstancesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "TerminateRecoveryInstancesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: TerminateRecoveryInstancesRequest.filterSensitiveLog, + outputFilterSensitiveLog: TerminateRecoveryInstancesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: TerminateRecoveryInstancesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1TerminateRecoveryInstancesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1TerminateRecoveryInstancesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/UntagResourceCommand.ts b/clients/client-drs/src/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..9d7cad681b3f --- /dev/null +++ b/clients/client-drs/src/commands/UntagResourceCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { UntagResourceRequest } from "../models/models_0"; +import { + deserializeAws_restJson1UntagResourceCommand, + serializeAws_restJson1UntagResourceCommand, +} from "../protocols/Aws_restJson1"; + +export interface UntagResourceCommandInput extends UntagResourceRequest {} +export interface UntagResourceCommandOutput extends __MetadataBearer {} + +/** + *

Deletes the specified set of tags from the specified set of Elastic Disaster Recovery resources.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, UntagResourceCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, UntagResourceCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UntagResourceRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UntagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UntagResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UntagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/UpdateFailbackReplicationConfigurationCommand.ts b/clients/client-drs/src/commands/UpdateFailbackReplicationConfigurationCommand.ts new file mode 100644 index 000000000000..e423e9b7e021 --- /dev/null +++ b/clients/client-drs/src/commands/UpdateFailbackReplicationConfigurationCommand.ts @@ -0,0 +1,102 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { UpdateFailbackReplicationConfigurationRequest } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateFailbackReplicationConfigurationCommand, + serializeAws_restJson1UpdateFailbackReplicationConfigurationCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateFailbackReplicationConfigurationCommandInput + extends UpdateFailbackReplicationConfigurationRequest {} +export interface UpdateFailbackReplicationConfigurationCommandOutput extends __MetadataBearer {} + +/** + *

Allows you to update the failback replication configuration of a Recovery Instance by ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, UpdateFailbackReplicationConfigurationCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, UpdateFailbackReplicationConfigurationCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new UpdateFailbackReplicationConfigurationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateFailbackReplicationConfigurationCommandInput} for command's `input` shape. + * @see {@link UpdateFailbackReplicationConfigurationCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class UpdateFailbackReplicationConfigurationCommand extends $Command< + UpdateFailbackReplicationConfigurationCommandInput, + UpdateFailbackReplicationConfigurationCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateFailbackReplicationConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "UpdateFailbackReplicationConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateFailbackReplicationConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateFailbackReplicationConfigurationCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateFailbackReplicationConfigurationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1UpdateFailbackReplicationConfigurationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/UpdateLaunchConfigurationCommand.ts b/clients/client-drs/src/commands/UpdateLaunchConfigurationCommand.ts new file mode 100644 index 000000000000..246ab37183fb --- /dev/null +++ b/clients/client-drs/src/commands/UpdateLaunchConfigurationCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { LaunchConfiguration, UpdateLaunchConfigurationRequest } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateLaunchConfigurationCommand, + serializeAws_restJson1UpdateLaunchConfigurationCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateLaunchConfigurationCommandInput extends UpdateLaunchConfigurationRequest {} +export interface UpdateLaunchConfigurationCommandOutput extends LaunchConfiguration, __MetadataBearer {} + +/** + *

Updates a LaunchConfiguration by Source Server ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, UpdateLaunchConfigurationCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, UpdateLaunchConfigurationCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new UpdateLaunchConfigurationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateLaunchConfigurationCommandInput} for command's `input` shape. + * @see {@link UpdateLaunchConfigurationCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class UpdateLaunchConfigurationCommand extends $Command< + UpdateLaunchConfigurationCommandInput, + UpdateLaunchConfigurationCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateLaunchConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "UpdateLaunchConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateLaunchConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: LaunchConfiguration.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateLaunchConfigurationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateLaunchConfigurationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1UpdateLaunchConfigurationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/UpdateReplicationConfigurationCommand.ts b/clients/client-drs/src/commands/UpdateReplicationConfigurationCommand.ts new file mode 100644 index 000000000000..d5f974380ccf --- /dev/null +++ b/clients/client-drs/src/commands/UpdateReplicationConfigurationCommand.ts @@ -0,0 +1,101 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { ReplicationConfiguration, UpdateReplicationConfigurationRequest } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateReplicationConfigurationCommand, + serializeAws_restJson1UpdateReplicationConfigurationCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateReplicationConfigurationCommandInput extends UpdateReplicationConfigurationRequest {} +export interface UpdateReplicationConfigurationCommandOutput extends ReplicationConfiguration, __MetadataBearer {} + +/** + *

Allows you to update a ReplicationConfiguration by Source Server ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, UpdateReplicationConfigurationCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, UpdateReplicationConfigurationCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new UpdateReplicationConfigurationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateReplicationConfigurationCommandInput} for command's `input` shape. + * @see {@link UpdateReplicationConfigurationCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class UpdateReplicationConfigurationCommand extends $Command< + UpdateReplicationConfigurationCommandInput, + UpdateReplicationConfigurationCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateReplicationConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "UpdateReplicationConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateReplicationConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: ReplicationConfiguration.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateReplicationConfigurationCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateReplicationConfigurationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1UpdateReplicationConfigurationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/UpdateReplicationConfigurationTemplateCommand.ts b/clients/client-drs/src/commands/UpdateReplicationConfigurationTemplateCommand.ts new file mode 100644 index 000000000000..bb4b60873d74 --- /dev/null +++ b/clients/client-drs/src/commands/UpdateReplicationConfigurationTemplateCommand.ts @@ -0,0 +1,104 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DrsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DrsClient"; +import { ReplicationConfigurationTemplate, UpdateReplicationConfigurationTemplateRequest } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand, + serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateReplicationConfigurationTemplateCommandInput + extends UpdateReplicationConfigurationTemplateRequest {} +export interface UpdateReplicationConfigurationTemplateCommandOutput + extends ReplicationConfigurationTemplate, + __MetadataBearer {} + +/** + *

Updates a ReplicationConfigurationTemplate by ID.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DrsClient, UpdateReplicationConfigurationTemplateCommand } from "@aws-sdk/client-drs"; // ES Modules import + * // const { DrsClient, UpdateReplicationConfigurationTemplateCommand } = require("@aws-sdk/client-drs"); // CommonJS import + * const client = new DrsClient(config); + * const command = new UpdateReplicationConfigurationTemplateCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateReplicationConfigurationTemplateCommandInput} for command's `input` shape. + * @see {@link UpdateReplicationConfigurationTemplateCommandOutput} for command's `response` shape. + * @see {@link DrsClientResolvedConfig | config} for DrsClient's `config` shape. + * + */ +export class UpdateReplicationConfigurationTemplateCommand extends $Command< + UpdateReplicationConfigurationTemplateCommandInput, + UpdateReplicationConfigurationTemplateCommandOutput, + DrsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateReplicationConfigurationTemplateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DrsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DrsClient"; + const commandName = "UpdateReplicationConfigurationTemplateCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateReplicationConfigurationTemplateRequest.filterSensitiveLog, + outputFilterSensitiveLog: ReplicationConfigurationTemplate.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateReplicationConfigurationTemplateCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-drs/src/commands/index.ts b/clients/client-drs/src/commands/index.ts new file mode 100644 index 000000000000..5b417f093f74 --- /dev/null +++ b/clients/client-drs/src/commands/index.ts @@ -0,0 +1,29 @@ +export * from "./CreateReplicationConfigurationTemplateCommand"; +export * from "./DeleteJobCommand"; +export * from "./DeleteRecoveryInstanceCommand"; +export * from "./DeleteReplicationConfigurationTemplateCommand"; +export * from "./DeleteSourceServerCommand"; +export * from "./DescribeJobLogItemsCommand"; +export * from "./DescribeJobsCommand"; +export * from "./DescribeRecoveryInstancesCommand"; +export * from "./DescribeRecoverySnapshotsCommand"; +export * from "./DescribeReplicationConfigurationTemplatesCommand"; +export * from "./DescribeSourceServersCommand"; +export * from "./DisconnectRecoveryInstanceCommand"; +export * from "./DisconnectSourceServerCommand"; +export * from "./GetFailbackReplicationConfigurationCommand"; +export * from "./GetLaunchConfigurationCommand"; +export * from "./GetReplicationConfigurationCommand"; +export * from "./InitializeServiceCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./RetryDataReplicationCommand"; +export * from "./StartFailbackLaunchCommand"; +export * from "./StartRecoveryCommand"; +export * from "./StopFailbackCommand"; +export * from "./TagResourceCommand"; +export * from "./TerminateRecoveryInstancesCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateFailbackReplicationConfigurationCommand"; +export * from "./UpdateLaunchConfigurationCommand"; +export * from "./UpdateReplicationConfigurationCommand"; +export * from "./UpdateReplicationConfigurationTemplateCommand"; diff --git a/clients/client-drs/src/endpoints.ts b/clients/client-drs/src/endpoints.ts new file mode 100644 index 000000000000..861635d0e31d --- /dev/null +++ b/clients/client-drs/src/endpoints.ts @@ -0,0 +1,134 @@ +import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; + +const regionHash: RegionHash = {}; + +const partitionHash: PartitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "drs.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "drs-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "drs-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "drs.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + regionRegex: "^cn\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "drs.{region}.amazonaws.com.cn", + tags: [], + }, + { + hostname: "drs-fips.{region}.amazonaws.com.cn", + tags: ["fips"], + }, + { + hostname: "drs-fips.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack", "fips"], + }, + { + hostname: "drs.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack"], + }, + ], + }, + "aws-iso": { + regions: ["us-iso-east-1", "us-iso-west-1"], + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "drs.{region}.c2s.ic.gov", + tags: [], + }, + { + hostname: "drs-fips.{region}.c2s.ic.gov", + tags: ["fips"], + }, + ], + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "drs.{region}.sc2s.sgov.gov", + tags: [], + }, + { + hostname: "drs-fips.{region}.sc2s.sgov.gov", + tags: ["fips"], + }, + ], + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-west-1"], + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "drs.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "drs-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "drs-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "drs.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, +}; + +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => + getRegionInfo(region, { + ...options, + signingService: "drs", + regionHash, + partitionHash, + }); diff --git a/clients/client-drs/src/index.ts b/clients/client-drs/src/index.ts new file mode 100644 index 000000000000..bff96309b36b --- /dev/null +++ b/clients/client-drs/src/index.ts @@ -0,0 +1,5 @@ +export * from "./Drs"; +export * from "./DrsClient"; +export * from "./commands"; +export * from "./models"; +export * from "./pagination"; diff --git a/clients/client-drs/src/models/index.ts b/clients/client-drs/src/models/index.ts new file mode 100644 index 000000000000..09c5d6e09b8c --- /dev/null +++ b/clients/client-drs/src/models/index.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/clients/client-drs/src/models/models_0.ts b/clients/client-drs/src/models/models_0.ts new file mode 100644 index 000000000000..3da8e1b987dd --- /dev/null +++ b/clients/client-drs/src/models/models_0.ts @@ -0,0 +1,3055 @@ +import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; + +/** + *

TYou do not have sufficient access to perform this action.

+ */ +export interface AccessDeniedException extends __SmithyException, $MetadataBearer { + name: "AccessDeniedException"; + $fault: "client"; + message?: string; + code?: string; +} + +export namespace AccessDeniedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AccessDeniedException): any => ({ + ...obj, + }); +} + +/** + *

The request could not be completed due to a conflict with the current state of the target resource.

+ */ +export interface ConflictException extends __SmithyException, $MetadataBearer { + name: "ConflictException"; + $fault: "client"; + message?: string; + code?: string; + /** + *

The ID of the resource.

+ */ + resourceId?: string; + + /** + *

The type of the resource.

+ */ + resourceType?: string; +} + +export namespace ConflictException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ConflictException): any => ({ + ...obj, + }); +} + +/** + *

Information about a server's CPU.

+ */ +export interface CPU { + /** + *

The number of CPU cores.

+ */ + cores?: number; + + /** + *

The model name of the CPU.

+ */ + modelName?: string; +} + +export namespace CPU { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CPU): any => ({ + ...obj, + }); +} + +export enum ReplicationConfigurationDataPlaneRouting { + PRIVATE_IP = "PRIVATE_IP", + PUBLIC_IP = "PUBLIC_IP", +} + +export enum ReplicationConfigurationDefaultLargeStagingDiskType { + GP2 = "GP2", + GP3 = "GP3", + ST1 = "ST1", +} + +export enum ReplicationConfigurationEbsEncryption { + CUSTOM = "CUSTOM", + DEFAULT = "DEFAULT", +} + +export enum PITPolicyRuleUnits { + DAY = "DAY", + HOUR = "HOUR", + MINUTE = "MINUTE", +} + +/** + *

A rule in the Point in Time (PIT) policy representing when to take snapshots and how long to retain them for.

+ */ +export interface PITPolicyRule { + /** + *

The ID of the rule.

+ */ + ruleID?: number; + + /** + *

The units used to measure the interval and retentionDuration.

+ */ + units: PITPolicyRuleUnits | string | undefined; + + /** + *

How often, in the chosen units, a snapshot should be taken.

+ */ + interval: number | undefined; + + /** + *

The duration to retain a snapshot for, in the chosen units.

+ */ + retentionDuration: number | undefined; + + /** + *

Whether this rule is enabled or not.

+ */ + enabled?: boolean; +} + +export namespace PITPolicyRule { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PITPolicyRule): any => ({ + ...obj, + }); +} + +export interface CreateReplicationConfigurationTemplateRequest { + /** + *

The subnet to be used by the replication staging area.

+ */ + stagingAreaSubnetId: string | undefined; + + /** + *

Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration Template.

+ */ + associateDefaultSecurityGroup: boolean | undefined; + + /** + *

The security group IDs that will be used by the replication server.

+ */ + replicationServersSecurityGroupsIDs: string[] | undefined; + + /** + *

The instance type to be used for the replication server.

+ */ + replicationServerInstanceType: string | undefined; + + /** + *

Whether to use a dedicated Replication Server in the replication staging area.

+ */ + useDedicatedReplicationServer: boolean | undefined; + + /** + *

The Staging Disk EBS volume type to be used during replication.

+ */ + defaultLargeStagingDiskType: ReplicationConfigurationDefaultLargeStagingDiskType | string | undefined; + + /** + *

The type of EBS encryption to be used during replication.

+ */ + ebsEncryption: ReplicationConfigurationEbsEncryption | string | undefined; + + /** + *

The ARN of the EBS encryption key to be used during replication.

+ */ + ebsEncryptionKeyArn?: string; + + /** + *

Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

+ */ + bandwidthThrottling: number | undefined; + + /** + *

The data plane routing mechanism that will be used for replication.

+ */ + dataPlaneRouting: ReplicationConfigurationDataPlaneRouting | string | undefined; + + /** + *

Whether to create a Public IP for the Recovery Instance by default.

+ */ + createPublicIP: boolean | undefined; + + /** + *

A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

+ */ + stagingAreaTags: { [key: string]: string } | undefined; + + /** + *

The Point in time (PIT) policy to manage snapshots taken during replication.

+ */ + pitPolicy: PITPolicyRule[] | undefined; + + /** + *

A set of tags to be associated with the Replication Configuration Template resource.

+ */ + tags?: { [key: string]: string }; +} + +export namespace CreateReplicationConfigurationTemplateRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateReplicationConfigurationTemplateRequest): any => ({ + ...obj, + ...(obj.stagingAreaTags && { stagingAreaTags: SENSITIVE_STRING }), + ...(obj.tags && { tags: SENSITIVE_STRING }), + }); +} + +/** + *

The request processing has failed because of an unknown error, exception or failure.

+ */ +export interface InternalServerException extends __SmithyException, $MetadataBearer { + name: "InternalServerException"; + $fault: "server"; + message: string | undefined; + /** + *

The number of seconds after which the request should be safe to retry.

+ */ + retryAfterSeconds?: number; +} + +export namespace InternalServerException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InternalServerException): any => ({ + ...obj, + }); +} + +export interface ReplicationConfigurationTemplate { + /** + *

The Replication Configuration Template ID.

+ */ + replicationConfigurationTemplateID: string | undefined; + + /** + *

The Replication Configuration Template ARN.

+ */ + arn?: string; + + /** + *

The subnet to be used by the replication staging area.

+ */ + stagingAreaSubnetId?: string; + + /** + *

Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration Template.

+ */ + associateDefaultSecurityGroup?: boolean; + + /** + *

The security group IDs that will be used by the replication server.

+ */ + replicationServersSecurityGroupsIDs?: string[]; + + /** + *

The instance type to be used for the replication server.

+ */ + replicationServerInstanceType?: string; + + /** + *

Whether to use a dedicated Replication Server in the replication staging area.

+ */ + useDedicatedReplicationServer?: boolean; + + /** + *

The Staging Disk EBS volume type to be used during replication.

+ */ + defaultLargeStagingDiskType?: ReplicationConfigurationDefaultLargeStagingDiskType | string; + + /** + *

The type of EBS encryption to be used during replication.

+ */ + ebsEncryption?: ReplicationConfigurationEbsEncryption | string; + + /** + *

The ARN of the EBS encryption key to be used during replication.

+ */ + ebsEncryptionKeyArn?: string; + + /** + *

Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

+ */ + bandwidthThrottling?: number; + + /** + *

The data plane routing mechanism that will be used for replication.

+ */ + dataPlaneRouting?: ReplicationConfigurationDataPlaneRouting | string; + + /** + *

Whether to create a Public IP for the Recovery Instance by default.

+ */ + createPublicIP?: boolean; + + /** + *

A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

+ */ + stagingAreaTags?: { [key: string]: string }; + + /** + *

A set of tags to be associated with the Replication Configuration Template resource.

+ */ + tags?: { [key: string]: string }; + + /** + *

The Point in time (PIT) policy to manage snapshots taken during replication.

+ */ + pitPolicy?: PITPolicyRule[]; +} + +export namespace ReplicationConfigurationTemplate { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ReplicationConfigurationTemplate): any => ({ + ...obj, + ...(obj.stagingAreaTags && { stagingAreaTags: SENSITIVE_STRING }), + ...(obj.tags && { tags: SENSITIVE_STRING }), + }); +} + +/** + *

The request could not be completed because its exceeded the service quota.

+ */ +export interface ServiceQuotaExceededException extends __SmithyException, $MetadataBearer { + name: "ServiceQuotaExceededException"; + $fault: "client"; + message?: string; + code?: string; + /** + *

The ID of the resource.

+ */ + resourceId?: string; + + /** + *

The type of the resource.

+ */ + resourceType?: string; + + /** + *

Service code.

+ */ + serviceCode?: string; + + /** + *

Quota code.

+ */ + quotaCode?: string; +} + +export namespace ServiceQuotaExceededException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceQuotaExceededException): any => ({ + ...obj, + }); +} + +/** + *

The request was denied due to request throttling.

+ */ +export interface ThrottlingException extends __SmithyException, $MetadataBearer { + name: "ThrottlingException"; + $fault: "client"; + message: string | undefined; + /** + *

Service code.

+ */ + serviceCode?: string; + + /** + *

Quota code.

+ */ + quotaCode?: string; + + /** + *

The number of seconds after which the request should be safe to retry.

+ */ + retryAfterSeconds?: string; +} + +export namespace ThrottlingException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ThrottlingException): any => ({ + ...obj, + }); +} + +/** + *

The account performing the request has not been initialized.

+ */ +export interface UninitializedAccountException extends __SmithyException, $MetadataBearer { + name: "UninitializedAccountException"; + $fault: "client"; + message?: string; + code?: string; +} + +export namespace UninitializedAccountException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UninitializedAccountException): any => ({ + ...obj, + }); +} + +/** + *

Validate exception field.

+ */ +export interface ValidationExceptionField { + /** + *

Validate exception field name.

+ */ + name?: string; + + /** + *

Validate exception field message.

+ */ + message?: string; +} + +export namespace ValidationExceptionField { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ValidationExceptionField): any => ({ + ...obj, + }); +} + +export enum ValidationExceptionReason { + CANNOT_PARSE = "cannotParse", + FIELD_VALIDATION_FAILED = "fieldValidationFailed", + OTHER = "other", + UNKNOWN_OPERATION = "unknownOperation", +} + +/** + *

The input fails to satisfy the constraints specified by the AWS service.

+ */ +export interface ValidationException extends __SmithyException, $MetadataBearer { + name: "ValidationException"; + $fault: "client"; + message?: string; + code?: string; + /** + *

Validation exception reason.

+ */ + reason?: ValidationExceptionReason | string; + + /** + *

A list of fields that failed validation.

+ */ + fieldList?: ValidationExceptionField[]; +} + +export namespace ValidationException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ValidationException): any => ({ + ...obj, + }); +} + +export enum DataReplicationErrorString { + AGENT_NOT_SEEN = "AGENT_NOT_SEEN", + FAILED_TO_ATTACH_STAGING_DISKS = "FAILED_TO_ATTACH_STAGING_DISKS", + FAILED_TO_AUTHENTICATE_WITH_SERVICE = "FAILED_TO_AUTHENTICATE_WITH_SERVICE", + FAILED_TO_BOOT_REPLICATION_SERVER = "FAILED_TO_BOOT_REPLICATION_SERVER", + FAILED_TO_CONNECT_AGENT_TO_REPLICATION_SERVER = "FAILED_TO_CONNECT_AGENT_TO_REPLICATION_SERVER", + FAILED_TO_CREATE_SECURITY_GROUP = "FAILED_TO_CREATE_SECURITY_GROUP", + FAILED_TO_CREATE_STAGING_DISKS = "FAILED_TO_CREATE_STAGING_DISKS", + FAILED_TO_DOWNLOAD_REPLICATION_SOFTWARE = "FAILED_TO_DOWNLOAD_REPLICATION_SOFTWARE", + FAILED_TO_LAUNCH_REPLICATION_SERVER = "FAILED_TO_LAUNCH_REPLICATION_SERVER", + FAILED_TO_PAIR_REPLICATION_SERVER_WITH_AGENT = "FAILED_TO_PAIR_REPLICATION_SERVER_WITH_AGENT", + FAILED_TO_START_DATA_TRANSFER = "FAILED_TO_START_DATA_TRANSFER", + NOT_CONVERGING = "NOT_CONVERGING", + SNAPSHOTS_FAILURE = "SNAPSHOTS_FAILURE", + UNSTABLE_NETWORK = "UNSTABLE_NETWORK", +} + +/** + *

Error in data replication.

+ */ +export interface DataReplicationError { + /** + *

Error in data replication.

+ */ + error?: DataReplicationErrorString | string; + + /** + *

Error in data replication.

+ */ + rawError?: string; +} + +export namespace DataReplicationError { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DataReplicationError): any => ({ + ...obj, + }); +} + +export enum DataReplicationInitiationStepName { + ATTACH_STAGING_DISKS = "ATTACH_STAGING_DISKS", + AUTHENTICATE_WITH_SERVICE = "AUTHENTICATE_WITH_SERVICE", + BOOT_REPLICATION_SERVER = "BOOT_REPLICATION_SERVER", + CONNECT_AGENT_TO_REPLICATION_SERVER = "CONNECT_AGENT_TO_REPLICATION_SERVER", + CREATE_SECURITY_GROUP = "CREATE_SECURITY_GROUP", + CREATE_STAGING_DISKS = "CREATE_STAGING_DISKS", + DOWNLOAD_REPLICATION_SOFTWARE = "DOWNLOAD_REPLICATION_SOFTWARE", + LAUNCH_REPLICATION_SERVER = "LAUNCH_REPLICATION_SERVER", + PAIR_REPLICATION_SERVER_WITH_AGENT = "PAIR_REPLICATION_SERVER_WITH_AGENT", + START_DATA_TRANSFER = "START_DATA_TRANSFER", + WAIT = "WAIT", +} + +export enum DataReplicationInitiationStepStatus { + FAILED = "FAILED", + IN_PROGRESS = "IN_PROGRESS", + NOT_STARTED = "NOT_STARTED", + SKIPPED = "SKIPPED", + SUCCEEDED = "SUCCEEDED", +} + +/** + *

Data replication initiation step.

+ */ +export interface DataReplicationInitiationStep { + /** + *

The name of the step.

+ */ + name?: DataReplicationInitiationStepName | string; + + /** + *

The status of the step.

+ */ + status?: DataReplicationInitiationStepStatus | string; +} + +export namespace DataReplicationInitiationStep { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DataReplicationInitiationStep): any => ({ + ...obj, + }); +} + +/** + *

Data replication initiation.

+ */ +export interface DataReplicationInitiation { + /** + *

The date and time of the current attempt to initiate data replication.

+ */ + startDateTime?: string; + + /** + *

The date and time of the next attempt to initiate data replication.

+ */ + nextAttemptDateTime?: string; + + /** + *

The steps of the current attempt to initiate data replication.

+ */ + steps?: DataReplicationInitiationStep[]; +} + +export namespace DataReplicationInitiation { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DataReplicationInitiation): any => ({ + ...obj, + }); +} + +export enum DataReplicationState { + BACKLOG = "BACKLOG", + CONTINUOUS = "CONTINUOUS", + CREATING_SNAPSHOT = "CREATING_SNAPSHOT", + DISCONNECTED = "DISCONNECTED", + INITIAL_SYNC = "INITIAL_SYNC", + INITIATING = "INITIATING", + PAUSED = "PAUSED", + RESCAN = "RESCAN", + STALLED = "STALLED", + STOPPED = "STOPPED", +} + +/** + *

A disk that should be replicated.

+ */ +export interface DataReplicationInfoReplicatedDisk { + /** + *

The name of the device.

+ */ + deviceName?: string; + + /** + *

The total amount of data to be replicated in bytes.

+ */ + totalStorageBytes?: number; + + /** + *

The amount of data replicated so far in bytes.

+ */ + replicatedStorageBytes?: number; + + /** + *

The amount of data to be rescanned in bytes.

+ */ + rescannedStorageBytes?: number; + + /** + *

The size of the replication backlog in bytes.

+ */ + backloggedStorageBytes?: number; +} + +export namespace DataReplicationInfoReplicatedDisk { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DataReplicationInfoReplicatedDisk): any => ({ + ...obj, + }); +} + +/** + *

Information about Data Replication

+ */ +export interface DataReplicationInfo { + /** + *

Data replication lag duration.

+ */ + lagDuration?: string; + + /** + *

An estimate of when the data replication will be completed.

+ */ + etaDateTime?: string; + + /** + *

The disks that should be replicated.

+ */ + replicatedDisks?: DataReplicationInfoReplicatedDisk[]; + + /** + *

The state of the data replication.

+ */ + dataReplicationState?: DataReplicationState | string; + + /** + *

Information about whether the data replication has been initiated.

+ */ + dataReplicationInitiation?: DataReplicationInitiation; + + /** + *

Error in data replication.

+ */ + dataReplicationError?: DataReplicationError; +} + +export namespace DataReplicationInfo { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DataReplicationInfo): any => ({ + ...obj, + }); +} + +export interface DeleteJobRequest { + /** + *

The ID of the Job to be deleted.

+ */ + jobID: string | undefined; +} + +export namespace DeleteJobRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteJobRequest): any => ({ + ...obj, + }); +} + +export interface DeleteJobResponse {} + +export namespace DeleteJobResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteJobResponse): any => ({ + ...obj, + }); +} + +/** + *

The resource for this operation was not found.

+ */ +export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { + name: "ResourceNotFoundException"; + $fault: "client"; + message?: string; + code?: string; + /** + *

The ID of the resource.

+ */ + resourceId?: string; + + /** + *

The type of the resource.

+ */ + resourceType?: string; +} + +export namespace ResourceNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ + ...obj, + }); +} + +export interface DeleteRecoveryInstanceRequest { + /** + *

RThe ID of the Recovery Instance to be deleted.

+ */ + recoveryInstanceID: string | undefined; +} + +export namespace DeleteRecoveryInstanceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteRecoveryInstanceRequest): any => ({ + ...obj, + }); +} + +export interface DeleteReplicationConfigurationTemplateRequest { + /** + *

The ID of the Replication Configuration Template to be deleted.

+ */ + replicationConfigurationTemplateID: string | undefined; +} + +export namespace DeleteReplicationConfigurationTemplateRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteReplicationConfigurationTemplateRequest): any => ({ + ...obj, + }); +} + +export interface DeleteReplicationConfigurationTemplateResponse {} + +export namespace DeleteReplicationConfigurationTemplateResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteReplicationConfigurationTemplateResponse): any => ({ + ...obj, + }); +} + +export interface DeleteSourceServerRequest { + /** + *

The ID of the Source Server to be deleted.

+ */ + sourceServerID: string | undefined; +} + +export namespace DeleteSourceServerRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteSourceServerRequest): any => ({ + ...obj, + }); +} + +export interface DeleteSourceServerResponse {} + +export namespace DeleteSourceServerResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteSourceServerResponse): any => ({ + ...obj, + }); +} + +export interface DescribeJobLogItemsRequest { + /** + *

The ID of the Job for which Job log items will be retrieved.

+ */ + jobID: string | undefined; + + /** + *

Maximum number of Job log items to retrieve.

+ */ + maxResults?: number; + + /** + *

The token of the next Job log items to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeJobLogItemsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeJobLogItemsRequest): any => ({ + ...obj, + }); +} + +export enum JobLogEvent { + CLEANUP_END = "CLEANUP_END", + CLEANUP_FAIL = "CLEANUP_FAIL", + CLEANUP_START = "CLEANUP_START", + CONVERSION_END = "CONVERSION_END", + CONVERSION_FAIL = "CONVERSION_FAIL", + CONVERSION_START = "CONVERSION_START", + JOB_CANCEL = "JOB_CANCEL", + JOB_END = "JOB_END", + JOB_START = "JOB_START", + LAUNCH_FAILED = "LAUNCH_FAILED", + LAUNCH_START = "LAUNCH_START", + SERVER_SKIPPED = "SERVER_SKIPPED", + SNAPSHOT_END = "SNAPSHOT_END", + SNAPSHOT_FAIL = "SNAPSHOT_FAIL", + SNAPSHOT_START = "SNAPSHOT_START", + USING_PREVIOUS_SNAPSHOT = "USING_PREVIOUS_SNAPSHOT", + USING_PREVIOUS_SNAPSHOT_FAILED = "USING_PREVIOUS_SNAPSHOT_FAILED", +} + +/** + *

Metadata associated with a Job log.

+ */ +export interface JobLogEventData { + /** + *

The ID of a Source Server.

+ */ + sourceServerID?: string; + + /** + *

The ID of a conversion server.

+ */ + conversionServerID?: string; + + /** + *

The ID of a Recovery Instance.

+ */ + targetInstanceID?: string; + + /** + *

A string representing a job error.

+ */ + rawError?: string; +} + +export namespace JobLogEventData { + /** + * @internal + */ + export const filterSensitiveLog = (obj: JobLogEventData): any => ({ + ...obj, + }); +} + +/** + *

A log outputted by a Job.

+ */ +export interface JobLog { + /** + *

The date and time the log was taken.

+ */ + logDateTime?: string; + + /** + *

The event represents the type of a log.

+ */ + event?: JobLogEvent | string; + + /** + *

Metadata associated with a Job log.

+ */ + eventData?: JobLogEventData; +} + +export namespace JobLog { + /** + * @internal + */ + export const filterSensitiveLog = (obj: JobLog): any => ({ + ...obj, + }); +} + +export interface DescribeJobLogItemsResponse { + /** + *

An array of Job log items.

+ */ + items?: JobLog[]; + + /** + *

The token of the next Job log items to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeJobLogItemsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeJobLogItemsResponse): any => ({ + ...obj, + }); +} + +/** + *

A set of filters by which to return Jobs.

+ */ +export interface DescribeJobsRequestFilters { + /** + *

An array of Job IDs that should be returned. An empty array means all jobs.

+ */ + jobIDs?: string[]; + + /** + *

The start date in a date range query.

+ */ + fromDate?: string; + + /** + *

The end date in a date range query.

+ */ + toDate?: string; +} + +export namespace DescribeJobsRequestFilters { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeJobsRequestFilters): any => ({ + ...obj, + }); +} + +export interface DescribeJobsRequest { + /** + *

A set of filters by which to return Jobs.

+ */ + filters: DescribeJobsRequestFilters | undefined; + + /** + *

Maximum number of Jobs to retrieve.

+ */ + maxResults?: number; + + /** + *

The token of the next Job to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeJobsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeJobsRequest): any => ({ + ...obj, + }); +} + +export enum InitiatedBy { + DIAGNOSTIC = "DIAGNOSTIC", + FAILBACK = "FAILBACK", + START_DRILL = "START_DRILL", + START_RECOVERY = "START_RECOVERY", + TERMINATE_RECOVERY_INSTANCES = "TERMINATE_RECOVERY_INSTANCES", +} + +export enum LaunchStatus { + FAILED = "FAILED", + IN_PROGRESS = "IN_PROGRESS", + LAUNCHED = "LAUNCHED", + PENDING = "PENDING", + TERMINATED = "TERMINATED", +} + +/** + *

Represents a server participating in an asynchronous Job.

+ */ +export interface ParticipatingServer { + /** + *

The Source Server ID of a participating server.

+ */ + sourceServerID?: string; + + /** + *

The Recovery Instance ID of a participating server.

+ */ + recoveryInstanceID?: string; + + /** + *

The launch status of a participating server.

+ */ + launchStatus?: LaunchStatus | string; +} + +export namespace ParticipatingServer { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ParticipatingServer): any => ({ + ...obj, + }); +} + +export enum JobStatus { + COMPLETED = "COMPLETED", + PENDING = "PENDING", + STARTED = "STARTED", +} + +export enum JobType { + LAUNCH = "LAUNCH", + TERMINATE = "TERMINATE", +} + +/** + *

A job is an asynchronous workflow.

+ */ +export interface Job { + /** + *

The ID of the Job.

+ */ + jobID: string | undefined; + + /** + *

The ARN of a Job.

+ */ + arn?: string; + + /** + *

The type of the Job.

+ */ + type?: JobType | string; + + /** + *

A string representing who initiated the Job.

+ */ + initiatedBy?: InitiatedBy | string; + + /** + *

The date and time of when the Job was created.

+ */ + creationDateTime?: string; + + /** + *

The date and time of when the Job ended.

+ */ + endDateTime?: string; + + /** + *

The status of the Job.

+ */ + status?: JobStatus | string; + + /** + *

A list of servers that the Job is acting upon.

+ */ + participatingServers?: ParticipatingServer[]; + + /** + *

A list of tags associated with the Job.

+ */ + tags?: { [key: string]: string }; +} + +export namespace Job { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Job): any => ({ + ...obj, + ...(obj.tags && { tags: SENSITIVE_STRING }), + }); +} + +export interface DescribeJobsResponse { + /** + *

An array of Jobs.

+ */ + items?: Job[]; + + /** + *

The token of the next Job to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeJobsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeJobsResponse): any => ({ + ...obj, + ...(obj.items && { items: obj.items.map((item) => Job.filterSensitiveLog(item)) }), + }); +} + +/** + *

A set of filters by which to return Recovery Instances.

+ */ +export interface DescribeRecoveryInstancesRequestFilters { + /** + *

An array of Recovery Instance IDs that should be returned. An empty array means all Recovery Instances.

+ */ + recoveryInstanceIDs?: string[]; + + /** + *

An array of Source Server IDs for which associated Recovery Instances should be returned.

+ */ + sourceServerIDs?: string[]; +} + +export namespace DescribeRecoveryInstancesRequestFilters { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeRecoveryInstancesRequestFilters): any => ({ + ...obj, + }); +} + +export interface DescribeRecoveryInstancesRequest { + /** + *

A set of filters by which to return Recovery Instances.

+ */ + filters: DescribeRecoveryInstancesRequestFilters | undefined; + + /** + *

Maximum number of Recovery Instances to retrieve.

+ */ + maxResults?: number; + + /** + *

The token of the next Recovery Instance to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeRecoveryInstancesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeRecoveryInstancesRequest): any => ({ + ...obj, + }); +} + +export enum FailbackReplicationError { + AGENT_NOT_SEEN = "AGENT_NOT_SEEN", + FAILBACK_CLIENT_NOT_SEEN = "FAILBACK_CLIENT_NOT_SEEN", + FAILED_TO_CONFIGURE_REPLICATION_SOFTWARE = "FAILED_TO_CONFIGURE_REPLICATION_SOFTWARE", + FAILED_TO_DOWNLOAD_REPLICATION_SOFTWARE_TO_FAILBACK_CLIENT = "FAILED_TO_DOWNLOAD_REPLICATION_SOFTWARE_TO_FAILBACK_CLIENT", + FAILED_TO_ESTABLISH_AGENT_REPLICATOR_SOFTWARE_COMMUNICATION = "FAILED_TO_ESTABLISH_AGENT_REPLICATOR_SOFTWARE_COMMUNICATION", + FAILED_TO_ESTABLISH_RECOVERY_INSTANCE_COMMUNICATION = "FAILED_TO_ESTABLISH_RECOVERY_INSTANCE_COMMUNICATION", + FAILED_TO_PAIR_AGENT_WITH_REPLICATION_SOFTWARE = "FAILED_TO_PAIR_AGENT_WITH_REPLICATION_SOFTWARE", + NOT_CONVERGING = "NOT_CONVERGING", + UNSTABLE_NETWORK = "UNSTABLE_NETWORK", +} + +/** + *

Error in data replication.

+ */ +export interface RecoveryInstanceDataReplicationError { + /** + *

Error in data replication.

+ */ + error?: FailbackReplicationError | string; + + /** + *

Error in data replication.

+ */ + rawError?: string; +} + +export namespace RecoveryInstanceDataReplicationError { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoveryInstanceDataReplicationError): any => ({ + ...obj, + }); +} + +export enum RecoveryInstanceDataReplicationInitiationStepName { + COMPLETE_VOLUME_MAPPING = "COMPLETE_VOLUME_MAPPING", + CONFIGURE_REPLICATION_SOFTWARE = "CONFIGURE_REPLICATION_SOFTWARE", + DOWNLOAD_REPLICATION_SOFTWARE_TO_FAILBACK_CLIENT = "DOWNLOAD_REPLICATION_SOFTWARE_TO_FAILBACK_CLIENT", + ESTABLISH_AGENT_REPLICATOR_SOFTWARE_COMMUNICATION = "ESTABLISH_AGENT_REPLICATOR_SOFTWARE_COMMUNICATION", + ESTABLISH_RECOVERY_INSTANCE_COMMUNICATION = "ESTABLISH_RECOVERY_INSTANCE_COMMUNICATION", + LINK_FAILBACK_CLIENT_WITH_RECOVERY_INSTANCE = "LINK_FAILBACK_CLIENT_WITH_RECOVERY_INSTANCE", + PAIR_AGENT_WITH_REPLICATION_SOFTWARE = "PAIR_AGENT_WITH_REPLICATION_SOFTWARE", +} + +export enum RecoveryInstanceDataReplicationInitiationStepStatus { + FAILED = "FAILED", + IN_PROGRESS = "IN_PROGRESS", + NOT_STARTED = "NOT_STARTED", + SKIPPED = "SKIPPED", + SUCCEEDED = "SUCCEEDED", +} + +/** + *

Data replication initiation step.

+ */ +export interface RecoveryInstanceDataReplicationInitiationStep { + /** + *

The name of the step.

+ */ + name?: RecoveryInstanceDataReplicationInitiationStepName | string; + + /** + *

The status of the step.

+ */ + status?: RecoveryInstanceDataReplicationInitiationStepStatus | string; +} + +export namespace RecoveryInstanceDataReplicationInitiationStep { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoveryInstanceDataReplicationInitiationStep): any => ({ + ...obj, + }); +} + +/** + *

Data replication initiation.

+ */ +export interface RecoveryInstanceDataReplicationInitiation { + /** + *

The date and time of the current attempt to initiate data replication.

+ */ + startDateTime?: string; + + /** + *

The steps of the current attempt to initiate data replication.

+ */ + steps?: RecoveryInstanceDataReplicationInitiationStep[]; +} + +export namespace RecoveryInstanceDataReplicationInitiation { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoveryInstanceDataReplicationInitiation): any => ({ + ...obj, + }); +} + +export enum RecoveryInstanceDataReplicationState { + BACKLOG = "BACKLOG", + CONTINUOUS = "CONTINUOUS", + CREATING_SNAPSHOT = "CREATING_SNAPSHOT", + DISCONNECTED = "DISCONNECTED", + INITIAL_SYNC = "INITIAL_SYNC", + INITIATING = "INITIATING", + PAUSED = "PAUSED", + RESCAN = "RESCAN", + STALLED = "STALLED", + STOPPED = "STOPPED", +} + +/** + *

A disk that should be replicated.

+ */ +export interface RecoveryInstanceDataReplicationInfoReplicatedDisk { + /** + *

The name of the device.

+ */ + deviceName?: string; + + /** + *

The total amount of data to be replicated in bytes.

+ */ + totalStorageBytes?: number; + + /** + *

The amount of data replicated so far in bytes.

+ */ + replicatedStorageBytes?: number; + + /** + *

The amount of data to be rescanned in bytes.

+ */ + rescannedStorageBytes?: number; + + /** + *

The size of the replication backlog in bytes.

+ */ + backloggedStorageBytes?: number; +} + +export namespace RecoveryInstanceDataReplicationInfoReplicatedDisk { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoveryInstanceDataReplicationInfoReplicatedDisk): any => ({ + ...obj, + }); +} + +/** + *

Information about Data Replication

+ */ +export interface RecoveryInstanceDataReplicationInfo { + /** + *

Data replication lag duration.

+ */ + lagDuration?: string; + + /** + *

An estimate of when the data replication will be completed.

+ */ + etaDateTime?: string; + + /** + *

The disks that should be replicated.

+ */ + replicatedDisks?: RecoveryInstanceDataReplicationInfoReplicatedDisk[]; + + /** + *

The state of the data replication.

+ */ + dataReplicationState?: RecoveryInstanceDataReplicationState | string; + + /** + *

Information about whether the data replication has been initiated.

+ */ + dataReplicationInitiation?: RecoveryInstanceDataReplicationInitiation; + + /** + *

Information about Data Replication

+ */ + dataReplicationError?: RecoveryInstanceDataReplicationError; +} + +export namespace RecoveryInstanceDataReplicationInfo { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoveryInstanceDataReplicationInfo): any => ({ + ...obj, + }); +} + +export enum EC2InstanceState { + NOT_FOUND = "NOT_FOUND", + PENDING = "PENDING", + RUNNING = "RUNNING", + SHUTTING_DOWN = "SHUTTING-DOWN", + STOPPED = "STOPPED", + STOPPING = "STOPPING", + TERMINATED = "TERMINATED", +} + +export enum FailbackState { + FAILBACK_COMPLETED = "FAILBACK_COMPLETED", + FAILBACK_ERROR = "FAILBACK_ERROR", + FAILBACK_IN_PROGRESS = "FAILBACK_IN_PROGRESS", + FAILBACK_NOT_STARTED = "FAILBACK_NOT_STARTED", + FAILBACK_READY_FOR_LAUNCH = "FAILBACK_READY_FOR_LAUNCH", +} + +/** + *

An object representing failback related information of the Recovery Instance.

+ */ +export interface RecoveryInstanceFailback { + /** + *

The ID of the failback client that this Recovery Instance is associated with.

+ */ + failbackClientID?: string; + + /** + *

The Job ID of the last failback log for this Recovery Instance.

+ */ + failbackJobID?: string; + + /** + *

The date and time that the failback initiation started.

+ */ + failbackInitiationTime?: string; + + /** + *

The state of the failback process that this Recovery Instance is in.

+ */ + state?: FailbackState | string; + + /** + *

The date and time the agent on the Recovery Instance was last seen by the service.

+ */ + agentLastSeenByServiceDateTime?: string; + + /** + *

The date and time that the failback client was last seen by the service.

+ */ + failbackClientLastSeenByServiceDateTime?: string; + + /** + *

Whether we are failing back to the original Source Server for this Recovery Instance.

+ */ + failbackToOriginalServer?: boolean; + + /** + *

The date and time of the first byte that was replicated from the Recovery Instance.

+ */ + firstByteDateTime?: string; + + /** + *

The amount of time that the Recovery Instance has been replicating for.

+ */ + elapsedReplicationDuration?: string; +} + +export namespace RecoveryInstanceFailback { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoveryInstanceFailback): any => ({ + ...obj, + }); +} + +/** + *

An object representing a block storage device on the Recovery Instance.

+ */ +export interface RecoveryInstanceDisk { + /** + *

The internal device name of this disk. This is the name that is visible on the machine itself and not from the EC2 console.

+ */ + internalDeviceName?: string; + + /** + *

The amount of storage on the disk in bytes.

+ */ + bytes?: number; + + /** + *

The EBS Volume ID of this disk.

+ */ + ebsVolumeID?: string; +} + +export namespace RecoveryInstanceDisk { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoveryInstanceDisk): any => ({ + ...obj, + }); +} + +/** + *

Hints used to uniquely identify a machine.

+ */ +export interface IdentificationHints { + /** + *

Fully Qualified Domain Name identification hint.

+ */ + fqdn?: string; + + /** + *

Hostname identification hint.

+ */ + hostname?: string; + + /** + *

vCenter VM path identification hint.

+ */ + vmWareUuid?: string; + + /** + *

AWS Instance ID identification hint.

+ */ + awsInstanceID?: string; +} + +export namespace IdentificationHints { + /** + * @internal + */ + export const filterSensitiveLog = (obj: IdentificationHints): any => ({ + ...obj, + }); +} + +/** + *

Network interface.

+ */ +export interface NetworkInterface { + /** + *

The MAC address of the network interface.

+ */ + macAddress?: string; + + /** + *

Network interface IPs.

+ */ + ips?: string[]; + + /** + *

Whether this is the primary network interface.

+ */ + isPrimary?: boolean; +} + +export namespace NetworkInterface { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NetworkInterface): any => ({ + ...obj, + }); +} + +/** + *

Operating System.

+ */ +export interface OS { + /** + *

The long name of the Operating System.

+ */ + fullString?: string; +} + +export namespace OS { + /** + * @internal + */ + export const filterSensitiveLog = (obj: OS): any => ({ + ...obj, + }); +} + +/** + *

Properties of the Recovery Instance machine.

+ */ +export interface RecoveryInstanceProperties { + /** + *

The date and time the Recovery Instance properties were last updated on.

+ */ + lastUpdatedDateTime?: string; + + /** + *

Hints used to uniquely identify a machine.

+ */ + identificationHints?: IdentificationHints; + + /** + *

An array of network interfaces.

+ */ + networkInterfaces?: NetworkInterface[]; + + /** + *

An array of disks.

+ */ + disks?: RecoveryInstanceDisk[]; + + /** + *

An array of CPUs.

+ */ + cpus?: CPU[]; + + /** + *

The amount of RAM in bytes.

+ */ + ramBytes?: number; + + /** + *

Operating system.

+ */ + os?: OS; +} + +export namespace RecoveryInstanceProperties { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoveryInstanceProperties): any => ({ + ...obj, + }); +} + +/** + *

A Recovery Instance is a replica of a Source Server running on EC2.

+ */ +export interface RecoveryInstance { + /** + *

The EC2 instance ID of the Recovery Instance.

+ */ + ec2InstanceID?: string; + + /** + *

The state of the EC2 instance for this Recovery Instance.

+ */ + ec2InstanceState?: EC2InstanceState | string; + + /** + *

The ID of the Job that created the Recovery Instance.

+ */ + jobID?: string; + + /** + *

The ID of the Recovery Instance.

+ */ + recoveryInstanceID?: string; + + /** + *

The Source Server ID that this Recovery Instance is associated with.

+ */ + sourceServerID?: string; + + /** + *

The ARN of the Recovery Instance.

+ */ + arn?: string; + + /** + *

An array of tags that are associated with the Recovery Instance.

+ */ + tags?: { [key: string]: string }; + + /** + *

An object representing failback related information of the Recovery Instance.

+ */ + failback?: RecoveryInstanceFailback; + + /** + *

The Data Replication Info of the Recovery Instance.

+ */ + dataReplicationInfo?: RecoveryInstanceDataReplicationInfo; + + /** + *

Properties of the Recovery Instance machine.

+ */ + recoveryInstanceProperties?: RecoveryInstanceProperties; + + /** + *

The date and time of the Point in Time (PIT) snapshot that this Recovery Instance was launched from.

+ */ + pointInTimeSnapshotDateTime?: string; + + /** + *

Whether this Recovery Instance was created for a drill or for an actual Recovery event.

+ */ + isDrill?: boolean; +} + +export namespace RecoveryInstance { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoveryInstance): any => ({ + ...obj, + ...(obj.tags && { tags: SENSITIVE_STRING }), + }); +} + +export interface DescribeRecoveryInstancesResponse { + /** + *

The token of the next Recovery Instance to retrieve.

+ */ + nextToken?: string; + + /** + *

An array of Recovery Instances.

+ */ + items?: RecoveryInstance[]; +} + +export namespace DescribeRecoveryInstancesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeRecoveryInstancesResponse): any => ({ + ...obj, + ...(obj.items && { items: obj.items.map((item) => RecoveryInstance.filterSensitiveLog(item)) }), + }); +} + +/** + *

A set of filters by which to return Recovery Snapshots.

+ */ +export interface DescribeRecoverySnapshotsRequestFilters { + /** + *

The start date in a date range query.

+ */ + fromDateTime?: string; + + /** + *

The end date in a date range query.

+ */ + toDateTime?: string; +} + +export namespace DescribeRecoverySnapshotsRequestFilters { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeRecoverySnapshotsRequestFilters): any => ({ + ...obj, + }); +} + +export enum RecoverySnapshotsOrder { + ASC = "ASC", + DESC = "DESC", +} + +export interface DescribeRecoverySnapshotsRequest { + /** + *

Filter Recovery Snapshots by Source Server ID.

+ */ + sourceServerID: string | undefined; + + /** + *

A set of filters by which to return Recovery Snapshots.

+ */ + filters?: DescribeRecoverySnapshotsRequestFilters; + + /** + *

The sorted ordering by which to return Recovery Snapshots.

+ */ + order?: RecoverySnapshotsOrder | string; + + /** + *

Maximum number of Recovery Snapshots to retrieve.

+ */ + maxResults?: number; + + /** + *

The token of the next Recovery Snapshot to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeRecoverySnapshotsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeRecoverySnapshotsRequest): any => ({ + ...obj, + }); +} + +/** + *

A snapshot of a Source Server used during recovery.

+ */ +export interface RecoverySnapshot { + /** + *

The ID of the Recovery Snapshot.

+ */ + snapshotID: string | undefined; + + /** + *

The ID of the Source Server that the snapshot was taken for.

+ */ + sourceServerID: string | undefined; + + /** + *

The timestamp of when we expect the snapshot to be taken.

+ */ + expectedTimestamp: string | undefined; + + /** + *

The actual timestamp that the snapshot was taken.

+ */ + timestamp?: string; + + /** + *

A list of EBS snapshots.

+ */ + ebsSnapshots?: string[]; +} + +export namespace RecoverySnapshot { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecoverySnapshot): any => ({ + ...obj, + }); +} + +export interface DescribeRecoverySnapshotsResponse { + /** + *

An array of Recovery Snapshots.

+ */ + items?: RecoverySnapshot[]; + + /** + *

The token of the next Recovery Snapshot to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeRecoverySnapshotsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeRecoverySnapshotsResponse): any => ({ + ...obj, + }); +} + +export interface DescribeReplicationConfigurationTemplatesRequest { + /** + *

The IDs of the Replication Configuration Templates to retrieve. An empty list means all Replication Configuration Templates.

+ */ + replicationConfigurationTemplateIDs: string[] | undefined; + + /** + *

Maximum number of Replication Configuration Templates to retrieve.

+ */ + maxResults?: number; + + /** + *

The token of the next Replication Configuration Template to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeReplicationConfigurationTemplatesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeReplicationConfigurationTemplatesRequest): any => ({ + ...obj, + }); +} + +export interface DescribeReplicationConfigurationTemplatesResponse { + /** + *

An array of Replication Configuration Templates.

+ */ + items?: ReplicationConfigurationTemplate[]; + + /** + *

The token of the next Replication Configuration Template to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeReplicationConfigurationTemplatesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeReplicationConfigurationTemplatesResponse): any => ({ + ...obj, + ...(obj.items && { items: obj.items.map((item) => ReplicationConfigurationTemplate.filterSensitiveLog(item)) }), + }); +} + +/** + *

A set of filters by which to return Source Servers.

+ */ +export interface DescribeSourceServersRequestFilters { + /** + *

An array of Source Servers IDs that should be returned. An empty array means all Source Servers.

+ */ + sourceServerIDs?: string[]; + + /** + *

An ID that describes the hardware of the Source Server. This is either an EC2 instance id, a VMware uuid or a mac address.

+ */ + hardwareId?: string; +} + +export namespace DescribeSourceServersRequestFilters { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeSourceServersRequestFilters): any => ({ + ...obj, + }); +} + +export interface DescribeSourceServersRequest { + /** + *

A set of filters by which to return Source Servers.

+ */ + filters: DescribeSourceServersRequestFilters | undefined; + + /** + *

Maximum number of Source Servers to retrieve.

+ */ + maxResults?: number; + + /** + *

The token of the next Source Server to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeSourceServersRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeSourceServersRequest): any => ({ + ...obj, + }); +} + +export enum LastLaunchResult { + FAILED = "FAILED", + NOT_STARTED = "NOT_STARTED", + PENDING = "PENDING", + SUCCEEDED = "SUCCEEDED", +} + +export enum LastLaunchType { + DRILL = "DRILL", + RECOVERY = "RECOVERY", +} + +/** + *

An object containing information regarding the initiation of the last launch of a Source Server.

+ */ +export interface LifeCycleLastLaunchInitiated { + /** + *

The date and time the last Source Server launch was initiated.

+ */ + apiCallDateTime?: string; + + /** + *

The ID of the Job that was used to last launch the Source Server.

+ */ + jobID?: string; + + /** + *

The Job type that was used to last launch the Source Server.

+ */ + type?: LastLaunchType | string; +} + +export namespace LifeCycleLastLaunchInitiated { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LifeCycleLastLaunchInitiated): any => ({ + ...obj, + }); +} + +/** + *

An object containing information regarding the last launch of a Source Server.

+ */ +export interface LifeCycleLastLaunch { + /** + *

An object containing information regarding the initiation of the last launch of a Source Server.

+ */ + initiated?: LifeCycleLastLaunchInitiated; +} + +export namespace LifeCycleLastLaunch { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LifeCycleLastLaunch): any => ({ + ...obj, + }); +} + +/** + *

An object representing the Source Server Lifecycle.

+ */ +export interface LifeCycle { + /** + *

The date and time of when the Source Server was added to the service.

+ */ + addedToServiceDateTime?: string; + + /** + *

The date and time of the first byte that was replicated from the Source Server.

+ */ + firstByteDateTime?: string; + + /** + *

The amount of time that the Source Server has been replicating for.

+ */ + elapsedReplicationDuration?: string; + + /** + *

The date and time this Source Server was last seen by the service.

+ */ + lastSeenByServiceDateTime?: string; + + /** + *

An object containing information regarding the last launch of the Source Server.

+ */ + lastLaunch?: LifeCycleLastLaunch; +} + +export namespace LifeCycle { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LifeCycle): any => ({ + ...obj, + }); +} + +/** + *

An object representing a data storage device on a server.

+ */ +export interface Disk { + /** + *

The disk or device name.

+ */ + deviceName?: string; + + /** + *

The amount of storage on the disk in bytes.

+ */ + bytes?: number; +} + +export namespace Disk { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Disk): any => ({ + ...obj, + }); +} + +/** + *

Properties of the Source Server machine.

+ */ +export interface SourceProperties { + /** + *

The date and time the Source Properties were last updated on.

+ */ + lastUpdatedDateTime?: string; + + /** + *

The recommended EC2 instance type that will be used when recovering the Source Server.

+ */ + recommendedInstanceType?: string; + + /** + *

Hints used to uniquely identify a machine.

+ */ + identificationHints?: IdentificationHints; + + /** + *

An array of network interfaces.

+ */ + networkInterfaces?: NetworkInterface[]; + + /** + *

An array of disks.

+ */ + disks?: Disk[]; + + /** + *

An array of CPUs.

+ */ + cpus?: CPU[]; + + /** + *

The amount of RAM in bytes.

+ */ + ramBytes?: number; + + /** + *

Operating system.

+ */ + os?: OS; +} + +export namespace SourceProperties { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SourceProperties): any => ({ + ...obj, + }); +} + +export interface SourceServer { + /** + *

The ID of the Source Server.

+ */ + sourceServerID?: string; + + /** + *

The ARN of the Source Server.

+ */ + arn?: string; + + /** + *

The tags associated with the Source Server.

+ */ + tags?: { [key: string]: string }; + + /** + *

The ID of the Recovery Instance associated with this Source Server.

+ */ + recoveryInstanceId?: string; + + /** + *

The status of the last recovery launch of this Source Server.

+ */ + lastLaunchResult?: LastLaunchResult | string; + + /** + *

The Data Replication Info of the Source Server.

+ */ + dataReplicationInfo?: DataReplicationInfo; + + /** + *

The lifecycle information of this Source Server.

+ */ + lifeCycle?: LifeCycle; + + /** + *

The source properties of the Source Server.

+ */ + sourceProperties?: SourceProperties; +} + +export namespace SourceServer { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SourceServer): any => ({ + ...obj, + ...(obj.tags && { tags: SENSITIVE_STRING }), + }); +} + +export interface DescribeSourceServersResponse { + /** + *

An array of Source Servers.

+ */ + items?: SourceServer[]; + + /** + *

The token of the next Source Server to retrieve.

+ */ + nextToken?: string; +} + +export namespace DescribeSourceServersResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeSourceServersResponse): any => ({ + ...obj, + ...(obj.items && { items: obj.items.map((item) => SourceServer.filterSensitiveLog(item)) }), + }); +} + +export interface DisconnectRecoveryInstanceRequest { + /** + *

The ID of the Recovery Instance to disconnect.

+ */ + recoveryInstanceID: string | undefined; +} + +export namespace DisconnectRecoveryInstanceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisconnectRecoveryInstanceRequest): any => ({ + ...obj, + }); +} + +export interface DisconnectSourceServerRequest { + /** + *

The ID of the Source Server to disconnect.

+ */ + sourceServerID: string | undefined; +} + +export namespace DisconnectSourceServerRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisconnectSourceServerRequest): any => ({ + ...obj, + }); +} + +export interface InitializeServiceRequest {} + +export namespace InitializeServiceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InitializeServiceRequest): any => ({ + ...obj, + }); +} + +export interface InitializeServiceResponse {} + +export namespace InitializeServiceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InitializeServiceResponse): any => ({ + ...obj, + }); +} + +export interface ListTagsForResourceRequest { + /** + *

The ARN of the resource whose tags should be returned.

+ */ + resourceArn: string | undefined; +} + +export namespace ListTagsForResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ + ...obj, + }); +} + +export interface ListTagsForResourceResponse { + /** + *

The tags of the requested resource.

+ */ + tags?: { [key: string]: string }; +} + +export namespace ListTagsForResourceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + ...obj, + ...(obj.tags && { tags: SENSITIVE_STRING }), + }); +} + +export interface GetFailbackReplicationConfigurationRequest { + /** + *

The ID of the Recovery Instance whose failback replication configuration should be returned.

+ */ + recoveryInstanceID: string | undefined; +} + +export namespace GetFailbackReplicationConfigurationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetFailbackReplicationConfigurationRequest): any => ({ + ...obj, + }); +} + +export interface GetFailbackReplicationConfigurationResponse { + /** + *

The ID of the Recovery Instance.

+ */ + recoveryInstanceID: string | undefined; + + /** + *

The name of the Failback Replication Configuration.

+ */ + name?: string; + + /** + *

Configure bandwidth throttling for the outbound data transfer rate of the Recovery Instance in Mbps.

+ */ + bandwidthThrottling?: number; + + /** + *

Whether to use Private IP for the failback replication of the Recovery Instance.

+ */ + usePrivateIP?: boolean; +} + +export namespace GetFailbackReplicationConfigurationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetFailbackReplicationConfigurationResponse): any => ({ + ...obj, + }); +} + +export interface StartFailbackLaunchRequest { + /** + *

The IDs of the Recovery Instance whose failback launch we want to request.

+ */ + recoveryInstanceIDs: string[] | undefined; + + /** + *

The tags to be associated with the failback launch Job.

+ */ + tags?: { [key: string]: string }; +} + +export namespace StartFailbackLaunchRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartFailbackLaunchRequest): any => ({ + ...obj, + ...(obj.tags && { tags: SENSITIVE_STRING }), + }); +} + +export interface StartFailbackLaunchResponse { + /** + *

The failback launch Job.

+ */ + job?: Job; +} + +export namespace StartFailbackLaunchResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartFailbackLaunchResponse): any => ({ + ...obj, + ...(obj.job && { job: Job.filterSensitiveLog(obj.job) }), + }); +} + +export interface StopFailbackRequest { + /** + *

The ID of the Recovery Instance we want to stop failback for.

+ */ + recoveryInstanceID: string | undefined; +} + +export namespace StopFailbackRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StopFailbackRequest): any => ({ + ...obj, + }); +} + +export interface TerminateRecoveryInstancesRequest { + /** + *

The IDs of the Recovery Instances that should be terminated.

+ */ + recoveryInstanceIDs: string[] | undefined; +} + +export namespace TerminateRecoveryInstancesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TerminateRecoveryInstancesRequest): any => ({ + ...obj, + }); +} + +export interface TerminateRecoveryInstancesResponse { + /** + *

The Job for terminating the Recovery Instances.

+ */ + job?: Job; +} + +export namespace TerminateRecoveryInstancesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TerminateRecoveryInstancesResponse): any => ({ + ...obj, + ...(obj.job && { job: Job.filterSensitiveLog(obj.job) }), + }); +} + +export interface UpdateFailbackReplicationConfigurationRequest { + /** + *

The ID of the Recovery Instance.

+ */ + recoveryInstanceID: string | undefined; + + /** + *

The name of the Failback Replication Configuration.

+ */ + name?: string; + + /** + *

Configure bandwidth throttling for the outbound data transfer rate of the Recovery Instance in Mbps.

+ */ + bandwidthThrottling?: number; + + /** + *

Whether to use Private IP for the failback replication of the Recovery Instance.

+ */ + usePrivateIP?: boolean; +} + +export namespace UpdateFailbackReplicationConfigurationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateFailbackReplicationConfigurationRequest): any => ({ + ...obj, + }); +} + +export interface UpdateReplicationConfigurationTemplateRequest { + /** + *

The Replication Configuration Template ID.

+ */ + replicationConfigurationTemplateID: string | undefined; + + /** + *

The Replication Configuration Template ARN.

+ */ + arn?: string; + + /** + *

The subnet to be used by the replication staging area.

+ */ + stagingAreaSubnetId?: string; + + /** + *

Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration Template.

+ */ + associateDefaultSecurityGroup?: boolean; + + /** + *

The security group IDs that will be used by the replication server.

+ */ + replicationServersSecurityGroupsIDs?: string[]; + + /** + *

The instance type to be used for the replication server.

+ */ + replicationServerInstanceType?: string; + + /** + *

Whether to use a dedicated Replication Server in the replication staging area.

+ */ + useDedicatedReplicationServer?: boolean; + + /** + *

The Staging Disk EBS volume type to be used during replication.

+ */ + defaultLargeStagingDiskType?: ReplicationConfigurationDefaultLargeStagingDiskType | string; + + /** + *

The type of EBS encryption to be used during replication.

+ */ + ebsEncryption?: ReplicationConfigurationEbsEncryption | string; + + /** + *

The ARN of the EBS encryption key to be used during replication.

+ */ + ebsEncryptionKeyArn?: string; + + /** + *

Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

+ */ + bandwidthThrottling?: number; + + /** + *

The data plane routing mechanism that will be used for replication.

+ */ + dataPlaneRouting?: ReplicationConfigurationDataPlaneRouting | string; + + /** + *

Whether to create a Public IP for the Recovery Instance by default.

+ */ + createPublicIP?: boolean; + + /** + *

A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

+ */ + stagingAreaTags?: { [key: string]: string }; + + /** + *

The Point in time (PIT) policy to manage snapshots taken during replication.

+ */ + pitPolicy?: PITPolicyRule[]; +} + +export namespace UpdateReplicationConfigurationTemplateRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateReplicationConfigurationTemplateRequest): any => ({ + ...obj, + ...(obj.stagingAreaTags && { stagingAreaTags: SENSITIVE_STRING }), + }); +} + +export interface GetLaunchConfigurationRequest { + /** + *

The ID of the Source Server that we want to retrieve a Launch Configuration for.

+ */ + sourceServerID: string | undefined; +} + +export namespace GetLaunchConfigurationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetLaunchConfigurationRequest): any => ({ + ...obj, + }); +} + +export enum LaunchDisposition { + STARTED = "STARTED", + STOPPED = "STOPPED", +} + +/** + *

Configuration of a machine's license.

+ */ +export interface Licensing { + /** + *

Whether to enable "Bring your own license" or not.

+ */ + osByol?: boolean; +} + +export namespace Licensing { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Licensing): any => ({ + ...obj, + }); +} + +export enum TargetInstanceTypeRightSizingMethod { + BASIC = "BASIC", + NONE = "NONE", +} + +export interface LaunchConfiguration { + /** + *

The ID of the Source Server for this launch configuration.

+ */ + sourceServerID?: string; + + /** + *

The name of the launch configuration.

+ */ + name?: string; + + /** + *

The EC2 launch template ID of this launch configuration.

+ */ + ec2LaunchTemplateID?: string; + + /** + *

The state of the Recovery Instance in EC2 after the recovery operation.

+ */ + launchDisposition?: LaunchDisposition | string; + + /** + *

Whether Elastic Disaster Recovery should try to automatically choose the instance type that best matches the OS, CPU, and RAM of your Source Server.

+ */ + targetInstanceTypeRightSizingMethod?: TargetInstanceTypeRightSizingMethod | string; + + /** + *

Whether we should copy the Private IP of the Source Server to the Recovery Instance.

+ */ + copyPrivateIp?: boolean; + + /** + *

Whether we want to copy the tags of the Source Server to the EC2 machine of the Recovery Instance.

+ */ + copyTags?: boolean; + + /** + *

The licensing configuration to be used for this launch configuration.

+ */ + licensing?: Licensing; +} + +export namespace LaunchConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LaunchConfiguration): any => ({ + ...obj, + }); +} + +export interface GetReplicationConfigurationRequest { + /** + *

The ID of the Source Serve for this Replication Configuration.r

+ */ + sourceServerID: string | undefined; +} + +export namespace GetReplicationConfigurationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetReplicationConfigurationRequest): any => ({ + ...obj, + }); +} + +export enum ReplicationConfigurationReplicatedDiskStagingDiskType { + AUTO = "AUTO", + GP2 = "GP2", + GP3 = "GP3", + IO1 = "IO1", + SC1 = "SC1", + ST1 = "ST1", + STANDARD = "STANDARD", +} + +/** + *

The configuration of a disk of the Source Server to be replicated.

+ */ +export interface ReplicationConfigurationReplicatedDisk { + /** + *

The name of the device.

+ */ + deviceName?: string; + + /** + *

Whether to boot from this disk or not.

+ */ + isBootDisk?: boolean; + + /** + *

The Staging Disk EBS volume type to be used during replication.

+ */ + stagingDiskType?: ReplicationConfigurationReplicatedDiskStagingDiskType | string; + + /** + *

The requested number of I/O operations per second (IOPS).

+ */ + iops?: number; + + /** + *

The throughput to use for the EBS volume in MiB/s. This parameter is valid only for gp3 volumes.

+ */ + throughput?: number; +} + +export namespace ReplicationConfigurationReplicatedDisk { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ReplicationConfigurationReplicatedDisk): any => ({ + ...obj, + }); +} + +export interface ReplicationConfiguration { + /** + *

The ID of the Source Server for this Replication Configuration.

+ */ + sourceServerID?: string; + + /** + *

The name of the Replication Configuration.

+ */ + name?: string; + + /** + *

The subnet to be used by the replication staging area.

+ */ + stagingAreaSubnetId?: string; + + /** + *

Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration.

+ */ + associateDefaultSecurityGroup?: boolean; + + /** + *

The security group IDs that will be used by the replication server.

+ */ + replicationServersSecurityGroupsIDs?: string[]; + + /** + *

The instance type to be used for the replication server.

+ */ + replicationServerInstanceType?: string; + + /** + *

Whether to use a dedicated Replication Server in the replication staging area.

+ */ + useDedicatedReplicationServer?: boolean; + + /** + *

The Staging Disk EBS volume type to be used during replication.

+ */ + defaultLargeStagingDiskType?: ReplicationConfigurationDefaultLargeStagingDiskType | string; + + /** + *

The configuration of the disks of the Source Server to be replicated.

+ */ + replicatedDisks?: ReplicationConfigurationReplicatedDisk[]; + + /** + *

The type of EBS encryption to be used during replication.

+ */ + ebsEncryption?: ReplicationConfigurationEbsEncryption | string; + + /** + *

The ARN of the EBS encryption key to be used during replication.

+ */ + ebsEncryptionKeyArn?: string; + + /** + *

Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

+ */ + bandwidthThrottling?: number; + + /** + *

The data plane routing mechanism that will be used for replication.

+ */ + dataPlaneRouting?: ReplicationConfigurationDataPlaneRouting | string; + + /** + *

Whether to create a Public IP for the Recovery Instance by default.

+ */ + createPublicIP?: boolean; + + /** + *

A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

+ */ + stagingAreaTags?: { [key: string]: string }; + + /** + *

The Point in time (PIT) policy to manage snapshots taken during replication.

+ */ + pitPolicy?: PITPolicyRule[]; +} + +export namespace ReplicationConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ReplicationConfiguration): any => ({ + ...obj, + ...(obj.stagingAreaTags && { stagingAreaTags: SENSITIVE_STRING }), + }); +} + +export interface RetryDataReplicationRequest { + /** + *

The ID of the Source Server whose data replication should be retried.

+ */ + sourceServerID: string | undefined; +} + +export namespace RetryDataReplicationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RetryDataReplicationRequest): any => ({ + ...obj, + }); +} + +/** + *

An object representing the Source Server to recover.

+ */ +export interface StartRecoveryRequestSourceServer { + /** + *

The ID of the Source Server you want to recover.

+ */ + sourceServerID: string | undefined; + + /** + *

The ID of a Recovery Snapshot we want to recover from. Omit this field to launch from the latest data by taking an on-demand snapshot.

+ */ + recoverySnapshotID?: string; +} + +export namespace StartRecoveryRequestSourceServer { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartRecoveryRequestSourceServer): any => ({ + ...obj, + }); +} + +export interface StartRecoveryRequest { + /** + *

The Source Servers that we want to start a Recovery Job for.

+ */ + sourceServers: StartRecoveryRequestSourceServer[] | undefined; + + /** + *

Whether this Source Server Recovery operation is a drill or not.

+ */ + isDrill?: boolean; + + /** + *

The tags to be associated with the Recovery Job.

+ */ + tags?: { [key: string]: string }; +} + +export namespace StartRecoveryRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartRecoveryRequest): any => ({ + ...obj, + ...(obj.tags && { tags: SENSITIVE_STRING }), + }); +} + +export interface StartRecoveryResponse { + /** + *

The Recovery Job.

+ */ + job?: Job; +} + +export namespace StartRecoveryResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartRecoveryResponse): any => ({ + ...obj, + ...(obj.job && { job: Job.filterSensitiveLog(obj.job) }), + }); +} + +export interface UpdateLaunchConfigurationRequest { + /** + *

The ID of the Source Server that we want to retrieve a Launch Configuration for.

+ */ + sourceServerID: string | undefined; + + /** + *

The name of the launch configuration.

+ */ + name?: string; + + /** + *

The state of the Recovery Instance in EC2 after the recovery operation.

+ */ + launchDisposition?: LaunchDisposition | string; + + /** + *

Whether Elastic Disaster Recovery should try to automatically choose the instance type that best matches the OS, CPU, and RAM of your Source Server.

+ */ + targetInstanceTypeRightSizingMethod?: TargetInstanceTypeRightSizingMethod | string; + + /** + *

Whether we should copy the Private IP of the Source Server to the Recovery Instance.

+ */ + copyPrivateIp?: boolean; + + /** + *

Whether we want to copy the tags of the Source Server to the EC2 machine of the Recovery Instance.

+ */ + copyTags?: boolean; + + /** + *

The licensing configuration to be used for this launch configuration.

+ */ + licensing?: Licensing; +} + +export namespace UpdateLaunchConfigurationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateLaunchConfigurationRequest): any => ({ + ...obj, + }); +} + +export interface UpdateReplicationConfigurationRequest { + /** + *

The ID of the Source Server for this Replication Configuration.

+ */ + sourceServerID: string | undefined; + + /** + *

The name of the Replication Configuration.

+ */ + name?: string; + + /** + *

The subnet to be used by the replication staging area.

+ */ + stagingAreaSubnetId?: string; + + /** + *

Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration.

+ */ + associateDefaultSecurityGroup?: boolean; + + /** + *

The security group IDs that will be used by the replication server.

+ */ + replicationServersSecurityGroupsIDs?: string[]; + + /** + *

The instance type to be used for the replication server.

+ */ + replicationServerInstanceType?: string; + + /** + *

Whether to use a dedicated Replication Server in the replication staging area.

+ */ + useDedicatedReplicationServer?: boolean; + + /** + *

The Staging Disk EBS volume type to be used during replication.

+ */ + defaultLargeStagingDiskType?: ReplicationConfigurationDefaultLargeStagingDiskType | string; + + /** + *

The configuration of the disks of the Source Server to be replicated.

+ */ + replicatedDisks?: ReplicationConfigurationReplicatedDisk[]; + + /** + *

The type of EBS encryption to be used during replication.

+ */ + ebsEncryption?: ReplicationConfigurationEbsEncryption | string; + + /** + *

The ARN of the EBS encryption key to be used during replication.

+ */ + ebsEncryptionKeyArn?: string; + + /** + *

Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

+ */ + bandwidthThrottling?: number; + + /** + *

The data plane routing mechanism that will be used for replication.

+ */ + dataPlaneRouting?: ReplicationConfigurationDataPlaneRouting | string; + + /** + *

Whether to create a Public IP for the Recovery Instance by default.

+ */ + createPublicIP?: boolean; + + /** + *

A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

+ */ + stagingAreaTags?: { [key: string]: string }; + + /** + *

The Point in time (PIT) policy to manage snapshots taken during replication.

+ */ + pitPolicy?: PITPolicyRule[]; +} + +export namespace UpdateReplicationConfigurationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateReplicationConfigurationRequest): any => ({ + ...obj, + ...(obj.stagingAreaTags && { stagingAreaTags: SENSITIVE_STRING }), + }); +} + +export interface TagResourceRequest { + /** + *

ARN of the resource for which tags are to be added or updated.

+ */ + resourceArn: string | undefined; + + /** + *

Array of tags to be added or updated.

+ */ + tags: { [key: string]: string } | undefined; +} + +export namespace TagResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TagResourceRequest): any => ({ + ...obj, + ...(obj.tags && { tags: SENSITIVE_STRING }), + }); +} + +export interface UntagResourceRequest { + /** + *

ARN of the resource for which tags are to be removed.

+ */ + resourceArn: string | undefined; + + /** + *

Array of tags to be removed.

+ */ + tagKeys: string[] | undefined; +} + +export namespace UntagResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UntagResourceRequest): any => ({ + ...obj, + ...(obj.tagKeys && { tagKeys: SENSITIVE_STRING }), + }); +} diff --git a/clients/client-drs/src/pagination/DescribeJobLogItemsPaginator.ts b/clients/client-drs/src/pagination/DescribeJobLogItemsPaginator.ts new file mode 100644 index 000000000000..9a135e25a5da --- /dev/null +++ b/clients/client-drs/src/pagination/DescribeJobLogItemsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + DescribeJobLogItemsCommand, + DescribeJobLogItemsCommandInput, + DescribeJobLogItemsCommandOutput, +} from "../commands/DescribeJobLogItemsCommand"; +import { Drs } from "../Drs"; +import { DrsClient } from "../DrsClient"; +import { DrsPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DrsClient, + input: DescribeJobLogItemsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new DescribeJobLogItemsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Drs, + input: DescribeJobLogItemsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.describeJobLogItems(input, ...args); +}; +export async function* paginateDescribeJobLogItems( + config: DrsPaginationConfiguration, + input: DescribeJobLogItemsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: DescribeJobLogItemsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Drs) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DrsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Drs | DrsClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-drs/src/pagination/DescribeJobsPaginator.ts b/clients/client-drs/src/pagination/DescribeJobsPaginator.ts new file mode 100644 index 000000000000..95e717820e30 --- /dev/null +++ b/clients/client-drs/src/pagination/DescribeJobsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + DescribeJobsCommand, + DescribeJobsCommandInput, + DescribeJobsCommandOutput, +} from "../commands/DescribeJobsCommand"; +import { Drs } from "../Drs"; +import { DrsClient } from "../DrsClient"; +import { DrsPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DrsClient, + input: DescribeJobsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new DescribeJobsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Drs, + input: DescribeJobsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.describeJobs(input, ...args); +}; +export async function* paginateDescribeJobs( + config: DrsPaginationConfiguration, + input: DescribeJobsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: DescribeJobsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Drs) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DrsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Drs | DrsClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-drs/src/pagination/DescribeRecoveryInstancesPaginator.ts b/clients/client-drs/src/pagination/DescribeRecoveryInstancesPaginator.ts new file mode 100644 index 000000000000..99291dd28950 --- /dev/null +++ b/clients/client-drs/src/pagination/DescribeRecoveryInstancesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + DescribeRecoveryInstancesCommand, + DescribeRecoveryInstancesCommandInput, + DescribeRecoveryInstancesCommandOutput, +} from "../commands/DescribeRecoveryInstancesCommand"; +import { Drs } from "../Drs"; +import { DrsClient } from "../DrsClient"; +import { DrsPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DrsClient, + input: DescribeRecoveryInstancesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new DescribeRecoveryInstancesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Drs, + input: DescribeRecoveryInstancesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.describeRecoveryInstances(input, ...args); +}; +export async function* paginateDescribeRecoveryInstances( + config: DrsPaginationConfiguration, + input: DescribeRecoveryInstancesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: DescribeRecoveryInstancesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Drs) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DrsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Drs | DrsClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-drs/src/pagination/DescribeRecoverySnapshotsPaginator.ts b/clients/client-drs/src/pagination/DescribeRecoverySnapshotsPaginator.ts new file mode 100644 index 000000000000..de074f0d6e1a --- /dev/null +++ b/clients/client-drs/src/pagination/DescribeRecoverySnapshotsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + DescribeRecoverySnapshotsCommand, + DescribeRecoverySnapshotsCommandInput, + DescribeRecoverySnapshotsCommandOutput, +} from "../commands/DescribeRecoverySnapshotsCommand"; +import { Drs } from "../Drs"; +import { DrsClient } from "../DrsClient"; +import { DrsPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DrsClient, + input: DescribeRecoverySnapshotsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new DescribeRecoverySnapshotsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Drs, + input: DescribeRecoverySnapshotsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.describeRecoverySnapshots(input, ...args); +}; +export async function* paginateDescribeRecoverySnapshots( + config: DrsPaginationConfiguration, + input: DescribeRecoverySnapshotsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: DescribeRecoverySnapshotsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Drs) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DrsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Drs | DrsClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-drs/src/pagination/DescribeReplicationConfigurationTemplatesPaginator.ts b/clients/client-drs/src/pagination/DescribeReplicationConfigurationTemplatesPaginator.ts new file mode 100644 index 000000000000..63d5cfee6cb2 --- /dev/null +++ b/clients/client-drs/src/pagination/DescribeReplicationConfigurationTemplatesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + DescribeReplicationConfigurationTemplatesCommand, + DescribeReplicationConfigurationTemplatesCommandInput, + DescribeReplicationConfigurationTemplatesCommandOutput, +} from "../commands/DescribeReplicationConfigurationTemplatesCommand"; +import { Drs } from "../Drs"; +import { DrsClient } from "../DrsClient"; +import { DrsPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DrsClient, + input: DescribeReplicationConfigurationTemplatesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new DescribeReplicationConfigurationTemplatesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Drs, + input: DescribeReplicationConfigurationTemplatesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.describeReplicationConfigurationTemplates(input, ...args); +}; +export async function* paginateDescribeReplicationConfigurationTemplates( + config: DrsPaginationConfiguration, + input: DescribeReplicationConfigurationTemplatesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: DescribeReplicationConfigurationTemplatesCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Drs) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DrsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Drs | DrsClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-drs/src/pagination/DescribeSourceServersPaginator.ts b/clients/client-drs/src/pagination/DescribeSourceServersPaginator.ts new file mode 100644 index 000000000000..3a9f6bb89ef9 --- /dev/null +++ b/clients/client-drs/src/pagination/DescribeSourceServersPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + DescribeSourceServersCommand, + DescribeSourceServersCommandInput, + DescribeSourceServersCommandOutput, +} from "../commands/DescribeSourceServersCommand"; +import { Drs } from "../Drs"; +import { DrsClient } from "../DrsClient"; +import { DrsPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: DrsClient, + input: DescribeSourceServersCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new DescribeSourceServersCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Drs, + input: DescribeSourceServersCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.describeSourceServers(input, ...args); +}; +export async function* paginateDescribeSourceServers( + config: DrsPaginationConfiguration, + input: DescribeSourceServersCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: DescribeSourceServersCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof Drs) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof DrsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Drs | DrsClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-drs/src/pagination/Interfaces.ts b/clients/client-drs/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..8cfeb6b9282b --- /dev/null +++ b/clients/client-drs/src/pagination/Interfaces.ts @@ -0,0 +1,8 @@ +import { PaginationConfiguration } from "@aws-sdk/types"; + +import { Drs } from "../Drs"; +import { DrsClient } from "../DrsClient"; + +export interface DrsPaginationConfiguration extends PaginationConfiguration { + client: Drs | DrsClient; +} diff --git a/clients/client-drs/src/pagination/index.ts b/clients/client-drs/src/pagination/index.ts new file mode 100644 index 000000000000..561222c6a8ae --- /dev/null +++ b/clients/client-drs/src/pagination/index.ts @@ -0,0 +1,7 @@ +export * from "./DescribeJobLogItemsPaginator"; +export * from "./DescribeJobsPaginator"; +export * from "./DescribeRecoveryInstancesPaginator"; +export * from "./DescribeRecoverySnapshotsPaginator"; +export * from "./DescribeReplicationConfigurationTemplatesPaginator"; +export * from "./DescribeSourceServersPaginator"; +export * from "./Interfaces"; diff --git a/clients/client-drs/src/protocols/Aws_restJson1.ts b/clients/client-drs/src/protocols/Aws_restJson1.ts new file mode 100644 index 000000000000..ad11142db1ca --- /dev/null +++ b/clients/client-drs/src/protocols/Aws_restJson1.ts @@ -0,0 +1,5247 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { + expectBoolean as __expectBoolean, + expectInt32 as __expectInt32, + expectLong as __expectLong, + expectNonNull as __expectNonNull, + expectObject as __expectObject, + expectString as __expectString, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + strictParseLong as __strictParseLong, +} from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, + SmithyException as __SmithyException, +} from "@aws-sdk/types"; + +import { + CreateReplicationConfigurationTemplateCommandInput, + CreateReplicationConfigurationTemplateCommandOutput, +} from "../commands/CreateReplicationConfigurationTemplateCommand"; +import { DeleteJobCommandInput, DeleteJobCommandOutput } from "../commands/DeleteJobCommand"; +import { + DeleteRecoveryInstanceCommandInput, + DeleteRecoveryInstanceCommandOutput, +} from "../commands/DeleteRecoveryInstanceCommand"; +import { + DeleteReplicationConfigurationTemplateCommandInput, + DeleteReplicationConfigurationTemplateCommandOutput, +} from "../commands/DeleteReplicationConfigurationTemplateCommand"; +import { DeleteSourceServerCommandInput, DeleteSourceServerCommandOutput } from "../commands/DeleteSourceServerCommand"; +import { + DescribeJobLogItemsCommandInput, + DescribeJobLogItemsCommandOutput, +} from "../commands/DescribeJobLogItemsCommand"; +import { DescribeJobsCommandInput, DescribeJobsCommandOutput } from "../commands/DescribeJobsCommand"; +import { + DescribeRecoveryInstancesCommandInput, + DescribeRecoveryInstancesCommandOutput, +} from "../commands/DescribeRecoveryInstancesCommand"; +import { + DescribeRecoverySnapshotsCommandInput, + DescribeRecoverySnapshotsCommandOutput, +} from "../commands/DescribeRecoverySnapshotsCommand"; +import { + DescribeReplicationConfigurationTemplatesCommandInput, + DescribeReplicationConfigurationTemplatesCommandOutput, +} from "../commands/DescribeReplicationConfigurationTemplatesCommand"; +import { + DescribeSourceServersCommandInput, + DescribeSourceServersCommandOutput, +} from "../commands/DescribeSourceServersCommand"; +import { + DisconnectRecoveryInstanceCommandInput, + DisconnectRecoveryInstanceCommandOutput, +} from "../commands/DisconnectRecoveryInstanceCommand"; +import { + DisconnectSourceServerCommandInput, + DisconnectSourceServerCommandOutput, +} from "../commands/DisconnectSourceServerCommand"; +import { + GetFailbackReplicationConfigurationCommandInput, + GetFailbackReplicationConfigurationCommandOutput, +} from "../commands/GetFailbackReplicationConfigurationCommand"; +import { + GetLaunchConfigurationCommandInput, + GetLaunchConfigurationCommandOutput, +} from "../commands/GetLaunchConfigurationCommand"; +import { + GetReplicationConfigurationCommandInput, + GetReplicationConfigurationCommandOutput, +} from "../commands/GetReplicationConfigurationCommand"; +import { InitializeServiceCommandInput, InitializeServiceCommandOutput } from "../commands/InitializeServiceCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { + RetryDataReplicationCommandInput, + RetryDataReplicationCommandOutput, +} from "../commands/RetryDataReplicationCommand"; +import { + StartFailbackLaunchCommandInput, + StartFailbackLaunchCommandOutput, +} from "../commands/StartFailbackLaunchCommand"; +import { StartRecoveryCommandInput, StartRecoveryCommandOutput } from "../commands/StartRecoveryCommand"; +import { StopFailbackCommandInput, StopFailbackCommandOutput } from "../commands/StopFailbackCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { + TerminateRecoveryInstancesCommandInput, + TerminateRecoveryInstancesCommandOutput, +} from "../commands/TerminateRecoveryInstancesCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { + UpdateFailbackReplicationConfigurationCommandInput, + UpdateFailbackReplicationConfigurationCommandOutput, +} from "../commands/UpdateFailbackReplicationConfigurationCommand"; +import { + UpdateLaunchConfigurationCommandInput, + UpdateLaunchConfigurationCommandOutput, +} from "../commands/UpdateLaunchConfigurationCommand"; +import { + UpdateReplicationConfigurationCommandInput, + UpdateReplicationConfigurationCommandOutput, +} from "../commands/UpdateReplicationConfigurationCommand"; +import { + UpdateReplicationConfigurationTemplateCommandInput, + UpdateReplicationConfigurationTemplateCommandOutput, +} from "../commands/UpdateReplicationConfigurationTemplateCommand"; +import { + AccessDeniedException, + ConflictException, + CPU, + DataReplicationError, + DataReplicationInfo, + DataReplicationInfoReplicatedDisk, + DataReplicationInitiation, + DataReplicationInitiationStep, + DescribeJobsRequestFilters, + DescribeRecoveryInstancesRequestFilters, + DescribeRecoverySnapshotsRequestFilters, + DescribeSourceServersRequestFilters, + Disk, + IdentificationHints, + InternalServerException, + Job, + JobLog, + JobLogEventData, + Licensing, + LifeCycle, + LifeCycleLastLaunch, + LifeCycleLastLaunchInitiated, + NetworkInterface, + OS, + ParticipatingServer, + PITPolicyRule, + RecoveryInstance, + RecoveryInstanceDataReplicationError, + RecoveryInstanceDataReplicationInfo, + RecoveryInstanceDataReplicationInfoReplicatedDisk, + RecoveryInstanceDataReplicationInitiation, + RecoveryInstanceDataReplicationInitiationStep, + RecoveryInstanceDisk, + RecoveryInstanceFailback, + RecoveryInstanceProperties, + RecoverySnapshot, + ReplicationConfigurationReplicatedDisk, + ReplicationConfigurationTemplate, + ResourceNotFoundException, + ServiceQuotaExceededException, + SourceProperties, + SourceServer, + StartRecoveryRequestSourceServer, + ThrottlingException, + UninitializedAccountException, + ValidationException, + ValidationExceptionField, +} from "../models/models_0"; + +export const serializeAws_restJson1CreateReplicationConfigurationTemplateCommand = async ( + input: CreateReplicationConfigurationTemplateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateReplicationConfigurationTemplate"; + let body: any; + body = JSON.stringify({ + ...(input.associateDefaultSecurityGroup !== undefined && + input.associateDefaultSecurityGroup !== null && { + associateDefaultSecurityGroup: input.associateDefaultSecurityGroup, + }), + ...(input.bandwidthThrottling !== undefined && + input.bandwidthThrottling !== null && { bandwidthThrottling: input.bandwidthThrottling }), + ...(input.createPublicIP !== undefined && + input.createPublicIP !== null && { createPublicIP: input.createPublicIP }), + ...(input.dataPlaneRouting !== undefined && + input.dataPlaneRouting !== null && { dataPlaneRouting: input.dataPlaneRouting }), + ...(input.defaultLargeStagingDiskType !== undefined && + input.defaultLargeStagingDiskType !== null && { defaultLargeStagingDiskType: input.defaultLargeStagingDiskType }), + ...(input.ebsEncryption !== undefined && input.ebsEncryption !== null && { ebsEncryption: input.ebsEncryption }), + ...(input.ebsEncryptionKeyArn !== undefined && + input.ebsEncryptionKeyArn !== null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }), + ...(input.pitPolicy !== undefined && + input.pitPolicy !== null && { pitPolicy: serializeAws_restJson1PITPolicy(input.pitPolicy, context) }), + ...(input.replicationServerInstanceType !== undefined && + input.replicationServerInstanceType !== null && { + replicationServerInstanceType: input.replicationServerInstanceType, + }), + ...(input.replicationServersSecurityGroupsIDs !== undefined && + input.replicationServersSecurityGroupsIDs !== null && { + replicationServersSecurityGroupsIDs: serializeAws_restJson1ReplicationServersSecurityGroupsIDs( + input.replicationServersSecurityGroupsIDs, + context + ), + }), + ...(input.stagingAreaSubnetId !== undefined && + input.stagingAreaSubnetId !== null && { stagingAreaSubnetId: input.stagingAreaSubnetId }), + ...(input.stagingAreaTags !== undefined && + input.stagingAreaTags !== null && { + stagingAreaTags: serializeAws_restJson1TagsMap(input.stagingAreaTags, context), + }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }), + ...(input.useDedicatedReplicationServer !== undefined && + input.useDedicatedReplicationServer !== null && { + useDedicatedReplicationServer: input.useDedicatedReplicationServer, + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteJobCommand = async ( + input: DeleteJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteJob"; + let body: any; + body = JSON.stringify({ + ...(input.jobID !== undefined && input.jobID !== null && { jobID: input.jobID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteRecoveryInstanceCommand = async ( + input: DeleteRecoveryInstanceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteRecoveryInstance"; + let body: any; + body = JSON.stringify({ + ...(input.recoveryInstanceID !== undefined && + input.recoveryInstanceID !== null && { recoveryInstanceID: input.recoveryInstanceID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteReplicationConfigurationTemplateCommand = async ( + input: DeleteReplicationConfigurationTemplateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteReplicationConfigurationTemplate"; + let body: any; + body = JSON.stringify({ + ...(input.replicationConfigurationTemplateID !== undefined && + input.replicationConfigurationTemplateID !== null && { + replicationConfigurationTemplateID: input.replicationConfigurationTemplateID, + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteSourceServerCommand = async ( + input: DeleteSourceServerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteSourceServer"; + let body: any; + body = JSON.stringify({ + ...(input.sourceServerID !== undefined && + input.sourceServerID !== null && { sourceServerID: input.sourceServerID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DescribeJobLogItemsCommand = async ( + input: DescribeJobLogItemsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeJobLogItems"; + let body: any; + body = JSON.stringify({ + ...(input.jobID !== undefined && input.jobID !== null && { jobID: input.jobID }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DescribeJobsCommand = async ( + input: DescribeJobsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeJobs"; + let body: any; + body = JSON.stringify({ + ...(input.filters !== undefined && + input.filters !== null && { filters: serializeAws_restJson1DescribeJobsRequestFilters(input.filters, context) }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DescribeRecoveryInstancesCommand = async ( + input: DescribeRecoveryInstancesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeRecoveryInstances"; + let body: any; + body = JSON.stringify({ + ...(input.filters !== undefined && + input.filters !== null && { + filters: serializeAws_restJson1DescribeRecoveryInstancesRequestFilters(input.filters, context), + }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DescribeRecoverySnapshotsCommand = async ( + input: DescribeRecoverySnapshotsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeRecoverySnapshots"; + let body: any; + body = JSON.stringify({ + ...(input.filters !== undefined && + input.filters !== null && { + filters: serializeAws_restJson1DescribeRecoverySnapshotsRequestFilters(input.filters, context), + }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.order !== undefined && input.order !== null && { order: input.order }), + ...(input.sourceServerID !== undefined && + input.sourceServerID !== null && { sourceServerID: input.sourceServerID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand = async ( + input: DescribeReplicationConfigurationTemplatesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/DescribeReplicationConfigurationTemplates"; + let body: any; + body = JSON.stringify({ + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.replicationConfigurationTemplateIDs !== undefined && + input.replicationConfigurationTemplateIDs !== null && { + replicationConfigurationTemplateIDs: serializeAws_restJson1ReplicationConfigurationTemplateIDs( + input.replicationConfigurationTemplateIDs, + context + ), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DescribeSourceServersCommand = async ( + input: DescribeSourceServersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSourceServers"; + let body: any; + body = JSON.stringify({ + ...(input.filters !== undefined && + input.filters !== null && { + filters: serializeAws_restJson1DescribeSourceServersRequestFilters(input.filters, context), + }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DisconnectRecoveryInstanceCommand = async ( + input: DisconnectRecoveryInstanceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisconnectRecoveryInstance"; + let body: any; + body = JSON.stringify({ + ...(input.recoveryInstanceID !== undefined && + input.recoveryInstanceID !== null && { recoveryInstanceID: input.recoveryInstanceID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DisconnectSourceServerCommand = async ( + input: DisconnectSourceServerCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisconnectSourceServer"; + let body: any; + body = JSON.stringify({ + ...(input.sourceServerID !== undefined && + input.sourceServerID !== null && { sourceServerID: input.sourceServerID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetFailbackReplicationConfigurationCommand = async ( + input: GetFailbackReplicationConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetFailbackReplicationConfiguration"; + let body: any; + body = JSON.stringify({ + ...(input.recoveryInstanceID !== undefined && + input.recoveryInstanceID !== null && { recoveryInstanceID: input.recoveryInstanceID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetLaunchConfigurationCommand = async ( + input: GetLaunchConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetLaunchConfiguration"; + let body: any; + body = JSON.stringify({ + ...(input.sourceServerID !== undefined && + input.sourceServerID !== null && { sourceServerID: input.sourceServerID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetReplicationConfigurationCommand = async ( + input: GetReplicationConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetReplicationConfiguration"; + let body: any; + body = JSON.stringify({ + ...(input.sourceServerID !== undefined && + input.sourceServerID !== null && { sourceServerID: input.sourceServerID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1InitializeServiceCommand = async ( + input: InitializeServiceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/InitializeService"; + let body: any; + body = ""; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: string = input.resourceArn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: resourceArn."); + } + resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: resourceArn."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1RetryDataReplicationCommand = async ( + input: RetryDataReplicationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RetryDataReplication"; + let body: any; + body = JSON.stringify({ + ...(input.sourceServerID !== undefined && + input.sourceServerID !== null && { sourceServerID: input.sourceServerID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1StartFailbackLaunchCommand = async ( + input: StartFailbackLaunchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartFailbackLaunch"; + let body: any; + body = JSON.stringify({ + ...(input.recoveryInstanceIDs !== undefined && + input.recoveryInstanceIDs !== null && { + recoveryInstanceIDs: serializeAws_restJson1StartFailbackRequestRecoveryInstanceIDs( + input.recoveryInstanceIDs, + context + ), + }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1StartRecoveryCommand = async ( + input: StartRecoveryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartRecovery"; + let body: any; + body = JSON.stringify({ + ...(input.isDrill !== undefined && input.isDrill !== null && { isDrill: input.isDrill }), + ...(input.sourceServers !== undefined && + input.sourceServers !== null && { + sourceServers: serializeAws_restJson1StartRecoveryRequestSourceServers(input.sourceServers, context), + }), + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1StopFailbackCommand = async ( + input: StopFailbackCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopFailback"; + let body: any; + body = JSON.stringify({ + ...(input.recoveryInstanceID !== undefined && + input.recoveryInstanceID !== null && { recoveryInstanceID: input.recoveryInstanceID }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: string = input.resourceArn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: resourceArn."); + } + resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: resourceArn."); + } + let body: any; + body = JSON.stringify({ + ...(input.tags !== undefined && + input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1TerminateRecoveryInstancesCommand = async ( + input: TerminateRecoveryInstancesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TerminateRecoveryInstances"; + let body: any; + body = JSON.stringify({ + ...(input.recoveryInstanceIDs !== undefined && + input.recoveryInstanceIDs !== null && { + recoveryInstanceIDs: serializeAws_restJson1RecoveryInstancesForTerminationRequest( + input.recoveryInstanceIDs, + context + ), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; + if (input.resourceArn !== undefined) { + const labelValue: string = input.resourceArn; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: resourceArn."); + } + resolvedPath = resolvedPath.replace("{resourceArn}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: resourceArn."); + } + const query: any = { + ...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry as any) }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1UpdateFailbackReplicationConfigurationCommand = async ( + input: UpdateFailbackReplicationConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateFailbackReplicationConfiguration"; + let body: any; + body = JSON.stringify({ + ...(input.bandwidthThrottling !== undefined && + input.bandwidthThrottling !== null && { bandwidthThrottling: input.bandwidthThrottling }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.recoveryInstanceID !== undefined && + input.recoveryInstanceID !== null && { recoveryInstanceID: input.recoveryInstanceID }), + ...(input.usePrivateIP !== undefined && input.usePrivateIP !== null && { usePrivateIP: input.usePrivateIP }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateLaunchConfigurationCommand = async ( + input: UpdateLaunchConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLaunchConfiguration"; + let body: any; + body = JSON.stringify({ + ...(input.copyPrivateIp !== undefined && input.copyPrivateIp !== null && { copyPrivateIp: input.copyPrivateIp }), + ...(input.copyTags !== undefined && input.copyTags !== null && { copyTags: input.copyTags }), + ...(input.launchDisposition !== undefined && + input.launchDisposition !== null && { launchDisposition: input.launchDisposition }), + ...(input.licensing !== undefined && + input.licensing !== null && { licensing: serializeAws_restJson1Licensing(input.licensing, context) }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.sourceServerID !== undefined && + input.sourceServerID !== null && { sourceServerID: input.sourceServerID }), + ...(input.targetInstanceTypeRightSizingMethod !== undefined && + input.targetInstanceTypeRightSizingMethod !== null && { + targetInstanceTypeRightSizingMethod: input.targetInstanceTypeRightSizingMethod, + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateReplicationConfigurationCommand = async ( + input: UpdateReplicationConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateReplicationConfiguration"; + let body: any; + body = JSON.stringify({ + ...(input.associateDefaultSecurityGroup !== undefined && + input.associateDefaultSecurityGroup !== null && { + associateDefaultSecurityGroup: input.associateDefaultSecurityGroup, + }), + ...(input.bandwidthThrottling !== undefined && + input.bandwidthThrottling !== null && { bandwidthThrottling: input.bandwidthThrottling }), + ...(input.createPublicIP !== undefined && + input.createPublicIP !== null && { createPublicIP: input.createPublicIP }), + ...(input.dataPlaneRouting !== undefined && + input.dataPlaneRouting !== null && { dataPlaneRouting: input.dataPlaneRouting }), + ...(input.defaultLargeStagingDiskType !== undefined && + input.defaultLargeStagingDiskType !== null && { defaultLargeStagingDiskType: input.defaultLargeStagingDiskType }), + ...(input.ebsEncryption !== undefined && input.ebsEncryption !== null && { ebsEncryption: input.ebsEncryption }), + ...(input.ebsEncryptionKeyArn !== undefined && + input.ebsEncryptionKeyArn !== null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.pitPolicy !== undefined && + input.pitPolicy !== null && { pitPolicy: serializeAws_restJson1PITPolicy(input.pitPolicy, context) }), + ...(input.replicatedDisks !== undefined && + input.replicatedDisks !== null && { + replicatedDisks: serializeAws_restJson1ReplicationConfigurationReplicatedDisks(input.replicatedDisks, context), + }), + ...(input.replicationServerInstanceType !== undefined && + input.replicationServerInstanceType !== null && { + replicationServerInstanceType: input.replicationServerInstanceType, + }), + ...(input.replicationServersSecurityGroupsIDs !== undefined && + input.replicationServersSecurityGroupsIDs !== null && { + replicationServersSecurityGroupsIDs: serializeAws_restJson1ReplicationServersSecurityGroupsIDs( + input.replicationServersSecurityGroupsIDs, + context + ), + }), + ...(input.sourceServerID !== undefined && + input.sourceServerID !== null && { sourceServerID: input.sourceServerID }), + ...(input.stagingAreaSubnetId !== undefined && + input.stagingAreaSubnetId !== null && { stagingAreaSubnetId: input.stagingAreaSubnetId }), + ...(input.stagingAreaTags !== undefined && + input.stagingAreaTags !== null && { + stagingAreaTags: serializeAws_restJson1TagsMap(input.stagingAreaTags, context), + }), + ...(input.useDedicatedReplicationServer !== undefined && + input.useDedicatedReplicationServer !== null && { + useDedicatedReplicationServer: input.useDedicatedReplicationServer, + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = async ( + input: UpdateReplicationConfigurationTemplateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateReplicationConfigurationTemplate"; + let body: any; + body = JSON.stringify({ + ...(input.arn !== undefined && input.arn !== null && { arn: input.arn }), + ...(input.associateDefaultSecurityGroup !== undefined && + input.associateDefaultSecurityGroup !== null && { + associateDefaultSecurityGroup: input.associateDefaultSecurityGroup, + }), + ...(input.bandwidthThrottling !== undefined && + input.bandwidthThrottling !== null && { bandwidthThrottling: input.bandwidthThrottling }), + ...(input.createPublicIP !== undefined && + input.createPublicIP !== null && { createPublicIP: input.createPublicIP }), + ...(input.dataPlaneRouting !== undefined && + input.dataPlaneRouting !== null && { dataPlaneRouting: input.dataPlaneRouting }), + ...(input.defaultLargeStagingDiskType !== undefined && + input.defaultLargeStagingDiskType !== null && { defaultLargeStagingDiskType: input.defaultLargeStagingDiskType }), + ...(input.ebsEncryption !== undefined && input.ebsEncryption !== null && { ebsEncryption: input.ebsEncryption }), + ...(input.ebsEncryptionKeyArn !== undefined && + input.ebsEncryptionKeyArn !== null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }), + ...(input.pitPolicy !== undefined && + input.pitPolicy !== null && { pitPolicy: serializeAws_restJson1PITPolicy(input.pitPolicy, context) }), + ...(input.replicationConfigurationTemplateID !== undefined && + input.replicationConfigurationTemplateID !== null && { + replicationConfigurationTemplateID: input.replicationConfigurationTemplateID, + }), + ...(input.replicationServerInstanceType !== undefined && + input.replicationServerInstanceType !== null && { + replicationServerInstanceType: input.replicationServerInstanceType, + }), + ...(input.replicationServersSecurityGroupsIDs !== undefined && + input.replicationServersSecurityGroupsIDs !== null && { + replicationServersSecurityGroupsIDs: serializeAws_restJson1ReplicationServersSecurityGroupsIDs( + input.replicationServersSecurityGroupsIDs, + context + ), + }), + ...(input.stagingAreaSubnetId !== undefined && + input.stagingAreaSubnetId !== null && { stagingAreaSubnetId: input.stagingAreaSubnetId }), + ...(input.stagingAreaTags !== undefined && + input.stagingAreaTags !== null && { + stagingAreaTags: serializeAws_restJson1TagsMap(input.stagingAreaTags, context), + }), + ...(input.useDedicatedReplicationServer !== undefined && + input.useDedicatedReplicationServer !== null && { + useDedicatedReplicationServer: input.useDedicatedReplicationServer, + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateReplicationConfigurationTemplateCommandError(output, context); + } + const contents: CreateReplicationConfigurationTemplateCommandOutput = { + $metadata: deserializeMetadata(output), + arn: undefined, + associateDefaultSecurityGroup: undefined, + bandwidthThrottling: undefined, + createPublicIP: undefined, + dataPlaneRouting: undefined, + defaultLargeStagingDiskType: undefined, + ebsEncryption: undefined, + ebsEncryptionKeyArn: undefined, + pitPolicy: undefined, + replicationConfigurationTemplateID: undefined, + replicationServerInstanceType: undefined, + replicationServersSecurityGroupsIDs: undefined, + stagingAreaSubnetId: undefined, + stagingAreaTags: undefined, + tags: undefined, + useDedicatedReplicationServer: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = __expectString(data.arn); + } + if (data.associateDefaultSecurityGroup !== undefined && data.associateDefaultSecurityGroup !== null) { + contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); + } + if (data.bandwidthThrottling !== undefined && data.bandwidthThrottling !== null) { + contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); + } + if (data.createPublicIP !== undefined && data.createPublicIP !== null) { + contents.createPublicIP = __expectBoolean(data.createPublicIP); + } + if (data.dataPlaneRouting !== undefined && data.dataPlaneRouting !== null) { + contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); + } + if (data.defaultLargeStagingDiskType !== undefined && data.defaultLargeStagingDiskType !== null) { + contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); + } + if (data.ebsEncryption !== undefined && data.ebsEncryption !== null) { + contents.ebsEncryption = __expectString(data.ebsEncryption); + } + if (data.ebsEncryptionKeyArn !== undefined && data.ebsEncryptionKeyArn !== null) { + contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); + } + if (data.pitPolicy !== undefined && data.pitPolicy !== null) { + contents.pitPolicy = deserializeAws_restJson1PITPolicy(data.pitPolicy, context); + } + if (data.replicationConfigurationTemplateID !== undefined && data.replicationConfigurationTemplateID !== null) { + contents.replicationConfigurationTemplateID = __expectString(data.replicationConfigurationTemplateID); + } + if (data.replicationServerInstanceType !== undefined && data.replicationServerInstanceType !== null) { + contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); + } + if (data.replicationServersSecurityGroupsIDs !== undefined && data.replicationServersSecurityGroupsIDs !== null) { + contents.replicationServersSecurityGroupsIDs = deserializeAws_restJson1ReplicationServersSecurityGroupsIDs( + data.replicationServersSecurityGroupsIDs, + context + ); + } + if (data.stagingAreaSubnetId !== undefined && data.stagingAreaSubnetId !== null) { + contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); + } + if (data.stagingAreaTags !== undefined && data.stagingAreaTags !== null) { + contents.stagingAreaTags = deserializeAws_restJson1TagsMap(data.stagingAreaTags, context); + } + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagsMap(data.tags, context); + } + if (data.useDedicatedReplicationServer !== undefined && data.useDedicatedReplicationServer !== null) { + contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateReplicationConfigurationTemplateCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.drs#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteJobCommandError(output, context); + } + const contents: DeleteJobCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteJobCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteRecoveryInstanceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteRecoveryInstanceCommandError(output, context); + } + const contents: DeleteRecoveryInstanceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteRecoveryInstanceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommandError(output, context); + } + const contents: DeleteReplicationConfigurationTemplateCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteSourceServerCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteSourceServerCommandError(output, context); + } + const contents: DeleteSourceServerCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteSourceServerCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeJobLogItemsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeJobLogItemsCommandError(output, context); + } + const contents: DescribeJobLogItemsCommandOutput = { + $metadata: deserializeMetadata(output), + items: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.items !== undefined && data.items !== null) { + contents.items = deserializeAws_restJson1JobLogs(data.items, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeJobLogItemsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeJobsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeJobsCommandError(output, context); + } + const contents: DescribeJobsCommandOutput = { + $metadata: deserializeMetadata(output), + items: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.items !== undefined && data.items !== null) { + contents.items = deserializeAws_restJson1JobsList(data.items, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeJobsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeRecoveryInstancesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeRecoveryInstancesCommandError(output, context); + } + const contents: DescribeRecoveryInstancesCommandOutput = { + $metadata: deserializeMetadata(output), + items: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.items !== undefined && data.items !== null) { + contents.items = deserializeAws_restJson1DescribeRecoveryInstancesItems(data.items, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeRecoveryInstancesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeRecoverySnapshotsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeRecoverySnapshotsCommandError(output, context); + } + const contents: DescribeRecoverySnapshotsCommandOutput = { + $metadata: deserializeMetadata(output), + items: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.items !== undefined && data.items !== null) { + contents.items = deserializeAws_restJson1RecoverySnapshotsList(data.items, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeRecoverySnapshotsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommandError(output, context); + } + const contents: DescribeReplicationConfigurationTemplatesCommandOutput = { + $metadata: deserializeMetadata(output), + items: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.items !== undefined && data.items !== null) { + contents.items = deserializeAws_restJson1ReplicationConfigurationTemplates(data.items, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DescribeSourceServersCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeSourceServersCommandError(output, context); + } + const contents: DescribeSourceServersCommandOutput = { + $metadata: deserializeMetadata(output), + items: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.items !== undefined && data.items !== null) { + contents.items = deserializeAws_restJson1SourceServersList(data.items, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeSourceServersCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DisconnectRecoveryInstanceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DisconnectRecoveryInstanceCommandError(output, context); + } + const contents: DisconnectRecoveryInstanceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DisconnectRecoveryInstanceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DisconnectSourceServerCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DisconnectSourceServerCommandError(output, context); + } + const contents: DisconnectSourceServerCommandOutput = { + $metadata: deserializeMetadata(output), + arn: undefined, + dataReplicationInfo: undefined, + lastLaunchResult: undefined, + lifeCycle: undefined, + recoveryInstanceId: undefined, + sourceProperties: undefined, + sourceServerID: undefined, + tags: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = __expectString(data.arn); + } + if (data.dataReplicationInfo !== undefined && data.dataReplicationInfo !== null) { + contents.dataReplicationInfo = deserializeAws_restJson1DataReplicationInfo(data.dataReplicationInfo, context); + } + if (data.lastLaunchResult !== undefined && data.lastLaunchResult !== null) { + contents.lastLaunchResult = __expectString(data.lastLaunchResult); + } + if (data.lifeCycle !== undefined && data.lifeCycle !== null) { + contents.lifeCycle = deserializeAws_restJson1LifeCycle(data.lifeCycle, context); + } + if (data.recoveryInstanceId !== undefined && data.recoveryInstanceId !== null) { + contents.recoveryInstanceId = __expectString(data.recoveryInstanceId); + } + if (data.sourceProperties !== undefined && data.sourceProperties !== null) { + contents.sourceProperties = deserializeAws_restJson1SourceProperties(data.sourceProperties, context); + } + if (data.sourceServerID !== undefined && data.sourceServerID !== null) { + contents.sourceServerID = __expectString(data.sourceServerID); + } + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagsMap(data.tags, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DisconnectSourceServerCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetFailbackReplicationConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetFailbackReplicationConfigurationCommandError(output, context); + } + const contents: GetFailbackReplicationConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + bandwidthThrottling: undefined, + name: undefined, + recoveryInstanceID: undefined, + usePrivateIP: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.bandwidthThrottling !== undefined && data.bandwidthThrottling !== null) { + contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); + } + if (data.name !== undefined && data.name !== null) { + contents.name = __expectString(data.name); + } + if (data.recoveryInstanceID !== undefined && data.recoveryInstanceID !== null) { + contents.recoveryInstanceID = __expectString(data.recoveryInstanceID); + } + if (data.usePrivateIP !== undefined && data.usePrivateIP !== null) { + contents.usePrivateIP = __expectBoolean(data.usePrivateIP); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetFailbackReplicationConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetLaunchConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetLaunchConfigurationCommandError(output, context); + } + const contents: GetLaunchConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + copyPrivateIp: undefined, + copyTags: undefined, + ec2LaunchTemplateID: undefined, + launchDisposition: undefined, + licensing: undefined, + name: undefined, + sourceServerID: undefined, + targetInstanceTypeRightSizingMethod: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.copyPrivateIp !== undefined && data.copyPrivateIp !== null) { + contents.copyPrivateIp = __expectBoolean(data.copyPrivateIp); + } + if (data.copyTags !== undefined && data.copyTags !== null) { + contents.copyTags = __expectBoolean(data.copyTags); + } + if (data.ec2LaunchTemplateID !== undefined && data.ec2LaunchTemplateID !== null) { + contents.ec2LaunchTemplateID = __expectString(data.ec2LaunchTemplateID); + } + if (data.launchDisposition !== undefined && data.launchDisposition !== null) { + contents.launchDisposition = __expectString(data.launchDisposition); + } + if (data.licensing !== undefined && data.licensing !== null) { + contents.licensing = deserializeAws_restJson1Licensing(data.licensing, context); + } + if (data.name !== undefined && data.name !== null) { + contents.name = __expectString(data.name); + } + if (data.sourceServerID !== undefined && data.sourceServerID !== null) { + contents.sourceServerID = __expectString(data.sourceServerID); + } + if (data.targetInstanceTypeRightSizingMethod !== undefined && data.targetInstanceTypeRightSizingMethod !== null) { + contents.targetInstanceTypeRightSizingMethod = __expectString(data.targetInstanceTypeRightSizingMethod); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetLaunchConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetReplicationConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetReplicationConfigurationCommandError(output, context); + } + const contents: GetReplicationConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + associateDefaultSecurityGroup: undefined, + bandwidthThrottling: undefined, + createPublicIP: undefined, + dataPlaneRouting: undefined, + defaultLargeStagingDiskType: undefined, + ebsEncryption: undefined, + ebsEncryptionKeyArn: undefined, + name: undefined, + pitPolicy: undefined, + replicatedDisks: undefined, + replicationServerInstanceType: undefined, + replicationServersSecurityGroupsIDs: undefined, + sourceServerID: undefined, + stagingAreaSubnetId: undefined, + stagingAreaTags: undefined, + useDedicatedReplicationServer: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.associateDefaultSecurityGroup !== undefined && data.associateDefaultSecurityGroup !== null) { + contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); + } + if (data.bandwidthThrottling !== undefined && data.bandwidthThrottling !== null) { + contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); + } + if (data.createPublicIP !== undefined && data.createPublicIP !== null) { + contents.createPublicIP = __expectBoolean(data.createPublicIP); + } + if (data.dataPlaneRouting !== undefined && data.dataPlaneRouting !== null) { + contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); + } + if (data.defaultLargeStagingDiskType !== undefined && data.defaultLargeStagingDiskType !== null) { + contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); + } + if (data.ebsEncryption !== undefined && data.ebsEncryption !== null) { + contents.ebsEncryption = __expectString(data.ebsEncryption); + } + if (data.ebsEncryptionKeyArn !== undefined && data.ebsEncryptionKeyArn !== null) { + contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); + } + if (data.name !== undefined && data.name !== null) { + contents.name = __expectString(data.name); + } + if (data.pitPolicy !== undefined && data.pitPolicy !== null) { + contents.pitPolicy = deserializeAws_restJson1PITPolicy(data.pitPolicy, context); + } + if (data.replicatedDisks !== undefined && data.replicatedDisks !== null) { + contents.replicatedDisks = deserializeAws_restJson1ReplicationConfigurationReplicatedDisks( + data.replicatedDisks, + context + ); + } + if (data.replicationServerInstanceType !== undefined && data.replicationServerInstanceType !== null) { + contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); + } + if (data.replicationServersSecurityGroupsIDs !== undefined && data.replicationServersSecurityGroupsIDs !== null) { + contents.replicationServersSecurityGroupsIDs = deserializeAws_restJson1ReplicationServersSecurityGroupsIDs( + data.replicationServersSecurityGroupsIDs, + context + ); + } + if (data.sourceServerID !== undefined && data.sourceServerID !== null) { + contents.sourceServerID = __expectString(data.sourceServerID); + } + if (data.stagingAreaSubnetId !== undefined && data.stagingAreaSubnetId !== null) { + contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); + } + if (data.stagingAreaTags !== undefined && data.stagingAreaTags !== null) { + contents.stagingAreaTags = deserializeAws_restJson1TagsMap(data.stagingAreaTags, context); + } + if (data.useDedicatedReplicationServer !== undefined && data.useDedicatedReplicationServer !== null) { + contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetReplicationConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1InitializeServiceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1InitializeServiceCommandError(output, context); + } + const contents: InitializeServiceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1InitializeServiceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListTagsForResourceCommandError(output, context); + } + const contents: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + tags: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagsMap(data.tags, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1RetryDataReplicationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1RetryDataReplicationCommandError(output, context); + } + const contents: RetryDataReplicationCommandOutput = { + $metadata: deserializeMetadata(output), + arn: undefined, + dataReplicationInfo: undefined, + lastLaunchResult: undefined, + lifeCycle: undefined, + recoveryInstanceId: undefined, + sourceProperties: undefined, + sourceServerID: undefined, + tags: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = __expectString(data.arn); + } + if (data.dataReplicationInfo !== undefined && data.dataReplicationInfo !== null) { + contents.dataReplicationInfo = deserializeAws_restJson1DataReplicationInfo(data.dataReplicationInfo, context); + } + if (data.lastLaunchResult !== undefined && data.lastLaunchResult !== null) { + contents.lastLaunchResult = __expectString(data.lastLaunchResult); + } + if (data.lifeCycle !== undefined && data.lifeCycle !== null) { + contents.lifeCycle = deserializeAws_restJson1LifeCycle(data.lifeCycle, context); + } + if (data.recoveryInstanceId !== undefined && data.recoveryInstanceId !== null) { + contents.recoveryInstanceId = __expectString(data.recoveryInstanceId); + } + if (data.sourceProperties !== undefined && data.sourceProperties !== null) { + contents.sourceProperties = deserializeAws_restJson1SourceProperties(data.sourceProperties, context); + } + if (data.sourceServerID !== undefined && data.sourceServerID !== null) { + contents.sourceServerID = __expectString(data.sourceServerID); + } + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagsMap(data.tags, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1RetryDataReplicationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartFailbackLaunchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartFailbackLaunchCommandError(output, context); + } + const contents: StartFailbackLaunchCommandOutput = { + $metadata: deserializeMetadata(output), + job: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.job !== undefined && data.job !== null) { + contents.job = deserializeAws_restJson1Job(data.job, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartFailbackLaunchCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.drs#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartRecoveryCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1StartRecoveryCommandError(output, context); + } + const contents: StartRecoveryCommandOutput = { + $metadata: deserializeMetadata(output), + job: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.job !== undefined && data.job !== null) { + contents.job = deserializeAws_restJson1Job(data.job, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartRecoveryCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.drs#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StopFailbackCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StopFailbackCommandError(output, context); + } + const contents: StopFailbackCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StopFailbackCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1TagResourceCommandError(output, context); + } + const contents: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1TerminateRecoveryInstancesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1TerminateRecoveryInstancesCommandError(output, context); + } + const contents: TerminateRecoveryInstancesCommandOutput = { + $metadata: deserializeMetadata(output), + job: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.job !== undefined && data.job !== null) { + contents.job = deserializeAws_restJson1Job(data.job, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1TerminateRecoveryInstancesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.drs#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UntagResourceCommandError(output, context); + } + const contents: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UntagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateFailbackReplicationConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateFailbackReplicationConfigurationCommandError(output, context); + } + const contents: UpdateFailbackReplicationConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateFailbackReplicationConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateLaunchConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateLaunchConfigurationCommandError(output, context); + } + const contents: UpdateLaunchConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + copyPrivateIp: undefined, + copyTags: undefined, + ec2LaunchTemplateID: undefined, + launchDisposition: undefined, + licensing: undefined, + name: undefined, + sourceServerID: undefined, + targetInstanceTypeRightSizingMethod: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.copyPrivateIp !== undefined && data.copyPrivateIp !== null) { + contents.copyPrivateIp = __expectBoolean(data.copyPrivateIp); + } + if (data.copyTags !== undefined && data.copyTags !== null) { + contents.copyTags = __expectBoolean(data.copyTags); + } + if (data.ec2LaunchTemplateID !== undefined && data.ec2LaunchTemplateID !== null) { + contents.ec2LaunchTemplateID = __expectString(data.ec2LaunchTemplateID); + } + if (data.launchDisposition !== undefined && data.launchDisposition !== null) { + contents.launchDisposition = __expectString(data.launchDisposition); + } + if (data.licensing !== undefined && data.licensing !== null) { + contents.licensing = deserializeAws_restJson1Licensing(data.licensing, context); + } + if (data.name !== undefined && data.name !== null) { + contents.name = __expectString(data.name); + } + if (data.sourceServerID !== undefined && data.sourceServerID !== null) { + contents.sourceServerID = __expectString(data.sourceServerID); + } + if (data.targetInstanceTypeRightSizingMethod !== undefined && data.targetInstanceTypeRightSizingMethod !== null) { + contents.targetInstanceTypeRightSizingMethod = __expectString(data.targetInstanceTypeRightSizingMethod); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateLaunchConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateReplicationConfigurationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateReplicationConfigurationCommandError(output, context); + } + const contents: UpdateReplicationConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + associateDefaultSecurityGroup: undefined, + bandwidthThrottling: undefined, + createPublicIP: undefined, + dataPlaneRouting: undefined, + defaultLargeStagingDiskType: undefined, + ebsEncryption: undefined, + ebsEncryptionKeyArn: undefined, + name: undefined, + pitPolicy: undefined, + replicatedDisks: undefined, + replicationServerInstanceType: undefined, + replicationServersSecurityGroupsIDs: undefined, + sourceServerID: undefined, + stagingAreaSubnetId: undefined, + stagingAreaTags: undefined, + useDedicatedReplicationServer: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.associateDefaultSecurityGroup !== undefined && data.associateDefaultSecurityGroup !== null) { + contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); + } + if (data.bandwidthThrottling !== undefined && data.bandwidthThrottling !== null) { + contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); + } + if (data.createPublicIP !== undefined && data.createPublicIP !== null) { + contents.createPublicIP = __expectBoolean(data.createPublicIP); + } + if (data.dataPlaneRouting !== undefined && data.dataPlaneRouting !== null) { + contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); + } + if (data.defaultLargeStagingDiskType !== undefined && data.defaultLargeStagingDiskType !== null) { + contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); + } + if (data.ebsEncryption !== undefined && data.ebsEncryption !== null) { + contents.ebsEncryption = __expectString(data.ebsEncryption); + } + if (data.ebsEncryptionKeyArn !== undefined && data.ebsEncryptionKeyArn !== null) { + contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); + } + if (data.name !== undefined && data.name !== null) { + contents.name = __expectString(data.name); + } + if (data.pitPolicy !== undefined && data.pitPolicy !== null) { + contents.pitPolicy = deserializeAws_restJson1PITPolicy(data.pitPolicy, context); + } + if (data.replicatedDisks !== undefined && data.replicatedDisks !== null) { + contents.replicatedDisks = deserializeAws_restJson1ReplicationConfigurationReplicatedDisks( + data.replicatedDisks, + context + ); + } + if (data.replicationServerInstanceType !== undefined && data.replicationServerInstanceType !== null) { + contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); + } + if (data.replicationServersSecurityGroupsIDs !== undefined && data.replicationServersSecurityGroupsIDs !== null) { + contents.replicationServersSecurityGroupsIDs = deserializeAws_restJson1ReplicationServersSecurityGroupsIDs( + data.replicationServersSecurityGroupsIDs, + context + ); + } + if (data.sourceServerID !== undefined && data.sourceServerID !== null) { + contents.sourceServerID = __expectString(data.sourceServerID); + } + if (data.stagingAreaSubnetId !== undefined && data.stagingAreaSubnetId !== null) { + contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); + } + if (data.stagingAreaTags !== undefined && data.stagingAreaTags !== null) { + contents.stagingAreaTags = deserializeAws_restJson1TagsMap(data.stagingAreaTags, context); + } + if (data.useDedicatedReplicationServer !== undefined && data.useDedicatedReplicationServer !== null) { + contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateReplicationConfigurationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.drs#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommandError(output, context); + } + const contents: UpdateReplicationConfigurationTemplateCommandOutput = { + $metadata: deserializeMetadata(output), + arn: undefined, + associateDefaultSecurityGroup: undefined, + bandwidthThrottling: undefined, + createPublicIP: undefined, + dataPlaneRouting: undefined, + defaultLargeStagingDiskType: undefined, + ebsEncryption: undefined, + ebsEncryptionKeyArn: undefined, + pitPolicy: undefined, + replicationConfigurationTemplateID: undefined, + replicationServerInstanceType: undefined, + replicationServersSecurityGroupsIDs: undefined, + stagingAreaSubnetId: undefined, + stagingAreaTags: undefined, + tags: undefined, + useDedicatedReplicationServer: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.arn !== undefined && data.arn !== null) { + contents.arn = __expectString(data.arn); + } + if (data.associateDefaultSecurityGroup !== undefined && data.associateDefaultSecurityGroup !== null) { + contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); + } + if (data.bandwidthThrottling !== undefined && data.bandwidthThrottling !== null) { + contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); + } + if (data.createPublicIP !== undefined && data.createPublicIP !== null) { + contents.createPublicIP = __expectBoolean(data.createPublicIP); + } + if (data.dataPlaneRouting !== undefined && data.dataPlaneRouting !== null) { + contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); + } + if (data.defaultLargeStagingDiskType !== undefined && data.defaultLargeStagingDiskType !== null) { + contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); + } + if (data.ebsEncryption !== undefined && data.ebsEncryption !== null) { + contents.ebsEncryption = __expectString(data.ebsEncryption); + } + if (data.ebsEncryptionKeyArn !== undefined && data.ebsEncryptionKeyArn !== null) { + contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); + } + if (data.pitPolicy !== undefined && data.pitPolicy !== null) { + contents.pitPolicy = deserializeAws_restJson1PITPolicy(data.pitPolicy, context); + } + if (data.replicationConfigurationTemplateID !== undefined && data.replicationConfigurationTemplateID !== null) { + contents.replicationConfigurationTemplateID = __expectString(data.replicationConfigurationTemplateID); + } + if (data.replicationServerInstanceType !== undefined && data.replicationServerInstanceType !== null) { + contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); + } + if (data.replicationServersSecurityGroupsIDs !== undefined && data.replicationServersSecurityGroupsIDs !== null) { + contents.replicationServersSecurityGroupsIDs = deserializeAws_restJson1ReplicationServersSecurityGroupsIDs( + data.replicationServersSecurityGroupsIDs, + context + ); + } + if (data.stagingAreaSubnetId !== undefined && data.stagingAreaSubnetId !== null) { + contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); + } + if (data.stagingAreaTags !== undefined && data.stagingAreaTags !== null) { + contents.stagingAreaTags = deserializeAws_restJson1TagsMap(data.stagingAreaTags, context); + } + if (data.tags !== undefined && data.tags !== null) { + contents.tags = deserializeAws_restJson1TagsMap(data.tags, context); + } + if (data.useDedicatedReplicationServer !== undefined && data.useDedicatedReplicationServer !== null) { + contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.drs#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.drs#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.drs#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.drs#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UninitializedAccountException": + case "com.amazonaws.drs#UninitializedAccountException": + response = { + ...(await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.drs#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +const deserializeAws_restJson1AccessDeniedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: AccessDeniedException = { + name: "AccessDeniedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + code: undefined, + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.code !== undefined && data.code !== null) { + contents.code = __expectString(data.code); + } + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ConflictExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ConflictException = { + name: "ConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + code: undefined, + message: undefined, + resourceId: undefined, + resourceType: undefined, + }; + const data: any = parsedOutput.body; + if (data.code !== undefined && data.code !== null) { + contents.code = __expectString(data.code); + } + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + if (data.resourceId !== undefined && data.resourceId !== null) { + contents.resourceId = __expectString(data.resourceId); + } + if (data.resourceType !== undefined && data.resourceType !== null) { + contents.resourceType = __expectString(data.resourceType); + } + return contents; +}; + +const deserializeAws_restJson1InternalServerExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: InternalServerException = { + name: "InternalServerException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + retryAfterSeconds: undefined, + }; + if (parsedOutput.headers["retry-after"] !== undefined) { + contents.retryAfterSeconds = __strictParseLong(parsedOutput.headers["retry-after"]); + } + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ResourceNotFoundException = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + code: undefined, + message: undefined, + resourceId: undefined, + resourceType: undefined, + }; + const data: any = parsedOutput.body; + if (data.code !== undefined && data.code !== null) { + contents.code = __expectString(data.code); + } + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + if (data.resourceId !== undefined && data.resourceId !== null) { + contents.resourceId = __expectString(data.resourceId); + } + if (data.resourceType !== undefined && data.resourceType !== null) { + contents.resourceType = __expectString(data.resourceType); + } + return contents; +}; + +const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ServiceQuotaExceededException = { + name: "ServiceQuotaExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + code: undefined, + message: undefined, + quotaCode: undefined, + resourceId: undefined, + resourceType: undefined, + serviceCode: undefined, + }; + const data: any = parsedOutput.body; + if (data.code !== undefined && data.code !== null) { + contents.code = __expectString(data.code); + } + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + if (data.quotaCode !== undefined && data.quotaCode !== null) { + contents.quotaCode = __expectString(data.quotaCode); + } + if (data.resourceId !== undefined && data.resourceId !== null) { + contents.resourceId = __expectString(data.resourceId); + } + if (data.resourceType !== undefined && data.resourceType !== null) { + contents.resourceType = __expectString(data.resourceType); + } + if (data.serviceCode !== undefined && data.serviceCode !== null) { + contents.serviceCode = __expectString(data.serviceCode); + } + return contents; +}; + +const deserializeAws_restJson1ThrottlingExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ThrottlingException = { + name: "ThrottlingException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + quotaCode: undefined, + retryAfterSeconds: undefined, + serviceCode: undefined, + }; + if (parsedOutput.headers["retry-after"] !== undefined) { + contents.retryAfterSeconds = parsedOutput.headers["retry-after"]; + } + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + if (data.quotaCode !== undefined && data.quotaCode !== null) { + contents.quotaCode = __expectString(data.quotaCode); + } + if (data.serviceCode !== undefined && data.serviceCode !== null) { + contents.serviceCode = __expectString(data.serviceCode); + } + return contents; +}; + +const deserializeAws_restJson1UninitializedAccountExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: UninitializedAccountException = { + name: "UninitializedAccountException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + code: undefined, + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.code !== undefined && data.code !== null) { + contents.code = __expectString(data.code); + } + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ValidationExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ValidationException = { + name: "ValidationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + code: undefined, + fieldList: undefined, + message: undefined, + reason: undefined, + }; + const data: any = parsedOutput.body; + if (data.code !== undefined && data.code !== null) { + contents.code = __expectString(data.code); + } + if (data.fieldList !== undefined && data.fieldList !== null) { + contents.fieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context); + } + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + if (data.reason !== undefined && data.reason !== null) { + contents.reason = __expectString(data.reason); + } + return contents; +}; + +const serializeAws_restJson1DescribeJobsRequestFilters = ( + input: DescribeJobsRequestFilters, + context: __SerdeContext +): any => { + return { + ...(input.fromDate !== undefined && input.fromDate !== null && { fromDate: input.fromDate }), + ...(input.jobIDs !== undefined && + input.jobIDs !== null && { + jobIDs: serializeAws_restJson1DescribeJobsRequestFiltersJobIDs(input.jobIDs, context), + }), + ...(input.toDate !== undefined && input.toDate !== null && { toDate: input.toDate }), + }; +}; + +const serializeAws_restJson1DescribeJobsRequestFiltersJobIDs = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1DescribeRecoveryInstancesRequestFilters = ( + input: DescribeRecoveryInstancesRequestFilters, + context: __SerdeContext +): any => { + return { + ...(input.recoveryInstanceIDs !== undefined && + input.recoveryInstanceIDs !== null && { + recoveryInstanceIDs: serializeAws_restJson1RecoveryInstanceIDs(input.recoveryInstanceIDs, context), + }), + ...(input.sourceServerIDs !== undefined && + input.sourceServerIDs !== null && { + sourceServerIDs: serializeAws_restJson1SourceServerIDs(input.sourceServerIDs, context), + }), + }; +}; + +const serializeAws_restJson1DescribeRecoverySnapshotsRequestFilters = ( + input: DescribeRecoverySnapshotsRequestFilters, + context: __SerdeContext +): any => { + return { + ...(input.fromDateTime !== undefined && input.fromDateTime !== null && { fromDateTime: input.fromDateTime }), + ...(input.toDateTime !== undefined && input.toDateTime !== null && { toDateTime: input.toDateTime }), + }; +}; + +const serializeAws_restJson1DescribeSourceServersRequestFilters = ( + input: DescribeSourceServersRequestFilters, + context: __SerdeContext +): any => { + return { + ...(input.hardwareId !== undefined && input.hardwareId !== null && { hardwareId: input.hardwareId }), + ...(input.sourceServerIDs !== undefined && + input.sourceServerIDs !== null && { + sourceServerIDs: serializeAws_restJson1DescribeSourceServersRequestFiltersIDs(input.sourceServerIDs, context), + }), + }; +}; + +const serializeAws_restJson1DescribeSourceServersRequestFiltersIDs = ( + input: string[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1Licensing = (input: Licensing, context: __SerdeContext): any => { + return { + ...(input.osByol !== undefined && input.osByol !== null && { osByol: input.osByol }), + }; +}; + +const serializeAws_restJson1PITPolicy = (input: PITPolicyRule[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_restJson1PITPolicyRule(entry, context); + }); +}; + +const serializeAws_restJson1PITPolicyRule = (input: PITPolicyRule, context: __SerdeContext): any => { + return { + ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }), + ...(input.interval !== undefined && input.interval !== null && { interval: input.interval }), + ...(input.retentionDuration !== undefined && + input.retentionDuration !== null && { retentionDuration: input.retentionDuration }), + ...(input.ruleID !== undefined && input.ruleID !== null && { ruleID: input.ruleID }), + ...(input.units !== undefined && input.units !== null && { units: input.units }), + }; +}; + +const serializeAws_restJson1RecoveryInstanceIDs = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1RecoveryInstancesForTerminationRequest = ( + input: string[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1ReplicationConfigurationReplicatedDisk = ( + input: ReplicationConfigurationReplicatedDisk, + context: __SerdeContext +): any => { + return { + ...(input.deviceName !== undefined && input.deviceName !== null && { deviceName: input.deviceName }), + ...(input.iops !== undefined && input.iops !== null && { iops: input.iops }), + ...(input.isBootDisk !== undefined && input.isBootDisk !== null && { isBootDisk: input.isBootDisk }), + ...(input.stagingDiskType !== undefined && + input.stagingDiskType !== null && { stagingDiskType: input.stagingDiskType }), + ...(input.throughput !== undefined && input.throughput !== null && { throughput: input.throughput }), + }; +}; + +const serializeAws_restJson1ReplicationConfigurationReplicatedDisks = ( + input: ReplicationConfigurationReplicatedDisk[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_restJson1ReplicationConfigurationReplicatedDisk(entry, context); + }); +}; + +const serializeAws_restJson1ReplicationConfigurationTemplateIDs = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1ReplicationServersSecurityGroupsIDs = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1SourceServerIDs = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1StartFailbackRequestRecoveryInstanceIDs = ( + input: string[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1StartRecoveryRequestSourceServer = ( + input: StartRecoveryRequestSourceServer, + context: __SerdeContext +): any => { + return { + ...(input.recoverySnapshotID !== undefined && + input.recoverySnapshotID !== null && { recoverySnapshotID: input.recoverySnapshotID }), + ...(input.sourceServerID !== undefined && + input.sourceServerID !== null && { sourceServerID: input.sourceServerID }), + }; +}; + +const serializeAws_restJson1StartRecoveryRequestSourceServers = ( + input: StartRecoveryRequestSourceServer[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_restJson1StartRecoveryRequestSourceServer(entry, context); + }); +}; + +const serializeAws_restJson1TagsMap = (input: { [key: string]: string }, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; + +const deserializeAws_restJson1CPU = (output: any, context: __SerdeContext): CPU => { + return { + cores: __expectLong(output.cores), + modelName: __expectString(output.modelName), + } as any; +}; + +const deserializeAws_restJson1Cpus = (output: any, context: __SerdeContext): CPU[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1CPU(entry, context); + }); +}; + +const deserializeAws_restJson1DataReplicationError = (output: any, context: __SerdeContext): DataReplicationError => { + return { + error: __expectString(output.error), + rawError: __expectString(output.rawError), + } as any; +}; + +const deserializeAws_restJson1DataReplicationInfo = (output: any, context: __SerdeContext): DataReplicationInfo => { + return { + dataReplicationError: + output.dataReplicationError !== undefined && output.dataReplicationError !== null + ? deserializeAws_restJson1DataReplicationError(output.dataReplicationError, context) + : undefined, + dataReplicationInitiation: + output.dataReplicationInitiation !== undefined && output.dataReplicationInitiation !== null + ? deserializeAws_restJson1DataReplicationInitiation(output.dataReplicationInitiation, context) + : undefined, + dataReplicationState: __expectString(output.dataReplicationState), + etaDateTime: __expectString(output.etaDateTime), + lagDuration: __expectString(output.lagDuration), + replicatedDisks: + output.replicatedDisks !== undefined && output.replicatedDisks !== null + ? deserializeAws_restJson1DataReplicationInfoReplicatedDisks(output.replicatedDisks, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1DataReplicationInfoReplicatedDisk = ( + output: any, + context: __SerdeContext +): DataReplicationInfoReplicatedDisk => { + return { + backloggedStorageBytes: __expectLong(output.backloggedStorageBytes), + deviceName: __expectString(output.deviceName), + replicatedStorageBytes: __expectLong(output.replicatedStorageBytes), + rescannedStorageBytes: __expectLong(output.rescannedStorageBytes), + totalStorageBytes: __expectLong(output.totalStorageBytes), + } as any; +}; + +const deserializeAws_restJson1DataReplicationInfoReplicatedDisks = ( + output: any, + context: __SerdeContext +): DataReplicationInfoReplicatedDisk[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1DataReplicationInfoReplicatedDisk(entry, context); + }); +}; + +const deserializeAws_restJson1DataReplicationInitiation = ( + output: any, + context: __SerdeContext +): DataReplicationInitiation => { + return { + nextAttemptDateTime: __expectString(output.nextAttemptDateTime), + startDateTime: __expectString(output.startDateTime), + steps: + output.steps !== undefined && output.steps !== null + ? deserializeAws_restJson1DataReplicationInitiationSteps(output.steps, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1DataReplicationInitiationStep = ( + output: any, + context: __SerdeContext +): DataReplicationInitiationStep => { + return { + name: __expectString(output.name), + status: __expectString(output.status), + } as any; +}; + +const deserializeAws_restJson1DataReplicationInitiationSteps = ( + output: any, + context: __SerdeContext +): DataReplicationInitiationStep[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1DataReplicationInitiationStep(entry, context); + }); +}; + +const deserializeAws_restJson1DescribeRecoveryInstancesItems = ( + output: any, + context: __SerdeContext +): RecoveryInstance[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1RecoveryInstance(entry, context); + }); +}; + +const deserializeAws_restJson1Disk = (output: any, context: __SerdeContext): Disk => { + return { + bytes: __expectLong(output.bytes), + deviceName: __expectString(output.deviceName), + } as any; +}; + +const deserializeAws_restJson1Disks = (output: any, context: __SerdeContext): Disk[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1Disk(entry, context); + }); +}; + +const deserializeAws_restJson1EbsSnapshotsList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1IdentificationHints = (output: any, context: __SerdeContext): IdentificationHints => { + return { + awsInstanceID: __expectString(output.awsInstanceID), + fqdn: __expectString(output.fqdn), + hostname: __expectString(output.hostname), + vmWareUuid: __expectString(output.vmWareUuid), + } as any; +}; + +const deserializeAws_restJson1IPsList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1Job = (output: any, context: __SerdeContext): Job => { + return { + arn: __expectString(output.arn), + creationDateTime: __expectString(output.creationDateTime), + endDateTime: __expectString(output.endDateTime), + initiatedBy: __expectString(output.initiatedBy), + jobID: __expectString(output.jobID), + participatingServers: + output.participatingServers !== undefined && output.participatingServers !== null + ? deserializeAws_restJson1ParticipatingServers(output.participatingServers, context) + : undefined, + status: __expectString(output.status), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1TagsMap(output.tags, context) + : undefined, + type: __expectString(output.type), + } as any; +}; + +const deserializeAws_restJson1JobLog = (output: any, context: __SerdeContext): JobLog => { + return { + event: __expectString(output.event), + eventData: + output.eventData !== undefined && output.eventData !== null + ? deserializeAws_restJson1JobLogEventData(output.eventData, context) + : undefined, + logDateTime: __expectString(output.logDateTime), + } as any; +}; + +const deserializeAws_restJson1JobLogEventData = (output: any, context: __SerdeContext): JobLogEventData => { + return { + conversionServerID: __expectString(output.conversionServerID), + rawError: __expectString(output.rawError), + sourceServerID: __expectString(output.sourceServerID), + targetInstanceID: __expectString(output.targetInstanceID), + } as any; +}; + +const deserializeAws_restJson1JobLogs = (output: any, context: __SerdeContext): JobLog[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1JobLog(entry, context); + }); +}; + +const deserializeAws_restJson1JobsList = (output: any, context: __SerdeContext): Job[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1Job(entry, context); + }); +}; + +const deserializeAws_restJson1Licensing = (output: any, context: __SerdeContext): Licensing => { + return { + osByol: __expectBoolean(output.osByol), + } as any; +}; + +const deserializeAws_restJson1LifeCycle = (output: any, context: __SerdeContext): LifeCycle => { + return { + addedToServiceDateTime: __expectString(output.addedToServiceDateTime), + elapsedReplicationDuration: __expectString(output.elapsedReplicationDuration), + firstByteDateTime: __expectString(output.firstByteDateTime), + lastLaunch: + output.lastLaunch !== undefined && output.lastLaunch !== null + ? deserializeAws_restJson1LifeCycleLastLaunch(output.lastLaunch, context) + : undefined, + lastSeenByServiceDateTime: __expectString(output.lastSeenByServiceDateTime), + } as any; +}; + +const deserializeAws_restJson1LifeCycleLastLaunch = (output: any, context: __SerdeContext): LifeCycleLastLaunch => { + return { + initiated: + output.initiated !== undefined && output.initiated !== null + ? deserializeAws_restJson1LifeCycleLastLaunchInitiated(output.initiated, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1LifeCycleLastLaunchInitiated = ( + output: any, + context: __SerdeContext +): LifeCycleLastLaunchInitiated => { + return { + apiCallDateTime: __expectString(output.apiCallDateTime), + jobID: __expectString(output.jobID), + type: __expectString(output.type), + } as any; +}; + +const deserializeAws_restJson1NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { + return { + ips: + output.ips !== undefined && output.ips !== null + ? deserializeAws_restJson1IPsList(output.ips, context) + : undefined, + isPrimary: __expectBoolean(output.isPrimary), + macAddress: __expectString(output.macAddress), + } as any; +}; + +const deserializeAws_restJson1NetworkInterfaces = (output: any, context: __SerdeContext): NetworkInterface[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1NetworkInterface(entry, context); + }); +}; + +const deserializeAws_restJson1OS = (output: any, context: __SerdeContext): OS => { + return { + fullString: __expectString(output.fullString), + } as any; +}; + +const deserializeAws_restJson1ParticipatingServer = (output: any, context: __SerdeContext): ParticipatingServer => { + return { + launchStatus: __expectString(output.launchStatus), + recoveryInstanceID: __expectString(output.recoveryInstanceID), + sourceServerID: __expectString(output.sourceServerID), + } as any; +}; + +const deserializeAws_restJson1ParticipatingServers = (output: any, context: __SerdeContext): ParticipatingServer[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ParticipatingServer(entry, context); + }); +}; + +const deserializeAws_restJson1PITPolicy = (output: any, context: __SerdeContext): PITPolicyRule[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1PITPolicyRule(entry, context); + }); +}; + +const deserializeAws_restJson1PITPolicyRule = (output: any, context: __SerdeContext): PITPolicyRule => { + return { + enabled: __expectBoolean(output.enabled), + interval: __expectInt32(output.interval), + retentionDuration: __expectInt32(output.retentionDuration), + ruleID: __expectLong(output.ruleID), + units: __expectString(output.units), + } as any; +}; + +const deserializeAws_restJson1RecoveryInstance = (output: any, context: __SerdeContext): RecoveryInstance => { + return { + arn: __expectString(output.arn), + dataReplicationInfo: + output.dataReplicationInfo !== undefined && output.dataReplicationInfo !== null + ? deserializeAws_restJson1RecoveryInstanceDataReplicationInfo(output.dataReplicationInfo, context) + : undefined, + ec2InstanceID: __expectString(output.ec2InstanceID), + ec2InstanceState: __expectString(output.ec2InstanceState), + failback: + output.failback !== undefined && output.failback !== null + ? deserializeAws_restJson1RecoveryInstanceFailback(output.failback, context) + : undefined, + isDrill: __expectBoolean(output.isDrill), + jobID: __expectString(output.jobID), + pointInTimeSnapshotDateTime: __expectString(output.pointInTimeSnapshotDateTime), + recoveryInstanceID: __expectString(output.recoveryInstanceID), + recoveryInstanceProperties: + output.recoveryInstanceProperties !== undefined && output.recoveryInstanceProperties !== null + ? deserializeAws_restJson1RecoveryInstanceProperties(output.recoveryInstanceProperties, context) + : undefined, + sourceServerID: __expectString(output.sourceServerID), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1TagsMap(output.tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1RecoveryInstanceDataReplicationError = ( + output: any, + context: __SerdeContext +): RecoveryInstanceDataReplicationError => { + return { + error: __expectString(output.error), + rawError: __expectString(output.rawError), + } as any; +}; + +const deserializeAws_restJson1RecoveryInstanceDataReplicationInfo = ( + output: any, + context: __SerdeContext +): RecoveryInstanceDataReplicationInfo => { + return { + dataReplicationError: + output.dataReplicationError !== undefined && output.dataReplicationError !== null + ? deserializeAws_restJson1RecoveryInstanceDataReplicationError(output.dataReplicationError, context) + : undefined, + dataReplicationInitiation: + output.dataReplicationInitiation !== undefined && output.dataReplicationInitiation !== null + ? deserializeAws_restJson1RecoveryInstanceDataReplicationInitiation(output.dataReplicationInitiation, context) + : undefined, + dataReplicationState: __expectString(output.dataReplicationState), + etaDateTime: __expectString(output.etaDateTime), + lagDuration: __expectString(output.lagDuration), + replicatedDisks: + output.replicatedDisks !== undefined && output.replicatedDisks !== null + ? deserializeAws_restJson1RecoveryInstanceDataReplicationInfoReplicatedDisks(output.replicatedDisks, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1RecoveryInstanceDataReplicationInfoReplicatedDisk = ( + output: any, + context: __SerdeContext +): RecoveryInstanceDataReplicationInfoReplicatedDisk => { + return { + backloggedStorageBytes: __expectLong(output.backloggedStorageBytes), + deviceName: __expectString(output.deviceName), + replicatedStorageBytes: __expectLong(output.replicatedStorageBytes), + rescannedStorageBytes: __expectLong(output.rescannedStorageBytes), + totalStorageBytes: __expectLong(output.totalStorageBytes), + } as any; +}; + +const deserializeAws_restJson1RecoveryInstanceDataReplicationInfoReplicatedDisks = ( + output: any, + context: __SerdeContext +): RecoveryInstanceDataReplicationInfoReplicatedDisk[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1RecoveryInstanceDataReplicationInfoReplicatedDisk(entry, context); + }); +}; + +const deserializeAws_restJson1RecoveryInstanceDataReplicationInitiation = ( + output: any, + context: __SerdeContext +): RecoveryInstanceDataReplicationInitiation => { + return { + startDateTime: __expectString(output.startDateTime), + steps: + output.steps !== undefined && output.steps !== null + ? deserializeAws_restJson1RecoveryInstanceDataReplicationInitiationSteps(output.steps, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1RecoveryInstanceDataReplicationInitiationStep = ( + output: any, + context: __SerdeContext +): RecoveryInstanceDataReplicationInitiationStep => { + return { + name: __expectString(output.name), + status: __expectString(output.status), + } as any; +}; + +const deserializeAws_restJson1RecoveryInstanceDataReplicationInitiationSteps = ( + output: any, + context: __SerdeContext +): RecoveryInstanceDataReplicationInitiationStep[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1RecoveryInstanceDataReplicationInitiationStep(entry, context); + }); +}; + +const deserializeAws_restJson1RecoveryInstanceDisk = (output: any, context: __SerdeContext): RecoveryInstanceDisk => { + return { + bytes: __expectLong(output.bytes), + ebsVolumeID: __expectString(output.ebsVolumeID), + internalDeviceName: __expectString(output.internalDeviceName), + } as any; +}; + +const deserializeAws_restJson1RecoveryInstanceDisks = ( + output: any, + context: __SerdeContext +): RecoveryInstanceDisk[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1RecoveryInstanceDisk(entry, context); + }); +}; + +const deserializeAws_restJson1RecoveryInstanceFailback = ( + output: any, + context: __SerdeContext +): RecoveryInstanceFailback => { + return { + agentLastSeenByServiceDateTime: __expectString(output.agentLastSeenByServiceDateTime), + elapsedReplicationDuration: __expectString(output.elapsedReplicationDuration), + failbackClientID: __expectString(output.failbackClientID), + failbackClientLastSeenByServiceDateTime: __expectString(output.failbackClientLastSeenByServiceDateTime), + failbackInitiationTime: __expectString(output.failbackInitiationTime), + failbackJobID: __expectString(output.failbackJobID), + failbackToOriginalServer: __expectBoolean(output.failbackToOriginalServer), + firstByteDateTime: __expectString(output.firstByteDateTime), + state: __expectString(output.state), + } as any; +}; + +const deserializeAws_restJson1RecoveryInstanceProperties = ( + output: any, + context: __SerdeContext +): RecoveryInstanceProperties => { + return { + cpus: + output.cpus !== undefined && output.cpus !== null + ? deserializeAws_restJson1Cpus(output.cpus, context) + : undefined, + disks: + output.disks !== undefined && output.disks !== null + ? deserializeAws_restJson1RecoveryInstanceDisks(output.disks, context) + : undefined, + identificationHints: + output.identificationHints !== undefined && output.identificationHints !== null + ? deserializeAws_restJson1IdentificationHints(output.identificationHints, context) + : undefined, + lastUpdatedDateTime: __expectString(output.lastUpdatedDateTime), + networkInterfaces: + output.networkInterfaces !== undefined && output.networkInterfaces !== null + ? deserializeAws_restJson1NetworkInterfaces(output.networkInterfaces, context) + : undefined, + os: output.os !== undefined && output.os !== null ? deserializeAws_restJson1OS(output.os, context) : undefined, + ramBytes: __expectLong(output.ramBytes), + } as any; +}; + +const deserializeAws_restJson1RecoverySnapshot = (output: any, context: __SerdeContext): RecoverySnapshot => { + return { + ebsSnapshots: + output.ebsSnapshots !== undefined && output.ebsSnapshots !== null + ? deserializeAws_restJson1EbsSnapshotsList(output.ebsSnapshots, context) + : undefined, + expectedTimestamp: __expectString(output.expectedTimestamp), + snapshotID: __expectString(output.snapshotID), + sourceServerID: __expectString(output.sourceServerID), + timestamp: __expectString(output.timestamp), + } as any; +}; + +const deserializeAws_restJson1RecoverySnapshotsList = (output: any, context: __SerdeContext): RecoverySnapshot[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1RecoverySnapshot(entry, context); + }); +}; + +const deserializeAws_restJson1ReplicationConfigurationReplicatedDisk = ( + output: any, + context: __SerdeContext +): ReplicationConfigurationReplicatedDisk => { + return { + deviceName: __expectString(output.deviceName), + iops: __expectLong(output.iops), + isBootDisk: __expectBoolean(output.isBootDisk), + stagingDiskType: __expectString(output.stagingDiskType), + throughput: __expectLong(output.throughput), + } as any; +}; + +const deserializeAws_restJson1ReplicationConfigurationReplicatedDisks = ( + output: any, + context: __SerdeContext +): ReplicationConfigurationReplicatedDisk[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ReplicationConfigurationReplicatedDisk(entry, context); + }); +}; + +const deserializeAws_restJson1ReplicationConfigurationTemplate = ( + output: any, + context: __SerdeContext +): ReplicationConfigurationTemplate => { + return { + arn: __expectString(output.arn), + associateDefaultSecurityGroup: __expectBoolean(output.associateDefaultSecurityGroup), + bandwidthThrottling: __expectLong(output.bandwidthThrottling), + createPublicIP: __expectBoolean(output.createPublicIP), + dataPlaneRouting: __expectString(output.dataPlaneRouting), + defaultLargeStagingDiskType: __expectString(output.defaultLargeStagingDiskType), + ebsEncryption: __expectString(output.ebsEncryption), + ebsEncryptionKeyArn: __expectString(output.ebsEncryptionKeyArn), + pitPolicy: + output.pitPolicy !== undefined && output.pitPolicy !== null + ? deserializeAws_restJson1PITPolicy(output.pitPolicy, context) + : undefined, + replicationConfigurationTemplateID: __expectString(output.replicationConfigurationTemplateID), + replicationServerInstanceType: __expectString(output.replicationServerInstanceType), + replicationServersSecurityGroupsIDs: + output.replicationServersSecurityGroupsIDs !== undefined && output.replicationServersSecurityGroupsIDs !== null + ? deserializeAws_restJson1ReplicationServersSecurityGroupsIDs( + output.replicationServersSecurityGroupsIDs, + context + ) + : undefined, + stagingAreaSubnetId: __expectString(output.stagingAreaSubnetId), + stagingAreaTags: + output.stagingAreaTags !== undefined && output.stagingAreaTags !== null + ? deserializeAws_restJson1TagsMap(output.stagingAreaTags, context) + : undefined, + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1TagsMap(output.tags, context) + : undefined, + useDedicatedReplicationServer: __expectBoolean(output.useDedicatedReplicationServer), + } as any; +}; + +const deserializeAws_restJson1ReplicationConfigurationTemplates = ( + output: any, + context: __SerdeContext +): ReplicationConfigurationTemplate[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ReplicationConfigurationTemplate(entry, context); + }); +}; + +const deserializeAws_restJson1ReplicationServersSecurityGroupsIDs = ( + output: any, + context: __SerdeContext +): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1SourceProperties = (output: any, context: __SerdeContext): SourceProperties => { + return { + cpus: + output.cpus !== undefined && output.cpus !== null + ? deserializeAws_restJson1Cpus(output.cpus, context) + : undefined, + disks: + output.disks !== undefined && output.disks !== null + ? deserializeAws_restJson1Disks(output.disks, context) + : undefined, + identificationHints: + output.identificationHints !== undefined && output.identificationHints !== null + ? deserializeAws_restJson1IdentificationHints(output.identificationHints, context) + : undefined, + lastUpdatedDateTime: __expectString(output.lastUpdatedDateTime), + networkInterfaces: + output.networkInterfaces !== undefined && output.networkInterfaces !== null + ? deserializeAws_restJson1NetworkInterfaces(output.networkInterfaces, context) + : undefined, + os: output.os !== undefined && output.os !== null ? deserializeAws_restJson1OS(output.os, context) : undefined, + ramBytes: __expectLong(output.ramBytes), + recommendedInstanceType: __expectString(output.recommendedInstanceType), + } as any; +}; + +const deserializeAws_restJson1SourceServer = (output: any, context: __SerdeContext): SourceServer => { + return { + arn: __expectString(output.arn), + dataReplicationInfo: + output.dataReplicationInfo !== undefined && output.dataReplicationInfo !== null + ? deserializeAws_restJson1DataReplicationInfo(output.dataReplicationInfo, context) + : undefined, + lastLaunchResult: __expectString(output.lastLaunchResult), + lifeCycle: + output.lifeCycle !== undefined && output.lifeCycle !== null + ? deserializeAws_restJson1LifeCycle(output.lifeCycle, context) + : undefined, + recoveryInstanceId: __expectString(output.recoveryInstanceId), + sourceProperties: + output.sourceProperties !== undefined && output.sourceProperties !== null + ? deserializeAws_restJson1SourceProperties(output.sourceProperties, context) + : undefined, + sourceServerID: __expectString(output.sourceServerID), + tags: + output.tags !== undefined && output.tags !== null + ? deserializeAws_restJson1TagsMap(output.tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1SourceServersList = (output: any, context: __SerdeContext): SourceServer[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1SourceServer(entry, context); + }); +}; + +const deserializeAws_restJson1TagsMap = (output: any, context: __SerdeContext): { [key: string]: string } => { + return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: __expectString(value) as any, + }; + }, {}); +}; + +const deserializeAws_restJson1ValidationExceptionField = ( + output: any, + context: __SerdeContext +): ValidationExceptionField => { + return { + message: __expectString(output.message), + name: __expectString(output.name), + } as any; +}; + +const deserializeAws_restJson1ValidationExceptionFieldList = ( + output: any, + context: __SerdeContext +): ValidationExceptionField[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ValidationExceptionField(entry, context); + }); +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const isSerializableHeaderValue = (value: any): boolean => + value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string): string => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + + return ""; +}; diff --git a/clients/client-drs/src/runtimeConfig.browser.ts b/clients/client-drs/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..0107140b2bfd --- /dev/null +++ b/clients/client-drs/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; +import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; +import { invalidProvider } from "@aws-sdk/invalid-dependency"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; +import { DrsClientConfig } from "./DrsClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: DrsClientConfig) => { + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new FetchHttpHandler(), + retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-drs/src/runtimeConfig.native.ts b/clients/client-drs/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..99a562278b6b --- /dev/null +++ b/clients/client-drs/src/runtimeConfig.native.ts @@ -0,0 +1,17 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { DrsClientConfig } from "./DrsClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: DrsClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-drs/src/runtimeConfig.shared.ts b/clients/client-drs/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..6c901de3166a --- /dev/null +++ b/clients/client-drs/src/runtimeConfig.shared.ts @@ -0,0 +1,17 @@ +import { Logger as __Logger } from "@aws-sdk/types"; +import { parseUrl } from "@aws-sdk/url-parser"; + +import { DrsClientConfig } from "./DrsClient"; +import { defaultRegionInfoProvider } from "./endpoints"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: DrsClientConfig) => ({ + apiVersion: "2020-02-26", + disableHostPrefix: config?.disableHostPrefix ?? false, + logger: config?.logger ?? ({} as __Logger), + regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider, + serviceId: config?.serviceId ?? "drs", + urlParser: config?.urlParser ?? parseUrl, +}); diff --git a/clients/client-drs/src/runtimeConfig.ts b/clients/client-drs/src/runtimeConfig.ts new file mode 100644 index 000000000000..37fd5def840d --- /dev/null +++ b/clients/client-drs/src/runtimeConfig.ts @@ -0,0 +1,53 @@ +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { Hash } from "@aws-sdk/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; +import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; +import { DrsClientConfig } from "./DrsClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: DrsClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new NodeHttpHandler(), + retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-drs/tsconfig.es.json b/clients/client-drs/tsconfig.es.json new file mode 100644 index 000000000000..4c72364cd1a0 --- /dev/null +++ b/clients/client-drs/tsconfig.es.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], + "outDir": "dist-es" + } +} diff --git a/clients/client-drs/tsconfig.json b/clients/client-drs/tsconfig.json new file mode 100644 index 000000000000..093039289c53 --- /dev/null +++ b/clients/client-drs/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "alwaysStrict": true, + "target": "ES2018", + "module": "commonjs", + "strict": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "outDir": "dist-cjs", + "removeComments": true + }, + "typedocOptions": { + "exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"], + "excludeNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "includeDeclarations": true, + "stripInternal": true, + "readme": "README.md", + "mode": "file", + "out": "docs", + "theme": "minimal", + "plugin": ["@aws-sdk/service-client-documentation-generator"] + }, + "exclude": ["test/**/*"] +} diff --git a/clients/client-drs/tsconfig.types.json b/clients/client-drs/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-drs/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-ec2/src/models/models_0.ts b/clients/client-ec2/src/models/models_0.ts index f4a12ded15c1..24b2d427cc55 100644 --- a/clients/client-ec2/src/models/models_0.ts +++ b/clients/client-ec2/src/models/models_0.ts @@ -5777,6 +5777,15 @@ export type _InstanceType = | "c6gn.large" | "c6gn.medium" | "c6gn.xlarge" + | "c6i.12xlarge" + | "c6i.16xlarge" + | "c6i.24xlarge" + | "c6i.2xlarge" + | "c6i.32xlarge" + | "c6i.4xlarge" + | "c6i.8xlarge" + | "c6i.large" + | "c6i.xlarge" | "cc1.4xlarge" | "cc2.8xlarge" | "cg1.4xlarge" @@ -5817,6 +5826,14 @@ export type _InstanceType = | "g4dn.8xlarge" | "g4dn.metal" | "g4dn.xlarge" + | "g5.12xlarge" + | "g5.16xlarge" + | "g5.24xlarge" + | "g5.2xlarge" + | "g5.48xlarge" + | "g5.4xlarge" + | "g5.8xlarge" + | "g5.xlarge" | "h1.16xlarge" | "h1.2xlarge" | "h1.4xlarge" @@ -7210,6 +7227,12 @@ export interface Subnet { *

The Amazon Resource Name (ARN) of the Outpost.

*/ OutpostArn?: string; + + /** + *

Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet + * should return synthetic IPv6 addresses for IPv4-only destinations.

+ */ + EnableDns64?: boolean; } export namespace Subnet { diff --git a/clients/client-ec2/src/models/models_5.ts b/clients/client-ec2/src/models/models_5.ts index 2459cb329481..631c1c18585a 100644 --- a/clients/client-ec2/src/models/models_5.ts +++ b/clients/client-ec2/src/models/models_5.ts @@ -1106,6 +1106,12 @@ export interface ModifySubnetAttributeRequest { *

You must set this value when you specify true for MapCustomerOwnedIpOnLaunch.

*/ CustomerOwnedIpv4Pool?: string; + + /** + *

Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet + * should return synthetic IPv6 addresses for IPv4-only destinations.

+ */ + EnableDns64?: AttributeBooleanValue; } export namespace ModifySubnetAttributeRequest { diff --git a/clients/client-ec2/src/protocols/Aws_ec2.ts b/clients/client-ec2/src/protocols/Aws_ec2.ts index 3015bbecd1da..28609fa26db7 100644 --- a/clients/client-ec2/src/protocols/Aws_ec2.ts +++ b/clients/client-ec2/src/protocols/Aws_ec2.ts @@ -46008,6 +46008,13 @@ const serializeAws_ec2ModifySubnetAttributeRequest = ( if (input.CustomerOwnedIpv4Pool !== undefined && input.CustomerOwnedIpv4Pool !== null) { entries["CustomerOwnedIpv4Pool"] = input.CustomerOwnedIpv4Pool; } + if (input.EnableDns64 !== undefined && input.EnableDns64 !== null) { + const memberEntries = serializeAws_ec2AttributeBooleanValue(input.EnableDns64, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `EnableDns64.${key}`; + entries[loc] = value; + }); + } return entries; }; @@ -73478,6 +73485,7 @@ const deserializeAws_ec2Subnet = (output: any, context: __SerdeContext): Subnet Tags: undefined, SubnetArn: undefined, OutpostArn: undefined, + EnableDns64: undefined, }; if (output["availabilityZone"] !== undefined) { contents.AvailabilityZone = __expectString(output["availabilityZone"]); @@ -73542,6 +73550,9 @@ const deserializeAws_ec2Subnet = (output: any, context: __SerdeContext): Subnet if (output["outpostArn"] !== undefined) { contents.OutpostArn = __expectString(output["outpostArn"]); } + if (output["enableDns64"] !== undefined) { + contents.EnableDns64 = __parseBoolean(output["enableDns64"]); + } return contents; }; diff --git a/clients/client-eks/src/EKS.ts b/clients/client-eks/src/EKS.ts index 3a83723dc83f..44cabc4982c7 100644 --- a/clients/client-eks/src/EKS.ts +++ b/clients/client-eks/src/EKS.ts @@ -237,11 +237,12 @@ export class EKS extends EKSClient { /** *

Creates an Amazon EKS add-on.

- *

Amazon EKS add-ons help to automate the provisioning and lifecycle management of common - * operational software for Amazon EKS clusters. Amazon EKS add-ons can only be used with Amazon EKS - * clusters running version 1.18 with platform version eks.3 or later because + *

Amazon EKS add-ons help to automate the provisioning and lifecycle management + * of common operational software for Amazon EKS clusters. Amazon EKS + * add-ons require clusters running version 1.18 or later because Amazon EKS * add-ons rely on the Server-side Apply Kubernetes feature, which is only available in - * Kubernetes 1.18 and later.

+ * Kubernetes 1.18 and later. For more information, see Amazon EKS add-ons in + * the Amazon EKS User Guide.

*/ public createAddon(args: CreateAddonCommandInput, options?: __HttpHandlerOptions): Promise; public createAddon(args: CreateAddonCommandInput, cb: (err: any, data?: CreateAddonCommandOutput) => void): void; @@ -1074,7 +1075,7 @@ export class EKS extends EKSClient { * to add it to the Amazon EKS control plane.

*

Second, a Manifest containing the activationID and activationCode must be applied to the Kubernetes cluster through it's native provider to provide visibility.

* - *

After the Manifest is updated and applied, then the connected cluster is visible to the Amazon EKS control plane. If the Manifest is not applied within a set amount of time, + *

After the Manifest is updated and applied, then the connected cluster is visible to the Amazon EKS control plane. If the Manifest is not applied within three days, * then the connected cluster will no longer be visible and must be deregistered. See DeregisterCluster.

*/ public registerCluster( diff --git a/clients/client-eks/src/commands/CreateAddonCommand.ts b/clients/client-eks/src/commands/CreateAddonCommand.ts index 3979eb25fd6c..8a3793f130d9 100644 --- a/clients/client-eks/src/commands/CreateAddonCommand.ts +++ b/clients/client-eks/src/commands/CreateAddonCommand.ts @@ -23,11 +23,12 @@ export interface CreateAddonCommandOutput extends CreateAddonResponse, __Metadat /** *

Creates an Amazon EKS add-on.

- *

Amazon EKS add-ons help to automate the provisioning and lifecycle management of common - * operational software for Amazon EKS clusters. Amazon EKS add-ons can only be used with Amazon EKS - * clusters running version 1.18 with platform version eks.3 or later because + *

Amazon EKS add-ons help to automate the provisioning and lifecycle management + * of common operational software for Amazon EKS clusters. Amazon EKS + * add-ons require clusters running version 1.18 or later because Amazon EKS * add-ons rely on the Server-side Apply Kubernetes feature, which is only available in - * Kubernetes 1.18 and later.

+ * Kubernetes 1.18 and later. For more information, see Amazon EKS add-ons in + * the Amazon EKS User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-eks/src/commands/RegisterClusterCommand.ts b/clients/client-eks/src/commands/RegisterClusterCommand.ts index fa07f6f517e0..6cfeb6ea2f2f 100644 --- a/clients/client-eks/src/commands/RegisterClusterCommand.ts +++ b/clients/client-eks/src/commands/RegisterClusterCommand.ts @@ -30,7 +30,7 @@ export interface RegisterClusterCommandOutput extends RegisterClusterResponse, _ * to add it to the Amazon EKS control plane.

*

Second, a Manifest containing the activationID and activationCode must be applied to the Kubernetes cluster through it's native provider to provide visibility.

* - *

After the Manifest is updated and applied, then the connected cluster is visible to the Amazon EKS control plane. If the Manifest is not applied within a set amount of time, + *

After the Manifest is updated and applied, then the connected cluster is visible to the Amazon EKS control plane. If the Manifest is not applied within three days, * then the connected cluster will no longer be visible and must be deregistered. See DeregisterCluster.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-eks/src/models/models_0.ts b/clients/client-eks/src/models/models_0.ts index ce266621f6a2..9143e6eac9fc 100644 --- a/clients/client-eks/src/models/models_0.ts +++ b/clients/client-eks/src/models/models_0.ts @@ -1,5 +1,26 @@ import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; +/** + *

You don't have permissions to perform the requested operation. The user or role that + * is making the request must have at least one IAM permissions policy attached that + * grants the required permissions. For more information, see Access + * Management in the IAM User Guide.

+ */ +export interface AccessDeniedException extends __SmithyException, $MetadataBearer { + name: "AccessDeniedException"; + $fault: "client"; + message?: string; +} + +export namespace AccessDeniedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AccessDeniedException): any => ({ + ...obj, + }); +} + export enum AddonIssueCode { ACCESS_DENIED = "AccessDenied", ADMISSION_REQUEST_DENIED = "AdmissionRequestDenied", @@ -69,7 +90,8 @@ export type AddonStatus = | "UPDATING"; /** - *

An Amazon EKS add-on.

+ *

An Amazon EKS add-on. For more information, see Amazon EKS add-ons in + * the Amazon EKS User Guide.

*/ export interface Addon { /** @@ -928,7 +950,8 @@ export namespace CreateAddonRequest { export interface CreateAddonResponse { /** - *

An Amazon EKS add-on.

+ *

An Amazon EKS add-on. For more information, see Amazon EKS add-ons in + * the Amazon EKS User Guide.

*/ addon?: Addon; } @@ -955,7 +978,7 @@ export interface KubernetesNetworkConfigRequest { *
    *
  • *

    Within one of the following private IP address blocks: 10.0.0.0/8, - * 172.16.0.0.0/12, or 192.168.0.0/16.

    + * 172.16.0.0/12, or 192.168.0.0/16.

    *
  • *
  • *

    Doesn't overlap with any CIDR block assigned to the VPC that you selected for @@ -1241,7 +1264,7 @@ export interface ConnectorConfigResponse { provider?: string; /** - *

    The Amazon Resource Name (ARN) of the role that is used by the EKS connector to communicate with AWS services from the connected Kubernetes cluster.

    + *

    The Amazon Resource Name (ARN) of the role to communicate with services from the connected Kubernetes cluster.

    */ roleArn?: string; } @@ -1860,6 +1883,25 @@ export interface NodegroupScalingConfig { /** *

    The current number of nodes that the managed node group should maintain.

    + * + *

    If you use Cluster Autoscaler, you shouldn't change the desiredSize value + * directly, as this can cause the Cluster Autoscaler to suddenly scale up or scale + * down.

    + *
    + *

    Whenever this parameter changes, the number of worker nodes in the node group is + * updated to the specified size. If this parameter is given a value that is smaller than + * the current number of running worker nodes, the necessary number of worker nodes are + * terminated to match the given value. + * + * When using CloudFormation, no action occurs if you remove this parameter from your CFN + * template.

    + *

    This parameter can be different from minSize in some cases, such as when starting with + * extra hosts for testing. This parameter can also be different when you want to start + * with an estimated number of needed hosts, but let Cluster Autoscaler reduce the number + * if there are too many. When Cluster Autoscaler is used, the desiredSize parameter is + * altered by Cluster Autoscaler (but can be out-of-date for short periods of time). + * Cluster Autoscaler doesn't scale a managed node group lower than minSize or higher than + * maxSize.

    */ desiredSize?: number; } @@ -2207,7 +2249,7 @@ export interface Issue { *

    * NodeCreationFailure: Your launched instances * are unable to register with your Amazon EKS cluster. Common causes of this failure - * are insufficient node IAM role + * are insufficient node IAM role * permissions or lack of outbound internet access for the nodes.

    *
  • *
@@ -2493,7 +2535,8 @@ export namespace DeleteAddonRequest { export interface DeleteAddonResponse { /** - *

An Amazon EKS add-on.

+ *

An Amazon EKS add-on. For more information, see Amazon EKS add-ons in + * the Amazon EKS User Guide.

*/ addon?: Addon; } @@ -2670,7 +2713,8 @@ export namespace DescribeAddonRequest { export interface DescribeAddonResponse { /** - *

An Amazon EKS add-on.

+ *

An Amazon EKS add-on. For more information, see Amazon EKS add-ons in + * the Amazon EKS User Guide.

*/ addon?: Addon; } @@ -3623,7 +3667,7 @@ export namespace ConnectorConfigRequest { export interface RegisterClusterRequest { /** - *

Define a unique name for this cluster within your AWS account.

+ *

Define a unique name for this cluster for your Region.

*/ name: string | undefined; @@ -3636,6 +3680,14 @@ export interface RegisterClusterRequest { *

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

*/ clientRequestToken?: string; + + /** + *

The metadata that you apply to the cluster to assist with categorization and + * organization. Each tag consists of a key and an optional value, both of which you + * define. Cluster tags do not propagate to any other resources associated with the + * cluster.

+ */ + tags?: { [key: string]: string }; } export namespace RegisterClusterRequest { diff --git a/clients/client-eks/src/protocols/Aws_restJson1.ts b/clients/client-eks/src/protocols/Aws_restJson1.ts index 9329e594e795..d522375b2342 100644 --- a/clients/client-eks/src/protocols/Aws_restJson1.ts +++ b/clients/client-eks/src/protocols/Aws_restJson1.ts @@ -98,6 +98,7 @@ import { UpdateNodegroupVersionCommandOutput, } from "../commands/UpdateNodegroupVersionCommand"; import { + AccessDeniedException, Addon, AddonHealth, AddonInfo, @@ -1142,6 +1143,7 @@ export const serializeAws_restJson1RegisterClusterCommand = async ( connectorConfig: serializeAws_restJson1ConnectorConfigRequest(input.connectorConfig, context), }), ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }), }); return new __HttpRequest({ protocol, @@ -2418,6 +2420,14 @@ const deserializeAws_restJson1DeregisterClusterCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.eks#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ClientException": case "com.amazonaws.eks#ClientException": response = { @@ -3764,6 +3774,14 @@ const deserializeAws_restJson1RegisterClusterCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.eks#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ClientException": case "com.amazonaws.eks#ClientException": response = { @@ -4414,6 +4432,23 @@ const deserializeAws_restJson1UpdateNodegroupVersionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +const deserializeAws_restJson1AccessDeniedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: AccessDeniedException = { + name: "AccessDeniedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + const deserializeAws_restJson1BadRequestExceptionResponse = async ( parsedOutput: any, context: __SerdeContext diff --git a/clients/client-location/src/Location.ts b/clients/client-location/src/Location.ts index b33ff89b2cf1..261eb1f66cff 100644 --- a/clients/client-location/src/Location.ts +++ b/clients/client-location/src/Location.ts @@ -489,8 +489,7 @@ export class Location extends LocationClient { * Calculates a route given the following required parameters: * DeparturePostiton and DestinationPosition. Requires that * you first create a - * route calculator resource - *

+ * route calculator resource.

*

By default, a request that doesn't specify a departure time uses the best time of day * to travel with the best traffic conditions when calculating the route.

*

Additional options include:

@@ -503,7 +502,7 @@ export class Location extends LocationClient { * *

You can't specify both DepartureTime and * DepartureNow in a single request. Specifying both - * parameters returns an error message.

+ * parameters returns a validation error.

*
* *
  • @@ -606,8 +605,9 @@ export class Location extends LocationClient { } /** - *

    Creates a place index resource in your AWS account, which supports functions with - * geospatial data sourced from your chosen data provider.

    + *

    Creates a place index resource in your AWS account. Use a place index resource to + * geocode addresses and other text queries by using the SearchPlaceIndexForText operation, + * and reverse geocode coordinates by using the SearchPlaceIndexForPosition operation.

    */ public createPlaceIndex( args: CreatePlaceIndexCommandInput, @@ -1637,13 +1637,14 @@ export class Location extends LocationClient { /** *

    Geocodes free-form text, such as an address, name, city, or region to allow you to * search for Places or points of interest.

    - *

    Includes the option to apply additional parameters to narrow your list of - * results.

    + *

    Optional parameters let you narrow your search results by bounding box or + * country, or bias your search toward a specific position on the globe.

    * *

    You can search for places near a given position using BiasPosition, or * filter results within a bounding box using FilterBBox. Providing both * parameters simultaneously returns an error.

    *
    + *

    Search results are returned in order of highest to lowest relevance.

    */ public searchPlaceIndexForText( args: SearchPlaceIndexForTextCommandInput, diff --git a/clients/client-location/src/commands/CalculateRouteCommand.ts b/clients/client-location/src/commands/CalculateRouteCommand.ts index 3e9d34c1f73f..52a7e971160a 100644 --- a/clients/client-location/src/commands/CalculateRouteCommand.ts +++ b/clients/client-location/src/commands/CalculateRouteCommand.ts @@ -26,8 +26,7 @@ export interface CalculateRouteCommandOutput extends CalculateRouteResponse, __M * Calculates a route given the following required parameters: * DeparturePostiton and DestinationPosition. Requires that * you first create a - * route calculator resource - *

    + * route calculator resource.

    *

    By default, a request that doesn't specify a departure time uses the best time of day * to travel with the best traffic conditions when calculating the route.

    *

    Additional options include:

    @@ -40,7 +39,7 @@ export interface CalculateRouteCommandOutput extends CalculateRouteResponse, __M * *

    You can't specify both DepartureTime and * DepartureNow in a single request. Specifying both - * parameters returns an error message.

    + * parameters returns a validation error.

    *
    *
  • *
  • diff --git a/clients/client-location/src/commands/CreatePlaceIndexCommand.ts b/clients/client-location/src/commands/CreatePlaceIndexCommand.ts index 73bfed058bcd..acf9e318df3e 100644 --- a/clients/client-location/src/commands/CreatePlaceIndexCommand.ts +++ b/clients/client-location/src/commands/CreatePlaceIndexCommand.ts @@ -22,8 +22,9 @@ export interface CreatePlaceIndexCommandInput extends CreatePlaceIndexRequest {} export interface CreatePlaceIndexCommandOutput extends CreatePlaceIndexResponse, __MetadataBearer {} /** - *

    Creates a place index resource in your AWS account, which supports functions with - * geospatial data sourced from your chosen data provider.

    + *

    Creates a place index resource in your AWS account. Use a place index resource to + * geocode addresses and other text queries by using the SearchPlaceIndexForText operation, + * and reverse geocode coordinates by using the SearchPlaceIndexForPosition operation.

    * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-location/src/commands/SearchPlaceIndexForTextCommand.ts b/clients/client-location/src/commands/SearchPlaceIndexForTextCommand.ts index eeb8113952c2..9d6967ee158d 100644 --- a/clients/client-location/src/commands/SearchPlaceIndexForTextCommand.ts +++ b/clients/client-location/src/commands/SearchPlaceIndexForTextCommand.ts @@ -24,13 +24,14 @@ export interface SearchPlaceIndexForTextCommandOutput extends SearchPlaceIndexFo /** *

    Geocodes free-form text, such as an address, name, city, or region to allow you to * search for Places or points of interest.

    - *

    Includes the option to apply additional parameters to narrow your list of - * results.

    + *

    Optional parameters let you narrow your search results by bounding box or + * country, or bias your search toward a specific position on the globe.

    * *

    You can search for places near a given position using BiasPosition, or * filter results within a bounding box using FilterBBox. Providing both * parameters simultaneously returns an error.

    *
    + *

    Search results are returned in order of highest to lowest relevance.

    * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-location/src/models/models_0.ts b/clients/client-location/src/models/models_0.ts index 4900b8a53d48..046f23bdfbd2 100644 --- a/clients/client-location/src/models/models_0.ts +++ b/clients/client-location/src/models/models_0.ts @@ -1006,7 +1006,7 @@ export namespace CalculateRouteTruckModeOptions { export interface CalculateRouteRequest { /** - *

    The name of the route calculator resource that you want to use to calculate a route.

    + *

    The name of the route calculator resource that you want to use to calculate the route.

    */ CalculatorName: string | undefined; @@ -1089,7 +1089,7 @@ export interface CalculateRouteRequest { TravelMode?: TravelMode | string; /** - *

    Specifies the desired time of departure. Uses the given time to calculate a route. + *

    Specifies the desired time of departure. Uses the given time to calculate the route. * Otherwise, the best time of day to travel with the best traffic conditions is used to * calculate the route.

    * @@ -1405,7 +1405,7 @@ export interface CalculateRouteSummary { DurationSeconds: number | undefined; /** - *

    The unit of measurement for the distance.

    + *

    The unit of measurement for route distances.

    */ DistanceUnit: DistanceUnit | string | undefined; } @@ -1552,6 +1552,9 @@ export interface CreateGeofenceCollectionRequest { *

    Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: * + - = . _ : / @.

    *
  • + *
  • + *

    Cannot use "aws:" as a prefix for a key.

    + *
  • * */ Tags?: { [key: string]: string }; @@ -1739,6 +1742,9 @@ export interface CreateMapRequest { *

    Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / * @.

    * + *
  • + *

    Cannot use "aws:" as a prefix for a key.

    + *
  • * */ Tags?: { [key: string]: string }; @@ -1824,7 +1830,7 @@ export interface DataSourceConfiguration { * Storage specifies that the result can be cached or stored in a database.

    * * - *

    Default value: SingleUse + *

    Default value: SingleUse *

    */ IntendedUse?: IntendedUse | string; @@ -1859,7 +1865,7 @@ export interface CreatePlaceIndexRequest { IndexName: string | undefined; /** - *

    Specifies the data provider of geospatial data.

    + *

    Specifies the geospatial data provider for the new place index.

    * *

    This field is case-sensitive. Enter the valid values as shown. For example, entering * HERE returns an error.

    @@ -1876,7 +1882,8 @@ export interface CreatePlaceIndexRequest { * Here – For additional information about HERE Technologies' * coverage in your region of interest, see HERE details on goecoding coverage.

    * - *

    Place index resources using HERE Technologies as a data provider can't store results for locations in Japan. For more information, see the + *

    If you specify HERE Technologies (Here) as the data provider, + * you may not store results for locations in Japan. For more information, see the * AWS Service Terms * for Amazon Location Service.

    *
    @@ -1904,27 +1911,30 @@ export interface CreatePlaceIndexRequest { DataSourceConfiguration?: DataSourceConfiguration; /** - *

    Applies one or more tags to the place index resource. A tag is a key-value pair helps - * manage, identify, search, and filter your resources by labelling them.

    + *

    Applies one or more tags to the place index resource. A tag is a key-value pair that helps you + * manage, identify, search, and filter your resources.

    *

    Format: "key" : "value" *

    *

    Restrictions:

    *
      *
    • - *

      Maximum 50 tags per resource

      + *

      Maximum 50 tags per resource.

      *
    • *
    • - *

      Each resource tag must be unique with a maximum of one value.

      + *

      Each tag key must be unique and must have exactly one associated value.

      *
    • *
    • - *

      Maximum key length: 128 Unicode characters in UTF-8

      + *

      Maximum key length: 128 Unicode characters in UTF-8.

      *
    • *
    • - *

      Maximum value length: 256 Unicode characters in UTF-8

      + *

      Maximum value length: 256 Unicode characters in UTF-8.

      *
    • *
    • *

      Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - - * = . _ : / @.

      + * = . _ : / @

      + *
    • + *
    • + *

      Cannot use "aws:" as a prefix for a key.

      *
    • *
    */ @@ -2058,6 +2068,9 @@ export interface CreateRouteCalculatorRequest { *

    Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: * + - = . _ : / @.

    * + *
  • + *

    Cannot use "aws:" as a prefix for a key.

    + *
  • * */ Tags?: { [key: string]: string }; @@ -2118,7 +2131,7 @@ export namespace CreateRouteCalculatorResponse { }); } -export type PositionFiltering = "DistanceBased" | "TimeBased"; +export type PositionFiltering = "AccuracyBased" | "DistanceBased" | "TimeBased"; export interface CreateTrackerRequest { /** @@ -2196,6 +2209,9 @@ export interface CreateTrackerRequest { *

    Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: * + - = . _ : / @.

    * + *
  • + *

    Cannot use "aws:" as a prefix for a key.

    + *
  • * */ Tags?: { [key: string]: string }; @@ -2214,9 +2230,9 @@ export interface CreateTrackerRequest { *
  • *

    * DistanceBased - If the device has moved less than 30 m (98.4 ft), location updates are - * ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. - * This helps control costs by reducing the number of geofence evaluations and device positions to retrieve. - * Distance-based filtering can also reduce the jitter effect when displaying device trajectory on a map. + * ignored. Location updates within this area are neither evaluated against linked geofence collections, nor stored. + * This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through. + * Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map. *

    *
  • * @@ -2633,7 +2649,7 @@ export interface DescribePlaceIndexResponse { UpdateTime: Date | undefined; /** - *

    The data provider of geospatial data. Indicates one of the available providers:

    + *

    The data provider of geospatial data. Values can be one of the following:

    *
      *
    • *

      @@ -2646,7 +2662,7 @@ export interface DescribePlaceIndexResponse { *

      *
    • *
    - *

    For additional details on data providers, see Amazon Location Service data providers.

    + *

    For more information about data providers, see Amazon Location Service data providers.

    */ DataSource: string | undefined; @@ -2959,11 +2975,30 @@ export interface TagResourceRequest { ResourceArn: string | undefined; /** - *

    Tags that have been applied to the specified resource. Tags are mapped from the tag key to the tag value: "TagKey" : "TagValue".

    - *
      + *

      Applies one or more tags to specific resource. A tag is a key-value pair that helps you + * manage, identify, search, and filter your resources.

      + *

      Format: "key" : "value" + *

      + *

      Restrictions:

      + *
        *
      • - *

        Format example: {"tag1" : "value1", "tag2" : "value2"} - *

        + *

        Maximum 50 tags per resource.

        + *
      • + *
      • + *

        Each tag key must be unique and must have exactly one associated value.

        + *
      • + *
      • + *

        Maximum key length: 128 Unicode characters in UTF-8.

        + *
      • + *
      • + *

        Maximum value length: 256 Unicode characters in UTF-8.

        + *
      • + *
      • + *

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - + * = . _ : / @

        + *
      • + *
      • + *

        Cannot use "aws:" as a prefix for a key.

        *
      • *
      */ @@ -4077,7 +4112,7 @@ export interface ListPlaceIndexesResponseEntry { Description: string | undefined; /** - *

      The data provider of geospatial data. Indicates one of the available providers:

      + *

      The data provider of geospatial data. Values can be one of the following:

      *
        *
      • *

        @@ -4090,7 +4125,7 @@ export interface ListPlaceIndexesResponseEntry { *

        *
      • *
      - *

      For additional details on data providers, see Amazon Location Service data providers.

      + *

      For more information about data providers, see Amazon Location Service data providers.

      */ DataSource: string | undefined; @@ -4129,8 +4164,8 @@ export interface ListPlaceIndexesResponse { Entries: ListPlaceIndexesResponseEntry[] | undefined; /** - *

      A pagination token indicating there are additional pages available. You can use the - * token in a following request to fetch the next set of results.

      + *

      A pagination token indicating that there are additional pages available. You can use the + * token in a new request to fetch the next page of results.

      */ NextToken?: string; } @@ -4482,25 +4517,31 @@ export interface SearchPlaceIndexForPositionRequest { IndexName: string | undefined; /** - *

      Specifies a coordinate for the query defined by a longitude, and latitude.

      - *
        - *
      • - *

        The first position is the X coordinate, or longitude.

        - *
      • - *
      • - *

        The second position is the Y coordinate, or latitude.

        - *
      • - *
      - *

      For example, position=xLongitude&position=yLatitude .

      + *

      Specifies the longitude and latitude of the position to query.

      + *

      + * This parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; + * the second number represents the Y coordinate, or latitude.

      + *

      For example, [-123.1174, 49.2847] represents a position with + * longitude -123.1174 and + * latitude 49.2847.

      */ Position: number[] | undefined; /** - *

      An optional paramer. The maximum number of results returned per request.

      + *

      An optional parameter. The maximum number of results returned per request.

      *

      Default value: 50 *

      */ MaxResults?: number; + + /** + *

      The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, + * en for English.

      + *

      This setting affects the languages used in the results. It does not change which + * results are returned. If the language is not specified, or not supported for a + * particular result, the partner automatically chooses a language for the result.

      + */ + Language?: string; } export namespace SearchPlaceIndexForPositionRequest { @@ -4544,6 +4585,32 @@ export namespace PlaceGeometry { }); } +/** + *

      Information about a time zone. Includes the name of the time zone and the offset + * from UTC in seconds.

      + */ +export interface TimeZone { + /** + *

      The name of the time zone, following the + * IANA time zone standard. For example, America/Los_Angeles.

      + */ + Name: string | undefined; + + /** + *

      The time zone's offset, in seconds, from UTC.

      + */ + Offset?: number; +} + +export namespace TimeZone { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TimeZone): any => ({ + ...obj, + }); +} + /** *

      Contains details about addresses or points of interest that match the search * criteria.

      @@ -4583,7 +4650,7 @@ export interface Place { Municipality?: string; /** - *

      A country, or an area that's part of a larger region . For example, Metro + *

      A country, or an area that's part of a larger region. For example, Metro * Vancouver.

      */ SubRegion?: string; @@ -4605,6 +4672,25 @@ export interface Place { * address for the purpose of identifying a location.

      */ PostalCode?: string; + + /** + *

      + * True if the result is interpolated from other known places.

      + *

      + * False if the Place is a known place.

      + *

      Not returned when the partner does not provide the information.

      + *

      For example, returns False for an address location that is found in the + * partner data, but returns True if an address does not exist in the partner + * data and its location is calculated by interpolating between other known addresses. + *

      + */ + Interpolated?: boolean; + + /** + *

      The time zone in which the Place is located. Returned only when using + * Here as the selected partner.

      + */ + TimeZone?: TimeZone; } export namespace Place { @@ -4618,14 +4704,23 @@ export namespace Place { } /** - *

      Specifies a single point of interest, or Place as a result of a search query obtained - * from a dataset configured in the place index resource.

      + *

      Contains a search result from a position search query that is run on a place index resource.

      */ export interface SearchForPositionResult { /** - *

      Contains details about the relevant point of interest.

      + *

      Details about the search result, such as its address and position.

      */ Place: Place | undefined; + + /** + *

      The distance in meters of a great-circle arc between the query position and the + * result.

      + * + *

      A great-circle arc is the shortest path on a sphere, in this case the + * Earth. This returns the shortest distance between two locations.

      + *
      + */ + Distance: number | undefined; } export namespace SearchForPositionResult { @@ -4639,34 +4734,42 @@ export namespace SearchForPositionResult { } /** - *

      A summary of the reverse geocoding request sent using SearchPlaceIndexForPosition.

      + *

      A summary of the request sent by using SearchPlaceIndexForPosition.

      */ export interface SearchPlaceIndexForPositionSummary { /** - *

      The position given in the reverse geocoding request.

      + *

      The position specified in the request.

      */ Position: number[] | undefined; /** - *

      An optional parameter. The maximum number of results returned per request.

      + *

      Contains the optional result count limit that is specified in the request.

      *

      Default value: 50 *

      */ MaxResults?: number; /** - *

      The data provider of geospatial data. Indicates one of the available providers:

      + *

      The geospatial data provider attached to the place index resource specified in the request. + * Values can be one of the following:

      *
        *
      • *

        Esri

        *
      • *
      • - *

        HERE

        + *

        Here

        *
      • *
      - *

      For additional details on data providers, see Amazon Location Service data providers.

      + *

      For more information about data providers, see Amazon Location Service data providers.

      */ DataSource: string | undefined; + + /** + *

      The preferred language used to return results. Matches the language in the request. + * The value is a valid BCP 47 language tag, for example, + * en for English.

      + */ + Language?: string; } export namespace SearchPlaceIndexForPositionSummary { @@ -4681,7 +4784,9 @@ export namespace SearchPlaceIndexForPositionSummary { export interface SearchPlaceIndexForPositionResponse { /** - *

      Contains a summary of the request.

      + *

      Contains a summary of the request. Echoes the input values for Position, + * Language, MaxResults, and the DataSource of the place index. + *

      */ Summary: SearchPlaceIndexForPositionSummary | undefined; @@ -4711,64 +4816,52 @@ export interface SearchPlaceIndexForTextRequest { /** *

      The address, name, - * city, or region to be used in the search. In free-form text format. For example, 123 Any + * city, or region to be used in the search in free-form text format. For example, 123 Any * Street.

      */ Text: string | undefined; /** - *

      Searches for results closest to the given position. An optional parameter defined by - * longitude, and latitude.

      - *
        - *
      • - *

        The first bias position is the X coordinate, or longitude.

        - *
      • - *
      • - *

        The second bias position is the Y coordinate, or latitude.

        - *
      • - *
      - *

      For example, bias=xLongitude&bias=yLatitude.

      + *

      An optional parameter that indicates a preference for places that are closer to a specified position.

      + *

      + * If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the + * second number represents the Y coordinate, or latitude.

      + *

      For example, [-123.1174, 49.2847] represents the position with + * longitude -123.1174 and + * latitude 49.2847.

      + * + *

      + * BiasPosition and FilterBBox are mutually exclusive. Specifying both options + * results in an error. + *

      + *
      */ BiasPosition?: number[]; /** - *

      Filters the results by returning only Places within the provided bounding box. An - * optional parameter.

      - *

      The first 2 bbox parameters describe the lower southwest corner:

      - *
        - *
      • - *

        The first bbox position is the X coordinate or longitude of the lower - * southwest corner.

        - *
      • - *
      • - *

        The second bbox position is the Y coordinate or latitude of the lower - * southwest corner.

        - *
      • - *
      - *

      For example, bbox=xLongitudeSW&bbox=yLatitudeSW.

      - *

      The next bbox parameters describe the upper northeast corner:

      - *
        - *
      • - *

        The third bbox position is the X coordinate, or longitude of the - * upper northeast corner.

        - *
      • - *
      • - *

        The fourth bbox position is the Y coordinate, or longitude of the - * upper northeast corner.

        - *
      • - *
      - *

      For example, bbox=xLongitudeNE&bbox=yLatitudeNE + *

      An optional parameter that limits the search results by returning only places that are within the provided bounding box.

      + *

      + * If provided, this parameter must contain a total of four consecutive numbers in two pairs. + * The first pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) + * of the southwest corner of the bounding box; the second pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) + * of the northeast corner of the bounding box.

      + *

      For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents + * a bounding box where the southwest corner has longitude -12.7935 and latitude -37.4835, + * and the northeast corner has longitude -12.0684 and latitude -36.9542.

      + * + *

      + * FilterBBox and BiasPosition are mutually exclusive. Specifying both options results in an error. *

      + *
      */ FilterBBox?: number[]; /** - *

      Limits the search to the given a list of countries/regions. An optional - * parameter.

      + *

      An optional parameter that limits the search results by returning only places that are in a specified list of countries.

      *
        *
      • - *

        Use the ISO 3166 3-digit - * country code. For example, Australia uses three upper-case characters: + *

        Valid values include ISO 3166 3-digit + * country codes. For example, Australia uses three upper-case characters: * AUS.

        *
      • *
      @@ -4781,6 +4874,15 @@ export interface SearchPlaceIndexForTextRequest { *

      */ MaxResults?: number; + + /** + *

      The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, + * en for English.

      + *

      This setting affects the languages used in the results. It does not change which + * results are returned. If the language is not specified, or not supported for a + * particular result, the partner automatically chooses a language for the result.

      + */ + Language?: string; } export namespace SearchPlaceIndexForTextRequest { @@ -4796,14 +4898,32 @@ export namespace SearchPlaceIndexForTextRequest { } /** - *

      Contains relevant Places returned by calling - * SearchPlaceIndexForText.

      + *

      Contains a search result from a text search query that is run on a place index resource.

      */ export interface SearchForTextResult { /** - *

      Contains details about the relevant point of interest.

      + *

      Details about the search result, such as its address and position.

      */ Place: Place | undefined; + + /** + *

      The distance in meters of a great-circle arc between the bias position specified + * and the result. Distance will be returned only if a bias position was + * specified in the query.

      + * + *

      A great-circle arc is the shortest path on a sphere, in this case the + * Earth. This returns the shortest distance between two locations.

      + *
      + */ + Distance?: number; + + /** + *

      The relative confidence in the match for a result among the results returned. For + * example, if more fields for an address match (including house number, street, city, + * country/region, and postal code), the relevance score is closer to 1.

      + *

      Returned only when the partner selected is Esri.

      + */ + Relevance?: number; } export namespace SearchForTextResult { @@ -4817,56 +4937,64 @@ export namespace SearchForTextResult { } /** - *

      A summary of the geocoding request sent using SearchPlaceIndexForText.

      + *

      A summary of the request sent by using SearchPlaceIndexForText.

      */ export interface SearchPlaceIndexForTextSummary { /** - *

      The address, name, city or region to be used in the geocoding request. In free-form text - * format. For example, Vancouver.

      + *

      The search text specified in the request.

      */ Text: string | undefined; /** - *

      Contains the coordinates for the bias position entered in the geocoding request.

      + *

      Contains the coordinates for the optional bias position specified in the request.

      */ BiasPosition?: number[]; /** - *

      Contains the coordinates for the optional bounding box coordinated entered in the - * geocoding request.

      + *

      Contains the coordinates for the optional bounding box specified in the request.

      */ FilterBBox?: number[]; /** - *

      Contains the country filter entered in the geocoding request.

      + *

      Contains the optional country filter specified in the request.

      */ FilterCountries?: string[]; /** - *

      Contains the maximum number of results indicated for the request.

      + *

      Contains the optional result count limit specified in the request.

      */ MaxResults?: number; /** - *

      A bounding box that contains the search results within the specified area indicated by - * FilterBBox. A subset of bounding box specified using - * FilterBBox.

      + *

      The bounding box that fully contains all search results.

      + * + *

      If you specified the optional FilterBBox parameter in the request, ResultBBox + * is contained within FilterBBox.

      + *
      */ ResultBBox?: number[]; /** - *

      The data provider of geospatial data. Indicates one of the available providers:

      + *

      The geospatial data provider attached to the place index resource specified in the request. + * Values can be one of the following:

      *
        *
      • *

        Esri

        *
      • *
      • - *

        HERE

        + *

        Here

        *
      • *
      - *

      For additional details on data providers, see Amazon Location Service data providers.

      + *

      For more information about data providers, see Amazon Location Service data providers.

      */ DataSource: string | undefined; + + /** + *

      The preferred language used to return results. Matches the language in the request. + * The value is a valid BCP 47 language tag, for example, + * en for English.

      + */ + Language?: string; } export namespace SearchPlaceIndexForTextSummary { @@ -4884,14 +5012,16 @@ export namespace SearchPlaceIndexForTextSummary { export interface SearchPlaceIndexForTextResponse { /** - *

      Contains a summary of the request. Contains the BiasPosition, - * DataSource, FilterBBox, FilterCountries, - * MaxResults, ResultBBox, and Text.

      + *

      Contains a summary of the request. Echoes the input values for BiasPosition, + * FilterBBox, FilterCountries, Language, MaxResults, + * and Text. Also includes the DataSource of the place index and + * the bounding box, ResultBBox, which surrounds the search results. + *

      */ Summary: SearchPlaceIndexForTextSummary | undefined; /** - *

      A list of Places closest to the specified position. Each result contains additional + *

      A list of Places matching the input text. Each result contains additional * information about the specific point of interest.

      */ Results: SearchForTextResult[] | undefined; diff --git a/clients/client-location/src/protocols/Aws_restJson1.ts b/clients/client-location/src/protocols/Aws_restJson1.ts index 23ddd7f6ad5f..68b063fe92db 100644 --- a/clients/client-location/src/protocols/Aws_restJson1.ts +++ b/clients/client-location/src/protocols/Aws_restJson1.ts @@ -4,6 +4,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, @@ -183,6 +184,7 @@ import { ServiceQuotaExceededException, Step, ThrottlingException, + TimeZone, TruckDimensions, TruckWeight, ValidationException, @@ -1910,6 +1912,7 @@ export const serializeAws_restJson1SearchPlaceIndexForPositionCommand = async ( } let body: any; body = JSON.stringify({ + ...(input.Language !== undefined && input.Language !== null && { Language: input.Language }), ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), ...(input.Position !== undefined && input.Position !== null && { Position: serializeAws_restJson1Position(input.Position, context) }), @@ -1962,6 +1965,7 @@ export const serializeAws_restJson1SearchPlaceIndexForTextCommand = async ( input.FilterCountries !== null && { FilterCountries: serializeAws_restJson1CountryCodeList(input.FilterCountries, context), }), + ...(input.Language !== undefined && input.Language !== null && { Language: input.Language }), ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), ...(input.Text !== undefined && input.Text !== null && { Text: input.Text }), }); @@ -7877,6 +7881,7 @@ const deserializeAws_restJson1Place = (output: any, context: __SerdeContext): Pl output.Geometry !== undefined && output.Geometry !== null ? deserializeAws_restJson1PlaceGeometry(output.Geometry, context) : undefined, + Interpolated: __expectBoolean(output.Interpolated), Label: __expectString(output.Label), Municipality: __expectString(output.Municipality), Neighborhood: __expectString(output.Neighborhood), @@ -7884,6 +7889,10 @@ const deserializeAws_restJson1Place = (output: any, context: __SerdeContext): Pl Region: __expectString(output.Region), Street: __expectString(output.Street), SubRegion: __expectString(output.SubRegion), + TimeZone: + output.TimeZone !== undefined && output.TimeZone !== null + ? deserializeAws_restJson1TimeZone(output.TimeZone, context) + : undefined, } as any; }; @@ -7912,6 +7921,7 @@ const deserializeAws_restJson1SearchForPositionResult = ( context: __SerdeContext ): SearchForPositionResult => { return { + Distance: __limitedParseDouble(output.Distance), Place: output.Place !== undefined && output.Place !== null ? deserializeAws_restJson1Place(output.Place, context) @@ -7935,10 +7945,12 @@ const deserializeAws_restJson1SearchForPositionResultList = ( const deserializeAws_restJson1SearchForTextResult = (output: any, context: __SerdeContext): SearchForTextResult => { return { + Distance: __limitedParseDouble(output.Distance), Place: output.Place !== undefined && output.Place !== null ? deserializeAws_restJson1Place(output.Place, context) : undefined, + Relevance: __limitedParseDouble(output.Relevance), } as any; }; @@ -7962,6 +7974,7 @@ const deserializeAws_restJson1SearchPlaceIndexForPositionSummary = ( ): SearchPlaceIndexForPositionSummary => { return { DataSource: __expectString(output.DataSource), + Language: __expectString(output.Language), MaxResults: __expectInt32(output.MaxResults), Position: output.Position !== undefined && output.Position !== null @@ -7988,6 +8001,7 @@ const deserializeAws_restJson1SearchPlaceIndexForTextSummary = ( output.FilterCountries !== undefined && output.FilterCountries !== null ? deserializeAws_restJson1CountryCodeList(output.FilterCountries, context) : undefined, + Language: __expectString(output.Language), MaxResults: __expectInt32(output.MaxResults), ResultBBox: output.ResultBBox !== undefined && output.ResultBBox !== null @@ -8036,6 +8050,13 @@ const deserializeAws_restJson1TagMap = (output: any, context: __SerdeContext): { }, {}); }; +const deserializeAws_restJson1TimeZone = (output: any, context: __SerdeContext): TimeZone => { + return { + Name: __expectString(output.Name), + Offset: __expectInt32(output.Offset), + } as any; +}; + const deserializeAws_restJson1ValidationExceptionField = ( output: any, context: __SerdeContext diff --git a/clients/client-mediaconvert/src/models/models_0.ts b/clients/client-mediaconvert/src/models/models_0.ts index 6be110a1cb9b..ccfc1bc02972 100644 --- a/clients/client-mediaconvert/src/models/models_0.ts +++ b/clients/client-mediaconvert/src/models/models_0.ts @@ -1398,7 +1398,7 @@ export interface BurninDestinationSettings { ApplyFontColor?: BurninSubtitleApplyFontColor | string; /** - * Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical. + * Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present. */ BackgroundColor?: BurninSubtitleBackgroundColor | string; @@ -1715,7 +1715,7 @@ export interface DvbSubDestinationSettings { SubtitlingType?: DvbSubtitlingType | string; /** - * Specify whether the Text spacing (TextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical. + * Specify whether the Text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical. */ TeletextSpacing?: DvbSubtitleTeletextSpacing | string; @@ -5272,7 +5272,7 @@ export interface CmfcSettings { AudioGroupId?: string; /** - * List the audio rendition groups that you want included with this video rendition. Use a comma-separated list. For example, say you want to include the audio rendition groups that have the audio group IDs "audio_aac_1" and "audio_dolby". Then you would specify this value: "audio_aac_1, audio_dolby". Related setting: The rendition groups that you include in your comma-separated list should all match values that you specify in the setting Audio group ID (AudioGroupId) for audio renditions in the same output group as this video rendition. Default behavior: If you don't specify anything here and for Audio group ID, MediaConvert puts each audio variant in its own audio rendition group and associates it with every video variant. Each value in your list appears in your HLS parent manifest in the EXT-X-STREAM-INF tag as the value for the AUDIO attribute. To continue the previous example, say that the file name for the child manifest for your video rendition is "amazing_video_1.m3u8". Then, in your parent manifest, each value will appear on separate lines, like this: #EXT-X-STREAM-INF:AUDIO="audio_aac_1"... amazing_video_1.m3u8 #EXT-X-STREAM-INF:AUDIO="audio_dolby"... amazing_video_1.m3u8 + * List the audio rendition groups that you want included with this video rendition. Use a comma-separated list. For example, say you want to include the audio rendition groups that have the audio group IDs "audio_aac_1" and "audio_dolby". Then you would specify this value: "audio_aac_1,audio_dolby". Related setting: The rendition groups that you include in your comma-separated list should all match values that you specify in the setting Audio group ID (AudioGroupId) for audio renditions in the same output group as this video rendition. Default behavior: If you don't specify anything here and for Audio group ID, MediaConvert puts each audio variant in its own audio rendition group and associates it with every video variant. Each value in your list appears in your HLS parent manifest in the EXT-X-STREAM-INF tag as the value for the AUDIO attribute. To continue the previous example, say that the file name for the child manifest for your video rendition is "amazing_video_1.m3u8". Then, in your parent manifest, each value will appear on separate lines, like this: #EXT-X-STREAM-INF:AUDIO="audio_aac_1"... amazing_video_1.m3u8 #EXT-X-STREAM-INF:AUDIO="audio_dolby"... amazing_video_1.m3u8 */ AudioRenditionSets?: string; diff --git a/clients/client-mediaconvert/src/models/models_1.ts b/clients/client-mediaconvert/src/models/models_1.ts index df395c687196..4566aeb4bd1d 100644 --- a/clients/client-mediaconvert/src/models/models_1.ts +++ b/clients/client-mediaconvert/src/models/models_1.ts @@ -830,6 +830,7 @@ export enum H264GopBReference { } export enum H264GopSizeUnits { + AUTO = "AUTO", FRAMES = "FRAMES", SECONDS = "SECONDS", } @@ -1005,17 +1006,17 @@ export interface H264Settings { GopBReference?: H264GopBReference | string; /** - * Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting. + * Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0. */ GopClosedCadence?: number; /** - * GOP Length (keyframe interval) in frames or seconds. Must be greater than zero. + * Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group. */ GopSize?: number; /** - * Indicates if the GOP Size in H264 is specified in frames or seconds. If seconds the system will convert the GOP Size into a frame count at run time. + * Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize). */ GopSizeUnits?: H264GopSizeUnits | string; @@ -1040,12 +1041,12 @@ export interface H264Settings { MaxBitrate?: number; /** - * Enforces separation between repeated (cadence) I-frames and I-frames inserted by Scene Change Detection. If a scene change I-frame is within I-interval frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. This setting is only used when Scene Change Detect is enabled. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1 + * Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs. */ MinIInterval?: number; /** - * Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2. + * This setting to determines the number of B-frames that MediaConvert puts between reference frames in this output. We recommend that you use automatic behavior to allow the transcoder to choose the best value based on characteristics of your input video. In the console, choose AUTO to select this automatic behavior. When you manually edit your JSON job specification, leave this setting out to choose automatic behavior. When you want to specify this number explicitly, choose a whole number from 0 through 7. */ NumberBFramesBetweenReferenceFrames?: number; @@ -1218,6 +1219,7 @@ export enum H265GopBReference { } export enum H265GopSizeUnits { + AUTO = "AUTO", FRAMES = "FRAMES", SECONDS = "SECONDS", } @@ -1399,17 +1401,17 @@ export interface H265Settings { GopBReference?: H265GopBReference | string; /** - * Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting. + * Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0. */ GopClosedCadence?: number; /** - * GOP Length (keyframe interval) in frames or seconds. Must be greater than zero. + * Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group. */ GopSize?: number; /** - * Indicates if the GOP Size in H265 is specified in frames or seconds. If seconds the system will convert the GOP Size into a frame count at run time. + * Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize). */ GopSizeUnits?: H265GopSizeUnits | string; @@ -1434,7 +1436,7 @@ export interface H265Settings { MaxBitrate?: number; /** - * Enforces separation between repeated (cadence) I-frames and I-frames inserted by Scene Change Detection. If a scene change I-frame is within I-interval frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. This setting is only used when Scene Change Detect is enabled. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1 + * Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs. */ MinIInterval?: number; @@ -1706,7 +1708,7 @@ export interface Mpeg2Settings { FramerateNumerator?: number; /** - * Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting. + * Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. When you create a streaming output, we recommend that you keep the default value, 1, so that players starting mid-stream receive an IDR frame as quickly as possible. Don't set this value to 0; that would break output segmenting. */ GopClosedCadence?: number; @@ -1746,7 +1748,7 @@ export interface Mpeg2Settings { MaxBitrate?: number; /** - * Enforces separation between repeated (cadence) I-frames and I-frames inserted by Scene Change Detection. If a scene change I-frame is within I-interval frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. This setting is only used when Scene Change Detect is enabled. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1 + * Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. When you specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs. */ MinIInterval?: number; diff --git a/clients/client-migrationhubstrategy/.gitignore b/clients/client-migrationhubstrategy/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-migrationhubstrategy/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-migrationhubstrategy/LICENSE b/clients/client-migrationhubstrategy/LICENSE new file mode 100644 index 000000000000..f9e0c8672bca --- /dev/null +++ b/clients/client-migrationhubstrategy/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-migrationhubstrategy/README.md b/clients/client-migrationhubstrategy/README.md new file mode 100644 index 000000000000..9fd1c62f822e --- /dev/null +++ b/clients/client-migrationhubstrategy/README.md @@ -0,0 +1,215 @@ +# @aws-sdk/client-migrationhubstrategy + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-migrationhubstrategy/latest.svg)](https://www.npmjs.com/package/@aws-sdk/client-migrationhubstrategy) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-migrationhubstrategy.svg)](https://www.npmjs.com/package/@aws-sdk/client-migrationhubstrategy) + +## Description + +AWS SDK for JavaScript MigrationHubStrategy Client for Node.js, Browser and React Native. + +Migration Hub Strategy Recommendations + +

      This API reference provides descriptions, syntax, and other details about each of the +actions and data types for Migration Hub Strategy Recommendations (Strategy Recommendations). The topic for each action shows the API +request parameters and the response. Alternatively, you can use one of the AWS SDKs to access +an API that is tailored to the programming language or platform that you're using. For more +information, see AWS SDKs.

      + +## Installing + +To install the this package, simply type add or install @aws-sdk/client-migrationhubstrategy +using your favorite package manager: + +- `npm install @aws-sdk/client-migrationhubstrategy` +- `yarn add @aws-sdk/client-migrationhubstrategy` +- `pnpm add @aws-sdk/client-migrationhubstrategy` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `MigrationHubStrategyClient` and +the commands you need, for example `GetApplicationComponentDetailsCommand`: + +```js +// ES5 example +const { + MigrationHubStrategyClient, + GetApplicationComponentDetailsCommand, +} = require("@aws-sdk/client-migrationhubstrategy"); +``` + +```ts +// ES6+ example +import { + MigrationHubStrategyClient, + GetApplicationComponentDetailsCommand, +} from "@aws-sdk/client-migrationhubstrategy"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new MigrationHubStrategyClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new GetApplicationComponentDetailsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // proccess err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-migrationhubstrategy"; +const client = new AWS.MigrationHubStrategy({ region: "REGION" }); + +// async/await. +try { + const data = await client.getApplicationComponentDetails(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .getApplicationComponentDetails(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.getApplicationComponentDetails(params, (err, data) => { + // proccess err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-migrationhubstrategy` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. diff --git a/clients/client-migrationhubstrategy/jest.config.js b/clients/client-migrationhubstrategy/jest.config.js new file mode 100644 index 000000000000..02eed352c6a8 --- /dev/null +++ b/clients/client-migrationhubstrategy/jest.config.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.spec.ts", "!**/*.browser.spec.ts", "!**/*.integ.spec.ts"], +}; diff --git a/clients/client-migrationhubstrategy/package.json b/clients/client-migrationhubstrategy/package.json new file mode 100644 index 000000000000..b1ff1f3a580e --- /dev/null +++ b/clients/client-migrationhubstrategy/package.json @@ -0,0 +1,94 @@ +{ + "name": "@aws-sdk/client-migrationhubstrategy", + "description": "AWS SDK for JavaScript Migrationhubstrategy Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "yarn build:cjs && yarn build:es && yarn build:types", + "build:cjs": "tsc -p tsconfig.json", + "build:docs": "yarn clean:docs && typedoc ./", + "build:es": "tsc -p tsconfig.es.json", + "build:types": "tsc -p tsconfig.types.json", + "clean": "yarn clean:dist && yarn clean:docs", + "clean:dist": "rimraf ./dist-*", + "clean:docs": "rimraf ./docs", + "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4", + "test": "jest --coverage --passWithNoTests" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "2.0.0", + "@aws-crypto/sha256-js": "2.0.0", + "@aws-sdk/client-sts": "3.41.0", + "@aws-sdk/config-resolver": "3.40.0", + "@aws-sdk/credential-provider-node": "3.41.0", + "@aws-sdk/fetch-http-handler": "3.40.0", + "@aws-sdk/hash-node": "3.40.0", + "@aws-sdk/invalid-dependency": "3.40.0", + "@aws-sdk/middleware-content-length": "3.40.0", + "@aws-sdk/middleware-host-header": "3.40.0", + "@aws-sdk/middleware-logger": "3.40.0", + "@aws-sdk/middleware-retry": "3.40.0", + "@aws-sdk/middleware-serde": "3.40.0", + "@aws-sdk/middleware-signing": "3.40.0", + "@aws-sdk/middleware-stack": "3.40.0", + "@aws-sdk/middleware-user-agent": "3.40.0", + "@aws-sdk/node-config-provider": "3.40.0", + "@aws-sdk/node-http-handler": "3.40.0", + "@aws-sdk/protocol-http": "3.40.0", + "@aws-sdk/smithy-client": "3.41.0", + "@aws-sdk/types": "3.40.0", + "@aws-sdk/url-parser": "3.40.0", + "@aws-sdk/util-base64-browser": "3.37.0", + "@aws-sdk/util-base64-node": "3.37.0", + "@aws-sdk/util-body-length-browser": "3.37.0", + "@aws-sdk/util-body-length-node": "3.37.0", + "@aws-sdk/util-user-agent-browser": "3.40.0", + "@aws-sdk/util-user-agent-node": "3.40.0", + "@aws-sdk/util-utf8-browser": "3.37.0", + "@aws-sdk/util-utf8-node": "3.37.0", + "tslib": "^2.3.0" + }, + "devDependencies": { + "@aws-sdk/service-client-documentation-generator": "3.38.0", + "@types/node": "^12.7.5", + "downlevel-dts": "0.7.0", + "jest": "^26.1.0", + "rimraf": "^3.0.0", + "ts-jest": "^26.4.1", + "typedoc": "^0.19.2", + "typescript": "~4.3.5" + }, + "engines": { + "node": ">=10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-migrationhubstrategy", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-migrationhubstrategy" + } +} diff --git a/clients/client-migrationhubstrategy/src/MigrationHubStrategy.ts b/clients/client-migrationhubstrategy/src/MigrationHubStrategy.ts new file mode 100644 index 000000000000..808504481ef0 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/MigrationHubStrategy.ts @@ -0,0 +1,746 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +import { + GetApplicationComponentDetailsCommand, + GetApplicationComponentDetailsCommandInput, + GetApplicationComponentDetailsCommandOutput, +} from "./commands/GetApplicationComponentDetailsCommand"; +import { + GetApplicationComponentStrategiesCommand, + GetApplicationComponentStrategiesCommandInput, + GetApplicationComponentStrategiesCommandOutput, +} from "./commands/GetApplicationComponentStrategiesCommand"; +import { + GetAssessmentCommand, + GetAssessmentCommandInput, + GetAssessmentCommandOutput, +} from "./commands/GetAssessmentCommand"; +import { + GetImportFileTaskCommand, + GetImportFileTaskCommandInput, + GetImportFileTaskCommandOutput, +} from "./commands/GetImportFileTaskCommand"; +import { + GetPortfolioPreferencesCommand, + GetPortfolioPreferencesCommandInput, + GetPortfolioPreferencesCommandOutput, +} from "./commands/GetPortfolioPreferencesCommand"; +import { + GetPortfolioSummaryCommand, + GetPortfolioSummaryCommandInput, + GetPortfolioSummaryCommandOutput, +} from "./commands/GetPortfolioSummaryCommand"; +import { + GetRecommendationReportDetailsCommand, + GetRecommendationReportDetailsCommandInput, + GetRecommendationReportDetailsCommandOutput, +} from "./commands/GetRecommendationReportDetailsCommand"; +import { + GetServerDetailsCommand, + GetServerDetailsCommandInput, + GetServerDetailsCommandOutput, +} from "./commands/GetServerDetailsCommand"; +import { + GetServerStrategiesCommand, + GetServerStrategiesCommandInput, + GetServerStrategiesCommandOutput, +} from "./commands/GetServerStrategiesCommand"; +import { + ListApplicationComponentsCommand, + ListApplicationComponentsCommandInput, + ListApplicationComponentsCommandOutput, +} from "./commands/ListApplicationComponentsCommand"; +import { + ListCollectorsCommand, + ListCollectorsCommandInput, + ListCollectorsCommandOutput, +} from "./commands/ListCollectorsCommand"; +import { + ListImportFileTaskCommand, + ListImportFileTaskCommandInput, + ListImportFileTaskCommandOutput, +} from "./commands/ListImportFileTaskCommand"; +import { ListServersCommand, ListServersCommandInput, ListServersCommandOutput } from "./commands/ListServersCommand"; +import { + PutPortfolioPreferencesCommand, + PutPortfolioPreferencesCommandInput, + PutPortfolioPreferencesCommandOutput, +} from "./commands/PutPortfolioPreferencesCommand"; +import { + StartAssessmentCommand, + StartAssessmentCommandInput, + StartAssessmentCommandOutput, +} from "./commands/StartAssessmentCommand"; +import { + StartImportFileTaskCommand, + StartImportFileTaskCommandInput, + StartImportFileTaskCommandOutput, +} from "./commands/StartImportFileTaskCommand"; +import { + StartRecommendationReportGenerationCommand, + StartRecommendationReportGenerationCommandInput, + StartRecommendationReportGenerationCommandOutput, +} from "./commands/StartRecommendationReportGenerationCommand"; +import { + StopAssessmentCommand, + StopAssessmentCommandInput, + StopAssessmentCommandOutput, +} from "./commands/StopAssessmentCommand"; +import { + UpdateApplicationComponentConfigCommand, + UpdateApplicationComponentConfigCommandInput, + UpdateApplicationComponentConfigCommandOutput, +} from "./commands/UpdateApplicationComponentConfigCommand"; +import { + UpdateServerConfigCommand, + UpdateServerConfigCommandInput, + UpdateServerConfigCommandOutput, +} from "./commands/UpdateServerConfigCommand"; +import { MigrationHubStrategyClient } from "./MigrationHubStrategyClient"; + +/** + * Migration Hub Strategy Recommendations + * + *

      This API reference provides descriptions, syntax, and other details about each of the + * actions and data types for Migration Hub Strategy Recommendations (Strategy Recommendations). The topic for each action shows the API + * request parameters and the response. Alternatively, you can use one of the AWS SDKs to access + * an API that is tailored to the programming language or platform that you're using. For more + * information, see AWS SDKs.

      + */ +export class MigrationHubStrategy extends MigrationHubStrategyClient { + /** + *

      Retrieves details about an application component.

      + */ + public getApplicationComponentDetails( + args: GetApplicationComponentDetailsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getApplicationComponentDetails( + args: GetApplicationComponentDetailsCommandInput, + cb: (err: any, data?: GetApplicationComponentDetailsCommandOutput) => void + ): void; + public getApplicationComponentDetails( + args: GetApplicationComponentDetailsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetApplicationComponentDetailsCommandOutput) => void + ): void; + public getApplicationComponentDetails( + args: GetApplicationComponentDetailsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetApplicationComponentDetailsCommandOutput) => void), + cb?: (err: any, data?: GetApplicationComponentDetailsCommandOutput) => void + ): Promise | void { + const command = new GetApplicationComponentDetailsCommand(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); + } + } + + /** + *

      Retrieves a list of all the recommended strategies and tools for an application component + * running on a server.

      + */ + public getApplicationComponentStrategies( + args: GetApplicationComponentStrategiesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getApplicationComponentStrategies( + args: GetApplicationComponentStrategiesCommandInput, + cb: (err: any, data?: GetApplicationComponentStrategiesCommandOutput) => void + ): void; + public getApplicationComponentStrategies( + args: GetApplicationComponentStrategiesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetApplicationComponentStrategiesCommandOutput) => void + ): void; + public getApplicationComponentStrategies( + args: GetApplicationComponentStrategiesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetApplicationComponentStrategiesCommandOutput) => void), + cb?: (err: any, data?: GetApplicationComponentStrategiesCommandOutput) => void + ): Promise | void { + const command = new GetApplicationComponentStrategiesCommand(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); + } + } + + /** + *

      Retrieves the status of an on-going assessment.

      + */ + public getAssessment( + args: GetAssessmentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getAssessment( + args: GetAssessmentCommandInput, + cb: (err: any, data?: GetAssessmentCommandOutput) => void + ): void; + public getAssessment( + args: GetAssessmentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAssessmentCommandOutput) => void + ): void; + public getAssessment( + args: GetAssessmentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAssessmentCommandOutput) => void), + cb?: (err: any, data?: GetAssessmentCommandOutput) => void + ): Promise | void { + const command = new GetAssessmentCommand(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); + } + } + + /** + *

      Retrieves the details about a specific import task.

      + */ + public getImportFileTask( + args: GetImportFileTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getImportFileTask( + args: GetImportFileTaskCommandInput, + cb: (err: any, data?: GetImportFileTaskCommandOutput) => void + ): void; + public getImportFileTask( + args: GetImportFileTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetImportFileTaskCommandOutput) => void + ): void; + public getImportFileTask( + args: GetImportFileTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetImportFileTaskCommandOutput) => void), + cb?: (err: any, data?: GetImportFileTaskCommandOutput) => void + ): Promise | void { + const command = new GetImportFileTaskCommand(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); + } + } + + /** + *

      Retrieves your migration and modernization preferences.

      + */ + public getPortfolioPreferences( + args: GetPortfolioPreferencesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getPortfolioPreferences( + args: GetPortfolioPreferencesCommandInput, + cb: (err: any, data?: GetPortfolioPreferencesCommandOutput) => void + ): void; + public getPortfolioPreferences( + args: GetPortfolioPreferencesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetPortfolioPreferencesCommandOutput) => void + ): void; + public getPortfolioPreferences( + args: GetPortfolioPreferencesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetPortfolioPreferencesCommandOutput) => void), + cb?: (err: any, data?: GetPortfolioPreferencesCommandOutput) => void + ): Promise | void { + const command = new GetPortfolioPreferencesCommand(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); + } + } + + /** + *

      Retrieves overall summary including the number of servers to rehost and the overall + * number of anti-patterns.

      + */ + public getPortfolioSummary( + args: GetPortfolioSummaryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getPortfolioSummary( + args: GetPortfolioSummaryCommandInput, + cb: (err: any, data?: GetPortfolioSummaryCommandOutput) => void + ): void; + public getPortfolioSummary( + args: GetPortfolioSummaryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetPortfolioSummaryCommandOutput) => void + ): void; + public getPortfolioSummary( + args: GetPortfolioSummaryCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetPortfolioSummaryCommandOutput) => void), + cb?: (err: any, data?: GetPortfolioSummaryCommandOutput) => void + ): Promise | void { + const command = new GetPortfolioSummaryCommand(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); + } + } + + /** + *

      Retrieves detailed information about the specified recommendation report.

      + */ + public getRecommendationReportDetails( + args: GetRecommendationReportDetailsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getRecommendationReportDetails( + args: GetRecommendationReportDetailsCommandInput, + cb: (err: any, data?: GetRecommendationReportDetailsCommandOutput) => void + ): void; + public getRecommendationReportDetails( + args: GetRecommendationReportDetailsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRecommendationReportDetailsCommandOutput) => void + ): void; + public getRecommendationReportDetails( + args: GetRecommendationReportDetailsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRecommendationReportDetailsCommandOutput) => void), + cb?: (err: any, data?: GetRecommendationReportDetailsCommandOutput) => void + ): Promise | void { + const command = new GetRecommendationReportDetailsCommand(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); + } + } + + /** + *

      Retrieves detailed information about a specified server.

      + */ + public getServerDetails( + args: GetServerDetailsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getServerDetails( + args: GetServerDetailsCommandInput, + cb: (err: any, data?: GetServerDetailsCommandOutput) => void + ): void; + public getServerDetails( + args: GetServerDetailsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetServerDetailsCommandOutput) => void + ): void; + public getServerDetails( + args: GetServerDetailsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetServerDetailsCommandOutput) => void), + cb?: (err: any, data?: GetServerDetailsCommandOutput) => void + ): Promise | void { + const command = new GetServerDetailsCommand(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); + } + } + + /** + *

      Retrieves recommended strategies and tools for the specified server.

      + */ + public getServerStrategies( + args: GetServerStrategiesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getServerStrategies( + args: GetServerStrategiesCommandInput, + cb: (err: any, data?: GetServerStrategiesCommandOutput) => void + ): void; + public getServerStrategies( + args: GetServerStrategiesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetServerStrategiesCommandOutput) => void + ): void; + public getServerStrategies( + args: GetServerStrategiesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetServerStrategiesCommandOutput) => void), + cb?: (err: any, data?: GetServerStrategiesCommandOutput) => void + ): Promise | void { + const command = new GetServerStrategiesCommand(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); + } + } + + /** + *

      Retrieves a list of all the application components (processes).

      + */ + public listApplicationComponents( + args: ListApplicationComponentsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listApplicationComponents( + args: ListApplicationComponentsCommandInput, + cb: (err: any, data?: ListApplicationComponentsCommandOutput) => void + ): void; + public listApplicationComponents( + args: ListApplicationComponentsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListApplicationComponentsCommandOutput) => void + ): void; + public listApplicationComponents( + args: ListApplicationComponentsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListApplicationComponentsCommandOutput) => void), + cb?: (err: any, data?: ListApplicationComponentsCommandOutput) => void + ): Promise | void { + const command = new ListApplicationComponentsCommand(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); + } + } + + /** + *

      Retrieves a list of all the installed collectors.

      + */ + public listCollectors( + args: ListCollectorsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listCollectors( + args: ListCollectorsCommandInput, + cb: (err: any, data?: ListCollectorsCommandOutput) => void + ): void; + public listCollectors( + args: ListCollectorsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListCollectorsCommandOutput) => void + ): void; + public listCollectors( + args: ListCollectorsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListCollectorsCommandOutput) => void), + cb?: (err: any, data?: ListCollectorsCommandOutput) => void + ): Promise | void { + const command = new ListCollectorsCommand(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); + } + } + + /** + *

      Retrieves a list of all the imports performed.

      + */ + public listImportFileTask( + args: ListImportFileTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listImportFileTask( + args: ListImportFileTaskCommandInput, + cb: (err: any, data?: ListImportFileTaskCommandOutput) => void + ): void; + public listImportFileTask( + args: ListImportFileTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListImportFileTaskCommandOutput) => void + ): void; + public listImportFileTask( + args: ListImportFileTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListImportFileTaskCommandOutput) => void), + cb?: (err: any, data?: ListImportFileTaskCommandOutput) => void + ): Promise | void { + const command = new ListImportFileTaskCommand(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); + } + } + + /** + *

      Returns a list of all the servers.

      + */ + public listServers(args: ListServersCommandInput, options?: __HttpHandlerOptions): Promise; + public listServers(args: ListServersCommandInput, cb: (err: any, data?: ListServersCommandOutput) => void): void; + public listServers( + args: ListServersCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListServersCommandOutput) => void + ): void; + public listServers( + args: ListServersCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListServersCommandOutput) => void), + cb?: (err: any, data?: ListServersCommandOutput) => void + ): Promise | void { + const command = new ListServersCommand(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); + } + } + + /** + *

      Saves the specified migration and modernization preferences.

      + */ + public putPortfolioPreferences( + args: PutPortfolioPreferencesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putPortfolioPreferences( + args: PutPortfolioPreferencesCommandInput, + cb: (err: any, data?: PutPortfolioPreferencesCommandOutput) => void + ): void; + public putPortfolioPreferences( + args: PutPortfolioPreferencesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutPortfolioPreferencesCommandOutput) => void + ): void; + public putPortfolioPreferences( + args: PutPortfolioPreferencesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutPortfolioPreferencesCommandOutput) => void), + cb?: (err: any, data?: PutPortfolioPreferencesCommandOutput) => void + ): Promise | void { + const command = new PutPortfolioPreferencesCommand(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); + } + } + + /** + *

      Starts the assessment of an on-premises environment.

      + */ + public startAssessment( + args: StartAssessmentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startAssessment( + args: StartAssessmentCommandInput, + cb: (err: any, data?: StartAssessmentCommandOutput) => void + ): void; + public startAssessment( + args: StartAssessmentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartAssessmentCommandOutput) => void + ): void; + public startAssessment( + args: StartAssessmentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartAssessmentCommandOutput) => void), + cb?: (err: any, data?: StartAssessmentCommandOutput) => void + ): Promise | void { + const command = new StartAssessmentCommand(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); + } + } + + /** + *

      Starts a file import.

      + */ + public startImportFileTask( + args: StartImportFileTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startImportFileTask( + args: StartImportFileTaskCommandInput, + cb: (err: any, data?: StartImportFileTaskCommandOutput) => void + ): void; + public startImportFileTask( + args: StartImportFileTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartImportFileTaskCommandOutput) => void + ): void; + public startImportFileTask( + args: StartImportFileTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartImportFileTaskCommandOutput) => void), + cb?: (err: any, data?: StartImportFileTaskCommandOutput) => void + ): Promise | void { + const command = new StartImportFileTaskCommand(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); + } + } + + /** + *

      Starts generating a recommendation report.

      + */ + public startRecommendationReportGeneration( + args: StartRecommendationReportGenerationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startRecommendationReportGeneration( + args: StartRecommendationReportGenerationCommandInput, + cb: (err: any, data?: StartRecommendationReportGenerationCommandOutput) => void + ): void; + public startRecommendationReportGeneration( + args: StartRecommendationReportGenerationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartRecommendationReportGenerationCommandOutput) => void + ): void; + public startRecommendationReportGeneration( + args: StartRecommendationReportGenerationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartRecommendationReportGenerationCommandOutput) => void), + cb?: (err: any, data?: StartRecommendationReportGenerationCommandOutput) => void + ): Promise | void { + const command = new StartRecommendationReportGenerationCommand(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); + } + } + + /** + *

      Stops the assessment of an on-premises environment.

      + */ + public stopAssessment( + args: StopAssessmentCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public stopAssessment( + args: StopAssessmentCommandInput, + cb: (err: any, data?: StopAssessmentCommandOutput) => void + ): void; + public stopAssessment( + args: StopAssessmentCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StopAssessmentCommandOutput) => void + ): void; + public stopAssessment( + args: StopAssessmentCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StopAssessmentCommandOutput) => void), + cb?: (err: any, data?: StopAssessmentCommandOutput) => void + ): Promise | void { + const command = new StopAssessmentCommand(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); + } + } + + /** + *

      Updates the configuration of an application component.

      + */ + public updateApplicationComponentConfig( + args: UpdateApplicationComponentConfigCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateApplicationComponentConfig( + args: UpdateApplicationComponentConfigCommandInput, + cb: (err: any, data?: UpdateApplicationComponentConfigCommandOutput) => void + ): void; + public updateApplicationComponentConfig( + args: UpdateApplicationComponentConfigCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateApplicationComponentConfigCommandOutput) => void + ): void; + public updateApplicationComponentConfig( + args: UpdateApplicationComponentConfigCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateApplicationComponentConfigCommandOutput) => void), + cb?: (err: any, data?: UpdateApplicationComponentConfigCommandOutput) => void + ): Promise | void { + const command = new UpdateApplicationComponentConfigCommand(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); + } + } + + /** + *

      Updates the configuration of the specified server.

      + */ + public updateServerConfig( + args: UpdateServerConfigCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateServerConfig( + args: UpdateServerConfigCommandInput, + cb: (err: any, data?: UpdateServerConfigCommandOutput) => void + ): void; + public updateServerConfig( + args: UpdateServerConfigCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateServerConfigCommandOutput) => void + ): void; + public updateServerConfig( + args: UpdateServerConfigCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateServerConfigCommandOutput) => void), + cb?: (err: any, data?: UpdateServerConfigCommandOutput) => void + ): Promise | void { + const command = new UpdateServerConfigCommand(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); + } + } +} diff --git a/clients/client-migrationhubstrategy/src/MigrationHubStrategyClient.ts b/clients/client-migrationhubstrategy/src/MigrationHubStrategyClient.ts new file mode 100644 index 000000000000..5237a7dd3f05 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/MigrationHubStrategyClient.ts @@ -0,0 +1,345 @@ +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig, +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@aws-sdk/smithy-client"; +import { + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + RegionInfoProvider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@aws-sdk/types"; + +import { + GetApplicationComponentDetailsCommandInput, + GetApplicationComponentDetailsCommandOutput, +} from "./commands/GetApplicationComponentDetailsCommand"; +import { + GetApplicationComponentStrategiesCommandInput, + GetApplicationComponentStrategiesCommandOutput, +} from "./commands/GetApplicationComponentStrategiesCommand"; +import { GetAssessmentCommandInput, GetAssessmentCommandOutput } from "./commands/GetAssessmentCommand"; +import { GetImportFileTaskCommandInput, GetImportFileTaskCommandOutput } from "./commands/GetImportFileTaskCommand"; +import { + GetPortfolioPreferencesCommandInput, + GetPortfolioPreferencesCommandOutput, +} from "./commands/GetPortfolioPreferencesCommand"; +import { + GetPortfolioSummaryCommandInput, + GetPortfolioSummaryCommandOutput, +} from "./commands/GetPortfolioSummaryCommand"; +import { + GetRecommendationReportDetailsCommandInput, + GetRecommendationReportDetailsCommandOutput, +} from "./commands/GetRecommendationReportDetailsCommand"; +import { GetServerDetailsCommandInput, GetServerDetailsCommandOutput } from "./commands/GetServerDetailsCommand"; +import { + GetServerStrategiesCommandInput, + GetServerStrategiesCommandOutput, +} from "./commands/GetServerStrategiesCommand"; +import { + ListApplicationComponentsCommandInput, + ListApplicationComponentsCommandOutput, +} from "./commands/ListApplicationComponentsCommand"; +import { ListCollectorsCommandInput, ListCollectorsCommandOutput } from "./commands/ListCollectorsCommand"; +import { ListImportFileTaskCommandInput, ListImportFileTaskCommandOutput } from "./commands/ListImportFileTaskCommand"; +import { ListServersCommandInput, ListServersCommandOutput } from "./commands/ListServersCommand"; +import { + PutPortfolioPreferencesCommandInput, + PutPortfolioPreferencesCommandOutput, +} from "./commands/PutPortfolioPreferencesCommand"; +import { StartAssessmentCommandInput, StartAssessmentCommandOutput } from "./commands/StartAssessmentCommand"; +import { + StartImportFileTaskCommandInput, + StartImportFileTaskCommandOutput, +} from "./commands/StartImportFileTaskCommand"; +import { + StartRecommendationReportGenerationCommandInput, + StartRecommendationReportGenerationCommandOutput, +} from "./commands/StartRecommendationReportGenerationCommand"; +import { StopAssessmentCommandInput, StopAssessmentCommandOutput } from "./commands/StopAssessmentCommand"; +import { + UpdateApplicationComponentConfigCommandInput, + UpdateApplicationComponentConfigCommandOutput, +} from "./commands/UpdateApplicationComponentConfigCommand"; +import { UpdateServerConfigCommandInput, UpdateServerConfigCommandOutput } from "./commands/UpdateServerConfigCommand"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; + +export type ServiceInputTypes = + | GetApplicationComponentDetailsCommandInput + | GetApplicationComponentStrategiesCommandInput + | GetAssessmentCommandInput + | GetImportFileTaskCommandInput + | GetPortfolioPreferencesCommandInput + | GetPortfolioSummaryCommandInput + | GetRecommendationReportDetailsCommandInput + | GetServerDetailsCommandInput + | GetServerStrategiesCommandInput + | ListApplicationComponentsCommandInput + | ListCollectorsCommandInput + | ListImportFileTaskCommandInput + | ListServersCommandInput + | PutPortfolioPreferencesCommandInput + | StartAssessmentCommandInput + | StartImportFileTaskCommandInput + | StartRecommendationReportGenerationCommandInput + | StopAssessmentCommandInput + | UpdateApplicationComponentConfigCommandInput + | UpdateServerConfigCommandInput; + +export type ServiceOutputTypes = + | GetApplicationComponentDetailsCommandOutput + | GetApplicationComponentStrategiesCommandOutput + | GetAssessmentCommandOutput + | GetImportFileTaskCommandOutput + | GetPortfolioPreferencesCommandOutput + | GetPortfolioSummaryCommandOutput + | GetRecommendationReportDetailsCommandOutput + | GetServerDetailsCommandOutput + | GetServerStrategiesCommandOutput + | ListApplicationComponentsCommandOutput + | ListCollectorsCommandOutput + | ListImportFileTaskCommandOutput + | ListServersCommandOutput + | PutPortfolioPreferencesCommandOutput + | StartAssessmentCommandOutput + | StartImportFileTaskCommandOutput + | StartRecommendationReportGenerationCommandOutput + | StopAssessmentCommandOutput + | UpdateApplicationComponentConfigCommandOutput + | UpdateServerConfigCommandOutput; + +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link __Hash} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: (body: any) => number | undefined; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dyanamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Fetch related hostname, signing name or signing region with given region. + * @internal + */ + regionInfoProvider?: RegionInfoProvider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; +} + +type MigrationHubStrategyClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig; +/** + * The configuration interface of MigrationHubStrategyClient class constructor that set the region, credentials and other options. + */ +export interface MigrationHubStrategyClientConfig extends MigrationHubStrategyClientConfigType {} + +type MigrationHubStrategyClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig; +/** + * The resolved configuration interface of MigrationHubStrategyClient class. This is resolved and normalized from the {@link MigrationHubStrategyClientConfig | constructor configuration interface}. + */ +export interface MigrationHubStrategyClientResolvedConfig extends MigrationHubStrategyClientResolvedConfigType {} + +/** + * Migration Hub Strategy Recommendations + * + *

      This API reference provides descriptions, syntax, and other details about each of the + * actions and data types for Migration Hub Strategy Recommendations (Strategy Recommendations). The topic for each action shows the API + * request parameters and the response. Alternatively, you can use one of the AWS SDKs to access + * an API that is tailored to the programming language or platform that you're using. For more + * information, see AWS SDKs.

      + */ +export class MigrationHubStrategyClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + MigrationHubStrategyClientResolvedConfig +> { + /** + * The resolved configuration of MigrationHubStrategyClient class. This is resolved and normalized from the {@link MigrationHubStrategyClientConfig | constructor configuration interface}. + */ + readonly config: MigrationHubStrategyClientResolvedConfig; + + constructor(configuration: MigrationHubStrategyClientConfig) { + const _config_0 = __getRuntimeConfig(configuration); + const _config_1 = resolveRegionConfig(_config_0); + const _config_2 = resolveEndpointsConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveHostHeaderConfig(_config_3); + const _config_5 = resolveAwsAuthConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-migrationhubstrategy/src/commands/GetApplicationComponentDetailsCommand.ts b/clients/client-migrationhubstrategy/src/commands/GetApplicationComponentDetailsCommand.ts new file mode 100644 index 000000000000..4ed0219d0ec4 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/GetApplicationComponentDetailsCommand.ts @@ -0,0 +1,107 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { GetApplicationComponentDetailsRequest, GetApplicationComponentDetailsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetApplicationComponentDetailsCommand, + serializeAws_restJson1GetApplicationComponentDetailsCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetApplicationComponentDetailsCommandInput extends GetApplicationComponentDetailsRequest {} +export interface GetApplicationComponentDetailsCommandOutput + extends GetApplicationComponentDetailsResponse, + __MetadataBearer {} + +/** + *

      Retrieves details about an application component.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, GetApplicationComponentDetailsCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, GetApplicationComponentDetailsCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new GetApplicationComponentDetailsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetApplicationComponentDetailsCommandInput} for command's `input` shape. + * @see {@link GetApplicationComponentDetailsCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class GetApplicationComponentDetailsCommand extends $Command< + GetApplicationComponentDetailsCommandInput, + GetApplicationComponentDetailsCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetApplicationComponentDetailsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "GetApplicationComponentDetailsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetApplicationComponentDetailsRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetApplicationComponentDetailsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetApplicationComponentDetailsCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1GetApplicationComponentDetailsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1GetApplicationComponentDetailsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/GetApplicationComponentStrategiesCommand.ts b/clients/client-migrationhubstrategy/src/commands/GetApplicationComponentStrategiesCommand.ts new file mode 100644 index 000000000000..1823b4bf214e --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/GetApplicationComponentStrategiesCommand.ts @@ -0,0 +1,111 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { + GetApplicationComponentStrategiesRequest, + GetApplicationComponentStrategiesResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1GetApplicationComponentStrategiesCommand, + serializeAws_restJson1GetApplicationComponentStrategiesCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetApplicationComponentStrategiesCommandInput extends GetApplicationComponentStrategiesRequest {} +export interface GetApplicationComponentStrategiesCommandOutput + extends GetApplicationComponentStrategiesResponse, + __MetadataBearer {} + +/** + *

      Retrieves a list of all the recommended strategies and tools for an application component + * running on a server.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, GetApplicationComponentStrategiesCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, GetApplicationComponentStrategiesCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new GetApplicationComponentStrategiesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetApplicationComponentStrategiesCommandInput} for command's `input` shape. + * @see {@link GetApplicationComponentStrategiesCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class GetApplicationComponentStrategiesCommand extends $Command< + GetApplicationComponentStrategiesCommandInput, + GetApplicationComponentStrategiesCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetApplicationComponentStrategiesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "GetApplicationComponentStrategiesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetApplicationComponentStrategiesRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetApplicationComponentStrategiesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetApplicationComponentStrategiesCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1GetApplicationComponentStrategiesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1GetApplicationComponentStrategiesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/GetAssessmentCommand.ts b/clients/client-migrationhubstrategy/src/commands/GetAssessmentCommand.ts new file mode 100644 index 000000000000..33f3f5f6e659 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/GetAssessmentCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { GetAssessmentRequest, GetAssessmentResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetAssessmentCommand, + serializeAws_restJson1GetAssessmentCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetAssessmentCommandInput extends GetAssessmentRequest {} +export interface GetAssessmentCommandOutput extends GetAssessmentResponse, __MetadataBearer {} + +/** + *

      Retrieves the status of an on-going assessment.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, GetAssessmentCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, GetAssessmentCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new GetAssessmentCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetAssessmentCommandInput} for command's `input` shape. + * @see {@link GetAssessmentCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class GetAssessmentCommand extends $Command< + GetAssessmentCommandInput, + GetAssessmentCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetAssessmentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "GetAssessmentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetAssessmentRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetAssessmentResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetAssessmentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetAssessmentCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetAssessmentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/GetImportFileTaskCommand.ts b/clients/client-migrationhubstrategy/src/commands/GetImportFileTaskCommand.ts new file mode 100644 index 000000000000..cd2ad74e6920 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/GetImportFileTaskCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { GetImportFileTaskRequest, GetImportFileTaskResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetImportFileTaskCommand, + serializeAws_restJson1GetImportFileTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetImportFileTaskCommandInput extends GetImportFileTaskRequest {} +export interface GetImportFileTaskCommandOutput extends GetImportFileTaskResponse, __MetadataBearer {} + +/** + *

      Retrieves the details about a specific import task.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, GetImportFileTaskCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, GetImportFileTaskCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new GetImportFileTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetImportFileTaskCommandInput} for command's `input` shape. + * @see {@link GetImportFileTaskCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class GetImportFileTaskCommand extends $Command< + GetImportFileTaskCommandInput, + GetImportFileTaskCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetImportFileTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "GetImportFileTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetImportFileTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetImportFileTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetImportFileTaskCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetImportFileTaskCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetImportFileTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/GetPortfolioPreferencesCommand.ts b/clients/client-migrationhubstrategy/src/commands/GetPortfolioPreferencesCommand.ts new file mode 100644 index 000000000000..1b5f31f67791 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/GetPortfolioPreferencesCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { GetPortfolioPreferencesRequest, GetPortfolioPreferencesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetPortfolioPreferencesCommand, + serializeAws_restJson1GetPortfolioPreferencesCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetPortfolioPreferencesCommandInput extends GetPortfolioPreferencesRequest {} +export interface GetPortfolioPreferencesCommandOutput extends GetPortfolioPreferencesResponse, __MetadataBearer {} + +/** + *

      Retrieves your migration and modernization preferences.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, GetPortfolioPreferencesCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, GetPortfolioPreferencesCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new GetPortfolioPreferencesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetPortfolioPreferencesCommandInput} for command's `input` shape. + * @see {@link GetPortfolioPreferencesCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class GetPortfolioPreferencesCommand extends $Command< + GetPortfolioPreferencesCommandInput, + GetPortfolioPreferencesCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetPortfolioPreferencesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "GetPortfolioPreferencesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetPortfolioPreferencesRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetPortfolioPreferencesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetPortfolioPreferencesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetPortfolioPreferencesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetPortfolioPreferencesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/GetPortfolioSummaryCommand.ts b/clients/client-migrationhubstrategy/src/commands/GetPortfolioSummaryCommand.ts new file mode 100644 index 000000000000..66bb12cf936a --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/GetPortfolioSummaryCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { GetPortfolioSummaryRequest, GetPortfolioSummaryResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetPortfolioSummaryCommand, + serializeAws_restJson1GetPortfolioSummaryCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetPortfolioSummaryCommandInput extends GetPortfolioSummaryRequest {} +export interface GetPortfolioSummaryCommandOutput extends GetPortfolioSummaryResponse, __MetadataBearer {} + +/** + *

      Retrieves overall summary including the number of servers to rehost and the overall + * number of anti-patterns.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, GetPortfolioSummaryCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, GetPortfolioSummaryCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new GetPortfolioSummaryCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetPortfolioSummaryCommandInput} for command's `input` shape. + * @see {@link GetPortfolioSummaryCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class GetPortfolioSummaryCommand extends $Command< + GetPortfolioSummaryCommandInput, + GetPortfolioSummaryCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetPortfolioSummaryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "GetPortfolioSummaryCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetPortfolioSummaryRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetPortfolioSummaryResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetPortfolioSummaryCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetPortfolioSummaryCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetPortfolioSummaryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/GetRecommendationReportDetailsCommand.ts b/clients/client-migrationhubstrategy/src/commands/GetRecommendationReportDetailsCommand.ts new file mode 100644 index 000000000000..6e62d59cb5bb --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/GetRecommendationReportDetailsCommand.ts @@ -0,0 +1,107 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { GetRecommendationReportDetailsRequest, GetRecommendationReportDetailsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetRecommendationReportDetailsCommand, + serializeAws_restJson1GetRecommendationReportDetailsCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetRecommendationReportDetailsCommandInput extends GetRecommendationReportDetailsRequest {} +export interface GetRecommendationReportDetailsCommandOutput + extends GetRecommendationReportDetailsResponse, + __MetadataBearer {} + +/** + *

      Retrieves detailed information about the specified recommendation report.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, GetRecommendationReportDetailsCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, GetRecommendationReportDetailsCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new GetRecommendationReportDetailsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetRecommendationReportDetailsCommandInput} for command's `input` shape. + * @see {@link GetRecommendationReportDetailsCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class GetRecommendationReportDetailsCommand extends $Command< + GetRecommendationReportDetailsCommandInput, + GetRecommendationReportDetailsCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRecommendationReportDetailsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "GetRecommendationReportDetailsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetRecommendationReportDetailsRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetRecommendationReportDetailsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRecommendationReportDetailsCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1GetRecommendationReportDetailsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1GetRecommendationReportDetailsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/GetServerDetailsCommand.ts b/clients/client-migrationhubstrategy/src/commands/GetServerDetailsCommand.ts new file mode 100644 index 000000000000..54d1f59336b7 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/GetServerDetailsCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { GetServerDetailsRequest, GetServerDetailsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetServerDetailsCommand, + serializeAws_restJson1GetServerDetailsCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetServerDetailsCommandInput extends GetServerDetailsRequest {} +export interface GetServerDetailsCommandOutput extends GetServerDetailsResponse, __MetadataBearer {} + +/** + *

      Retrieves detailed information about a specified server.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, GetServerDetailsCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, GetServerDetailsCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new GetServerDetailsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetServerDetailsCommandInput} for command's `input` shape. + * @see {@link GetServerDetailsCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class GetServerDetailsCommand extends $Command< + GetServerDetailsCommandInput, + GetServerDetailsCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetServerDetailsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "GetServerDetailsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetServerDetailsRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetServerDetailsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetServerDetailsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetServerDetailsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetServerDetailsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/GetServerStrategiesCommand.ts b/clients/client-migrationhubstrategy/src/commands/GetServerStrategiesCommand.ts new file mode 100644 index 000000000000..8399f18b63e7 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/GetServerStrategiesCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { GetServerStrategiesRequest, GetServerStrategiesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetServerStrategiesCommand, + serializeAws_restJson1GetServerStrategiesCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetServerStrategiesCommandInput extends GetServerStrategiesRequest {} +export interface GetServerStrategiesCommandOutput extends GetServerStrategiesResponse, __MetadataBearer {} + +/** + *

      Retrieves recommended strategies and tools for the specified server.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, GetServerStrategiesCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, GetServerStrategiesCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new GetServerStrategiesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetServerStrategiesCommandInput} for command's `input` shape. + * @see {@link GetServerStrategiesCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class GetServerStrategiesCommand extends $Command< + GetServerStrategiesCommandInput, + GetServerStrategiesCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetServerStrategiesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "GetServerStrategiesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetServerStrategiesRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetServerStrategiesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetServerStrategiesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetServerStrategiesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetServerStrategiesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/ListApplicationComponentsCommand.ts b/clients/client-migrationhubstrategy/src/commands/ListApplicationComponentsCommand.ts new file mode 100644 index 000000000000..428191b76dd3 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/ListApplicationComponentsCommand.ts @@ -0,0 +1,102 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { ListApplicationComponentsRequest, ListApplicationComponentsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListApplicationComponentsCommand, + serializeAws_restJson1ListApplicationComponentsCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListApplicationComponentsCommandInput extends ListApplicationComponentsRequest {} +export interface ListApplicationComponentsCommandOutput extends ListApplicationComponentsResponse, __MetadataBearer {} + +/** + *

      Retrieves a list of all the application components (processes).

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, ListApplicationComponentsCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, ListApplicationComponentsCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new ListApplicationComponentsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListApplicationComponentsCommandInput} for command's `input` shape. + * @see {@link ListApplicationComponentsCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class ListApplicationComponentsCommand extends $Command< + ListApplicationComponentsCommandInput, + ListApplicationComponentsCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListApplicationComponentsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "ListApplicationComponentsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListApplicationComponentsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListApplicationComponentsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListApplicationComponentsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListApplicationComponentsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1ListApplicationComponentsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/ListCollectorsCommand.ts b/clients/client-migrationhubstrategy/src/commands/ListCollectorsCommand.ts new file mode 100644 index 000000000000..9ad0e2ebc3fd --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/ListCollectorsCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { ListCollectorsRequest, ListCollectorsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListCollectorsCommand, + serializeAws_restJson1ListCollectorsCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListCollectorsCommandInput extends ListCollectorsRequest {} +export interface ListCollectorsCommandOutput extends ListCollectorsResponse, __MetadataBearer {} + +/** + *

      Retrieves a list of all the installed collectors.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, ListCollectorsCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, ListCollectorsCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new ListCollectorsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListCollectorsCommandInput} for command's `input` shape. + * @see {@link ListCollectorsCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class ListCollectorsCommand extends $Command< + ListCollectorsCommandInput, + ListCollectorsCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListCollectorsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "ListCollectorsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListCollectorsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListCollectorsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListCollectorsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListCollectorsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListCollectorsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/ListImportFileTaskCommand.ts b/clients/client-migrationhubstrategy/src/commands/ListImportFileTaskCommand.ts new file mode 100644 index 000000000000..5f958cc1d6ed --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/ListImportFileTaskCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { ListImportFileTaskRequest, ListImportFileTaskResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListImportFileTaskCommand, + serializeAws_restJson1ListImportFileTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListImportFileTaskCommandInput extends ListImportFileTaskRequest {} +export interface ListImportFileTaskCommandOutput extends ListImportFileTaskResponse, __MetadataBearer {} + +/** + *

      Retrieves a list of all the imports performed.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, ListImportFileTaskCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, ListImportFileTaskCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new ListImportFileTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListImportFileTaskCommandInput} for command's `input` shape. + * @see {@link ListImportFileTaskCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class ListImportFileTaskCommand extends $Command< + ListImportFileTaskCommandInput, + ListImportFileTaskCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListImportFileTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "ListImportFileTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListImportFileTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListImportFileTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListImportFileTaskCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListImportFileTaskCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListImportFileTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/ListServersCommand.ts b/clients/client-migrationhubstrategy/src/commands/ListServersCommand.ts new file mode 100644 index 000000000000..db17e612084b --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/ListServersCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { ListServersRequest, ListServersResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListServersCommand, + serializeAws_restJson1ListServersCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListServersCommandInput extends ListServersRequest {} +export interface ListServersCommandOutput extends ListServersResponse, __MetadataBearer {} + +/** + *

      Returns a list of all the servers.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, ListServersCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, ListServersCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new ListServersCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListServersCommandInput} for command's `input` shape. + * @see {@link ListServersCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class ListServersCommand extends $Command< + ListServersCommandInput, + ListServersCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListServersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "ListServersCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListServersRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListServersResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListServersCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListServersCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListServersCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/PutPortfolioPreferencesCommand.ts b/clients/client-migrationhubstrategy/src/commands/PutPortfolioPreferencesCommand.ts new file mode 100644 index 000000000000..3914bd247a82 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/PutPortfolioPreferencesCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { PutPortfolioPreferencesRequest, PutPortfolioPreferencesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1PutPortfolioPreferencesCommand, + serializeAws_restJson1PutPortfolioPreferencesCommand, +} from "../protocols/Aws_restJson1"; + +export interface PutPortfolioPreferencesCommandInput extends PutPortfolioPreferencesRequest {} +export interface PutPortfolioPreferencesCommandOutput extends PutPortfolioPreferencesResponse, __MetadataBearer {} + +/** + *

      Saves the specified migration and modernization preferences.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, PutPortfolioPreferencesCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, PutPortfolioPreferencesCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new PutPortfolioPreferencesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link PutPortfolioPreferencesCommandInput} for command's `input` shape. + * @see {@link PutPortfolioPreferencesCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class PutPortfolioPreferencesCommand extends $Command< + PutPortfolioPreferencesCommandInput, + PutPortfolioPreferencesCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutPortfolioPreferencesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "PutPortfolioPreferencesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: PutPortfolioPreferencesRequest.filterSensitiveLog, + outputFilterSensitiveLog: PutPortfolioPreferencesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: PutPortfolioPreferencesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1PutPortfolioPreferencesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1PutPortfolioPreferencesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/StartAssessmentCommand.ts b/clients/client-migrationhubstrategy/src/commands/StartAssessmentCommand.ts new file mode 100644 index 000000000000..c539b25367d7 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/StartAssessmentCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { StartAssessmentRequest, StartAssessmentResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StartAssessmentCommand, + serializeAws_restJson1StartAssessmentCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartAssessmentCommandInput extends StartAssessmentRequest {} +export interface StartAssessmentCommandOutput extends StartAssessmentResponse, __MetadataBearer {} + +/** + *

      Starts the assessment of an on-premises environment.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, StartAssessmentCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, StartAssessmentCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new StartAssessmentCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartAssessmentCommandInput} for command's `input` shape. + * @see {@link StartAssessmentCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class StartAssessmentCommand extends $Command< + StartAssessmentCommandInput, + StartAssessmentCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartAssessmentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "StartAssessmentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartAssessmentRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartAssessmentResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartAssessmentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartAssessmentCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StartAssessmentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/StartImportFileTaskCommand.ts b/clients/client-migrationhubstrategy/src/commands/StartImportFileTaskCommand.ts new file mode 100644 index 000000000000..061f877b1401 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/StartImportFileTaskCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { StartImportFileTaskRequest, StartImportFileTaskResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StartImportFileTaskCommand, + serializeAws_restJson1StartImportFileTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartImportFileTaskCommandInput extends StartImportFileTaskRequest {} +export interface StartImportFileTaskCommandOutput extends StartImportFileTaskResponse, __MetadataBearer {} + +/** + *

      Starts a file import.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, StartImportFileTaskCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, StartImportFileTaskCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new StartImportFileTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartImportFileTaskCommandInput} for command's `input` shape. + * @see {@link StartImportFileTaskCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class StartImportFileTaskCommand extends $Command< + StartImportFileTaskCommandInput, + StartImportFileTaskCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartImportFileTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "StartImportFileTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartImportFileTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartImportFileTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartImportFileTaskCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartImportFileTaskCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StartImportFileTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/StartRecommendationReportGenerationCommand.ts b/clients/client-migrationhubstrategy/src/commands/StartRecommendationReportGenerationCommand.ts new file mode 100644 index 000000000000..595f05783aa6 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/StartRecommendationReportGenerationCommand.ts @@ -0,0 +1,110 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { + StartRecommendationReportGenerationRequest, + StartRecommendationReportGenerationResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1StartRecommendationReportGenerationCommand, + serializeAws_restJson1StartRecommendationReportGenerationCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartRecommendationReportGenerationCommandInput extends StartRecommendationReportGenerationRequest {} +export interface StartRecommendationReportGenerationCommandOutput + extends StartRecommendationReportGenerationResponse, + __MetadataBearer {} + +/** + *

      Starts generating a recommendation report.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, StartRecommendationReportGenerationCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, StartRecommendationReportGenerationCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new StartRecommendationReportGenerationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartRecommendationReportGenerationCommandInput} for command's `input` shape. + * @see {@link StartRecommendationReportGenerationCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class StartRecommendationReportGenerationCommand extends $Command< + StartRecommendationReportGenerationCommandInput, + StartRecommendationReportGenerationCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartRecommendationReportGenerationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "StartRecommendationReportGenerationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartRecommendationReportGenerationRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartRecommendationReportGenerationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: StartRecommendationReportGenerationCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1StartRecommendationReportGenerationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1StartRecommendationReportGenerationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/StopAssessmentCommand.ts b/clients/client-migrationhubstrategy/src/commands/StopAssessmentCommand.ts new file mode 100644 index 000000000000..e01d1cb6687d --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/StopAssessmentCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { StopAssessmentRequest, StopAssessmentResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StopAssessmentCommand, + serializeAws_restJson1StopAssessmentCommand, +} from "../protocols/Aws_restJson1"; + +export interface StopAssessmentCommandInput extends StopAssessmentRequest {} +export interface StopAssessmentCommandOutput extends StopAssessmentResponse, __MetadataBearer {} + +/** + *

      Stops the assessment of an on-premises environment.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, StopAssessmentCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, StopAssessmentCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new StopAssessmentCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StopAssessmentCommandInput} for command's `input` shape. + * @see {@link StopAssessmentCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class StopAssessmentCommand extends $Command< + StopAssessmentCommandInput, + StopAssessmentCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StopAssessmentCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "StopAssessmentCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StopAssessmentRequest.filterSensitiveLog, + outputFilterSensitiveLog: StopAssessmentResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StopAssessmentCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StopAssessmentCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StopAssessmentCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/UpdateApplicationComponentConfigCommand.ts b/clients/client-migrationhubstrategy/src/commands/UpdateApplicationComponentConfigCommand.ts new file mode 100644 index 000000000000..947fd6ddba91 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/UpdateApplicationComponentConfigCommand.ts @@ -0,0 +1,107 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { UpdateApplicationComponentConfigRequest, UpdateApplicationComponentConfigResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateApplicationComponentConfigCommand, + serializeAws_restJson1UpdateApplicationComponentConfigCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateApplicationComponentConfigCommandInput extends UpdateApplicationComponentConfigRequest {} +export interface UpdateApplicationComponentConfigCommandOutput + extends UpdateApplicationComponentConfigResponse, + __MetadataBearer {} + +/** + *

      Updates the configuration of an application component.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, UpdateApplicationComponentConfigCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, UpdateApplicationComponentConfigCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new UpdateApplicationComponentConfigCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateApplicationComponentConfigCommandInput} for command's `input` shape. + * @see {@link UpdateApplicationComponentConfigCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class UpdateApplicationComponentConfigCommand extends $Command< + UpdateApplicationComponentConfigCommandInput, + UpdateApplicationComponentConfigCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateApplicationComponentConfigCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "UpdateApplicationComponentConfigCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateApplicationComponentConfigRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateApplicationComponentConfigResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateApplicationComponentConfigCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateApplicationComponentConfigCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1UpdateApplicationComponentConfigCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/UpdateServerConfigCommand.ts b/clients/client-migrationhubstrategy/src/commands/UpdateServerConfigCommand.ts new file mode 100644 index 000000000000..dd8deb2f6179 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/UpdateServerConfigCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + MigrationHubStrategyClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../MigrationHubStrategyClient"; +import { UpdateServerConfigRequest, UpdateServerConfigResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateServerConfigCommand, + serializeAws_restJson1UpdateServerConfigCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateServerConfigCommandInput extends UpdateServerConfigRequest {} +export interface UpdateServerConfigCommandOutput extends UpdateServerConfigResponse, __MetadataBearer {} + +/** + *

      Updates the configuration of the specified server.

      + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { MigrationHubStrategyClient, UpdateServerConfigCommand } from "@aws-sdk/client-migrationhubstrategy"; // ES Modules import + * // const { MigrationHubStrategyClient, UpdateServerConfigCommand } = require("@aws-sdk/client-migrationhubstrategy"); // CommonJS import + * const client = new MigrationHubStrategyClient(config); + * const command = new UpdateServerConfigCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateServerConfigCommandInput} for command's `input` shape. + * @see {@link UpdateServerConfigCommandOutput} for command's `response` shape. + * @see {@link MigrationHubStrategyClientResolvedConfig | config} for MigrationHubStrategyClient's `config` shape. + * + */ +export class UpdateServerConfigCommand extends $Command< + UpdateServerConfigCommandInput, + UpdateServerConfigCommandOutput, + MigrationHubStrategyClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateServerConfigCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: MigrationHubStrategyClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "MigrationHubStrategyClient"; + const commandName = "UpdateServerConfigCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateServerConfigRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateServerConfigResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateServerConfigCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateServerConfigCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateServerConfigCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-migrationhubstrategy/src/commands/index.ts b/clients/client-migrationhubstrategy/src/commands/index.ts new file mode 100644 index 000000000000..f3ba97a535f7 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/commands/index.ts @@ -0,0 +1,20 @@ +export * from "./GetApplicationComponentDetailsCommand"; +export * from "./GetApplicationComponentStrategiesCommand"; +export * from "./GetAssessmentCommand"; +export * from "./GetImportFileTaskCommand"; +export * from "./GetPortfolioPreferencesCommand"; +export * from "./GetPortfolioSummaryCommand"; +export * from "./GetRecommendationReportDetailsCommand"; +export * from "./GetServerDetailsCommand"; +export * from "./GetServerStrategiesCommand"; +export * from "./ListApplicationComponentsCommand"; +export * from "./ListCollectorsCommand"; +export * from "./ListImportFileTaskCommand"; +export * from "./ListServersCommand"; +export * from "./PutPortfolioPreferencesCommand"; +export * from "./StartAssessmentCommand"; +export * from "./StartImportFileTaskCommand"; +export * from "./StartRecommendationReportGenerationCommand"; +export * from "./StopAssessmentCommand"; +export * from "./UpdateApplicationComponentConfigCommand"; +export * from "./UpdateServerConfigCommand"; diff --git a/clients/client-migrationhubstrategy/src/endpoints.ts b/clients/client-migrationhubstrategy/src/endpoints.ts new file mode 100644 index 000000000000..74465c50c550 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/endpoints.ts @@ -0,0 +1,134 @@ +import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; + +const regionHash: RegionHash = {}; + +const partitionHash: PartitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "migrationhub-strategy.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "migrationhub-strategy-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "migrationhub-strategy-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "migrationhub-strategy.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + regionRegex: "^cn\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "migrationhub-strategy.{region}.amazonaws.com.cn", + tags: [], + }, + { + hostname: "migrationhub-strategy-fips.{region}.amazonaws.com.cn", + tags: ["fips"], + }, + { + hostname: "migrationhub-strategy-fips.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack", "fips"], + }, + { + hostname: "migrationhub-strategy.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack"], + }, + ], + }, + "aws-iso": { + regions: ["us-iso-east-1", "us-iso-west-1"], + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "migrationhub-strategy.{region}.c2s.ic.gov", + tags: [], + }, + { + hostname: "migrationhub-strategy-fips.{region}.c2s.ic.gov", + tags: ["fips"], + }, + ], + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "migrationhub-strategy.{region}.sc2s.sgov.gov", + tags: [], + }, + { + hostname: "migrationhub-strategy-fips.{region}.sc2s.sgov.gov", + tags: ["fips"], + }, + ], + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-west-1"], + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "migrationhub-strategy.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "migrationhub-strategy-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "migrationhub-strategy-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "migrationhub-strategy.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, +}; + +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => + getRegionInfo(region, { + ...options, + signingService: "migrationhub-strategy", + regionHash, + partitionHash, + }); diff --git a/clients/client-migrationhubstrategy/src/index.ts b/clients/client-migrationhubstrategy/src/index.ts new file mode 100644 index 000000000000..22fd54888d6c --- /dev/null +++ b/clients/client-migrationhubstrategy/src/index.ts @@ -0,0 +1,5 @@ +export * from "./MigrationHubStrategy"; +export * from "./MigrationHubStrategyClient"; +export * from "./commands"; +export * from "./models"; +export * from "./pagination"; diff --git a/clients/client-migrationhubstrategy/src/models/index.ts b/clients/client-migrationhubstrategy/src/models/index.ts new file mode 100644 index 000000000000..09c5d6e09b8c --- /dev/null +++ b/clients/client-migrationhubstrategy/src/models/index.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/clients/client-migrationhubstrategy/src/models/models_0.ts b/clients/client-migrationhubstrategy/src/models/models_0.ts new file mode 100644 index 000000000000..26ccb4aeee21 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/models/models_0.ts @@ -0,0 +1,2839 @@ +import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; + +/** + *

      The AWS user account does not have permission to perform the action. Check the + * AWS Identity and Access Management (IAM) policy associated with this account.

      + */ +export interface AccessDeniedException extends __SmithyException, $MetadataBearer { + name: "AccessDeniedException"; + $fault: "client"; + message: string | undefined; +} + +export namespace AccessDeniedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AccessDeniedException): any => ({ + ...obj, + }); +} + +export enum AntipatternReportStatus { + FAILED = "FAILED", + IN_PROGRESS = "IN_PROGRESS", + SUCCESS = "SUCCESS", +} + +export enum Severity { + HIGH = "HIGH", + LOW = "LOW", + MEDIUM = "MEDIUM", +} + +/** + *

      + * Contains the summary of anti-patterns and their severity. + *

      + */ +export interface AntipatternSeveritySummary { + /** + *

      + * Contains the severity of anti-patterns. + *

      + */ + severity?: Severity | string; + + /** + *

      + * Contains the count of anti-patterns. + *

      + */ + count?: number; +} + +export namespace AntipatternSeveritySummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AntipatternSeveritySummary): any => ({ + ...obj, + }); +} + +export enum ApplicationComponentCriteria { + APP_NAME = "APP_NAME", + APP_TYPE = "APP_TYPE", + DESTINATION = "DESTINATION", + NOT_DEFINED = "NOT_DEFINED", + SERVER_ID = "SERVER_ID", + STRATEGY = "STRATEGY", +} + +export enum SrcCodeOrDbAnalysisStatus { + ANALYSIS_FAILED = "ANALYSIS_FAILED", + ANALYSIS_STARTED = "ANALYSIS_STARTED", + ANALYSIS_SUCCESS = "ANALYSIS_SUCCESS", + ANALYSIS_TO_BE_SCHEDULED = "ANALYSIS_TO_BE_SCHEDULED", +} + +/** + *

      Contains the S3 bucket name and the Amazon S3 key name.

      + */ +export interface S3Object { + /** + *

      The S3 bucket name.

      + */ + s3Bucket?: string; + + /** + *

      The Amazon S3 key name.

      + */ + s3key?: string; +} + +export namespace S3Object { + /** + * @internal + */ + export const filterSensitiveLog = (obj: S3Object): any => ({ + ...obj, + }); +} + +export enum AppType { + IIS = "IIS", + dotNetFramework = "DotNetFramework", + java = "Java", + oracle = "Oracle", + other = "Other", + sqlServer = "SQLServer", +} + +/** + *

      + * Configuration information used for assessing databases. + *

      + */ +export interface DatabaseConfigDetail { + /** + *

      + * AWS Secrets Manager key that holds the credentials that you use to connect to a database. + *

      + */ + secretName?: string; +} + +export namespace DatabaseConfigDetail { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DatabaseConfigDetail): any => ({ + ...obj, + }); +} + +export enum InclusionStatus { + EXCLUDE_FROM_RECOMMENDATION = "excludeFromAssessment", + INCLUDE_IN_RECOMMENDATION = "includeInAssessment", +} + +export enum Strategy { + REFACTOR = "Refactor", + REHOST = "Rehost", + RELOCATE = "Relocate", + REPLATFORM = "Replatform", + REPURCHASE = "Repurchase", + RETAIN = "Retain", + RETIREMENT = "Retirement", +} + +export enum TargetDestination { + AMAZON_DOCUMENTDB = "Amazon DocumentDB", + AMAZON_DYNAMODB = "Amazon DynamoDB", + AMAZON_ELASTIC_CLOUD_COMPUTE = "Amazon Elastic Cloud Compute (EC2)", + AMAZON_ELASTIC_CONTAINER_SERVICE = "Amazon Elastic Container Service (ECS)", + AMAZON_ELASTIC_KUBERNETES_SERVICE = "Amazon Elastic Kubernetes Service (EKS)", + AMAZON_RDS = "Amazon Relational Database Service", + AMAZON_RDS_MYSQL = "Amazon Relational Database Service on MySQL", + AMAZON_RDS_POSTGRESQL = "Amazon Relational Database Service on PostgreSQL", + AURORA_MYSQL = "Aurora MySQL", + AURORA_POSTGRESQL = "Aurora PostgreSQL", + AWS_ELASTIC_BEANSTALK = "AWS Elastic BeanStalk", + AWS_FARGATE = "AWS Fargate", + NONE_SPECIFIED = "None specified", +} + +export enum TransformationToolName { + APP2CONTAINER = "App2Container", + DMS = "Database Migration Service", + EMP = "End of Support Migration", + IN_PLACE_OS_UPGRADE = "In Place Operating System Upgrade", + MGN = "Application Migration Service", + NATIVE_SQL = "Native SQL Server Backup/Restore", + PORTING_ASSISTANT = "Porting Assistant For .NET", + SCT = "Schema Conversion Tool", + STRATEGY_RECOMMENDATION_SUPPORT = "Strategy Recommendation Support", + WWAMA = "Windows Web Application Migration Assistant", +} + +/** + *

      + * Information of the transformation tool that can be used to migrate and modernize the application. + *

      + */ +export interface TransformationTool { + /** + *

      + * Name of the tool. + *

      + */ + name?: TransformationToolName | string; + + /** + *

      + * Description of the tool. + *

      + */ + description?: string; + + /** + *

      + * URL for installing the tool. + *

      + */ + tranformationToolInstallationLink?: string; +} + +export namespace TransformationTool { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TransformationTool): any => ({ + ...obj, + }); +} + +/** + *

      + * Contains a recommendation set. + *

      + */ +export interface RecommendationSet { + /** + *

      + * The target destination for the recommendation set. + *

      + */ + transformationTool?: TransformationTool; + + /** + *

      + * The recommended target destination. + *

      + */ + targetDestination?: TargetDestination | string; + + /** + *

      + * The recommended strategy. + *

      + */ + strategy?: Strategy | string; +} + +export namespace RecommendationSet { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecommendationSet): any => ({ + ...obj, + }); +} + +export enum ResourceSubType { + DATABASE = "Database", + DATABASE_PROCESS = "DatabaseProcess", + PROCESS = "Process", +} + +/** + *

      + * Object containing source code information that is linked to an application component. + *

      + */ +export interface SourceCodeRepository { + /** + *

      + * The repository name for the source code. + *

      + */ + repository?: string; + + /** + *

      + * The branch of the source code. + *

      + */ + branch?: string; + + /** + *

      + * The type of repository to use for the source code. + *

      + */ + versionControlType?: string; +} + +export namespace SourceCodeRepository { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SourceCodeRepository): any => ({ + ...obj, + }); +} + +/** + *

      Contains detailed information about an application component.

      + */ +export interface ApplicationComponentDetail { + /** + *

      The ID of the application component.

      + */ + id?: string; + + /** + *

      The name of application component.

      + */ + name?: string; + + /** + *

      The top recommendation set for the application component.

      + */ + recommendationSet?: RecommendationSet; + + /** + *

      The status of analysis, if the application component has source code or an associated + * database.

      + */ + analysisStatus?: SrcCodeOrDbAnalysisStatus | string; + + /** + *

      A detailed description of the analysis status and any failure message.

      + */ + statusMessage?: string; + + /** + *

      A list of anti-pattern severity summaries.

      + */ + listAntipatternSeveritySummary?: AntipatternSeveritySummary[]; + + /** + *

      Configuration details for the database associated with the application component.

      + */ + databaseConfigDetail?: DatabaseConfigDetail; + + /** + *

      Details about the source code repository associated with the application component. + *

      + */ + sourceCodeRepositories?: SourceCodeRepository[]; + + /** + *

      The type of application component.

      + */ + appType?: AppType | string; + + /** + *

      The application component subtype.

      + */ + resourceSubType?: ResourceSubType | string; + + /** + *

      Indicates whether the application component has been included for server recommendation + * or not.

      + */ + inclusionStatus?: InclusionStatus | string; + + /** + *

      The S3 bucket name and the Amazon S3 key name for the anti-pattern report.

      + */ + antipatternReportS3Object?: S3Object; + + /** + *

      The status of the anti-pattern report generation.

      + */ + antipatternReportStatus?: AntipatternReportStatus | string; + + /** + *

      The status message for the anti-pattern.

      + */ + antipatternReportStatusMessage?: string; + + /** + *

      OS version.

      + */ + osVersion?: string; + + /** + *

      OS driver.

      + */ + osDriver?: string; + + /** + *

      The timestamp of when the application component was assessed.

      + */ + lastAnalyzedTimestamp?: Date; + + /** + *

      The ID of the server that the application component is running on.

      + */ + associatedServerId?: string; + + /** + *

      Set to true if the application component is running on multiple servers.

      + */ + moreServerAssociationExists?: boolean; +} + +export namespace ApplicationComponentDetail { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ApplicationComponentDetail): any => ({ + ...obj, + }); +} + +export enum StrategyRecommendation { + NOT_RECOMMENDED = "notRecommended", + RECOMMENDED = "recommended", + VIABLE_OPTION = "viableOption", +} + +/** + *

      Contains information about a strategy recommendation for an application component. + *

      + */ +export interface ApplicationComponentStrategy { + /** + *

      Strategy recommendation for the application component.

      + */ + recommendation?: RecommendationSet; + + /** + *

      The recommendation status of a strategy for an application component.

      + */ + status?: StrategyRecommendation | string; + + /** + *

      Set to true if the recommendation is set as preferred.

      + */ + isPreferred?: boolean; +} + +export namespace ApplicationComponentStrategy { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ApplicationComponentStrategy): any => ({ + ...obj, + }); +} + +/** + *

      + * Contains the summary of application components. + *

      + */ +export interface ApplicationComponentSummary { + /** + *

      + * Contains the name of application types. + *

      + */ + appType?: AppType | string; + + /** + *

      + * Contains the count of application type. + *

      + */ + count?: number; +} + +export namespace ApplicationComponentSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ApplicationComponentSummary): any => ({ + ...obj, + }); +} + +export enum AwsManagedTargetDestination { + AWS_ELASTIC_BEANSTALK = "AWS Elastic BeanStalk", + AWS_FARGATE = "AWS Fargate", + NONE_SPECIFIED = "None specified", +} + +/** + *

      + * Object containing the choice of application destination that you specify. + *

      + */ +export interface AwsManagedResources { + /** + *

      + * The choice of application destination that you specify. + *

      + */ + targetDestination: (AwsManagedTargetDestination | string)[] | undefined; +} + +export namespace AwsManagedResources { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AwsManagedResources): any => ({ + ...obj, + }); +} + +export enum NoPreferenceTargetDestination { + AMAZON_ELASTIC_CLOUD_COMPUTE = "Amazon Elastic Cloud Compute (EC2)", + AMAZON_ELASTIC_CONTAINER_SERVICE = "Amazon Elastic Container Service (ECS)", + AMAZON_ELASTIC_KUBERNETES_SERVICE = "Amazon Elastic Kubernetes Service (EKS)", + AWS_ELASTIC_BEANSTALK = "AWS Elastic BeanStalk", + AWS_FARGATE = "AWS Fargate", + NONE_SPECIFIED = "None specified", +} + +/** + *

      + * Object containing the choice of application destination that you specify. + *

      + */ +export interface NoManagementPreference { + /** + *

      + * The choice of application destination that you specify. + *

      + */ + targetDestination: (NoPreferenceTargetDestination | string)[] | undefined; +} + +export namespace NoManagementPreference { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NoManagementPreference): any => ({ + ...obj, + }); +} + +export enum SelfManageTargetDestination { + AMAZON_ELASTIC_CLOUD_COMPUTE = "Amazon Elastic Cloud Compute (EC2)", + AMAZON_ELASTIC_CONTAINER_SERVICE = "Amazon Elastic Container Service (ECS)", + AMAZON_ELASTIC_KUBERNETES_SERVICE = "Amazon Elastic Kubernetes Service (EKS)", + NONE_SPECIFIED = "None specified", +} + +/** + *

      Self-managed resources.

      + */ +export interface SelfManageResources { + /** + *

      Self-managed resources target destination.

      + */ + targetDestination: (SelfManageTargetDestination | string)[] | undefined; +} + +export namespace SelfManageResources { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SelfManageResources): any => ({ + ...obj, + }); +} + +/** + *

      + * Preferences for migrating an application to AWS. + *

      + */ +export type ManagementPreference = + | ManagementPreference.AwsManagedResourcesMember + | ManagementPreference.NoPreferenceMember + | ManagementPreference.SelfManageResourcesMember + | ManagementPreference.$UnknownMember; + +export namespace ManagementPreference { + /** + *

      + * Indicates interest in solutions that are managed by AWS. + *

      + */ + export interface AwsManagedResourcesMember { + awsManagedResources: AwsManagedResources; + selfManageResources?: never; + noPreference?: never; + $unknown?: never; + } + + /** + *

      + * Indicates interest in managing your own resources on AWS. + *

      + */ + export interface SelfManageResourcesMember { + awsManagedResources?: never; + selfManageResources: SelfManageResources; + noPreference?: never; + $unknown?: never; + } + + /** + *

      + * No specific preference. + *

      + */ + export interface NoPreferenceMember { + awsManagedResources?: never; + selfManageResources?: never; + noPreference: NoManagementPreference; + $unknown?: never; + } + + export interface $UnknownMember { + awsManagedResources?: never; + selfManageResources?: never; + noPreference?: never; + $unknown: [string, any]; + } + + export interface Visitor { + awsManagedResources: (value: AwsManagedResources) => T; + selfManageResources: (value: SelfManageResources) => T; + noPreference: (value: NoManagementPreference) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: ManagementPreference, visitor: Visitor): T => { + if (value.awsManagedResources !== undefined) return visitor.awsManagedResources(value.awsManagedResources); + if (value.selfManageResources !== undefined) return visitor.selfManageResources(value.selfManageResources); + if (value.noPreference !== undefined) return visitor.noPreference(value.noPreference); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; + + /** + * @internal + */ + export const filterSensitiveLog = (obj: ManagementPreference): any => { + if (obj.awsManagedResources !== undefined) + return { awsManagedResources: AwsManagedResources.filterSensitiveLog(obj.awsManagedResources) }; + if (obj.selfManageResources !== undefined) + return { selfManageResources: SelfManageResources.filterSensitiveLog(obj.selfManageResources) }; + if (obj.noPreference !== undefined) + return { noPreference: NoManagementPreference.filterSensitiveLog(obj.noPreference) }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; + }; +} + +/** + *

      + * Application preferences that you specify. + *

      + */ +export interface ApplicationPreferences { + /** + *

      + * Application preferences that you specify to prefer managed environment. + *

      + */ + managementPreference?: ManagementPreference; +} + +export namespace ApplicationPreferences { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ApplicationPreferences): any => ({ + ...obj, + ...(obj.managementPreference && { + managementPreference: ManagementPreference.filterSensitiveLog(obj.managementPreference), + }), + }); +} + +export enum AssessmentStatus { + COMPLETE = "COMPLETE", + FAILED = "FAILED", + IN_PROGRESS = "IN_PROGRESS", + STOPPED = "STOPPED", +} + +/** + *

      + * Object containing the summary of the strategy recommendations. + *

      + */ +export interface StrategySummary { + /** + *

      + * The name of recommended strategy. + *

      + */ + strategy?: Strategy | string; + + /** + *

      + * The count of recommendations per strategy. + *

      + */ + count?: number; +} + +export namespace StrategySummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StrategySummary): any => ({ + ...obj, + }); +} + +export enum ServerOsType { + amazonLinux = "AmazonLinux", + endOfSupportWindowsServer = "EndOfSupportWindowsServer", + other = "Other", + redhat = "Redhat", + windowsServer = "WindowsServer", +} + +/** + *

      + * Object containing details about the servers imported by Application Discovery Service + *

      + */ +export interface ServerSummary { + /** + *

      + * Type of operating system for the servers. + *

      + */ + ServerOsType?: ServerOsType | string; + + /** + *

      + * Number of servers. + *

      + */ + count?: number; +} + +export namespace ServerSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServerSummary): any => ({ + ...obj, + }); +} + +/** + *

      + * Contains the summary of the assessment results. + *

      + */ +export interface AssessmentSummary { + /** + *

      + * List of ServerStrategySummary. + *

      + */ + listServerStrategySummary?: StrategySummary[]; + + /** + *

      + * List of ApplicationComponentStrategySummary. + *

      + */ + listApplicationComponentStrategySummary?: StrategySummary[]; + + /** + *

      + * List of AntipatternSeveritySummary. + *

      + */ + listAntipatternSeveritySummary?: AntipatternSeveritySummary[]; + + /** + *

      + * List of ApplicationComponentSummary. + *

      + */ + listApplicationComponentSummary?: ApplicationComponentSummary[]; + + /** + *

      + * List of ServerSummary. + *

      + */ + listServerSummary?: ServerSummary[]; + + /** + *

      + * The Amazon S3 object containing the anti-pattern report. + *

      + */ + antipatternReportS3Object?: S3Object; + + /** + *

      + * The status of the anti-pattern report. + *

      + */ + antipatternReportStatus?: AntipatternReportStatus | string; + + /** + *

      + * The status message of the anti-pattern report. + *

      + */ + antipatternReportStatusMessage?: string; + + /** + *

      + * The time the assessment was performed. + *

      + */ + lastAnalyzedTimestamp?: Date; +} + +export namespace AssessmentSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssessmentSummary): any => ({ + ...obj, + }); +} + +/** + *

      + * Object containing details about applications as defined in Application Discovery Service. + *

      + */ +export interface AssociatedApplication { + /** + *

      + * Name of the application as defined in Application Discovery Service. + *

      + */ + name?: string; + + /** + *

      + * ID of the application as defined in Application Discovery Service. + *

      + */ + id?: string; +} + +export namespace AssociatedApplication { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociatedApplication): any => ({ + ...obj, + }); +} + +export interface GetApplicationComponentDetailsRequest { + /** + *

      The ID of the application component. The ID is unique within an AWS account.

      + */ + applicationComponentId: string | undefined; +} + +export namespace GetApplicationComponentDetailsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetApplicationComponentDetailsRequest): any => ({ + ...obj, + }); +} + +export interface GetApplicationComponentDetailsResponse { + /** + *

      Detailed information about an application component.

      + */ + applicationComponentDetail?: ApplicationComponentDetail; + + /** + *

      The associated application group as defined in AWS Application Discovery Service.

      + */ + associatedApplications?: AssociatedApplication[]; + + /** + *

      Set to true if the application component belongs to more than one application group. + *

      + */ + moreApplicationResource?: boolean; + + /** + *

      A list of the IDs of the servers on which the application component is running.

      + */ + associatedServerIds?: string[]; +} + +export namespace GetApplicationComponentDetailsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetApplicationComponentDetailsResponse): any => ({ + ...obj, + }); +} + +/** + *

      The server experienced an internal error. Try again.

      + */ +export interface InternalServerException extends __SmithyException, $MetadataBearer { + name: "InternalServerException"; + $fault: "server"; + message?: string; +} + +export namespace InternalServerException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InternalServerException): any => ({ + ...obj, + }); +} + +/** + *

      The specified ID in the request is not found.

      + */ +export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { + name: "ResourceNotFoundException"; + $fault: "client"; + message?: string; +} + +export namespace ResourceNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ + ...obj, + }); +} + +/** + *

      The request was denied due to request throttling.

      + */ +export interface ThrottlingException extends __SmithyException, $MetadataBearer { + name: "ThrottlingException"; + $fault: "client"; + message?: string; +} + +export namespace ThrottlingException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ThrottlingException): any => ({ + ...obj, + }); +} + +export interface GetApplicationComponentStrategiesRequest { + /** + *

      The ID of the application component. The ID is unique within an AWS account.

      + */ + applicationComponentId: string | undefined; +} + +export namespace GetApplicationComponentStrategiesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetApplicationComponentStrategiesRequest): any => ({ + ...obj, + }); +} + +export interface GetApplicationComponentStrategiesResponse { + /** + *

      A list of application component strategy recommendations.

      + */ + applicationComponentStrategies?: ApplicationComponentStrategy[]; +} + +export namespace GetApplicationComponentStrategiesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetApplicationComponentStrategiesResponse): any => ({ + ...obj, + }); +} + +export interface GetAssessmentRequest { + /** + *

      The assessmentid returned by StartAssessment.

      + */ + id: string | undefined; +} + +export namespace GetAssessmentRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAssessmentRequest): any => ({ + ...obj, + }); +} + +/** + *

      Detailed information about an assessment.

      + */ +export interface DataCollectionDetails { + /** + *

      The status of the assessment.

      + */ + status?: AssessmentStatus | string; + + /** + *

      The total number of servers in the assessment.

      + */ + servers?: number; + + /** + *

      The number of failed servers in the assessment.

      + */ + failed?: number; + + /** + *

      The number of successful servers in the assessment.

      + */ + success?: number; + + /** + *

      The number of servers with the assessment status IN_PROGESS.

      + */ + inProgress?: number; + + /** + *

      The start time of assessment.

      + */ + startTime?: Date; + + /** + *

      The time the assessment completes.

      + */ + completionTime?: Date; +} + +export namespace DataCollectionDetails { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DataCollectionDetails): any => ({ + ...obj, + }); +} + +export interface GetAssessmentResponse { + /** + *

      The ID for the specific assessment task.

      + */ + id?: string; + + /** + *

      Detailed information about the assessment.

      + */ + dataCollectionDetails?: DataCollectionDetails; +} + +export namespace GetAssessmentResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAssessmentResponse): any => ({ + ...obj, + }); +} + +export interface GetImportFileTaskRequest { + /** + *

      The ID of the import file task. This ID is returned in the response of + * StartImportFileTask.

      + */ + id: string | undefined; +} + +export namespace GetImportFileTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetImportFileTaskRequest): any => ({ + ...obj, + }); +} + +export enum ImportFileTaskStatus { + DELETE_FAILED = "DeleteFailed", + DELETE_IN_PROGRESS = "DeleteInProgress", + DELETE_PARTIAL_SUCCESS = "DeletePartialSuccess", + DELETE_SUCCESS = "DeleteSuccess", + IMPORT_FAILED = "ImportFailed", + IMPORT_IN_PROGRESS = "ImportInProgress", + IMPORT_PARTIAL_SUCCESS = "ImportPartialSuccess", + IMPORT_SUCCESS = "ImportSuccess", +} + +export interface GetImportFileTaskResponse { + /** + *

      The import file task id returned in the response of StartImportFileTask.

      + */ + id?: string; + + /** + *

      Status of import file task.

      + */ + status?: ImportFileTaskStatus | string; + + /** + *

      Start time of the import task.

      + */ + startTime?: Date; + + /** + *

      The S3 bucket where import file is located.

      + */ + inputS3Bucket?: string; + + /** + *

      The Amazon S3 key name of the import file.

      + */ + inputS3Key?: string; + + /** + *

      The S3 bucket name for status report of import task.

      + */ + statusReportS3Bucket?: string; + + /** + *

      The Amazon S3 key name for status report of import task. The report contains details about + * whether each record imported successfully or why it did not.

      + */ + statusReportS3Key?: string; + + /** + *

      The time that the import task completed.

      + */ + completionTime?: Date; + + /** + *

      The number of records successfully imported.

      + */ + numberOfRecordsSuccess?: number; + + /** + *

      The number of records that failed to be imported.

      + */ + numberOfRecordsFailed?: number; + + /** + *

      The name of the import task given in StartImportFileTask.

      + */ + importName?: string; +} + +export namespace GetImportFileTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetImportFileTaskResponse): any => ({ + ...obj, + }); +} + +/** + *

      The request body isn't valid.

      + */ +export interface ValidationException extends __SmithyException, $MetadataBearer { + name: "ValidationException"; + $fault: "client"; + message?: string; +} + +export namespace ValidationException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ValidationException): any => ({ + ...obj, + }); +} + +export interface GetPortfolioPreferencesRequest {} + +export namespace GetPortfolioPreferencesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetPortfolioPreferencesRequest): any => ({ + ...obj, + }); +} + +export enum DatabaseManagementPreference { + AWS_MANAGED = "AWS-managed", + NO_PREFERENCE = "No preference", + SELF_MANAGE = "Self-manage", +} + +export enum HeterogeneousTargetDatabaseEngine { + AMAZON_AURORA = "Amazon Aurora", + AWS_POSTGRESQL = "AWS PostgreSQL", + DB2_LUW = "Db2 LUW", + MARIA_DB = "MariaDB", + MICROSOFT_SQL_SERVER = "Microsoft SQL Server", + MONGO_DB = "MongoDB", + MYSQL = "MySQL", + NONE_SPECIFIED = "None specified", + ORACLE_DATABASE = "Oracle Database", + SAP = "SAP", +} + +/** + *

      + * The object containing details about heterogeneous database preferences. + *

      + */ +export interface Heterogeneous { + /** + *

      + * The target database engine for heterogeneous database migration preference. + *

      + */ + targetDatabaseEngine: (HeterogeneousTargetDatabaseEngine | string)[] | undefined; +} + +export namespace Heterogeneous { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Heterogeneous): any => ({ + ...obj, + }); +} + +export enum HomogeneousTargetDatabaseEngine { + NONE_SPECIFIED = "None specified", +} + +/** + *

      + * The object containing details about homogeneous database preferences. + *

      + */ +export interface Homogeneous { + /** + *

      + * The target database engine for homogeneous database migration preferences. + *

      + */ + targetDatabaseEngine?: (HomogeneousTargetDatabaseEngine | string)[]; +} + +export namespace Homogeneous { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Homogeneous): any => ({ + ...obj, + }); +} + +export enum TargetDatabaseEngine { + AMAZON_AURORA = "Amazon Aurora", + AWS_POSTGRESQL = "AWS PostgreSQL", + DB2_LUW = "Db2 LUW", + MARIA_DB = "MariaDB", + MICROSOFT_SQL_SERVER = "Microsoft SQL Server", + MONGO_DB = "MongoDB", + MYSQL = "MySQL", + NONE_SPECIFIED = "None specified", + ORACLE_DATABASE = "Oracle Database", + SAP = "SAP", +} + +/** + *

      The object containing details about database migration preferences, when you have no + * particular preference.

      + */ +export interface NoDatabaseMigrationPreference { + /** + *

      + * The target database engine for database migration preference that you specify. + *

      + */ + targetDatabaseEngine: (TargetDatabaseEngine | string)[] | undefined; +} + +export namespace NoDatabaseMigrationPreference { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NoDatabaseMigrationPreference): any => ({ + ...obj, + }); +} + +/** + *

      + * Preferences for migrating a database to AWS. + *

      + */ +export type DatabaseMigrationPreference = + | DatabaseMigrationPreference.HeterogeneousMember + | DatabaseMigrationPreference.HomogeneousMember + | DatabaseMigrationPreference.NoPreferenceMember + | DatabaseMigrationPreference.$UnknownMember; + +export namespace DatabaseMigrationPreference { + /** + *

      Indicates whether you are interested in moving from one type of database to another. For + * example, from SQL Server to Amazon Aurora MySQL-Compatible Edition.

      + */ + export interface HeterogeneousMember { + heterogeneous: Heterogeneous; + homogeneous?: never; + noPreference?: never; + $unknown?: never; + } + + /** + *

      Indicates whether you are interested in moving to the same type of database into AWS. + * For example, from SQL Server in your environment to SQL Server on AWS.

      + */ + export interface HomogeneousMember { + heterogeneous?: never; + homogeneous: Homogeneous; + noPreference?: never; + $unknown?: never; + } + + /** + *

      + * Indicated that you do not prefer heterogeneous or homogeneous. + *

      + */ + export interface NoPreferenceMember { + heterogeneous?: never; + homogeneous?: never; + noPreference: NoDatabaseMigrationPreference; + $unknown?: never; + } + + export interface $UnknownMember { + heterogeneous?: never; + homogeneous?: never; + noPreference?: never; + $unknown: [string, any]; + } + + export interface Visitor { + heterogeneous: (value: Heterogeneous) => T; + homogeneous: (value: Homogeneous) => T; + noPreference: (value: NoDatabaseMigrationPreference) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: DatabaseMigrationPreference, visitor: Visitor): T => { + if (value.heterogeneous !== undefined) return visitor.heterogeneous(value.heterogeneous); + if (value.homogeneous !== undefined) return visitor.homogeneous(value.homogeneous); + if (value.noPreference !== undefined) return visitor.noPreference(value.noPreference); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; + + /** + * @internal + */ + export const filterSensitiveLog = (obj: DatabaseMigrationPreference): any => { + if (obj.heterogeneous !== undefined) return { heterogeneous: Heterogeneous.filterSensitiveLog(obj.heterogeneous) }; + if (obj.homogeneous !== undefined) return { homogeneous: Homogeneous.filterSensitiveLog(obj.homogeneous) }; + if (obj.noPreference !== undefined) + return { noPreference: NoDatabaseMigrationPreference.filterSensitiveLog(obj.noPreference) }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; + }; +} + +/** + *

      + * Preferences on managing your databases on AWS. + *

      + */ +export interface DatabasePreferences { + /** + *

      Specifies whether you're interested in self-managed databases or databases managed by + * AWS.

      + */ + databaseManagementPreference?: DatabaseManagementPreference | string; + + /** + *

      + * Specifies your preferred migration path. + *

      + */ + databaseMigrationPreference?: DatabaseMigrationPreference; +} + +export namespace DatabasePreferences { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DatabasePreferences): any => ({ + ...obj, + ...(obj.databaseMigrationPreference && { + databaseMigrationPreference: DatabaseMigrationPreference.filterSensitiveLog(obj.databaseMigrationPreference), + }), + }); +} + +/** + *

      + * Business goals that you specify. + *

      + */ +export interface BusinessGoals { + /** + *

      + * Business goal to achieve migration at a fast pace. + *

      + */ + speedOfMigration?: number; + + /** + *

      + * Business goal to reduce the operational overhead on the team by moving into managed services. + *

      + */ + reduceOperationalOverheadWithManagedServices?: number; + + /** + *

      + * Business goal to modernize infrastructure by moving to cloud native technologies. + *

      + */ + modernizeInfrastructureWithCloudNativeTechnologies?: number; + + /** + *

      + * Business goal to reduce license costs. + *

      + */ + licenseCostReduction?: number; +} + +export namespace BusinessGoals { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BusinessGoals): any => ({ + ...obj, + }); +} + +/** + *

      + * Rank of business goals based on priority. + *

      + */ +export interface PrioritizeBusinessGoals { + /** + *

      + * Rank of business goals based on priority. + *

      + */ + businessGoals?: BusinessGoals; +} + +export namespace PrioritizeBusinessGoals { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PrioritizeBusinessGoals): any => ({ + ...obj, + }); +} + +export interface GetPortfolioPreferencesResponse { + /** + *

      The rank of business goals based on priority.

      + */ + prioritizeBusinessGoals?: PrioritizeBusinessGoals; + + /** + *

      The transformation preferences for non-database applications.

      + */ + applicationPreferences?: ApplicationPreferences; + + /** + *

      The transformation preferences for database applications.

      + */ + databasePreferences?: DatabasePreferences; +} + +export namespace GetPortfolioPreferencesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetPortfolioPreferencesResponse): any => ({ + ...obj, + ...(obj.applicationPreferences && { + applicationPreferences: ApplicationPreferences.filterSensitiveLog(obj.applicationPreferences), + }), + ...(obj.databasePreferences && { + databasePreferences: DatabasePreferences.filterSensitiveLog(obj.databasePreferences), + }), + }); +} + +export interface GetPortfolioSummaryRequest {} + +export namespace GetPortfolioSummaryRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetPortfolioSummaryRequest): any => ({ + ...obj, + }); +} + +export interface GetPortfolioSummaryResponse { + /** + *

      An assessment summary for the portfolio including the number of servers to rehost and the + * overall number of anti-patterns.

      + */ + assessmentSummary?: AssessmentSummary; +} + +export namespace GetPortfolioSummaryResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetPortfolioSummaryResponse): any => ({ + ...obj, + }); +} + +export interface GetRecommendationReportDetailsRequest { + /** + *

      The recommendation report generation task id returned by + * StartRecommendationReportGeneration.

      + */ + id: string | undefined; +} + +export namespace GetRecommendationReportDetailsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetRecommendationReportDetailsRequest): any => ({ + ...obj, + }); +} + +export enum RecommendationReportStatus { + FAILED = "FAILED", + IN_PROGRESS = "IN_PROGRESS", + SUCCESS = "SUCCESS", +} + +/** + *

      + * Contains detailed information about a recommendation report. + *

      + */ +export interface RecommendationReportDetails { + /** + *

      + * The status of the recommendation report generation task. + *

      + */ + status?: RecommendationReportStatus | string; + + /** + *

      + * The status message for recommendation report generation. + *

      + */ + statusMessage?: string; + + /** + *

      + * The time that the recommendation report generation task starts. + *

      + */ + startTime?: Date; + + /** + *

      + * The time that the recommendation report generation task completes. + *

      + */ + completionTime?: Date; + + /** + *

      + * The S3 bucket where the report file is located. + *

      + */ + s3Bucket?: string; + + /** + *

      + * The Amazon S3 key name of the report file. + *

      + */ + s3Keys?: string[]; +} + +export namespace RecommendationReportDetails { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RecommendationReportDetails): any => ({ + ...obj, + }); +} + +export interface GetRecommendationReportDetailsResponse { + /** + *

      The ID of the recommendation report generation task. See the response of StartRecommendationReportGeneration.

      + */ + id?: string; + + /** + *

      Detailed information about the recommendation report.

      + */ + recommendationReportDetails?: RecommendationReportDetails; +} + +export namespace GetRecommendationReportDetailsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetRecommendationReportDetailsResponse): any => ({ + ...obj, + }); +} + +export interface GetServerDetailsRequest { + /** + *

      The ID of the server.

      + */ + serverId: string | undefined; + + /** + *

      The token from a previous call that you use to retrieve the next set of results. For example, + * if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along + * with a token. You then use the returned token to retrieve the next set of 10.

      + */ + nextToken?: string; + + /** + *

      The maximum number of items to include in the response. The maximum value is 100.

      + */ + maxResults?: number; +} + +export namespace GetServerDetailsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetServerDetailsRequest): any => ({ + ...obj, + }); +} + +export enum RunTimeAssessmentStatus { + DC_FAILED = "dataCollectionTaskFailed", + DC_PARTIAL_SUCCESS = "dataCollectionTaskPartialSuccess", + DC_REQ_SENT = "dataCollectionTaskScheduled", + DC_STARTED = "dataCollectionTaskStarted", + DC_STOPPED = "dataCollectionTaskStopped", + DC_SUCCESS = "dataCollectionTaskSuccess", + DC_TO_BE_SCHEDULED = "dataCollectionTaskToBeScheduled", +} + +/** + *

      + * Information about the server's network for which the assessment was run. + *

      + */ +export interface NetworkInfo { + /** + *

      + * Information about the name of the interface of the server for which the assessment was run. + *

      + */ + interfaceName: string | undefined; + + /** + *

      + * Information about the IP address of the server for which the assessment was run. + *

      + */ + ipAddress: string | undefined; + + /** + *

      + * Information about the MAC address of the server for which the assessment was run. + *

      + */ + macAddress: string | undefined; + + /** + *

      + * Information about the subnet mask of the server for which the assessment was run. + *

      + */ + netMask: string | undefined; +} + +export namespace NetworkInfo { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NetworkInfo): any => ({ + ...obj, + }); +} + +export enum OSType { + LINUX = "LINUX", + WINDOWS = "WINDOWS", +} + +/** + *

      + * Information about the operating system. + *

      + */ +export interface OSInfo { + /** + *

      + * Information about the type of operating system. + *

      + */ + type?: OSType | string; + + /** + *

      + * Information about the version of operating system. + *

      + */ + version?: string; +} + +export namespace OSInfo { + /** + * @internal + */ + export const filterSensitiveLog = (obj: OSInfo): any => ({ + ...obj, + }); +} + +/** + *

      + * Information about the server that hosts application components. + *

      + */ +export interface SystemInfo { + /** + *

      + * Operating system corresponding to a server. + *

      + */ + osInfo?: OSInfo; + + /** + *

      + * File system type for the server. + *

      + */ + fileSystemType?: string; + + /** + *

      + * Networking information related to a server. + *

      + */ + networkInfoList?: NetworkInfo[]; + + /** + *

      + * CPU architecture type for the server. + *

      + */ + cpuArchitecture?: string; +} + +export namespace SystemInfo { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SystemInfo): any => ({ + ...obj, + }); +} + +/** + *

      Detailed information about a server.

      + */ +export interface ServerDetail { + /** + *

      The server ID.

      + */ + id?: string; + + /** + *

      The name of the server.

      + */ + name?: string; + + /** + *

      A set of recommendations.

      + */ + recommendationSet?: RecommendationSet; + + /** + *

      The status of assessment for the server.

      + */ + dataCollectionStatus?: RunTimeAssessmentStatus | string; + + /** + *

      A message about the status of data collection, which contains detailed descriptions of + * any error messages.

      + */ + statusMessage?: string; + + /** + *

      A list of anti-pattern severity summaries.

      + */ + listAntipatternSeveritySummary?: AntipatternSeveritySummary[]; + + /** + *

      System information about the server.

      + */ + systemInfo?: SystemInfo; + + /** + *

      A list of strategy summaries.

      + */ + applicationComponentStrategySummary?: StrategySummary[]; + + /** + *

      The S3 bucket name and Amazon S3 key name for anti-pattern report.

      + */ + antipatternReportS3Object?: S3Object; + + /** + *

      The status of the anti-pattern report generation.

      + */ + antipatternReportStatus?: AntipatternReportStatus | string; + + /** + *

      A message about the status of the anti-pattern report generation.

      + */ + antipatternReportStatusMessage?: string; + + /** + *

      The type of server.

      + */ + serverType?: string; + + /** + *

      The timestamp of when the server was assessed.

      + */ + lastAnalyzedTimestamp?: Date; +} + +export namespace ServerDetail { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServerDetail): any => ({ + ...obj, + }); +} + +export interface GetServerDetailsResponse { + /** + *

      The token you use to retrieve the next set of results, or null if there are no more results.

      + */ + nextToken?: string; + + /** + *

      Detailed information about the server.

      + */ + serverDetail?: ServerDetail; + + /** + *

      The associated application group the server belongs to, as defined in AWS Application Discovery Service. + *

      + */ + associatedApplications?: AssociatedApplication[]; +} + +export namespace GetServerDetailsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetServerDetailsResponse): any => ({ + ...obj, + }); +} + +export interface GetServerStrategiesRequest { + /** + *

      The ID of the server.

      + */ + serverId: string | undefined; +} + +export namespace GetServerStrategiesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetServerStrategiesRequest): any => ({ + ...obj, + }); +} + +/** + *

      Contains information about a strategy recommendation for a server.

      + */ +export interface ServerStrategy { + /** + *

      Strategy recommendation for the server.

      + */ + recommendation?: RecommendationSet; + + /** + *

      The recommendation status of the strategy for the server.

      + */ + status?: StrategyRecommendation | string; + + /** + *

      The number of application components with this strategy recommendation running on the + * server.

      + */ + numberOfApplicationComponents?: number; + + /** + *

      Set to true if the recommendation is set as preferred.

      + */ + isPreferred?: boolean; +} + +export namespace ServerStrategy { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServerStrategy): any => ({ + ...obj, + }); +} + +export interface GetServerStrategiesResponse { + /** + *

      A list of strategy recommendations for the server.

      + */ + serverStrategies?: ServerStrategy[]; +} + +export namespace GetServerStrategiesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetServerStrategiesResponse): any => ({ + ...obj, + }); +} + +export enum GroupName { + EXTERNAL_ID = "ExternalId", +} + +/** + *

      + * The object containing information about distinct imports or groups for Strategy Recommendations. + *

      + */ +export interface Group { + /** + *

      + * The key of the specific import group. + *

      + */ + name?: GroupName | string; + + /** + *

      + * The value of the specific import group. + *

      + */ + value?: string; +} + +export namespace Group { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Group): any => ({ + ...obj, + }); +} + +export enum SortOrder { + ASC = "ASC", + DESC = "DESC", +} + +export interface ListApplicationComponentsRequest { + /** + *

      Criteria for filtering the list of application components.

      + */ + applicationComponentCriteria?: ApplicationComponentCriteria | string; + + /** + *

      Specify the value based on the application component criteria type. For example, if + * applicationComponentCriteria is set to SERVER_ID and + * filterValue is set to server1, then ListApplicationComponents returns all the application components running on + * server1.

      + */ + filterValue?: string; + + /** + *

      Specifies whether to sort by ascending (ASC) or descending + * (DESC) order.

      + */ + sort?: SortOrder | string; + + /** + *

      The group ID specified in to filter on.

      + */ + groupIdFilter?: Group[]; + + /** + *

      The token from a previous call that you use to retrieve the next set of results. For example, + * if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along + * with a token. You then use the returned token to retrieve the next set of 10.

      + */ + nextToken?: string; + + /** + *

      The maximum number of items to include in the response. The maximum value is 100.

      + */ + maxResults?: number; +} + +export namespace ListApplicationComponentsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListApplicationComponentsRequest): any => ({ + ...obj, + }); +} + +export interface ListApplicationComponentsResponse { + /** + *

      The list of application components with detailed information about each component. + *

      + */ + applicationComponentInfos?: ApplicationComponentDetail[]; + + /** + *

      The token you use to retrieve the next set of results, or null if there are no more results.

      + */ + nextToken?: string; +} + +export namespace ListApplicationComponentsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListApplicationComponentsResponse): any => ({ + ...obj, + }); +} + +/** + *

      + * Exception to indicate that the service-linked role (SLR) is locked. + *

      + */ +export interface ServiceLinkedRoleLockClientException extends __SmithyException, $MetadataBearer { + name: "ServiceLinkedRoleLockClientException"; + $fault: "client"; + message?: string; +} + +export namespace ServiceLinkedRoleLockClientException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceLinkedRoleLockClientException): any => ({ + ...obj, + }); +} + +export interface ListCollectorsRequest { + /** + *

      The token from a previous call that you use to retrieve the next set of results. For example, + * if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along + * with a token. You then use the returned token to retrieve the next set of 10.

      + */ + nextToken?: string; + + /** + *

      The maximum number of items to include in the response. The maximum value is 100.

      + */ + maxResults?: number; +} + +export namespace ListCollectorsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListCollectorsRequest): any => ({ + ...obj, + }); +} + +export enum CollectorHealth { + COLLECTOR_HEALTHY = "COLLECTOR_HEALTHY", + COLLECTOR_UNHEALTHY = "COLLECTOR_UNHEALTHY", +} + +/** + *

      + * Process data collector that runs in the environment that you specify. + *

      + */ +export interface Collector { + /** + *

      + * The ID of the collector. + *

      + */ + collectorId?: string; + + /** + *

      + * IP address of the server that is hosting the collector. + *

      + */ + ipAddress?: string; + + /** + *

      + * Hostname of the server that is hosting the collector. + *

      + */ + hostName?: string; + + /** + *

      + * Indicates the health of a collector. + *

      + */ + collectorHealth?: CollectorHealth | string; + + /** + *

      + * Current version of the collector that is running in the environment that you specify. + *

      + */ + collectorVersion?: string; + + /** + *

      + * Time when the collector registered with the service. + *

      + */ + registeredTimeStamp?: string; + + /** + *

      + * Time when the collector last pinged the service. + *

      + */ + lastActivityTimeStamp?: string; +} + +export namespace Collector { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Collector): any => ({ + ...obj, + }); +} + +export interface ListCollectorsResponse { + /** + *

      The list of all the installed collectors.

      + */ + Collectors?: Collector[]; + + /** + *

      The token you use to retrieve the next set of results, or null if there are no more results.

      + */ + nextToken?: string; +} + +export namespace ListCollectorsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListCollectorsResponse): any => ({ + ...obj, + }); +} + +export interface ListImportFileTaskRequest { + /** + *

      The token from a previous call that you use to retrieve the next set of results. For example, + * if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along + * with a token. You then use the returned token to retrieve the next set of 10.

      + */ + nextToken?: string; + + /** + *

      The total number of items to return. The maximum value is 100.

      + */ + maxResults?: number; +} + +export namespace ListImportFileTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListImportFileTaskRequest): any => ({ + ...obj, + }); +} + +/** + *

      Information about the import file tasks you request.

      + */ +export interface ImportFileTaskInformation { + /** + *

      The ID of the import file task.

      + */ + id?: string; + + /** + *

      Status of import file task.

      + */ + status?: ImportFileTaskStatus | string; + + /** + *

      Start time of the import task.

      + */ + startTime?: Date; + + /** + *

      The S3 bucket where the import file is located.

      + */ + inputS3Bucket?: string; + + /** + *

      The Amazon S3 key name of the import file.

      + */ + inputS3Key?: string; + + /** + *

      The S3 bucket name for status report of import task.

      + */ + statusReportS3Bucket?: string; + + /** + *

      The Amazon S3 key name for status report of import task. The report contains details about + * whether each record imported successfully or why it did not.

      + */ + statusReportS3Key?: string; + + /** + *

      The time that the import task completes.

      + */ + completionTime?: Date; + + /** + *

      The number of records successfully imported.

      + */ + numberOfRecordsSuccess?: number; + + /** + *

      The number of records that failed to be imported.

      + */ + numberOfRecordsFailed?: number; + + /** + *

      The name of the import task given in StartImportFileTask.

      + */ + importName?: string; +} + +export namespace ImportFileTaskInformation { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ImportFileTaskInformation): any => ({ + ...obj, + }); +} + +export interface ListImportFileTaskResponse { + /** + *

      Lists information about the files you import.

      + */ + taskInfos?: ImportFileTaskInformation[]; + + /** + *

      The token you use to retrieve the next set of results, or null if there are no more results.

      + */ + nextToken?: string; +} + +export namespace ListImportFileTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListImportFileTaskResponse): any => ({ + ...obj, + }); +} + +export enum ServerCriteria { + DESTINATION = "DESTINATION", + NOT_DEFINED = "NOT_DEFINED", + OS_NAME = "OS_NAME", + SERVER_ID = "SERVER_ID", + STRATEGY = "STRATEGY", +} + +export interface ListServersRequest { + /** + *

      Criteria for filtering servers.

      + */ + serverCriteria?: ServerCriteria | string; + + /** + *

      Specifies the filter value, which is based on the type of server criteria. For example, + * if serverCriteria is OS_NAME, and the filterValue is + * equal to WindowsServer, then ListServers returns all of the servers + * matching the OS name WindowsServer.

      + */ + filterValue?: string; + + /** + *

      Specifies whether to sort by ascending (ASC) or descending + * (DESC) order.

      + */ + sort?: SortOrder | string; + + /** + *

      Specifies the group ID to filter on.

      + */ + groupIdFilter?: Group[]; + + /** + *

      The token from a previous call that you use to retrieve the next set of results. For example, + * if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along + * with a token. You then use the returned token to retrieve the next set of 10.

      + */ + nextToken?: string; + + /** + *

      The maximum number of items to include in the response. The maximum value is 100.

      + */ + maxResults?: number; +} + +export namespace ListServersRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListServersRequest): any => ({ + ...obj, + }); +} + +export interface ListServersResponse { + /** + *

      The list of servers with detailed information about each server.

      + */ + serverInfos?: ServerDetail[]; + + /** + *

      The token you use to retrieve the next set of results, or null if there are no more results.

      + */ + nextToken?: string; +} + +export namespace ListServersResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListServersResponse): any => ({ + ...obj, + }); +} + +/** + *

      + * Exception to indicate that there is an ongoing task when a new task is created. + * Return when once the existing tasks are complete. + *

      + */ +export interface ConflictException extends __SmithyException, $MetadataBearer { + name: "ConflictException"; + $fault: "client"; + message: string | undefined; +} + +export namespace ConflictException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ConflictException): any => ({ + ...obj, + }); +} + +export interface PutPortfolioPreferencesRequest { + /** + *

      The rank of the business goals based on priority.

      + */ + prioritizeBusinessGoals?: PrioritizeBusinessGoals; + + /** + *

      The transformation preferences for non-database applications.

      + */ + applicationPreferences?: ApplicationPreferences; + + /** + *

      The transformation preferences for database applications.

      + */ + databasePreferences?: DatabasePreferences; +} + +export namespace PutPortfolioPreferencesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PutPortfolioPreferencesRequest): any => ({ + ...obj, + ...(obj.applicationPreferences && { + applicationPreferences: ApplicationPreferences.filterSensitiveLog(obj.applicationPreferences), + }), + ...(obj.databasePreferences && { + databasePreferences: DatabasePreferences.filterSensitiveLog(obj.databasePreferences), + }), + }); +} + +export interface PutPortfolioPreferencesResponse {} + +export namespace PutPortfolioPreferencesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PutPortfolioPreferencesResponse): any => ({ + ...obj, + }); +} + +/** + *

      The AWS account has reached its quota of imports. Contact AWS Support to increase the + * quota for this account.

      + */ +export interface ServiceQuotaExceededException extends __SmithyException, $MetadataBearer { + name: "ServiceQuotaExceededException"; + $fault: "client"; + message: string | undefined; +} + +export namespace ServiceQuotaExceededException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceQuotaExceededException): any => ({ + ...obj, + }); +} + +export interface StartAssessmentRequest { + /** + *

      + * The S3 bucket used by the collectors to send analysis data to the service. + * The bucket name must begin with migrationhub-strategy-. + *

      + */ + s3bucketForAnalysisData?: string; + + /** + *

      + * The S3 bucket where all the reports generated by the service are stored. + * The bucket name must begin with migrationhub-strategy-. + *

      + */ + s3bucketForReportData?: string; +} + +export namespace StartAssessmentRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartAssessmentRequest): any => ({ + ...obj, + }); +} + +export interface StartAssessmentResponse { + /** + *

      + * The ID of the assessment. + *

      + */ + assessmentId?: string; +} + +export namespace StartAssessmentResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartAssessmentResponse): any => ({ + ...obj, + }); +} + +export enum DataSourceType { + ADS = "ApplicationDiscoveryService", + MPA = "MPA", +} + +export interface StartImportFileTaskRequest { + /** + *

      A descriptive name for the request.

      + */ + name: string | undefined; + + /** + *

      The S3 bucket where the import file is located. The bucket name is required to begin with + * migrationhub-strategy-.

      + */ + S3Bucket: string | undefined; + + /** + *

      The Amazon S3 key name of the import file.

      + */ + s3key: string | undefined; + + /** + *

      Specifies the source that the servers are coming from. By default, Strategy Recommendations assumes that + * the servers specified in the import file are available in AWS Application Discovery Service.

      + */ + dataSourceType?: DataSourceType | string; + + /** + *

      Groups the resources in the import file together with a unique name. This ID can be as + * filter in ListApplicationComponents and ListServers.

      + */ + groupId?: Group[]; + + /** + *

      The S3 bucket where Strategy Recommendations uploads import results. The bucket name is required to + * begin with migrationhub-strategy-.

      + */ + s3bucketForReportData?: string; +} + +export namespace StartImportFileTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartImportFileTaskRequest): any => ({ + ...obj, + }); +} + +export interface StartImportFileTaskResponse { + /** + *

      The ID for a specific import task. The ID is unique within an AWS account.

      + */ + id?: string; +} + +export namespace StartImportFileTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartImportFileTaskResponse): any => ({ + ...obj, + }); +} + +export enum OutputFormat { + Excel = "Excel", + Json = "Json", +} + +export interface StartRecommendationReportGenerationRequest { + /** + *

      The output format for the recommendation report file. The default format is Microsoft Excel.

      + */ + outputFormat?: OutputFormat | string; + + /** + *

      Groups the resources in the recommendation report with a unique name.

      + */ + groupIdFilter?: Group[]; +} + +export namespace StartRecommendationReportGenerationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartRecommendationReportGenerationRequest): any => ({ + ...obj, + }); +} + +export interface StartRecommendationReportGenerationResponse { + /** + *

      The ID of the recommendation report generation task.

      + */ + id?: string; +} + +export namespace StartRecommendationReportGenerationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartRecommendationReportGenerationResponse): any => ({ + ...obj, + }); +} + +export interface StopAssessmentRequest { + /** + *

      The assessmentId returned by StartAssessment.

      + */ + assessmentId: string | undefined; +} + +export namespace StopAssessmentRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StopAssessmentRequest): any => ({ + ...obj, + }); +} + +export interface StopAssessmentResponse {} + +export namespace StopAssessmentResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StopAssessmentResponse): any => ({ + ...obj, + }); +} + +export enum VersionControl { + GITHUB = "GITHUB", + GITHUB_ENTERPRISE = "GITHUB_ENTERPRISE", +} + +/** + *

      + * Object containing source code information that is linked to an application component. + *

      + */ +export interface SourceCode { + /** + *

      + * The type of repository to use for the source code. + *

      + */ + versionControl?: VersionControl | string; + + /** + *

      + * The branch of the source code. + *

      + */ + sourceVersion?: string; + + /** + *

      + * The repository name for the source code. + *

      + */ + location?: string; +} + +export namespace SourceCode { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SourceCode): any => ({ + ...obj, + }); +} + +/** + *

      + * Information about all the available strategy options for migrating and modernizing an application component. + *

      + */ +export interface StrategyOption { + /** + *

      + * Type of transformation. For example, Rehost, Replatform, and so on. + *

      + */ + strategy?: Strategy | string; + + /** + *

      + * The name of the tool that can be used to transform an application component using this strategy. + *

      + */ + toolName?: TransformationToolName | string; + + /** + *

      + * Destination information about where the application component can migrate to. For example, EC2, ECS, and so on. + *

      + */ + targetDestination?: TargetDestination | string; + + /** + *

      + * Indicates if a specific strategy is preferred for the application component. + *

      + */ + isPreferred?: boolean; +} + +export namespace StrategyOption { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StrategyOption): any => ({ + ...obj, + }); +} + +export interface UpdateApplicationComponentConfigRequest { + /** + *

      The ID of the application component. The ID is unique within an AWS account.

      + */ + applicationComponentId: string | undefined; + + /** + *

      Indicates whether the application component has been included for server recommendation + * or not.

      + */ + inclusionStatus?: InclusionStatus | string; + + /** + *

      The preferred strategy options for the application component. Use values from the GetApplicationComponentStrategies response.

      + */ + strategyOption?: StrategyOption; + + /** + *

      The list of source code configurations to update for the application component.

      + */ + sourceCodeList?: SourceCode[]; + + /** + *

      Database credentials.

      + */ + secretsManagerKey?: string; +} + +export namespace UpdateApplicationComponentConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateApplicationComponentConfigRequest): any => ({ + ...obj, + ...(obj.secretsManagerKey && { secretsManagerKey: SENSITIVE_STRING }), + }); +} + +export interface UpdateApplicationComponentConfigResponse {} + +export namespace UpdateApplicationComponentConfigResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateApplicationComponentConfigResponse): any => ({ + ...obj, + }); +} + +export interface UpdateServerConfigRequest { + /** + *

      The ID of the server.

      + */ + serverId: string | undefined; + + /** + *

      The preferred strategy options for the application component. See the response from GetServerStrategies.

      + */ + strategyOption?: StrategyOption; +} + +export namespace UpdateServerConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateServerConfigRequest): any => ({ + ...obj, + }); +} + +export interface UpdateServerConfigResponse {} + +export namespace UpdateServerConfigResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateServerConfigResponse): any => ({ + ...obj, + }); +} diff --git a/clients/client-migrationhubstrategy/src/pagination/GetServerDetailsPaginator.ts b/clients/client-migrationhubstrategy/src/pagination/GetServerDetailsPaginator.ts new file mode 100644 index 000000000000..5b11f655aa2b --- /dev/null +++ b/clients/client-migrationhubstrategy/src/pagination/GetServerDetailsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + GetServerDetailsCommand, + GetServerDetailsCommandInput, + GetServerDetailsCommandOutput, +} from "../commands/GetServerDetailsCommand"; +import { MigrationHubStrategy } from "../MigrationHubStrategy"; +import { MigrationHubStrategyClient } from "../MigrationHubStrategyClient"; +import { MigrationHubStrategyPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: MigrationHubStrategyClient, + input: GetServerDetailsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetServerDetailsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: MigrationHubStrategy, + input: GetServerDetailsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.getServerDetails(input, ...args); +}; +export async function* paginateGetServerDetails( + config: MigrationHubStrategyPaginationConfiguration, + input: GetServerDetailsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: GetServerDetailsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof MigrationHubStrategy) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof MigrationHubStrategyClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected MigrationHubStrategy | MigrationHubStrategyClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-migrationhubstrategy/src/pagination/Interfaces.ts b/clients/client-migrationhubstrategy/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..28c238af5270 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/pagination/Interfaces.ts @@ -0,0 +1,8 @@ +import { PaginationConfiguration } from "@aws-sdk/types"; + +import { MigrationHubStrategy } from "../MigrationHubStrategy"; +import { MigrationHubStrategyClient } from "../MigrationHubStrategyClient"; + +export interface MigrationHubStrategyPaginationConfiguration extends PaginationConfiguration { + client: MigrationHubStrategy | MigrationHubStrategyClient; +} diff --git a/clients/client-migrationhubstrategy/src/pagination/ListApplicationComponentsPaginator.ts b/clients/client-migrationhubstrategy/src/pagination/ListApplicationComponentsPaginator.ts new file mode 100644 index 000000000000..99903f44d270 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/pagination/ListApplicationComponentsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListApplicationComponentsCommand, + ListApplicationComponentsCommandInput, + ListApplicationComponentsCommandOutput, +} from "../commands/ListApplicationComponentsCommand"; +import { MigrationHubStrategy } from "../MigrationHubStrategy"; +import { MigrationHubStrategyClient } from "../MigrationHubStrategyClient"; +import { MigrationHubStrategyPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: MigrationHubStrategyClient, + input: ListApplicationComponentsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListApplicationComponentsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: MigrationHubStrategy, + input: ListApplicationComponentsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listApplicationComponents(input, ...args); +}; +export async function* paginateListApplicationComponents( + config: MigrationHubStrategyPaginationConfiguration, + input: ListApplicationComponentsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListApplicationComponentsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof MigrationHubStrategy) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof MigrationHubStrategyClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected MigrationHubStrategy | MigrationHubStrategyClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-migrationhubstrategy/src/pagination/ListCollectorsPaginator.ts b/clients/client-migrationhubstrategy/src/pagination/ListCollectorsPaginator.ts new file mode 100644 index 000000000000..7f189e3cbb4c --- /dev/null +++ b/clients/client-migrationhubstrategy/src/pagination/ListCollectorsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListCollectorsCommand, + ListCollectorsCommandInput, + ListCollectorsCommandOutput, +} from "../commands/ListCollectorsCommand"; +import { MigrationHubStrategy } from "../MigrationHubStrategy"; +import { MigrationHubStrategyClient } from "../MigrationHubStrategyClient"; +import { MigrationHubStrategyPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: MigrationHubStrategyClient, + input: ListCollectorsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListCollectorsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: MigrationHubStrategy, + input: ListCollectorsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listCollectors(input, ...args); +}; +export async function* paginateListCollectors( + config: MigrationHubStrategyPaginationConfiguration, + input: ListCollectorsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListCollectorsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof MigrationHubStrategy) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof MigrationHubStrategyClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected MigrationHubStrategy | MigrationHubStrategyClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-migrationhubstrategy/src/pagination/ListImportFileTaskPaginator.ts b/clients/client-migrationhubstrategy/src/pagination/ListImportFileTaskPaginator.ts new file mode 100644 index 000000000000..b716ffb86b1e --- /dev/null +++ b/clients/client-migrationhubstrategy/src/pagination/ListImportFileTaskPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListImportFileTaskCommand, + ListImportFileTaskCommandInput, + ListImportFileTaskCommandOutput, +} from "../commands/ListImportFileTaskCommand"; +import { MigrationHubStrategy } from "../MigrationHubStrategy"; +import { MigrationHubStrategyClient } from "../MigrationHubStrategyClient"; +import { MigrationHubStrategyPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: MigrationHubStrategyClient, + input: ListImportFileTaskCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListImportFileTaskCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: MigrationHubStrategy, + input: ListImportFileTaskCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listImportFileTask(input, ...args); +}; +export async function* paginateListImportFileTask( + config: MigrationHubStrategyPaginationConfiguration, + input: ListImportFileTaskCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListImportFileTaskCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof MigrationHubStrategy) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof MigrationHubStrategyClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected MigrationHubStrategy | MigrationHubStrategyClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-migrationhubstrategy/src/pagination/ListServersPaginator.ts b/clients/client-migrationhubstrategy/src/pagination/ListServersPaginator.ts new file mode 100644 index 000000000000..38c3e073698c --- /dev/null +++ b/clients/client-migrationhubstrategy/src/pagination/ListServersPaginator.ts @@ -0,0 +1,55 @@ +import { Paginator } from "@aws-sdk/types"; + +import { ListServersCommand, ListServersCommandInput, ListServersCommandOutput } from "../commands/ListServersCommand"; +import { MigrationHubStrategy } from "../MigrationHubStrategy"; +import { MigrationHubStrategyClient } from "../MigrationHubStrategyClient"; +import { MigrationHubStrategyPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: MigrationHubStrategyClient, + input: ListServersCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListServersCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: MigrationHubStrategy, + input: ListServersCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listServers(input, ...args); +}; +export async function* paginateListServers( + config: MigrationHubStrategyPaginationConfiguration, + input: ListServersCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListServersCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof MigrationHubStrategy) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof MigrationHubStrategyClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected MigrationHubStrategy | MigrationHubStrategyClient"); + } + yield page; + token = page.nextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-migrationhubstrategy/src/pagination/index.ts b/clients/client-migrationhubstrategy/src/pagination/index.ts new file mode 100644 index 000000000000..fcd335191733 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/pagination/index.ts @@ -0,0 +1,6 @@ +export * from "./GetServerDetailsPaginator"; +export * from "./Interfaces"; +export * from "./ListApplicationComponentsPaginator"; +export * from "./ListCollectorsPaginator"; +export * from "./ListImportFileTaskPaginator"; +export * from "./ListServersPaginator"; diff --git a/clients/client-migrationhubstrategy/src/protocols/Aws_restJson1.ts b/clients/client-migrationhubstrategy/src/protocols/Aws_restJson1.ts new file mode 100644 index 000000000000..84fe6de9ca0a --- /dev/null +++ b/clients/client-migrationhubstrategy/src/protocols/Aws_restJson1.ts @@ -0,0 +1,3647 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { + expectBoolean as __expectBoolean, + expectInt32 as __expectInt32, + expectNonNull as __expectNonNull, + expectNumber as __expectNumber, + expectObject as __expectObject, + expectString as __expectString, + expectUnion as __expectUnion, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + parseEpochTimestamp as __parseEpochTimestamp, +} from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, + SmithyException as __SmithyException, +} from "@aws-sdk/types"; + +import { + GetApplicationComponentDetailsCommandInput, + GetApplicationComponentDetailsCommandOutput, +} from "../commands/GetApplicationComponentDetailsCommand"; +import { + GetApplicationComponentStrategiesCommandInput, + GetApplicationComponentStrategiesCommandOutput, +} from "../commands/GetApplicationComponentStrategiesCommand"; +import { GetAssessmentCommandInput, GetAssessmentCommandOutput } from "../commands/GetAssessmentCommand"; +import { GetImportFileTaskCommandInput, GetImportFileTaskCommandOutput } from "../commands/GetImportFileTaskCommand"; +import { + GetPortfolioPreferencesCommandInput, + GetPortfolioPreferencesCommandOutput, +} from "../commands/GetPortfolioPreferencesCommand"; +import { + GetPortfolioSummaryCommandInput, + GetPortfolioSummaryCommandOutput, +} from "../commands/GetPortfolioSummaryCommand"; +import { + GetRecommendationReportDetailsCommandInput, + GetRecommendationReportDetailsCommandOutput, +} from "../commands/GetRecommendationReportDetailsCommand"; +import { GetServerDetailsCommandInput, GetServerDetailsCommandOutput } from "../commands/GetServerDetailsCommand"; +import { + GetServerStrategiesCommandInput, + GetServerStrategiesCommandOutput, +} from "../commands/GetServerStrategiesCommand"; +import { + ListApplicationComponentsCommandInput, + ListApplicationComponentsCommandOutput, +} from "../commands/ListApplicationComponentsCommand"; +import { ListCollectorsCommandInput, ListCollectorsCommandOutput } from "../commands/ListCollectorsCommand"; +import { ListImportFileTaskCommandInput, ListImportFileTaskCommandOutput } from "../commands/ListImportFileTaskCommand"; +import { ListServersCommandInput, ListServersCommandOutput } from "../commands/ListServersCommand"; +import { + PutPortfolioPreferencesCommandInput, + PutPortfolioPreferencesCommandOutput, +} from "../commands/PutPortfolioPreferencesCommand"; +import { StartAssessmentCommandInput, StartAssessmentCommandOutput } from "../commands/StartAssessmentCommand"; +import { + StartImportFileTaskCommandInput, + StartImportFileTaskCommandOutput, +} from "../commands/StartImportFileTaskCommand"; +import { + StartRecommendationReportGenerationCommandInput, + StartRecommendationReportGenerationCommandOutput, +} from "../commands/StartRecommendationReportGenerationCommand"; +import { StopAssessmentCommandInput, StopAssessmentCommandOutput } from "../commands/StopAssessmentCommand"; +import { + UpdateApplicationComponentConfigCommandInput, + UpdateApplicationComponentConfigCommandOutput, +} from "../commands/UpdateApplicationComponentConfigCommand"; +import { UpdateServerConfigCommandInput, UpdateServerConfigCommandOutput } from "../commands/UpdateServerConfigCommand"; +import { + AccessDeniedException, + AntipatternSeveritySummary, + ApplicationComponentDetail, + ApplicationComponentStrategy, + ApplicationComponentSummary, + ApplicationPreferences, + AssessmentSummary, + AssociatedApplication, + AwsManagedResources, + AwsManagedTargetDestination, + BusinessGoals, + Collector, + ConflictException, + DatabaseConfigDetail, + DatabaseMigrationPreference, + DatabasePreferences, + DataCollectionDetails, + Group, + Heterogeneous, + HeterogeneousTargetDatabaseEngine, + Homogeneous, + HomogeneousTargetDatabaseEngine, + ImportFileTaskInformation, + InternalServerException, + ManagementPreference, + NetworkInfo, + NoDatabaseMigrationPreference, + NoManagementPreference, + NoPreferenceTargetDestination, + OSInfo, + PrioritizeBusinessGoals, + RecommendationReportDetails, + RecommendationSet, + ResourceNotFoundException, + S3Object, + SelfManageResources, + SelfManageTargetDestination, + ServerDetail, + ServerStrategy, + ServerSummary, + ServiceLinkedRoleLockClientException, + ServiceQuotaExceededException, + SourceCode, + SourceCodeRepository, + StrategyOption, + StrategySummary, + SystemInfo, + TargetDatabaseEngine, + ThrottlingException, + TransformationTool, + ValidationException, +} from "../models/models_0"; + +export const serializeAws_restJson1GetApplicationComponentDetailsCommand = async ( + input: GetApplicationComponentDetailsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/get-applicationcomponent-details/{applicationComponentId}"; + if (input.applicationComponentId !== undefined) { + const labelValue: string = input.applicationComponentId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: applicationComponentId."); + } + resolvedPath = resolvedPath.replace("{applicationComponentId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: applicationComponentId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetApplicationComponentStrategiesCommand = async ( + input: GetApplicationComponentStrategiesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/get-applicationcomponent-strategies/{applicationComponentId}"; + if (input.applicationComponentId !== undefined) { + const labelValue: string = input.applicationComponentId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: applicationComponentId."); + } + resolvedPath = resolvedPath.replace("{applicationComponentId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: applicationComponentId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetAssessmentCommand = async ( + input: GetAssessmentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-assessment/{id}"; + if (input.id !== undefined) { + const labelValue: string = input.id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: id."); + } + resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetImportFileTaskCommand = async ( + input: GetImportFileTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-import-file-task/{id}"; + if (input.id !== undefined) { + const labelValue: string = input.id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: id."); + } + resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetPortfolioPreferencesCommand = async ( + input: GetPortfolioPreferencesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-portfolio-preferences"; + let body: any; + body = ""; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetPortfolioSummaryCommand = async ( + input: GetPortfolioSummaryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-portfolio-summary"; + let body: any; + body = ""; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetRecommendationReportDetailsCommand = async ( + input: GetRecommendationReportDetailsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-recommendation-report-details/{id}"; + if (input.id !== undefined) { + const labelValue: string = input.id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: id."); + } + resolvedPath = resolvedPath.replace("{id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetServerDetailsCommand = async ( + input: GetServerDetailsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-server-details/{serverId}"; + if (input.serverId !== undefined) { + const labelValue: string = input.serverId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: serverId."); + } + resolvedPath = resolvedPath.replace("{serverId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: serverId."); + } + const query: any = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1GetServerStrategiesCommand = async ( + input: GetServerStrategiesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-server-strategies/{serverId}"; + if (input.serverId !== undefined) { + const labelValue: string = input.serverId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: serverId."); + } + resolvedPath = resolvedPath.replace("{serverId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: serverId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1ListApplicationComponentsCommand = async ( + input: ListApplicationComponentsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-applicationcomponents"; + let body: any; + body = JSON.stringify({ + ...(input.applicationComponentCriteria !== undefined && + input.applicationComponentCriteria !== null && { + applicationComponentCriteria: input.applicationComponentCriteria, + }), + ...(input.filterValue !== undefined && input.filterValue !== null && { filterValue: input.filterValue }), + ...(input.groupIdFilter !== undefined && + input.groupIdFilter !== null && { groupIdFilter: serializeAws_restJson1GroupIds(input.groupIdFilter, context) }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.sort !== undefined && input.sort !== null && { sort: input.sort }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1ListCollectorsCommand = async ( + input: ListCollectorsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-collectors"; + const query: any = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListImportFileTaskCommand = async ( + input: ListImportFileTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-import-file-task"; + const query: any = { + ...(input.nextToken !== undefined && { nextToken: input.nextToken }), + ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListServersCommand = async ( + input: ListServersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-servers"; + let body: any; + body = JSON.stringify({ + ...(input.filterValue !== undefined && input.filterValue !== null && { filterValue: input.filterValue }), + ...(input.groupIdFilter !== undefined && + input.groupIdFilter !== null && { groupIdFilter: serializeAws_restJson1GroupIds(input.groupIdFilter, context) }), + ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }), + ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }), + ...(input.serverCriteria !== undefined && + input.serverCriteria !== null && { serverCriteria: input.serverCriteria }), + ...(input.sort !== undefined && input.sort !== null && { sort: input.sort }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1PutPortfolioPreferencesCommand = async ( + input: PutPortfolioPreferencesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-portfolio-preferences"; + let body: any; + body = JSON.stringify({ + ...(input.applicationPreferences !== undefined && + input.applicationPreferences !== null && { + applicationPreferences: serializeAws_restJson1ApplicationPreferences(input.applicationPreferences, context), + }), + ...(input.databasePreferences !== undefined && + input.databasePreferences !== null && { + databasePreferences: serializeAws_restJson1DatabasePreferences(input.databasePreferences, context), + }), + ...(input.prioritizeBusinessGoals !== undefined && + input.prioritizeBusinessGoals !== null && { + prioritizeBusinessGoals: serializeAws_restJson1PrioritizeBusinessGoals(input.prioritizeBusinessGoals, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1StartAssessmentCommand = async ( + input: StartAssessmentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-assessment"; + let body: any; + body = JSON.stringify({ + ...(input.s3bucketForAnalysisData !== undefined && + input.s3bucketForAnalysisData !== null && { s3bucketForAnalysisData: input.s3bucketForAnalysisData }), + ...(input.s3bucketForReportData !== undefined && + input.s3bucketForReportData !== null && { s3bucketForReportData: input.s3bucketForReportData }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1StartImportFileTaskCommand = async ( + input: StartImportFileTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-import-file-task"; + let body: any; + body = JSON.stringify({ + ...(input.S3Bucket !== undefined && input.S3Bucket !== null && { S3Bucket: input.S3Bucket }), + ...(input.dataSourceType !== undefined && + input.dataSourceType !== null && { dataSourceType: input.dataSourceType }), + ...(input.groupId !== undefined && + input.groupId !== null && { groupId: serializeAws_restJson1GroupIds(input.groupId, context) }), + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.s3bucketForReportData !== undefined && + input.s3bucketForReportData !== null && { s3bucketForReportData: input.s3bucketForReportData }), + ...(input.s3key !== undefined && input.s3key !== null && { s3key: input.s3key }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1StartRecommendationReportGenerationCommand = async ( + input: StartRecommendationReportGenerationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-recommendation-report-generation"; + let body: any; + body = JSON.stringify({ + ...(input.groupIdFilter !== undefined && + input.groupIdFilter !== null && { groupIdFilter: serializeAws_restJson1GroupIds(input.groupIdFilter, context) }), + ...(input.outputFormat !== undefined && input.outputFormat !== null && { outputFormat: input.outputFormat }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1StopAssessmentCommand = async ( + input: StopAssessmentCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stop-assessment"; + let body: any; + body = JSON.stringify({ + ...(input.assessmentId !== undefined && input.assessmentId !== null && { assessmentId: input.assessmentId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateApplicationComponentConfigCommand = async ( + input: UpdateApplicationComponentConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-applicationcomponent-config"; + let body: any; + body = JSON.stringify({ + ...(input.applicationComponentId !== undefined && + input.applicationComponentId !== null && { applicationComponentId: input.applicationComponentId }), + ...(input.inclusionStatus !== undefined && + input.inclusionStatus !== null && { inclusionStatus: input.inclusionStatus }), + ...(input.secretsManagerKey !== undefined && + input.secretsManagerKey !== null && { secretsManagerKey: input.secretsManagerKey }), + ...(input.sourceCodeList !== undefined && + input.sourceCodeList !== null && { + sourceCodeList: serializeAws_restJson1SourceCodeList(input.sourceCodeList, context), + }), + ...(input.strategyOption !== undefined && + input.strategyOption !== null && { + strategyOption: serializeAws_restJson1StrategyOption(input.strategyOption, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateServerConfigCommand = async ( + input: UpdateServerConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-server-config"; + let body: any; + body = JSON.stringify({ + ...(input.serverId !== undefined && input.serverId !== null && { serverId: input.serverId }), + ...(input.strategyOption !== undefined && + input.strategyOption !== null && { + strategyOption: serializeAws_restJson1StrategyOption(input.strategyOption, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1GetApplicationComponentDetailsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetApplicationComponentDetailsCommandError(output, context); + } + const contents: GetApplicationComponentDetailsCommandOutput = { + $metadata: deserializeMetadata(output), + applicationComponentDetail: undefined, + associatedApplications: undefined, + associatedServerIds: undefined, + moreApplicationResource: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.applicationComponentDetail !== undefined && data.applicationComponentDetail !== null) { + contents.applicationComponentDetail = deserializeAws_restJson1ApplicationComponentDetail( + data.applicationComponentDetail, + context + ); + } + if (data.associatedApplications !== undefined && data.associatedApplications !== null) { + contents.associatedApplications = deserializeAws_restJson1AssociatedApplications( + data.associatedApplications, + context + ); + } + if (data.associatedServerIds !== undefined && data.associatedServerIds !== null) { + contents.associatedServerIds = deserializeAws_restJson1AssociatedServerIDs(data.associatedServerIds, context); + } + if (data.moreApplicationResource !== undefined && data.moreApplicationResource !== null) { + contents.moreApplicationResource = __expectBoolean(data.moreApplicationResource); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetApplicationComponentDetailsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetApplicationComponentStrategiesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetApplicationComponentStrategiesCommandError(output, context); + } + const contents: GetApplicationComponentStrategiesCommandOutput = { + $metadata: deserializeMetadata(output), + applicationComponentStrategies: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.applicationComponentStrategies !== undefined && data.applicationComponentStrategies !== null) { + contents.applicationComponentStrategies = deserializeAws_restJson1ApplicationComponentStrategies( + data.applicationComponentStrategies, + context + ); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetApplicationComponentStrategiesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetAssessmentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetAssessmentCommandError(output, context); + } + const contents: GetAssessmentCommandOutput = { + $metadata: deserializeMetadata(output), + dataCollectionDetails: undefined, + id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.dataCollectionDetails !== undefined && data.dataCollectionDetails !== null) { + contents.dataCollectionDetails = deserializeAws_restJson1DataCollectionDetails(data.dataCollectionDetails, context); + } + if (data.id !== undefined && data.id !== null) { + contents.id = __expectString(data.id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetAssessmentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetImportFileTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetImportFileTaskCommandError(output, context); + } + const contents: GetImportFileTaskCommandOutput = { + $metadata: deserializeMetadata(output), + completionTime: undefined, + id: undefined, + importName: undefined, + inputS3Bucket: undefined, + inputS3Key: undefined, + numberOfRecordsFailed: undefined, + numberOfRecordsSuccess: undefined, + startTime: undefined, + status: undefined, + statusReportS3Bucket: undefined, + statusReportS3Key: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.completionTime !== undefined && data.completionTime !== null) { + contents.completionTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.completionTime))); + } + if (data.id !== undefined && data.id !== null) { + contents.id = __expectString(data.id); + } + if (data.importName !== undefined && data.importName !== null) { + contents.importName = __expectString(data.importName); + } + if (data.inputS3Bucket !== undefined && data.inputS3Bucket !== null) { + contents.inputS3Bucket = __expectString(data.inputS3Bucket); + } + if (data.inputS3Key !== undefined && data.inputS3Key !== null) { + contents.inputS3Key = __expectString(data.inputS3Key); + } + if (data.numberOfRecordsFailed !== undefined && data.numberOfRecordsFailed !== null) { + contents.numberOfRecordsFailed = __expectInt32(data.numberOfRecordsFailed); + } + if (data.numberOfRecordsSuccess !== undefined && data.numberOfRecordsSuccess !== null) { + contents.numberOfRecordsSuccess = __expectInt32(data.numberOfRecordsSuccess); + } + if (data.startTime !== undefined && data.startTime !== null) { + contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime))); + } + if (data.status !== undefined && data.status !== null) { + contents.status = __expectString(data.status); + } + if (data.statusReportS3Bucket !== undefined && data.statusReportS3Bucket !== null) { + contents.statusReportS3Bucket = __expectString(data.statusReportS3Bucket); + } + if (data.statusReportS3Key !== undefined && data.statusReportS3Key !== null) { + contents.statusReportS3Key = __expectString(data.statusReportS3Key); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetImportFileTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetPortfolioPreferencesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetPortfolioPreferencesCommandError(output, context); + } + const contents: GetPortfolioPreferencesCommandOutput = { + $metadata: deserializeMetadata(output), + applicationPreferences: undefined, + databasePreferences: undefined, + prioritizeBusinessGoals: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.applicationPreferences !== undefined && data.applicationPreferences !== null) { + contents.applicationPreferences = deserializeAws_restJson1ApplicationPreferences( + data.applicationPreferences, + context + ); + } + if (data.databasePreferences !== undefined && data.databasePreferences !== null) { + contents.databasePreferences = deserializeAws_restJson1DatabasePreferences(data.databasePreferences, context); + } + if (data.prioritizeBusinessGoals !== undefined && data.prioritizeBusinessGoals !== null) { + contents.prioritizeBusinessGoals = deserializeAws_restJson1PrioritizeBusinessGoals( + data.prioritizeBusinessGoals, + context + ); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetPortfolioPreferencesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetPortfolioSummaryCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetPortfolioSummaryCommandError(output, context); + } + const contents: GetPortfolioSummaryCommandOutput = { + $metadata: deserializeMetadata(output), + assessmentSummary: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.assessmentSummary !== undefined && data.assessmentSummary !== null) { + contents.assessmentSummary = deserializeAws_restJson1AssessmentSummary(data.assessmentSummary, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetPortfolioSummaryCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetRecommendationReportDetailsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetRecommendationReportDetailsCommandError(output, context); + } + const contents: GetRecommendationReportDetailsCommandOutput = { + $metadata: deserializeMetadata(output), + id: undefined, + recommendationReportDetails: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.id !== undefined && data.id !== null) { + contents.id = __expectString(data.id); + } + if (data.recommendationReportDetails !== undefined && data.recommendationReportDetails !== null) { + contents.recommendationReportDetails = deserializeAws_restJson1RecommendationReportDetails( + data.recommendationReportDetails, + context + ); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetRecommendationReportDetailsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetServerDetailsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetServerDetailsCommandError(output, context); + } + const contents: GetServerDetailsCommandOutput = { + $metadata: deserializeMetadata(output), + associatedApplications: undefined, + nextToken: undefined, + serverDetail: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.associatedApplications !== undefined && data.associatedApplications !== null) { + contents.associatedApplications = deserializeAws_restJson1AssociatedApplications( + data.associatedApplications, + context + ); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + if (data.serverDetail !== undefined && data.serverDetail !== null) { + contents.serverDetail = deserializeAws_restJson1ServerDetail(data.serverDetail, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetServerDetailsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetServerStrategiesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetServerStrategiesCommandError(output, context); + } + const contents: GetServerStrategiesCommandOutput = { + $metadata: deserializeMetadata(output), + serverStrategies: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.serverStrategies !== undefined && data.serverStrategies !== null) { + contents.serverStrategies = deserializeAws_restJson1ServerStrategies(data.serverStrategies, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetServerStrategiesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListApplicationComponentsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListApplicationComponentsCommandError(output, context); + } + const contents: ListApplicationComponentsCommandOutput = { + $metadata: deserializeMetadata(output), + applicationComponentInfos: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.applicationComponentInfos !== undefined && data.applicationComponentInfos !== null) { + contents.applicationComponentInfos = deserializeAws_restJson1ApplicationComponentDetails( + data.applicationComponentInfos, + context + ); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListApplicationComponentsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceLinkedRoleLockClientException": + case "com.amazonaws.migrationhubstrategy#ServiceLinkedRoleLockClientException": + response = { + ...(await deserializeAws_restJson1ServiceLinkedRoleLockClientExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListCollectorsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListCollectorsCommandError(output, context); + } + const contents: ListCollectorsCommandOutput = { + $metadata: deserializeMetadata(output), + Collectors: undefined, + nextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Collectors !== undefined && data.Collectors !== null) { + contents.Collectors = deserializeAws_restJson1Collectors(data.Collectors, context); + } + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListCollectorsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListImportFileTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListImportFileTaskCommandError(output, context); + } + const contents: ListImportFileTaskCommandOutput = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + taskInfos: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + if (data.taskInfos !== undefined && data.taskInfos !== null) { + contents.taskInfos = deserializeAws_restJson1ListImportFileTaskInformation(data.taskInfos, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListImportFileTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListServersCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListServersCommandError(output, context); + } + const contents: ListServersCommandOutput = { + $metadata: deserializeMetadata(output), + nextToken: undefined, + serverInfos: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.nextToken !== undefined && data.nextToken !== null) { + contents.nextToken = __expectString(data.nextToken); + } + if (data.serverInfos !== undefined && data.serverInfos !== null) { + contents.serverInfos = deserializeAws_restJson1ServerDetails(data.serverInfos, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListServersCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1PutPortfolioPreferencesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1PutPortfolioPreferencesCommandError(output, context); + } + const contents: PutPortfolioPreferencesCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1PutPortfolioPreferencesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.migrationhubstrategy#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartAssessmentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartAssessmentCommandError(output, context); + } + const contents: StartAssessmentCommandOutput = { + $metadata: deserializeMetadata(output), + assessmentId: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.assessmentId !== undefined && data.assessmentId !== null) { + contents.assessmentId = __expectString(data.assessmentId); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartAssessmentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartImportFileTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartImportFileTaskCommandError(output, context); + } + const contents: StartImportFileTaskCommandOutput = { + $metadata: deserializeMetadata(output), + id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.id !== undefined && data.id !== null) { + contents.id = __expectString(data.id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartImportFileTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartRecommendationReportGenerationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartRecommendationReportGenerationCommandError(output, context); + } + const contents: StartRecommendationReportGenerationCommandOutput = { + $metadata: deserializeMetadata(output), + id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.id !== undefined && data.id !== null) { + contents.id = __expectString(data.id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartRecommendationReportGenerationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.migrationhubstrategy#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StopAssessmentCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StopAssessmentCommandError(output, context); + } + const contents: StopAssessmentCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StopAssessmentCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.migrationhubstrategy#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateApplicationComponentConfigCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateApplicationComponentConfigCommandError(output, context); + } + const contents: UpdateApplicationComponentConfigCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateApplicationComponentConfigCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateServerConfigCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateServerConfigCommandError(output, context); + } + const contents: UpdateServerConfigCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateServerConfigCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.migrationhubstrategy#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.migrationhubstrategy#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.migrationhubstrategy#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +const deserializeAws_restJson1AccessDeniedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: AccessDeniedException = { + name: "AccessDeniedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ConflictExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ConflictException = { + name: "ConflictException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1InternalServerExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: InternalServerException = { + name: "InternalServerException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ResourceNotFoundException = { + name: "ResourceNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ServiceLinkedRoleLockClientExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ServiceLinkedRoleLockClientException = { + name: "ServiceLinkedRoleLockClientException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ServiceQuotaExceededException = { + name: "ServiceQuotaExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ThrottlingExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ThrottlingException = { + name: "ThrottlingException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const deserializeAws_restJson1ValidationExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ValidationException = { + name: "ValidationException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + message: undefined, + }; + const data: any = parsedOutput.body; + if (data.message !== undefined && data.message !== null) { + contents.message = __expectString(data.message); + } + return contents; +}; + +const serializeAws_restJson1ApplicationPreferences = (input: ApplicationPreferences, context: __SerdeContext): any => { + return { + ...(input.managementPreference !== undefined && + input.managementPreference !== null && { + managementPreference: serializeAws_restJson1ManagementPreference(input.managementPreference, context), + }), + }; +}; + +const serializeAws_restJson1AwsManagedResources = (input: AwsManagedResources, context: __SerdeContext): any => { + return { + ...(input.targetDestination !== undefined && + input.targetDestination !== null && { + targetDestination: serializeAws_restJson1AwsManagedTargetDestinations(input.targetDestination, context), + }), + }; +}; + +const serializeAws_restJson1AwsManagedTargetDestinations = ( + input: (AwsManagedTargetDestination | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1BusinessGoals = (input: BusinessGoals, context: __SerdeContext): any => { + return { + ...(input.licenseCostReduction !== undefined && + input.licenseCostReduction !== null && { licenseCostReduction: input.licenseCostReduction }), + ...(input.modernizeInfrastructureWithCloudNativeTechnologies !== undefined && + input.modernizeInfrastructureWithCloudNativeTechnologies !== null && { + modernizeInfrastructureWithCloudNativeTechnologies: input.modernizeInfrastructureWithCloudNativeTechnologies, + }), + ...(input.reduceOperationalOverheadWithManagedServices !== undefined && + input.reduceOperationalOverheadWithManagedServices !== null && { + reduceOperationalOverheadWithManagedServices: input.reduceOperationalOverheadWithManagedServices, + }), + ...(input.speedOfMigration !== undefined && + input.speedOfMigration !== null && { speedOfMigration: input.speedOfMigration }), + }; +}; + +const serializeAws_restJson1DatabaseMigrationPreference = ( + input: DatabaseMigrationPreference, + context: __SerdeContext +): any => { + return DatabaseMigrationPreference.visit(input, { + heterogeneous: (value) => ({ heterogeneous: serializeAws_restJson1Heterogeneous(value, context) }), + homogeneous: (value) => ({ homogeneous: serializeAws_restJson1Homogeneous(value, context) }), + noPreference: (value) => ({ noPreference: serializeAws_restJson1NoDatabaseMigrationPreference(value, context) }), + _: (name, value) => ({ name: value } as any), + }); +}; + +const serializeAws_restJson1DatabasePreferences = (input: DatabasePreferences, context: __SerdeContext): any => { + return { + ...(input.databaseManagementPreference !== undefined && + input.databaseManagementPreference !== null && { + databaseManagementPreference: input.databaseManagementPreference, + }), + ...(input.databaseMigrationPreference !== undefined && + input.databaseMigrationPreference !== null && { + databaseMigrationPreference: serializeAws_restJson1DatabaseMigrationPreference( + input.databaseMigrationPreference, + context + ), + }), + }; +}; + +const serializeAws_restJson1Group = (input: Group, context: __SerdeContext): any => { + return { + ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.value !== undefined && input.value !== null && { value: input.value }), + }; +}; + +const serializeAws_restJson1GroupIds = (input: Group[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_restJson1Group(entry, context); + }); +}; + +const serializeAws_restJson1Heterogeneous = (input: Heterogeneous, context: __SerdeContext): any => { + return { + ...(input.targetDatabaseEngine !== undefined && + input.targetDatabaseEngine !== null && { + targetDatabaseEngine: serializeAws_restJson1HeterogeneousTargetDatabaseEngines( + input.targetDatabaseEngine, + context + ), + }), + }; +}; + +const serializeAws_restJson1HeterogeneousTargetDatabaseEngines = ( + input: (HeterogeneousTargetDatabaseEngine | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1Homogeneous = (input: Homogeneous, context: __SerdeContext): any => { + return { + ...(input.targetDatabaseEngine !== undefined && + input.targetDatabaseEngine !== null && { + targetDatabaseEngine: serializeAws_restJson1HomogeneousTargetDatabaseEngines( + input.targetDatabaseEngine, + context + ), + }), + }; +}; + +const serializeAws_restJson1HomogeneousTargetDatabaseEngines = ( + input: (HomogeneousTargetDatabaseEngine | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1ManagementPreference = (input: ManagementPreference, context: __SerdeContext): any => { + return ManagementPreference.visit(input, { + awsManagedResources: (value) => ({ + awsManagedResources: serializeAws_restJson1AwsManagedResources(value, context), + }), + noPreference: (value) => ({ noPreference: serializeAws_restJson1NoManagementPreference(value, context) }), + selfManageResources: (value) => ({ + selfManageResources: serializeAws_restJson1SelfManageResources(value, context), + }), + _: (name, value) => ({ name: value } as any), + }); +}; + +const serializeAws_restJson1NoDatabaseMigrationPreference = ( + input: NoDatabaseMigrationPreference, + context: __SerdeContext +): any => { + return { + ...(input.targetDatabaseEngine !== undefined && + input.targetDatabaseEngine !== null && { + targetDatabaseEngine: serializeAws_restJson1TargetDatabaseEngines(input.targetDatabaseEngine, context), + }), + }; +}; + +const serializeAws_restJson1NoManagementPreference = (input: NoManagementPreference, context: __SerdeContext): any => { + return { + ...(input.targetDestination !== undefined && + input.targetDestination !== null && { + targetDestination: serializeAws_restJson1NoPreferenceTargetDestinations(input.targetDestination, context), + }), + }; +}; + +const serializeAws_restJson1NoPreferenceTargetDestinations = ( + input: (NoPreferenceTargetDestination | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1PrioritizeBusinessGoals = ( + input: PrioritizeBusinessGoals, + context: __SerdeContext +): any => { + return { + ...(input.businessGoals !== undefined && + input.businessGoals !== null && { + businessGoals: serializeAws_restJson1BusinessGoals(input.businessGoals, context), + }), + }; +}; + +const serializeAws_restJson1SelfManageResources = (input: SelfManageResources, context: __SerdeContext): any => { + return { + ...(input.targetDestination !== undefined && + input.targetDestination !== null && { + targetDestination: serializeAws_restJson1SelfManageTargetDestinations(input.targetDestination, context), + }), + }; +}; + +const serializeAws_restJson1SelfManageTargetDestinations = ( + input: (SelfManageTargetDestination | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1SourceCode = (input: SourceCode, context: __SerdeContext): any => { + return { + ...(input.location !== undefined && input.location !== null && { location: input.location }), + ...(input.sourceVersion !== undefined && input.sourceVersion !== null && { sourceVersion: input.sourceVersion }), + ...(input.versionControl !== undefined && + input.versionControl !== null && { versionControl: input.versionControl }), + }; +}; + +const serializeAws_restJson1SourceCodeList = (input: SourceCode[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_restJson1SourceCode(entry, context); + }); +}; + +const serializeAws_restJson1StrategyOption = (input: StrategyOption, context: __SerdeContext): any => { + return { + ...(input.isPreferred !== undefined && input.isPreferred !== null && { isPreferred: input.isPreferred }), + ...(input.strategy !== undefined && input.strategy !== null && { strategy: input.strategy }), + ...(input.targetDestination !== undefined && + input.targetDestination !== null && { targetDestination: input.targetDestination }), + ...(input.toolName !== undefined && input.toolName !== null && { toolName: input.toolName }), + }; +}; + +const serializeAws_restJson1TargetDatabaseEngines = ( + input: (TargetDatabaseEngine | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const deserializeAws_restJson1AntipatternSeveritySummary = ( + output: any, + context: __SerdeContext +): AntipatternSeveritySummary => { + return { + count: __expectInt32(output.count), + severity: __expectString(output.severity), + } as any; +}; + +const deserializeAws_restJson1ApplicationComponentDetail = ( + output: any, + context: __SerdeContext +): ApplicationComponentDetail => { + return { + analysisStatus: __expectString(output.analysisStatus), + antipatternReportS3Object: + output.antipatternReportS3Object !== undefined && output.antipatternReportS3Object !== null + ? deserializeAws_restJson1S3Object(output.antipatternReportS3Object, context) + : undefined, + antipatternReportStatus: __expectString(output.antipatternReportStatus), + antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage), + appType: __expectString(output.appType), + associatedServerId: __expectString(output.associatedServerId), + databaseConfigDetail: + output.databaseConfigDetail !== undefined && output.databaseConfigDetail !== null + ? deserializeAws_restJson1DatabaseConfigDetail(output.databaseConfigDetail, context) + : undefined, + id: __expectString(output.id), + inclusionStatus: __expectString(output.inclusionStatus), + lastAnalyzedTimestamp: + output.lastAnalyzedTimestamp !== undefined && output.lastAnalyzedTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAnalyzedTimestamp))) + : undefined, + listAntipatternSeveritySummary: + output.listAntipatternSeveritySummary !== undefined && output.listAntipatternSeveritySummary !== null + ? deserializeAws_restJson1ListAntipatternSeveritySummary(output.listAntipatternSeveritySummary, context) + : undefined, + moreServerAssociationExists: __expectBoolean(output.moreServerAssociationExists), + name: __expectString(output.name), + osDriver: __expectString(output.osDriver), + osVersion: __expectString(output.osVersion), + recommendationSet: + output.recommendationSet !== undefined && output.recommendationSet !== null + ? deserializeAws_restJson1RecommendationSet(output.recommendationSet, context) + : undefined, + resourceSubType: __expectString(output.resourceSubType), + sourceCodeRepositories: + output.sourceCodeRepositories !== undefined && output.sourceCodeRepositories !== null + ? deserializeAws_restJson1SourceCodeRepositories(output.sourceCodeRepositories, context) + : undefined, + statusMessage: __expectString(output.statusMessage), + } as any; +}; + +const deserializeAws_restJson1ApplicationComponentDetails = ( + output: any, + context: __SerdeContext +): ApplicationComponentDetail[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ApplicationComponentDetail(entry, context); + }); +}; + +const deserializeAws_restJson1ApplicationComponentStrategies = ( + output: any, + context: __SerdeContext +): ApplicationComponentStrategy[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ApplicationComponentStrategy(entry, context); + }); +}; + +const deserializeAws_restJson1ApplicationComponentStrategy = ( + output: any, + context: __SerdeContext +): ApplicationComponentStrategy => { + return { + isPreferred: __expectBoolean(output.isPreferred), + recommendation: + output.recommendation !== undefined && output.recommendation !== null + ? deserializeAws_restJson1RecommendationSet(output.recommendation, context) + : undefined, + status: __expectString(output.status), + } as any; +}; + +const deserializeAws_restJson1ApplicationComponentSummary = ( + output: any, + context: __SerdeContext +): ApplicationComponentSummary => { + return { + appType: __expectString(output.appType), + count: __expectInt32(output.count), + } as any; +}; + +const deserializeAws_restJson1ApplicationPreferences = ( + output: any, + context: __SerdeContext +): ApplicationPreferences => { + return { + managementPreference: + output.managementPreference !== undefined && output.managementPreference !== null + ? deserializeAws_restJson1ManagementPreference(__expectUnion(output.managementPreference), context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1AssessmentSummary = (output: any, context: __SerdeContext): AssessmentSummary => { + return { + antipatternReportS3Object: + output.antipatternReportS3Object !== undefined && output.antipatternReportS3Object !== null + ? deserializeAws_restJson1S3Object(output.antipatternReportS3Object, context) + : undefined, + antipatternReportStatus: __expectString(output.antipatternReportStatus), + antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage), + lastAnalyzedTimestamp: + output.lastAnalyzedTimestamp !== undefined && output.lastAnalyzedTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAnalyzedTimestamp))) + : undefined, + listAntipatternSeveritySummary: + output.listAntipatternSeveritySummary !== undefined && output.listAntipatternSeveritySummary !== null + ? deserializeAws_restJson1ListAntipatternSeveritySummary(output.listAntipatternSeveritySummary, context) + : undefined, + listApplicationComponentStrategySummary: + output.listApplicationComponentStrategySummary !== undefined && + output.listApplicationComponentStrategySummary !== null + ? deserializeAws_restJson1ListStrategySummary(output.listApplicationComponentStrategySummary, context) + : undefined, + listApplicationComponentSummary: + output.listApplicationComponentSummary !== undefined && output.listApplicationComponentSummary !== null + ? deserializeAws_restJson1ListApplicationComponentSummary(output.listApplicationComponentSummary, context) + : undefined, + listServerStrategySummary: + output.listServerStrategySummary !== undefined && output.listServerStrategySummary !== null + ? deserializeAws_restJson1ListStrategySummary(output.listServerStrategySummary, context) + : undefined, + listServerSummary: + output.listServerSummary !== undefined && output.listServerSummary !== null + ? deserializeAws_restJson1ListServerSummary(output.listServerSummary, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1AssociatedApplication = (output: any, context: __SerdeContext): AssociatedApplication => { + return { + id: __expectString(output.id), + name: __expectString(output.name), + } as any; +}; + +const deserializeAws_restJson1AssociatedApplications = ( + output: any, + context: __SerdeContext +): AssociatedApplication[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1AssociatedApplication(entry, context); + }); +}; + +const deserializeAws_restJson1AssociatedServerIDs = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1AwsManagedResources = (output: any, context: __SerdeContext): AwsManagedResources => { + return { + targetDestination: + output.targetDestination !== undefined && output.targetDestination !== null + ? deserializeAws_restJson1AwsManagedTargetDestinations(output.targetDestination, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1AwsManagedTargetDestinations = ( + output: any, + context: __SerdeContext +): (AwsManagedTargetDestination | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1BusinessGoals = (output: any, context: __SerdeContext): BusinessGoals => { + return { + licenseCostReduction: __expectInt32(output.licenseCostReduction), + modernizeInfrastructureWithCloudNativeTechnologies: __expectInt32( + output.modernizeInfrastructureWithCloudNativeTechnologies + ), + reduceOperationalOverheadWithManagedServices: __expectInt32(output.reduceOperationalOverheadWithManagedServices), + speedOfMigration: __expectInt32(output.speedOfMigration), + } as any; +}; + +const deserializeAws_restJson1Collector = (output: any, context: __SerdeContext): Collector => { + return { + collectorHealth: __expectString(output.collectorHealth), + collectorId: __expectString(output.collectorId), + collectorVersion: __expectString(output.collectorVersion), + hostName: __expectString(output.hostName), + ipAddress: __expectString(output.ipAddress), + lastActivityTimeStamp: __expectString(output.lastActivityTimeStamp), + registeredTimeStamp: __expectString(output.registeredTimeStamp), + } as any; +}; + +const deserializeAws_restJson1Collectors = (output: any, context: __SerdeContext): Collector[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1Collector(entry, context); + }); +}; + +const deserializeAws_restJson1DatabaseConfigDetail = (output: any, context: __SerdeContext): DatabaseConfigDetail => { + return { + secretName: __expectString(output.secretName), + } as any; +}; + +const deserializeAws_restJson1DatabaseMigrationPreference = ( + output: any, + context: __SerdeContext +): DatabaseMigrationPreference => { + if (output.heterogeneous !== undefined && output.heterogeneous !== null) { + return { + heterogeneous: deserializeAws_restJson1Heterogeneous(output.heterogeneous, context), + }; + } + if (output.homogeneous !== undefined && output.homogeneous !== null) { + return { + homogeneous: deserializeAws_restJson1Homogeneous(output.homogeneous, context), + }; + } + if (output.noPreference !== undefined && output.noPreference !== null) { + return { + noPreference: deserializeAws_restJson1NoDatabaseMigrationPreference(output.noPreference, context), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +const deserializeAws_restJson1DatabasePreferences = (output: any, context: __SerdeContext): DatabasePreferences => { + return { + databaseManagementPreference: __expectString(output.databaseManagementPreference), + databaseMigrationPreference: + output.databaseMigrationPreference !== undefined && output.databaseMigrationPreference !== null + ? deserializeAws_restJson1DatabaseMigrationPreference( + __expectUnion(output.databaseMigrationPreference), + context + ) + : undefined, + } as any; +}; + +const deserializeAws_restJson1DataCollectionDetails = (output: any, context: __SerdeContext): DataCollectionDetails => { + return { + completionTime: + output.completionTime !== undefined && output.completionTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime))) + : undefined, + failed: __expectInt32(output.failed), + inProgress: __expectInt32(output.inProgress), + servers: __expectInt32(output.servers), + startTime: + output.startTime !== undefined && output.startTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) + : undefined, + status: __expectString(output.status), + success: __expectInt32(output.success), + } as any; +}; + +const deserializeAws_restJson1Heterogeneous = (output: any, context: __SerdeContext): Heterogeneous => { + return { + targetDatabaseEngine: + output.targetDatabaseEngine !== undefined && output.targetDatabaseEngine !== null + ? deserializeAws_restJson1HeterogeneousTargetDatabaseEngines(output.targetDatabaseEngine, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1HeterogeneousTargetDatabaseEngines = ( + output: any, + context: __SerdeContext +): (HeterogeneousTargetDatabaseEngine | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1Homogeneous = (output: any, context: __SerdeContext): Homogeneous => { + return { + targetDatabaseEngine: + output.targetDatabaseEngine !== undefined && output.targetDatabaseEngine !== null + ? deserializeAws_restJson1HomogeneousTargetDatabaseEngines(output.targetDatabaseEngine, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1HomogeneousTargetDatabaseEngines = ( + output: any, + context: __SerdeContext +): (HomogeneousTargetDatabaseEngine | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1ImportFileTaskInformation = ( + output: any, + context: __SerdeContext +): ImportFileTaskInformation => { + return { + completionTime: + output.completionTime !== undefined && output.completionTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime))) + : undefined, + id: __expectString(output.id), + importName: __expectString(output.importName), + inputS3Bucket: __expectString(output.inputS3Bucket), + inputS3Key: __expectString(output.inputS3Key), + numberOfRecordsFailed: __expectInt32(output.numberOfRecordsFailed), + numberOfRecordsSuccess: __expectInt32(output.numberOfRecordsSuccess), + startTime: + output.startTime !== undefined && output.startTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) + : undefined, + status: __expectString(output.status), + statusReportS3Bucket: __expectString(output.statusReportS3Bucket), + statusReportS3Key: __expectString(output.statusReportS3Key), + } as any; +}; + +const deserializeAws_restJson1ListAntipatternSeveritySummary = ( + output: any, + context: __SerdeContext +): AntipatternSeveritySummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1AntipatternSeveritySummary(entry, context); + }); +}; + +const deserializeAws_restJson1ListApplicationComponentSummary = ( + output: any, + context: __SerdeContext +): ApplicationComponentSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ApplicationComponentSummary(entry, context); + }); +}; + +const deserializeAws_restJson1ListImportFileTaskInformation = ( + output: any, + context: __SerdeContext +): ImportFileTaskInformation[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ImportFileTaskInformation(entry, context); + }); +}; + +const deserializeAws_restJson1ListServerSummary = (output: any, context: __SerdeContext): ServerSummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ServerSummary(entry, context); + }); +}; + +const deserializeAws_restJson1ListStrategySummary = (output: any, context: __SerdeContext): StrategySummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1StrategySummary(entry, context); + }); +}; + +const deserializeAws_restJson1ManagementPreference = (output: any, context: __SerdeContext): ManagementPreference => { + if (output.awsManagedResources !== undefined && output.awsManagedResources !== null) { + return { + awsManagedResources: deserializeAws_restJson1AwsManagedResources(output.awsManagedResources, context), + }; + } + if (output.noPreference !== undefined && output.noPreference !== null) { + return { + noPreference: deserializeAws_restJson1NoManagementPreference(output.noPreference, context), + }; + } + if (output.selfManageResources !== undefined && output.selfManageResources !== null) { + return { + selfManageResources: deserializeAws_restJson1SelfManageResources(output.selfManageResources, context), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +const deserializeAws_restJson1NetworkInfo = (output: any, context: __SerdeContext): NetworkInfo => { + return { + interfaceName: __expectString(output.interfaceName), + ipAddress: __expectString(output.ipAddress), + macAddress: __expectString(output.macAddress), + netMask: __expectString(output.netMask), + } as any; +}; + +const deserializeAws_restJson1NetworkInfoList = (output: any, context: __SerdeContext): NetworkInfo[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1NetworkInfo(entry, context); + }); +}; + +const deserializeAws_restJson1NoDatabaseMigrationPreference = ( + output: any, + context: __SerdeContext +): NoDatabaseMigrationPreference => { + return { + targetDatabaseEngine: + output.targetDatabaseEngine !== undefined && output.targetDatabaseEngine !== null + ? deserializeAws_restJson1TargetDatabaseEngines(output.targetDatabaseEngine, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1NoManagementPreference = ( + output: any, + context: __SerdeContext +): NoManagementPreference => { + return { + targetDestination: + output.targetDestination !== undefined && output.targetDestination !== null + ? deserializeAws_restJson1NoPreferenceTargetDestinations(output.targetDestination, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1NoPreferenceTargetDestinations = ( + output: any, + context: __SerdeContext +): (NoPreferenceTargetDestination | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1OSInfo = (output: any, context: __SerdeContext): OSInfo => { + return { + type: __expectString(output.type), + version: __expectString(output.version), + } as any; +}; + +const deserializeAws_restJson1PrioritizeBusinessGoals = ( + output: any, + context: __SerdeContext +): PrioritizeBusinessGoals => { + return { + businessGoals: + output.businessGoals !== undefined && output.businessGoals !== null + ? deserializeAws_restJson1BusinessGoals(output.businessGoals, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1RecommendationReportDetails = ( + output: any, + context: __SerdeContext +): RecommendationReportDetails => { + return { + completionTime: + output.completionTime !== undefined && output.completionTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime))) + : undefined, + s3Bucket: __expectString(output.s3Bucket), + s3Keys: + output.s3Keys !== undefined && output.s3Keys !== null + ? deserializeAws_restJson1S3Keys(output.s3Keys, context) + : undefined, + startTime: + output.startTime !== undefined && output.startTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) + : undefined, + status: __expectString(output.status), + statusMessage: __expectString(output.statusMessage), + } as any; +}; + +const deserializeAws_restJson1RecommendationSet = (output: any, context: __SerdeContext): RecommendationSet => { + return { + strategy: __expectString(output.strategy), + targetDestination: __expectString(output.targetDestination), + transformationTool: + output.transformationTool !== undefined && output.transformationTool !== null + ? deserializeAws_restJson1TransformationTool(output.transformationTool, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1S3Keys = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1S3Object = (output: any, context: __SerdeContext): S3Object => { + return { + s3Bucket: __expectString(output.s3Bucket), + s3key: __expectString(output.s3key), + } as any; +}; + +const deserializeAws_restJson1SelfManageResources = (output: any, context: __SerdeContext): SelfManageResources => { + return { + targetDestination: + output.targetDestination !== undefined && output.targetDestination !== null + ? deserializeAws_restJson1SelfManageTargetDestinations(output.targetDestination, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1SelfManageTargetDestinations = ( + output: any, + context: __SerdeContext +): (SelfManageTargetDestination | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1ServerDetail = (output: any, context: __SerdeContext): ServerDetail => { + return { + antipatternReportS3Object: + output.antipatternReportS3Object !== undefined && output.antipatternReportS3Object !== null + ? deserializeAws_restJson1S3Object(output.antipatternReportS3Object, context) + : undefined, + antipatternReportStatus: __expectString(output.antipatternReportStatus), + antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage), + applicationComponentStrategySummary: + output.applicationComponentStrategySummary !== undefined && output.applicationComponentStrategySummary !== null + ? deserializeAws_restJson1ListStrategySummary(output.applicationComponentStrategySummary, context) + : undefined, + dataCollectionStatus: __expectString(output.dataCollectionStatus), + id: __expectString(output.id), + lastAnalyzedTimestamp: + output.lastAnalyzedTimestamp !== undefined && output.lastAnalyzedTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAnalyzedTimestamp))) + : undefined, + listAntipatternSeveritySummary: + output.listAntipatternSeveritySummary !== undefined && output.listAntipatternSeveritySummary !== null + ? deserializeAws_restJson1ListAntipatternSeveritySummary(output.listAntipatternSeveritySummary, context) + : undefined, + name: __expectString(output.name), + recommendationSet: + output.recommendationSet !== undefined && output.recommendationSet !== null + ? deserializeAws_restJson1RecommendationSet(output.recommendationSet, context) + : undefined, + serverType: __expectString(output.serverType), + statusMessage: __expectString(output.statusMessage), + systemInfo: + output.systemInfo !== undefined && output.systemInfo !== null + ? deserializeAws_restJson1SystemInfo(output.systemInfo, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1ServerDetails = (output: any, context: __SerdeContext): ServerDetail[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ServerDetail(entry, context); + }); +}; + +const deserializeAws_restJson1ServerStrategies = (output: any, context: __SerdeContext): ServerStrategy[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ServerStrategy(entry, context); + }); +}; + +const deserializeAws_restJson1ServerStrategy = (output: any, context: __SerdeContext): ServerStrategy => { + return { + isPreferred: __expectBoolean(output.isPreferred), + numberOfApplicationComponents: __expectInt32(output.numberOfApplicationComponents), + recommendation: + output.recommendation !== undefined && output.recommendation !== null + ? deserializeAws_restJson1RecommendationSet(output.recommendation, context) + : undefined, + status: __expectString(output.status), + } as any; +}; + +const deserializeAws_restJson1ServerSummary = (output: any, context: __SerdeContext): ServerSummary => { + return { + ServerOsType: __expectString(output.ServerOsType), + count: __expectInt32(output.count), + } as any; +}; + +const deserializeAws_restJson1SourceCodeRepositories = ( + output: any, + context: __SerdeContext +): SourceCodeRepository[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1SourceCodeRepository(entry, context); + }); +}; + +const deserializeAws_restJson1SourceCodeRepository = (output: any, context: __SerdeContext): SourceCodeRepository => { + return { + branch: __expectString(output.branch), + repository: __expectString(output.repository), + versionControlType: __expectString(output.versionControlType), + } as any; +}; + +const deserializeAws_restJson1StrategySummary = (output: any, context: __SerdeContext): StrategySummary => { + return { + count: __expectInt32(output.count), + strategy: __expectString(output.strategy), + } as any; +}; + +const deserializeAws_restJson1SystemInfo = (output: any, context: __SerdeContext): SystemInfo => { + return { + cpuArchitecture: __expectString(output.cpuArchitecture), + fileSystemType: __expectString(output.fileSystemType), + networkInfoList: + output.networkInfoList !== undefined && output.networkInfoList !== null + ? deserializeAws_restJson1NetworkInfoList(output.networkInfoList, context) + : undefined, + osInfo: + output.osInfo !== undefined && output.osInfo !== null + ? deserializeAws_restJson1OSInfo(output.osInfo, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1TargetDatabaseEngines = ( + output: any, + context: __SerdeContext +): (TargetDatabaseEngine | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restJson1TransformationTool = (output: any, context: __SerdeContext): TransformationTool => { + return { + description: __expectString(output.description), + name: __expectString(output.name), + tranformationToolInstallationLink: __expectString(output.tranformationToolInstallationLink), + } as any; +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const isSerializableHeaderValue = (value: any): boolean => + value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string): string => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + + return ""; +}; diff --git a/clients/client-migrationhubstrategy/src/runtimeConfig.browser.ts b/clients/client-migrationhubstrategy/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..578e51aded64 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; +import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; +import { invalidProvider } from "@aws-sdk/invalid-dependency"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; +import { MigrationHubStrategyClientConfig } from "./MigrationHubStrategyClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: MigrationHubStrategyClientConfig) => { + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new FetchHttpHandler(), + retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-migrationhubstrategy/src/runtimeConfig.native.ts b/clients/client-migrationhubstrategy/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..8cc5a9265caa --- /dev/null +++ b/clients/client-migrationhubstrategy/src/runtimeConfig.native.ts @@ -0,0 +1,17 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { MigrationHubStrategyClientConfig } from "./MigrationHubStrategyClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: MigrationHubStrategyClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-migrationhubstrategy/src/runtimeConfig.shared.ts b/clients/client-migrationhubstrategy/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..518d4858809d --- /dev/null +++ b/clients/client-migrationhubstrategy/src/runtimeConfig.shared.ts @@ -0,0 +1,17 @@ +import { Logger as __Logger } from "@aws-sdk/types"; +import { parseUrl } from "@aws-sdk/url-parser"; + +import { defaultRegionInfoProvider } from "./endpoints"; +import { MigrationHubStrategyClientConfig } from "./MigrationHubStrategyClient"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: MigrationHubStrategyClientConfig) => ({ + apiVersion: "2020-02-19", + disableHostPrefix: config?.disableHostPrefix ?? false, + logger: config?.logger ?? ({} as __Logger), + regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider, + serviceId: config?.serviceId ?? "MigrationHubStrategy", + urlParser: config?.urlParser ?? parseUrl, +}); diff --git a/clients/client-migrationhubstrategy/src/runtimeConfig.ts b/clients/client-migrationhubstrategy/src/runtimeConfig.ts new file mode 100644 index 000000000000..26e60a98e1f8 --- /dev/null +++ b/clients/client-migrationhubstrategy/src/runtimeConfig.ts @@ -0,0 +1,53 @@ +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { Hash } from "@aws-sdk/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; +import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; +import { MigrationHubStrategyClientConfig } from "./MigrationHubStrategyClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: MigrationHubStrategyClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new NodeHttpHandler(), + retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-migrationhubstrategy/tsconfig.es.json b/clients/client-migrationhubstrategy/tsconfig.es.json new file mode 100644 index 000000000000..4c72364cd1a0 --- /dev/null +++ b/clients/client-migrationhubstrategy/tsconfig.es.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], + "outDir": "dist-es" + } +} diff --git a/clients/client-migrationhubstrategy/tsconfig.json b/clients/client-migrationhubstrategy/tsconfig.json new file mode 100644 index 000000000000..093039289c53 --- /dev/null +++ b/clients/client-migrationhubstrategy/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "alwaysStrict": true, + "target": "ES2018", + "module": "commonjs", + "strict": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "outDir": "dist-cjs", + "removeComments": true + }, + "typedocOptions": { + "exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"], + "excludeNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "includeDeclarations": true, + "stripInternal": true, + "readme": "README.md", + "mode": "file", + "out": "docs", + "theme": "minimal", + "plugin": ["@aws-sdk/service-client-documentation-generator"] + }, + "exclude": ["test/**/*"] +} diff --git a/clients/client-migrationhubstrategy/tsconfig.types.json b/clients/client-migrationhubstrategy/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-migrationhubstrategy/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-redshift-data/src/RedshiftData.ts b/clients/client-redshift-data/src/RedshiftData.ts index c7dc3f4411fe..0a2187513ddd 100644 --- a/clients/client-redshift-data/src/RedshiftData.ts +++ b/clients/client-redshift-data/src/RedshiftData.ts @@ -59,13 +59,13 @@ export class RedshiftData extends RedshiftDataClient { * method, use one of the following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      */ @@ -172,13 +172,13 @@ export class RedshiftData extends RedshiftDataClient { * following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the database - * user name. Permission to call the redshift:GetClusterCredentials operation is - * required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      */ @@ -218,13 +218,13 @@ export class RedshiftData extends RedshiftDataClient { * method, use one of the following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      */ @@ -297,13 +297,13 @@ export class RedshiftData extends RedshiftDataClient { * following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      */ @@ -343,13 +343,13 @@ export class RedshiftData extends RedshiftDataClient { * following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      */ @@ -417,13 +417,13 @@ export class RedshiftData extends RedshiftDataClient { * following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      */ diff --git a/clients/client-redshift-data/src/commands/BatchExecuteStatementCommand.ts b/clients/client-redshift-data/src/commands/BatchExecuteStatementCommand.ts index 3b38d4788b3d..122dc26f8c99 100644 --- a/clients/client-redshift-data/src/commands/BatchExecuteStatementCommand.ts +++ b/clients/client-redshift-data/src/commands/BatchExecuteStatementCommand.ts @@ -28,13 +28,13 @@ export interface BatchExecuteStatementCommandOutput extends BatchExecuteStatemen * method, use one of the following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      * @example diff --git a/clients/client-redshift-data/src/commands/DescribeTableCommand.ts b/clients/client-redshift-data/src/commands/DescribeTableCommand.ts index 8f8e2c68aa7d..c19def1d0f92 100644 --- a/clients/client-redshift-data/src/commands/DescribeTableCommand.ts +++ b/clients/client-redshift-data/src/commands/DescribeTableCommand.ts @@ -29,13 +29,13 @@ export interface DescribeTableCommandOutput extends DescribeTableResponse, __Met * following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the database - * user name. Permission to call the redshift:GetClusterCredentials operation is - * required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      * @example diff --git a/clients/client-redshift-data/src/commands/ExecuteStatementCommand.ts b/clients/client-redshift-data/src/commands/ExecuteStatementCommand.ts index c595c453da37..748b53396eaa 100644 --- a/clients/client-redshift-data/src/commands/ExecuteStatementCommand.ts +++ b/clients/client-redshift-data/src/commands/ExecuteStatementCommand.ts @@ -28,13 +28,13 @@ export interface ExecuteStatementCommandOutput extends ExecuteStatementOutput, _ * method, use one of the following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      * @example diff --git a/clients/client-redshift-data/src/commands/ListDatabasesCommand.ts b/clients/client-redshift-data/src/commands/ListDatabasesCommand.ts index 11b6a3a29cc3..ee20a9118a9c 100644 --- a/clients/client-redshift-data/src/commands/ListDatabasesCommand.ts +++ b/clients/client-redshift-data/src/commands/ListDatabasesCommand.ts @@ -28,13 +28,13 @@ export interface ListDatabasesCommandOutput extends ListDatabasesResponse, __Met * following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      * @example diff --git a/clients/client-redshift-data/src/commands/ListSchemasCommand.ts b/clients/client-redshift-data/src/commands/ListSchemasCommand.ts index a9be230b1c81..7b28be5ad5c4 100644 --- a/clients/client-redshift-data/src/commands/ListSchemasCommand.ts +++ b/clients/client-redshift-data/src/commands/ListSchemasCommand.ts @@ -28,13 +28,13 @@ export interface ListSchemasCommandOutput extends ListSchemasResponse, __Metadat * following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      * @example diff --git a/clients/client-redshift-data/src/commands/ListTablesCommand.ts b/clients/client-redshift-data/src/commands/ListTablesCommand.ts index 39a7b5942e10..918cc33ac1e9 100644 --- a/clients/client-redshift-data/src/commands/ListTablesCommand.ts +++ b/clients/client-redshift-data/src/commands/ListTablesCommand.ts @@ -29,13 +29,13 @@ export interface ListTablesCommandOutput extends ListTablesResponse, __MetadataB * following combinations of request parameters:

      *
        *
      • - *

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the - * cluster identifier that matches the cluster in the secret.

        + *

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. + * When connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        *
      • *
      • - *

        Temporary credentials - specify the cluster identifier, the database name, and the - * database user name. Permission to call the redshift:GetClusterCredentials - * operation is required to use this method.

        + *

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. + * Also, permission to call the redshift:GetClusterCredentials operation is required. + * When connecting to a serverless endpoint, specify the database name.

        *
      • *
      * @example diff --git a/clients/client-redshift-data/src/models/models_0.ts b/clients/client-redshift-data/src/models/models_0.ts index 986cfb0c7733..d3ff9a8246bd 100644 --- a/clients/client-redshift-data/src/models/models_0.ts +++ b/clients/client-redshift-data/src/models/models_0.ts @@ -47,9 +47,9 @@ export interface BatchExecuteStatementInput { Sqls: string[] | undefined; /** - *

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      + *

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      */ - ClusterIdentifier: string | undefined; + ClusterIdentifier?: string; /** *

      The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

      @@ -57,7 +57,7 @@ export interface BatchExecuteStatementInput { SecretArn?: string; /** - *

      The database user name. This parameter is required when authenticating using temporary credentials.

      + *

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      */ DbUser?: string; @@ -99,7 +99,7 @@ export interface BatchExecuteStatementOutput { CreatedAt?: Date; /** - *

      The cluster identifier.

      + *

      The cluster identifier. This parameter is not returned when connecting to a serverless endpoint.

      */ ClusterIdentifier?: string; @@ -182,6 +182,24 @@ export namespace CancelStatementResponse { }); } +/** + *

      Connection to a database failed.

      + */ +export interface DatabaseConnectionException extends __SmithyException, $MetadataBearer { + name: "DatabaseConnectionException"; + $fault: "server"; + Message: string | undefined; +} + +export namespace DatabaseConnectionException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DatabaseConnectionException): any => ({ + ...obj, + }); +} + /** *

      The Amazon Redshift Data API operation failed due to invalid input.

      */ @@ -434,7 +452,7 @@ export interface SubStatementData { RedshiftQueryId?: number; /** - *

      A value that indicates whether the statement has a result set. The result set can be empty.

      + *

      A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set.

      */ HasResultSet?: boolean; } @@ -529,7 +547,8 @@ export interface DescribeStatementResponse { RedshiftPid?: number; /** - *

      A value that indicates whether the statement has a result set. The result set can be empty.

      + *

      A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. + * The value is true if any substatement returns a result set.

      */ HasResultSet?: boolean; @@ -578,9 +597,9 @@ export namespace DescribeStatementResponse { export interface DescribeTableRequest { /** - *

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      + *

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      */ - ClusterIdentifier: string | undefined; + ClusterIdentifier?: string; /** *

      The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

      @@ -588,7 +607,7 @@ export interface DescribeTableRequest { SecretArn?: string; /** - *

      The database user name. This parameter is required when authenticating using temporary credentials.

      + *

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      */ DbUser?: string; @@ -694,9 +713,9 @@ export interface ExecuteStatementInput { Sql: string | undefined; /** - *

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      + *

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      */ - ClusterIdentifier: string | undefined; + ClusterIdentifier?: string; /** *

      The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

      @@ -704,7 +723,7 @@ export interface ExecuteStatementInput { SecretArn?: string; /** - *

      The database user name. This parameter is required when authenticating using temporary credentials.

      + *

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      */ DbUser?: string; @@ -750,7 +769,7 @@ export interface ExecuteStatementOutput { CreatedAt?: Date; /** - *

      The cluster identifier.

      + *

      The cluster identifier. This parameter is not returned when connecting to a serverless endpoint.

      */ ClusterIdentifier?: string; @@ -973,9 +992,9 @@ export namespace GetStatementResultResponse { export interface ListDatabasesRequest { /** - *

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      + *

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      */ - ClusterIdentifier: string | undefined; + ClusterIdentifier?: string; /** *

      The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      @@ -988,7 +1007,7 @@ export interface ListDatabasesRequest { SecretArn?: string; /** - *

      The database user name. This parameter is required when authenticating using temporary credentials.

      + *

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      */ DbUser?: string; @@ -1036,9 +1055,9 @@ export namespace ListDatabasesResponse { export interface ListSchemasRequest { /** - *

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      + *

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      */ - ClusterIdentifier: string | undefined; + ClusterIdentifier?: string; /** *

      The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

      @@ -1046,7 +1065,7 @@ export interface ListSchemasRequest { SecretArn?: string; /** - *

      The database user name. This parameter is required when authenticating using temporary credentials.

      + *

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      */ DbUser?: string; @@ -1263,9 +1282,9 @@ export namespace ListStatementsResponse { export interface ListTablesRequest { /** - *

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      + *

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      */ - ClusterIdentifier: string | undefined; + ClusterIdentifier?: string; /** *

      The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

      @@ -1273,7 +1292,7 @@ export interface ListTablesRequest { SecretArn?: string; /** - *

      The database user name. This parameter is required when authenticating using temporary credentials.

      + *

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      */ DbUser?: string; diff --git a/clients/client-redshift-data/src/protocols/Aws_json1_1.ts b/clients/client-redshift-data/src/protocols/Aws_json1_1.ts index 1ff29e7a1ad1..90532194b320 100644 --- a/clients/client-redshift-data/src/protocols/Aws_json1_1.ts +++ b/clients/client-redshift-data/src/protocols/Aws_json1_1.ts @@ -40,6 +40,7 @@ import { CancelStatementRequest, CancelStatementResponse, ColumnMetadata, + DatabaseConnectionException, DescribeStatementRequest, DescribeStatementResponse, DescribeTableRequest, @@ -296,6 +297,14 @@ const deserializeAws_json1_1CancelStatementCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "DatabaseConnectionException": + case "com.amazonaws.redshiftdata#DatabaseConnectionException": + response = { + ...(await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.redshiftdata#InternalServerException": response = { @@ -436,6 +445,14 @@ const deserializeAws_json1_1DescribeTableCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "DatabaseConnectionException": + case "com.amazonaws.redshiftdata#DatabaseConnectionException": + response = { + ...(await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.redshiftdata#InternalServerException": response = { @@ -638,6 +655,14 @@ const deserializeAws_json1_1ListDatabasesCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "DatabaseConnectionException": + case "com.amazonaws.redshiftdata#DatabaseConnectionException": + response = { + ...(await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.redshiftdata#InternalServerException": response = { @@ -700,6 +725,14 @@ const deserializeAws_json1_1ListSchemasCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "DatabaseConnectionException": + case "com.amazonaws.redshiftdata#DatabaseConnectionException": + response = { + ...(await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.redshiftdata#InternalServerException": response = { @@ -824,6 +857,14 @@ const deserializeAws_json1_1ListTablesCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "DatabaseConnectionException": + case "com.amazonaws.redshiftdata#DatabaseConnectionException": + response = { + ...(await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.redshiftdata#InternalServerException": response = { @@ -887,6 +928,21 @@ const deserializeAws_json1_1BatchExecuteStatementExceptionResponse = async ( return contents; }; +const deserializeAws_json1_1DatabaseConnectionExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_1DatabaseConnectionException(body, context); + const contents: DatabaseConnectionException = { + name: "DatabaseConnectionException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + const deserializeAws_json1_1ExecuteStatementExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -1186,6 +1242,15 @@ const deserializeAws_json1_1ColumnMetadataList = (output: any, context: __SerdeC }); }; +const deserializeAws_json1_1DatabaseConnectionException = ( + output: any, + context: __SerdeContext +): DatabaseConnectionException => { + return { + Message: __expectString(output.Message), + } as any; +}; + const deserializeAws_json1_1DatabaseList = (output: any, context: __SerdeContext): string[] => { return (output || []) .filter((e: any) => e != null) diff --git a/clients/client-sns/src/SNS.ts b/clients/client-sns/src/SNS.ts index 82fce4cfc530..dbf71b839b62 100644 --- a/clients/client-sns/src/SNS.ts +++ b/clients/client-sns/src/SNS.ts @@ -123,6 +123,11 @@ import { OptInPhoneNumberCommandInput, OptInPhoneNumberCommandOutput, } from "./commands/OptInPhoneNumberCommand"; +import { + PublishBatchCommand, + PublishBatchCommandInput, + PublishBatchCommandOutput, +} from "./commands/PublishBatchCommand"; import { PublishCommand, PublishCommandInput, PublishCommandOutput } from "./commands/PublishCommand"; import { RemovePermissionCommand, @@ -187,7 +192,7 @@ import { SNSClient } from "./SNSClient"; export class SNS extends SNSClient { /** *

      Adds a statement to a topic's access control policy, granting access for the specified - * accounts to the specified actions.

      + * Amazon Web Services accounts to the specified actions.

      */ public addPermission( args: AddPermissionCommandInput, @@ -220,7 +225,7 @@ export class SNS extends SNSClient { /** *

      Accepts a phone number and indicates whether the phone holder has opted out of - * receiving SMS messages from your account. You cannot send SMS messages to a number that + * receiving SMS messages from your Amazon Web Services account. You cannot send SMS messages to a number that * is opted out.

      *

      To resume sending messages, you can opt in the number by using the * OptInPhoneNumber action.

      @@ -309,11 +314,16 @@ export class SNS extends SNSClient { * and PlatformCredential is secret key.

      * *
    • - *

      For APNS and APNS_SANDBOX, + *

      For APNS and APNS_SANDBOX using certificate credentials, * PlatformPrincipal is SSL certificate and * PlatformCredential is private key.

      *
    • *
    • + *

      For APNS and APNS_SANDBOX using token credentials, + * PlatformPrincipal is signing key ID and + * PlatformCredential is signing key.

      + *
    • + *
    • *

      For GCM (Firebase Cloud Messaging), there is no * PlatformPrincipal and the PlatformCredential is * API key.

      @@ -407,12 +417,12 @@ export class SNS extends SNSClient { } /** - *

      Adds a destination phone number to an account in the SMS sandbox and sends a + *

      Adds a destination phone number to an Amazon Web Services account in the SMS sandbox and sends a * one-time password (OTP) to that phone number.

      - *

      When you start using Amazon SNS to send SMS messages, your account is in the + *

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in @@ -549,11 +559,11 @@ export class SNS extends SNSClient { } /** - *

      Deletes an account's verified or pending phone number from the SMS sandbox.

      - *

      When you start using Amazon SNS to send SMS messages, your account is in the + *

      Deletes an Amazon Web Services account's verified or pending phone number from the SMS sandbox.

      + *

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in @@ -686,7 +696,7 @@ export class SNS extends SNSClient { } /** - *

      Returns the settings for sending SMS messages from your account.

      + *

      Returns the settings for sending SMS messages from your Amazon Web Services account.

      *

      These settings are set with the SetSMSAttributes action.

      */ public getSMSAttributes( @@ -719,11 +729,11 @@ export class SNS extends SNSClient { } /** - *

      Retrieves the SMS sandbox status for the calling account in the target Region.

      - *

      When you start using Amazon SNS to send SMS messages, your account is in the + *

      Retrieves the SMS sandbox status for the calling Amazon Web Services account in the target Amazon Web Services Region.

      + *

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in @@ -865,7 +875,7 @@ export class SNS extends SNSClient { } /** - *

      Lists the calling account's dedicated origination numbers and their metadata. For + *

      Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata. For * more information about origination numbers, see Origination numbers in the Amazon SNS Developer * Guide.

      */ @@ -979,12 +989,12 @@ export class SNS extends SNSClient { } /** - *

      Lists the calling account's current verified and pending destination phone numbers + *

      Lists the calling Amazon Web Services account's current verified and pending destination phone numbers * in the SMS sandbox.

      - *

      When you start using Amazon SNS to send SMS messages, your account is in the + *

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in @@ -1195,16 +1205,16 @@ export class SNS extends SNSClient { *

      If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is * subscribed to the topic. The format of the message depends on the notification protocol * for each subscribed endpoint.

      - *

      When a messageId is returned, the message has been saved and Amazon SNS - * will attempt to deliver it shortly.

      - *

      To use the Publish action for sending a message to a mobile endpoint, + *

      When a messageId is returned, the message is saved and Amazon SNS + * immediately deliverers it to subscribers.

      + *

      To use the Publish action for publishing a message to a mobile endpoint, * such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for * the TargetArn parameter. The EndpointArn is returned when making a call with the * CreatePlatformEndpoint action.

      *

      For more information about formatting messages, see Send Custom * Platform-Specific Payloads in Messages to Mobile Devices.

      * - *

      You can publish messages only to topics and endpoints in the same Region.

      + *

      You can publish messages only to topics and endpoints in the same Amazon Web Services Region.

      *
      */ public publish(args: PublishCommandInput, options?: __HttpHandlerOptions): Promise; @@ -1230,6 +1240,44 @@ export class SNS extends SNSClient { } } + /** + *

      Publishes up to ten messages to the specified topic. This is a batch version of Publish. For FIFO topics, multiple messages within a single batch are published in the order they are sent, and messages are deduplicated within the batch and across batches for 5 minutes.

      + *

      The result of publishing each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

      + *

      The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KB (262,144 bytes).

      + *

      Some actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:

      + *

      &AttributeName.1=first

      + *

      &AttributeName.2=second

      + *

      If you send a batch message to a topic, Amazon SNS publishes the batch message to each endpoint that is + * subscribed to the topic. The format of the batch message depends on the notification protocol + * for each subscribed endpoint.

      + *

      When a messageId is returned, the batch message is saved and Amazon SNS immediately delivers the message to subscribers.

      + */ + public publishBatch( + args: PublishBatchCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public publishBatch(args: PublishBatchCommandInput, cb: (err: any, data?: PublishBatchCommandOutput) => void): void; + public publishBatch( + args: PublishBatchCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PublishBatchCommandOutput) => void + ): void; + public publishBatch( + args: PublishBatchCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PublishBatchCommandOutput) => void), + cb?: (err: any, data?: PublishBatchCommandOutput) => void + ): Promise | void { + const command = new PublishBatchCommand(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); + } + } + /** *

      Removes a statement from a topic's access control policy.

      */ @@ -1441,7 +1489,7 @@ export class SNS extends SNSClient { /** *

      Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is HTTP/S or email, or - * if the endpoint and the topic are not in the same account, the endpoint owner must + * if the endpoint and the topic are not in the same Amazon Web Services account, the endpoint owner must * run the ConfirmSubscription action to confirm the subscription.

      *

      You call the ConfirmSubscription action with the token from the * subscription response. Confirmation tokens are valid for three days.

      @@ -1490,7 +1538,7 @@ export class SNS extends SNSClient { * existing tag.

      *
    • *
    • - *

      Tagging actions are limited to 10 TPS per account, per Region. If your + *

      Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If your * application requires a higher throughput, file a technical support request.

      *
    • *
    @@ -1584,11 +1632,11 @@ export class SNS extends SNSClient { } /** - *

    Verifies a destination phone number with a one-time password (OTP) for the calling account.

    - *

    When you start using Amazon SNS to send SMS messages, your account is in the + *

    Verifies a destination phone number with a one-time password (OTP) for the calling Amazon Web Services account.

    + *

    When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in diff --git a/clients/client-sns/src/SNSClient.ts b/clients/client-sns/src/SNSClient.ts index 05f7d429be05..67938917e93f 100644 --- a/clients/client-sns/src/SNSClient.ts +++ b/clients/client-sns/src/SNSClient.ts @@ -130,6 +130,7 @@ import { } from "./commands/ListTagsForResourceCommand"; import { ListTopicsCommandInput, ListTopicsCommandOutput } from "./commands/ListTopicsCommand"; import { OptInPhoneNumberCommandInput, OptInPhoneNumberCommandOutput } from "./commands/OptInPhoneNumberCommand"; +import { PublishBatchCommandInput, PublishBatchCommandOutput } from "./commands/PublishBatchCommand"; import { PublishCommandInput, PublishCommandOutput } from "./commands/PublishCommand"; import { RemovePermissionCommandInput, RemovePermissionCommandOutput } from "./commands/RemovePermissionCommand"; import { @@ -184,6 +185,7 @@ export type ServiceInputTypes = | ListTagsForResourceCommandInput | ListTopicsCommandInput | OptInPhoneNumberCommandInput + | PublishBatchCommandInput | PublishCommandInput | RemovePermissionCommandInput | SetEndpointAttributesCommandInput @@ -225,6 +227,7 @@ export type ServiceOutputTypes = | ListTagsForResourceCommandOutput | ListTopicsCommandOutput | OptInPhoneNumberCommandOutput + | PublishBatchCommandOutput | PublishCommandOutput | RemovePermissionCommandOutput | SetEndpointAttributesCommandOutput diff --git a/clients/client-sns/src/commands/AddPermissionCommand.ts b/clients/client-sns/src/commands/AddPermissionCommand.ts index ff2c201dcb09..0623e293f304 100644 --- a/clients/client-sns/src/commands/AddPermissionCommand.ts +++ b/clients/client-sns/src/commands/AddPermissionCommand.ts @@ -23,7 +23,7 @@ export interface AddPermissionCommandOutput extends __MetadataBearer {} /** *

    Adds a statement to a topic's access control policy, granting access for the specified - * accounts to the specified actions.

    + * Amazon Web Services accounts to the specified actions.

    * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-sns/src/commands/CheckIfPhoneNumberIsOptedOutCommand.ts b/clients/client-sns/src/commands/CheckIfPhoneNumberIsOptedOutCommand.ts index 8e7cbd59d009..042a307f0555 100644 --- a/clients/client-sns/src/commands/CheckIfPhoneNumberIsOptedOutCommand.ts +++ b/clients/client-sns/src/commands/CheckIfPhoneNumberIsOptedOutCommand.ts @@ -25,7 +25,7 @@ export interface CheckIfPhoneNumberIsOptedOutCommandOutput /** *

    Accepts a phone number and indicates whether the phone holder has opted out of - * receiving SMS messages from your account. You cannot send SMS messages to a number that + * receiving SMS messages from your Amazon Web Services account. You cannot send SMS messages to a number that * is opted out.

    *

    To resume sending messages, you can opt in the number by using the * OptInPhoneNumber action.

    diff --git a/clients/client-sns/src/commands/CreatePlatformApplicationCommand.ts b/clients/client-sns/src/commands/CreatePlatformApplicationCommand.ts index 097c202c7eef..eabb679766b9 100644 --- a/clients/client-sns/src/commands/CreatePlatformApplicationCommand.ts +++ b/clients/client-sns/src/commands/CreatePlatformApplicationCommand.ts @@ -40,11 +40,16 @@ export interface CreatePlatformApplicationCommandOutput extends CreatePlatformAp * and PlatformCredential is secret key.

    * *
  • - *

    For APNS and APNS_SANDBOX, + *

    For APNS and APNS_SANDBOX using certificate credentials, * PlatformPrincipal is SSL certificate and * PlatformCredential is private key.

    *
  • *
  • + *

    For APNS and APNS_SANDBOX using token credentials, + * PlatformPrincipal is signing key ID and + * PlatformCredential is signing key.

    + *
  • + *
  • *

    For GCM (Firebase Cloud Messaging), there is no * PlatformPrincipal and the PlatformCredential is * API key.

    diff --git a/clients/client-sns/src/commands/CreateSMSSandboxPhoneNumberCommand.ts b/clients/client-sns/src/commands/CreateSMSSandboxPhoneNumberCommand.ts index d646338144ff..f1873404aca6 100644 --- a/clients/client-sns/src/commands/CreateSMSSandboxPhoneNumberCommand.ts +++ b/clients/client-sns/src/commands/CreateSMSSandboxPhoneNumberCommand.ts @@ -22,12 +22,12 @@ export interface CreateSMSSandboxPhoneNumberCommandInput extends CreateSMSSandbo export interface CreateSMSSandboxPhoneNumberCommandOutput extends CreateSMSSandboxPhoneNumberResult, __MetadataBearer {} /** - *

    Adds a destination phone number to an account in the SMS sandbox and sends a + *

    Adds a destination phone number to an Amazon Web Services account in the SMS sandbox and sends a * one-time password (OTP) to that phone number.

    - *

    When you start using Amazon SNS to send SMS messages, your account is in the + *

    When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in diff --git a/clients/client-sns/src/commands/DeleteSMSSandboxPhoneNumberCommand.ts b/clients/client-sns/src/commands/DeleteSMSSandboxPhoneNumberCommand.ts index d5f9b3a2b167..2ee367f5145f 100644 --- a/clients/client-sns/src/commands/DeleteSMSSandboxPhoneNumberCommand.ts +++ b/clients/client-sns/src/commands/DeleteSMSSandboxPhoneNumberCommand.ts @@ -22,11 +22,11 @@ export interface DeleteSMSSandboxPhoneNumberCommandInput extends DeleteSMSSandbo export interface DeleteSMSSandboxPhoneNumberCommandOutput extends DeleteSMSSandboxPhoneNumberResult, __MetadataBearer {} /** - *

    Deletes an account's verified or pending phone number from the SMS sandbox.

    - *

    When you start using Amazon SNS to send SMS messages, your account is in the + *

    Deletes an Amazon Web Services account's verified or pending phone number from the SMS sandbox.

    + *

    When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in diff --git a/clients/client-sns/src/commands/GetSMSAttributesCommand.ts b/clients/client-sns/src/commands/GetSMSAttributesCommand.ts index 0148d8d39e67..365e7dd08cbc 100644 --- a/clients/client-sns/src/commands/GetSMSAttributesCommand.ts +++ b/clients/client-sns/src/commands/GetSMSAttributesCommand.ts @@ -22,7 +22,7 @@ export interface GetSMSAttributesCommandInput extends GetSMSAttributesInput {} export interface GetSMSAttributesCommandOutput extends GetSMSAttributesResponse, __MetadataBearer {} /** - *

    Returns the settings for sending SMS messages from your account.

    + *

    Returns the settings for sending SMS messages from your Amazon Web Services account.

    *

    These settings are set with the SetSMSAttributes action.

    * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-sns/src/commands/GetSMSSandboxAccountStatusCommand.ts b/clients/client-sns/src/commands/GetSMSSandboxAccountStatusCommand.ts index bdd9ba186ed4..30287c999cea 100644 --- a/clients/client-sns/src/commands/GetSMSSandboxAccountStatusCommand.ts +++ b/clients/client-sns/src/commands/GetSMSSandboxAccountStatusCommand.ts @@ -22,11 +22,11 @@ export interface GetSMSSandboxAccountStatusCommandInput extends GetSMSSandboxAcc export interface GetSMSSandboxAccountStatusCommandOutput extends GetSMSSandboxAccountStatusResult, __MetadataBearer {} /** - *

    Retrieves the SMS sandbox status for the calling account in the target Region.

    - *

    When you start using Amazon SNS to send SMS messages, your account is in the + *

    Retrieves the SMS sandbox status for the calling Amazon Web Services account in the target Amazon Web Services Region.

    + *

    When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in diff --git a/clients/client-sns/src/commands/ListOriginationNumbersCommand.ts b/clients/client-sns/src/commands/ListOriginationNumbersCommand.ts index 0d09b4319062..655401524865 100644 --- a/clients/client-sns/src/commands/ListOriginationNumbersCommand.ts +++ b/clients/client-sns/src/commands/ListOriginationNumbersCommand.ts @@ -22,7 +22,7 @@ export interface ListOriginationNumbersCommandInput extends ListOriginationNumbe export interface ListOriginationNumbersCommandOutput extends ListOriginationNumbersResult, __MetadataBearer {} /** - *

    Lists the calling account's dedicated origination numbers and their metadata. For + *

    Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata. For * more information about origination numbers, see Origination numbers in the Amazon SNS Developer * Guide.

    * @example diff --git a/clients/client-sns/src/commands/ListSMSSandboxPhoneNumbersCommand.ts b/clients/client-sns/src/commands/ListSMSSandboxPhoneNumbersCommand.ts index 938fc1da5af1..38ee19949aa2 100644 --- a/clients/client-sns/src/commands/ListSMSSandboxPhoneNumbersCommand.ts +++ b/clients/client-sns/src/commands/ListSMSSandboxPhoneNumbersCommand.ts @@ -22,12 +22,12 @@ export interface ListSMSSandboxPhoneNumbersCommandInput extends ListSMSSandboxPh export interface ListSMSSandboxPhoneNumbersCommandOutput extends ListSMSSandboxPhoneNumbersResult, __MetadataBearer {} /** - *

    Lists the calling account's current verified and pending destination phone numbers + *

    Lists the calling Amazon Web Services account's current verified and pending destination phone numbers * in the SMS sandbox.

    - *

    When you start using Amazon SNS to send SMS messages, your account is in the + *

    When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in diff --git a/clients/client-sns/src/commands/PublishBatchCommand.ts b/clients/client-sns/src/commands/PublishBatchCommand.ts new file mode 100644 index 000000000000..ef111d32e2b4 --- /dev/null +++ b/clients/client-sns/src/commands/PublishBatchCommand.ts @@ -0,0 +1,101 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { PublishBatchInput, PublishBatchResponse } from "../models/models_0"; +import { deserializeAws_queryPublishBatchCommand, serializeAws_queryPublishBatchCommand } from "../protocols/Aws_query"; +import { ServiceInputTypes, ServiceOutputTypes, SNSClientResolvedConfig } from "../SNSClient"; + +export interface PublishBatchCommandInput extends PublishBatchInput {} +export interface PublishBatchCommandOutput extends PublishBatchResponse, __MetadataBearer {} + +/** + *

    Publishes up to ten messages to the specified topic. This is a batch version of Publish. For FIFO topics, multiple messages within a single batch are published in the order they are sent, and messages are deduplicated within the batch and across batches for 5 minutes.

    + *

    The result of publishing each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

    + *

    The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KB (262,144 bytes).

    + *

    Some actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:

    + *

    &AttributeName.1=first

    + *

    &AttributeName.2=second

    + *

    If you send a batch message to a topic, Amazon SNS publishes the batch message to each endpoint that is + * subscribed to the topic. The format of the batch message depends on the notification protocol + * for each subscribed endpoint.

    + *

    When a messageId is returned, the batch message is saved and Amazon SNS immediately delivers the message to subscribers.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { SNSClient, PublishBatchCommand } from "@aws-sdk/client-sns"; // ES Modules import + * // const { SNSClient, PublishBatchCommand } = require("@aws-sdk/client-sns"); // CommonJS import + * const client = new SNSClient(config); + * const command = new PublishBatchCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link PublishBatchCommandInput} for command's `input` shape. + * @see {@link PublishBatchCommandOutput} for command's `response` shape. + * @see {@link SNSClientResolvedConfig | config} for SNSClient's `config` shape. + * + */ +export class PublishBatchCommand extends $Command< + PublishBatchCommandInput, + PublishBatchCommandOutput, + SNSClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PublishBatchCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: SNSClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "SNSClient"; + const commandName = "PublishBatchCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: PublishBatchInput.filterSensitiveLog, + outputFilterSensitiveLog: PublishBatchResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: PublishBatchCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_queryPublishBatchCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_queryPublishBatchCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-sns/src/commands/PublishCommand.ts b/clients/client-sns/src/commands/PublishCommand.ts index 98aac96028f4..2f144b2ac7a7 100644 --- a/clients/client-sns/src/commands/PublishCommand.ts +++ b/clients/client-sns/src/commands/PublishCommand.ts @@ -25,16 +25,16 @@ export interface PublishCommandOutput extends PublishResponse, __MetadataBearer *

    If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is * subscribed to the topic. The format of the message depends on the notification protocol * for each subscribed endpoint.

    - *

    When a messageId is returned, the message has been saved and Amazon SNS - * will attempt to deliver it shortly.

    - *

    To use the Publish action for sending a message to a mobile endpoint, + *

    When a messageId is returned, the message is saved and Amazon SNS + * immediately deliverers it to subscribers.

    + *

    To use the Publish action for publishing a message to a mobile endpoint, * such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for * the TargetArn parameter. The EndpointArn is returned when making a call with the * CreatePlatformEndpoint action.

    *

    For more information about formatting messages, see Send Custom * Platform-Specific Payloads in Messages to Mobile Devices.

    * - *

    You can publish messages only to topics and endpoints in the same Region.

    + *

    You can publish messages only to topics and endpoints in the same Amazon Web Services Region.

    *
    * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-sns/src/commands/SubscribeCommand.ts b/clients/client-sns/src/commands/SubscribeCommand.ts index 90fd5a1b8426..b8d3ef6fa9c3 100644 --- a/clients/client-sns/src/commands/SubscribeCommand.ts +++ b/clients/client-sns/src/commands/SubscribeCommand.ts @@ -20,7 +20,7 @@ export interface SubscribeCommandOutput extends SubscribeResponse, __MetadataBea /** *

    Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is HTTP/S or email, or - * if the endpoint and the topic are not in the same account, the endpoint owner must + * if the endpoint and the topic are not in the same Amazon Web Services account, the endpoint owner must * run the ConfirmSubscription action to confirm the subscription.

    *

    You call the ConfirmSubscription action with the token from the * subscription response. Confirmation tokens are valid for three days.

    diff --git a/clients/client-sns/src/commands/TagResourceCommand.ts b/clients/client-sns/src/commands/TagResourceCommand.ts index 222289411f23..35d21286633d 100644 --- a/clients/client-sns/src/commands/TagResourceCommand.ts +++ b/clients/client-sns/src/commands/TagResourceCommand.ts @@ -38,7 +38,7 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat * existing tag.

    *
  • *
  • - *

    Tagging actions are limited to 10 TPS per account, per Region. If your + *

    Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If your * application requires a higher throughput, file a technical support request.

    *
  • * diff --git a/clients/client-sns/src/commands/VerifySMSSandboxPhoneNumberCommand.ts b/clients/client-sns/src/commands/VerifySMSSandboxPhoneNumberCommand.ts index df4802c48669..9df3c9dcc3f3 100644 --- a/clients/client-sns/src/commands/VerifySMSSandboxPhoneNumberCommand.ts +++ b/clients/client-sns/src/commands/VerifySMSSandboxPhoneNumberCommand.ts @@ -22,11 +22,11 @@ export interface VerifySMSSandboxPhoneNumberCommandInput extends VerifySMSSandbo export interface VerifySMSSandboxPhoneNumberCommandOutput extends VerifySMSSandboxPhoneNumberResult, __MetadataBearer {} /** - *

    Verifies a destination phone number with a one-time password (OTP) for the calling account.

    - *

    When you start using Amazon SNS to send SMS messages, your account is in the + *

    Verifies a destination phone number with a one-time password (OTP) for the calling Amazon Web Services account.

    + *

    When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in diff --git a/clients/client-sns/src/commands/index.ts b/clients/client-sns/src/commands/index.ts index 94bdd0664c37..4114e3f1e1c9 100644 --- a/clients/client-sns/src/commands/index.ts +++ b/clients/client-sns/src/commands/index.ts @@ -25,6 +25,7 @@ export * from "./ListSubscriptionsCommand"; export * from "./ListTagsForResourceCommand"; export * from "./ListTopicsCommand"; export * from "./OptInPhoneNumberCommand"; +export * from "./PublishBatchCommand"; export * from "./PublishCommand"; export * from "./RemovePermissionCommand"; export * from "./SetEndpointAttributesCommand"; diff --git a/clients/client-sns/src/models/models_0.ts b/clients/client-sns/src/models/models_0.ts index 1b10c7b9abbf..1f29867f47af 100644 --- a/clients/client-sns/src/models/models_0.ts +++ b/clients/client-sns/src/models/models_0.ts @@ -12,8 +12,8 @@ export interface AddPermissionInput { Label: string | undefined; /** - *

    The account IDs of the users (principals) who will be given access to the - * specified actions. The users must have account, but do not need to be signed up for + *

    The Amazon Web Services account IDs of the users (principals) who will be given access to the + * specified actions. The users must have Amazon Web Services account, but do not need to be signed up for * this service.

    */ AWSAccountId: string[] | undefined; @@ -158,8 +158,7 @@ export namespace CheckIfPhoneNumberIsOptedOutResponse { } /** - *

    Indicates that the rate at which requests have been submitted for this action exceeds - * the limit for your account.

    + *

    Indicates that the rate at which requests have been submitted for this action exceeds the limit for your Amazon Web Services account.

    */ export interface ThrottledException extends __SmithyException, $MetadataBearer { name: "ThrottledException"; @@ -231,8 +230,8 @@ export namespace ConfirmSubscriptionResponse { } /** - *

    Indicates that the number of filter polices in your account exceeds the limit. To - * add more filter polices, submit an SNS Limit Increase case in the Amazon Web Services Support + *

    Indicates that the number of filter polices in your Amazon Web Services account exceeds the limit. To + * add more filter polices, submit an Amazon SNS Limit Increase case in the Amazon Web Services Support * Center.

    */ export interface FilterPolicyLimitExceededException extends __SmithyException, $MetadataBearer { @@ -431,7 +430,7 @@ export namespace CreateSMSSandboxPhoneNumberResult { /** *

    Indicates that the specified phone number opted out of receiving SMS messages from - * your account. You can't send SMS messages to phone numbers that opt out.

    + * your Amazon Web Services account. You can't send SMS messages to phone numbers that opt out.

    */ export interface OptedOutException extends __SmithyException, $MetadataBearer { name: "OptedOutException"; @@ -920,6 +919,18 @@ export interface GetPlatformApplicationAttributesResponse { *
      *
    • *

      + * AppleCertificateExpiryDate – The expiry date of the SSL certificate used to configure certificate-based authentication.

      + *
    • + *
    • + *

      + * ApplePlatformTeamID – The Apple developer account ID used to configure token-based authentication.

      + *
    • + *
    • + *

      + * ApplePlatformBundleID – The app identifier used to configure token-based authentication.

      + *
    • + *
    • + *

      * EventEndpointCreated – Topic ARN to which EndpointCreated * event notifications should be sent.

      *
    • @@ -1007,7 +1018,7 @@ export namespace GetSMSSandboxAccountStatusInput { export interface GetSMSSandboxAccountStatusResult { /** - *

      Indicates whether the calling account is in the SMS sandbox.

      + *

      Indicates whether the calling Amazon Web Services account is in the SMS sandbox.

      */ IsInSandbox: boolean | undefined; } @@ -1072,7 +1083,7 @@ export interface GetSubscriptionAttributesResponse { * *
    • *

      - * Owner – The account ID of the subscription's + * Owner – The Amazon Web Services account ID of the subscription's * owner.

      *
    • *
    • @@ -1175,7 +1186,7 @@ export interface GetTopicAttributesResponse { *
    • *
    • *

      - * Owner – The account ID of the topic's owner.

      + * Owner – The Amazon Web Services account ID of the topic's owner.

      *
    • *
    • *

      @@ -1289,11 +1300,11 @@ export namespace ListEndpointsByPlatformApplicationInput { } /** - *

      Endpoint for mobile app and device.

      + *

      The endpoint for mobile app and device.

      */ export interface Endpoint { /** - *

      EndpointArn for mobile app and device.

      + *

      The EndpointArn for mobile app and device.

      */ EndpointArn?: string; @@ -1601,10 +1612,10 @@ export enum SMSSandboxPhoneNumberVerificationStatus { /** *

      A verified or pending destination phone number in the SMS sandbox.

      - *

      When you start using Amazon SNS to send SMS messages, your account is in the + *

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the * SMS sandbox. The SMS sandbox provides a safe environment for * you to try Amazon SNS features without risking your reputation as an SMS sender. While your - * account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send + * Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send * SMS messages only to verified destination phone numbers. For more information, including how to * move out of the sandbox to send messages without restrictions, * see SMS sandbox in @@ -1934,14 +1945,13 @@ export namespace EndpointDisabledException { } /** - *

      Indicates that a request parameter does not comply with the associated - * constraints.

      + *

      Indicates that a request parameter does not comply with the associated constraints.

      */ export interface InvalidParameterValueException extends __SmithyException, $MetadataBearer { name: "InvalidParameterValueException"; $fault: "client"; /** - *

      The parameter value is invalid.

      + *

      The parameter of an entry in a request doesn't abide by the specification.

      */ message?: string; } @@ -2096,12 +2106,12 @@ export namespace PlatformApplicationDisabledException { /** *

      The user-specified message attribute value. For string data types, the value attribute * has the same restrictions on the content as the message body. For more information, see - * Publish.

      + * Publish.

      *

      Name, type, and value must not be empty or null. In addition, the message body should * not be empty or null. All parts of the message attribute, including name, type, and * value, are included in the message size restriction, which is currently 256 KB (262,144 * bytes). For more information, see Amazon SNS message attributes and - * Publishing + * Publishing * to a mobile phone in the Amazon SNS Developer Guide. *

      */ @@ -2115,7 +2125,7 @@ export interface MessageAttributeValue { /** *

      Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable - * Characters.

      + * Characters.

      */ StringValue?: string; @@ -2266,7 +2276,7 @@ export interface PublishInput { /** *

      This parameter applies only to FIFO (first-in-first-out) topics. The * MessageDeduplicationId can contain up to 128 alphanumeric characters - * (a-z, A-Z, 0-9) and punctuation + * (a-z, A-Z, 0-9) and punctuation * (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~).

      *

      Every message must have a unique MessageDeduplicationId, which is a token * used for deduplication of sent messages. If a message with a particular @@ -2281,8 +2291,9 @@ export interface PublishInput { /** *

      This parameter applies only to FIFO (first-in-first-out) topics. The - * MessageGroupId can contain up to 128 alphanumeric characters (a-z, A-Z, - * 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~).

      + * MessageGroupId can contain up to 128 alphanumeric characters + * (a-z, A-Z, 0-9) and punctuation + * (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~).

      *

      The MessageGroupId is a tag that specifies that a message belongs to a * specific message group. Messages that belong to the same message group are processed in * a FIFO manner (however, messages in different message groups might be processed out of @@ -2329,6 +2340,315 @@ export namespace PublishResponse { }); } +/** + *

      Two or more batch entries in the request have the same Id.

      + */ +export interface BatchEntryIdsNotDistinctException extends __SmithyException, $MetadataBearer { + name: "BatchEntryIdsNotDistinctException"; + $fault: "client"; + message?: string; +} + +export namespace BatchEntryIdsNotDistinctException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BatchEntryIdsNotDistinctException): any => ({ + ...obj, + }); +} + +/** + *

      The length of all the batch messages put together is more than the limit.

      + */ +export interface BatchRequestTooLongException extends __SmithyException, $MetadataBearer { + name: "BatchRequestTooLongException"; + $fault: "client"; + message?: string; +} + +export namespace BatchRequestTooLongException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BatchRequestTooLongException): any => ({ + ...obj, + }); +} + +/** + *

      The batch request doesn't contain any entries.

      + */ +export interface EmptyBatchRequestException extends __SmithyException, $MetadataBearer { + name: "EmptyBatchRequestException"; + $fault: "client"; + message?: string; +} + +export namespace EmptyBatchRequestException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EmptyBatchRequestException): any => ({ + ...obj, + }); +} + +/** + *

      The Id of a batch entry in a batch request doesn't abide by the specification.

      + */ +export interface InvalidBatchEntryIdException extends __SmithyException, $MetadataBearer { + name: "InvalidBatchEntryIdException"; + $fault: "client"; + message?: string; +} + +export namespace InvalidBatchEntryIdException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidBatchEntryIdException): any => ({ + ...obj, + }); +} + +/** + *

      Contains the details of a single Amazon SNS message along with an Id that identifies a message within the batch.

      + */ +export interface PublishBatchRequestEntry { + /** + *

      An identifier for the message in this batch.

      + * + *

      The Ids of a batch request must be unique within a request.

      + *

      This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

      + *
      + */ + Id: string | undefined; + + /** + *

      The body of the message.

      + */ + Message: string | undefined; + + /** + *

      The subject of the batch message.

      + */ + Subject?: string; + + /** + *

      Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

      + *
        + *
      • + *

        be a syntactically valid JSON object; and

        + *
      • + *
      • + *

        contain at least a top-level JSON key of "default" with a value that is a string.

        + *
      • + *
      + *

      You can define other top-level keys that define the message you want to send to a + * specific transport protocol (e.g. http).

      + */ + MessageStructure?: string; + + /** + *

      Each message attribute consists of a Name, Type, and Value. For more information, see Amazon SNS message attributes in the Amazon SNS Developer Guide.

      + */ + MessageAttributes?: { [key: string]: MessageAttributeValue }; + + /** + *

      This parameter applies only to FIFO (first-in-first-out) topics.

      + *

      The token used for deduplication of messages within a 5-minute minimum deduplication interval. If a message with a particular MessageDeduplicationId is sent successfully, subsequent messages with the same MessageDeduplicationId are accepted successfully but aren't delivered.

      + *
        + *
      • + *

        Every message must have a unique MessageDeduplicationId.

        + *
          + *
        • + *

          You may provide a MessageDeduplicationId explicitly.

          + *
        • + *
        • + *

          If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication for your topic, Amazon SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message).

          + *
        • + *
        • + *

          If you don't provide a MessageDeduplicationId and the topic doesn't have ContentBasedDeduplication set, the action fails with an error.

          + *
        • + *
        • + *

          If the topic has a ContentBasedDeduplication set, your + * MessageDeduplicationId overrides the generated one.

          + *
        • + *
        + *
      • + *
      • + *

        When ContentBasedDeduplication is in effect, messages with identical content sent within the deduplication interval are treated as duplicates and only one copy of the message is delivered.

        + *
      • + *
      • + *

        If you send one message with ContentBasedDeduplication enabled, and then another + * message with a MessageDeduplicationId that is the same as the one + * generated for the first MessageDeduplicationId, the two messages + * are treated as duplicates and only one copy of the message is delivered.

        + *
      • + *
      + * + *

      The MessageDeduplicationId is available to the consumer of the message (this can be useful for troubleshooting delivery issues).

      + *

      If a message is sent successfully but the acknowledgement is lost and the message is resent with the same MessageDeduplicationId after the deduplication interval, Amazon SNS can't detect duplicate messages.

      + *

      Amazon SNS continues to keep track of the message deduplication ID even after the message is received and deleted.

      + *
      + *

      The length of MessageDeduplicationId is 128 characters.

      + *

      + * MessageDeduplicationId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~).

      + */ + MessageDeduplicationId?: string; + + /** + *

      This parameter applies only to FIFO (first-in-first-out) topics.

      + *

      The tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are processed in a FIFO manner (however, messages in different message groups might be processed out of order). To interleave multiple ordered streams within a single topic, use MessageGroupId values (for example, session data for multiple users). In this scenario, multiple consumers can process the topic, but the session data of each user is processed in a FIFO fashion.

      + *

      You must associate a non-empty MessageGroupId with a message. If you don't provide a MessageGroupId, the action fails.

      + *

      The length of MessageGroupId is 128 characters.

      + *

      + * MessageGroupId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~).

      + * + * + * + *

      + * MessageGroupId is required for FIFO topics. You can't use it for standard topics.

      + *
      + */ + MessageGroupId?: string; +} + +export namespace PublishBatchRequestEntry { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PublishBatchRequestEntry): any => ({ + ...obj, + }); +} + +export interface PublishBatchInput { + /** + *

      The Amazon resource name (ARN) of the topic you want to batch publish to.

      + */ + TopicArn: string | undefined; + + /** + *

      A list of PublishBatch request entries to be sent to the SNS topic.

      + */ + PublishBatchRequestEntries: PublishBatchRequestEntry[] | undefined; +} + +export namespace PublishBatchInput { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PublishBatchInput): any => ({ + ...obj, + }); +} + +/** + *

      Gives a detailed description of failed messages in the batch.

      + */ +export interface BatchResultErrorEntry { + /** + *

      The Id of an entry in a batch request

      + */ + Id: string | undefined; + + /** + *

      An error code representing why the action failed on this entry.

      + */ + Code: string | undefined; + + /** + *

      A message explaining why the action failed on this entry.

      + */ + Message?: string; + + /** + *

      Specifies whether the error happened due to the caller of the batch API action.

      + */ + SenderFault: boolean | undefined; +} + +export namespace BatchResultErrorEntry { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BatchResultErrorEntry): any => ({ + ...obj, + }); +} + +/** + *

      Encloses data related to a successful message in a batch request for topic.

      + */ +export interface PublishBatchResultEntry { + /** + *

      The Id of an entry in a batch request.

      + */ + Id?: string; + + /** + *

      An identifier for the message.

      + */ + MessageId?: string; + + /** + *

      This parameter applies only to FIFO (first-in-first-out) topics.

      + *

      The large, non-consecutive number that Amazon SNS assigns to each message.

      + *

      The length of SequenceNumber is 128 bits. SequenceNumber continues to increase for a particular MessageGroupId.

      + */ + SequenceNumber?: string; +} + +export namespace PublishBatchResultEntry { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PublishBatchResultEntry): any => ({ + ...obj, + }); +} + +export interface PublishBatchResponse { + /** + *

      A list of successful PublishBatch responses.

      + */ + Successful?: PublishBatchResultEntry[]; + + /** + *

      A list of failed PublishBatch responses.

      + */ + Failed?: BatchResultErrorEntry[]; +} + +export namespace PublishBatchResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PublishBatchResponse): any => ({ + ...obj, + }); +} + +/** + *

      The batch request contains more entries than permissible.

      + */ +export interface TooManyEntriesInBatchRequestException extends __SmithyException, $MetadataBearer { + name: "TooManyEntriesInBatchRequestException"; + $fault: "client"; + message?: string; +} + +export namespace TooManyEntriesInBatchRequestException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TooManyEntriesInBatchRequestException): any => ({ + ...obj, + }); +} + /** *

      Input for RemovePermission action.

      */ @@ -2414,24 +2734,46 @@ export interface SetPlatformApplicationAttributesInput { *
        *
      • *

        - * PlatformCredential – The credential received from the - * notification service. For APNS and APNS_SANDBOX, - * PlatformCredential is private key. For - * GCM (Firebase Cloud Messaging), PlatformCredential - * is API key. For ADM, PlatformCredential - * is client secret.

        + * PlatformCredential – The credential received from the notification service.

        + *
          + *
        • + *

          For ADM, PlatformCredentialis client secret.

          + *
        • + *
        • + *

          For Apple Services using certificate credentials, PlatformCredential is private key.

          + *
        • + *
        • + *

          For Apple Services using token credentials, PlatformCredential is signing key.

          + *
        • + *
        • + *

          For GCM (Firebase Cloud Messaging), PlatformCredential is API key.

          + *
        • + *
        *
      • + *
      + *
        *
      • - *

        - * PlatformPrincipal – The principal received from the - * notification service. For APNS and APNS_SANDBOX, - * PlatformPrincipal is SSL certificate. For - * GCM (Firebase Cloud Messaging), there is no - * PlatformPrincipal. For ADM, - * PlatformPrincipal is client id.

        + *

        + * PlatformPrincipal – The principal received from the notification service.

        + *
          + *
        • + *

          For ADM, PlatformPrincipalis client id.

          + *
        • + *
        • + *

          For Apple Services using certificate credentials, PlatformPrincipal is SSL certificate.

          + *
        • + *
        • + *

          For Apple Services using token credentials, PlatformPrincipal is signing key ID.

          + *
        • + *
        • + *

          For GCM (Firebase Cloud Messaging), there is no PlatformPrincipal.

          + *
        • + *
        *
      • + *
      + *
        *
      • - *

        + *

        * EventEndpointCreated – Topic ARN to which * EndpointCreated event notifications are sent.

        *
      • @@ -2468,6 +2810,17 @@ export interface SetPlatformApplicationAttributesInput { * of successfully delivered messages.

        * *
      + *

      The following attributes only apply to APNs token-based authentication:

      + *
        + *
      • + *

        + * ApplePlatformTeamID – The identifier that's assigned to your Apple developer account team.

        + *
      • + *
      • + *

        + * ApplePlatformBundleID – The bundle identifier that's assigned to your iOS app.

        + *
      • + *
      */ Attributes: { [key: string]: string } | undefined; } @@ -2486,7 +2839,7 @@ export namespace SetPlatformApplicationAttributesInput { */ export interface SetSMSAttributesInput { /** - *

      The default settings for sending SMS messages from your account. You can set values + *

      The default settings for sending SMS messages from your Amazon Web Services account. You can set values * for the following attribute names:

      *

      * MonthlySpendLimit – The maximum amount in USD that you are willing to spend @@ -2531,15 +2884,14 @@ export interface SetSMSAttributesInput { *

    • *

      * Transactional – Critical messages that support customer - * transactions, such as one-time passcodes for multi-factor authentication. Amazon - * SNS optimizes the message delivery to achieve the highest reliability.

      + * transactions, such as one-time passcodes for multi-factor authentication. Amazon SNS optimizes the message delivery to achieve the highest reliability.

      *
    • *
    *

    * UsageReportS3Bucket – The name of the Amazon S3 bucket to receive daily SMS * usage reports from Amazon SNS. Each day, Amazon SNS will deliver a usage report as a CSV file to * the bucket. The report includes the following information for each SMS message that was - * successfully delivered by your account:

    + * successfully delivered by your Amazon Web Services account:

    *
      *
    • *

      Time that the message was published (in UTC)

      diff --git a/clients/client-sns/src/protocols/Aws_query.ts b/clients/client-sns/src/protocols/Aws_query.ts index b24e12457898..56e2c4bc6d00 100644 --- a/clients/client-sns/src/protocols/Aws_query.ts +++ b/clients/client-sns/src/protocols/Aws_query.ts @@ -100,6 +100,7 @@ import { } from "../commands/ListTagsForResourceCommand"; import { ListTopicsCommandInput, ListTopicsCommandOutput } from "../commands/ListTopicsCommand"; import { OptInPhoneNumberCommandInput, OptInPhoneNumberCommandOutput } from "../commands/OptInPhoneNumberCommand"; +import { PublishBatchCommandInput, PublishBatchCommandOutput } from "../commands/PublishBatchCommand"; import { PublishCommandInput, PublishCommandOutput } from "../commands/PublishCommand"; import { RemovePermissionCommandInput, RemovePermissionCommandOutput } from "../commands/RemovePermissionCommand"; import { @@ -127,6 +128,9 @@ import { import { AddPermissionInput, AuthorizationErrorException, + BatchEntryIdsNotDistinctException, + BatchRequestTooLongException, + BatchResultErrorEntry, CheckIfPhoneNumberIsOptedOutInput, CheckIfPhoneNumberIsOptedOutResponse, ConcurrentAccessException, @@ -145,6 +149,7 @@ import { DeleteSMSSandboxPhoneNumberInput, DeleteSMSSandboxPhoneNumberResult, DeleteTopicInput, + EmptyBatchRequestException, Endpoint, EndpointDisabledException, FilterPolicyLimitExceededException, @@ -161,6 +166,7 @@ import { GetTopicAttributesInput, GetTopicAttributesResponse, InternalErrorException, + InvalidBatchEntryIdException, InvalidParameterException, InvalidParameterValueException, InvalidSecurityException, @@ -197,6 +203,10 @@ import { PhoneNumberInformation, PlatformApplication, PlatformApplicationDisabledException, + PublishBatchInput, + PublishBatchRequestEntry, + PublishBatchResponse, + PublishBatchResultEntry, PublishInput, PublishResponse, RemovePermissionInput, @@ -219,6 +229,7 @@ import { TagResourceRequest, TagResourceResponse, ThrottledException, + TooManyEntriesInBatchRequestException, Topic, TopicLimitExceededException, UnsubscribeInput, @@ -679,6 +690,22 @@ export const serializeAws_queryPublishCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_queryPublishBatchCommand = async ( + input: PublishBatchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-www-form-urlencoded", + }; + let body: any; + body = buildFormUrlencodedString({ + ...serializeAws_queryPublishBatchInput(input, context), + Action: "PublishBatch", + Version: "2010-03-31", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_queryRemovePermissionCommand = async ( input: RemovePermissionCommandInput, context: __SerdeContext @@ -3201,6 +3228,204 @@ const deserializeAws_queryPublishCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_queryPublishBatchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_queryPublishBatchCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_queryPublishBatchResponse(data.PublishBatchResult, context); + const response: PublishBatchCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_queryPublishBatchCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AuthorizationErrorException": + case "com.amazonaws.sns#AuthorizationErrorException": + response = { + ...(await deserializeAws_queryAuthorizationErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "BatchEntryIdsNotDistinctException": + case "com.amazonaws.sns#BatchEntryIdsNotDistinctException": + response = { + ...(await deserializeAws_queryBatchEntryIdsNotDistinctExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "BatchRequestTooLongException": + case "com.amazonaws.sns#BatchRequestTooLongException": + response = { + ...(await deserializeAws_queryBatchRequestTooLongExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "EmptyBatchRequestException": + case "com.amazonaws.sns#EmptyBatchRequestException": + response = { + ...(await deserializeAws_queryEmptyBatchRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "EndpointDisabledException": + case "com.amazonaws.sns#EndpointDisabledException": + response = { + ...(await deserializeAws_queryEndpointDisabledExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalErrorException": + case "com.amazonaws.sns#InternalErrorException": + response = { + ...(await deserializeAws_queryInternalErrorExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidBatchEntryIdException": + case "com.amazonaws.sns#InvalidBatchEntryIdException": + response = { + ...(await deserializeAws_queryInvalidBatchEntryIdExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.sns#InvalidParameterException": + response = { + ...(await deserializeAws_queryInvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterValueException": + case "com.amazonaws.sns#InvalidParameterValueException": + response = { + ...(await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidSecurityException": + case "com.amazonaws.sns#InvalidSecurityException": + response = { + ...(await deserializeAws_queryInvalidSecurityExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KMSAccessDeniedException": + case "com.amazonaws.sns#KMSAccessDeniedException": + response = { + ...(await deserializeAws_queryKMSAccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KMSDisabledException": + case "com.amazonaws.sns#KMSDisabledException": + response = { + ...(await deserializeAws_queryKMSDisabledExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KMSInvalidStateException": + case "com.amazonaws.sns#KMSInvalidStateException": + response = { + ...(await deserializeAws_queryKMSInvalidStateExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KMSNotFoundException": + case "com.amazonaws.sns#KMSNotFoundException": + response = { + ...(await deserializeAws_queryKMSNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KMSOptInRequired": + case "com.amazonaws.sns#KMSOptInRequired": + response = { + ...(await deserializeAws_queryKMSOptInRequiredResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "KMSThrottlingException": + case "com.amazonaws.sns#KMSThrottlingException": + response = { + ...(await deserializeAws_queryKMSThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.sns#NotFoundException": + response = { + ...(await deserializeAws_queryNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PlatformApplicationDisabledException": + case "com.amazonaws.sns#PlatformApplicationDisabledException": + response = { + ...(await deserializeAws_queryPlatformApplicationDisabledExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyEntriesInBatchRequestException": + case "com.amazonaws.sns#TooManyEntriesInBatchRequestException": + response = { + ...(await deserializeAws_queryTooManyEntriesInBatchRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_queryRemovePermissionCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -4168,6 +4393,36 @@ const deserializeAws_queryAuthorizationErrorExceptionResponse = async ( return contents; }; +const deserializeAws_queryBatchEntryIdsNotDistinctExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_queryBatchEntryIdsNotDistinctException(body.Error, context); + const contents: BatchEntryIdsNotDistinctException = { + name: "BatchEntryIdsNotDistinctException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + +const deserializeAws_queryBatchRequestTooLongExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_queryBatchRequestTooLongException(body.Error, context); + const contents: BatchRequestTooLongException = { + name: "BatchRequestTooLongException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + const deserializeAws_queryConcurrentAccessExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -4183,6 +4438,21 @@ const deserializeAws_queryConcurrentAccessExceptionResponse = async ( return contents; }; +const deserializeAws_queryEmptyBatchRequestExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_queryEmptyBatchRequestException(body.Error, context); + const contents: EmptyBatchRequestException = { + name: "EmptyBatchRequestException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + const deserializeAws_queryEndpointDisabledExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -4228,6 +4498,21 @@ const deserializeAws_queryInternalErrorExceptionResponse = async ( return contents; }; +const deserializeAws_queryInvalidBatchEntryIdExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_queryInvalidBatchEntryIdException(body.Error, context); + const contents: InvalidBatchEntryIdException = { + name: "InvalidBatchEntryIdException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + const deserializeAws_queryInvalidParameterExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -4498,6 +4783,21 @@ const deserializeAws_queryThrottledExceptionResponse = async ( return contents; }; +const deserializeAws_queryTooManyEntriesInBatchRequestExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_queryTooManyEntriesInBatchRequestException(body.Error, context); + const contents: TooManyEntriesInBatchRequestException = { + name: "TooManyEntriesInBatchRequestException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + const deserializeAws_queryTopicLimitExceededExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -4986,6 +5286,70 @@ const serializeAws_queryOptInPhoneNumberInput = (input: OptInPhoneNumberInput, c return entries; }; +const serializeAws_queryPublishBatchInput = (input: PublishBatchInput, context: __SerdeContext): any => { + const entries: any = {}; + if (input.TopicArn !== undefined && input.TopicArn !== null) { + entries["TopicArn"] = input.TopicArn; + } + if (input.PublishBatchRequestEntries !== undefined && input.PublishBatchRequestEntries !== null) { + const memberEntries = serializeAws_queryPublishBatchRequestEntryList(input.PublishBatchRequestEntries, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PublishBatchRequestEntries.${key}`; + entries[loc] = value; + }); + } + return entries; +}; + +const serializeAws_queryPublishBatchRequestEntry = (input: PublishBatchRequestEntry, context: __SerdeContext): any => { + const entries: any = {}; + if (input.Id !== undefined && input.Id !== null) { + entries["Id"] = input.Id; + } + if (input.Message !== undefined && input.Message !== null) { + entries["Message"] = input.Message; + } + if (input.Subject !== undefined && input.Subject !== null) { + entries["Subject"] = input.Subject; + } + if (input.MessageStructure !== undefined && input.MessageStructure !== null) { + entries["MessageStructure"] = input.MessageStructure; + } + if (input.MessageAttributes !== undefined && input.MessageAttributes !== null) { + const memberEntries = serializeAws_queryMessageAttributeMap(input.MessageAttributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageAttributes.${key}`; + entries[loc] = value; + }); + } + if (input.MessageDeduplicationId !== undefined && input.MessageDeduplicationId !== null) { + entries["MessageDeduplicationId"] = input.MessageDeduplicationId; + } + if (input.MessageGroupId !== undefined && input.MessageGroupId !== null) { + entries["MessageGroupId"] = input.MessageGroupId; + } + return entries; +}; + +const serializeAws_queryPublishBatchRequestEntryList = ( + input: PublishBatchRequestEntry[], + context: __SerdeContext +): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = serializeAws_queryPublishBatchRequestEntry(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; + const serializeAws_queryPublishInput = (input: PublishInput, context: __SerdeContext): any => { const entries: any = {}; if (input.TopicArn !== undefined && input.TopicArn !== null) { @@ -5270,6 +5634,68 @@ const deserializeAws_queryAuthorizationErrorException = ( return contents; }; +const deserializeAws_queryBatchEntryIdsNotDistinctException = ( + output: any, + context: __SerdeContext +): BatchEntryIdsNotDistinctException => { + const contents: any = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = __expectString(output["message"]); + } + return contents; +}; + +const deserializeAws_queryBatchRequestTooLongException = ( + output: any, + context: __SerdeContext +): BatchRequestTooLongException => { + const contents: any = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = __expectString(output["message"]); + } + return contents; +}; + +const deserializeAws_queryBatchResultErrorEntry = (output: any, context: __SerdeContext): BatchResultErrorEntry => { + const contents: any = { + Id: undefined, + Code: undefined, + Message: undefined, + SenderFault: undefined, + }; + if (output["Id"] !== undefined) { + contents.Id = __expectString(output["Id"]); + } + if (output["Code"] !== undefined) { + contents.Code = __expectString(output["Code"]); + } + if (output["Message"] !== undefined) { + contents.Message = __expectString(output["Message"]); + } + if (output["SenderFault"] !== undefined) { + contents.SenderFault = __parseBoolean(output["SenderFault"]); + } + return contents; +}; + +const deserializeAws_queryBatchResultErrorEntryList = ( + output: any, + context: __SerdeContext +): BatchResultErrorEntry[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_queryBatchResultErrorEntry(entry, context); + }); +}; + const deserializeAws_queryCheckIfPhoneNumberIsOptedOutResponse = ( output: any, context: __SerdeContext @@ -5358,6 +5784,19 @@ const deserializeAws_queryDeleteSMSSandboxPhoneNumberResult = ( return contents; }; +const deserializeAws_queryEmptyBatchRequestException = ( + output: any, + context: __SerdeContext +): EmptyBatchRequestException => { + const contents: any = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = __expectString(output["message"]); + } + return contents; +}; + const deserializeAws_queryEndpoint = (output: any, context: __SerdeContext): Endpoint => { const contents: any = { EndpointArn: undefined, @@ -5522,6 +5961,19 @@ const deserializeAws_queryInternalErrorException = (output: any, context: __Serd return contents; }; +const deserializeAws_queryInvalidBatchEntryIdException = ( + output: any, + context: __SerdeContext +): InvalidBatchEntryIdException => { + const contents: any = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = __expectString(output["message"]); + } + return contents; +}; + const deserializeAws_queryInvalidParameterException = ( output: any, context: __SerdeContext @@ -5994,6 +6446,64 @@ const deserializeAws_queryPlatformApplicationDisabledException = ( return contents; }; +const deserializeAws_queryPublishBatchResponse = (output: any, context: __SerdeContext): PublishBatchResponse => { + const contents: any = { + Successful: undefined, + Failed: undefined, + }; + if (output.Successful === "") { + contents.Successful = []; + } + if (output["Successful"] !== undefined && output["Successful"]["member"] !== undefined) { + contents.Successful = deserializeAws_queryPublishBatchResultEntryList( + __getArrayIfSingleItem(output["Successful"]["member"]), + context + ); + } + if (output.Failed === "") { + contents.Failed = []; + } + if (output["Failed"] !== undefined && output["Failed"]["member"] !== undefined) { + contents.Failed = deserializeAws_queryBatchResultErrorEntryList( + __getArrayIfSingleItem(output["Failed"]["member"]), + context + ); + } + return contents; +}; + +const deserializeAws_queryPublishBatchResultEntry = (output: any, context: __SerdeContext): PublishBatchResultEntry => { + const contents: any = { + Id: undefined, + MessageId: undefined, + SequenceNumber: undefined, + }; + if (output["Id"] !== undefined) { + contents.Id = __expectString(output["Id"]); + } + if (output["MessageId"] !== undefined) { + contents.MessageId = __expectString(output["MessageId"]); + } + if (output["SequenceNumber"] !== undefined) { + contents.SequenceNumber = __expectString(output["SequenceNumber"]); + } + return contents; +}; + +const deserializeAws_queryPublishBatchResultEntryList = ( + output: any, + context: __SerdeContext +): PublishBatchResultEntry[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_queryPublishBatchResultEntry(entry, context); + }); +}; + const deserializeAws_queryPublishResponse = (output: any, context: __SerdeContext): PublishResponse => { const contents: any = { MessageId: undefined, @@ -6205,6 +6715,19 @@ const deserializeAws_queryThrottledException = (output: any, context: __SerdeCon return contents; }; +const deserializeAws_queryTooManyEntriesInBatchRequestException = ( + output: any, + context: __SerdeContext +): TooManyEntriesInBatchRequestException => { + const contents: any = { + message: undefined, + }; + if (output["message"] !== undefined) { + contents.message = __expectString(output["message"]); + } + return contents; +}; + const deserializeAws_queryTopic = (output: any, context: __SerdeContext): Topic => { const contents: any = { TopicArn: undefined, diff --git a/clients/client-ssm/src/models/models_0.ts b/clients/client-ssm/src/models/models_0.ts index ebd7dcc24293..0dccf93b031a 100644 --- a/clients/client-ssm/src/models/models_0.ts +++ b/clients/client-ssm/src/models/models_0.ts @@ -1057,9 +1057,9 @@ export interface CreateAssociationRequest { AssociationName?: string; /** - *

      Specify the target for the association. This target is required for associations that use an - * Automation runbook and target resources by using rate controls. Automation is a capability of - * Amazon Web Services Systems Manager.

      + *

      Choose the parameter that will define how your automation will branch out. This target is + * required for associations that use an Automation runbook and target resources by using rate + * controls. Automation is a capability of Amazon Web Services Systems Manager.

      */ AutomationTargetParameterName?: string; @@ -1256,9 +1256,9 @@ export interface AssociationDescription { DocumentVersion?: string; /** - *

      Specify the target for the association. This target is required for associations that use an - * Automation runbook and target resources by using rate controls. Automation is a capability of - * Amazon Web Services Systems Manager.

      + *

      Choose the parameter that will define how your automation will branch out. This target is + * required for associations that use an Automation runbook and target resources by using rate + * controls. Automation is a capability of Amazon Web Services Systems Manager.

      */ AutomationTargetParameterName?: string; @@ -3109,6 +3109,7 @@ export enum OperatingSystem { Debian = "DEBIAN", MacOS = "MACOS", OracleLinux = "ORACLE_LINUX", + Raspbian = "RASPBIAN", RedhatEnterpriseLinux = "REDHAT_ENTERPRISE_LINUX", Suse = "SUSE", Ubuntu = "UBUNTU", @@ -9114,7 +9115,7 @@ export interface ParameterStringFilter { *

      The ParameterStringFilter object is used by the DescribeParameters and GetParametersByPath API operations. * However, not all of the pattern values listed for Key can be used with both * operations.

      - *

      For DescribeActions, all of the listed patterns are valid except + *

      For DescribeParameters, all of the listed patterns are valid except * Label.

      *

      For GetParametersByPath, the following patterns listed for Key * aren't valid: tag, DataType, Name, Path, and diff --git a/clients/client-ssm/src/models/models_1.ts b/clients/client-ssm/src/models/models_1.ts index 26f1172eff22..33915cf97918 100644 --- a/clients/client-ssm/src/models/models_1.ts +++ b/clients/client-ssm/src/models/models_1.ts @@ -692,6 +692,11 @@ export interface Session { */ Owner?: string; + /** + *

      The reason for connecting to the instance.

      + */ + Reason?: string; + /** *

      Reserved for future use.

      */ @@ -701,6 +706,11 @@ export interface Session { *

      Reserved for future use.

      */ OutputUrl?: SessionManagerOutputUrl; + + /** + *

      The maximum duration of a session before it terminates.

      + */ + MaxSessionDuration?: string; } export namespace Session { @@ -9668,6 +9678,11 @@ export interface StartSessionRequest { */ DocumentName?: string; + /** + *

      The reason for connecting to the instance. This value is included in the details for the Amazon CloudWatch Events event created when you start the session.

      + */ + Reason?: string; + /** *

      Reserved for future use.

      */ @@ -9981,9 +9996,9 @@ export interface UpdateAssociationRequest { AssociationVersion?: string; /** - *

      Specify the target for the association. This target is required for associations that use an - * Automation runbook and target resources by using rate controls. Automation is a capability of - * Amazon Web Services Systems Manager.

      + *

      Choose the parameter that will define how your automation will branch out. This target is + * required for associations that use an Automation runbook and target resources by using rate + * controls. Automation is a capability of Amazon Web Services Systems Manager.

      */ AutomationTargetParameterName?: string; diff --git a/clients/client-ssm/src/protocols/Aws_json1_1.ts b/clients/client-ssm/src/protocols/Aws_json1_1.ts index 1e635f5a1df0..d57c78952000 100644 --- a/clients/client-ssm/src/protocols/Aws_json1_1.ts +++ b/clients/client-ssm/src/protocols/Aws_json1_1.ts @@ -18149,6 +18149,7 @@ const serializeAws_json1_1StartSessionRequest = (input: StartSessionRequest, con input.Parameters !== null && { Parameters: serializeAws_json1_1SessionManagerParameters(input.Parameters, context), }), + ...(input.Reason !== undefined && input.Reason !== null && { Reason: input.Reason }), ...(input.Target !== undefined && input.Target !== null && { Target: input.Target }), }; }; @@ -24155,11 +24156,13 @@ const deserializeAws_json1_1Session = (output: any, context: __SerdeContext): Se output.EndDate !== undefined && output.EndDate !== null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDate))) : undefined, + MaxSessionDuration: __expectString(output.MaxSessionDuration), OutputUrl: output.OutputUrl !== undefined && output.OutputUrl !== null ? deserializeAws_json1_1SessionManagerOutputUrl(output.OutputUrl, context) : undefined, Owner: __expectString(output.Owner), + Reason: __expectString(output.Reason), SessionId: __expectString(output.SessionId), StartDate: output.StartDate !== undefined && output.StartDate !== null diff --git a/clients/client-transfer/src/models/models_0.ts b/clients/client-transfer/src/models/models_0.ts index 5c32d5116212..b6f9e2e8c96f 100644 --- a/clients/client-transfer/src/models/models_0.ts +++ b/clients/client-transfer/src/models/models_0.ts @@ -589,6 +589,11 @@ export interface IdentityProviderDetails { *

      The identifier of the Amazon Web ServicesDirectory Service directory that you want to stop sharing.

      */ DirectoryId?: string; + + /** + *

      The ARN for a lambda function to use for the Identity provider.

      + */ + Function?: string; } export namespace IdentityProviderDetails { @@ -603,6 +608,7 @@ export namespace IdentityProviderDetails { export enum IdentityProviderType { API_GATEWAY = "API_GATEWAY", AWS_DIRECTORY_SERVICE = "AWS_DIRECTORY_SERVICE", + AWS_LAMBDA = "AWS_LAMBDA", SERVICE_MANAGED = "SERVICE_MANAGED", } @@ -808,6 +814,8 @@ export interface CreateServerRequest { *

      Use the API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call * for authentication using the IdentityProviderDetails parameter.

      + *

      Use the LAMBDA value to directly use a Lambda function as your identity provider. If you choose this value, + * you must specify the ARN for the lambda function in the Function parameter for the IdentityProviderDetails data type.

      */ IdentityProviderType?: IdentityProviderType | string; @@ -2069,6 +2077,8 @@ export interface DescribedServer { *

      Use the API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call * for authentication using the IdentityProviderDetails parameter.

      + *

      Use the LAMBDA value to directly use a Lambda function as your identity provider. If you choose this value, + * you must specify the ARN for the lambda function in the Function parameter for the IdentityProviderDetails data type.

      */ IdentityProviderType?: IdentityProviderType | string; @@ -2757,6 +2767,8 @@ export interface ListedServer { *

      Use the API_GATEWAY value to integrate with an identity provider of your choosing. The * API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call * for authentication using the IdentityProviderDetails parameter.

      + *

      Use the LAMBDA value to directly use a Lambda function as your identity provider. If you choose this value, + * you must specify the ARN for the lambda function in the Function parameter for the IdentityProviderDetails data type.

      */ IdentityProviderType?: IdentityProviderType | string; diff --git a/clients/client-transfer/src/protocols/Aws_json1_1.ts b/clients/client-transfer/src/protocols/Aws_json1_1.ts index b617a5b626dd..2e10d0a45aa9 100644 --- a/clients/client-transfer/src/protocols/Aws_json1_1.ts +++ b/clients/client-transfer/src/protocols/Aws_json1_1.ts @@ -3637,6 +3637,7 @@ const serializeAws_json1_1HomeDirectoryMappings = (input: HomeDirectoryMapEntry[ const serializeAws_json1_1IdentityProviderDetails = (input: IdentityProviderDetails, context: __SerdeContext): any => { return { ...(input.DirectoryId !== undefined && input.DirectoryId !== null && { DirectoryId: input.DirectoryId }), + ...(input.Function !== undefined && input.Function !== null && { Function: input.Function }), ...(input.InvocationRole !== undefined && input.InvocationRole !== null && { InvocationRole: input.InvocationRole }), ...(input.Url !== undefined && input.Url !== null && { Url: input.Url }), @@ -4424,6 +4425,7 @@ const deserializeAws_json1_1IdentityProviderDetails = ( ): IdentityProviderDetails => { return { DirectoryId: __expectString(output.DirectoryId), + Function: __expectString(output.Function), InvocationRole: __expectString(output.InvocationRole), Url: __expectString(output.Url), } as any; diff --git a/clients/client-wafv2/src/WAFV2.ts b/clients/client-wafv2/src/WAFV2.ts index ede6a4b3917a..f48a5bd2ae11 100644 --- a/clients/client-wafv2/src/WAFV2.ts +++ b/clients/client-wafv2/src/WAFV2.ts @@ -1406,28 +1406,20 @@ export class WAFV2 extends WAFV2Client { * steps:

      *
        *
      1. - *

        Create an Amazon Kinesis Data Firehose.

        - *

        Create the data firehose with a PUT source and in the Region that you are - * operating. If you are capturing logs for Amazon CloudFront, always create the firehose in US - * East (N. Virginia).

        - *

        Give the data firehose a name that starts with the prefix - * aws-waf-logs-. For example, - * aws-waf-logs-us-east-2-analytics.

        - * - *

        Do not create the data firehose using a Kinesis stream as your - * source.

        - *
        + *

        Create your logging destination. You can use an Amazon CloudWatch Logs log group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon Kinesis Data Firehose. + * For information about configuring logging destinations and the permissions that are required for each, see + * Logging web ACL traffic information + * in the WAF Developer Guide.

        *
      2. *
      3. - *

        Associate that firehose to your web ACL using a + *

        Associate your logging destination to your web ACL using a * PutLoggingConfiguration request.

        *
      4. *
      *

      When you successfully enable logging using a PutLoggingConfiguration - * request, WAF will create a service linked role with the necessary permissions to write - * logs to the Amazon Kinesis Data Firehose. For more information, see Logging Web ACL - * Traffic Information in the WAF Developer - * Guide.

      + * request, WAF creates an additional role or policy that is required to write + * logs to the logging destination. For an Amazon CloudWatch Logs log group, WAF creates a resource policy on the log group. + * For an Amazon S3 bucket, WAF creates a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked role.

      * *

      This operation completely replaces the mutable specifications that you already have for the logging configuration with the ones that you provide to this call. To modify the logging configuration, retrieve it by calling GetLoggingConfiguration, update the settings as needed, and then provide the complete logging configuration specification to this call.

      *
      diff --git a/clients/client-wafv2/src/commands/PutLoggingConfigurationCommand.ts b/clients/client-wafv2/src/commands/PutLoggingConfigurationCommand.ts index 9432f8cd2f16..d0a5bf6075a3 100644 --- a/clients/client-wafv2/src/commands/PutLoggingConfigurationCommand.ts +++ b/clients/client-wafv2/src/commands/PutLoggingConfigurationCommand.ts @@ -28,28 +28,20 @@ export interface PutLoggingConfigurationCommandOutput extends PutLoggingConfigur * steps:

      *
        *
      1. - *

        Create an Amazon Kinesis Data Firehose.

        - *

        Create the data firehose with a PUT source and in the Region that you are - * operating. If you are capturing logs for Amazon CloudFront, always create the firehose in US - * East (N. Virginia).

        - *

        Give the data firehose a name that starts with the prefix - * aws-waf-logs-. For example, - * aws-waf-logs-us-east-2-analytics.

        - * - *

        Do not create the data firehose using a Kinesis stream as your - * source.

        - *
        + *

        Create your logging destination. You can use an Amazon CloudWatch Logs log group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon Kinesis Data Firehose. + * For information about configuring logging destinations and the permissions that are required for each, see + * Logging web ACL traffic information + * in the WAF Developer Guide.

        *
      2. *
      3. - *

        Associate that firehose to your web ACL using a + *

        Associate your logging destination to your web ACL using a * PutLoggingConfiguration request.

        *
      4. *
      *

      When you successfully enable logging using a PutLoggingConfiguration - * request, WAF will create a service linked role with the necessary permissions to write - * logs to the Amazon Kinesis Data Firehose. For more information, see Logging Web ACL - * Traffic Information in the WAF Developer - * Guide.

      + * request, WAF creates an additional role or policy that is required to write + * logs to the logging destination. For an Amazon CloudWatch Logs log group, WAF creates a resource policy on the log group. + * For an Amazon S3 bucket, WAF creates a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked role.

      * *

      This operation completely replaces the mutable specifications that you already have for the logging configuration with the ones that you provide to this call. To modify the logging configuration, retrieve it by calling GetLoggingConfiguration, update the settings as needed, and then provide the complete logging configuration specification to this call.

      *
      diff --git a/clients/client-wafv2/src/models/models_0.ts b/clients/client-wafv2/src/models/models_0.ts index 559dcf5f74e9..588382dc2f6b 100644 --- a/clients/client-wafv2/src/models/models_0.ts +++ b/clients/client-wafv2/src/models/models_0.ts @@ -1635,6 +1635,7 @@ export enum ParameterExceptionField { JSON_MATCH_SCOPE = "JSON_MATCH_SCOPE", LABEL_MATCH_STATEMENT = "LABEL_MATCH_STATEMENT", LOGGING_FILTER = "LOGGING_FILTER", + LOG_DESTINATION = "LOG_DESTINATION", MANAGED_RULE_SET = "MANAGED_RULE_SET", MANAGED_RULE_SET_STATEMENT = "MANAGED_RULE_SET_STATEMENT", METRIC_NAME = "METRIC_NAME", @@ -3480,10 +3481,13 @@ export namespace LoggingFilter { } /** - *

      Defines an association between Amazon Kinesis Data Firehose destinations and a web ACL + *

      Defines an association between logging destinations and a web ACL * resource, for logging from WAF. As part of the association, you can specify parts of * the standard logging fields to keep out of the logs and you can specify filters so that you * log only a subset of the logging records.

      + *

      For information about configuring web ACL logging destinations, see + * Logging web ACL traffic information + * in the WAF Developer Guide.

      */ export interface LoggingConfiguration { /** @@ -3493,14 +3497,14 @@ export interface LoggingConfiguration { ResourceArn: string | undefined; /** - *

      The Amazon Kinesis Data Firehose Amazon Resource Name (ARNs) that you want to associate + *

      The Amazon Resource Names (ARNs) of the logging destinations that you want to associate * with the web ACL.

      */ LogDestinationConfigs: string[] | undefined; /** *

      The parts of the request that you want to keep out of the logs. For - * example, if you redact the SingleHeader field, the HEADER field in the firehose will be xxx.

      + * example, if you redact the SingleHeader field, the HEADER field in the logs will be xxx.

      * *

      You can specify only the following fields for redaction: UriPath, QueryString, SingleHeader, Method, and JsonBody.

      *
      @@ -5169,6 +5173,26 @@ export namespace PutLoggingConfigurationResponse { }); } +/** + *

      The operation failed because you don't have the permissions that your logging configuration requires. For information, see + * Logging web ACL traffic information + * in the WAF Developer Guide.

      + */ +export interface WAFLogDestinationPermissionIssueException extends __SmithyException, $MetadataBearer { + name: "WAFLogDestinationPermissionIssueException"; + $fault: "client"; + Message?: string; +} + +export namespace WAFLogDestinationPermissionIssueException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: WAFLogDestinationPermissionIssueException): any => ({ + ...obj, + }); +} + /** *

      WAF is not able to access the service linked role. This can be caused by a * previous PutLoggingConfiguration request, which can lock the service linked diff --git a/clients/client-wafv2/src/protocols/Aws_json1_1.ts b/clients/client-wafv2/src/protocols/Aws_json1_1.ts index 08ddc45224d6..12bc9a10442a 100644 --- a/clients/client-wafv2/src/protocols/Aws_json1_1.ts +++ b/clients/client-wafv2/src/protocols/Aws_json1_1.ts @@ -307,6 +307,7 @@ import { WAFInvalidPermissionPolicyException, WAFInvalidResourceException, WAFLimitsExceededException, + WAFLogDestinationPermissionIssueException, WAFNonexistentItemException, WAFOptimisticLockException, WAFServiceLinkedRoleErrorException, @@ -4015,6 +4016,14 @@ const deserializeAws_json1_1PutLoggingConfigurationCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "WAFLogDestinationPermissionIssueException": + case "com.amazonaws.wafv2#WAFLogDestinationPermissionIssueException": + response = { + ...(await deserializeAws_json1_1WAFLogDestinationPermissionIssueExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "WAFNonexistentItemException": case "com.amazonaws.wafv2#WAFNonexistentItemException": response = { @@ -5093,6 +5102,21 @@ const deserializeAws_json1_1WAFLimitsExceededExceptionResponse = async ( return contents; }; +const deserializeAws_json1_1WAFLogDestinationPermissionIssueExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_1WAFLogDestinationPermissionIssueException(body, context); + const contents: WAFLogDestinationPermissionIssueException = { + name: "WAFLogDestinationPermissionIssueException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }; + return contents; +}; + const deserializeAws_json1_1WAFNonexistentItemExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -8375,6 +8399,15 @@ const deserializeAws_json1_1WAFLimitsExceededException = ( } as any; }; +const deserializeAws_json1_1WAFLogDestinationPermissionIssueException = ( + output: any, + context: __SerdeContext +): WAFLogDestinationPermissionIssueException => { + return { + Message: __expectString(output.Message), + } as any; +}; + const deserializeAws_json1_1WAFNonexistentItemException = ( output: any, context: __SerdeContext diff --git a/codegen/sdk-codegen/aws-models/amplifybackend.json b/codegen/sdk-codegen/aws-models/amplifybackend.json index 052049f3a0f5..16803c19a6e7 100644 --- a/codegen/sdk-codegen/aws-models/amplifybackend.json +++ b/codegen/sdk-codegen/aws-models/amplifybackend.json @@ -54,6 +54,21 @@ }, "com.amazonaws.amplifybackend#AmplifyBackend": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "AmplifyBackend", + "arnNamespace": "amplifybackend", + "cloudFormationName": "AmplifyBackend", + "cloudTrailEventSource": "amplifybackend.amazonaws.com", + "endpointPrefix": "amplifybackend" + }, + "aws.auth#sigv4": { + "name": "amplifybackend" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

      AWS Amplify Admin API

      ", + "smithy.api#title": "AmplifyBackend" + }, "version": "2020-08-11", "operations": [ { @@ -71,6 +86,9 @@ { "target": "com.amazonaws.amplifybackend#CreateBackendConfig" }, + { + "target": "com.amazonaws.amplifybackend#CreateBackendStorage" + }, { "target": "com.amazonaws.amplifybackend#CreateToken" }, @@ -83,6 +101,9 @@ { "target": "com.amazonaws.amplifybackend#DeleteBackendAuth" }, + { + "target": "com.amazonaws.amplifybackend#DeleteBackendStorage" + }, { "target": "com.amazonaws.amplifybackend#DeleteToken" }, @@ -104,15 +125,24 @@ { "target": "com.amazonaws.amplifybackend#GetBackendJob" }, + { + "target": "com.amazonaws.amplifybackend#GetBackendStorage" + }, { "target": "com.amazonaws.amplifybackend#GetToken" }, { "target": "com.amazonaws.amplifybackend#ImportBackendAuth" }, + { + "target": "com.amazonaws.amplifybackend#ImportBackendStorage" + }, { "target": "com.amazonaws.amplifybackend#ListBackendJobs" }, + { + "target": "com.amazonaws.amplifybackend#ListS3Buckets" + }, { "target": "com.amazonaws.amplifybackend#RemoveAllBackends" }, @@ -130,23 +160,11 @@ }, { "target": "com.amazonaws.amplifybackend#UpdateBackendJob" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "AmplifyBackend", - "arnNamespace": "amplifybackend", - "cloudFormationName": "AmplifyBackend", - "cloudTrailEventSource": "amplifybackend.amazonaws.com", - "endpointPrefix": "amplifybackend" - }, - "aws.auth#sigv4": { - "name": "amplifybackend" }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

      AWS Amplify Admin API

      ", - "smithy.api#title": "AmplifyBackend" - } + { + "target": "com.amazonaws.amplifybackend#UpdateBackendStorage" + } + ] }, "com.amazonaws.amplifybackend#AuthResources": { "type": "string", @@ -163,6 +181,25 @@ ] } }, + "com.amazonaws.amplifybackend#AuthenticatedElement": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "READ", + "name": "READ" + }, + { + "value": "CREATE_AND_UPDATE", + "name": "CREATE_AND_UPDATE" + }, + { + "value": "DELETE", + "name": "DELETE" + } + ] + } + }, "com.amazonaws.amplifybackend#BackendAPIAppSyncAuthSettings": { "type": "structure", "members": { @@ -438,6 +475,29 @@ "smithy.api#documentation": "

      The response object for this operation.

      " } }, + "com.amazonaws.amplifybackend#BackendStoragePermissions": { + "type": "structure", + "members": { + "Authenticated": { + "target": "com.amazonaws.amplifybackend#ListOfAuthenticatedElement", + "traits": { + "smithy.api#documentation": "

      Lists all authenticated user read, write, and delete permissions for your S3 bucket.

      ", + "smithy.api#jsonName": "authenticated", + "smithy.api#required": {} + } + }, + "UnAuthenticated": { + "target": "com.amazonaws.amplifybackend#ListOfUnAuthenticatedElement", + "traits": { + "smithy.api#documentation": "

      Lists all unauthenticated user read, write, and delete permissions for your S3 bucket.

      ", + "smithy.api#jsonName": "unAuthenticated" + } + } + }, + "traits": { + "smithy.api#documentation": "

      Describes the read, write, and delete permissions users have against your storage S3 bucket.

      " + } + }, "com.amazonaws.amplifybackend#BadRequestException": { "type": "structure", "members": { @@ -1201,7 +1261,7 @@ "ResourceConfig": { "target": "com.amazonaws.amplifybackend#ResourceConfig", "traits": { - "smithy.api#documentation": "

      The resource configuration for the create backend request.

      ", + "smithy.api#documentation": "

      The resource configuration for creating backend storage.

      ", "smithy.api#jsonName": "resourceConfig" } }, @@ -1264,6 +1324,141 @@ } } }, + "com.amazonaws.amplifybackend#CreateBackendStorage": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifybackend#CreateBackendStorageRequest" + }, + "output": { + "target": "com.amazonaws.amplifybackend#CreateBackendStorageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifybackend#BadRequestException" + }, + { + "target": "com.amazonaws.amplifybackend#GatewayTimeoutException" + }, + { + "target": "com.amazonaws.amplifybackend#NotFoundException" + }, + { + "target": "com.amazonaws.amplifybackend#TooManyRequestsException" + } + ], + "traits": { + "smithy.api#documentation": "

      Creates a backend storage resource.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/backend/{AppId}/storage", + "code": 200 + } + } + }, + "com.amazonaws.amplifybackend#CreateBackendStorageRequest": { + "type": "structure", + "members": { + "AppId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "BackendEnvironmentName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the backend environment.

      ", + "smithy.api#jsonName": "backendEnvironmentName", + "smithy.api#required": {} + } + }, + "ResourceConfig": { + "target": "com.amazonaws.amplifybackend#CreateBackendStorageResourceConfig", + "traits": { + "smithy.api#documentation": "

      The resource configuration for creating backend storage.

      ", + "smithy.api#jsonName": "resourceConfig", + "smithy.api#required": {} + } + }, + "ResourceName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the storage resource.

      ", + "smithy.api#jsonName": "resourceName", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The request body for CreateBackendStorage.

      " + } + }, + "com.amazonaws.amplifybackend#CreateBackendStorageResourceConfig": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the S3 bucket.

      ", + "smithy.api#jsonName": "bucketName" + } + }, + "Permissions": { + "target": "com.amazonaws.amplifybackend#BackendStoragePermissions", + "traits": { + "smithy.api#documentation": "

      The authorization configuration for the storage S3 bucket.

      ", + "smithy.api#jsonName": "permissions", + "smithy.api#required": {} + } + }, + "ServiceName": { + "target": "com.amazonaws.amplifybackend#ServiceName", + "traits": { + "smithy.api#documentation": "

      The name of the storage service.

      ", + "smithy.api#jsonName": "serviceName", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The resource configuration for creating backend storage.

      " + } + }, + "com.amazonaws.amplifybackend#CreateBackendStorageResponse": { + "type": "structure", + "members": { + "AppId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#jsonName": "appId" + } + }, + "BackendEnvironmentName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the backend environment.

      ", + "smithy.api#jsonName": "backendEnvironmentName" + } + }, + "JobId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The ID for the job.

      ", + "smithy.api#jsonName": "jobId" + } + }, + "Status": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The current status of the request.

      ", + "smithy.api#jsonName": "status" + } + } + } + }, "com.amazonaws.amplifybackend#CreateToken": { "type": "operation", "input": { @@ -1667,13 +1862,13 @@ } } }, - "com.amazonaws.amplifybackend#DeleteToken": { + "com.amazonaws.amplifybackend#DeleteBackendStorage": { "type": "operation", "input": { - "target": "com.amazonaws.amplifybackend#DeleteTokenRequest" + "target": "com.amazonaws.amplifybackend#DeleteBackendStorageRequest" }, "output": { - "target": "com.amazonaws.amplifybackend#DeleteTokenResponse" + "target": "com.amazonaws.amplifybackend#DeleteBackendStorageResponse" }, "errors": [ { @@ -1690,15 +1885,15 @@ } ], "traits": { - "smithy.api#documentation": "

      Deletes the challenge token based on the given appId and sessionId.

      ", + "smithy.api#documentation": "

      Removes the specified backend storage resource.

      ", "smithy.api#http": { "method": "POST", - "uri": "/backend/{AppId}/challenge/{SessionId}/remove", + "uri": "/backend/{AppId}/storage/{BackendEnvironmentName}/remove", "code": 200 } } }, - "com.amazonaws.amplifybackend#DeleteTokenRequest": { + "com.amazonaws.amplifybackend#DeleteBackendStorageRequest": { "type": "structure", "members": { "AppId": { @@ -1709,78 +1904,182 @@ "smithy.api#required": {} } }, - "SessionId": { + "BackendEnvironmentName": { "target": "com.amazonaws.amplifybackend#__string", "traits": { - "smithy.api#documentation": "

      The session ID.

      ", + "smithy.api#documentation": "

      The name of the backend environment.

      ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } - } - } - }, - "com.amazonaws.amplifybackend#DeleteTokenResponse": { - "type": "structure", - "members": { - "IsSuccess": { - "target": "com.amazonaws.amplifybackend#__boolean", + }, + "ResourceName": { + "target": "com.amazonaws.amplifybackend#__string", "traits": { - "smithy.api#documentation": "

      Indicates whether the request succeeded or failed.

      ", - "smithy.api#jsonName": "isSuccess" + "smithy.api#documentation": "

      The name of the storage resource.

      ", + "smithy.api#jsonName": "resourceName", + "smithy.api#required": {} + } + }, + "ServiceName": { + "target": "com.amazonaws.amplifybackend#ServiceName", + "traits": { + "smithy.api#documentation": "

      The name of the storage service.

      ", + "smithy.api#jsonName": "serviceName", + "smithy.api#required": {} } } - } - }, - "com.amazonaws.amplifybackend#DeliveryMethod": { - "type": "string", + }, "traits": { - "smithy.api#enum": [ - { - "value": "EMAIL", - "name": "EMAIL" - }, - { - "value": "SMS", - "name": "SMS" - } - ] + "smithy.api#documentation": "

      The request body for DeleteBackendStorage.

      " } }, - "com.amazonaws.amplifybackend#EmailSettings": { + "com.amazonaws.amplifybackend#DeleteBackendStorageResponse": { "type": "structure", "members": { - "EmailMessage": { + "AppId": { "target": "com.amazonaws.amplifybackend#__string", "traits": { - "smithy.api#documentation": "

      The body of the email.

      ", - "smithy.api#jsonName": "emailMessage" + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#jsonName": "appId" } }, - "EmailSubject": { + "BackendEnvironmentName": { "target": "com.amazonaws.amplifybackend#__string", "traits": { - "smithy.api#documentation": "

      The subject of the email.

      ", - "smithy.api#jsonName": "emailSubject" + "smithy.api#documentation": "

      The name of the backend environment.

      ", + "smithy.api#jsonName": "backendEnvironmentName" } - } - }, - "traits": { - "smithy.api#documentation": "

      The configuration for the email sent when an app user forgets their password.

      " - } - }, - "com.amazonaws.amplifybackend#GatewayTimeoutException": { - "type": "structure", - "members": { - "Message": { + }, + "JobId": { "target": "com.amazonaws.amplifybackend#__string", "traits": { - "smithy.api#documentation": "

      An error message to inform that the request failed.

      ", - "smithy.api#jsonName": "message" + "smithy.api#documentation": "

      The ID for the job.

      ", + "smithy.api#jsonName": "jobId" } - } - }, - "traits": { - "smithy.api#documentation": "

      An error returned if there's a temporary issue with the service.

      ", + }, + "Status": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The current status of the request.

      ", + "smithy.api#jsonName": "status" + } + } + } + }, + "com.amazonaws.amplifybackend#DeleteToken": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifybackend#DeleteTokenRequest" + }, + "output": { + "target": "com.amazonaws.amplifybackend#DeleteTokenResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifybackend#BadRequestException" + }, + { + "target": "com.amazonaws.amplifybackend#GatewayTimeoutException" + }, + { + "target": "com.amazonaws.amplifybackend#NotFoundException" + }, + { + "target": "com.amazonaws.amplifybackend#TooManyRequestsException" + } + ], + "traits": { + "smithy.api#documentation": "

      Deletes the challenge token based on the given appId and sessionId.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/backend/{AppId}/challenge/{SessionId}/remove", + "code": 200 + } + } + }, + "com.amazonaws.amplifybackend#DeleteTokenRequest": { + "type": "structure", + "members": { + "AppId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "SessionId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The session ID.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifybackend#DeleteTokenResponse": { + "type": "structure", + "members": { + "IsSuccess": { + "target": "com.amazonaws.amplifybackend#__boolean", + "traits": { + "smithy.api#documentation": "

      Indicates whether the request succeeded or failed.

      ", + "smithy.api#jsonName": "isSuccess" + } + } + } + }, + "com.amazonaws.amplifybackend#DeliveryMethod": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EMAIL", + "name": "EMAIL" + }, + { + "value": "SMS", + "name": "SMS" + } + ] + } + }, + "com.amazonaws.amplifybackend#EmailSettings": { + "type": "structure", + "members": { + "EmailMessage": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The body of the email.

      ", + "smithy.api#jsonName": "emailMessage" + } + }, + "EmailSubject": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The subject of the email.

      ", + "smithy.api#jsonName": "emailSubject" + } + } + }, + "traits": { + "smithy.api#documentation": "

      The configuration for the email sent when an app user forgets their password.

      " + } + }, + "com.amazonaws.amplifybackend#GatewayTimeoutException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      An error message to inform that the request failed.

      ", + "smithy.api#jsonName": "message" + } + } + }, + "traits": { + "smithy.api#documentation": "

      An error returned if there's a temporary issue with the service.

      ", "smithy.api#error": "server", "smithy.api#httpError": 504 } @@ -2419,6 +2718,140 @@ } } }, + "com.amazonaws.amplifybackend#GetBackendStorage": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifybackend#GetBackendStorageRequest" + }, + "output": { + "target": "com.amazonaws.amplifybackend#GetBackendStorageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifybackend#BadRequestException" + }, + { + "target": "com.amazonaws.amplifybackend#GatewayTimeoutException" + }, + { + "target": "com.amazonaws.amplifybackend#NotFoundException" + }, + { + "target": "com.amazonaws.amplifybackend#TooManyRequestsException" + } + ], + "traits": { + "smithy.api#documentation": "

      Gets details for a backend storage resource.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/backend/{AppId}/storage/{BackendEnvironmentName}/details", + "code": 200 + } + } + }, + "com.amazonaws.amplifybackend#GetBackendStorageRequest": { + "type": "structure", + "members": { + "AppId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "BackendEnvironmentName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the backend environment.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ResourceName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the storage resource.

      ", + "smithy.api#jsonName": "resourceName", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The request body for GetBackendStorage.

      " + } + }, + "com.amazonaws.amplifybackend#GetBackendStorageResourceConfig": { + "type": "structure", + "members": { + "BucketName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the S3 bucket.

      ", + "smithy.api#jsonName": "bucketName" + } + }, + "Imported": { + "target": "com.amazonaws.amplifybackend#__boolean", + "traits": { + "smithy.api#documentation": "

      Returns True if the storage resource has been imported.

      ", + "smithy.api#jsonName": "imported", + "smithy.api#required": {} + } + }, + "Permissions": { + "target": "com.amazonaws.amplifybackend#BackendStoragePermissions", + "traits": { + "smithy.api#documentation": "

      The authorization configuration for the storage S3 bucket.

      ", + "smithy.api#jsonName": "permissions" + } + }, + "ServiceName": { + "target": "com.amazonaws.amplifybackend#ServiceName", + "traits": { + "smithy.api#documentation": "

      The name of the storage service.

      ", + "smithy.api#jsonName": "serviceName", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The details for a backend storage resource.

      " + } + }, + "com.amazonaws.amplifybackend#GetBackendStorageResponse": { + "type": "structure", + "members": { + "AppId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#jsonName": "appId" + } + }, + "BackendEnvironmentName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the backend environment.

      ", + "smithy.api#jsonName": "backendEnvironmentName" + } + }, + "ResourceConfig": { + "target": "com.amazonaws.amplifybackend#GetBackendStorageResourceConfig", + "traits": { + "smithy.api#documentation": "

      The resource configuration for the backend storage resource.

      ", + "smithy.api#jsonName": "resourceConfig" + } + }, + "ResourceName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the storage resource.

      ", + "smithy.api#jsonName": "resourceName" + } + } + } + }, "com.amazonaws.amplifybackend#GetToken": { "type": "operation", "input": { @@ -2495,22 +2928,155 @@ "smithy.api#jsonName": "sessionId" } }, - "Ttl": { + "Ttl": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The expiry time for the one-time generated token code.

      ", + "smithy.api#jsonName": "ttl" + } + } + } + }, + "com.amazonaws.amplifybackend#ImportBackendAuth": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifybackend#ImportBackendAuthRequest" + }, + "output": { + "target": "com.amazonaws.amplifybackend#ImportBackendAuthResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifybackend#BadRequestException" + }, + { + "target": "com.amazonaws.amplifybackend#GatewayTimeoutException" + }, + { + "target": "com.amazonaws.amplifybackend#NotFoundException" + }, + { + "target": "com.amazonaws.amplifybackend#TooManyRequestsException" + } + ], + "traits": { + "smithy.api#documentation": "

      Imports an existing backend authentication resource.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/backend/{AppId}/auth/{BackendEnvironmentName}/import", + "code": 200 + } + } + }, + "com.amazonaws.amplifybackend#ImportBackendAuthRequest": { + "type": "structure", + "members": { + "AppId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "BackendEnvironmentName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the backend environment.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "IdentityPoolId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Cognito identity pool.

      ", + "smithy.api#jsonName": "identityPoolId" + } + }, + "NativeClientId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Cognito native client.

      ", + "smithy.api#jsonName": "nativeClientId", + "smithy.api#required": {} + } + }, + "UserPoolId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Cognito user pool.

      ", + "smithy.api#jsonName": "userPoolId", + "smithy.api#required": {} + } + }, + "WebClientId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Cognito web client.

      ", + "smithy.api#jsonName": "webClientId", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The request body for ImportBackendAuth.

      " + } + }, + "com.amazonaws.amplifybackend#ImportBackendAuthResponse": { + "type": "structure", + "members": { + "AppId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#jsonName": "appId" + } + }, + "BackendEnvironmentName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the backend environment.

      ", + "smithy.api#jsonName": "backendEnvironmentName" + } + }, + "Error": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      If the request fails, this error is returned.

      ", + "smithy.api#jsonName": "error" + } + }, + "JobId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The ID for the job.

      ", + "smithy.api#jsonName": "jobId" + } + }, + "Operation": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the operation.

      ", + "smithy.api#jsonName": "operation" + } + }, + "Status": { "target": "com.amazonaws.amplifybackend#__string", "traits": { - "smithy.api#documentation": "

      The expiry time for the one-time generated token code.

      ", - "smithy.api#jsonName": "ttl" + "smithy.api#documentation": "

      The current status of the request.

      ", + "smithy.api#jsonName": "status" } } } }, - "com.amazonaws.amplifybackend#ImportBackendAuth": { + "com.amazonaws.amplifybackend#ImportBackendStorage": { "type": "operation", "input": { - "target": "com.amazonaws.amplifybackend#ImportBackendAuthRequest" + "target": "com.amazonaws.amplifybackend#ImportBackendStorageRequest" }, "output": { - "target": "com.amazonaws.amplifybackend#ImportBackendAuthResponse" + "target": "com.amazonaws.amplifybackend#ImportBackendStorageResponse" }, "errors": [ { @@ -2527,15 +3093,15 @@ } ], "traits": { - "smithy.api#documentation": "

      Imports an existing backend authentication resource.

      ", + "smithy.api#documentation": "

      Imports an existing backend storage resource.

      ", "smithy.api#http": { "method": "POST", - "uri": "/backend/{AppId}/auth/{BackendEnvironmentName}/import", + "uri": "/backend/{AppId}/storage/{BackendEnvironmentName}/import", "code": 200 } } }, - "com.amazonaws.amplifybackend#ImportBackendAuthRequest": { + "com.amazonaws.amplifybackend#ImportBackendStorageRequest": { "type": "structure", "members": { "AppId": { @@ -2554,43 +3120,27 @@ "smithy.api#required": {} } }, - "IdentityPoolId": { - "target": "com.amazonaws.amplifybackend#__string", - "traits": { - "smithy.api#documentation": "

      The ID of the Amazon Cognito identity pool.

      ", - "smithy.api#jsonName": "identityPoolId" - } - }, - "NativeClientId": { - "target": "com.amazonaws.amplifybackend#__string", - "traits": { - "smithy.api#documentation": "

      The ID of the Amazon Cognito native client.

      ", - "smithy.api#jsonName": "nativeClientId", - "smithy.api#required": {} - } - }, - "UserPoolId": { + "BucketName": { "target": "com.amazonaws.amplifybackend#__string", "traits": { - "smithy.api#documentation": "

      The ID of the Amazon Cognito user pool.

      ", - "smithy.api#jsonName": "userPoolId", - "smithy.api#required": {} + "smithy.api#documentation": "

      The name of the S3 bucket.

      ", + "smithy.api#jsonName": "bucketName" } }, - "WebClientId": { - "target": "com.amazonaws.amplifybackend#__string", + "ServiceName": { + "target": "com.amazonaws.amplifybackend#ServiceName", "traits": { - "smithy.api#documentation": "

      The ID of the Amazon Cognito web client.

      ", - "smithy.api#jsonName": "webClientId", + "smithy.api#documentation": "

      The name of the storage service.

      ", + "smithy.api#jsonName": "serviceName", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

      The request body for ImportBackendAuth.

      " + "smithy.api#documentation": "

      The request body for ImportBackendStorage.

      " } }, - "com.amazonaws.amplifybackend#ImportBackendAuthResponse": { + "com.amazonaws.amplifybackend#ImportBackendStorageResponse": { "type": "structure", "members": { "AppId": { @@ -2607,13 +3157,6 @@ "smithy.api#jsonName": "backendEnvironmentName" } }, - "Error": { - "target": "com.amazonaws.amplifybackend#__string", - "traits": { - "smithy.api#documentation": "

      If the request fails, this error is returned.

      ", - "smithy.api#jsonName": "error" - } - }, "JobId": { "target": "com.amazonaws.amplifybackend#__string", "traits": { @@ -2621,13 +3164,6 @@ "smithy.api#jsonName": "jobId" } }, - "Operation": { - "target": "com.amazonaws.amplifybackend#__string", - "traits": { - "smithy.api#documentation": "

      The name of the operation.

      ", - "smithy.api#jsonName": "operation" - } - }, "Status": { "target": "com.amazonaws.amplifybackend#__string", "traits": { @@ -2752,6 +3288,12 @@ "target": "com.amazonaws.amplifybackend#AdditionalConstraintsElement" } }, + "com.amazonaws.amplifybackend#ListOfAuthenticatedElement": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifybackend#AuthenticatedElement" + } + }, "com.amazonaws.amplifybackend#ListOfBackendAPIAuthType": { "type": "list", "member": { @@ -2782,12 +3324,89 @@ "target": "com.amazonaws.amplifybackend#RequiredSignUpAttributesElement" } }, + "com.amazonaws.amplifybackend#ListOfS3BucketInfo": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifybackend#S3BucketInfo" + } + }, + "com.amazonaws.amplifybackend#ListOfUnAuthenticatedElement": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifybackend#UnAuthenticatedElement" + } + }, "com.amazonaws.amplifybackend#ListOf__string": { "type": "list", "member": { "target": "com.amazonaws.amplifybackend#__string" } }, + "com.amazonaws.amplifybackend#ListS3Buckets": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifybackend#ListS3BucketsRequest" + }, + "output": { + "target": "com.amazonaws.amplifybackend#ListS3BucketsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifybackend#BadRequestException" + }, + { + "target": "com.amazonaws.amplifybackend#GatewayTimeoutException" + }, + { + "target": "com.amazonaws.amplifybackend#NotFoundException" + }, + { + "target": "com.amazonaws.amplifybackend#TooManyRequestsException" + } + ], + "traits": { + "smithy.api#documentation": "

      The list of S3 buckets in your account.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/s3Buckets", + "code": 200 + } + } + }, + "com.amazonaws.amplifybackend#ListS3BucketsRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      Reserved for future use.

      ", + "smithy.api#jsonName": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "

      The request body for S3Buckets.

      " + } + }, + "com.amazonaws.amplifybackend#ListS3BucketsResponse": { + "type": "structure", + "members": { + "Buckets": { + "target": "com.amazonaws.amplifybackend#ListOfS3BucketInfo", + "traits": { + "smithy.api#documentation": "

      The list of S3 buckets.

      ", + "smithy.api#jsonName": "buckets" + } + }, + "NextToken": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      Reserved for future use.

      ", + "smithy.api#jsonName": "nextToken" + } + } + } + }, "com.amazonaws.amplifybackend#LoginAuthConfigReqObj": { "type": "structure", "members": { @@ -3202,6 +3821,28 @@ "smithy.api#documentation": "

      Defines the resource configuration for the data model in your Amplify project.

      " } }, + "com.amazonaws.amplifybackend#S3BucketInfo": { + "type": "structure", + "members": { + "CreationDate": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The creation date of the S3 bucket.

      ", + "smithy.api#jsonName": "creationDate" + } + }, + "Name": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the S3 bucket.

      ", + "smithy.api#jsonName": "name" + } + } + }, + "traits": { + "smithy.api#documentation": "

      Describes the metadata of the S3 bucket.

      " + } + }, "com.amazonaws.amplifybackend#Service": { "type": "string", "traits": { @@ -3213,6 +3854,17 @@ ] } }, + "com.amazonaws.amplifybackend#ServiceName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "S3", + "name": "S3" + } + ] + } + }, "com.amazonaws.amplifybackend#Settings": { "type": "structure", "members": { @@ -3332,6 +3984,25 @@ "smithy.api#httpError": 429 } }, + "com.amazonaws.amplifybackend#UnAuthenticatedElement": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "READ", + "name": "READ" + }, + { + "value": "CREATE_AND_UPDATE", + "name": "CREATE_AND_UPDATE" + }, + { + "value": "DELETE", + "name": "DELETE" + } + ] + } + }, "com.amazonaws.amplifybackend#UpdateBackendAPI": { "type": "operation", "input": { @@ -4004,6 +4675,134 @@ } } }, + "com.amazonaws.amplifybackend#UpdateBackendStorage": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifybackend#UpdateBackendStorageRequest" + }, + "output": { + "target": "com.amazonaws.amplifybackend#UpdateBackendStorageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifybackend#BadRequestException" + }, + { + "target": "com.amazonaws.amplifybackend#GatewayTimeoutException" + }, + { + "target": "com.amazonaws.amplifybackend#NotFoundException" + }, + { + "target": "com.amazonaws.amplifybackend#TooManyRequestsException" + } + ], + "traits": { + "smithy.api#documentation": "

      Updates an existing backend storage resource.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/backend/{AppId}/storage/{BackendEnvironmentName}", + "code": 200 + } + } + }, + "com.amazonaws.amplifybackend#UpdateBackendStorageRequest": { + "type": "structure", + "members": { + "AppId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "BackendEnvironmentName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the backend environment.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ResourceConfig": { + "target": "com.amazonaws.amplifybackend#UpdateBackendStorageResourceConfig", + "traits": { + "smithy.api#documentation": "

      The resource configuration for updating backend storage.

      ", + "smithy.api#jsonName": "resourceConfig", + "smithy.api#required": {} + } + }, + "ResourceName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the storage resource.

      ", + "smithy.api#jsonName": "resourceName", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The request body for UpdateBackendStorage.

      " + } + }, + "com.amazonaws.amplifybackend#UpdateBackendStorageResourceConfig": { + "type": "structure", + "members": { + "Permissions": { + "target": "com.amazonaws.amplifybackend#BackendStoragePermissions", + "traits": { + "smithy.api#documentation": "

      The authorization configuration for the storage S3 bucket.

      ", + "smithy.api#jsonName": "permissions", + "smithy.api#required": {} + } + }, + "ServiceName": { + "target": "com.amazonaws.amplifybackend#ServiceName", + "traits": { + "smithy.api#documentation": "

      The name of the storage service.

      ", + "smithy.api#jsonName": "serviceName", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The resource configuration for updating backend storage.

      " + } + }, + "com.amazonaws.amplifybackend#UpdateBackendStorageResponse": { + "type": "structure", + "members": { + "AppId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The app ID.

      ", + "smithy.api#jsonName": "appId" + } + }, + "BackendEnvironmentName": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The name of the backend environment.

      ", + "smithy.api#jsonName": "backendEnvironmentName" + } + }, + "JobId": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The ID for the job.

      ", + "smithy.api#jsonName": "jobId" + } + }, + "Status": { + "target": "com.amazonaws.amplifybackend#__string", + "traits": { + "smithy.api#documentation": "

      The current status of the request.

      ", + "smithy.api#jsonName": "status" + } + } + } + }, "com.amazonaws.amplifybackend#__boolean": { "type": "boolean" }, diff --git a/codegen/sdk-codegen/aws-models/api-gateway.json b/codegen/sdk-codegen/aws-models/api-gateway.json index ae38ed741e70..46a418c8dd77 100644 --- a/codegen/sdk-codegen/aws-models/api-gateway.json +++ b/codegen/sdk-codegen/aws-models/api-gateway.json @@ -361,6 +361,21 @@ }, "com.amazonaws.apigateway#BackplaneControlService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "API Gateway", + "arnNamespace": "apigateway", + "cloudFormationName": "ApiGateway", + "cloudTrailEventSource": "apigateway.amazonaws.com", + "endpointPrefix": "apigateway" + }, + "aws.auth#sigv4": { + "name": "apigateway" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Amazon API Gateway\n

      Amazon API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to APIs that run on AWS Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS.

      ", + "smithy.api#title": "Amazon API Gateway" + }, "version": "2015-07-09", "operations": [ { @@ -723,22 +738,7 @@ { "target": "com.amazonaws.apigateway#UpdateVpcLink" } - ], - "traits": { - "aws.api#service": { - "sdkId": "API Gateway", - "arnNamespace": "apigateway", - "cloudFormationName": "ApiGateway", - "cloudTrailEventSource": "apigateway.amazonaws.com", - "endpointPrefix": "apigateway" - }, - "aws.auth#sigv4": { - "name": "apigateway" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Amazon API Gateway\n

      Amazon API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to APIs that run on AWS Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS.

      ", - "smithy.api#title": "Amazon API Gateway" - } + ] }, "com.amazonaws.apigateway#BadRequestException": { "type": "structure", @@ -7902,7 +7902,7 @@ "dataTraceEnabled": { "target": "com.amazonaws.apigateway#Boolean", "traits": { - "smithy.api#documentation": "

      Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

      " + "smithy.api#documentation": "

      Specifies whether full requests and responses are logged for this method, which affects the log entries pushed to Amazon CloudWatch Logs. This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don't enable this option for production APIs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

      " } }, "throttlingBurstLimit": { diff --git a/codegen/sdk-codegen/aws-models/appconfigdata.json b/codegen/sdk-codegen/aws-models/appconfigdata.json new file mode 100644 index 000000000000..e1db5d6a7862 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/appconfigdata.json @@ -0,0 +1,439 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.appconfigdata#AppConfigData": { + "type": "service", + "traits": { + "aws.api#dataPlane": {}, + "aws.api#service": { + "sdkId": "AppConfigData", + "arnNamespace": "appconfigdata", + "cloudFormationName": "AppConfigData", + "cloudTrailEventSource": "appconfigdata.amazonaws.com", + "endpointPrefix": "appconfigdata" + }, + "aws.auth#sigv4": { + "name": "appconfig" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

      Use the AppConfigData API, a capability of AWS AppConfig, to retrieve deployed configuration.

      ", + "smithy.api#title": "AWS AppConfig Data" + }, + "version": "2021-11-11", + "operations": [ + { + "target": "com.amazonaws.appconfigdata#GetLatestConfiguration" + } + ], + "resources": [ + { + "target": "com.amazonaws.appconfigdata#ConfigurationSession" + } + ] + }, + "com.amazonaws.appconfigdata#BadRequestDetails": { + "type": "union", + "members": { + "InvalidParameters": { + "target": "com.amazonaws.appconfigdata#InvalidParameterMap", + "traits": { + "smithy.api#documentation": "

      Present if the Reason for the bad request was 'InvalidParameters'

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Details describing why the request was invalid

      " + } + }, + "com.amazonaws.appconfigdata#BadRequestException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.appconfigdata#String" + }, + "Reason": { + "target": "com.amazonaws.appconfigdata#BadRequestReason", + "traits": { + "smithy.api#documentation": "

      Code indicating the reason the request was invalid.

      " + } + }, + "Details": { + "target": "com.amazonaws.appconfigdata#BadRequestDetails", + "traits": { + "smithy.api#documentation": "

      Details describing why the request was invalid

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      The input fails to satisfy the constraints specified by the service.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.appconfigdata#BadRequestReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "InvalidParameters", + "name": "INVALID_PARAMETERS", + "documentation": "Indicates there was a problem with one or more of the parameters.\nSee InvalidParameters in the BadRequestDetails for more information." + } + ] + } + }, + "com.amazonaws.appconfigdata#Blob": { + "type": "blob" + }, + "com.amazonaws.appconfigdata#ConfigurationSession": { + "type": "resource", + "identifiers": { + "SessionId": { + "target": "com.amazonaws.appconfigdata#Id" + } + }, + "create": { + "target": "com.amazonaws.appconfigdata#StartConfigurationSession" + } + }, + "com.amazonaws.appconfigdata#GetLatestConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.appconfigdata#GetLatestConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.appconfigdata#GetLatestConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appconfigdata#BadRequestException" + }, + { + "target": "com.amazonaws.appconfigdata#InternalServerException" + }, + { + "target": "com.amazonaws.appconfigdata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.appconfigdata#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves the latest deployed configuration. This API may return empty Configuration data if the client already has the latest version. See StartConfigurationSession to obtain an InitialConfigurationToken to call this API.

      \n \n

      Each call to GetLatestConfiguration returns a new ConfigurationToken (NextPollConfigurationToken\n in the response). This new token MUST be provided to the next call to GetLatestConfiguration when\n polling for configuration updates.

      \n

      To avoid excess charges, we recommend that you include the\n ClientConfigurationVersion value with every call to\n GetConfiguration. This value must be saved on your client. Subsequent\n calls to GetConfiguration must pass this value by using the\n ClientConfigurationVersion parameter.

      \n
      ", + "smithy.api#http": { + "method": "GET", + "uri": "/configuration", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.appconfigdata#GetLatestConfigurationRequest": { + "type": "structure", + "members": { + "ConfigurationToken": { + "target": "com.amazonaws.appconfigdata#Token", + "traits": { + "smithy.api#documentation": "

      Token describing the current state of the configuration session. To obtain a token, first call the StartConfigurationSession API. Note that every call to GetLatestConfiguration will return a new ConfigurationToken (NextPollConfigurationToken in the response) and MUST be provided to subsequent GetLatestConfiguration API calls.

      ", + "smithy.api#httpQuery": "configuration_token", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      Request parameters for the GetLatestConfiguration API

      " + } + }, + "com.amazonaws.appconfigdata#GetLatestConfigurationResponse": { + "type": "structure", + "members": { + "NextPollConfigurationToken": { + "target": "com.amazonaws.appconfigdata#Token", + "traits": { + "smithy.api#documentation": "

      The latest token describing the current state of the configuration session. This MUST be provided to the next call to GetLatestConfiguration.

      ", + "smithy.api#httpHeader": "Next-Poll-Configuration-Token" + } + }, + "NextPollIntervalInSeconds": { + "target": "com.amazonaws.appconfigdata#Integer", + "traits": { + "smithy.api#documentation": "

      The amount of time the client should wait before polling for configuration updates again. See RequiredMinimumPollIntervalInSeconds to set the desired poll interval.

      ", + "smithy.api#httpHeader": "Next-Poll-Interval-In-Seconds" + } + }, + "ContentType": { + "target": "com.amazonaws.appconfigdata#String", + "traits": { + "smithy.api#documentation": "

      A standard MIME type describing the format of the configuration content.

      ", + "smithy.api#httpHeader": "Content-Type" + } + }, + "Configuration": { + "target": "com.amazonaws.appconfigdata#Blob", + "traits": { + "smithy.api#documentation": "

      The data of the configuration. Note that this may be empty if the client already has the latest version of configuration.

      ", + "smithy.api#httpPayload": {}, + "smithy.api#sensitive": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      Response parameters for the GetLatestConfiguration API

      " + } + }, + "com.amazonaws.appconfigdata#Id": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-z0-9]{7}$" + } + }, + "com.amazonaws.appconfigdata#Identifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.appconfigdata#Integer": { + "type": "integer" + }, + "com.amazonaws.appconfigdata#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.appconfigdata#String" + } + }, + "traits": { + "smithy.api#documentation": "

      There was an internal failure in the service.

      ", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.appconfigdata#InvalidParameterDetail": { + "type": "structure", + "members": { + "Problem": { + "target": "com.amazonaws.appconfigdata#InvalidParameterProblem", + "traits": { + "smithy.api#documentation": "

      Detail describing why an individual parameter did not satisfy the constraints specified by the service

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Contains details about an invalid parameter.

      " + } + }, + "com.amazonaws.appconfigdata#InvalidParameterMap": { + "type": "map", + "key": { + "target": "com.amazonaws.appconfigdata#String" + }, + "value": { + "target": "com.amazonaws.appconfigdata#InvalidParameterDetail" + } + }, + "com.amazonaws.appconfigdata#InvalidParameterProblem": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Corrupted", + "name": "CORRUPTED", + "documentation": "The parameter was corrupted and could not be understood by the service." + }, + { + "value": "Expired", + "name": "EXPIRED", + "documentation": "The parameter was expired and can no longer be used." + }, + { + "value": "PollIntervalNotSatisfied", + "name": "POLL_INTERVAL_NOT_SATISFIED", + "documentation": "The client called the service before the time specified in the poll interval." + } + ] + } + }, + "com.amazonaws.appconfigdata#OptionalPollSeconds": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 15, + "max": 86400 + } + } + }, + "com.amazonaws.appconfigdata#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.appconfigdata#String" + }, + "ResourceType": { + "target": "com.amazonaws.appconfigdata#ResourceType", + "traits": { + "smithy.api#documentation": "

      The type of resource that was not found.

      " + } + }, + "ReferencedBy": { + "target": "com.amazonaws.appconfigdata#StringMap", + "traits": { + "smithy.api#documentation": "

      A map indicating which parameters in the request reference the resource that was not found.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      The requested resource could not be found.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.appconfigdata#ResourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Application", + "name": "APPLICATION", + "documentation": "Resource type value for the Application resource." + }, + { + "value": "ConfigurationProfile", + "name": "CONFIGURATION_PROFILE", + "documentation": "Resource type value for the ConfigurationProfile resource." + }, + { + "value": "Deployment", + "name": "DEPLOYMENT", + "documentation": "Resource type value for the Deployment resource." + }, + { + "value": "Environment", + "name": "ENVIRONMENT", + "documentation": "Resource type value for the Environment resource." + }, + { + "value": "Configuration", + "name": "CONFIGURATION", + "documentation": "Resource type value for the Configuration resource." + } + ] + } + }, + "com.amazonaws.appconfigdata#StartConfigurationSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.appconfigdata#StartConfigurationSessionRequest" + }, + "output": { + "target": "com.amazonaws.appconfigdata#StartConfigurationSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.appconfigdata#BadRequestException" + }, + { + "target": "com.amazonaws.appconfigdata#InternalServerException" + }, + { + "target": "com.amazonaws.appconfigdata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.appconfigdata#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      Starts a configuration session used to retrieve a deployed configuration. See the GetLatestConfiguration API for more details.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/configurationsessions", + "code": 201 + } + } + }, + "com.amazonaws.appconfigdata#StartConfigurationSessionRequest": { + "type": "structure", + "members": { + "ApplicationIdentifier": { + "target": "com.amazonaws.appconfigdata#Identifier", + "traits": { + "smithy.api#documentation": "

      The application ID or the application name.

      ", + "smithy.api#required": {} + } + }, + "EnvironmentIdentifier": { + "target": "com.amazonaws.appconfigdata#Identifier", + "traits": { + "smithy.api#documentation": "

      The environment ID or the environment name.

      ", + "smithy.api#required": {} + } + }, + "ConfigurationProfileIdentifier": { + "target": "com.amazonaws.appconfigdata#Identifier", + "traits": { + "smithy.api#documentation": "

      The configuration profile ID or the configuration profile name.

      ", + "smithy.api#required": {} + } + }, + "RequiredMinimumPollIntervalInSeconds": { + "target": "com.amazonaws.appconfigdata#OptionalPollSeconds", + "traits": { + "smithy.api#documentation": "

      The interval at which your client will poll for configuration. If provided, the service\n will throw a BadRequestException if the client polls before the specified poll interval. By default,\n client poll intervals are not enforced.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Request parameters for the StartConfigurationSession API.

      " + } + }, + "com.amazonaws.appconfigdata#StartConfigurationSessionResponse": { + "type": "structure", + "members": { + "InitialConfigurationToken": { + "target": "com.amazonaws.appconfigdata#Token", + "traits": { + "smithy.api#documentation": "

      Token encapsulating state about the configuration session. Provide this token to the GetLatestConfiguration API to retrieve configuration data.

      \n \n

      This token should only be used once in your first call to GetLatestConfiguration. You MUST use the\n new token in the GetConfiguration response (NextPollConfigurationToken) in each subsequent call to\n GetLatestConfiguration.

      \n
      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Response parameters for the StartConfigurationSession API.

      " + } + }, + "com.amazonaws.appconfigdata#String": { + "type": "string" + }, + "com.amazonaws.appconfigdata#StringMap": { + "type": "map", + "key": { + "target": "com.amazonaws.appconfigdata#String" + }, + "value": { + "target": "com.amazonaws.appconfigdata#String" + } + }, + "com.amazonaws.appconfigdata#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.appconfigdata#String" + } + }, + "traits": { + "smithy.api#documentation": "

      The request was denied due to request throttling.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.appconfigdata#Token": { + "type": "string", + "traits": { + "smithy.api#pattern": "^\\S{1,8192}$" + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/appstream.json b/codegen/sdk-codegen/aws-models/appstream.json index 44de329fd6fc..10777b6463ad 100644 --- a/codegen/sdk-codegen/aws-models/appstream.json +++ b/codegen/sdk-codegen/aws-models/appstream.json @@ -2404,6 +2404,9 @@ { "target": "com.amazonaws.appstream#InvalidParameterCombinationException" }, + { + "target": "com.amazonaws.appstream#OperationNotPermittedException" + }, { "target": "com.amazonaws.appstream#ResourceNotFoundException" } @@ -2658,7 +2661,7 @@ "min": 0, "max": 128 }, - "smithy.api#pattern": "(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]" + "smithy.api#pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$" } }, "com.amazonaws.appstream#EmbedHostDomains": { @@ -4062,6 +4065,10 @@ { "value": "WINDOWS_SERVER_2019", "name": "WINDOWS_SERVER_2019" + }, + { + "value": "AMAZON_LINUX2", + "name": "AMAZON_LINUX2" } ] } @@ -4849,7 +4856,7 @@ "min": 2, "max": 32 }, - "smithy.api#pattern": "[\\w+=,.@-]*" + "smithy.api#pattern": "^[\\w+=,.@-]*$" } }, "com.amazonaws.appstream#String": { @@ -5718,7 +5725,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+", + "smithy.api#pattern": "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$", "smithy.api#sensitive": {} } }, diff --git a/codegen/sdk-codegen/aws-models/cloudtrail.json b/codegen/sdk-codegen/aws-models/cloudtrail.json index 1f9f82ce3765..db55092f89cb 100644 --- a/codegen/sdk-codegen/aws-models/cloudtrail.json +++ b/codegen/sdk-codegen/aws-models/cloudtrail.json @@ -132,7 +132,7 @@ "Field": { "target": "com.amazonaws.cloudtrail#SelectorField", "traits": { - "smithy.api#documentation": "

      \n A field in an event record on which to filter events to be logged. Supported fields include readOnly, eventCategory, \n eventSource (for management events), eventName, resources.type, and resources.ARN.\n

      \n
        \n
      • \n

        \n \n readOnly\n - Optional. Can be set to Equals a value of true\n or false. A value of false logs both read and\n write events.

        \n
      • \n
      • \n

        \n \n eventSource\n - For filtering management events only. \n This can be set only to NotEquals \n kms.amazonaws.com.

        \n
      • \n
      • \n

        \n \n eventName\n - Can use any operator. You can use it to filter in\n or filter out any data event logged to CloudTrail, such as PutBucket or GetSnapshotBlock. You can have multiple values\n for this field, separated by commas.

        \n
      • \n
      • \n

        \n \n eventCategory\n - This is required. It must be set to Equals, and \n the value must be Management or Data.

        \n
      • \n
      • \n

        \n \n resources.type\n - This field is required.\n resources.type can only use the Equals operator, and the\n value can be one of the following: AWS::S3::Object,\n AWS::S3::AccessPoint,\n AWS::Lambda::Function, AWS::DynamoDB::Table,\n AWS::S3Outposts::Object, AWS::ManagedBlockchain::Node,\n AWS::S3ObjectLambda::AccessPoint, or AWS::EC2::Snapshot.\n You can have only one resources.type field per selector. To log data\n events on more than one resource type, add another selector.

        \n
      • \n
      • \n

        \n \n resources.ARN\n - You can use any operator with\n resources.ARN, but if you use Equals or NotEquals, the\n value must exactly match the ARN of a valid resource of the type you've specified in\n the template as the value of resources.type. For example, if resources.type equals\n AWS::S3::Object, the ARN must be in one of the following formats. To\n log all data events for all objects in a specific S3 bucket, use the\n StartsWith operator, and include only the bucket ARN as the matching value.

        \n

        The trailing slash is intentional; do not exclude it. Replace the text between\n less than and greater than symbols (<>) with resource-specific information.

        \n
          \n
        • \n

          \n arn::s3:::/\n

          \n
        • \n
        • \n

          \n arn::s3::://\n

          \n
        • \n
        \n

        When resources.type equals AWS::S3::AccessPoint, and the\n operator is set to Equals or NotEquals, the ARN must be in\n one of the following formats. To log events on all objects in an S3 access point, we\n recommend that you use only the access point ARN, don’t include the object path, and\n use the StartsWith or NotStartsWith operators.

        \n
          \n
        • \n

          \n arn::s3:::accesspoint/\n

          \n
        • \n
        • \n

          \n arn::s3:::accesspoint//object/\n

          \n
        • \n
        \n

        When resources.type equals AWS::Lambda::Function, and the operator is set\n to Equals or NotEquals, the ARN must be in the following format:

        \n
          \n
        • \n

          \n arn::lambda:::function:\n

          \n
        • \n
        \n

        When resources.type equals AWS::DynamoDB::Table, and the operator is\n set to Equals or NotEquals, the ARN must be in the\n following format:

        \n
          \n
        • \n

          \n arn::dynamodb:::table:\n

          \n
        • \n
        \n

        When resources.type equals AWS::S3Outposts::Object, and the operator \n is set to Equals or NotEquals, the ARN must be in the following format:

        \n
          \n
        • \n

          \n arn::s3-outposts:::\n

          \n
        • \n
        \n

        When resources.type equals AWS::ManagedBlockchain::Node,\n and the operator is set to Equals or NotEquals, the ARN\n must be in the following format:

        \n
          \n
        • \n

          \n arn::managedblockchain:::nodes/\n

          \n
        • \n
        \n

        When resources.type equals\n AWS::S3ObjectLambda::AccessPoint, and the operator is set to\n Equals or NotEquals, the ARN must be in the following\n format:

        \n
          \n
        • \n

          \n arn::s3-object-lambda:::accesspoint/\n

          \n
        • \n
        \n

        When resources.type equals AWS::EC2::Snapshot, and the\n operator is set to Equals or NotEquals, the ARN must be in\n the following format:

        \n
          \n
        • \n

          \n arn::ec2:::snapshot/\n

          \n
        • \n
        \n
      • \n
      ", + "smithy.api#documentation": "

      \n A field in an event record on which to filter events to be logged. Supported fields include readOnly, eventCategory, \n eventSource (for management events), eventName, resources.type, and resources.ARN.\n

      \n
        \n
      • \n

        \n \n readOnly\n - Optional. Can be set to Equals a value of true\n or false. A value of false logs both read and\n write events.

        \n
      • \n
      • \n

        \n \n eventSource\n - For filtering management events only. \n This can be set only to NotEquals \n kms.amazonaws.com.

        \n
      • \n
      • \n

        \n \n eventName\n - Can use any operator. You can use it to filter in\n or filter out any data event logged to CloudTrail, such as PutBucket or GetSnapshotBlock. You can have multiple values\n for this field, separated by commas.

        \n
      • \n
      • \n

        \n \n eventCategory\n - This is required. It must be set to Equals, and \n the value must be Management or Data.

        \n
      • \n
      • \n

        \n \n resources.type\n - This field is required.\n resources.type can only use the Equals operator, and the\n value can be one of the following:

        \n
          \n
        • \n

          \n AWS::S3::Object\n

          \n
        • \n
        • \n

          \n AWS::Lambda::Function\n

          \n
        • \n
        • \n

          \n AWS::DynamoDB::Table\n

          \n
        • \n
        • \n

          \n AWS::S3Outposts::Object\n

          \n
        • \n
        • \n

          \n AWS::ManagedBlockchain::Node\n

          \n
        • \n
        • \n

          \n AWS::S3ObjectLambda::AccessPoint\n

          \n
        • \n
        • \n

          \n AWS::EC2::Snapshot\n

          \n
        • \n
        • \n

          \n AWS::S3::AccessPoint\n

          \n
        • \n
        • \n

          \n AWS::DynamoDB::Stream\n

          \n
        • \n
        \n

        \n You can have only one resources.type field per selector. To log data\n events on more than one resource type, add another selector.

        \n
      • \n
      • \n

        \n \n resources.ARN\n - You can use any operator with\n resources.ARN, but if you use Equals or NotEquals, the\n value must exactly match the ARN of a valid resource of the type you've specified in\n the template as the value of resources.type. For example, if resources.type equals\n AWS::S3::Object, the ARN must be in one of the following formats. To\n log all data events for all objects in a specific S3 bucket, use the\n StartsWith operator, and include only the bucket ARN as the matching value.

        \n

        The trailing slash is intentional; do not exclude it. Replace the text between\n less than and greater than symbols (<>) with resource-specific information.

        \n
          \n
        • \n

          \n arn::s3:::/\n

          \n
        • \n
        • \n

          \n arn::s3::://\n

          \n
        • \n
        \n

        When resources.type equals AWS::S3::AccessPoint, and the\n operator is set to Equals or NotEquals, the ARN must be in\n one of the following formats. To log events on all objects in an S3 access point, we\n recommend that you use only the access point ARN, don’t include the object path, and\n use the StartsWith or NotStartsWith operators.

        \n
          \n
        • \n

          \n arn::s3:::accesspoint/\n

          \n
        • \n
        • \n

          \n arn::s3:::accesspoint//object/\n

          \n
        • \n
        \n

        When resources.type equals AWS::Lambda::Function, and the operator is set\n to Equals or NotEquals, the ARN must be in the following format:

        \n
          \n
        • \n

          \n arn::lambda:::function:\n

          \n
        • \n
        \n

        When resources.type equals AWS::DynamoDB::Table, and the operator is\n set to Equals or NotEquals, the ARN must be in the\n following format:

        \n
          \n
        • \n

          \n arn::dynamodb:::table/\n

          \n
        • \n
        \n

        When resources.type equals AWS::S3Outposts::Object, and the operator \n is set to Equals or NotEquals, the ARN must be in the following format:

        \n
          \n
        • \n

          \n arn::s3-outposts:::\n

          \n
        • \n
        \n

        When resources.type equals AWS::ManagedBlockchain::Node,\n and the operator is set to Equals or NotEquals, the ARN\n must be in the following format:

        \n
          \n
        • \n

          \n arn::managedblockchain:::nodes/\n

          \n
        • \n
        \n

        When resources.type equals\n AWS::S3ObjectLambda::AccessPoint, and the operator is set to\n Equals or NotEquals, the ARN must be in the following\n format:

        \n
          \n
        • \n

          \n arn::s3-object-lambda:::accesspoint/\n

          \n
        • \n
        \n

        When resources.type equals AWS::EC2::Snapshot, and the\n operator is set to Equals or NotEquals, the ARN must be in\n the following format:

        \n
          \n
        • \n

          \n arn::ec2:::snapshot/\n

          \n
        • \n
        \n

        When resources.type equals AWS::DynamoDB::Stream, and the operator is set to\n Equals or NotEquals, the ARN must be in the following format:

        \n
          \n
        • \n

          \n arn::dynamodb:::table//stream/\n

          \n
        • \n
        \n
      • \n
      ", "smithy.api#required": {} } }, @@ -259,6 +259,24 @@ }, "com.amazonaws.cloudtrail#CloudTrail_20131101": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "CloudTrail", + "arnNamespace": "cloudtrail", + "cloudFormationName": "CloudTrail", + "cloudTrailEventSource": "cloudtrail.amazonaws.com", + "endpointPrefix": "cloudtrail" + }, + "aws.auth#sigv4": { + "name": "cloudtrail" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "CloudTrail\n

      This is the CloudTrail API Reference. It provides descriptions of actions, data types, common parameters, and common errors for CloudTrail.

      \n

      CloudTrail is a web service that records Amazon Web Services API calls for your Amazon Web Services account and delivers log files to an Amazon S3 bucket. \n The recorded information includes the identity of the user, the start time of the Amazon Web Services API call, the source IP address, the request parameters, and the response elements returned by the service.

      \n \n \n

      As an alternative to the API,\n you can use one of the Amazon Web Services SDKs, which consist of libraries and sample code for various\n programming languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs\n provide programmatic access to CloudTrail. For example, the SDKs\n handle cryptographically signing requests, managing errors, and retrying requests\n automatically. For more information about the Amazon Web Services SDKs, including how to download and install\n them, see Tools to Build on Amazon Web Services.

      \n
      \n

      See the CloudTrail User \n Guide for information about the data that is included with each Amazon Web Services API call listed in the log files.

      ", + "smithy.api#title": "AWS CloudTrail", + "smithy.api#xmlNamespace": { + "uri": "http://cloudtrail.amazonaws.com/doc/2013-11-01/" + } + }, "version": "2013-11-01", "operations": [ { @@ -315,25 +333,7 @@ { "target": "com.amazonaws.cloudtrail#UpdateTrail" } - ], - "traits": { - "aws.api#service": { - "sdkId": "CloudTrail", - "arnNamespace": "cloudtrail", - "cloudFormationName": "CloudTrail", - "cloudTrailEventSource": "cloudtrail.amazonaws.com", - "endpointPrefix": "cloudtrail" - }, - "aws.auth#sigv4": { - "name": "cloudtrail" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "CloudTrail\n

      This is the CloudTrail API Reference. It provides descriptions of actions, data types, common parameters, and common errors for CloudTrail.

      \n

      CloudTrail is a web service that records Amazon Web Services API calls for your Amazon Web Services account and delivers log files to an Amazon S3 bucket. \n The recorded information includes the identity of the user, the start time of the Amazon Web Services API call, the source IP address, the request parameters, and the response elements returned by the service.

      \n \n \n

      As an alternative to the API,\n you can use one of the Amazon Web Services SDKs, which consist of libraries and sample code for various\n programming languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs\n provide programmatic access to CloudTrail. For example, the SDKs\n handle cryptographically signing requests, managing errors, and retrying requests\n automatically. For more information about the Amazon Web Services SDKs, including how to download and install\n them, see Tools to Build on Amazon Web Services.

      \n
      \n

      See the CloudTrail User \n Guide for information about the data that is included with each Amazon Web Services API call listed in the log files.

      ", - "smithy.api#title": "AWS CloudTrail", - "smithy.api#xmlNamespace": { - "uri": "http://cloudtrail.amazonaws.com/doc/2013-11-01/" - } - } + ] }, "com.amazonaws.cloudtrail#CloudWatchLogsDeliveryUnavailableException": { "type": "structure", @@ -646,7 +646,7 @@ "Type": { "target": "com.amazonaws.cloudtrail#String", "traits": { - "smithy.api#documentation": "

      The resource type in which you want to log data events. You can specify\n AWS::S3::Object, AWS::Lambda::Function, or\n AWS::DynamoDB::Table resources.

      \n

      The AWS::S3Outposts::Object, AWS::ManagedBlockchain::Node, \n AWS::S3ObjectLambda::AccessPoint, and AWS::EC2::Snapshot resource types are not valid in basic\n event selectors. To log data events on these resource types, use advanced event\n selectors.

      " + "smithy.api#documentation": "

      The resource type in which you want to log data events. You can specify\n the following basic event selector resource types:

      \n
        \n
      • \n

        \n AWS::S3::Object\n

        \n
      • \n
      • \n

        \n AWS::Lambda::Function\n

        \n
      • \n
      • \n

        \n AWS::DynamoDB::Table\n

        \n
      • \n
      \n

      The following resource types are also availble through advanced event selectors.\n Basic event selector resource types are valid in advanced event selectors, but\n advanced event selector resource types are not valid in basic event selectors.\n For more information, see AdvancedFieldSelector$Field.

      \n
        \n
      • \n

        \n AWS::S3Outposts::Object\n

        \n
      • \n
      • \n

        \n AWS::ManagedBlockchain::Node\n

        \n
      • \n
      • \n

        \n AWS::S3ObjectLambda::AccessPoint\n

        \n
      • \n
      • \n

        \n AWS::EC2::Snapshot\n

        \n
      • \n
      • \n

        \n AWS::S3::AccessPoint\n

        \n
      • \n
      • \n

        \n AWS::DynamoDB::Stream\n

        \n
      • \n
      " } }, "Values": { @@ -1287,6 +1287,10 @@ { "value": "ApiCallRateInsight", "name": "ApiCallRateInsight" + }, + { + "value": "ApiErrorRateInsight", + "name": "ApiErrorRateInsight" } ] } diff --git a/codegen/sdk-codegen/aws-models/connect.json b/codegen/sdk-codegen/aws-models/connect.json index 404ea6942a91..a0e4cd7bee87 100644 --- a/codegen/sdk-codegen/aws-models/connect.json +++ b/codegen/sdk-codegen/aws-models/connect.json @@ -66,6 +66,26 @@ } } }, + "com.amazonaws.connect#AgentInfo": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.connect#AgentResourceId", + "traits": { + "smithy.api#documentation": "

      The identifier of the agent who accepted the contact.

      " + } + }, + "ConnectedToAgentTimestamp": { + "target": "com.amazonaws.connect#Timestamp", + "traits": { + "smithy.api#documentation": "

      The timestamp when the contact was connected to the agent.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Information about the agent who accepted the contact.

      " + } + }, "com.amazonaws.connect#AgentLastName": { "type": "string", "traits": { @@ -75,6 +95,15 @@ } } }, + "com.amazonaws.connect#AgentResourceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, "com.amazonaws.connect#AgentStatus": { "type": "structure", "members": { @@ -123,7 +152,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } }, @@ -278,7 +307,7 @@ "name": "connect" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

      Amazon Connect is a cloud-based contact center solution that you use to set up and manage a customer\n contact center and provide reliable customer engagement at any scale.

      \n

      Amazon Connect provides metrics and real-time reporting that enable you to optimize contact routing.\n You can also resolve customer issues more efficiently by getting customers in touch with the\n appropriate agents.

      \n

      There are limits to the number of Amazon Connect resources that you can create. There are also limits\n to the number of requests that you can make per second. For more information, see Amazon Connect\n Service Quotas in the Amazon Connect Administrator Guide.

      \n

      You can\n connect\n programmatically to an Amazon Web Services service by using an endpoint. For a list of Amazon Connect endpoints, see\n Amazon Connect\n Endpoints.

      \n \n

      Working with contact flows? Check out the Amazon Connect Flow language.

      \n
      ", + "smithy.api#documentation": "

      Amazon Connect is a cloud-based contact center solution that you use to set up and manage a customer\n contact center and provide reliable customer engagement at any scale.

      \n

      Amazon Connect provides metrics and real-time reporting that enable you to optimize contact routing.\n You can also resolve customer issues more efficiently by getting customers in touch with the\n appropriate agents.

      \n

      There are limits to the number of Amazon Connect resources that you can create. There are also limits\n to the number of requests that you can make per second. For more information, see Amazon Connect\n Service Quotas in the Amazon Connect Administrator Guide.

      \n

      You can\n connect\n programmatically to an AWS service by using an endpoint. For a list of Amazon Connect endpoints, see\n Amazon Connect\n Endpoints.

      \n \n

      Working with contact flows? Check out the Amazon Connect Flow language.

      \n
      ", "smithy.api#title": "Amazon Connect Service" }, "version": "2017-08-08", @@ -370,6 +399,9 @@ { "target": "com.amazonaws.connect#DescribeAgentStatus" }, + { + "target": "com.amazonaws.connect#DescribeContact" + }, { "target": "com.amazonaws.connect#DescribeContactFlow" }, @@ -454,6 +486,9 @@ { "target": "com.amazonaws.connect#ListContactFlows" }, + { + "target": "com.amazonaws.connect#ListContactReferences" + }, { "target": "com.amazonaws.connect#ListHoursOfOperations" }, @@ -556,6 +591,9 @@ { "target": "com.amazonaws.connect#UpdateAgentStatus" }, + { + "target": "com.amazonaws.connect#UpdateContact" + }, { "target": "com.amazonaws.connect#UpdateContactAttributes" }, @@ -565,6 +603,9 @@ { "target": "com.amazonaws.connect#UpdateContactFlowName" }, + { + "target": "com.amazonaws.connect#UpdateContactSchedule" + }, { "target": "com.amazonaws.connect#UpdateHoursOfOperation" }, @@ -1159,6 +1200,32 @@ } } }, + "com.amazonaws.connect#AttachmentReference": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.connect#ReferenceKey", + "traits": { + "smithy.api#documentation": "

      Identifier of the attachment reference.

      " + } + }, + "Value": { + "target": "com.amazonaws.connect#ReferenceValue", + "traits": { + "smithy.api#documentation": "

      Contains the location path of the attachment reference.

      " + } + }, + "Status": { + "target": "com.amazonaws.connect#ReferenceStatus", + "traits": { + "smithy.api#documentation": "

      Status of an attachment reference type.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Information about the attachment reference if the referenceType is ATTACHMENT. Otherwise, null.

      " + } + }, "com.amazonaws.connect#Attribute": { "type": "structure", "members": { @@ -1272,7 +1339,7 @@ "traits": { "smithy.api#length": { "min": 0, - "max": 1 + "max": 3 } } }, @@ -1378,6 +1445,98 @@ } } }, + "com.amazonaws.connect#Contact": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

      The Amazon Resource Name (ARN) for the contact.

      " + } + }, + "Id": { + "target": "com.amazonaws.connect#ContactId", + "traits": { + "smithy.api#documentation": "

      The identifier for the contact.

      " + } + }, + "InitialContactId": { + "target": "com.amazonaws.connect#ContactId", + "traits": { + "smithy.api#documentation": "

      If this contact is related to other contacts, this is the ID of the initial contact.

      " + } + }, + "PreviousContactId": { + "target": "com.amazonaws.connect#ContactId", + "traits": { + "smithy.api#documentation": "

      If this contact is not the first contact, this is the ID of the previous contact.

      " + } + }, + "InitiationMethod": { + "target": "com.amazonaws.connect#ContactInitiationMethod", + "traits": { + "smithy.api#documentation": "

      Indicates how the contact was initiated.

      " + } + }, + "Name": { + "target": "com.amazonaws.connect#Name", + "traits": { + "smithy.api#documentation": "

      The name of the contact.

      " + } + }, + "Description": { + "target": "com.amazonaws.connect#Description", + "traits": { + "smithy.api#documentation": "

      The description of the contact.

      " + } + }, + "Channel": { + "target": "com.amazonaws.connect#Channel", + "traits": { + "smithy.api#documentation": "

      How the contact reached your contact center.

      " + } + }, + "QueueInfo": { + "target": "com.amazonaws.connect#QueueInfo", + "traits": { + "smithy.api#documentation": "

      If this contact was queued, this contains information about the queue.

      " + } + }, + "AgentInfo": { + "target": "com.amazonaws.connect#AgentInfo", + "traits": { + "smithy.api#documentation": "

      Information about the agent who accepted the contact.

      " + } + }, + "InitiationTimestamp": { + "target": "com.amazonaws.connect#Timestamp", + "traits": { + "smithy.api#documentation": "

      The date and time this contact was initiated, in UTC time. For INBOUND, this is when the\n contact arrived. For OUTBOUND, this is when the agent began dialing. For CALLBACK, this is when\n the callback contact was created. For TRANSFER and QUEUE_TRANSFER, this is when the transfer was\n initiated. For API, this is when the request arrived.

      " + } + }, + "DisconnectTimestamp": { + "target": "com.amazonaws.connect#Timestamp", + "traits": { + "smithy.api#documentation": "

      The timestamp when the customer endpoint disconnected from Amazon Connect.

      " + } + }, + "LastUpdateTimestamp": { + "target": "com.amazonaws.connect#Timestamp", + "traits": { + "smithy.api#documentation": "

      The timestamp when contact was last updated.

      " + } + }, + "ScheduledTimestamp": { + "target": "com.amazonaws.connect#Timestamp", + "traits": { + "smithy.api#documentation": "

      The timestamp, in Unix epoch time format, at which to start running the inbound flow.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Contains information about a contact.

      " + } + }, "com.amazonaws.connect#ContactFlow": { "type": "structure", "members": { @@ -1566,6 +1725,37 @@ } } }, + "com.amazonaws.connect#ContactInitiationMethod": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "INBOUND", + "name": "INBOUND" + }, + { + "value": "OUTBOUND", + "name": "OUTBOUND" + }, + { + "value": "TRANSFER", + "name": "TRANSFER" + }, + { + "value": "QUEUE_TRANSFER", + "name": "QUEUE_TRANSFER" + }, + { + "value": "CALLBACK", + "name": "CALLBACK" + }, + { + "value": "API", + "name": "API" + } + ] + } + }, "com.amazonaws.connect#ContactNotFoundException": { "type": "structure", "members": { @@ -1676,7 +1866,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } } @@ -1885,7 +2075,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } } @@ -2028,7 +2218,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Creates an Amazon Web Services resource association with an Amazon Connect instance.

      ", + "smithy.api#documentation": "

      Creates an AWS resource association with an Amazon Connect instance.

      ", "smithy.api#http": { "method": "PUT", "uri": "/instance/{InstanceId}/integration-associations", @@ -2082,7 +2272,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } } @@ -2197,7 +2387,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } } @@ -2293,7 +2483,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } } @@ -2310,7 +2500,7 @@ "QuickConnectId": { "target": "com.amazonaws.connect#QuickConnectId", "traits": { - "smithy.api#documentation": "

      The identifier for the quick connect. \n

      " + "smithy.api#documentation": "

      The identifier for the quick connect.

      " } } } @@ -2498,7 +2688,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } } @@ -2583,7 +2773,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } } @@ -3106,7 +3296,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Deletes an Amazon Web Services resource association from an Amazon Connect instance. The association must not have\n any use cases associated with it.

      ", + "smithy.api#documentation": "

      Deletes an AWS resource association from an Amazon Connect instance. The association must not have\n any use cases associated with it.

      ", "smithy.api#http": { "method": "DELETE", "uri": "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}", @@ -3475,6 +3665,40 @@ } } }, + "com.amazonaws.connect#DescribeContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#DescribeContactRequest" + }, + "output": { + "target": "com.amazonaws.connect#DescribeContactResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      This API is in preview release for Amazon Connect and is subject to change.

      \n

      Describes the specified contact.

      \n \n

      Contact information is available in Amazon Connect for 24 months, and then it is deleted.

      \n
      ", + "smithy.api#http": { + "method": "GET", + "uri": "/contacts/{InstanceId}/{ContactId}", + "code": 200 + } + } + }, "com.amazonaws.connect#DescribeContactFlow": { "type": "operation", "input": { @@ -3544,6 +3768,38 @@ } } }, + "com.amazonaws.connect#DescribeContactRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

      The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ContactId": { + "target": "com.amazonaws.connect#ContactId", + "traits": { + "smithy.api#documentation": "

      The identifier of the initial contact.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#DescribeContactResponse": { + "type": "structure", + "members": { + "Contact": { + "target": "com.amazonaws.connect#Contact", + "traits": { + "smithy.api#documentation": "

      Information about the contact.

      " + } + } + } + }, "com.amazonaws.connect#DescribeHoursOfOperation": { "type": "operation", "input": { @@ -5011,7 +5267,7 @@ "CurrentMetrics": { "target": "com.amazonaws.connect#CurrentMetrics", "traits": { - "smithy.api#documentation": "

      The metrics to retrieve. Specify the name and unit for each metric. The following metrics\n are available. For a description of all the metrics, see Real-time Metrics\n Definitions in the Amazon Connect Administrator Guide.

      \n
      \n
      AGENTS_AFTER_CONTACT_WORK
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: ACW\n

      \n\n
      \n
      AGENTS_AVAILABLE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Available\n

      \n
      \n
      AGENTS_ERROR
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Error\n

      \n
      \n
      AGENTS_NON_PRODUCTIVE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: NPT (Non-Productive Time)\n

      \n
      \n
      AGENTS_ON_CALL
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: On\n contact\n

      \n
      \n
      AGENTS_ON_CONTACT
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: On\n contact\n

      \n
      \n
      AGENTS_ONLINE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Online\n

      \n
      \n
      AGENTS_STAFFED
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Staffed\n

      \n
      \n
      CONTACTS_IN_QUEUE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: In\n queue\n

      \n
      \n
      CONTACTS_SCHEDULED
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Scheduled\n

      \n
      \n
      OLDEST_CONTACT_AGE
      \n
      \n

      Unit: SECONDS

      \n

      When you use groupings, Unit says SECONDS and the Value is returned in SECONDS.

      \n

      When you do not use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For\n example, if you get a response like this:

      \n

      \n { \"Metric\": { \"Name\": \"OLDEST_CONTACT_AGE\", \"Unit\": \"SECONDS\" }, \"Value\": 24113.0\n }

      \n

      The actual OLDEST_CONTACT_AGE is 24 seconds.

      \n\n

      Name in real-time metrics report: Oldest\n

      \n
      \n
      SLOTS_ACTIVE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Active\n

      \n
      \n
      SLOTS_AVAILABLE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Availability\n

      \n
      \n
      ", + "smithy.api#documentation": "

      The metrics to retrieve. Specify the name and unit for each metric. The following metrics\n are available. For a description of all the metrics, see Real-time Metrics\n Definitions in the Amazon Connect Administrator Guide.

      \n
      \n
      AGENTS_AFTER_CONTACT_WORK
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: ACW\n

      \n\n
      \n
      AGENTS_AVAILABLE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Available\n

      \n
      \n
      AGENTS_ERROR
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Error\n

      \n
      \n
      AGENTS_NON_PRODUCTIVE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: NPT (Non-Productive Time)\n

      \n
      \n
      AGENTS_ON_CALL
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: On\n contact\n

      \n
      \n
      AGENTS_ON_CONTACT
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: On\n contact\n

      \n
      \n
      AGENTS_ONLINE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Online\n

      \n
      \n
      AGENTS_STAFFED
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Staffed\n

      \n
      \n
      CONTACTS_IN_QUEUE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: In\n queue\n

      \n
      \n
      CONTACTS_SCHEDULED
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Scheduled\n

      \n
      \n
      OLDEST_CONTACT_AGE
      \n
      \n

      Unit: SECONDS

      \n

      When you use groupings, Unit says SECONDS and the Value is returned in SECONDS.

      \n

      When you do not use groupings, Unit says SECONDS but the Value is returned in\n MILLISECONDS. For example, if you get a response like this:

      \n

      \n { \"Metric\": { \"Name\": \"OLDEST_CONTACT_AGE\", \"Unit\": \"SECONDS\" }, \"Value\": 24113.0\n }

      \n

      The actual OLDEST_CONTACT_AGE is 24 seconds.

      \n\n

      Name in real-time metrics report: Oldest\n

      \n
      \n
      SLOTS_ACTIVE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Active\n

      \n
      \n
      SLOTS_AVAILABLE
      \n
      \n

      Unit: COUNT

      \n

      Name in real-time metrics report: Availability\n

      \n
      \n
      ", "smithy.api#required": {} } }, @@ -5753,7 +6009,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } }, @@ -6755,7 +7011,7 @@ } ], "traits": { - "smithy.api#documentation": "

      This API is in preview release for Amazon Connect and is subject to change.

      \n

      For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently associated with the\n instance.

      ", + "smithy.api#documentation": "

      This API is in preview release for Amazon Connect and is subject to change.

      \n

      For the specified version of Amazon Lex, returns a paginated list of all the Amazon Lex bots currently\n associated with the instance.

      ", "smithy.api#http": { "method": "GET", "uri": "/instance/{InstanceId}/bots", @@ -6913,6 +7169,98 @@ } } }, + "com.amazonaws.connect#ListContactReferences": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#ListContactReferencesRequest" + }, + "output": { + "target": "com.amazonaws.connect#ListContactReferencesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      This API is in preview release for Amazon Connect and is subject to change.

      \n

      For the specified referenceTypes, returns a list of references associated with\n the contact.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/contact/references/{InstanceId}/{ContactId}", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ReferenceSummaryList" + } + } + }, + "com.amazonaws.connect#ListContactReferencesRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

      The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ContactId": { + "target": "com.amazonaws.connect#ContactId", + "traits": { + "smithy.api#documentation": "

      The identifier of the initial contact.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ReferenceTypes": { + "target": "com.amazonaws.connect#ReferenceTypes", + "traits": { + "smithy.api#documentation": "

      The type of reference.

      ", + "smithy.api#httpQuery": "referenceTypes", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.connect#NextToken", + "traits": { + "smithy.api#documentation": "

      The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

      \n \n

      This is not expected to be set since the value returned in the previous response is always\n null.

      \n
      ", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.connect#ListContactReferencesResponse": { + "type": "structure", + "members": { + "ReferenceSummaryList": { + "target": "com.amazonaws.connect#ReferenceSummaryList", + "traits": { + "smithy.api#documentation": "

      Information about the contact flows.

      " + } + }, + "NextToken": { + "target": "com.amazonaws.connect#NextToken", + "traits": { + "smithy.api#documentation": "

      If there are additional results, this is the token for the next set of results.

      \n \n

      This is always returned as null in the response.

      \n
      " + } + } + } + }, "com.amazonaws.connect#ListHoursOfOperations": { "type": "operation", "input": { @@ -7266,7 +7614,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Provides summary information about the Amazon Web Services resource associations for the specified Amazon Connect\n instance.

      ", + "smithy.api#documentation": "

      Provides summary information about the AWS resource associations for the specified Amazon Connect\n instance.

      ", "smithy.api#http": { "method": "GET", "uri": "/instance/{InstanceId}/integration-associations", @@ -7294,7 +7642,7 @@ "IntegrationType": { "target": "com.amazonaws.connect#IntegrationType", "traits": { - "smithy.api#documentation": "

      The type of integration.

      ", + "smithy.api#documentation": "

      ", "smithy.api#httpQuery": "integrationType" } }, @@ -7406,7 +7754,7 @@ "LambdaFunctions": { "target": "com.amazonaws.connect#FunctionArnsList", "traits": { - "smithy.api#documentation": "

      The Lambda function ARNs associated with the specified instance.

      " + "smithy.api#documentation": "

      The Lambdafunction ARNs associated with the specified instance.

      " } }, "NextToken": { @@ -7479,7 +7827,7 @@ "target": "com.amazonaws.connect#MaxResult25", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "

      The maximum number of results to return per page. If no value is specified, the default is 10.

      ", + "smithy.api#documentation": "

      The maximum number of results to return per page. If no value is specified, the default is 10.\n

      ", "smithy.api#httpQuery": "maxResults" } } @@ -8343,7 +8691,7 @@ } ], "traits": { - "smithy.api#documentation": "

      This API is in preview release for Amazon Connect and is subject to change.

      \n

      Provides summary information about the security profiles for the specified Amazon Connect\n instance.

      \n

      For more information about security profiles, see Security Profiles in the\n Amazon Connect Administrator Guide.

      ", + "smithy.api#documentation": "

      Provides summary information about the security profiles for the specified Amazon Connect\n instance.

      \n

      For more information about security profiles, see Security Profiles in the\n Amazon Connect Administrator Guide.

      ", "smithy.api#http": { "method": "GET", "uri": "/security-profiles-summary/{InstanceId}", @@ -10197,7 +10545,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } }, @@ -10217,6 +10565,26 @@ "com.amazonaws.connect#QueueId": { "type": "string" }, + "com.amazonaws.connect#QueueInfo": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.connect#QueueId", + "traits": { + "smithy.api#documentation": "

      The identifier of the agent who accepted the contact.

      " + } + }, + "EnqueueTimestamp": { + "target": "com.amazonaws.connect#Timestamp", + "traits": { + "smithy.api#documentation": "

      The timestamp when the contact was added to the queue.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      If this contact was queued, this contains information about the queue.

      " + } + }, "com.amazonaws.connect#QueueMaxContacts": { "type": "integer", "traits": { @@ -10404,7 +10772,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } }, @@ -10553,14 +10921,14 @@ "Value": { "target": "com.amazonaws.connect#ReferenceValue", "traits": { - "smithy.api#documentation": "

      A formatted URL that displays to an agent in the Contact Control Panel (CCP)

      ", + "smithy.api#documentation": "

      A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).

      ", "smithy.api#required": {} } }, "Type": { "target": "com.amazonaws.connect#ReferenceType", "traits": { - "smithy.api#documentation": "

      A valid\n URL.

      ", + "smithy.api#documentation": "

      The type of the reference. Only URL type can be added or updated on a contact.

      ", "smithy.api#required": {} } } @@ -10578,6 +10946,47 @@ } } }, + "com.amazonaws.connect#ReferenceStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "APPROVED", + "name": "APPROVED" + }, + { + "value": "REJECTED", + "name": "REJECTED" + } + ] + } + }, + "com.amazonaws.connect#ReferenceSummary": { + "type": "union", + "members": { + "Url": { + "target": "com.amazonaws.connect#UrlReference", + "traits": { + "smithy.api#documentation": "

      Information about Url reference if the referenceType is URL. Otherwise, null.

      " + } + }, + "Attachment": { + "target": "com.amazonaws.connect#AttachmentReference", + "traits": { + "smithy.api#documentation": "

      Information about the attachment reference if the referenceType is ATTACHMENT. Otherwise, null.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Contains summary information about a reference. ReferenceSummary contains only one non null field between the URL and attachment based on the reference type.

      " + } + }, + "com.amazonaws.connect#ReferenceSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#ReferenceSummary" + } + }, "com.amazonaws.connect#ReferenceType": { "type": "string", "traits": { @@ -10585,10 +10994,26 @@ { "value": "URL", "name": "URL" + }, + { + "value": "ATTACHMENT", + "name": "ATTACHMENT" } ] } }, + "com.amazonaws.connect#ReferenceTypes": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#ReferenceType" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2 + } + } + }, "com.amazonaws.connect#ReferenceValue": { "type": "string", "traits": { @@ -11077,7 +11502,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

      The tags used to organize, track, or control access for this resource.

      " + "smithy.api#documentation": "

      One or more tags.

      " } } }, @@ -11393,7 +11818,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Initiates real-time message streaming for a new chat contact.

      \n

      For more information about message streaming, see Enable real-time chat message\n streaming in the Amazon Connect Administrator Guide.

      ", + "smithy.api#documentation": "

      Initiates real-time message streaming for a new chat contact.

      \n

      For more information about message streaming, see Enable real-time chat message\n streaming in the Amazon Connect Administrator Guide.

      ", "smithy.api#http": { "method": "POST", "uri": "/contact/start-streaming", @@ -11479,7 +11904,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Places an outbound call to a contact, and then initiates the contact flow. It performs the\n actions in the contact flow that's specified (in ContactFlowId).

      \n \n

      Agents do not initiate the outbound API, which means that they do not dial the contact. If\n the contact flow places an outbound call to a contact, and then puts the contact in queue, the\n call is then routed to the agent, like any other inbound case.

      \n\n

      There is a 60-second dialing timeout for this operation. If the call is not connected after\n 60 seconds, it fails.

      \n \n

      UK numbers with a 447 prefix are not allowed by default. Before you can dial these UK\n mobile numbers, you must submit a service quota increase request. For more information, see\n Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

      \n
      \n \n

      Campaign calls are not allowed by default. Before you can make a call with \n TrafficType = CAMPAIGN, you must submit a service quota increase request. For more information, see \n Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

      \n
      ", + "smithy.api#documentation": "

      Places an outbound call to a contact, and then initiates the contact flow. It performs the\n actions in the contact flow that's specified (in ContactFlowId).

      \n\n

      Agents do not initiate the outbound API, which means that they do not dial the contact. If\n the contact flow places an outbound call to a contact, and then puts the contact in queue, the\n call is then routed to the agent, like any other inbound case.

      \n\n

      There is a 60-second dialing timeout for this operation. If the call is not connected after\n 60 seconds, it fails.

      \n \n

      UK numbers with a 447 prefix are not allowed by default. Before you can dial these UK\n mobile numbers, you must submit a service quota increase request. For more information, see\n Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

      \n
      \n \n

      Campaign calls are not allowed by default. Before you can make a call with\n TrafficType = CAMPAIGN, you must submit a service quota increase\n request. For more information, see Amazon Connect Service Quotas\n in the Amazon Connect Administrator Guide.

      \n
      ", "smithy.api#http": { "method": "PUT", "uri": "/contact/outbound-voice", @@ -11551,7 +11976,7 @@ "TrafficType": { "target": "com.amazonaws.connect#TrafficType", "traits": { - "smithy.api#documentation": "

      Denotes the class of traffic. Calls with different traffic types are handled differently by\n Amazon Connect. The default value is GENERAL. Use CAMPAIGN if\n EnableAnswerMachineDetection is set to true. For all other cases, use\n GENERAL.

      " + "smithy.api#documentation": "

      Denotes the class of traffic. Calls with different traffic types are handled differently by\n Amazon Connect. The default value is GENERAL. Use CAMPAIGN if\n EnableAnswerMachineDetection is set to true. For all other cases, use\n GENERAL.

      " } } } @@ -11596,7 +12021,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Initiates a contact flow to start a new task.

      ", + "smithy.api#documentation": "

      Initiates a contact flow to start a new task immediately or at a future date and\n time.

      ", "smithy.api#http": { "method": "PUT", "uri": "/contact/task", @@ -11658,6 +12083,12 @@ "smithy.api#documentation": "

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

      ", "smithy.api#idempotencyToken": {} } + }, + "ScheduledTime": { + "target": "com.amazonaws.connect#Timestamp", + "traits": { + "smithy.api#documentation": "

      The timestamp, in Unix Epoch seconds format, at which to start running the inbound contact flow. The scheduled time cannot be in the past. It must be within up to 6 days in future.

      " + } } } }, @@ -12020,7 +12451,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Adds the specified tags to the specified resource.

      \n

      The supported resource types are users, routing profiles, queues, quick connects, \n contact flows, agent status, and hours of operation.

      \n

      For sample policies that use tags, see Amazon Connect Identity-Based\n Policy Examples in the Amazon Connect Administrator Guide.

      ", + "smithy.api#documentation": "

      Adds the specified tags to the specified resource.

      \n

      The supported resource types are users, routing profiles, queues, quick connects, contact\n flows, agent status, and hours of operation.

      \n

      For sample policies that use tags, see Amazon Connect Identity-Based\n Policy Examples in the Amazon Connect Administrator Guide.

      ", "smithy.api#http": { "method": "POST", "uri": "/tags/{resourceArn}", @@ -12300,6 +12731,40 @@ } } }, + "com.amazonaws.connect#UpdateContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdateContactRequest" + }, + "output": { + "target": "com.amazonaws.connect#UpdateContactResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      This API is in preview release for Amazon Connect and is subject to change.

      \n

      Adds or updates user defined contact information associated with the specified contact. At\n least one field to be updated must be present in the request.

      \n \n

      You can add or update user-defined contact information for both ongoing and completed\n contacts.

      \n
      ", + "smithy.api#http": { + "method": "POST", + "uri": "/contacts/{InstanceId}/{ContactId}", + "code": 200 + } + } + }, "com.amazonaws.connect#UpdateContactAttributes": { "type": "operation", "input": { @@ -12490,6 +12955,116 @@ } } }, + "com.amazonaws.connect#UpdateContactRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

      The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ContactId": { + "target": "com.amazonaws.connect#ContactId", + "traits": { + "smithy.api#documentation": "

      The identifier of the contact. This is the identifier of the contact associated with the\n first interaction with your contact center.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.connect#Name", + "traits": { + "smithy.api#documentation": "

      The name of the contact.

      " + } + }, + "Description": { + "target": "com.amazonaws.connect#Description", + "traits": { + "smithy.api#documentation": "

      The description of the contact.

      " + } + }, + "References": { + "target": "com.amazonaws.connect#ContactReferences", + "traits": { + "smithy.api#documentation": "

      A formatted URL that is shown to an agent in the Contact Control Panel (CCP).

      " + } + } + } + }, + "com.amazonaws.connect#UpdateContactResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.connect#UpdateContactSchedule": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdateContactScheduleRequest" + }, + "output": { + "target": "com.amazonaws.connect#UpdateContactScheduleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#LimitExceededException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      Updates the scheduled time of a task contact that is already scheduled.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/contact/schedule", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdateContactScheduleRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

      The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

      ", + "smithy.api#required": {} + } + }, + "ContactId": { + "target": "com.amazonaws.connect#ContactId", + "traits": { + "smithy.api#documentation": "

      The identifier of the contact.

      ", + "smithy.api#required": {} + } + }, + "ScheduledTime": { + "target": "com.amazonaws.connect#Timestamp", + "traits": { + "smithy.api#documentation": "

      The timestamp, in Unix Epoch seconds format, at which to start running the inbound contact flow. The scheduled time cannot be in the past. It must be within up to 6 days in future.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#UpdateContactScheduleResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.connect#UpdateHoursOfOperation": { "type": "operation", "input": { @@ -12623,7 +13198,7 @@ "AttributeType": { "target": "com.amazonaws.connect#InstanceAttributeType", "traits": { - "smithy.api#documentation": "

      The type of attribute.

      \n \n

      Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact Amazon Web Services Support for allowlisting.

      \n
      ", + "smithy.api#documentation": "

      The type of attribute.

      \n \n

      Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature,\n contact AWS Support for allowlisting.

      \n
      ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -13856,6 +14431,26 @@ } } }, + "com.amazonaws.connect#UrlReference": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.connect#ReferenceKey", + "traits": { + "smithy.api#documentation": "

      Identifier of the URL reference.

      " + } + }, + "Value": { + "target": "com.amazonaws.connect#ReferenceValue", + "traits": { + "smithy.api#documentation": "

      A valid URL.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      The URL reference.

      " + } + }, "com.amazonaws.connect#UseCase": { "type": "structure", "members": { diff --git a/codegen/sdk-codegen/aws-models/database-migration-service.json b/codegen/sdk-codegen/aws-models/database-migration-service.json index 299424466707..cfbd5a0985bf 100644 --- a/codegen/sdk-codegen/aws-models/database-migration-service.json +++ b/codegen/sdk-codegen/aws-models/database-migration-service.json @@ -127,6 +127,24 @@ }, "com.amazonaws.databasemigrationservice#AmazonDMSv20160101": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Database Migration Service", + "arnNamespace": "dms", + "cloudFormationName": "DMS", + "cloudTrailEventSource": "databasemigrationservice.amazonaws.com", + "endpointPrefix": "dms" + }, + "aws.auth#sigv4": { + "name": "dms" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "Database Migration Service\n

      Database Migration Service (DMS) can migrate your data to and from the most\n widely used commercial and open-source databases such as Oracle, PostgreSQL, Microsoft SQL\n Server, Amazon Redshift, MariaDB, Amazon Aurora, MySQL, and SAP Adaptive Server Enterprise\n (ASE). The service supports homogeneous migrations such as Oracle to Oracle, as well as\n heterogeneous migrations between different database platforms, such as Oracle to MySQL or\n SQL Server to PostgreSQL.

      \n

      For more information about DMS, see What Is Database Migration Service?\n in the Database Migration Service User Guide.\n

      ", + "smithy.api#title": "AWS Database Migration Service", + "smithy.api#xmlNamespace": { + "uri": "http://dms.amazonaws.com/doc/2016-01-01/" + } + }, "version": "2016-01-01", "operations": [ { @@ -294,25 +312,7 @@ { "target": "com.amazonaws.databasemigrationservice#TestConnection" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Database Migration Service", - "arnNamespace": "dms", - "cloudFormationName": "DMS", - "cloudTrailEventSource": "databasemigrationservice.amazonaws.com", - "endpointPrefix": "dms" - }, - "aws.auth#sigv4": { - "name": "dms" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Database Migration Service\n

      Database Migration Service (DMS) can migrate your data to and from the most\n widely used commercial and open-source databases such as Oracle, PostgreSQL, Microsoft SQL\n Server, Amazon Redshift, MariaDB, Amazon Aurora, MySQL, and SAP Adaptive Server Enterprise\n (ASE). The service supports homogeneous migrations such as Oracle to Oracle, as well as\n heterogeneous migrations between different database platforms, such as Oracle to MySQL or\n SQL Server to PostgreSQL.

      \n

      For more information about DMS, see What Is Database Migration Service?\n in the Database Migration Service User Guide.\n

      ", - "smithy.api#title": "AWS Database Migration Service", - "smithy.api#xmlNamespace": { - "uri": "http://dms.amazonaws.com/doc/2016-01-01/" - } - } + ] }, "com.amazonaws.databasemigrationservice#ApplyPendingMaintenanceAction": { "type": "operation", @@ -558,7 +558,7 @@ "CertificateWallet": { "target": "com.amazonaws.databasemigrationservice#CertificateWallet", "traits": { - "smithy.api#documentation": "

      The location of an imported Oracle Wallet certificate for use with SSL.

      " + "smithy.api#documentation": "

      The location of an imported Oracle Wallet certificate for use with SSL. Example: filebase64(\"${path.root}/rds-ca-2019-root.sso\")\n

      " } }, "CertificateArn": { @@ -756,7 +756,7 @@ "EngineName": { "target": "com.amazonaws.databasemigrationservice#String", "traits": { - "smithy.api#documentation": "

      The type of engine for the endpoint. Valid values, depending on the\n EndpointType value, include \"mysql\", \"oracle\",\n \"postgres\", \"mariadb\", \"aurora\",\n \"aurora-postgresql\", \"redshift\", \"s3\",\n \"db2\", \"azuredb\", \"sybase\", \"dynamodb\", \"mongodb\",\n \"kinesis\", \"kafka\", \"elasticsearch\", \"docdb\",\n \"sqlserver\", and \"neptune\".

      ", + "smithy.api#documentation": "

      The type of engine for the endpoint. Valid values, depending on the\n EndpointType value, include \"mysql\", \"oracle\",\n \"postgres\", \"mariadb\", \"aurora\", \n \"aurora-postgresql\", \"opensearch\", \"redshift\", \"s3\",\n \"db2\", \"azuredb\", \"sybase\", \"dynamodb\", \"mongodb\",\n \"kinesis\", \"kafka\", \"elasticsearch\", \"docdb\",\n \"sqlserver\", and \"neptune\".

      ", "smithy.api#required": {} } }, @@ -871,7 +871,7 @@ "ElasticsearchSettings": { "target": "com.amazonaws.databasemigrationservice#ElasticsearchSettings", "traits": { - "smithy.api#documentation": "

      Settings in JSON format for the target Elasticsearch endpoint. For more information\n about the available settings, see Extra Connection Attributes When Using Elasticsearch as a Target for DMS in\n the Database Migration Service User Guide.

      " + "smithy.api#documentation": "

      Settings in JSON format for the target OpenSearch endpoint. For more information\n about the available settings, see Extra Connection Attributes When Using OpenSearch as a Target for DMS in\n the Database Migration Service User Guide.

      " } }, "NeptuneSettings": { @@ -933,6 +933,12 @@ "traits": { "smithy.api#documentation": "

      Settings in JSON format for the target Redis endpoint.

      " } + }, + "GcpMySQLSettings": { + "target": "com.amazonaws.databasemigrationservice#GcpMySQLSettings", + "traits": { + "smithy.api#documentation": "

      Settings in JSON format for the source GCP MySQL endpoint.

      " + } } }, "traits": { @@ -1531,7 +1537,7 @@ "CertificateArn": { "target": "com.amazonaws.databasemigrationservice#String", "traits": { - "smithy.api#documentation": "

      The Amazon Resource Name (ARN) of the deleted certificate.

      ", + "smithy.api#documentation": "

      The Amazon Resource Name (ARN) of the certificate.

      ", "smithy.api#required": {} } } @@ -2062,7 +2068,7 @@ "Filters": { "target": "com.amazonaws.databasemigrationservice#FilterList", "traits": { - "smithy.api#documentation": "

      Filters applied to the certificates described in the form of key-value pairs.

      " + "smithy.api#documentation": "

      Filters applied to the certificates described in the form of key-value pairs. \n Valid values are certificate-arn and certificate-id.

      " } }, "MaxRecords": { @@ -2495,7 +2501,7 @@ "Filters": { "target": "com.amazonaws.databasemigrationservice#FilterList", "traits": { - "smithy.api#documentation": "

      Filters applied to event subscriptions.

      " + "smithy.api#documentation": "

      Filters applied to event subscriptions.

      \n

      Valid filter names: event-subscription-arn | event-subscription-id

      " } }, "MaxRecords": { @@ -2594,7 +2600,7 @@ "Filters": { "target": "com.amazonaws.databasemigrationservice#FilterList", "traits": { - "smithy.api#documentation": "

      Filters applied to events.

      " + "smithy.api#documentation": "

      Filters applied to events. The only valid filter is replication-instance-id.

      " } }, "MaxRecords": { @@ -3116,7 +3122,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Returns the task assessment results from the Amazon S3 bucket that DMS creates in your\n Amazon Web Services account. This action always returns the\n latest results.

      \n

      For more information about DMS task assessments, see \n Creating a task assessment report\n in the \n Database Migration Service User Guide.

      ", + "smithy.api#documentation": "

      Returns the task assessment results from the Amazon S3 bucket that DMS creates in your\n Amazon Web Services account. This action always returns the latest results.

      \n

      For more information about DMS task assessments, see Creating a task assessment\n report in the Database Migration Service User Guide.

      ", "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -4029,25 +4035,25 @@ "EndpointUri": { "target": "com.amazonaws.databasemigrationservice#String", "traits": { - "smithy.api#documentation": "

      The endpoint for the Elasticsearch cluster. DMS uses HTTPS if a transport \n protocol (http/https) is not specified.

      ", + "smithy.api#documentation": "

      The endpoint for the OpenSearch cluster. DMS uses HTTPS if a transport \n protocol (http/https) is not specified.

      ", "smithy.api#required": {} } }, "FullLoadErrorPercentage": { "target": "com.amazonaws.databasemigrationservice#IntegerOptional", "traits": { - "smithy.api#documentation": "

      The maximum percentage of records that can fail to be written before a full load\n operation stops.

      \n

      To avoid early failure, this counter is only effective after 1000 records \n are transferred. Elasticsearch also has the concept of error monitoring during the \n last 10 minutes of an Observation Window. If transfer of all records fail in the \n last 10 minutes, the full load operation stops.

      " + "smithy.api#documentation": "

      The maximum percentage of records that can fail to be written before a full load\n operation stops.

      \n

      To avoid early failure, this counter is only effective after 1000 records \n are transferred. OpenSearch also has the concept of error monitoring during the \n last 10 minutes of an Observation Window. If transfer of all records fail in the \n last 10 minutes, the full load operation stops.

      " } }, "ErrorRetryDuration": { "target": "com.amazonaws.databasemigrationservice#IntegerOptional", "traits": { - "smithy.api#documentation": "

      The maximum number of seconds for which DMS retries failed API requests to the\n Elasticsearch cluster.

      " + "smithy.api#documentation": "

      The maximum number of seconds for which DMS retries failed API requests to the\n OpenSearch cluster.

      " } } }, "traits": { - "smithy.api#documentation": "

      Provides information that defines an Elasticsearch endpoint.

      " + "smithy.api#documentation": "

      Provides information that defines an OpenSearch endpoint.

      " } }, "com.amazonaws.databasemigrationservice#EncodingTypeValue": { @@ -4102,7 +4108,7 @@ "EngineName": { "target": "com.amazonaws.databasemigrationservice#String", "traits": { - "smithy.api#documentation": "

      The database engine name. Valid values, depending on the EndpointType, include\n \"mysql\", \"oracle\", \"postgres\",\n \"mariadb\", \"aurora\", \"aurora-postgresql\",\n \"redshift\", \"s3\", \"db2\", \"azuredb\",\n \"sybase\", \"dynamodb\", \"mongodb\",\n \"kinesis\", \"kafka\", \"elasticsearch\",\n \"documentdb\", \"sqlserver\", and \"neptune\".

      " + "smithy.api#documentation": "

      The database engine name. Valid values, depending on the EndpointType, include\n \"mysql\", \"oracle\", \"postgres\",\n \"mariadb\", \"aurora\", \"aurora-postgresql\", \"opensearch\",\n \"redshift\", \"s3\", \"db2\", \"azuredb\",\n \"sybase\", \"dynamodb\", \"mongodb\",\n \"kinesis\", \"kafka\", \"elasticsearch\",\n \"documentdb\", \"sqlserver\", and \"neptune\".

      " } }, "EngineDisplayName": { @@ -4204,7 +4210,7 @@ "DmsTransferSettings": { "target": "com.amazonaws.databasemigrationservice#DmsTransferSettings", "traits": { - "smithy.api#documentation": "

      The settings in JSON format for the DMS transfer type of source endpoint.

      \n

      Possible settings include the following:

      \n
        \n
      • \n

        \n ServiceAccessRoleArn - - The Amazon Resource Name (ARN) used by the service access IAM role. \n The role must allow the iam:PassRole action.

        \n
      • \n
      • \n

        \n BucketName - The name of the S3 bucket to use.

        \n
      • \n
      \n

      Shorthand syntax for these settings is as follows:\n ServiceAccessRoleArn=string,BucketName=string,\n

      \n

      JSON syntax for these settings is as follows: { \"ServiceAccessRoleArn\":\n \"string\", \"BucketName\": \"string\"} \n

      " + "smithy.api#documentation": "

      The settings for the DMS Transfer type source. For more information, see the DmsTransferSettings structure.

      " } }, "MongoDbSettings": { @@ -4228,7 +4234,7 @@ "ElasticsearchSettings": { "target": "com.amazonaws.databasemigrationservice#ElasticsearchSettings", "traits": { - "smithy.api#documentation": "

      The settings for the Elasticsearch source endpoint. For more information, see the\n ElasticsearchSettings structure.

      " + "smithy.api#documentation": "

      The settings for the OpenSearch source endpoint. For more information, see the\n ElasticsearchSettings structure.

      " } }, "NeptuneSettings": { @@ -4287,6 +4293,12 @@ "traits": { "smithy.api#documentation": "

      The settings for the Redis target endpoint. For more information, see the \n RedisSettings structure.

      " } + }, + "GcpMySQLSettings": { + "target": "com.amazonaws.databasemigrationservice#GcpMySQLSettings", + "traits": { + "smithy.api#documentation": "

      Settings in JSON format for the source GCP MySQL endpoint.

      " + } } }, "traits": { @@ -4604,6 +4616,98 @@ } } }, + "com.amazonaws.databasemigrationservice#GcpMySQLSettings": { + "type": "structure", + "members": { + "AfterConnectScript": { + "target": "com.amazonaws.databasemigrationservice#String", + "traits": { + "smithy.api#documentation": "

      Specifies a script to run immediately after DMS connects to the endpoint. \n The migration task continues running regardless if the SQL statement succeeds or fails.

      \n \n

      For this parameter, provide the code of the script itself, not the name of a file containing the script.

      " + } + }, + "CleanSourceMetadataOnMismatch": { + "target": "com.amazonaws.databasemigrationservice#BooleanOptional", + "traits": { + "smithy.api#documentation": "

      Adjusts the behavior of DMS when migrating from an SQL Server source database \n that is hosted as part of an Always On availability group cluster. If you need DMS\n to poll all the nodes in the Always On cluster for transaction backups, set this attribute to false.

      " + } + }, + "DatabaseName": { + "target": "com.amazonaws.databasemigrationservice#String", + "traits": { + "smithy.api#documentation": "

      Database name for the endpoint. For a MySQL source or target endpoint, don't explicitly specify \n the database using the DatabaseName request parameter on either the CreateEndpoint\n or ModifyEndpoint API call. Specifying DatabaseName when you create or modify a \n MySQL endpoint replicates all the task tables to this single database. For MySQL endpoints, you specify \n the database only when you specify the schema in the table-mapping rules of the DMS task.

      " + } + }, + "EventsPollInterval": { + "target": "com.amazonaws.databasemigrationservice#IntegerOptional", + "traits": { + "smithy.api#documentation": "

      Specifies how often to check the binary log for new changes/events when the database is idle. The default is five seconds.

      \n

      Example: eventsPollInterval=5;\n

      \n

      In the example, DMS checks for changes in the binary logs every five seconds.

      " + } + }, + "TargetDbType": { + "target": "com.amazonaws.databasemigrationservice#TargetDbType", + "traits": { + "smithy.api#documentation": "

      Specifies where to migrate source tables on the target, either to a single database or multiple databases.

      \n

      Example: targetDbType=MULTIPLE_DATABASES \n

      " + } + }, + "MaxFileSize": { + "target": "com.amazonaws.databasemigrationservice#IntegerOptional", + "traits": { + "smithy.api#documentation": "

      Specifies the maximum size (in KB) of any .csv file used to transfer data to a MySQL-compatible database.

      \n

      Example: maxFileSize=512 \n

      " + } + }, + "ParallelLoadThreads": { + "target": "com.amazonaws.databasemigrationservice#IntegerOptional", + "traits": { + "smithy.api#documentation": "

      Improves performance when loading data into the MySQL-compatible target database. Specifies how many \n threads to use to load the data into the MySQL-compatible target database. Setting a large number of \n threads can have an adverse effect on database performance, because a separate connection is required \n for each thread. The default is one.

      \n \n

      Example: parallelLoadThreads=1 \n

      " + } + }, + "Password": { + "target": "com.amazonaws.databasemigrationservice#SecretString", + "traits": { + "smithy.api#documentation": "

      Endpoint connection password.

      " + } + }, + "Port": { + "target": "com.amazonaws.databasemigrationservice#IntegerOptional", + "traits": { + "smithy.api#documentation": "

      " + } + }, + "ServerName": { + "target": "com.amazonaws.databasemigrationservice#String", + "traits": { + "smithy.api#documentation": "

      Endpoint TCP port.

      " + } + }, + "ServerTimezone": { + "target": "com.amazonaws.databasemigrationservice#String", + "traits": { + "smithy.api#documentation": "

      Specifies the time zone for the source MySQL database.

      \n \n

      Example: serverTimezone=US/Pacific;\n

      \n \n

      Note: Do not enclose time zones in single quotes.

      " + } + }, + "Username": { + "target": "com.amazonaws.databasemigrationservice#String", + "traits": { + "smithy.api#documentation": "

      Endpoint connection user name.

      " + } + }, + "SecretsManagerAccessRoleArn": { + "target": "com.amazonaws.databasemigrationservice#String", + "traits": { + "smithy.api#documentation": "

      The full Amazon Resource Name (ARN) of the IAM role that specifies DMS\n as the trusted entity and grants the required permissions to access the value in \n SecretsManagerSecret. The role must allow the iam:PassRole action. \n SecretsManagerSecret has the value of the Amazon Web Services Secrets Manager secret \n that allows access to the MySQL endpoint.

      \n \n

      You can specify one of two sets of values for these permissions. You can specify \n the values for this setting and SecretsManagerSecretId. Or you can specify clear-text\n values for UserName, Password, ServerName, and Port.\n You can't specify both. For more information on creating this SecretsManagerSecret \n and the SecretsManagerAccessRoleArn and SecretsManagerSecretId required to \n access it, see Using secrets to access Database Migration Service resources in the \n Database Migration Service User Guide.\n \n

      \n
      " + } + }, + "SecretsManagerSecretId": { + "target": "com.amazonaws.databasemigrationservice#String", + "traits": { + "smithy.api#documentation": "

      The full ARN, partial ARN, or friendly name of the SecretsManagerSecret\n that contains the MySQL endpoint connection details.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Settings in JSON format for the source GCP MySQL endpoint.

      " + } + }, "com.amazonaws.databasemigrationservice#IBMDb2Settings": { "type": "structure", "members": { @@ -4714,7 +4818,7 @@ "CertificateWallet": { "target": "com.amazonaws.databasemigrationservice#CertificateWallet", "traits": { - "smithy.api#documentation": "

      The location of an imported Oracle Wallet certificate for use with SSL. Provide the name of a .sso file\n using the fileb:// prefix. You can't provide the certificate inline.\n

      " + "smithy.api#documentation": "

      The location of an imported Oracle Wallet certificate for use with SSL. Provide the name of a .sso file\n using the fileb:// prefix. You can't provide the certificate inline.

      \n

      Example: filebase64(\"${path.root}/rds-ca-2019-root.sso\")\n

      " } }, "Tags": { @@ -4840,7 +4944,7 @@ } }, "traits": { - "smithy.api#documentation": "

      The specified master key (CMK) isn't enabled.

      ", + "smithy.api#documentation": "

      The specified KMS key isn't enabled.

      ", "smithy.api#error": "client" } }, @@ -5354,7 +5458,7 @@ "EngineName": { "target": "com.amazonaws.databasemigrationservice#String", "traits": { - "smithy.api#documentation": "

      The type of engine for the endpoint. Valid values, depending on the EndpointType,\n include\n \"mysql\", \"oracle\", \"postgres\",\n \"mariadb\", \"aurora\", \"aurora-postgresql\",\n \"redshift\", \"s3\", \"db2\", \"azuredb\",\n \"sybase\", \"dynamodb\", \"mongodb\",\n \"kinesis\", \"kafka\", \"elasticsearch\",\n \"documentdb\", \"sqlserver\", and \"neptune\".

      " + "smithy.api#documentation": "

      The type of engine for the endpoint. Valid values, depending on the EndpointType,\n include\n \"mysql\", \"oracle\", \"postgres\",\n \"mariadb\", \"aurora\", \"aurora-postgresql\", \"opensearch\",\n \"redshift\", \"s3\", \"db2\", \"azuredb\",\n \"sybase\", \"dynamodb\", \"mongodb\",\n \"kinesis\", \"kafka\", \"elasticsearch\",\n \"documentdb\", \"sqlserver\", and \"neptune\".

      " } }, "Username": { @@ -5456,7 +5560,7 @@ "ElasticsearchSettings": { "target": "com.amazonaws.databasemigrationservice#ElasticsearchSettings", "traits": { - "smithy.api#documentation": "

      Settings in JSON format for the target Elasticsearch endpoint. For more information\n about the available settings, see Extra Connection Attributes When Using Elasticsearch as a Target for DMS in\n the Database Migration Service User Guide.\n

      " + "smithy.api#documentation": "

      Settings in JSON format for the target OpenSearch endpoint. For more information\n about the available settings, see Extra Connection Attributes When Using OpenSearch as a Target for DMS in\n the Database Migration Service User Guide.\n

      " } }, "NeptuneSettings": { @@ -5521,6 +5625,12 @@ "traits": { "smithy.api#documentation": "

      If this attribute is Y, the current call to ModifyEndpoint replaces all\n existing endpoint settings with the exact settings that you specify in this call. If this\n attribute is N, the current call to ModifyEndpoint does two things:

      \n
        \n
      • \n

        It replaces any endpoint settings that already exist with new values, for settings with the\n same names.

        \n
      • \n
      • \n

        It creates new endpoint settings that you specify in the call, for settings with different\n names.

        \n
      • \n
      \n

      For example, if you call create-endpoint ... --endpoint-settings '{\"a\":1}'\n ..., the endpoint has the following endpoint settings: '{\"a\":1}'. If\n you then call modify-endpoint ... --endpoint-settings '{\"b\":2}' ... for the\n same endpoint, the endpoint has the following settings: '{\"a\":1,\"b\":2}'.

      \n

      However, suppose that you follow this with a call to modify-endpoint ...\n --endpoint-settings '{\"b\":2}' --exact-settings ... for that same endpoint again.\n Then the endpoint has the following settings: '{\"b\":2}'. All existing settings\n are replaced with the exact settings that you specify.

      " } + }, + "GcpMySQLSettings": { + "target": "com.amazonaws.databasemigrationservice#GcpMySQLSettings", + "traits": { + "smithy.api#documentation": "

      Settings in JSON format for the source GCP MySQL endpoint.

      " + } } }, "traits": { @@ -6117,7 +6227,7 @@ "EventsPollInterval": { "target": "com.amazonaws.databasemigrationservice#IntegerOptional", "traits": { - "smithy.api#documentation": "

      Specifies how often to check the binary log for new\n changes/events when the database is idle.

      \n

      Example: eventsPollInterval=5;\n

      \n

      In the example, DMS checks for changes in the binary\n logs every five seconds.

      " + "smithy.api#documentation": "

      Specifies how often to check the binary log for new\n changes/events when the database is idle. The default is five seconds.

      \n

      Example: eventsPollInterval=5;\n

      \n

      In the example, DMS checks for changes in the binary\n logs every five seconds.

      " } }, "TargetDbType": { @@ -6135,7 +6245,7 @@ "ParallelLoadThreads": { "target": "com.amazonaws.databasemigrationservice#IntegerOptional", "traits": { - "smithy.api#documentation": "

      Improves performance when loading data into the MySQL-compatible target database.\n Specifies how many threads to use to load the data into the MySQL-compatible target\n database. Setting a large number of threads can have an adverse effect on database\n performance, because a separate connection is required for each thread.

      \n

      Example: parallelLoadThreads=1\n

      " + "smithy.api#documentation": "

      Improves performance when loading data into the MySQL-compatible target database.\n Specifies how many threads to use to load the data into the MySQL-compatible target\n database. Setting a large number of threads can have an adverse effect on database\n performance, because a separate connection is required for each thread. The default is one.

      \n

      Example: parallelLoadThreads=1\n

      " } }, "Password": { @@ -6739,7 +6849,7 @@ "Port": { "target": "com.amazonaws.databasemigrationservice#IntegerOptional", "traits": { - "smithy.api#documentation": "

      Endpoint TCP port.

      " + "smithy.api#documentation": "

      Endpoint TCP port. The default is 5432.

      " } }, "ServerName": { @@ -8334,6 +8444,12 @@ "smithy.api#documentation": "

      Specifies the folder path of CDC files. For an S3 source, this setting is required if a\n task captures change data; otherwise, it's optional. If CdcPath is set, DMS\n reads CDC files from this path and replicates the data changes to the target endpoint.\n For an S3 target if you set \n PreserveTransactions\n to true, DMS\n verifies that you have set this parameter to a folder path on your S3 target where DMS\n can save the transaction order for the CDC load. DMS creates this CDC folder path\n in either your S3 target working directory or the S3 target location specified by \n BucketFolder\n and \n BucketName\n .

      \n

      For example, if you specify CdcPath as MyChangedData, and you\n specify BucketName as MyTargetBucket but do not specify\n BucketFolder, DMS creates the CDC folder path following:\n MyTargetBucket/MyChangedData.

      \n

      If you specify the same CdcPath, and you specify BucketName as\n MyTargetBucket and BucketFolder as MyTargetData,\n DMS creates the CDC folder path following:\n MyTargetBucket/MyTargetData/MyChangedData.

      \n

      For more information on CDC including transaction order on an S3 target, see Capturing data changes (CDC) including transaction order on the S3\n target.

      \n \n

      This setting is supported in DMS versions 3.4.2 and later.

      \n
      " } }, + "UseTaskStartTimeForFullLoadTimestamp": { + "target": "com.amazonaws.databasemigrationservice#BooleanOptional", + "traits": { + "smithy.api#documentation": "

      When set to true, this parameter uses the task start time as the timestamp column value instead of \n the time data is written to target. For full load, when useTaskStartTimeForFullLoadTimestamp\n is set to true, each row of the timestamp column contains the task start time. For CDC loads, \n each row of the timestamp column contains the transaction commit time.

      \n \n

      When useTaskStartTimeForFullLoadTimestamp is set to false, the full load timestamp \n in the timestamp column increments with the time data arrives at the target.

      " + } + }, "CannedAclForObjects": { "target": "com.amazonaws.databasemigrationservice#CannedAclForObjectsValue", "traits": { @@ -8698,7 +8814,7 @@ "StartReplicationTaskType": { "target": "com.amazonaws.databasemigrationservice#StartReplicationTaskTypeValue", "traits": { - "smithy.api#documentation": "

      A type of replication task.

      ", + "smithy.api#documentation": "

      The type of replication task to start.

      \n

      When the migration type is full-load or full-load-and-cdc, the only valid value \n for the first run of the task is start-replication. You use reload-target to restart\n the task and resume-processing to resume the task.

      \n

      When the migration type is cdc, you use start-replication to start or restart\n the task, and resume-processing to resume the task. reload-target is not a valid value for \n a task with migration type of cdc.

      ", "smithy.api#required": {} } }, @@ -8949,7 +9065,7 @@ "Port": { "target": "com.amazonaws.databasemigrationservice#IntegerOptional", "traits": { - "smithy.api#documentation": "

      Endpoint TCP port.

      " + "smithy.api#documentation": "

      Endpoint TCP port. The default is 5000.

      " } }, "ServerName": { diff --git a/codegen/sdk-codegen/aws-models/devops-guru.json b/codegen/sdk-codegen/aws-models/devops-guru.json index f94c39148384..c8deed7a234c 100644 --- a/codegen/sdk-codegen/aws-models/devops-guru.json +++ b/codegen/sdk-codegen/aws-models/devops-guru.json @@ -40,11 +40,69 @@ } }, "traits": { - "smithy.api#documentation": "

      You don't have permissions to perform the requested operation. The user or role that is making the request must have at \n\t\t\tleast one IAM permissions policy attached that grants the required permissions. For more information, see \n\t\t\tAccess Management in the IAM User Guide.

      ", + "smithy.api#documentation": "

      You don't have permissions to perform the requested operation. The user or role that\n\t\t\tis making the request must have at least one IAM permissions policy attached that grants\n\t\t\tthe required permissions. For more information, see Access Management in the\n\t\t\t\tIAM User Guide.

      ", "smithy.api#error": "client", "smithy.api#httpError": 403 } }, + "com.amazonaws.devopsguru#AccountHealth": { + "type": "structure", + "members": { + "AccountId": { + "target": "com.amazonaws.devopsguru#AwsAccountId", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } + }, + "Insight": { + "target": "com.amazonaws.devopsguru#AccountInsightHealth", + "traits": { + "smithy.api#documentation": "

      Information about the health of the Amazon Web Services resources in your account, including the\n\t\t\tnumber of open proactive, open reactive insights, and the Mean Time to Recover (MTTR) of closed insights.\n\t\t

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Returns the number of open reactive insights, the number of open proactive insights,\n\t\t\tand the number of metrics analyzed in your Amazon Web Services account. Use these numbers to gauge the\n\t\t\thealth of operations in your Amazon Web Services account.

      " + } + }, + "com.amazonaws.devopsguru#AccountHealths": { + "type": "list", + "member": { + "target": "com.amazonaws.devopsguru#AccountHealth" + } + }, + "com.amazonaws.devopsguru#AccountIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.devopsguru#AwsAccountId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 5 + } + } + }, + "com.amazonaws.devopsguru#AccountInsightHealth": { + "type": "structure", + "members": { + "OpenProactiveInsights": { + "target": "com.amazonaws.devopsguru#NumOpenProactiveInsights", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of open proactive insights in your Amazon Web Services\n\t\t\taccount.

      " + } + }, + "OpenReactiveInsights": { + "target": "com.amazonaws.devopsguru#NumOpenReactiveInsights", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of open reactive insights in your Amazon Web Services\n\t\t\taccount.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Information about the number of open reactive and proactive insights that can be used\n\t\t\tto gauge the health of your system.

      " + } + }, "com.amazonaws.devopsguru#AddNotificationChannel": { "type": "operation", "input": { @@ -77,7 +135,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n\t\t\tAdds a notification channel to DevOps Guru. A notification channel is used to notify you about important DevOps Guru events, such as when an insight is generated.\n\t\t

      \n\t\t\n\t\t

      If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission \n\t\t\t\tto it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. \n\t\t\t\tFor more information, see Permissions \n\t\t\t\tfor cross account Amazon SNS topics.

      \n\t\t\t\t

      If you use an Amazon SNS topic that is encrypted by an AWS Key Management Service customer-managed key (CMK), then you must add permissions \n\t\t\t\tto the CMK. For more information, see Permissions for \n\t\t\t\tAWS KMS–encrypted Amazon SNS topics.

      ", + "smithy.api#documentation": "

      Adds a notification channel to DevOps Guru. A notification channel is used to notify you\n\t\t\tabout important DevOps Guru events, such as when an insight is generated.

      \n\t\t

      If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission \n\t\t\t\tto it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. \n\t\t\t\tFor more information, see Permissions \n\t\t\t\tfor cross account Amazon SNS topics.

      \n\t\t\t\t

      If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions \n\t\t\t\tto the CMK. For more information, see Permissions for \n\t\t\t\tAmazon Web Services KMS–encrypted Amazon SNS topics.

      ", "smithy.api#http": { "method": "PUT", "uri": "/channels", @@ -91,7 +149,7 @@ "Config": { "target": "com.amazonaws.devopsguru#NotificationChannelConfig", "traits": { - "smithy.api#documentation": "

      A NotificationChannelConfig object that specifies what type of\n \t\tnotification channel to add. The one \n \tsupported notification channel is Amazon Simple Notification Service (Amazon SNS).

      ", + "smithy.api#documentation": "

      A NotificationChannelConfig object that specifies what type of\n\t\t\tnotification channel to add. The one \n \tsupported notification channel is Amazon Simple Notification Service (Amazon SNS).

      ", "smithy.api#required": {} } } @@ -103,7 +161,7 @@ "Id": { "target": "com.amazonaws.devopsguru#NotificationChannelId", "traits": { - "smithy.api#documentation": "

      \n \t\tThe ID of the added notification channel.\n \t

      ", + "smithy.api#documentation": "

      The ID of the added notification channel.

      ", "smithy.api#required": {} } } @@ -131,19 +189,19 @@ "OpenTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time when an anomaly is opened. \n\t\t

      ", + "smithy.api#documentation": "

      The time when an anomaly is opened.

      ", "smithy.api#required": {} } }, "CloseTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time when an anomaly is closed.\n\t\t

      " + "smithy.api#documentation": "

      The time when an anomaly is closed.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tA time range that specifies when DevOps Guru opens and then closes an anomaly. This is different from \n\t\t\tAnomalyTimeRange, which specifies the time range when DevOps Guru actually observes \n\t\t\tthe anomalous behavior.\n\t\t

      " + "smithy.api#documentation": "

      A time range that specifies when DevOps Guru opens and then closes an anomaly. This\n\t\t\tis different from AnomalyTimeRange, which specifies the time range when\n\t\t\tDevOps Guru actually observes the anomalous behavior.

      " } }, "com.amazonaws.devopsguru#AnomalySeverity": { @@ -176,7 +234,7 @@ } }, "traits": { - "smithy.api#documentation": "

      Details about the source of the anomalous operational data that triggered the anomaly. The\n\t\t\tone supported source is Amazon CloudWatch metrics.

      " + "smithy.api#documentation": "

      Details about the source of the anomalous operational data that triggered the\n\t\t\tanomaly. The one supported source is Amazon CloudWatch metrics.

      " } }, "com.amazonaws.devopsguru#AnomalyStatus": { @@ -200,7 +258,7 @@ "StartTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time when the anomalous behavior started.\n\t\t

      ", + "smithy.api#documentation": "

      The time when the anomalous behavior started.

      ", "smithy.api#required": {} } }, @@ -212,11 +270,36 @@ } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tA time range that specifies when the observed unusual behavior in an anomaly started and ended. This is different from \n\t\t\tAnomalyReportedTimeRange, which specifies the time range when DevOps Guru opens and then closes \n\t\t\tan anomaly.\n\t\t

      " + "smithy.api#documentation": "

      A time range that specifies when the observed unusual behavior in an anomaly started\n\t\t\tand ended. This is different from AnomalyReportedTimeRange, which specifies\n\t\t\tthe time range when DevOps Guru opens and then closes an anomaly.

      " + } + }, + "com.amazonaws.devopsguru#AwsAccountId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 12 + }, + "smithy.api#pattern": "^\\d{12}$" } }, "com.amazonaws.devopsguru#CapstoneControlPlaneService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "DevOps Guru", + "arnNamespace": "devops-guru", + "cloudFormationName": "DevOpsGuru", + "cloudTrailEventSource": "devopsguru.amazonaws.com", + "endpointPrefix": "devops-guru" + }, + "aws.auth#sigv4": { + "name": "devops-guru" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

      Amazon DevOps Guru is a fully managed service that helps you identify anomalous behavior in\n\t\t\tbusiness critical operational applications. You specify the Amazon Web Services resources that you\n\t\t\twant DevOps Guru to cover, then the Amazon CloudWatch metrics and Amazon Web Services CloudTrail events related to those\n\t\t\tresources are analyzed. When anomalous behavior is detected, DevOps Guru creates an\n\t\t\t\tinsight that includes recommendations, related events, and\n\t\t\trelated metrics that can help you improve your operational applications. For more\n\t\t\tinformation, see What is Amazon DevOps Guru.

      \n\n\t\t

      You can specify 1 or 2 Amazon Simple Notification Service topics so you are notified every time a new insight\n\t\t\tis created. You can also enable DevOps Guru to generate an OpsItem in Amazon Web Services Systems Manager for each\n\t\t\tinsight to help you manage and track your work addressing insights.

      \n\n\t\t

      To learn about the DevOps Guru workflow, see How DevOps Guru works. To\n\t\t\tlearn about DevOps Guru concepts, see Concepts in DevOps Guru.

      ", + "smithy.api#title": "Amazon DevOps Guru" + }, "version": "2020-12-01", "operations": [ { @@ -237,6 +320,15 @@ { "target": "com.amazonaws.devopsguru#DescribeInsight" }, + { + "target": "com.amazonaws.devopsguru#DescribeOrganizationHealth" + }, + { + "target": "com.amazonaws.devopsguru#DescribeOrganizationOverview" + }, + { + "target": "com.amazonaws.devopsguru#DescribeOrganizationResourceCollectionHealth" + }, { "target": "com.amazonaws.devopsguru#DescribeResourceCollectionHealth" }, @@ -261,6 +353,9 @@ { "target": "com.amazonaws.devopsguru#ListNotificationChannels" }, + { + "target": "com.amazonaws.devopsguru#ListOrganizationInsights" + }, { "target": "com.amazonaws.devopsguru#ListRecommendations" }, @@ -273,6 +368,9 @@ { "target": "com.amazonaws.devopsguru#SearchInsights" }, + { + "target": "com.amazonaws.devopsguru#SearchOrganizationInsights" + }, { "target": "com.amazonaws.devopsguru#StartCostEstimation" }, @@ -282,22 +380,7 @@ { "target": "com.amazonaws.devopsguru#UpdateServiceIntegration" } - ], - "traits": { - "aws.api#service": { - "sdkId": "DevOps Guru", - "arnNamespace": "devops-guru", - "cloudFormationName": "DevOpsGuru", - "cloudTrailEventSource": "devopsguru.amazonaws.com", - "endpointPrefix": "devops-guru" - }, - "aws.auth#sigv4": { - "name": "devops-guru" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

      Amazon DevOps Guru is a fully managed service that helps you identify anomalous behavior in business\n\t\t\tcritical operational applications. You specify the AWS resources that you want DevOps Guru to cover,\n\t\t\tthen the Amazon CloudWatch metrics and AWS CloudTrail events related to those resources are analyzed. When\n\t\t\tanomalous behavior is detected, DevOps Guru creates an insight that includes\n\t\t\trecommendations, related events, and related metrics that can help you improve your\n\t\t\toperational applications. For more information, see What is Amazon DevOps Guru.

      \n\t\t\n\t\t

      \n\t\t\tYou can specify 1 or 2 Amazon Simple Notification Service topics so you are notified every time a new insight is created. You can also enable DevOps Guru to generate \n\t\t\tan OpsItem in AWS Systems Manager for each insight to help you manage and track your work addressing insights.\n\t\t

      \n\t\t\n\t\t

      \n\t\t\tTo learn about the DevOps Guru workflow, see How DevOps Guru works. To \n\t\t\tlearn about DevOps Guru concepts, see Concepts in DevOps Guru.\n\t\t

      ", - "smithy.api#title": "Amazon DevOps Guru" - } + ] }, "com.amazonaws.devopsguru#Channels": { "type": "list", @@ -321,12 +404,12 @@ "StackNames": { "target": "com.amazonaws.devopsguru#StackNames", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn array of CloudFormation stack names.\n\t\t

      " + "smithy.api#documentation": "

      An array of CloudFormation stack names.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about AWS CloudFormation stacks. You can use up to 500 stacks to specify which AWS resources in your account to analyze. \n\t\t\tFor more information, see Stacks \n\t\t\tin the AWS CloudFormation User Guide.\n\t\t

      " + "smithy.api#documentation": "

      Information about Amazon Web Services CloudFormation stacks. You can use up to 500\n\t\t\tstacks to specify which Amazon Web Services resources in your account to analyze. For more\n\t\t\tinformation, see Stacks in the\n\t\t\t\tAmazon Web Services CloudFormation User Guide.

      " } }, "com.amazonaws.devopsguru#CloudFormationCollectionFilter": { @@ -335,12 +418,12 @@ "StackNames": { "target": "com.amazonaws.devopsguru#StackNames", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn array of CloudFormation stack names.\n\t\t

      " + "smithy.api#documentation": "

      An array of CloudFormation stack names.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about AWS CloudFormation stacks. You can use up to 500 stacks to specify which AWS resources in your account to analyze. \n\t\t\tFor more information, see Stacks \n\t\t\tin the AWS CloudFormation User Guide.\n\t\t

      " + "smithy.api#documentation": "

      Information about Amazon Web Services CloudFormation stacks. You can use up to 500\n\t\t\tstacks to specify which Amazon Web Services resources in your account to analyze. For more\n\t\t\tinformation, see Stacks in the\n\t\t\t\tAmazon Web Services CloudFormation User Guide.

      " } }, "com.amazonaws.devopsguru#CloudFormationCostEstimationResourceCollectionFilter": { @@ -354,7 +437,7 @@ } }, "traits": { - "smithy.api#documentation": "

      Information about an AWS CloudFormation stack used to create a monthly cost estimate for DevOps Guru to analyze \n\t\tAWS resources. The maximum number of stacks you can specify for a cost estimate is one. The estimate created is for the cost \n\t\tto analyze the AWS resources defined by the stack. For more information, see Stacks \n\t\t\tin the AWS CloudFormation User Guide.

      " + "smithy.api#documentation": "

      Information about an Amazon Web Services CloudFormation stack used to create a monthly cost estimate\n\t\t\tfor DevOps Guru to analyze Amazon Web Services resources. The maximum number of stacks you can specify for a\n\t\t\tcost estimate is one. The estimate created is for the cost to analyze the Amazon Web Services\n\t\t\tresources defined by the stack. For more information, see Stacks in the\n\t\t\t\tAmazon Web Services CloudFormation User Guide.

      " } }, "com.amazonaws.devopsguru#CloudFormationHealth": { @@ -363,18 +446,18 @@ "StackName": { "target": "com.amazonaws.devopsguru#StackName", "traits": { - "smithy.api#documentation": "

      \n \t\tThe name of the CloudFormation stack.\n \t

      " + "smithy.api#documentation": "

      The name of the CloudFormation stack.

      " } }, "Insight": { "target": "com.amazonaws.devopsguru#InsightHealth", "traits": { - "smithy.api#documentation": "

      \n \t\tInformation about the health of the AWS resources in your account that are specified by an AWS CloudFormation stack, including \n \t\tthe number of open proactive, open reactive insights, and the Mean Time to Recover (MTTR) of closed insights.\n \t

      " + "smithy.api#documentation": "

      Information about the health of the Amazon Web Services resources in your account that are\n\t\t\tspecified by an Amazon Web Services CloudFormation stack, including the number of open proactive, open reactive\n\t\t\tinsights, and the Mean Time to Recover (MTTR) of closed insights.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n \t\tInformation about the health of AWS resources in your account that are specified by an AWS CloudFormation stack.\n \t

      " + "smithy.api#documentation": "

      Information about the health of Amazon Web Services resources in your account that are specified by\n\t\t\tan Amazon Web Services CloudFormation stack.

      " } }, "com.amazonaws.devopsguru#CloudFormationHealths": { @@ -383,48 +466,93 @@ "target": "com.amazonaws.devopsguru#CloudFormationHealth" } }, + "com.amazonaws.devopsguru#CloudWatchMetricDataStatusCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Complete", + "name": "COMPLETE" + }, + { + "value": "InternalError", + "name": "INTERNAL_ERROR" + }, + { + "value": "PartialData", + "name": "PARTIAL_DATA" + } + ] + } + }, + "com.amazonaws.devopsguru#CloudWatchMetricsDataSummary": { + "type": "structure", + "members": { + "TimestampMetricValuePairList": { + "target": "com.amazonaws.devopsguru#TimestampMetricValuePairList", + "traits": { + "smithy.api#documentation": "

      This is a list of cloudwatch metric values at given timestamp.

      " + } + }, + "StatusCode": { + "target": "com.amazonaws.devopsguru#CloudWatchMetricDataStatusCode", + "traits": { + "smithy.api#documentation": "

      This is enum of the status showing whether the metric value pair list has Partial or\n\t\t\tComplete data or there was an error.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Contains information about the analyzed metrics that displayed anomalous behavior.\n\t\t

      " + } + }, "com.amazonaws.devopsguru#CloudWatchMetricsDetail": { "type": "structure", "members": { "MetricName": { "target": "com.amazonaws.devopsguru#CloudWatchMetricsMetricName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of the CloudWatch metric.\n\t\t

      " + "smithy.api#documentation": "

      The name of the CloudWatch metric.

      " } }, "Namespace": { "target": "com.amazonaws.devopsguru#CloudWatchMetricsNamespace", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe namespace of the CloudWatch metric. A namespace is a container for CloudWatch metrics.\n\t\t

      " + "smithy.api#documentation": "

      The namespace of the CloudWatch metric. A namespace is a container for CloudWatch metrics.\n\t\t

      " } }, "Dimensions": { "target": "com.amazonaws.devopsguru#CloudWatchMetricsDimensions", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn array of CloudWatch dimensions associated with \n\t\t

      " + "smithy.api#documentation": "

      An array of CloudWatch dimensions associated with

      " } }, "Stat": { "target": "com.amazonaws.devopsguru#CloudWatchMetricsStat", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe type of statistic associated with the CloudWatch metric. For more information, see \n\t\t\tStatistics in the \n\t\t\tAmazon CloudWatch User Guide.\n\t\t

      " + "smithy.api#documentation": "

      The type of statistic associated with the CloudWatch metric. For more information, see\n\t\t\t\tStatistics in the Amazon CloudWatch User Guide.

      " } }, "Unit": { "target": "com.amazonaws.devopsguru#CloudWatchMetricsUnit", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe unit of measure used for the CloudWatch metric. For example, Bytes, Seconds, \n\t\t\tCount, and Percent.\n\t\t

      " + "smithy.api#documentation": "

      The unit of measure used for the CloudWatch metric. For example, Bytes,\n\t\t\t\tSeconds, Count, and Percent.

      " } }, "Period": { "target": "com.amazonaws.devopsguru#CloudWatchMetricsPeriod", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe length of time associated with the CloudWatch metric in number of seconds.\n\t\t

      " + "smithy.api#documentation": "

      The length of time associated with the CloudWatch metric in number of seconds.

      " + } + }, + "MetricDataSummary": { + "target": "com.amazonaws.devopsguru#CloudWatchMetricsDataSummary", + "traits": { + "smithy.api#documentation": "

      This object returns anomaly metric data.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about an Amazon CloudWatch metric.\n\t\t

      " + "smithy.api#documentation": "

      Information about an Amazon CloudWatch metric.

      " } }, "com.amazonaws.devopsguru#CloudWatchMetricsDetails": { @@ -439,18 +567,18 @@ "Name": { "target": "com.amazonaws.devopsguru#CloudWatchMetricsDimensionName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of the CloudWatch dimension.\n\t\t

      " + "smithy.api#documentation": "

      The name of the CloudWatch dimension.

      " } }, "Value": { "target": "com.amazonaws.devopsguru#CloudWatchMetricsDimensionValue", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe value of the CloudWatch dimension.\n\t\t

      " + "smithy.api#documentation": "

      The value of the CloudWatch dimension.

      " } } }, "traits": { - "smithy.api#documentation": "

      The dimension of a Amazon CloudWatch metric that is used when DevOps Guru analyzes the resources in your\n\t\t\taccount for operational problems and anomalous behavior. A dimension is a name/value pair\n\t\t\tthat is part of the identity of a metric. A metric can have up to 10 dimensions. For more\n\t\t\tinformation, see Dimensions in the Amazon CloudWatch User Guide.

      " + "smithy.api#documentation": "

      The dimension of a Amazon CloudWatch metric that is used when DevOps Guru analyzes the resources in\n\t\t\tyour account for operational problems and anomalous behavior. A dimension is a\n\t\t\tname/value pair that is part of the identity of a metric. A metric can have up to 10\n\t\t\tdimensions. For more information, see Dimensions in the Amazon CloudWatch User Guide.

      " } }, "com.amazonaws.devopsguru#CloudWatchMetricsDimensionName": { @@ -528,20 +656,20 @@ "ResourceId": { "target": "com.amazonaws.devopsguru#ResourceIdString", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the AWS resource in which a conflict occurred.\n\t\t

      ", + "smithy.api#documentation": "

      The ID of the Amazon Web Services resource in which a conflict occurred.

      ", "smithy.api#required": {} } }, "ResourceType": { "target": "com.amazonaws.devopsguru#ResourceIdType", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe type of the AWS resource in which a conflict occurred.\n\t\t

      ", + "smithy.api#documentation": "

      The type of the Amazon Web Services resource in which a conflict occurred.

      ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn exception that is thrown when a conflict occurs.\n\t\t

      ", + "smithy.api#documentation": "

      An exception that is thrown when a conflict occurs.

      ", "smithy.api#error": "client", "smithy.api#httpError": 409 } @@ -555,12 +683,12 @@ "CloudFormation": { "target": "com.amazonaws.devopsguru#CloudFormationCostEstimationResourceCollectionFilter", "traits": { - "smithy.api#documentation": "

      An object that specifies the CloudFormation stack that defines the AWS resources \n\t\t\tused to create a monthly estimate for DevOps Guru.

      " + "smithy.api#documentation": "

      An object that specifies the CloudFormation stack that defines the Amazon Web Services resources\n\t\t\tused to create a monthly estimate for DevOps Guru.

      " } } }, "traits": { - "smithy.api#documentation": "

      Information about a filter used to specify which AWS resources are analyzed to create \n\t\t\ta monthly DevOps Guru cost estimate. For more information, \n\t\t\tsee Estimate your \n\t\t\tAmazon DevOps Guru costs and \n\t\t\tAmazon DevOps Guru pricing.\n\t\t

      " + "smithy.api#documentation": "

      Information about a filter used to specify which Amazon Web Services resources are analyzed to\n\t\t\tcreate a monthly DevOps Guru cost estimate. For more information, \n\t\t\tsee Estimate your \n\t\t\tAmazon DevOps Guru costs and \n\t\t\tAmazon DevOps Guru pricing.

      " } }, "com.amazonaws.devopsguru#CostEstimationServiceResourceCount": { @@ -651,7 +779,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns the number of open reactive insights, the number of open proactive insights, and the number of metrics analyzed in your AWS account. \n \t\tUse these numbers to gauge the health of operations in your AWS account.\n \t

      ", + "smithy.api#documentation": "

      Returns the number of open reactive insights, the number of open proactive insights,\n\t\t\tand the number of metrics analyzed in your Amazon Web Services account. Use these numbers to gauge the\n\t\t\thealth of operations in your Amazon Web Services account.

      ", "smithy.api#http": { "method": "GET", "uri": "/accounts/health", @@ -669,28 +797,28 @@ "OpenReactiveInsights": { "target": "com.amazonaws.devopsguru#NumOpenReactiveInsights", "traits": { - "smithy.api#documentation": "

      \n \t\tAn integer that specifies the number of open reactive insights in your AWS account. \n \t

      ", + "smithy.api#documentation": "

      An integer that specifies the number of open reactive insights in your Amazon Web Services account.\n\t\t

      ", "smithy.api#required": {} } }, "OpenProactiveInsights": { "target": "com.amazonaws.devopsguru#NumOpenProactiveInsights", "traits": { - "smithy.api#documentation": "

      \n \t\tAn integer that specifies the number of open proactive insights in your AWS account.\n \t

      ", + "smithy.api#documentation": "

      An integer that specifies the number of open proactive insights in your Amazon Web Services\n\t\t\taccount.

      ", "smithy.api#required": {} } }, "MetricsAnalyzed": { "target": "com.amazonaws.devopsguru#NumMetricsAnalyzed", "traits": { - "smithy.api#documentation": "

      \n \t\tAn integer that specifies the number of metrics that have been analyzed in your AWS account.\n \t

      ", + "smithy.api#documentation": "

      An integer that specifies the number of metrics that have been analyzed in your Amazon Web Services\n\t\t\taccount.

      ", "smithy.api#required": {} } }, "ResourceHours": { "target": "com.amazonaws.devopsguru#ResourceHours", "traits": { - "smithy.api#documentation": "

      The number of Amazon DevOps Guru resource analysis hours billed to the current AWS account in the last hour.\n \t\t

      ", + "smithy.api#documentation": "

      The number of Amazon DevOps Guru resource analysis hours billed to the current Amazon Web Services account in\n\t\t\tthe last hour.

      ", "smithy.api#required": {} } } @@ -719,7 +847,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tFor the time range passed in, returns the number of open reactive insight that were created, the number of open proactive insights \n \t\tthat were created, and the Mean Time to Recover (MTTR) for all closed reactive insights.\n \t

      ", + "smithy.api#documentation": "

      For the time range passed in, returns the number of open reactive insight that were\n\t\t\tcreated, the number of open proactive insights that were created, and the Mean Time to Recover (MTTR) for all\n\t\t\tclosed reactive insights.

      ", "smithy.api#http": { "method": "POST", "uri": "/accounts/overview", @@ -733,14 +861,14 @@ "FromTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n \t\tThe start of the time range passed in. The start time granularity is at the \n \t\tday level. The floor of the start time is used. Returned information occurred after this day. \n \t

      ", + "smithy.api#documentation": "

      The start of the time range passed in. The start time granularity is at the day\n\t\t\tlevel. The floor of the start time is used. Returned information occurred after this\n\t\t\tday.

      ", "smithy.api#required": {} } }, "ToTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n \t\tThe end of the time range passed in. The start time granularity is at the \n \t\tday level. The floor of the start time is used. Returned information occurred before this day. If this is not specified, then the current day is used.\n \t

      " + "smithy.api#documentation": "

      The end of the time range passed in. The start time granularity is at the day level.\n\t\t\tThe floor of the start time is used. Returned information occurred before this day. If\n\t\t\tthis is not specified, then the current day is used.

      " } } } @@ -751,21 +879,21 @@ "ReactiveInsights": { "target": "com.amazonaws.devopsguru#NumReactiveInsights", "traits": { - "smithy.api#documentation": "

      \n \t\tAn integer that specifies the number of open reactive insights in your AWS account that were created during the \n \t\ttime range passed in.\n \t

      ", + "smithy.api#documentation": "

      An integer that specifies the number of open reactive insights in your Amazon Web Services account\n\t\t\tthat were created during the time range passed in.

      ", "smithy.api#required": {} } }, "ProactiveInsights": { "target": "com.amazonaws.devopsguru#NumProactiveInsights", "traits": { - "smithy.api#documentation": "

      \n \t\tAn integer that specifies the number of open proactive insights in your AWS account that were created during the \n \t\ttime range passed in.\n \t

      ", + "smithy.api#documentation": "

      An integer that specifies the number of open proactive insights in your Amazon Web Services account\n\t\t\tthat were created during the time range passed in.

      ", "smithy.api#required": {} } }, "MeanTimeToRecoverInMilliseconds": { "target": "com.amazonaws.devopsguru#MeanTimeToRecoverInMilliseconds", "traits": { - "smithy.api#documentation": "

      \n \t\tThe Mean Time to Recover (MTTR) for all closed insights that were created during the \n \t\ttime range passed in.\n \t

      ", + "smithy.api#documentation": "

      The Mean Time to Recover (MTTR) for all closed insights that were created during the time range passed in.\n\t\t

      ", "smithy.api#required": {} } } @@ -797,7 +925,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns details about an anomaly that you specify using its ID.\n \t

      ", + "smithy.api#documentation": "

      Returns details about an anomaly that you specify using its ID.

      ", "smithy.api#http": { "method": "GET", "uri": "/anomalies/{Id}", @@ -811,10 +939,17 @@ "Id": { "target": "com.amazonaws.devopsguru#AnomalyId", "traits": { - "smithy.api#documentation": "

      \n \t\tThe ID of the anomaly.\n \t

      ", + "smithy.api#documentation": "

      The ID of the anomaly.

      ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } + }, + "AccountId": { + "target": "com.amazonaws.devopsguru#AwsAccountId", + "traits": { + "smithy.api#documentation": "

      The ID of the member account.

      ", + "smithy.api#httpQuery": "AccountId" + } } } }, @@ -824,13 +959,13 @@ "ProactiveAnomaly": { "target": "com.amazonaws.devopsguru#ProactiveAnomaly", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA ReactiveAnomaly object that represents the requested anomaly.\n\t\t

      " + "smithy.api#documentation": "

      A ReactiveAnomaly object that represents the requested anomaly.

      " } }, "ReactiveAnomaly": { "target": "com.amazonaws.devopsguru#ReactiveAnomaly", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA ProactiveAnomaly object that represents the requested anomaly.\n\t\t

      " + "smithy.api#documentation": "

      A ProactiveAnomaly object that represents the requested anomaly.

      " } } } @@ -861,7 +996,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n\t\t\tReturns the most recent feedback submitted in the current AWS account and Region.\n\t\t

      ", + "smithy.api#documentation": "

      Returns the most recent feedback submitted in the current Amazon Web Services account and Region.\n\t\t

      ", "smithy.api#http": { "method": "POST", "uri": "/feedback", @@ -875,7 +1010,7 @@ "InsightId": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the insight for which the feedback was provided.\n\t\t

      " + "smithy.api#documentation": "

      The ID of the insight for which the feedback was provided.

      " } } } @@ -914,7 +1049,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns details about an insight that you specify using its ID.\n \t

      ", + "smithy.api#documentation": "

      Returns details about an insight that you specify using its ID.

      ", "smithy.api#http": { "method": "GET", "uri": "/insights/{Id}", @@ -928,10 +1063,17 @@ "Id": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n \t\tThe ID of the insight.\n \t

      ", + "smithy.api#documentation": "

      The ID of the insight.

      ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } + }, + "AccountId": { + "target": "com.amazonaws.devopsguru#AwsAccountId", + "traits": { + "smithy.api#documentation": "

      The ID of the member account in the organization.

      ", + "smithy.api#httpQuery": "AccountId" + } } } }, @@ -941,13 +1083,274 @@ "ProactiveInsight": { "target": "com.amazonaws.devopsguru#ProactiveInsight", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA ProactiveInsight object that represents the requested insight.\n\t\t

      " + "smithy.api#documentation": "

      A ProactiveInsight object that represents the requested insight.

      " } }, "ReactiveInsight": { "target": "com.amazonaws.devopsguru#ReactiveInsight", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA ReactiveInsight object that represents the requested insight.\n\t\t

      " + "smithy.api#documentation": "

      A ReactiveInsight object that represents the requested insight.

      " + } + } + } + }, + "com.amazonaws.devopsguru#DescribeOrganizationHealth": { + "type": "operation", + "input": { + "target": "com.amazonaws.devopsguru#DescribeOrganizationHealthRequest" + }, + "output": { + "target": "com.amazonaws.devopsguru#DescribeOrganizationHealthResponse" + }, + "errors": [ + { + "target": "com.amazonaws.devopsguru#AccessDeniedException" + }, + { + "target": "com.amazonaws.devopsguru#InternalServerException" + }, + { + "target": "com.amazonaws.devopsguru#ThrottlingException" + }, + { + "target": "com.amazonaws.devopsguru#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Returns active insights, predictive insights, and resource hours analyzed in last\n\t\t\thour.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/organization/health", + "code": 200 + } + } + }, + "com.amazonaws.devopsguru#DescribeOrganizationHealthRequest": { + "type": "structure", + "members": { + "AccountIds": { + "target": "com.amazonaws.devopsguru#AccountIdList", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } + }, + "OrganizationalUnitIds": { + "target": "com.amazonaws.devopsguru#OrganizationalUnitIdList", + "traits": { + "smithy.api#documentation": "

      The ID of the organizational unit.

      " + } + } + } + }, + "com.amazonaws.devopsguru#DescribeOrganizationHealthResponse": { + "type": "structure", + "members": { + "OpenReactiveInsights": { + "target": "com.amazonaws.devopsguru#NumOpenReactiveInsights", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of open reactive insights in your Amazon Web Services\n\t\t\taccount.

      ", + "smithy.api#required": {} + } + }, + "OpenProactiveInsights": { + "target": "com.amazonaws.devopsguru#NumOpenProactiveInsights", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of open proactive insights in your Amazon Web Services\n\t\t\taccount.

      ", + "smithy.api#required": {} + } + }, + "MetricsAnalyzed": { + "target": "com.amazonaws.devopsguru#NumMetricsAnalyzed", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of metrics that have been analyzed in your\n\t\t\torganization.

      ", + "smithy.api#required": {} + } + }, + "ResourceHours": { + "target": "com.amazonaws.devopsguru#ResourceHours", + "traits": { + "smithy.api#documentation": "

      The number of Amazon DevOps Guru resource analysis hours billed to the current Amazon Web Services account in\n\t\t\tthe last hour.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.devopsguru#DescribeOrganizationOverview": { + "type": "operation", + "input": { + "target": "com.amazonaws.devopsguru#DescribeOrganizationOverviewRequest" + }, + "output": { + "target": "com.amazonaws.devopsguru#DescribeOrganizationOverviewResponse" + }, + "errors": [ + { + "target": "com.amazonaws.devopsguru#AccessDeniedException" + }, + { + "target": "com.amazonaws.devopsguru#InternalServerException" + }, + { + "target": "com.amazonaws.devopsguru#ThrottlingException" + }, + { + "target": "com.amazonaws.devopsguru#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Returns an overview of your organization's history based on the specified time range.\n\t\t\tThe overview includes the total reactive and proactive insights.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/organization/overview", + "code": 200 + } + } + }, + "com.amazonaws.devopsguru#DescribeOrganizationOverviewRequest": { + "type": "structure", + "members": { + "FromTime": { + "target": "com.amazonaws.devopsguru#Timestamp", + "traits": { + "smithy.api#documentation": "

      The start of the time range passed in. The start time granularity is at the day\n\t\t\tlevel. The floor of the start time is used. Returned information occurred after this\n\t\t\tday.

      ", + "smithy.api#required": {} + } + }, + "ToTime": { + "target": "com.amazonaws.devopsguru#Timestamp", + "traits": { + "smithy.api#documentation": "

      The end of the time range passed in. The start time granularity is at the day level.\n\t\t\tThe floor of the start time is used. Returned information occurred before this day. If\n\t\t\tthis is not specified, then the current day is used.

      " + } + }, + "AccountIds": { + "target": "com.amazonaws.devopsguru#AccountIdList", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } + }, + "OrganizationalUnitIds": { + "target": "com.amazonaws.devopsguru#OrganizationalUnitIdList", + "traits": { + "smithy.api#documentation": "

      The ID of the organizational unit.

      " + } + } + } + }, + "com.amazonaws.devopsguru#DescribeOrganizationOverviewResponse": { + "type": "structure", + "members": { + "ReactiveInsights": { + "target": "com.amazonaws.devopsguru#NumReactiveInsights", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of open reactive insights in your Amazon Web Services\n\t\t\taccount.

      ", + "smithy.api#required": {} + } + }, + "ProactiveInsights": { + "target": "com.amazonaws.devopsguru#NumProactiveInsights", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of open proactive insights in your Amazon Web Services\n\t\t\taccount.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.devopsguru#DescribeOrganizationResourceCollectionHealth": { + "type": "operation", + "input": { + "target": "com.amazonaws.devopsguru#DescribeOrganizationResourceCollectionHealthRequest" + }, + "output": { + "target": "com.amazonaws.devopsguru#DescribeOrganizationResourceCollectionHealthResponse" + }, + "errors": [ + { + "target": "com.amazonaws.devopsguru#AccessDeniedException" + }, + { + "target": "com.amazonaws.devopsguru#InternalServerException" + }, + { + "target": "com.amazonaws.devopsguru#ThrottlingException" + }, + { + "target": "com.amazonaws.devopsguru#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Provides an overview of your system's health. If additional member accounts are part\n\t\t\tof your organization, you can filter those accounts using the AccountIds\n\t\t\tfield.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/organization/health/resource-collection", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken" + } + } + }, + "com.amazonaws.devopsguru#DescribeOrganizationResourceCollectionHealthRequest": { + "type": "structure", + "members": { + "OrganizationResourceCollectionType": { + "target": "com.amazonaws.devopsguru#OrganizationResourceCollectionType", + "traits": { + "smithy.api#documentation": "

      An Amazon Web Services resource collection type. This type specifies how analyzed Amazon Web Services resources\n\t\t\tare defined. The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

      ", + "smithy.api#required": {} + } + }, + "AccountIds": { + "target": "com.amazonaws.devopsguru#AccountIdList", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } + }, + "OrganizationalUnitIds": { + "target": "com.amazonaws.devopsguru#OrganizationalUnitIdList", + "traits": { + "smithy.api#documentation": "

      The ID of the organizational unit.

      " + } + }, + "NextToken": { + "target": "com.amazonaws.devopsguru#UuidNextToken", + "traits": { + "smithy.api#documentation": "

      The pagination token to use to retrieve \n the next page of results for this operation. If this value is null, it retrieves the first page.

      " + } + }, + "MaxResults": { + "target": "com.amazonaws.devopsguru#OrganizationResourceCollectionMaxResults", + "traits": { + "smithy.api#documentation": "

      The maximum number of results to return with a single call.\n\tTo retrieve the remaining results, make another call with the returned nextToken value.

      " + } + } + } + }, + "com.amazonaws.devopsguru#DescribeOrganizationResourceCollectionHealthResponse": { + "type": "structure", + "members": { + "CloudFormation": { + "target": "com.amazonaws.devopsguru#CloudFormationHealths", + "traits": { + "smithy.api#documentation": "

      The returned CloudFormationHealthOverview object that contains an\n\t\t\t\tInsightHealthOverview object with the requested system health\n\t\t\tinformation.

      " + } + }, + "Service": { + "target": "com.amazonaws.devopsguru#ServiceHealths", + "traits": { + "smithy.api#documentation": "

      An array of ServiceHealth objects that describes the health of the Amazon Web Services\n\t\t\tservices associated with the resources in the collection.

      " + } + }, + "Account": { + "target": "com.amazonaws.devopsguru#AccountHealths", + "traits": { + "smithy.api#documentation": "

      The name of the organization's account.

      " + } + }, + "NextToken": { + "target": "com.amazonaws.devopsguru#UuidNextToken", + "traits": { + "smithy.api#documentation": "

      The pagination token to use to retrieve \n the next page of results for this operation. If there are no more pages, this value is null.

      " } } } @@ -975,7 +1378,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns the number of open proactive insights, open reactive insights, and the Mean Time to Recover (MTTR) for all closed insights in \n \t\tresource collections in your account. You specify the type of AWS resources collection. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks.\n \t

      ", + "smithy.api#documentation": "

      Returns the number of open proactive insights, open reactive insights, and the Mean Time to Recover (MTTR)\n\t\t\tfor all closed insights in resource collections in your account. You specify the type of\n\t\t\tAmazon Web Services resources collection. The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

      ", "smithy.api#http": { "method": "GET", "uri": "/accounts/health/resource-collection/{ResourceCollectionType}", @@ -993,7 +1396,7 @@ "ResourceCollectionType": { "target": "com.amazonaws.devopsguru#ResourceCollectionType", "traits": { - "smithy.api#documentation": "

      \n \t\tAn AWS resource collection type. This type specifies how analyzed AWS resources are defined. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. \n \t

      ", + "smithy.api#documentation": "

      An Amazon Web Services resource collection type. This type specifies how analyzed Amazon Web Services resources\n\t\t\tare defined. The one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

      ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1013,14 +1416,14 @@ "CloudFormation": { "target": "com.amazonaws.devopsguru#CloudFormationHealths", "traits": { - "smithy.api#documentation": "

      \n \t\tThe returned CloudFormationHealthOverview object that contains an InsightHealthOverview object with \n \t\tthe requested system health information.\n \t

      ", + "smithy.api#documentation": "

      The returned CloudFormationHealthOverview object that contains an\n\t\t\t\tInsightHealthOverview object with the requested system health\n\t\t\tinformation.

      ", "smithy.api#required": {} } }, "Service": { "target": "com.amazonaws.devopsguru#ServiceHealths", "traits": { - "smithy.api#documentation": "

      An array of ServiceHealth objects that describes the health of the AWS services \n\t\tassociated with the resources in the collection.

      " + "smithy.api#documentation": "

      An array of ServiceHealth objects that describes the health of the Amazon Web Services\n\t\t\tservices associated with the resources in the collection.

      " } }, "NextToken": { @@ -1054,7 +1457,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n\t\t\tReturns the integration status of services that are integrated with DevOps Guru. \n\t\t\tThe one service that can be integrated with DevOps Guru \n \tis AWS Systems Manager, which can be used to create an OpsItem for each generated insight.\n\t\t

      ", + "smithy.api#documentation": "

      Returns the integration status of services that are integrated with DevOps Guru.\n\t\t\tThe one service that can be integrated with DevOps Guru \n \tis Amazon Web Services Systems Manager, which can be used to create an OpsItem for each generated insight.

      ", "smithy.api#http": { "method": "GET", "uri": "/service-integrations", @@ -1080,18 +1483,18 @@ "FromTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n \tThe earliest end time in the time range.\n

      " + "smithy.api#documentation": "

      The earliest end time in the time range.

      " } }, "ToTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n \tThe latest end time in the time range.\n

      " + "smithy.api#documentation": "

      The latest end time in the time range.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n \tA range of time that specifies when anomalous behavior in an anomaly or insight ended.\n

      " + "smithy.api#documentation": "

      A range of time that specifies when anomalous behavior in an anomaly or insight\n\t\t\tended.

      " } }, "com.amazonaws.devopsguru#ErrorMessageString": { @@ -1115,7 +1518,7 @@ "Id": { "target": "com.amazonaws.devopsguru#EventId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the event.\n\t\t

      " + "smithy.api#documentation": "

      The ID of the event.

      " } }, "Time": { @@ -1127,36 +1530,36 @@ "EventSource": { "target": "com.amazonaws.devopsguru#EventSource", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe AWS source that emitted the event.\n\t\t

      " + "smithy.api#documentation": "

      The Amazon Web Services source that emitted the event.

      " } }, "Name": { "target": "com.amazonaws.devopsguru#EventName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of the event.\n\t\t

      " + "smithy.api#documentation": "

      The name of the event.

      " } }, "DataSource": { "target": "com.amazonaws.devopsguru#EventDataSource", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe source, AWS_CLOUD_TRAIL or AWS_CODE_DEPLOY, where DevOps Guru analysis found the event.\n\t\t

      " + "smithy.api#documentation": "

      The source, AWS_CLOUD_TRAIL or AWS_CODE_DEPLOY, where DevOps Guru\n\t\t\tanalysis found the event.

      " } }, "EventClass": { "target": "com.amazonaws.devopsguru#EventClass", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe class of the event. The class specifies what the event is related to, such as an infrastructure change, a deployment, or a schema change.\n\t\t

      " + "smithy.api#documentation": "

      The class of the event. The class specifies what the event is related to, such as an\n\t\t\tinfrastructure change, a deployment, or a schema change.

      " } }, "Resources": { "target": "com.amazonaws.devopsguru#EventResources", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn EventResource object that contains information about the resource that emitted the event.\n\t\t

      " + "smithy.api#documentation": "

      An EventResource object that contains information about the resource\n\t\t\tthat emitted the event.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn AWS resource event. AWS resource events and metrics are analyzed by DevOps Guru to find anomalous behavior and \n\t\t\tprovide recommendations to improve your operational solutions.\n\t\t

      " + "smithy.api#documentation": "

      An Amazon Web Services resource event. Amazon Web Services resource events and metrics are analyzed by DevOps Guru to\n\t\t\tfind anomalous behavior and provide recommendations to improve your operational\n\t\t\tsolutions.

      " } }, "com.amazonaws.devopsguru#EventClass": { @@ -1219,24 +1622,24 @@ "Type": { "target": "com.amazonaws.devopsguru#EventResourceType", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe type of resource that emitted an event.\n\t\t

      " + "smithy.api#documentation": "

      The type of resource that emitted an event.

      " } }, "Name": { "target": "com.amazonaws.devopsguru#EventResourceName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of the resource that emitted an event.\n\t\t

      " + "smithy.api#documentation": "

      The name of the resource that emitted an event.

      " } }, "Arn": { "target": "com.amazonaws.devopsguru#EventResourceArn", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe Amazon Resource Name (ARN) of the resource that emitted an event.\n\t\t

      " + "smithy.api#documentation": "

      The Amazon Resource Name (ARN) of the resource that emitted an event.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe AWS resource that emitted an event. AWS resource events and metrics are analyzed by DevOps Guru to find anomalous behavior and \n\t\t\tprovide recommendations to improve your operational solutions.\n\t\t

      " + "smithy.api#documentation": "

      The Amazon Web Services resource that emitted an event. Amazon Web Services resource events and metrics are\n\t\t\tanalyzed by DevOps Guru to find anomalous behavior and provide recommendations to improve your\n\t\t\toperational solutions.

      " } }, "com.amazonaws.devopsguru#EventResourceArn": { @@ -1291,20 +1694,20 @@ "FromTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time when the event started.\n\t\t

      ", + "smithy.api#documentation": "

      The time when the event started.

      ", "smithy.api#required": {} } }, "ToTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time when the event ended.\n\t\t

      ", + "smithy.api#documentation": "

      The time when the event ended.

      ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time range during which an AWS event occurred. AWS resource events and metrics are analyzed by DevOps Guru to find anomalous behavior and \n\t\t\tprovide recommendations to improve your operational solutions.\n\t\t

      " + "smithy.api#documentation": "

      The time range during which an Amazon Web Services event occurred. Amazon Web Services resource events and\n\t\t\tmetrics are analyzed by DevOps Guru to find anomalous behavior and provide recommendations to\n\t\t\timprove your operational solutions.

      " } }, "com.amazonaws.devopsguru#Events": { @@ -1339,7 +1742,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Returns an estimate of the monthly cost for DevOps Guru to analyze your AWS resources. \n\t\t\tFor more information, \n\t\t\tsee Estimate your \n\t\t\tAmazon DevOps Guru costs and \n\t\t\tAmazon DevOps Guru pricing.

      ", + "smithy.api#documentation": "

      Returns an estimate of the monthly cost for DevOps Guru to analyze your Amazon Web Services resources.\n\t\t\tFor more information, \n\t\t\tsee Estimate your \n\t\t\tAmazon DevOps Guru costs and \n\t\t\tAmazon DevOps Guru pricing.

      ", "smithy.api#http": { "method": "GET", "uri": "/cost-estimation", @@ -1369,19 +1772,19 @@ "ResourceCollection": { "target": "com.amazonaws.devopsguru#CostEstimationResourceCollectionFilter", "traits": { - "smithy.api#documentation": "

      The collection of the AWS resources used to create your monthly DevOps Guru cost estimate.

      " + "smithy.api#documentation": "

      The collection of the Amazon Web Services resources used to create your monthly DevOps Guru cost\n\t\t\testimate.

      " } }, "Status": { "target": "com.amazonaws.devopsguru#CostEstimationStatus", "traits": { - "smithy.api#documentation": "

      The status of creating this cost estimate. If it's still in progress, the status \n\t\t\tONGOING is returned. If it is finished, the status COMPLETED is returned.

      " + "smithy.api#documentation": "

      The status of creating this cost estimate. If it's still in progress, the status\n\t\t\t\tONGOING is returned. If it is finished, the status\n\t\t\t\tCOMPLETED is returned.

      " } }, "Costs": { "target": "com.amazonaws.devopsguru#ServiceResourceCosts", "traits": { - "smithy.api#documentation": "

      An array of ResourceCost objects that each contains details \n\t\t\tabout the monthly cost estimate to analyze one of your AWS resources.

      " + "smithy.api#documentation": "

      An array of ResourceCost objects that each contains details about the\n\t\t\tmonthly cost estimate to analyze one of your Amazon Web Services resources.

      " } }, "TimeRange": { @@ -1393,7 +1796,7 @@ "TotalCost": { "target": "com.amazonaws.devopsguru#Cost", "traits": { - "smithy.api#documentation": "

      The estimated monthly cost to analyze the AWS resources. \n\t\t\tThis value is the sum of the estimated costs to analyze each resource in the Costs \n\t\t\tobject in this response.

      " + "smithy.api#documentation": "

      The estimated monthly cost to analyze the Amazon Web Services resources. This value is the sum of\n\t\t\tthe estimated costs to analyze each resource in the Costs object in this\n\t\t\tresponse.

      " } }, "NextToken": { @@ -1430,7 +1833,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns lists AWS resources that are of the specified resource collection type. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks.\n \t

      ", + "smithy.api#documentation": "

      Returns lists Amazon Web Services resources that are of the specified resource collection type.\n\t\t\tThe one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

      ", "smithy.api#http": { "method": "GET", "uri": "/resource-collections/{ResourceCollectionType}", @@ -1448,7 +1851,7 @@ "ResourceCollectionType": { "target": "com.amazonaws.devopsguru#ResourceCollectionType", "traits": { - "smithy.api#documentation": "

      \n \t\tThe type of AWS resource collections to return. The one valid value is CLOUD_FORMATION for \n \t\tAWS CloudFormation stacks.\n \t

      ", + "smithy.api#documentation": "

      The type of Amazon Web Services resource collections to return. The one valid value is\n\t\t\t\tCLOUD_FORMATION for Amazon Web Services CloudFormation stacks.

      ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1468,7 +1871,7 @@ "ResourceCollection": { "target": "com.amazonaws.devopsguru#ResourceCollectionFilter", "traits": { - "smithy.api#documentation": "

      \n \t\tThe requested list of AWS resource collections. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks.\n \t

      " + "smithy.api#documentation": "

      The requested list of Amazon Web Services resource collections.\n\t\t\tThe one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

      " } }, "NextToken": { @@ -1485,18 +1888,18 @@ "Id": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n \tThe insight feedback ID.\n

      " + "smithy.api#documentation": "

      The insight feedback ID.

      " } }, "Feedback": { "target": "com.amazonaws.devopsguru#InsightFeedbackOption", "traits": { - "smithy.api#documentation": "

      \n \tThe feedback provided by the customer.\n

      " + "smithy.api#documentation": "

      The feedback provided by the customer.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n \tInformation about insight feedback received from a customer.\n

      " + "smithy.api#documentation": "

      Information about insight feedback received from a customer.

      " } }, "com.amazonaws.devopsguru#InsightFeedbackOption": { @@ -1532,24 +1935,24 @@ "OpenProactiveInsights": { "target": "com.amazonaws.devopsguru#NumOpenProactiveInsights", "traits": { - "smithy.api#documentation": "

      \n \tThe number of open proactive insights.\n

      " + "smithy.api#documentation": "

      The number of open proactive insights.

      " } }, "OpenReactiveInsights": { "target": "com.amazonaws.devopsguru#NumOpenReactiveInsights", "traits": { - "smithy.api#documentation": "

      \n \tThe number of open reactive insights.\n

      " + "smithy.api#documentation": "

      The number of open reactive insights.

      " } }, "MeanTimeToRecoverInMilliseconds": { "target": "com.amazonaws.devopsguru#MeanTimeToRecoverInMilliseconds", "traits": { - "smithy.api#documentation": "

      \n \tThe Meant Time to Recover (MTTR) for the insight.\t\n

      " + "smithy.api#documentation": "

      The Meant Time to Recover (MTTR) for the insight.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n \tInformation about the number of open reactive and proactive insights that can be \n \tused to gauge the health of your system.\n

      " + "smithy.api#documentation": "

      Information about the number of open reactive and proactive insights that can be used\n\t\t\tto gauge the health of your system.

      " } }, "com.amazonaws.devopsguru#InsightId": { @@ -1636,14 +2039,14 @@ "StartTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time when the behavior described in an insight started.\n\t\t

      ", + "smithy.api#documentation": "

      The time when the behavior described in an insight started.

      ", "smithy.api#required": {} } }, "EndTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time when the behavior described in an insight ended.\n\t\t

      " + "smithy.api#documentation": "

      The time when the behavior described in an insight ended.

      " } } }, @@ -1678,7 +2081,7 @@ "RetryAfterSeconds": { "target": "com.amazonaws.devopsguru#RetryAfterSeconds", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe number of seconds after which the action that caused the internal server \n\t\t\texception can be retried.\n\t\t

      ", + "smithy.api#documentation": "

      The number of seconds after which the action that caused the internal server\n\t\t\texception can be retried.

      ", "smithy.api#httpHeader": "Retry-After" } } @@ -1715,7 +2118,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns a list of the anomalies that belong to an insight that you specify using its ID.\n \t

      ", + "smithy.api#documentation": "

      Returns a list of the anomalies that belong to an insight that you specify using its\n\t\t\tID.

      ", "smithy.api#http": { "method": "POST", "uri": "/anomalies/insight/{InsightId}", @@ -1744,7 +2147,7 @@ "InsightId": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the insight. The returned anomalies belong to this insight.\n\t\t

      ", + "smithy.api#documentation": "

      The ID of the insight. The returned anomalies belong to this insight.

      ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1752,7 +2155,7 @@ "StartTimeRange": { "target": "com.amazonaws.devopsguru#StartTimeRange", "traits": { - "smithy.api#documentation": "

      \n \t\tA time range used to specify when the requested anomalies started. All returned anomalies started \n \t\tduring this time range.\n \t

      " + "smithy.api#documentation": "

      A time range used to specify when the requested anomalies started. All returned\n\t\t\tanomalies started during this time range.

      " } }, "MaxResults": { @@ -1766,6 +2169,12 @@ "traits": { "smithy.api#documentation": "

      The pagination token to use to retrieve \n the next page of results for this operation. If this value is null, it retrieves the first page.

      " } + }, + "AccountId": { + "target": "com.amazonaws.devopsguru#AwsAccountId", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } } } }, @@ -1775,13 +2184,13 @@ "ProactiveAnomalies": { "target": "com.amazonaws.devopsguru#ProactiveAnomalies", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn array of ProactiveAnomalySummary objects that represent the requested anomalies\n\t\t

      " + "smithy.api#documentation": "

      An array of ProactiveAnomalySummary objects that represent the requested\n\t\t\tanomalies

      " } }, "ReactiveAnomalies": { "target": "com.amazonaws.devopsguru#ReactiveAnomalies", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn array of ReactiveAnomalySummary objects that represent the requested anomalies\n\t\t

      " + "smithy.api#documentation": "

      An array of ReactiveAnomalySummary objects that represent the requested\n\t\t\tanomalies

      " } }, "NextToken": { @@ -1818,7 +2227,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns a list of the events emitted by the resources that are evaluated by DevOps Guru. You can use filters to specify which events are returned.\n \t

      ", + "smithy.api#documentation": "

      Returns a list of the events emitted by the resources that are evaluated by DevOps Guru.\n\t\t\tYou can use filters to specify which events are returned.

      ", "smithy.api#http": { "method": "POST", "uri": "/events", @@ -1838,7 +2247,7 @@ "InsightId": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn ID of an insight that is related to the events you want to filter for.\n\t\t

      " + "smithy.api#documentation": "

      An ID of an insight that is related to the events you want to filter for.

      " } }, "EventTimeRange": { @@ -1850,19 +2259,19 @@ "EventClass": { "target": "com.amazonaws.devopsguru#EventClass", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe class of the events you want to filter for, such as an infrastructure change, a deployment, or a schema change. \t\n\t\t

      " + "smithy.api#documentation": "

      The class of the events you want to filter for, such as an infrastructure change, a\n\t\t\tdeployment, or a schema change.

      " } }, "EventSource": { "target": "com.amazonaws.devopsguru#EventSource", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe AWS source that emitted the events you want to filter for.\n\t\t

      " + "smithy.api#documentation": "

      The Amazon Web Services source that emitted the events you want to filter for.

      " } }, "DataSource": { "target": "com.amazonaws.devopsguru#EventDataSource", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe source, AWS_CLOUD_TRAIL or AWS_CODE_DEPLOY, of the events you want returned.\n\t\t

      " + "smithy.api#documentation": "

      The source, AWS_CLOUD_TRAIL or AWS_CODE_DEPLOY, of the\n\t\t\tevents you want returned.

      " } }, "ResourceCollection": { @@ -1870,7 +2279,7 @@ } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tFilters you can use to specify which events are returned when ListEvents is called.\n\t\t

      " + "smithy.api#documentation": "

      Filters you can use to specify which events are returned when ListEvents\n\t\t\tis called.

      " } }, "com.amazonaws.devopsguru#ListEventsMaxResults": { @@ -1889,7 +2298,7 @@ "Filters": { "target": "com.amazonaws.devopsguru#ListEventsFilters", "traits": { - "smithy.api#documentation": "

      \n \t\tA ListEventsFilters object used to specify which events to return.\n \t

      ", + "smithy.api#documentation": "

      A ListEventsFilters object used to specify which events to return.\n\t\t

      ", "smithy.api#required": {} } }, @@ -1904,6 +2313,12 @@ "traits": { "smithy.api#documentation": "

      The pagination token to use to retrieve \n the next page of results for this operation. If this value is null, it retrieves the first page.

      " } + }, + "AccountId": { + "target": "com.amazonaws.devopsguru#AwsAccountId", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } } } }, @@ -1913,7 +2328,7 @@ "Events": { "target": "com.amazonaws.devopsguru#Events", "traits": { - "smithy.api#documentation": "

      \n \t\tA list of the requested events.\n \t

      ", + "smithy.api#documentation": "

      A list of the requested events.

      ", "smithy.api#required": {} } }, @@ -1948,7 +2363,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns a list of insights in your AWS account. You can specify which insights are returned by their start time and \n \t\tstatus (ONGOING, CLOSED, or ANY).\n \t

      ", + "smithy.api#documentation": "

      Returns a list of insights in your Amazon Web Services account. You can specify which insights are\n\t\t\treturned by their start time and status (ONGOING, CLOSED, or\n\t\t\t\tANY).

      ", "smithy.api#http": { "method": "POST", "uri": "/insights", @@ -1961,26 +2376,38 @@ } } }, + "com.amazonaws.devopsguru#ListInsightsAccountIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.devopsguru#AwsAccountId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1 + } + } + }, "com.amazonaws.devopsguru#ListInsightsAnyStatusFilter": { "type": "structure", "members": { "Type": { "target": "com.amazonaws.devopsguru#InsightType", "traits": { - "smithy.api#documentation": "

      \n \t\tUse to filter for either REACTIVE or PROACTIVE insights.\n \t

      ", + "smithy.api#documentation": "

      Use to filter for either REACTIVE or PROACTIVE insights.\n\t\t

      ", "smithy.api#required": {} } }, "StartTimeRange": { "target": "com.amazonaws.devopsguru#StartTimeRange", "traits": { - "smithy.api#documentation": "

      \n \t\tA time range used to specify when the behavior of the filtered insights started.\n \t

      ", + "smithy.api#documentation": "

      A time range used to specify when the behavior of the filtered insights started.\n\t\t

      ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

      \n \t\tUsed to filter for insights that have any status.\n \t

      " + "smithy.api#documentation": "

      Used to filter for insights that have any status.

      " } }, "com.amazonaws.devopsguru#ListInsightsClosedStatusFilter": { @@ -1989,20 +2416,20 @@ "Type": { "target": "com.amazonaws.devopsguru#InsightType", "traits": { - "smithy.api#documentation": "

      \n \tUse to filter for either REACTIVE or PROACTIVE insights.\n

      ", + "smithy.api#documentation": "

      Use to filter for either REACTIVE or PROACTIVE insights.\n\t\t

      ", "smithy.api#required": {} } }, "EndTimeRange": { "target": "com.amazonaws.devopsguru#EndTimeRange", "traits": { - "smithy.api#documentation": "

      \n \t\tA time range used to specify when the behavior of the filtered insights ended.\n \t

      ", + "smithy.api#documentation": "

      A time range used to specify when the behavior of the filtered insights ended.\n\t\t

      ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

      \n \t\tUsed to filter for insights that have the status CLOSED.\n \t

      " + "smithy.api#documentation": "

      Used to filter for insights that have the status CLOSED.

      " } }, "com.amazonaws.devopsguru#ListInsightsMaxResults": { @@ -2021,13 +2448,25 @@ "Type": { "target": "com.amazonaws.devopsguru#InsightType", "traits": { - "smithy.api#documentation": "

      \n \t\tUse to filter for either REACTIVE or PROACTIVE insights.\n \t

      ", + "smithy.api#documentation": "

      Use to filter for either REACTIVE or PROACTIVE insights.\n\t\t

      ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

      \n \tUsed to filter for insights that have the status ONGOING.\n

      " + "smithy.api#documentation": "

      Used to filter for insights that have the status ONGOING.

      " + } + }, + "com.amazonaws.devopsguru#ListInsightsOrganizationalUnitIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.devopsguru#OrganizationalUnitId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1 + } } }, "com.amazonaws.devopsguru#ListInsightsRequest": { @@ -2036,7 +2475,7 @@ "StatusFilter": { "target": "com.amazonaws.devopsguru#ListInsightsStatusFilter", "traits": { - "smithy.api#documentation": "

      \n \tA filter used to filter the returned insights by their status. You can specify one status filter.\n

      ", + "smithy.api#documentation": "

      A filter used to filter the returned insights by their status. You can specify one\n\t\t\tstatus filter.

      ", "smithy.api#required": {} } }, @@ -2060,13 +2499,13 @@ "ProactiveInsights": { "target": "com.amazonaws.devopsguru#ProactiveInsights", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe returned list of proactive insights.\n\t\t

      " + "smithy.api#documentation": "

      The returned list of proactive insights.

      " } }, "ReactiveInsights": { "target": "com.amazonaws.devopsguru#ReactiveInsights", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe returned list of reactive insights.\t\n\t\t

      " + "smithy.api#documentation": "

      The returned list of reactive insights.

      " } }, "NextToken": { @@ -2083,24 +2522,24 @@ "Ongoing": { "target": "com.amazonaws.devopsguru#ListInsightsOngoingStatusFilter", "traits": { - "smithy.api#documentation": "

      \n \tA ListInsightsAnyStatusFilter that specifies ongoing insights \n \tthat are either REACTIVE or PROACTIVE.\n

      " + "smithy.api#documentation": "

      A ListInsightsAnyStatusFilter that specifies ongoing insights that are\n\t\t\teither REACTIVE or PROACTIVE.

      " } }, "Closed": { "target": "com.amazonaws.devopsguru#ListInsightsClosedStatusFilter", "traits": { - "smithy.api#documentation": "

      \n \t\tA ListInsightsClosedStatusFilter that specifies closed insights that are \n \t\teither REACTIVE or PROACTIVE.\n \t

      " + "smithy.api#documentation": "

      A ListInsightsClosedStatusFilter that specifies closed insights that are\n\t\t\teither REACTIVE or PROACTIVE.

      " } }, "Any": { "target": "com.amazonaws.devopsguru#ListInsightsAnyStatusFilter", "traits": { - "smithy.api#documentation": "

      \n \t\tA ListInsightsAnyStatusFilter that specifies insights of any status \n \t\tthat are either REACTIVE or PROACTIVE.\n \t

      " + "smithy.api#documentation": "

      A ListInsightsAnyStatusFilter that specifies insights of any status that\n\t\t\tare either REACTIVE or PROACTIVE.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n \tA filter used by ListInsights to specify which insights to return.\n

      " + "smithy.api#documentation": "

      A filter used by ListInsights to specify which insights to return.\n\t\t

      " } }, "com.amazonaws.devopsguru#ListNotificationChannels": { @@ -2126,7 +2565,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns a list of notification channels configured for DevOps Guru. Each notification channel is used to notify you when \n \t\tDevOps Guru generates an insight that contains information about how to improve your operations. The one \n \tsupported notification channel is Amazon Simple Notification Service (Amazon SNS).\n \t

      ", + "smithy.api#documentation": "

      Returns a list of notification channels configured for DevOps Guru. Each notification\n\t\t\tchannel is used to notify you when DevOps Guru generates an insight that contains information\n\t\t\tabout how to improve your operations. The one \n \tsupported notification channel is Amazon Simple Notification Service (Amazon SNS).

      ", "smithy.api#http": { "method": "POST", "uri": "/channels", @@ -2156,7 +2595,101 @@ "Channels": { "target": "com.amazonaws.devopsguru#Channels", "traits": { - "smithy.api#documentation": "

      \n \t\tAn array that contains the requested notification channels.\n \t

      " + "smithy.api#documentation": "

      An array that contains the requested notification channels.

      " + } + }, + "NextToken": { + "target": "com.amazonaws.devopsguru#UuidNextToken", + "traits": { + "smithy.api#documentation": "

      The pagination token to use to retrieve \n the next page of results for this operation. If there are no more pages, this value is null.

      " + } + } + } + }, + "com.amazonaws.devopsguru#ListOrganizationInsights": { + "type": "operation", + "input": { + "target": "com.amazonaws.devopsguru#ListOrganizationInsightsRequest" + }, + "output": { + "target": "com.amazonaws.devopsguru#ListOrganizationInsightsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.devopsguru#AccessDeniedException" + }, + { + "target": "com.amazonaws.devopsguru#InternalServerException" + }, + { + "target": "com.amazonaws.devopsguru#ThrottlingException" + }, + { + "target": "com.amazonaws.devopsguru#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Returns a list of insights associated with the account or OU Id.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/organization/insights", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.devopsguru#ListOrganizationInsightsRequest": { + "type": "structure", + "members": { + "StatusFilter": { + "target": "com.amazonaws.devopsguru#ListInsightsStatusFilter", + "traits": { + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.devopsguru#ListInsightsMaxResults", + "traits": { + "smithy.api#documentation": "

      The maximum number of results to return with a single call.\n\tTo retrieve the remaining results, make another call with the returned nextToken value.

      " + } + }, + "AccountIds": { + "target": "com.amazonaws.devopsguru#ListInsightsAccountIdList", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } + }, + "OrganizationalUnitIds": { + "target": "com.amazonaws.devopsguru#ListInsightsOrganizationalUnitIdList", + "traits": { + "smithy.api#documentation": "

      The ID of the organizational unit.

      " + } + }, + "NextToken": { + "target": "com.amazonaws.devopsguru#UuidNextToken", + "traits": { + "smithy.api#documentation": "

      The pagination token to use to retrieve \n the next page of results for this operation. If this value is null, it retrieves the first page.

      " + } + } + } + }, + "com.amazonaws.devopsguru#ListOrganizationInsightsResponse": { + "type": "structure", + "members": { + "ProactiveInsights": { + "target": "com.amazonaws.devopsguru#ProactiveOrganizationInsights", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of open proactive insights in your Amazon Web Services\n\t\t\taccount.

      " + } + }, + "ReactiveInsights": { + "target": "com.amazonaws.devopsguru#ReactiveOrganizationInsights", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of open reactive insights in your Amazon Web Services\n\t\t\taccount.

      " } }, "NextToken": { @@ -2193,7 +2726,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns a list of a specified insight's recommendations. Each recommendation includes a list of related metrics and a list of related events.\n \t

      ", + "smithy.api#documentation": "

      Returns a list of a specified insight's recommendations. Each recommendation includes\n\t\t\ta list of related metrics and a list of related events.

      ", "smithy.api#http": { "method": "POST", "uri": "/recommendations", @@ -2212,7 +2745,7 @@ "InsightId": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the requested insight.\n\t\t

      ", + "smithy.api#documentation": "

      The ID of the requested insight.

      ", "smithy.api#required": {} } }, @@ -2227,6 +2760,12 @@ "traits": { "smithy.api#documentation": "

      A locale that specifies the language to use for recommendations.

      " } + }, + "AccountId": { + "target": "com.amazonaws.devopsguru#AwsAccountId", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } } } }, @@ -2236,7 +2775,7 @@ "Recommendations": { "target": "com.amazonaws.devopsguru#Recommendations", "traits": { - "smithy.api#documentation": "

      \n \t\tAn array of the requested recommendations.\n \t

      " + "smithy.api#documentation": "

      An array of the requested recommendations.

      " } }, "NextToken": { @@ -2304,24 +2843,30 @@ "smithy.api#box": {} } }, + "com.amazonaws.devopsguru#MetricValue": { + "type": "double", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.devopsguru#NotificationChannel": { "type": "structure", "members": { "Id": { "target": "com.amazonaws.devopsguru#NotificationChannelId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of a notification channel.\n\t\t

      " + "smithy.api#documentation": "

      The ID of a notification channel.

      " } }, "Config": { "target": "com.amazonaws.devopsguru#NotificationChannelConfig", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA NotificationChannelConfig object that contains information about configured notification channels.\n\t\t

      " + "smithy.api#documentation": "

      A NotificationChannelConfig object that contains information about\n\t\t\tconfigured notification channels.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about a notification channel. A notification channel is used to notify you when DevOps Guru creates an insight. \n\t\t\tThe one \n \tsupported notification channel is Amazon Simple Notification Service (Amazon SNS).\n\t\t

      \n\t\t\n\t\t

      If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission \n\t\t\t\tto it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. \n\t\t\t\tFor more information, see Permissions \n\t\t\t\tfor cross account Amazon SNS topics.

      \n\t\t\t\t

      If you use an Amazon SNS topic that is encrypted by an AWS Key Management Service customer-managed key (CMK), then you must add permissions \n\t\t\t\tto the CMK. For more information, see Permissions for \n\t\t\t\tAWS KMS–encrypted Amazon SNS topics.

      " + "smithy.api#documentation": "

      Information about a notification channel. A notification channel is used to notify\n\t\t\tyou when DevOps Guru creates an insight. The one \n \tsupported notification channel is Amazon Simple Notification Service (Amazon SNS).

      \n\t\t

      If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission \n\t\t\t\tto it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. \n\t\t\t\tFor more information, see Permissions \n\t\t\t\tfor cross account Amazon SNS topics.

      \n\t\t\t\t

      If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions \n\t\t\t\tto the CMK. For more information, see Permissions for \n\t\t\t\tAmazon Web Services KMS–encrypted Amazon SNS topics.

      " } }, "com.amazonaws.devopsguru#NotificationChannelConfig": { @@ -2330,7 +2875,7 @@ "Sns": { "target": "com.amazonaws.devopsguru#SnsChannelConfig", "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about a notification channel configured in DevOps Guru to send notifications when insights are created.\n\t\t

      \n\t\t\n\t\t

      If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission \n\t\t\t\tto it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. \n\t\t\t\tFor more information, see Permissions \n\t\t\t\tfor cross account Amazon SNS topics.

      \n\t\t\t\t

      If you use an Amazon SNS topic that is encrypted by an AWS Key Management Service customer-managed key (CMK), then you must add permissions \n\t\t\t\tto the CMK. For more information, see Permissions for \n\t\t\t\tAWS KMS–encrypted Amazon SNS topics.

      ", + "smithy.api#documentation": "

      Information about a notification channel configured in DevOps Guru to send notifications\n\t\t\twhen insights are created.

      \n

      If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission \n\t\t\t\tto it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. \n\t\t\t\tFor more information, see Permissions \n\t\t\t\tfor cross account Amazon SNS topics.

      \n\t\t\t\t

      If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions \n\t\t\t\tto the CMK. For more information, see Permissions for \n\t\t\t\tAmazon Web Services KMS–encrypted Amazon SNS topics.

      ", "smithy.api#required": {} } } @@ -2370,12 +2915,12 @@ "OptInStatus": { "target": "com.amazonaws.devopsguru#OptInStatus", "traits": { - "smithy.api#documentation": "

      \n\t\t\tSpecifies if DevOps Guru is enabled to create an AWS Systems Manager OpsItem for each created insight.\n\t\t

      " + "smithy.api#documentation": "

      Specifies if DevOps Guru is enabled to create an Amazon Web Services Systems Manager OpsItem for each created\n\t\t\tinsight.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about whether DevOps Guru is configured to create an OpsItem in AWS Systems Manager OpsCenter for each created insight.\n\t\t

      " + "smithy.api#documentation": "

      Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager\n\t\t\tOpsCenter for each created insight.

      " } }, "com.amazonaws.devopsguru#OpsCenterIntegrationConfig": { @@ -2384,49 +2929,100 @@ "OptInStatus": { "target": "com.amazonaws.devopsguru#OptInStatus", "traits": { - "smithy.api#documentation": "

      \n\t\t\tSpecifies if DevOps Guru is enabled to create an AWS Systems Manager OpsItem for each created insight.\n\t\t

      " + "smithy.api#documentation": "

      Specifies if DevOps Guru is enabled to create an Amazon Web Services Systems Manager OpsItem for each created\n\t\t\tinsight.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about whether DevOps Guru is configured to create an OpsItem in AWS Systems Manager OpsCenter for each created insight.\n\t\t

      " + "smithy.api#documentation": "

      Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager\n\t\t\tOpsCenter for each created insight.

      " } }, "com.amazonaws.devopsguru#OptInStatus": { "type": "string", "traits": { - "smithy.api#documentation": "

      \n\t\t\tSpecifies if DevOps Guru is enabled to create an AWS Systems Manager OpsItem for each created insight.\n\t\t

      ", + "smithy.api#documentation": "

      Specifies if DevOps Guru is enabled to create an Amazon Web Services Systems Manager OpsItem for each created\n\t\t\tinsight.

      ", + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + } + ] + } + }, + "com.amazonaws.devopsguru#OrganizationResourceCollectionMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 500 + } + } + }, + "com.amazonaws.devopsguru#OrganizationResourceCollectionType": { + "type": "string", + "traits": { "smithy.api#enum": [ { - "value": "ENABLED", - "name": "ENABLED" + "value": "AWS_CLOUD_FORMATION", + "name": "AWS_CLOUD_FORMATION" + }, + { + "value": "AWS_SERVICE", + "name": "AWS_SERVICE" }, { - "value": "DISABLED", - "name": "DISABLED" + "value": "AWS_ACCOUNT", + "name": "AWS_ACCOUNT" } ] } }, + "com.amazonaws.devopsguru#OrganizationalUnitId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 68 + }, + "smithy.api#pattern": "^ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}$" + } + }, + "com.amazonaws.devopsguru#OrganizationalUnitIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.devopsguru#OrganizationalUnitId" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 5 + } + } + }, "com.amazonaws.devopsguru#PredictionTimeRange": { "type": "structure", "members": { "StartTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time range during which a metric limit is expected to be exceeded. This applies to proactive insights only.\n\t\t

      ", + "smithy.api#documentation": "

      The time range during which a metric limit is expected to be exceeded. This applies\n\t\t\tto proactive insights only.

      ", "smithy.api#required": {} } }, "EndTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time when the behavior in a proactive insight is expected to end.\n\t\t

      " + "smithy.api#documentation": "

      The time when the behavior in a proactive insight is expected to end.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time range during which anomalous behavior in a proactive anomaly or an insight is expected to occur. \n\t\t

      " + "smithy.api#documentation": "

      The time range during which anomalous behavior in a proactive anomaly or an insight\n\t\t\tis expected to occur.

      " } }, "com.amazonaws.devopsguru#ProactiveAnomalies": { @@ -2441,25 +3037,25 @@ "Id": { "target": "com.amazonaws.devopsguru#AnomalyId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of a proactive anomaly.\n\t\t

      " + "smithy.api#documentation": "

      The ID of a proactive anomaly.

      " } }, "Severity": { "target": "com.amazonaws.devopsguru#AnomalySeverity", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe severity of a proactive anomaly.\n\t\t

      " + "smithy.api#documentation": "

      The severity of a proactive anomaly.

      " } }, "Status": { "target": "com.amazonaws.devopsguru#AnomalyStatus", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe status of a proactive anomaly.\n\t\t

      " + "smithy.api#documentation": "

      The status of a proactive anomaly.

      " } }, "UpdateTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time of the anomaly's most recent update.\n\t\t

      " + "smithy.api#documentation": "

      The time of the anomaly's most recent update.

      " } }, "AnomalyTimeRange": { @@ -2477,13 +3073,13 @@ "SourceDetails": { "target": "com.amazonaws.devopsguru#AnomalySourceDetails", "traits": { - "smithy.api#documentation": "

      \n\t\t\tDetails about the source of the analyzed operational data that triggered the anomaly. The one supported source is Amazon CloudWatch metrics. \n\t\t

      " + "smithy.api#documentation": "

      Details about the source of the analyzed operational data that triggered the anomaly.\n\t\t\tThe one supported source is Amazon CloudWatch metrics.

      " } }, "AssociatedInsightId": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the insight that contains this anomaly. An insight is composed of related anomalies.\n\t\t

      " + "smithy.api#documentation": "

      The ID of the insight that contains this anomaly. An insight is composed of related\n\t\t\tanomalies.

      " } }, "ResourceCollection": { @@ -2492,12 +3088,12 @@ "Limit": { "target": "com.amazonaws.devopsguru#AnomalyLimit", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA threshold that was exceeded by behavior in analyzed resources. Exceeding this\n\t\t\tthreshold is related to the anomalous behavior that generated this anomaly.\n\t\t

      " + "smithy.api#documentation": "

      A threshold that was exceeded by behavior in analyzed resources. Exceeding this\n\t\t\tthreshold is related to the anomalous behavior that generated this anomaly.

      " } } }, "traits": { - "smithy.api#documentation": "

      Information about an anomaly. This object is returned by ListAnomalies.

      " + "smithy.api#documentation": "

      Information about an anomaly. This object is returned by\n\t\t\tListAnomalies.

      " } }, "com.amazonaws.devopsguru#ProactiveAnomalySummary": { @@ -2524,7 +3120,7 @@ "UpdateTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe time of the anomaly's most recent update.\n\t\t

      " + "smithy.api#documentation": "

      The time of the anomaly's most recent update.

      " } }, "AnomalyTimeRange": { @@ -2542,13 +3138,13 @@ "SourceDetails": { "target": "com.amazonaws.devopsguru#AnomalySourceDetails", "traits": { - "smithy.api#documentation": "

      \n\t\t\tDetails about the source of the analyzed operational data that triggered the anomaly. The one supported source is Amazon CloudWatch metrics. \n\t\t

      " + "smithy.api#documentation": "

      Details about the source of the analyzed operational data that triggered the anomaly.\n\t\t\tThe one supported source is Amazon CloudWatch metrics.

      " } }, "AssociatedInsightId": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the insight that contains this anomaly. An insight is composed of related anomalies.\n\t\t

      " + "smithy.api#documentation": "

      The ID of the insight that contains this anomaly. An insight is composed of related\n\t\t\tanomalies.

      " } }, "ResourceCollection": { @@ -2557,12 +3153,12 @@ "Limit": { "target": "com.amazonaws.devopsguru#AnomalyLimit", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA threshold that was exceeded by behavior in analyzed resources. Exceeding this\n\t\t\tthreshold is related to the anomalous behavior that generated this anomaly.\n\t\t

      " + "smithy.api#documentation": "

      A threshold that was exceeded by behavior in analyzed resources. Exceeding this\n\t\t\tthreshold is related to the anomalous behavior that generated this anomaly.

      " } } }, "traits": { - "smithy.api#documentation": "

      Details about a proactive anomaly. This object is returned by\n\t\t\tDescribeAnomaly.\n

      " + "smithy.api#documentation": "

      Details about a proactive anomaly. This object is returned by\n\t\t\t\tDescribeAnomaly.\n

      " } }, "com.amazonaws.devopsguru#ProactiveInsight": { @@ -2604,12 +3200,12 @@ "SsmOpsItemId": { "target": "com.amazonaws.devopsguru#SsmOpsItemId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the AWS System Manager OpsItem created for this insight. You must enable \n\t\t\tthe creation of OpstItems insights before they are created for each insight.\n\t\t

      " + "smithy.api#documentation": "

      The ID of the Amazon Web Services System Manager OpsItem created for this insight. You must enable\n\t\t\tthe creation of OpstItems insights before they are created for each insight.

      " } } }, "traits": { - "smithy.api#documentation": "

      Details about a proactive insight. This object is returned by ListInsights.

      " + "smithy.api#documentation": "

      Details about a proactive insight. This object is returned by\n\t\t\t\tListInsights.

      " } }, "com.amazonaws.devopsguru#ProactiveInsightSummary": { @@ -2651,12 +3247,12 @@ "ServiceCollection": { "target": "com.amazonaws.devopsguru#ServiceCollection", "traits": { - "smithy.api#documentation": "

      A collection of the names of AWS services.

      " + "smithy.api#documentation": "

      A collection of the names of Amazon Web Services services.

      " } } }, "traits": { - "smithy.api#documentation": "

      Details about a proactive insight. This object is returned by\n\t\t\tDescribeInsight.\n

      " + "smithy.api#documentation": "

      Details about a proactive insight. This object is returned by\n\t\t\t\tDescribeInsight.\n

      " } }, "com.amazonaws.devopsguru#ProactiveInsights": { @@ -2665,6 +3261,68 @@ "target": "com.amazonaws.devopsguru#ProactiveInsightSummary" } }, + "com.amazonaws.devopsguru#ProactiveOrganizationInsightSummary": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.devopsguru#InsightId", + "traits": { + "smithy.api#documentation": "

      The ID of the insight summary.

      " + } + }, + "AccountId": { + "target": "com.amazonaws.devopsguru#AwsAccountId", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } + }, + "OrganizationalUnitId": { + "target": "com.amazonaws.devopsguru#OrganizationalUnitId", + "traits": { + "smithy.api#documentation": "

      The ID of the organizational unit.

      " + } + }, + "Name": { + "target": "com.amazonaws.devopsguru#InsightName", + "traits": { + "smithy.api#documentation": "

      The name of the insight summary.

      " + } + }, + "Severity": { + "target": "com.amazonaws.devopsguru#InsightSeverity", + "traits": { + "smithy.api#documentation": "

      An array of severity values used to search for insights.

      " + } + }, + "Status": { + "target": "com.amazonaws.devopsguru#InsightStatus", + "traits": { + "smithy.api#documentation": "

      An array of status values used to search for insights.

      " + } + }, + "InsightTimeRange": { + "target": "com.amazonaws.devopsguru#InsightTimeRange" + }, + "PredictionTimeRange": { + "target": "com.amazonaws.devopsguru#PredictionTimeRange" + }, + "ResourceCollection": { + "target": "com.amazonaws.devopsguru#ResourceCollection" + }, + "ServiceCollection": { + "target": "com.amazonaws.devopsguru#ServiceCollection" + } + }, + "traits": { + "smithy.api#documentation": "

      Details about a proactive insight. This object is returned by\n\t\t\t\tDescribeInsight.

      " + } + }, + "com.amazonaws.devopsguru#ProactiveOrganizationInsights": { + "type": "list", + "member": { + "target": "com.amazonaws.devopsguru#ProactiveOrganizationInsightSummary" + } + }, "com.amazonaws.devopsguru#PutFeedback": { "type": "operation", "input": { @@ -2694,7 +3352,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tCollects customer feedback about the specified insight.\n \t

      ", + "smithy.api#documentation": "

      Collects customer feedback about the specified insight.

      ", "smithy.api#http": { "method": "PUT", "uri": "/feedback", @@ -2708,7 +3366,7 @@ "InsightFeedback": { "target": "com.amazonaws.devopsguru#InsightFeedback", "traits": { - "smithy.api#documentation": "

      \n \t\tThe feedback from customers is about the recommendations in this insight.\n \t

      " + "smithy.api#documentation": "

      The feedback from customers is about the recommendations in this insight.

      " } } } @@ -2741,7 +3399,7 @@ "Status": { "target": "com.amazonaws.devopsguru#AnomalyStatus", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe status of the anomaly.\n\t\t

      " + "smithy.api#documentation": "

      The status of the anomaly.

      " } }, "AnomalyTimeRange": { @@ -2756,13 +3414,13 @@ "SourceDetails": { "target": "com.amazonaws.devopsguru#AnomalySourceDetails", "traits": { - "smithy.api#documentation": "

      \n\t\t\tDetails about the source of the analyzed operational data that triggered the anomaly. The one supported source is Amazon CloudWatch metrics. \n\t\t

      " + "smithy.api#documentation": "

      Details about the source of the analyzed operational data that triggered the anomaly.\n\t\t\tThe one supported source is Amazon CloudWatch metrics.

      " } }, "AssociatedInsightId": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the insight that contains this anomaly. An insight is composed of related anomalies.\n\t\t

      " + "smithy.api#documentation": "

      The ID of the insight that contains this anomaly. An insight is composed of related\n\t\t\tanomalies.

      " } }, "ResourceCollection": { @@ -2770,7 +3428,7 @@ } }, "traits": { - "smithy.api#documentation": "

      Details about a reactive anomaly. This object is returned by ListAnomalies.

      " + "smithy.api#documentation": "

      Details about a reactive anomaly. This object is returned by\n\t\t\t\tListAnomalies.

      " } }, "com.amazonaws.devopsguru#ReactiveAnomalySummary": { @@ -2779,19 +3437,19 @@ "Id": { "target": "com.amazonaws.devopsguru#AnomalyId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the reactive anomaly.\n\t\t

      " + "smithy.api#documentation": "

      The ID of the reactive anomaly.

      " } }, "Severity": { "target": "com.amazonaws.devopsguru#AnomalySeverity", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe severity of the reactive anomaly.\t\t\t\n\t\t

      " + "smithy.api#documentation": "

      The severity of the reactive anomaly.

      " } }, "Status": { "target": "com.amazonaws.devopsguru#AnomalyStatus", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe status of the reactive anomaly.\n\t\t

      " + "smithy.api#documentation": "

      The status of the reactive anomaly.

      " } }, "AnomalyTimeRange": { @@ -2806,13 +3464,13 @@ "SourceDetails": { "target": "com.amazonaws.devopsguru#AnomalySourceDetails", "traits": { - "smithy.api#documentation": "

      \n\t\t\tDetails about the source of the analyzed operational data that triggered the anomaly. The one supported source is Amazon CloudWatch metrics. \n\t\t

      " + "smithy.api#documentation": "

      Details about the source of the analyzed operational data that triggered the anomaly.\n\t\t\tThe one supported source is Amazon CloudWatch metrics.

      " } }, "AssociatedInsightId": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the insight that contains this anomaly. An insight is composed of related anomalies.\n\t\t

      " + "smithy.api#documentation": "

      The ID of the insight that contains this anomaly. An insight is composed of related\n\t\t\tanomalies.

      " } }, "ResourceCollection": { @@ -2820,7 +3478,7 @@ } }, "traits": { - "smithy.api#documentation": "

      Details about a reactive anomaly. This object is returned by\n\t\t\tDescribeAnomaly.\n

      " + "smithy.api#documentation": "

      Details about a reactive anomaly. This object is returned by\n\t\t\t\tDescribeAnomaly.\n

      " } }, "com.amazonaws.devopsguru#ReactiveInsight": { @@ -2829,25 +3487,25 @@ "Id": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of a reactive insight.\n\t\t

      " + "smithy.api#documentation": "

      The ID of a reactive insight.

      " } }, "Name": { "target": "com.amazonaws.devopsguru#InsightName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of a reactive insight.\n\t\t

      " + "smithy.api#documentation": "

      The name of a reactive insight.

      " } }, "Severity": { "target": "com.amazonaws.devopsguru#InsightSeverity", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe severity of a reactive insight.\n\t\t

      " + "smithy.api#documentation": "

      The severity of a reactive insight.

      " } }, "Status": { "target": "com.amazonaws.devopsguru#InsightStatus", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe status of a reactive insight.\n\t\t

      " + "smithy.api#documentation": "

      The status of a reactive insight.

      " } }, "InsightTimeRange": { @@ -2859,12 +3517,12 @@ "SsmOpsItemId": { "target": "com.amazonaws.devopsguru#SsmOpsItemId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the AWS System Manager OpsItem created for this insight. You must enable \n\t\t\tthe creation of OpstItems insights before they are created for each insight.\n\t\t

      " + "smithy.api#documentation": "

      The ID of the Amazon Web Services System Manager OpsItem created for this insight. You must enable\n\t\t\tthe creation of OpstItems insights before they are created for each insight.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about a reactive insight. This object is returned by ListInsights.\n\t\t

      " + "smithy.api#documentation": "

      Information about a reactive insight. This object is returned by\n\t\t\t\tListInsights.

      " } }, "com.amazonaws.devopsguru#ReactiveInsightSummary": { @@ -2873,25 +3531,25 @@ "Id": { "target": "com.amazonaws.devopsguru#InsightId", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of a reactive summary.\n\t\t

      " + "smithy.api#documentation": "

      The ID of a reactive summary.

      " } }, "Name": { "target": "com.amazonaws.devopsguru#InsightName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of a reactive insight.\n\t\t

      " + "smithy.api#documentation": "

      The name of a reactive insight.

      " } }, "Severity": { "target": "com.amazonaws.devopsguru#InsightSeverity", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe severity of a reactive insight.\n\t\t

      " + "smithy.api#documentation": "

      The severity of a reactive insight.

      " } }, "Status": { "target": "com.amazonaws.devopsguru#InsightStatus", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe status of a reactive insight.\n\t\t

      " + "smithy.api#documentation": "

      The status of a reactive insight.

      " } }, "InsightTimeRange": { @@ -2903,7 +3561,7 @@ "ServiceCollection": { "target": "com.amazonaws.devopsguru#ServiceCollection", "traits": { - "smithy.api#documentation": "

      A collection of the names of AWS services.

      " + "smithy.api#documentation": "

      A collection of the names of Amazon Web Services services.

      " } } }, @@ -2917,43 +3575,102 @@ "target": "com.amazonaws.devopsguru#ReactiveInsightSummary" } }, + "com.amazonaws.devopsguru#ReactiveOrganizationInsightSummary": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.devopsguru#InsightId", + "traits": { + "smithy.api#documentation": "

      The ID of the insight summary.

      " + } + }, + "AccountId": { + "target": "com.amazonaws.devopsguru#AwsAccountId", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      " + } + }, + "OrganizationalUnitId": { + "target": "com.amazonaws.devopsguru#OrganizationalUnitId", + "traits": { + "smithy.api#documentation": "

      The ID of the organizational unit.

      " + } + }, + "Name": { + "target": "com.amazonaws.devopsguru#InsightName", + "traits": { + "smithy.api#documentation": "

      The name of the insight summary.

      " + } + }, + "Severity": { + "target": "com.amazonaws.devopsguru#InsightSeverity", + "traits": { + "smithy.api#documentation": "

      An array of severity values used to search for insights.

      " + } + }, + "Status": { + "target": "com.amazonaws.devopsguru#InsightStatus", + "traits": { + "smithy.api#documentation": "

      An array of status values used to search for insights.

      " + } + }, + "InsightTimeRange": { + "target": "com.amazonaws.devopsguru#InsightTimeRange" + }, + "ResourceCollection": { + "target": "com.amazonaws.devopsguru#ResourceCollection" + }, + "ServiceCollection": { + "target": "com.amazonaws.devopsguru#ServiceCollection" + } + }, + "traits": { + "smithy.api#documentation": "

      Information about a reactive insight. This object is returned by\n\t\t\t\tDescribeInsight.

      " + } + }, + "com.amazonaws.devopsguru#ReactiveOrganizationInsights": { + "type": "list", + "member": { + "target": "com.amazonaws.devopsguru#ReactiveOrganizationInsightSummary" + } + }, "com.amazonaws.devopsguru#Recommendation": { "type": "structure", "members": { "Description": { "target": "com.amazonaws.devopsguru#RecommendationDescription", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA description of the problem.\n\t\t

      " + "smithy.api#documentation": "

      A description of the problem.

      " } }, "Link": { "target": "com.amazonaws.devopsguru#RecommendationLink", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA hyperlink to information to help you address the problem.\n\t\t

      " + "smithy.api#documentation": "

      A hyperlink to information to help you address the problem.

      " } }, "Name": { "target": "com.amazonaws.devopsguru#RecommendationName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of the recommendation.\n\t\t

      " + "smithy.api#documentation": "

      The name of the recommendation.

      " } }, "Reason": { "target": "com.amazonaws.devopsguru#RecommendationReason", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe reason DevOps Guru flagged the anomalous behavior as a problem.\n\t\t

      " + "smithy.api#documentation": "

      The reason DevOps Guru flagged the anomalous behavior as a problem.

      " } }, "RelatedEvents": { "target": "com.amazonaws.devopsguru#RecommendationRelatedEvents", "traits": { - "smithy.api#documentation": "

      \n\t\t\tEvents that are related to the problem. Use these events to learn more about what's happening and to help address the issue.\n\t\t

      " + "smithy.api#documentation": "

      Events that are related to the problem. Use these events to learn more about what's\n\t\t\thappening and to help address the issue.

      " } }, "RelatedAnomalies": { "target": "com.amazonaws.devopsguru#RecommendationRelatedAnomalies", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAnomalies that are related to the problem. Use these Anomalies to learn more about what's happening and to help address the issue.\n\t\t

      " + "smithy.api#documentation": "

      Anomalies that are related to the problem. Use these Anomalies to learn more about\n\t\t\twhat's happening and to help address the issue.

      " } } }, @@ -2985,18 +3702,18 @@ "Resources": { "target": "com.amazonaws.devopsguru#RecommendationRelatedAnomalyResources", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn array of objects that represent resources in which DevOps Guru detected anomalous behavior. Each object contains the name \n\t\t\tand type of the resource.\n\t\t

      " + "smithy.api#documentation": "

      An array of objects that represent resources in which DevOps Guru detected anomalous\n\t\t\tbehavior. Each object contains the name and type of the resource.

      " } }, "SourceDetails": { "target": "com.amazonaws.devopsguru#RelatedAnomalySourceDetails", "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about where the anomalous behavior related the recommendation was found. For example, details in Amazon CloudWatch metrics.\n\t\t

      " + "smithy.api#documentation": "

      Information about where the anomalous behavior related the recommendation was found.\n\t\t\tFor example, details in Amazon CloudWatch metrics.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about an anomaly that is related to a recommendation.\n\t\t

      " + "smithy.api#documentation": "

      Information about an anomaly that is related to a recommendation.

      " } }, "com.amazonaws.devopsguru#RecommendationRelatedAnomalyResource": { @@ -3005,18 +3722,18 @@ "Name": { "target": "com.amazonaws.devopsguru#RecommendationRelatedAnomalyResourceName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of the resource.\n\t\t

      " + "smithy.api#documentation": "

      The name of the resource.

      " } }, "Type": { "target": "com.amazonaws.devopsguru#RecommendationRelatedAnomalyResourceType", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe type of the resource.\n\t\t

      " + "smithy.api#documentation": "

      The type of the resource.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about a resource in which DevOps Guru detected anomalous behavior.\n\t\t

      " + "smithy.api#documentation": "

      Information about a resource in which DevOps Guru detected anomalous behavior.

      " } }, "com.amazonaws.devopsguru#RecommendationRelatedAnomalyResourceName": { @@ -3042,7 +3759,7 @@ } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tContains an array of RecommendationRelatedCloudWatchMetricsSourceDetail objects that contain the name \n\t\t\tand namespace of an Amazon CloudWatch metric.\n\t\t

      " + "smithy.api#documentation": "

      Contains an array of RecommendationRelatedCloudWatchMetricsSourceDetail\n\t\t\tobjects that contain the name and namespace of an Amazon CloudWatch metric.

      " } }, "com.amazonaws.devopsguru#RecommendationRelatedCloudWatchMetricsSourceDetail": { @@ -3062,7 +3779,7 @@ } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about an Amazon CloudWatch metric that is analyzed by DevOps Guru. It is one of many analyzed metrics \n\t\t\tthat are used to generate insights.\n\t\t

      " + "smithy.api#documentation": "

      Information about an Amazon CloudWatch metric that is analyzed by DevOps Guru. It is one of many\n\t\t\tanalyzed metrics that are used to generate insights.

      " } }, "com.amazonaws.devopsguru#RecommendationRelatedCloudWatchMetricsSourceDetails": { @@ -3083,18 +3800,18 @@ "Name": { "target": "com.amazonaws.devopsguru#RecommendationRelatedEventName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of the event. This corresponds to the Name field in an \n\t\t\tEvent object.\n\t\t

      " + "smithy.api#documentation": "

      The name of the event. This corresponds to the Name field in an\n\t\t\t\tEvent object.

      " } }, "Resources": { "target": "com.amazonaws.devopsguru#RecommendationRelatedEventResources", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA ResourceCollection object that contains arrays of the names of AWS \n\t\t\tCloudFormation stacks. You can specify up to 500 AWS CloudFormation stacks.\n\t\t

      " + "smithy.api#documentation": "

      A ResourceCollection object that contains arrays of the names of Amazon Web Services\n\t\t\tCloudFormation stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about an event that is related to a recommendation.\n\t\t

      " + "smithy.api#documentation": "

      Information about an event that is related to a recommendation.

      " } }, "com.amazonaws.devopsguru#RecommendationRelatedEventName": { @@ -3106,18 +3823,18 @@ "Name": { "target": "com.amazonaws.devopsguru#RecommendationRelatedEventResourceName", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of the resource that emitted the event. This corresponds to the Name field in an \n\t\t\tEventResource object.\n\t\t

      " + "smithy.api#documentation": "

      The name of the resource that emitted the event. This corresponds to the\n\t\t\t\tName field in an EventResource object.

      " } }, "Type": { "target": "com.amazonaws.devopsguru#RecommendationRelatedEventResourceType", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe type of the resource that emitted the event. This corresponds to the Type field in an \n\t\t\tEventResource object.\n\t\t

      " + "smithy.api#documentation": "

      The type of the resource that emitted the event. This corresponds to the\n\t\t\t\tType field in an EventResource object.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about an AWS resource that emitted and event that is related to a recommendation in an insight. \n\t\t

      " + "smithy.api#documentation": "

      Information about an Amazon Web Services resource that emitted and event that is related to a\n\t\t\trecommendation in an insight.

      " } }, "com.amazonaws.devopsguru#RecommendationRelatedEventResourceName": { @@ -3185,7 +3902,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tRemoves a notification channel from DevOps Guru. A notification channel is used to notify you when DevOps Guru generates an insight \n \t\tthat contains information about how to improve your operations.\n \t

      ", + "smithy.api#documentation": "

      Removes a notification channel from DevOps Guru. A notification channel is used to notify\n\t\t\tyou when DevOps Guru generates an insight that contains information about how to improve your\n\t\t\toperations.

      ", "smithy.api#http": { "method": "DELETE", "uri": "/channels/{Id}", @@ -3199,7 +3916,7 @@ "Id": { "target": "com.amazonaws.devopsguru#NotificationChannelId", "traits": { - "smithy.api#documentation": "

      \n \t\tThe ID of the notification channel to be removed.\n \t

      ", + "smithy.api#documentation": "

      The ID of the notification channel to be removed.

      ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3216,12 +3933,12 @@ "CloudFormation": { "target": "com.amazonaws.devopsguru#CloudFormationCollection", "traits": { - "smithy.api#documentation": "

      An array of the names of AWS CloudFormation stacks. The stacks define AWS resources\n \t\tthat DevOps Guru analyzes. You can specify up to 500 AWS CloudFormation stacks.\n \t

      " + "smithy.api#documentation": "

      An array of the names of Amazon Web Services CloudFormation stacks. The stacks define Amazon Web Services resources that\n\t\t\tDevOps Guru analyzes. You can specify up to 500 Amazon Web Services CloudFormation stacks.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tA collection of AWS resources supported by DevOps Guru. The one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks.\n\t\t

      " + "smithy.api#documentation": "

      A collection of Amazon Web Services resources supported by DevOps Guru.\n\t\t\tThe one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

      " } }, "com.amazonaws.devopsguru#ResourceCollectionFilter": { @@ -3230,12 +3947,12 @@ "CloudFormation": { "target": "com.amazonaws.devopsguru#CloudFormationCollectionFilter", "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about AWS CloudFormation stacks. You can use up to 500 stacks to specify which AWS resources in your account to analyze. \n\t\t\tFor more information, see Stacks \n\t\t\tin the AWS CloudFormation User Guide.\n\t\t

      " + "smithy.api#documentation": "

      Information about Amazon Web Services CloudFormation stacks. You can use up to 500\n\t\t\tstacks to specify which Amazon Web Services resources in your account to analyze. For more\n\t\t\tinformation, see Stacks in the\n\t\t\t\tAmazon Web Services CloudFormation User Guide.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about a filter used to specify which AWS resources are analyzed for anomalous behavior by DevOps Guru.\n\t\t

      " + "smithy.api#documentation": "

      Information about a filter used to specify which Amazon Web Services resources are analyzed for\n\t\t\tanomalous behavior by DevOps Guru.

      " } }, "com.amazonaws.devopsguru#ResourceCollectionType": { @@ -3277,14 +3994,14 @@ "ResourceId": { "target": "com.amazonaws.devopsguru#ResourceIdString", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe ID of the AWS resource that could not be found.\n\t\t

      ", + "smithy.api#documentation": "

      The ID of the Amazon Web Services resource that could not be found.

      ", "smithy.api#required": {} } }, "ResourceType": { "target": "com.amazonaws.devopsguru#ResourceIdType", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe type of the AWS resource that could not be found.\n\t\t

      ", + "smithy.api#documentation": "

      The type of the Amazon Web Services resource that could not be found.

      ", "smithy.api#required": {} } } @@ -3331,7 +4048,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n \t\tReturns a list of insights in your AWS account. You can specify which insights are returned by their start time, one or more statuses \n \t\t(ONGOING, CLOSED, and CLOSED), one or more severities (LOW, MEDIUM, \n \t\tand HIGH), and type (REACTIVE or PROACTIVE).\n \t

      \n \t

      \n \t\tUse the Filters parameter to specify status and severity \n \t\tsearch parameters. Use the Type parameter to specify REACTIVE or PROACTIVE in your search.\n \t

      ", + "smithy.api#documentation": "

      Returns a list of insights in your Amazon Web Services account. You can specify which insights are\n\t\t\treturned by their start time, one or more statuses (ONGOING,\n\t\t\t\tCLOSED, and CLOSED), one or more severities\n\t\t\t\t(LOW, MEDIUM, and HIGH), and type\n\t\t\t\t(REACTIVE or PROACTIVE).

      \n\t\t

      Use the Filters parameter to specify status and severity search\n\t\t\tparameters. Use the Type parameter to specify REACTIVE or\n\t\t\t\tPROACTIVE in your search.

      ", "smithy.api#http": { "method": "POST", "uri": "/insights/search", @@ -3344,19 +4061,31 @@ } } }, + "com.amazonaws.devopsguru#SearchInsightsAccountIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.devopsguru#AwsAccountId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, "com.amazonaws.devopsguru#SearchInsightsFilters": { "type": "structure", "members": { "Severities": { "target": "com.amazonaws.devopsguru#InsightSeverities", "traits": { - "smithy.api#documentation": "

      \n \t\tAn array of severity values used to search for insights.\n \t

      " + "smithy.api#documentation": "

      An array of severity values used to search for insights.

      " } }, "Statuses": { "target": "com.amazonaws.devopsguru#InsightStatuses", "traits": { - "smithy.api#documentation": "

      \n \t\tAn array of status values used to search for insights.\n \t

      " + "smithy.api#documentation": "

      An array of status values used to search for insights.

      " } }, "ResourceCollection": { @@ -3365,12 +4094,12 @@ "ServiceCollection": { "target": "com.amazonaws.devopsguru#ServiceCollection", "traits": { - "smithy.api#documentation": "

      A collection of the names of AWS services.

      " + "smithy.api#documentation": "

      A collection of the names of Amazon Web Services services.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n \t\tSpecifies one or more severity values and one or more status values that are used to search \n \t\tfor insights. \n \t

      " + "smithy.api#documentation": "

      Specifies one or more severity values and one or more status values that are used to\n\t\t\tsearch for insights.

      " } }, "com.amazonaws.devopsguru#SearchInsightsMaxResults": { @@ -3389,14 +4118,14 @@ "StartTimeRange": { "target": "com.amazonaws.devopsguru#StartTimeRange", "traits": { - "smithy.api#documentation": "

      \n \t\tThe start of the time range passed in. Returned insights occurred after this time.\n \t

      ", + "smithy.api#documentation": "

      The start of the time range passed in. Returned insights occurred after this time.\n\t\t

      ", "smithy.api#required": {} } }, "Filters": { "target": "com.amazonaws.devopsguru#SearchInsightsFilters", "traits": { - "smithy.api#documentation": "

      \n \t\tA SearchInsightsFilters object that is used to set the severity and status filters on your insight search.\n \t

      " + "smithy.api#documentation": "

      A SearchInsightsFilters object that is used to set the severity and\n\t\t\tstatus filters on your insight search.

      " } }, "MaxResults": { @@ -3414,7 +4143,7 @@ "Type": { "target": "com.amazonaws.devopsguru#InsightType", "traits": { - "smithy.api#documentation": "

      \n \t\tThe type of insights you are searching for (REACTIVE or PROACTIVE).\n \t

      ", + "smithy.api#documentation": "

      The type of insights you are searching for (REACTIVE or\n\t\t\t\tPROACTIVE).

      ", "smithy.api#required": {} } } @@ -3426,13 +4155,151 @@ "ProactiveInsights": { "target": "com.amazonaws.devopsguru#ProactiveInsights", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe returned proactive insights.\n\t\t

      " + "smithy.api#documentation": "

      The returned proactive insights.

      " + } + }, + "ReactiveInsights": { + "target": "com.amazonaws.devopsguru#ReactiveInsights", + "traits": { + "smithy.api#documentation": "

      The returned reactive insights.

      " + } + }, + "NextToken": { + "target": "com.amazonaws.devopsguru#UuidNextToken", + "traits": { + "smithy.api#documentation": "

      The pagination token to use to retrieve \n the next page of results for this operation. If there are no more pages, this value is null.

      " + } + } + } + }, + "com.amazonaws.devopsguru#SearchOrganizationInsights": { + "type": "operation", + "input": { + "target": "com.amazonaws.devopsguru#SearchOrganizationInsightsRequest" + }, + "output": { + "target": "com.amazonaws.devopsguru#SearchOrganizationInsightsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.devopsguru#AccessDeniedException" + }, + { + "target": "com.amazonaws.devopsguru#InternalServerException" + }, + { + "target": "com.amazonaws.devopsguru#ThrottlingException" + }, + { + "target": "com.amazonaws.devopsguru#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Returns a list of insights in your organization. You can specify which insights are\n\t\t\treturned by their start time, one or more statuses (ONGOING,\n\t\t\t\tCLOSED, and CLOSED), one or more severities\n\t\t\t\t(LOW, MEDIUM, and HIGH), and type\n\t\t\t\t(REACTIVE or PROACTIVE).

      \n\t\t

      Use the Filters parameter to specify status and severity search\n\t\t\tparameters. Use the Type parameter to specify REACTIVE or\n\t\t\t\tPROACTIVE in your search.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/organization/insights/search", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.devopsguru#SearchOrganizationInsightsFilters": { + "type": "structure", + "members": { + "Severities": { + "target": "com.amazonaws.devopsguru#InsightSeverities", + "traits": { + "smithy.api#documentation": "

      An array of severity values used to search for insights.

      " + } + }, + "Statuses": { + "target": "com.amazonaws.devopsguru#InsightStatuses", + "traits": { + "smithy.api#documentation": "

      An array of status values used to search for insights.

      " + } + }, + "ResourceCollection": { + "target": "com.amazonaws.devopsguru#ResourceCollection" + }, + "ServiceCollection": { + "target": "com.amazonaws.devopsguru#ServiceCollection" + } + }, + "traits": { + "smithy.api#documentation": "

      Filters you can use to specify which events are returned when ListEvents\n\t\t\tis called.

      " + } + }, + "com.amazonaws.devopsguru#SearchOrganizationInsightsMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.devopsguru#SearchOrganizationInsightsRequest": { + "type": "structure", + "members": { + "AccountIds": { + "target": "com.amazonaws.devopsguru#SearchInsightsAccountIdList", + "traits": { + "smithy.api#documentation": "

      The ID of the Amazon Web Services account.

      ", + "smithy.api#required": {} + } + }, + "StartTimeRange": { + "target": "com.amazonaws.devopsguru#StartTimeRange", + "traits": { + "smithy.api#required": {} + } + }, + "Filters": { + "target": "com.amazonaws.devopsguru#SearchOrganizationInsightsFilters", + "traits": { + "smithy.api#documentation": "

      A SearchOrganizationInsightsFilters object that is used to set the\n\t\t\tseverity and status filters on your insight search.

      " + } + }, + "MaxResults": { + "target": "com.amazonaws.devopsguru#SearchOrganizationInsightsMaxResults", + "traits": { + "smithy.api#documentation": "

      The maximum number of results to return with a single call.\n\tTo retrieve the remaining results, make another call with the returned nextToken value.

      " + } + }, + "NextToken": { + "target": "com.amazonaws.devopsguru#UuidNextToken", + "traits": { + "smithy.api#documentation": "

      The pagination token to use to retrieve \n the next page of results for this operation. If this value is null, it retrieves the first page.

      " + } + }, + "Type": { + "target": "com.amazonaws.devopsguru#InsightType", + "traits": { + "smithy.api#documentation": "

      The type of insights you are searching for (REACTIVE or\n\t\t\t\tPROACTIVE).

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.devopsguru#SearchOrganizationInsightsResponse": { + "type": "structure", + "members": { + "ProactiveInsights": { + "target": "com.amazonaws.devopsguru#ProactiveInsights", + "traits": { + "smithy.api#documentation": "

      An integer that specifies the number of open proactive insights in your Amazon Web Services\n\t\t\taccount.

      " } }, "ReactiveInsights": { "target": "com.amazonaws.devopsguru#ReactiveInsights", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe returned reactive insights.\n\t\t

      " + "smithy.api#documentation": "

      An integer that specifies the number of open reactive insights in your Amazon Web Services\n\t\t\taccount.

      " } }, "NextToken": { @@ -3449,12 +4316,12 @@ "ServiceNames": { "target": "com.amazonaws.devopsguru#ServiceNames", "traits": { - "smithy.api#documentation": "

      An array of strings that each specifies the name of an AWS service.

      " + "smithy.api#documentation": "

      An array of strings that each specifies the name of an Amazon Web Services service.

      " } } }, "traits": { - "smithy.api#documentation": "

      A collection of the names of AWS services.

      " + "smithy.api#documentation": "

      A collection of the names of Amazon Web Services services.

      " } }, "com.amazonaws.devopsguru#ServiceHealth": { @@ -3463,18 +4330,18 @@ "ServiceName": { "target": "com.amazonaws.devopsguru#ServiceName", "traits": { - "smithy.api#documentation": "

      The name of the AWS service.

      " + "smithy.api#documentation": "

      The name of the Amazon Web Services service.

      " } }, "Insight": { "target": "com.amazonaws.devopsguru#ServiceInsightHealth", "traits": { - "smithy.api#documentation": "

      Represents the health of an AWS service. This is a ServiceInsightHealth that \n\t\tcontains the number of open proactive and reactive insights for this service.

      " + "smithy.api#documentation": "

      Represents the health of an Amazon Web Services service. This is a ServiceInsightHealth\n\t\t\tthat contains the number of open proactive and reactive insights for this\n\t\t\tservice.

      " } } }, "traits": { - "smithy.api#documentation": "

      Represents the health of an AWS service.

      " + "smithy.api#documentation": "

      Represents the health of an Amazon Web Services service.

      " } }, "com.amazonaws.devopsguru#ServiceHealths": { @@ -3489,18 +4356,18 @@ "OpenProactiveInsights": { "target": "com.amazonaws.devopsguru#NumOpenProactiveInsights", "traits": { - "smithy.api#documentation": "

      The number of open proactive insights in the AWS service

      " + "smithy.api#documentation": "

      The number of open proactive insights in the Amazon Web Services service

      " } }, "OpenReactiveInsights": { "target": "com.amazonaws.devopsguru#NumOpenReactiveInsights", "traits": { - "smithy.api#documentation": "

      The number of open reactive insights in the AWS service

      " + "smithy.api#documentation": "

      The number of open reactive insights in the Amazon Web Services service

      " } } }, "traits": { - "smithy.api#documentation": "

      Contains the number of open proactive and reactive insights in an analyzed AWS service.

      " + "smithy.api#documentation": "

      Contains the number of open proactive and reactive insights in an analyzed Amazon Web Services\n\t\t\tservice.

      " } }, "com.amazonaws.devopsguru#ServiceIntegrationConfig": { @@ -3509,12 +4376,12 @@ "OpsCenter": { "target": "com.amazonaws.devopsguru#OpsCenterIntegration", "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about whether DevOps Guru is configured to create an OpsItem in AWS Systems Manager OpsCenter for each created insight. \n\t\t

      " + "smithy.api#documentation": "

      Information about whether DevOps Guru is configured to create an OpsItem in Amazon Web Services Systems Manager\n\t\t\tOpsCenter for each created insight.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about the integration of DevOps Guru with another AWS service, such as AWS Systems Manager.\n\t\t

      " + "smithy.api#documentation": "

      Information about the integration of DevOps Guru with another Amazon Web Services service, such as\n\t\t\tAmazon Web Services Systems Manager.

      " } }, "com.amazonaws.devopsguru#ServiceName": { @@ -3649,13 +4516,13 @@ "Type": { "target": "com.amazonaws.devopsguru#ResourceType", "traits": { - "smithy.api#documentation": "

      The type of the AWS resource.

      " + "smithy.api#documentation": "

      The type of the Amazon Web Services resource.

      " } }, "State": { "target": "com.amazonaws.devopsguru#CostEstimationServiceResourceState", "traits": { - "smithy.api#documentation": "

      The state of the resource. The resource is ACTIVE if it produces metrics, \n\t\t\tevents, or logs within an hour, otherwise it is INACTIVE. You pay for \n\t\t\tthe number of active AWS resource hours analyzed for each resource. Inactive resources are \n\t\t\tnot charged.\n\t\t

      " + "smithy.api#documentation": "

      The state of the resource. The resource is ACTIVE if it produces metrics,\n\t\t\tevents, or logs within an hour, otherwise it is INACTIVE. You pay for the\n\t\t\tnumber of active Amazon Web Services resource hours analyzed for each resource. Inactive resources are\n\t\t\tnot charged.

      " } }, "Count": { @@ -3667,18 +4534,18 @@ "UnitCost": { "target": "com.amazonaws.devopsguru#Cost", "traits": { - "smithy.api#documentation": "

      The price per hour to analyze the resources in the service. \n\t\t\tFor more information, \n\t\t\tsee Estimate your \n\t\t\tAmazon DevOps Guru costs and \n\t\t\tAmazon DevOps Guru pricing.

      " + "smithy.api#documentation": "

      The price per hour to analyze the resources in the service.\n\t\t\tFor more information, \n\t\t\tsee Estimate your \n\t\t\tAmazon DevOps Guru costs and \n\t\t\tAmazon DevOps Guru pricing.

      " } }, "Cost": { "target": "com.amazonaws.devopsguru#Cost", "traits": { - "smithy.api#documentation": "

      The total estimated monthly cost to analyze the active resources for this resource.

      " + "smithy.api#documentation": "

      The total estimated monthly cost to analyze the active resources for this\n\t\t\tresource.

      " } } }, "traits": { - "smithy.api#documentation": "

      An object that contains information about the estimated monthly cost to \n\t\t\tanalyze an AWS resource. For more information, \n\t\t\tsee Estimate your \n\t\t\tAmazon DevOps Guru costs and \n\t\t\tAmazon DevOps Guru pricing.

      " + "smithy.api#documentation": "

      An object that contains information about the estimated monthly cost to analyze an\n\t\t\tAmazon Web Services resource. For more information, \n\t\t\tsee Estimate your \n\t\t\tAmazon DevOps Guru costs and \n\t\t\tAmazon DevOps Guru pricing.

      " } }, "com.amazonaws.devopsguru#ServiceResourceCosts": { @@ -3698,7 +4565,7 @@ } }, "traits": { - "smithy.api#documentation": "

      Contains the Amazon Resource Name (ARN) of an Amazon Simple Notification Service topic.

      \n\t\t\n\t\t

      If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission \n\t\t\t\tto it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. \n\t\t\t\tFor more information, see Permissions \n\t\t\t\tfor cross account Amazon SNS topics.

      \n\t\t\t\t

      If you use an Amazon SNS topic that is encrypted by an AWS Key Management Service customer-managed key (CMK), then you must add permissions \n\t\t\t\tto the CMK. For more information, see Permissions for \n\t\t\t\tAWS KMS–encrypted Amazon SNS topics.

      " + "smithy.api#documentation": "

      Contains the Amazon Resource Name (ARN) of an Amazon Simple Notification Service topic.

      \n

      If you use an Amazon SNS topic in another account, you must attach a policy to it that grants DevOps Guru permission \n\t\t\t\tto it notifications. DevOps Guru adds the required policy on your behalf to send notifications using Amazon SNS in your account. \n\t\t\t\tFor more information, see Permissions \n\t\t\t\tfor cross account Amazon SNS topics.

      \n\t\t\t\t

      If you use an Amazon SNS topic that is encrypted by an Amazon Web Services Key Management Service customer-managed key (CMK), then you must add permissions \n\t\t\t\tto the CMK. For more information, see Permissions for \n\t\t\t\tAmazon Web Services KMS–encrypted Amazon SNS topics.

      " } }, "com.amazonaws.devopsguru#SsmOpsItemId": { @@ -3756,7 +4623,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Starts the creation of an estimate of the monthly cost to analyze your AWS resources.

      ", + "smithy.api#documentation": "

      Starts the creation of an estimate of the monthly cost to analyze your Amazon Web Services\n\t\t\tresources.

      ", "smithy.api#http": { "method": "PUT", "uri": "/cost-estimation", @@ -3770,7 +4637,7 @@ "ResourceCollection": { "target": "com.amazonaws.devopsguru#CostEstimationResourceCollectionFilter", "traits": { - "smithy.api#documentation": "

      The collection of AWS resources used to create a monthly DevOps Guru cost estimate.

      ", + "smithy.api#documentation": "

      The collection of Amazon Web Services resources used to create a monthly DevOps Guru cost estimate.

      ", "smithy.api#required": {} } }, @@ -3793,18 +4660,18 @@ "FromTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe start time of the time range.\n\t\t

      " + "smithy.api#documentation": "

      The start time of the time range.

      " } }, "ToTime": { "target": "com.amazonaws.devopsguru#Timestamp", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe end time of the time range.\n\t\t

      " + "smithy.api#documentation": "

      The end time of the time range.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tA time range used to specify when the behavior of an insight or anomaly started. \n\t\t

      " + "smithy.api#documentation": "

      A time range used to specify when the behavior of an insight or anomaly started.\n\t\t

      " } }, "com.amazonaws.devopsguru#ThrottlingException": { @@ -3819,19 +4686,19 @@ "QuotaCode": { "target": "com.amazonaws.devopsguru#ErrorQuotaCodeString", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe code of the quota that was exceeded, causing the throttling exception.\n\t\t

      " + "smithy.api#documentation": "

      The code of the quota that was exceeded, causing the throttling exception.

      " } }, "ServiceCode": { "target": "com.amazonaws.devopsguru#ErrorServiceCodeString", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe code of the service that caused the throttling exception.\n\t\t

      " + "smithy.api#documentation": "

      The code of the service that caused the throttling exception.

      " } }, "RetryAfterSeconds": { "target": "com.amazonaws.devopsguru#RetryAfterSeconds", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe number of seconds after which the action that caused the throttling \n\t\t\texception can be retried.\n\t\t

      ", + "smithy.api#documentation": "

      The number of seconds after which the action that caused the throttling exception can\n\t\t\tbe retried.

      ", "smithy.api#httpHeader": "Retry-After" } } @@ -3845,6 +4712,32 @@ "com.amazonaws.devopsguru#Timestamp": { "type": "timestamp" }, + "com.amazonaws.devopsguru#TimestampMetricValuePair": { + "type": "structure", + "members": { + "Timestamp": { + "target": "com.amazonaws.devopsguru#Timestamp", + "traits": { + "smithy.api#documentation": "

      A Timestamp that specifies the time the event occurred.

      " + } + }, + "MetricValue": { + "target": "com.amazonaws.devopsguru#MetricValue", + "traits": { + "smithy.api#documentation": "

      Value of the anomalous metric data point at respective Timestamp.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A pair that contains metric values at the respective timestamp.

      " + } + }, + "com.amazonaws.devopsguru#TimestampMetricValuePairList": { + "type": "list", + "member": { + "target": "com.amazonaws.devopsguru#TimestampMetricValuePair" + } + }, "com.amazonaws.devopsguru#TopicArn": { "type": "string", "traits": { @@ -3861,12 +4754,12 @@ "StackNames": { "target": "com.amazonaws.devopsguru#UpdateStackNames", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn array of the names of the AWS CloudFormation stacks to update. You can specify up to 500 AWS CloudFormation stacks.\n\t\t

      " + "smithy.api#documentation": "

      An array of the names of the Amazon Web Services CloudFormation stacks to update. You can specify up to 500 Amazon Web Services CloudFormation stacks.\n\t\t

      " } } }, "traits": { - "smithy.api#documentation": "

      Contains the names of AWS CloudFormation stacks used to update a collection of stacks. You can specify up to 500 AWS CloudFormation stacks.

      " + "smithy.api#documentation": "

      Contains the names of Amazon Web Services CloudFormation stacks used to update a collection of stacks.\n\t\t\tYou can specify up to 500 Amazon Web Services CloudFormation stacks.

      " } }, "com.amazonaws.devopsguru#UpdateResourceCollection": { @@ -3895,7 +4788,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Updates the collection of resources that DevOps Guru analyzes.\n\t\t\tThe one type of AWS resource collection supported is AWS CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the AWS resources that are defined in the stacks. You can specify up to 500 AWS CloudFormation stacks. This method also creates the IAM role required for you\n\t\t\tto use DevOps Guru.

      ", + "smithy.api#documentation": "

      Updates the collection of resources that DevOps Guru analyzes.\n\t\t\tThe one type of Amazon Web Services resource collection supported is Amazon Web Services CloudFormation stacks. DevOps Guru can be configured to analyze \n \tonly the Amazon Web Services resources that are defined in the stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks. This method also creates the IAM role required for\n\t\t\tyou to use DevOps Guru.

      ", "smithy.api#http": { "method": "PUT", "uri": "/resource-collections", @@ -3924,12 +4817,12 @@ "CloudFormation": { "target": "com.amazonaws.devopsguru#UpdateCloudFormationCollectionFilter", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn collection of AWS CloudFormation stacks. You can specify up to 500 AWS CloudFormation stacks.\n\t\t

      " + "smithy.api#documentation": "

      An collection of Amazon Web Services CloudFormation stacks. You can specify up to 500 Amazon Web Services CloudFormation stacks.

      " } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tContains information used to update a collection of AWS resources.\n\t\t

      " + "smithy.api#documentation": "

      Contains information used to update a collection of Amazon Web Services resources.

      " } }, "com.amazonaws.devopsguru#UpdateResourceCollectionRequest": { @@ -3938,7 +4831,7 @@ "Action": { "target": "com.amazonaws.devopsguru#UpdateResourceCollectionAction", "traits": { - "smithy.api#documentation": "

      \n\t\t\tSpecifies if the resource collection in the request is added or deleted to the resource collection. \n\t\t

      ", + "smithy.api#documentation": "

      Specifies if the resource collection in the request is added or deleted to the\n\t\t\tresource collection.

      ", "smithy.api#required": {} } }, @@ -3980,7 +4873,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n\t\t\tEnables or disables integration with a service that can be integrated with DevOps Guru. The one service that can be integrated with\n\t\t\tDevOps Guru is AWS Systems Manager, which can be used to create an OpsItem for each generated insight.\n\t\t

      ", + "smithy.api#documentation": "

      Enables or disables integration with a service that can be integrated with DevOps Guru. The\n\t\t\tone service that can be integrated with DevOps Guru is Amazon Web Services Systems Manager, which can be used to create\n\t\t\tan OpsItem for each generated insight.

      ", "smithy.api#http": { "method": "PUT", "uri": "/service-integrations", @@ -3996,7 +4889,7 @@ } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tInformation about updating the integration status of an AWS service, such as AWS Systems Manager, with DevOps Guru. \n\t\t

      " + "smithy.api#documentation": "

      Information about updating the integration status of an Amazon Web Services service, such as\n\t\t\tAmazon Web Services Systems Manager, with DevOps Guru.

      " } }, "com.amazonaws.devopsguru#UpdateServiceIntegrationRequest": { @@ -4005,7 +4898,7 @@ "ServiceIntegration": { "target": "com.amazonaws.devopsguru#UpdateServiceIntegrationConfig", "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn IntegratedServiceConfig object used to specify the integrated service you want to update, and whether you \n\t\t\twant to update it to enabled or disabled.\n\t\t

      ", + "smithy.api#documentation": "

      An IntegratedServiceConfig object used to specify the integrated service\n\t\t\tyou want to update, and whether you want to update it to enabled or disabled.

      ", "smithy.api#required": {} } } @@ -4043,14 +4936,14 @@ "Message": { "target": "com.amazonaws.devopsguru#ErrorMessageString", "traits": { - "smithy.api#documentation": "

      \n\t\t\tA message that describes the validation exception.\n\t\t

      ", + "smithy.api#documentation": "

      A message that describes the validation exception.

      ", "smithy.api#required": {} } }, "Reason": { "target": "com.amazonaws.devopsguru#ValidationExceptionReason", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe reason the validation exception was thrown.\n\t\t

      " + "smithy.api#documentation": "

      The reason the validation exception was thrown.

      " } }, "Fields": { @@ -4058,7 +4951,7 @@ } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tContains information about data passed in to a field during a request that is not valid. \n\t\t

      ", + "smithy.api#documentation": "

      Contains information about data passed in to a field during a request that is not\n\t\t\tvalid.

      ", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -4069,20 +4962,20 @@ "Name": { "target": "com.amazonaws.devopsguru#ErrorNameString", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe name of the field.\n\t\t

      ", + "smithy.api#documentation": "

      The name of the field.

      ", "smithy.api#required": {} } }, "Message": { "target": "com.amazonaws.devopsguru#ErrorMessageString", "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe message associated with the validation exception with information to help \n\t\t\tdetermine its cause.\n\t\t

      ", + "smithy.api#documentation": "

      The message associated with the validation exception with information to help\n\t\t\tdetermine its cause.

      ", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tThe field associated with the validation exception.\n\t\t

      " + "smithy.api#documentation": "

      The field associated with the validation exception.

      " } }, "com.amazonaws.devopsguru#ValidationExceptionFields": { @@ -4091,7 +4984,7 @@ "target": "com.amazonaws.devopsguru#ValidationExceptionField" }, "traits": { - "smithy.api#documentation": "

      \n\t\t\tAn array of fields that are associated with the validation exception.\n\t\t

      " + "smithy.api#documentation": "

      An array of fields that are associated with the validation exception.

      " } }, "com.amazonaws.devopsguru#ValidationExceptionReason": { diff --git a/codegen/sdk-codegen/aws-models/drs.json b/codegen/sdk-codegen/aws-models/drs.json new file mode 100644 index 000000000000..d1a4fc2ef2f5 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/drs.json @@ -0,0 +1,5229 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.drs#ARN": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:.{16,2044}$" + } + }, + "com.amazonaws.drs#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "code": { + "target": "com.amazonaws.drs#LargeBoundedString" + } + }, + "traits": { + "smithy.api#documentation": "

      TYou do not have sufficient access to perform this action.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.drs#AccountID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 12 + }, + "smithy.api#pattern": "[0-9]{12,}" + } + }, + "com.amazonaws.drs#AccountResource": { + "type": "resource", + "identifiers": { + "accountID": { + "target": "com.amazonaws.drs#AccountID" + } + }, + "traits": { + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.drs#BoundedString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.drs#CPU": { + "type": "structure", + "members": { + "cores": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The number of CPU cores.

      " + } + }, + "modelName": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The model name of the CPU.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Information about a server's CPU.

      " + } + }, + "com.amazonaws.drs#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "code": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "resourceId": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      The ID of the resource.

      " + } + }, + "resourceType": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      The type of the resource.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      The request could not be completed due to a conflict with the current state of the target resource.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.drs#Cpus": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#CPU" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.drs#CreateReplicationConfigurationTemplate": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#CreateReplicationConfigurationTemplateRequest" + }, + "output": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplate" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Creates a new ReplicationConfigurationTemplate.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/CreateReplicationConfigurationTemplate", + "code": 201 + } + } + }, + "com.amazonaws.drs#CreateReplicationConfigurationTemplateRequest": { + "type": "structure", + "members": { + "stagingAreaSubnetId": { + "target": "com.amazonaws.drs#SubnetID", + "traits": { + "smithy.api#documentation": "

      The subnet to be used by the replication staging area.

      ", + "smithy.api#required": {} + } + }, + "associateDefaultSecurityGroup": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration Template.

      ", + "smithy.api#required": {} + } + }, + "replicationServersSecurityGroupsIDs": { + "target": "com.amazonaws.drs#ReplicationServersSecurityGroupsIDs", + "traits": { + "smithy.api#documentation": "

      The security group IDs that will be used by the replication server.

      ", + "smithy.api#required": {} + } + }, + "replicationServerInstanceType": { + "target": "com.amazonaws.drs#EC2InstanceType", + "traits": { + "smithy.api#documentation": "

      The instance type to be used for the replication server.

      ", + "smithy.api#required": {} + } + }, + "useDedicatedReplicationServer": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to use a dedicated Replication Server in the replication staging area.

      ", + "smithy.api#required": {} + } + }, + "defaultLargeStagingDiskType": { + "target": "com.amazonaws.drs#ReplicationConfigurationDefaultLargeStagingDiskType", + "traits": { + "smithy.api#documentation": "

      The Staging Disk EBS volume type to be used during replication.

      ", + "smithy.api#required": {} + } + }, + "ebsEncryption": { + "target": "com.amazonaws.drs#ReplicationConfigurationEbsEncryption", + "traits": { + "smithy.api#documentation": "

      The type of EBS encryption to be used during replication.

      ", + "smithy.api#required": {} + } + }, + "ebsEncryptionKeyArn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The ARN of the EBS encryption key to be used during replication.

      " + } + }, + "bandwidthThrottling": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

      ", + "smithy.api#required": {} + } + }, + "dataPlaneRouting": { + "target": "com.amazonaws.drs#ReplicationConfigurationDataPlaneRouting", + "traits": { + "smithy.api#documentation": "

      The data plane routing mechanism that will be used for replication.

      ", + "smithy.api#required": {} + } + }, + "createPublicIP": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to create a Public IP for the Recovery Instance by default.

      ", + "smithy.api#required": {} + } + }, + "stagingAreaTags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

      ", + "smithy.api#required": {} + } + }, + "pitPolicy": { + "target": "com.amazonaws.drs#PITPolicy", + "traits": { + "smithy.api#documentation": "

      The Point in time (PIT) policy to manage snapshots taken during replication.

      ", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      A set of tags to be associated with the Replication Configuration Template resource.

      " + } + } + } + }, + "com.amazonaws.drs#DataReplicationError": { + "type": "structure", + "members": { + "error": { + "target": "com.amazonaws.drs#DataReplicationErrorString", + "traits": { + "smithy.api#documentation": "

      Error in data replication.

      " + } + }, + "rawError": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      Error in data replication.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Error in data replication.

      " + } + }, + "com.amazonaws.drs#DataReplicationErrorString": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AGENT_NOT_SEEN", + "name": "AGENT_NOT_SEEN" + }, + { + "value": "SNAPSHOTS_FAILURE", + "name": "SNAPSHOTS_FAILURE" + }, + { + "value": "NOT_CONVERGING", + "name": "NOT_CONVERGING" + }, + { + "value": "UNSTABLE_NETWORK", + "name": "UNSTABLE_NETWORK" + }, + { + "value": "FAILED_TO_CREATE_SECURITY_GROUP", + "name": "FAILED_TO_CREATE_SECURITY_GROUP" + }, + { + "value": "FAILED_TO_LAUNCH_REPLICATION_SERVER", + "name": "FAILED_TO_LAUNCH_REPLICATION_SERVER" + }, + { + "value": "FAILED_TO_BOOT_REPLICATION_SERVER", + "name": "FAILED_TO_BOOT_REPLICATION_SERVER" + }, + { + "value": "FAILED_TO_AUTHENTICATE_WITH_SERVICE", + "name": "FAILED_TO_AUTHENTICATE_WITH_SERVICE" + }, + { + "value": "FAILED_TO_DOWNLOAD_REPLICATION_SOFTWARE", + "name": "FAILED_TO_DOWNLOAD_REPLICATION_SOFTWARE" + }, + { + "value": "FAILED_TO_CREATE_STAGING_DISKS", + "name": "FAILED_TO_CREATE_STAGING_DISKS" + }, + { + "value": "FAILED_TO_ATTACH_STAGING_DISKS", + "name": "FAILED_TO_ATTACH_STAGING_DISKS" + }, + { + "value": "FAILED_TO_PAIR_REPLICATION_SERVER_WITH_AGENT", + "name": "FAILED_TO_PAIR_REPLICATION_SERVER_WITH_AGENT" + }, + { + "value": "FAILED_TO_CONNECT_AGENT_TO_REPLICATION_SERVER", + "name": "FAILED_TO_CONNECT_AGENT_TO_REPLICATION_SERVER" + }, + { + "value": "FAILED_TO_START_DATA_TRANSFER", + "name": "FAILED_TO_START_DATA_TRANSFER" + } + ] + } + }, + "com.amazonaws.drs#DataReplicationInfo": { + "type": "structure", + "members": { + "lagDuration": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      Data replication lag duration.

      " + } + }, + "etaDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      An estimate of when the data replication will be completed.

      " + } + }, + "replicatedDisks": { + "target": "com.amazonaws.drs#DataReplicationInfoReplicatedDisks", + "traits": { + "smithy.api#documentation": "

      The disks that should be replicated.

      " + } + }, + "dataReplicationState": { + "target": "com.amazonaws.drs#DataReplicationState", + "traits": { + "smithy.api#documentation": "

      The state of the data replication.

      " + } + }, + "dataReplicationInitiation": { + "target": "com.amazonaws.drs#DataReplicationInitiation", + "traits": { + "smithy.api#documentation": "

      Information about whether the data replication has been initiated.

      " + } + }, + "dataReplicationError": { + "target": "com.amazonaws.drs#DataReplicationError", + "traits": { + "smithy.api#documentation": "

      Error in data replication.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Information about Data Replication

      " + } + }, + "com.amazonaws.drs#DataReplicationInfoReplicatedDisk": { + "type": "structure", + "members": { + "deviceName": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The name of the device.

      " + } + }, + "totalStorageBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The total amount of data to be replicated in bytes.

      " + } + }, + "replicatedStorageBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The amount of data replicated so far in bytes.

      " + } + }, + "rescannedStorageBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The amount of data to be rescanned in bytes.

      " + } + }, + "backloggedStorageBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The size of the replication backlog in bytes.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A disk that should be replicated.

      " + } + }, + "com.amazonaws.drs#DataReplicationInfoReplicatedDisks": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#DataReplicationInfoReplicatedDisk" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 60 + } + } + }, + "com.amazonaws.drs#DataReplicationInitiation": { + "type": "structure", + "members": { + "startDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time of the current attempt to initiate data replication.

      " + } + }, + "nextAttemptDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time of the next attempt to initiate data replication.

      " + } + }, + "steps": { + "target": "com.amazonaws.drs#DataReplicationInitiationSteps", + "traits": { + "smithy.api#documentation": "

      The steps of the current attempt to initiate data replication.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Data replication initiation.

      " + } + }, + "com.amazonaws.drs#DataReplicationInitiationStep": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.drs#DataReplicationInitiationStepName", + "traits": { + "smithy.api#documentation": "

      The name of the step.

      " + } + }, + "status": { + "target": "com.amazonaws.drs#DataReplicationInitiationStepStatus", + "traits": { + "smithy.api#documentation": "

      The status of the step.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Data replication initiation step.

      " + } + }, + "com.amazonaws.drs#DataReplicationInitiationStepName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "WAIT", + "name": "WAIT" + }, + { + "value": "CREATE_SECURITY_GROUP", + "name": "CREATE_SECURITY_GROUP" + }, + { + "value": "LAUNCH_REPLICATION_SERVER", + "name": "LAUNCH_REPLICATION_SERVER" + }, + { + "value": "BOOT_REPLICATION_SERVER", + "name": "BOOT_REPLICATION_SERVER" + }, + { + "value": "AUTHENTICATE_WITH_SERVICE", + "name": "AUTHENTICATE_WITH_SERVICE" + }, + { + "value": "DOWNLOAD_REPLICATION_SOFTWARE", + "name": "DOWNLOAD_REPLICATION_SOFTWARE" + }, + { + "value": "CREATE_STAGING_DISKS", + "name": "CREATE_STAGING_DISKS" + }, + { + "value": "ATTACH_STAGING_DISKS", + "name": "ATTACH_STAGING_DISKS" + }, + { + "value": "PAIR_REPLICATION_SERVER_WITH_AGENT", + "name": "PAIR_REPLICATION_SERVER_WITH_AGENT" + }, + { + "value": "CONNECT_AGENT_TO_REPLICATION_SERVER", + "name": "CONNECT_AGENT_TO_REPLICATION_SERVER" + }, + { + "value": "START_DATA_TRANSFER", + "name": "START_DATA_TRANSFER" + } + ] + } + }, + "com.amazonaws.drs#DataReplicationInitiationStepStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NOT_STARTED", + "name": "NOT_STARTED" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "SKIPPED", + "name": "SKIPPED" + } + ] + } + }, + "com.amazonaws.drs#DataReplicationInitiationSteps": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#DataReplicationInitiationStep" + } + }, + "com.amazonaws.drs#DataReplicationState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "STOPPED", + "name": "STOPPED" + }, + { + "value": "INITIATING", + "name": "INITIATING" + }, + { + "value": "INITIAL_SYNC", + "name": "INITIAL_SYNC" + }, + { + "value": "BACKLOG", + "name": "BACKLOG" + }, + { + "value": "CREATING_SNAPSHOT", + "name": "CREATING_SNAPSHOT" + }, + { + "value": "CONTINUOUS", + "name": "CONTINUOUS" + }, + { + "value": "PAUSED", + "name": "PAUSED" + }, + { + "value": "RESCAN", + "name": "RESCAN" + }, + { + "value": "STALLED", + "name": "STALLED" + }, + { + "value": "DISCONNECTED", + "name": "DISCONNECTED" + } + ] + } + }, + "com.amazonaws.drs#DeleteJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DeleteJobRequest" + }, + "output": { + "target": "com.amazonaws.drs#DeleteJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Deletes a single Job by ID.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DeleteJob", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.drs#DeleteJobRequest": { + "type": "structure", + "members": { + "jobID": { + "target": "com.amazonaws.drs#JobID", + "traits": { + "smithy.api#documentation": "

      The ID of the Job to be deleted.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#DeleteJobResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.drs#DeleteRecoveryInstance": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DeleteRecoveryInstanceRequest" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Deletes a single Recovery Instance by ID. This deletes the Recovery Instance resource from Elastic Disaster Recovery. The Recovery Instance must be disconnected first in order to delete it.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DeleteRecoveryInstance", + "code": 200 + } + } + }, + "com.amazonaws.drs#DeleteRecoveryInstanceRequest": { + "type": "structure", + "members": { + "recoveryInstanceID": { + "target": "com.amazonaws.drs#RecoveryInstanceID", + "traits": { + "smithy.api#documentation": "

      RThe ID of the Recovery Instance to be deleted.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#DeleteReplicationConfigurationTemplate": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DeleteReplicationConfigurationTemplateRequest" + }, + "output": { + "target": "com.amazonaws.drs#DeleteReplicationConfigurationTemplateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Deletes a single Replication Configuration Template by ID

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DeleteReplicationConfigurationTemplate", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.drs#DeleteReplicationConfigurationTemplateRequest": { + "type": "structure", + "members": { + "replicationConfigurationTemplateID": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplateID", + "traits": { + "smithy.api#documentation": "

      The ID of the Replication Configuration Template to be deleted.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#DeleteReplicationConfigurationTemplateResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.drs#DeleteSourceServer": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DeleteSourceServerRequest" + }, + "output": { + "target": "com.amazonaws.drs#DeleteSourceServerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Deletes a single Source Server by ID. The Source Server must be disconnected first.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DeleteSourceServer", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.drs#DeleteSourceServerRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server to be deleted.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#DeleteSourceServerResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.drs#DescribeJobLogItems": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DescribeJobLogItemsRequest" + }, + "output": { + "target": "com.amazonaws.drs#DescribeJobLogItemsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves a detailed Job log with pagination.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DescribeJobLogItems", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "items", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#DescribeJobLogItemsRequest": { + "type": "structure", + "members": { + "jobID": { + "target": "com.amazonaws.drs#JobID", + "traits": { + "smithy.api#documentation": "

      The ID of the Job for which Job log items will be retrieved.

      ", + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.drs#StrictlyPositiveInteger", + "traits": { + "smithy.api#documentation": "

      Maximum number of Job log items to retrieve.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Job log items to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeJobLogItemsResponse": { + "type": "structure", + "members": { + "items": { + "target": "com.amazonaws.drs#JobLogs", + "traits": { + "smithy.api#documentation": "

      An array of Job log items.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Job log items to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DescribeJobsRequest" + }, + "output": { + "target": "com.amazonaws.drs#DescribeJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Returns a list of Jobs. Use the JobsID and fromDate and toDate filters to limit which jobs are returned. The response is sorted by creationDataTime - latest date first. Jobs are created by the StartRecovery, TerminateRecoveryInstances and StartFailbackLaunch APIs. Jobs are also created by DiagnosticLaunch and TerminateDiagnosticInstances, which are APIs available only to *Support* and only used in response to relevant support tickets.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DescribeJobs", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "items", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#DescribeJobsRequest": { + "type": "structure", + "members": { + "filters": { + "target": "com.amazonaws.drs#DescribeJobsRequestFilters", + "traits": { + "smithy.api#documentation": "

      A set of filters by which to return Jobs.

      ", + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.drs#StrictlyPositiveInteger", + "traits": { + "smithy.api#documentation": "

      Maximum number of Jobs to retrieve.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Job to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeJobsRequestFilters": { + "type": "structure", + "members": { + "jobIDs": { + "target": "com.amazonaws.drs#DescribeJobsRequestFiltersJobIDs", + "traits": { + "smithy.api#documentation": "

      An array of Job IDs that should be returned. An empty array means all jobs.

      " + } + }, + "fromDate": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The start date in a date range query.

      " + } + }, + "toDate": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The end date in a date range query.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A set of filters by which to return Jobs.

      " + } + }, + "com.amazonaws.drs#DescribeJobsRequestFiltersJobIDs": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#JobID" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + } + } + }, + "com.amazonaws.drs#DescribeJobsResponse": { + "type": "structure", + "members": { + "items": { + "target": "com.amazonaws.drs#JobsList", + "traits": { + "smithy.api#documentation": "

      An array of Jobs.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Job to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeRecoveryInstances": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DescribeRecoveryInstancesRequest" + }, + "output": { + "target": "com.amazonaws.drs#DescribeRecoveryInstancesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "aws.iam#requiredActions": ["ec2:DescribeInstances"], + "smithy.api#documentation": "

      Lists all Recovery Instances or multiple Recovery Instances by ID.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DescribeRecoveryInstances", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "items", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#DescribeRecoveryInstancesItems": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#RecoveryInstance" + } + }, + "com.amazonaws.drs#DescribeRecoveryInstancesRequest": { + "type": "structure", + "members": { + "filters": { + "target": "com.amazonaws.drs#DescribeRecoveryInstancesRequestFilters", + "traits": { + "smithy.api#documentation": "

      A set of filters by which to return Recovery Instances.

      ", + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.drs#StrictlyPositiveInteger", + "traits": { + "smithy.api#documentation": "

      Maximum number of Recovery Instances to retrieve.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Recovery Instance to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeRecoveryInstancesRequestFilters": { + "type": "structure", + "members": { + "recoveryInstanceIDs": { + "target": "com.amazonaws.drs#RecoveryInstanceIDs", + "traits": { + "smithy.api#documentation": "

      An array of Recovery Instance IDs that should be returned. An empty array means all Recovery Instances.

      " + } + }, + "sourceServerIDs": { + "target": "com.amazonaws.drs#SourceServerIDs", + "traits": { + "smithy.api#documentation": "

      An array of Source Server IDs for which associated Recovery Instances should be returned.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A set of filters by which to return Recovery Instances.

      " + } + }, + "com.amazonaws.drs#DescribeRecoveryInstancesResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Recovery Instance to retrieve.

      " + } + }, + "items": { + "target": "com.amazonaws.drs#DescribeRecoveryInstancesItems", + "traits": { + "smithy.api#documentation": "

      An array of Recovery Instances.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeRecoverySnapshots": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DescribeRecoverySnapshotsRequest" + }, + "output": { + "target": "com.amazonaws.drs#DescribeRecoverySnapshotsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Lists all Recovery Snapshots for a single Source Server.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DescribeRecoverySnapshots", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "items", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#DescribeRecoverySnapshotsRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      Filter Recovery Snapshots by Source Server ID.

      ", + "smithy.api#required": {} + } + }, + "filters": { + "target": "com.amazonaws.drs#DescribeRecoverySnapshotsRequestFilters", + "traits": { + "smithy.api#documentation": "

      A set of filters by which to return Recovery Snapshots.

      " + } + }, + "order": { + "target": "com.amazonaws.drs#RecoverySnapshotsOrder", + "traits": { + "smithy.api#documentation": "

      The sorted ordering by which to return Recovery Snapshots.

      " + } + }, + "maxResults": { + "target": "com.amazonaws.drs#StrictlyPositiveInteger", + "traits": { + "smithy.api#documentation": "

      Maximum number of Recovery Snapshots to retrieve.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Recovery Snapshot to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeRecoverySnapshotsRequestFilters": { + "type": "structure", + "members": { + "fromDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The start date in a date range query.

      " + } + }, + "toDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The end date in a date range query.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A set of filters by which to return Recovery Snapshots.

      " + } + }, + "com.amazonaws.drs#DescribeRecoverySnapshotsResponse": { + "type": "structure", + "members": { + "items": { + "target": "com.amazonaws.drs#RecoverySnapshotsList", + "traits": { + "smithy.api#documentation": "

      An array of Recovery Snapshots.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Recovery Snapshot to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeReplicationConfigurationTemplates": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DescribeReplicationConfigurationTemplatesRequest" + }, + "output": { + "target": "com.amazonaws.drs#DescribeReplicationConfigurationTemplatesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Lists all ReplicationConfigurationTemplates, filtered by Source Server IDs.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DescribeReplicationConfigurationTemplates", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "items", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#DescribeReplicationConfigurationTemplatesRequest": { + "type": "structure", + "members": { + "replicationConfigurationTemplateIDs": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplateIDs", + "traits": { + "smithy.api#documentation": "

      The IDs of the Replication Configuration Templates to retrieve. An empty list means all Replication Configuration Templates.

      ", + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.drs#StrictlyPositiveInteger", + "traits": { + "smithy.api#documentation": "

      Maximum number of Replication Configuration Templates to retrieve.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Replication Configuration Template to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeReplicationConfigurationTemplatesResponse": { + "type": "structure", + "members": { + "items": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplates", + "traits": { + "smithy.api#documentation": "

      An array of Replication Configuration Templates.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Replication Configuration Template to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeSourceServers": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DescribeSourceServersRequest" + }, + "output": { + "target": "com.amazonaws.drs#DescribeSourceServersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Lists all Source Servers or multiple Source Servers filtered by ID.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DescribeSourceServers", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "items", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#DescribeSourceServersRequest": { + "type": "structure", + "members": { + "filters": { + "target": "com.amazonaws.drs#DescribeSourceServersRequestFilters", + "traits": { + "smithy.api#documentation": "

      A set of filters by which to return Source Servers.

      ", + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.drs#StrictlyPositiveInteger", + "traits": { + "smithy.api#documentation": "

      Maximum number of Source Servers to retrieve.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Source Server to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DescribeSourceServersRequestFilters": { + "type": "structure", + "members": { + "sourceServerIDs": { + "target": "com.amazonaws.drs#DescribeSourceServersRequestFiltersIDs", + "traits": { + "smithy.api#documentation": "

      An array of Source Servers IDs that should be returned. An empty array means all Source Servers.

      " + } + }, + "hardwareId": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      An ID that describes the hardware of the Source Server. This is either an EC2 instance id, a VMware uuid or a mac address.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A set of filters by which to return Source Servers.

      " + } + }, + "com.amazonaws.drs#DescribeSourceServersRequestFiltersIDs": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#SourceServerID" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.drs#DescribeSourceServersResponse": { + "type": "structure", + "members": { + "items": { + "target": "com.amazonaws.drs#SourceServersList", + "traits": { + "smithy.api#documentation": "

      An array of Source Servers.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.drs#PaginationToken", + "traits": { + "smithy.api#documentation": "

      The token of the next Source Server to retrieve.

      " + } + } + } + }, + "com.amazonaws.drs#DisconnectRecoveryInstance": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DisconnectRecoveryInstanceRequest" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Disconnect a Recovery Instance from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Recovery Instance will be terminated / deleted within 90 minutes. If the agent on the Recovery Instance has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the Recovery Instance will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DisconnectRecoveryInstance", + "code": 200 + } + } + }, + "com.amazonaws.drs#DisconnectRecoveryInstanceRequest": { + "type": "structure", + "members": { + "recoveryInstanceID": { + "target": "com.amazonaws.drs#RecoveryInstanceID", + "traits": { + "smithy.api#documentation": "

      The ID of the Recovery Instance to disconnect.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#DisconnectSourceServer": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#DisconnectSourceServerRequest" + }, + "output": { + "target": "com.amazonaws.drs#SourceServer" + }, + "errors": [ + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Disconnects a specific Source Server from Elastic Disaster Recovery. Data replication is stopped immediately. All AWS resources created by Elastic Disaster Recovery for enabling the replication of the Source Server will be terminated / deleted within 90 minutes. You cannot disconnect a Source Server if it has a Recovery Instance. If the agent on the Source Server has not been prevented from communicating with the Elastic Disaster Recovery service, then it will receive a command to uninstall itself (within approximately 10 minutes). The following properties of the SourceServer will be changed immediately: dataReplicationInfo.dataReplicationState will be set to DISCONNECTED; The totalStorageBytes property for each of dataReplicationInfo.replicatedDisks will be set to zero; dataReplicationInfo.lagDuration and dataReplicationInfo.lagDuration will be nullified.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/DisconnectSourceServer", + "code": 200 + } + } + }, + "com.amazonaws.drs#DisconnectSourceServerRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server to disconnect.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#Disk": { + "type": "structure", + "members": { + "deviceName": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The disk or device name.

      " + } + }, + "bytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The amount of storage on the disk in bytes.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      An object representing a data storage device on a server.

      " + } + }, + "com.amazonaws.drs#Disks": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#Disk" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + } + } + }, + "com.amazonaws.drs#EC2InstanceID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^i-[0-9a-fA-F]{8,}$" + } + }, + "com.amazonaws.drs#EC2InstanceState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "RUNNING", + "name": "RUNNING" + }, + { + "value": "STOPPING", + "name": "STOPPING" + }, + { + "value": "STOPPED", + "name": "STOPPED" + }, + { + "value": "SHUTTING-DOWN", + "name": "SHUTTING_DOWN" + }, + { + "value": "TERMINATED", + "name": "TERMINATED" + }, + { + "value": "NOT_FOUND", + "name": "NOT_FOUND" + } + ] + } + }, + "com.amazonaws.drs#EC2InstanceType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + } + } + }, + "com.amazonaws.drs#EbsSnapshotsList": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#ebsSnapshot" + } + }, + "com.amazonaws.drs#EbsVolumeID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 19 + }, + "smithy.api#pattern": "^vol-([0-9a-fA-F]{8}|[0-9a-fA-F]{17})$" + } + }, + "com.amazonaws.drs#ElasticDisasterRecoveryService": { + "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "drs", + "arnNamespace": "drs", + "cloudFormationName": "ElasticDisasterRecoveryService", + "cloudTrailEventSource": "drs.amazonaws.com", + "endpointPrefix": "drs" + }, + "aws.auth#sigv4": { + "name": "drs" + }, + "aws.iam#defineConditionKeys": { + "drs:EC2InstanceARN": { + "type": "String", + "documentation": "Filters access by the EC2 instance the request originated from" + } + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": ["X-Amz-Content-Sha256", "X-Amzn-Trace-Id", "Content-Type", "X-Amz-User-Agent"], + "additionalExposedHeaders": ["X-Amzn-Errortype", "X-Amzn-Requestid", "X-Amzn-Trace-Id", "X-Amz-Apigw-Id"] + }, + "smithy.api#documentation": "

      AWS Elastic Disaster Recovery Service.

      ", + "smithy.api#title": "Elastic Disaster Recovery Service" + }, + "version": "2020-02-26", + "operations": [ + { + "target": "com.amazonaws.drs#InitializeService" + }, + { + "target": "com.amazonaws.drs#ListTagsForResource" + }, + { + "target": "com.amazonaws.drs#TagResource" + }, + { + "target": "com.amazonaws.drs#UntagResource" + } + ], + "resources": [ + { + "target": "com.amazonaws.drs#AccountResource" + }, + { + "target": "com.amazonaws.drs#JobResource" + }, + { + "target": "com.amazonaws.drs#RecoveryInstanceResource" + }, + { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplateResource" + }, + { + "target": "com.amazonaws.drs#SourceServerResource" + } + ] + }, + "com.amazonaws.drs#FailbackReplicationError": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AGENT_NOT_SEEN", + "name": "AGENT_NOT_SEEN" + }, + { + "value": "FAILBACK_CLIENT_NOT_SEEN", + "name": "FAILBACK_CLIENT_NOT_SEEN" + }, + { + "value": "NOT_CONVERGING", + "name": "NOT_CONVERGING" + }, + { + "value": "UNSTABLE_NETWORK", + "name": "UNSTABLE_NETWORK" + }, + { + "value": "FAILED_TO_ESTABLISH_RECOVERY_INSTANCE_COMMUNICATION", + "name": "FAILED_TO_ESTABLISH_RECOVERY_INSTANCE_COMMUNICATION" + }, + { + "value": "FAILED_TO_DOWNLOAD_REPLICATION_SOFTWARE_TO_FAILBACK_CLIENT", + "name": "FAILED_TO_DOWNLOAD_REPLICATION_SOFTWARE_TO_FAILBACK_CLIENT" + }, + { + "value": "FAILED_TO_CONFIGURE_REPLICATION_SOFTWARE", + "name": "FAILED_TO_CONFIGURE_REPLICATION_SOFTWARE" + }, + { + "value": "FAILED_TO_PAIR_AGENT_WITH_REPLICATION_SOFTWARE", + "name": "FAILED_TO_PAIR_AGENT_WITH_REPLICATION_SOFTWARE" + }, + { + "value": "FAILED_TO_ESTABLISH_AGENT_REPLICATOR_SOFTWARE_COMMUNICATION", + "name": "FAILED_TO_ESTABLISH_AGENT_REPLICATOR_SOFTWARE_COMMUNICATION" + } + ] + } + }, + "com.amazonaws.drs#FailbackState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "FAILBACK_NOT_STARTED", + "name": "FAILBACK_NOT_STARTED" + }, + { + "value": "FAILBACK_IN_PROGRESS", + "name": "FAILBACK_IN_PROGRESS" + }, + { + "value": "FAILBACK_READY_FOR_LAUNCH", + "name": "FAILBACK_READY_FOR_LAUNCH" + }, + { + "value": "FAILBACK_COMPLETED", + "name": "FAILBACK_COMPLETED" + }, + { + "value": "FAILBACK_ERROR", + "name": "FAILBACK_ERROR" + } + ] + } + }, + "com.amazonaws.drs#GetFailbackReplicationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#GetFailbackReplicationConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.drs#GetFailbackReplicationConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Lists all Failback ReplicationConfigurations, filtered by Recovery Instance ID.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/GetFailbackReplicationConfiguration", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#GetFailbackReplicationConfigurationRequest": { + "type": "structure", + "members": { + "recoveryInstanceID": { + "target": "com.amazonaws.drs#RecoveryInstanceID", + "traits": { + "smithy.api#documentation": "

      The ID of the Recovery Instance whose failback replication configuration should be returned.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#GetFailbackReplicationConfigurationResponse": { + "type": "structure", + "members": { + "recoveryInstanceID": { + "target": "com.amazonaws.drs#RecoveryInstanceID", + "traits": { + "smithy.api#documentation": "

      The ID of the Recovery Instance.

      ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The name of the Failback Replication Configuration.

      " + } + }, + "bandwidthThrottling": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      Configure bandwidth throttling for the outbound data transfer rate of the Recovery Instance in Mbps.

      " + } + }, + "usePrivateIP": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to use Private IP for the failback replication of the Recovery Instance.

      " + } + } + } + }, + "com.amazonaws.drs#GetLaunchConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#GetLaunchConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.drs#LaunchConfiguration" + }, + "errors": [ + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Gets a LaunchConfiguration, filtered by Source Server IDs.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/GetLaunchConfiguration", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#GetLaunchConfigurationRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server that we want to retrieve a Launch Configuration for.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#GetReplicationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#GetReplicationConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.drs#ReplicationConfiguration" + }, + "errors": [ + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Gets a ReplicationConfiguration, filtered by Source Server ID.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/GetReplicationConfiguration", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#GetReplicationConfigurationRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Serve for this Replication Configuration.r

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#IPsList": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#BoundedString" + } + }, + "com.amazonaws.drs#ISO8601DatetimeString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 19, + "max": 32 + }, + "smithy.api#pattern": "^[1-9][0-9]*-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?Z$" + } + }, + "com.amazonaws.drs#IdentificationHints": { + "type": "structure", + "members": { + "fqdn": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      Fully Qualified Domain Name identification hint.

      " + } + }, + "hostname": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      Hostname identification hint.

      " + } + }, + "vmWareUuid": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      vCenter VM path identification hint.

      " + } + }, + "awsInstanceID": { + "target": "com.amazonaws.drs#EC2InstanceID", + "traits": { + "smithy.api#documentation": "

      AWS Instance ID identification hint.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Hints used to uniquely identify a machine.

      " + } + }, + "com.amazonaws.drs#InitializeService": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#InitializeServiceRequest" + }, + "output": { + "target": "com.amazonaws.drs#InitializeServiceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "iam:CreateServiceLinkedRole", + "iam:GetInstanceProfile", + "iam:CreateInstanceProfile", + "iam:AddRoleToInstanceProfile" + ], + "smithy.api#documentation": "

      Initialize Elastic Disaster Recovery.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/InitializeService", + "code": 204 + } + } + }, + "com.amazonaws.drs#InitializeServiceRequest": { + "type": "structure", + "members": {} + }, + "com.amazonaws.drs#InitializeServiceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.drs#InitiatedBy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "START_RECOVERY", + "name": "START_RECOVERY" + }, + { + "value": "START_DRILL", + "name": "START_DRILL" + }, + { + "value": "FAILBACK", + "name": "FAILBACK" + }, + { + "value": "DIAGNOSTIC", + "name": "DIAGNOSTIC" + }, + { + "value": "TERMINATE_RECOVERY_INSTANCES", + "name": "TERMINATE_RECOVERY_INSTANCES" + } + ] + } + }, + "com.amazonaws.drs#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#required": {} + } + }, + "retryAfterSeconds": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The number of seconds after which the request should be safe to retry.

      ", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "

      The request processing has failed because of an unknown error, exception or failure.

      ", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.drs#Job": { + "type": "structure", + "members": { + "jobID": { + "target": "com.amazonaws.drs#JobID", + "traits": { + "smithy.api#documentation": "

      The ID of the Job.

      ", + "smithy.api#required": {} + } + }, + "arn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The ARN of a Job.

      " + } + }, + "type": { + "target": "com.amazonaws.drs#JobType", + "traits": { + "smithy.api#documentation": "

      The type of the Job.

      " + } + }, + "initiatedBy": { + "target": "com.amazonaws.drs#InitiatedBy", + "traits": { + "smithy.api#documentation": "

      A string representing who initiated the Job.

      " + } + }, + "creationDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time of when the Job was created.

      " + } + }, + "endDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time of when the Job ended.

      " + } + }, + "status": { + "target": "com.amazonaws.drs#JobStatus", + "traits": { + "smithy.api#documentation": "

      The status of the Job.

      " + } + }, + "participatingServers": { + "target": "com.amazonaws.drs#ParticipatingServers", + "traits": { + "smithy.api#documentation": "

      A list of servers that the Job is acting upon.

      " + } + }, + "tags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      A list of tags associated with the Job.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A job is an asynchronous workflow.

      " + } + }, + "com.amazonaws.drs#JobID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 24, + "max": 24 + }, + "smithy.api#pattern": "^drsjob-[0-9a-zA-Z]{17}$" + } + }, + "com.amazonaws.drs#JobLog": { + "type": "structure", + "members": { + "logDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time the log was taken.

      " + } + }, + "event": { + "target": "com.amazonaws.drs#JobLogEvent", + "traits": { + "smithy.api#documentation": "

      The event represents the type of a log.

      " + } + }, + "eventData": { + "target": "com.amazonaws.drs#JobLogEventData", + "traits": { + "smithy.api#documentation": "

      Metadata associated with a Job log.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A log outputted by a Job.

      " + } + }, + "com.amazonaws.drs#JobLogEvent": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "JOB_START", + "name": "JOB_START" + }, + { + "value": "SERVER_SKIPPED", + "name": "SERVER_SKIPPED" + }, + { + "value": "CLEANUP_START", + "name": "CLEANUP_START" + }, + { + "value": "CLEANUP_END", + "name": "CLEANUP_END" + }, + { + "value": "CLEANUP_FAIL", + "name": "CLEANUP_FAIL" + }, + { + "value": "SNAPSHOT_START", + "name": "SNAPSHOT_START" + }, + { + "value": "SNAPSHOT_END", + "name": "SNAPSHOT_END" + }, + { + "value": "SNAPSHOT_FAIL", + "name": "SNAPSHOT_FAIL" + }, + { + "value": "USING_PREVIOUS_SNAPSHOT", + "name": "USING_PREVIOUS_SNAPSHOT" + }, + { + "value": "USING_PREVIOUS_SNAPSHOT_FAILED", + "name": "USING_PREVIOUS_SNAPSHOT_FAILED" + }, + { + "value": "CONVERSION_START", + "name": "CONVERSION_START" + }, + { + "value": "CONVERSION_END", + "name": "CONVERSION_END" + }, + { + "value": "CONVERSION_FAIL", + "name": "CONVERSION_FAIL" + }, + { + "value": "LAUNCH_START", + "name": "LAUNCH_START" + }, + { + "value": "LAUNCH_FAILED", + "name": "LAUNCH_FAILED" + }, + { + "value": "JOB_CANCEL", + "name": "JOB_CANCEL" + }, + { + "value": "JOB_END", + "name": "JOB_END" + } + ] + } + }, + "com.amazonaws.drs#JobLogEventData": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of a Source Server.

      " + } + }, + "conversionServerID": { + "target": "com.amazonaws.drs#EC2InstanceID", + "traits": { + "smithy.api#documentation": "

      The ID of a conversion server.

      " + } + }, + "targetInstanceID": { + "target": "com.amazonaws.drs#EC2InstanceID", + "traits": { + "smithy.api#documentation": "

      The ID of a Recovery Instance.

      " + } + }, + "rawError": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      A string representing a job error.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Metadata associated with a Job log.

      " + } + }, + "com.amazonaws.drs#JobLogs": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#JobLog" + } + }, + "com.amazonaws.drs#JobResource": { + "type": "resource", + "identifiers": { + "jobID": { + "target": "com.amazonaws.drs#JobID" + } + }, + "delete": { + "target": "com.amazonaws.drs#DeleteJob" + }, + "list": { + "target": "com.amazonaws.drs#DescribeJobs" + }, + "operations": [ + { + "target": "com.amazonaws.drs#DescribeJobLogItems" + } + ], + "traits": { + "aws.api#arn": { + "template": "job/{jobID}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.iam#conditionKeys": ["aws:ResourceTag"], + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.drs#JobStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "STARTED", + "name": "STARTED" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + } + ] + } + }, + "com.amazonaws.drs#JobType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "LAUNCH", + "name": "LAUNCH" + }, + { + "value": "TERMINATE", + "name": "TERMINATE" + } + ] + } + }, + "com.amazonaws.drs#JobsList": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#Job" + } + }, + "com.amazonaws.drs#LargeBoundedString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 65536 + } + } + }, + "com.amazonaws.drs#LastLaunchResult": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NOT_STARTED", + "name": "NOT_STARTED" + }, + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, + "com.amazonaws.drs#LastLaunchType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RECOVERY", + "name": "RECOVERY" + }, + { + "value": "DRILL", + "name": "DRILL" + } + ] + } + }, + "com.amazonaws.drs#LaunchConfiguration": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server for this launch configuration.

      " + } + }, + "name": { + "target": "com.amazonaws.drs#SmallBoundedString", + "traits": { + "smithy.api#documentation": "

      The name of the launch configuration.

      " + } + }, + "ec2LaunchTemplateID": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The EC2 launch template ID of this launch configuration.

      " + } + }, + "launchDisposition": { + "target": "com.amazonaws.drs#LaunchDisposition", + "traits": { + "smithy.api#documentation": "

      The state of the Recovery Instance in EC2 after the recovery operation.

      " + } + }, + "targetInstanceTypeRightSizingMethod": { + "target": "com.amazonaws.drs#TargetInstanceTypeRightSizingMethod", + "traits": { + "smithy.api#documentation": "

      Whether Elastic Disaster Recovery should try to automatically choose the instance type that best matches the OS, CPU, and RAM of your Source Server.

      " + } + }, + "copyPrivateIp": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether we should copy the Private IP of the Source Server to the Recovery Instance.

      " + } + }, + "copyTags": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether we want to copy the tags of the Source Server to the EC2 machine of the Recovery Instance.

      " + } + }, + "licensing": { + "target": "com.amazonaws.drs#Licensing", + "traits": { + "smithy.api#documentation": "

      The licensing configuration to be used for this launch configuration.

      " + } + } + } + }, + "com.amazonaws.drs#LaunchDisposition": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "STOPPED", + "name": "STOPPED" + }, + { + "value": "STARTED", + "name": "STARTED" + } + ] + } + }, + "com.amazonaws.drs#LaunchStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "LAUNCHED", + "name": "LAUNCHED" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "TERMINATED", + "name": "TERMINATED" + } + ] + } + }, + "com.amazonaws.drs#Licensing": { + "type": "structure", + "members": { + "osByol": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to enable \"Bring your own license\" or not.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Configuration of a machine's license.

      " + } + }, + "com.amazonaws.drs#LifeCycle": { + "type": "structure", + "members": { + "addedToServiceDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time of when the Source Server was added to the service.

      " + } + }, + "firstByteDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time of the first byte that was replicated from the Source Server.

      " + } + }, + "elapsedReplicationDuration": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The amount of time that the Source Server has been replicating for.

      " + } + }, + "lastSeenByServiceDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time this Source Server was last seen by the service.

      " + } + }, + "lastLaunch": { + "target": "com.amazonaws.drs#LifeCycleLastLaunch", + "traits": { + "smithy.api#documentation": "

      An object containing information regarding the last launch of the Source Server.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      An object representing the Source Server Lifecycle.

      " + } + }, + "com.amazonaws.drs#LifeCycleLastLaunch": { + "type": "structure", + "members": { + "initiated": { + "target": "com.amazonaws.drs#LifeCycleLastLaunchInitiated", + "traits": { + "smithy.api#documentation": "

      An object containing information regarding the initiation of the last launch of a Source Server.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      An object containing information regarding the last launch of a Source Server.

      " + } + }, + "com.amazonaws.drs#LifeCycleLastLaunchInitiated": { + "type": "structure", + "members": { + "apiCallDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time the last Source Server launch was initiated.

      " + } + }, + "jobID": { + "target": "com.amazonaws.drs#JobID", + "traits": { + "smithy.api#documentation": "

      The ID of the Job that was used to last launch the Source Server.

      " + } + }, + "type": { + "target": "com.amazonaws.drs#LastLaunchType", + "traits": { + "smithy.api#documentation": "

      The Job type that was used to last launch the Source Server.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      An object containing information regarding the initiation of the last launch of a Source Server.

      " + } + }, + "com.amazonaws.drs#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.drs#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      List all tags for your Elastic Disaster Recovery resources.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.drs#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The ARN of the resource whose tags should be returned.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      The tags of the requested resource.

      " + } + } + } + }, + "com.amazonaws.drs#NetworkInterface": { + "type": "structure", + "members": { + "macAddress": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The MAC address of the network interface.

      " + } + }, + "ips": { + "target": "com.amazonaws.drs#IPsList", + "traits": { + "smithy.api#documentation": "

      Network interface IPs.

      " + } + }, + "isPrimary": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether this is the primary network interface.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Network interface.

      " + } + }, + "com.amazonaws.drs#NetworkInterfaces": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#NetworkInterface" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 32 + } + } + }, + "com.amazonaws.drs#OS": { + "type": "structure", + "members": { + "fullString": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The long name of the Operating System.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Operating System.

      " + } + }, + "com.amazonaws.drs#PITPolicy": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#PITPolicyRule" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.drs#PITPolicyRule": { + "type": "structure", + "members": { + "ruleID": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The ID of the rule.

      " + } + }, + "units": { + "target": "com.amazonaws.drs#PITPolicyRuleUnits", + "traits": { + "smithy.api#documentation": "

      The units used to measure the interval and retentionDuration.

      ", + "smithy.api#required": {} + } + }, + "interval": { + "target": "com.amazonaws.drs#StrictlyPositiveInteger", + "traits": { + "smithy.api#documentation": "

      How often, in the chosen units, a snapshot should be taken.

      ", + "smithy.api#required": {} + } + }, + "retentionDuration": { + "target": "com.amazonaws.drs#StrictlyPositiveInteger", + "traits": { + "smithy.api#documentation": "

      The duration to retain a snapshot for, in the chosen units.

      ", + "smithy.api#required": {} + } + }, + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether this rule is enabled or not.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A rule in the Point in Time (PIT) policy representing when to take snapshots and how long to retain them for.

      " + } + }, + "com.amazonaws.drs#PITPolicyRuleUnits": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "MINUTE", + "name": "MINUTE" + }, + { + "value": "HOUR", + "name": "HOUR" + }, + { + "value": "DAY", + "name": "DAY" + } + ] + } + }, + "com.amazonaws.drs#PaginationToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + } + } + }, + "com.amazonaws.drs#ParticipatingServer": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The Source Server ID of a participating server.

      " + } + }, + "recoveryInstanceID": { + "target": "com.amazonaws.drs#RecoveryInstanceID", + "traits": { + "smithy.api#documentation": "

      The Recovery Instance ID of a participating server.

      " + } + }, + "launchStatus": { + "target": "com.amazonaws.drs#LaunchStatus", + "traits": { + "smithy.api#documentation": "

      The launch status of a participating server.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Represents a server participating in an asynchronous Job.

      " + } + }, + "com.amazonaws.drs#ParticipatingServers": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#ParticipatingServer" + } + }, + "com.amazonaws.drs#PositiveInteger": { + "type": "long", + "traits": { + "smithy.api#range": { + "min": 0 + } + } + }, + "com.amazonaws.drs#RecoveryInstance": { + "type": "structure", + "members": { + "ec2InstanceID": { + "target": "com.amazonaws.drs#EC2InstanceID", + "traits": { + "smithy.api#documentation": "

      The EC2 instance ID of the Recovery Instance.

      " + } + }, + "ec2InstanceState": { + "target": "com.amazonaws.drs#EC2InstanceState", + "traits": { + "smithy.api#documentation": "

      The state of the EC2 instance for this Recovery Instance.

      " + } + }, + "jobID": { + "target": "com.amazonaws.drs#JobID", + "traits": { + "smithy.api#documentation": "

      The ID of the Job that created the Recovery Instance.

      " + } + }, + "recoveryInstanceID": { + "target": "com.amazonaws.drs#RecoveryInstanceID", + "traits": { + "smithy.api#documentation": "

      The ID of the Recovery Instance.

      " + } + }, + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The Source Server ID that this Recovery Instance is associated with.

      " + } + }, + "arn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The ARN of the Recovery Instance.

      " + } + }, + "tags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      An array of tags that are associated with the Recovery Instance.

      " + } + }, + "failback": { + "target": "com.amazonaws.drs#RecoveryInstanceFailback", + "traits": { + "smithy.api#documentation": "

      An object representing failback related information of the Recovery Instance.

      " + } + }, + "dataReplicationInfo": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationInfo", + "traits": { + "smithy.api#documentation": "

      The Data Replication Info of the Recovery Instance.

      " + } + }, + "recoveryInstanceProperties": { + "target": "com.amazonaws.drs#RecoveryInstanceProperties", + "traits": { + "smithy.api#documentation": "

      Properties of the Recovery Instance machine.

      " + } + }, + "pointInTimeSnapshotDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time of the Point in Time (PIT) snapshot that this Recovery Instance was launched from.

      " + } + }, + "isDrill": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether this Recovery Instance was created for a drill or for an actual Recovery event.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A Recovery Instance is a replica of a Source Server running on EC2.

      " + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationError": { + "type": "structure", + "members": { + "error": { + "target": "com.amazonaws.drs#FailbackReplicationError", + "traits": { + "smithy.api#documentation": "

      Error in data replication.

      " + } + }, + "rawError": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      Error in data replication.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Error in data replication.

      " + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationInfo": { + "type": "structure", + "members": { + "lagDuration": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      Data replication lag duration.

      " + } + }, + "etaDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      An estimate of when the data replication will be completed.

      " + } + }, + "replicatedDisks": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationInfoReplicatedDisks", + "traits": { + "smithy.api#documentation": "

      The disks that should be replicated.

      " + } + }, + "dataReplicationState": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationState", + "traits": { + "smithy.api#documentation": "

      The state of the data replication.

      " + } + }, + "dataReplicationInitiation": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiation", + "traits": { + "smithy.api#documentation": "

      Information about whether the data replication has been initiated.

      " + } + }, + "dataReplicationError": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationError", + "traits": { + "smithy.api#documentation": "

      Information about Data Replication

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Information about Data Replication

      " + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationInfoReplicatedDisk": { + "type": "structure", + "members": { + "deviceName": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The name of the device.

      " + } + }, + "totalStorageBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The total amount of data to be replicated in bytes.

      " + } + }, + "replicatedStorageBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The amount of data replicated so far in bytes.

      " + } + }, + "rescannedStorageBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The amount of data to be rescanned in bytes.

      " + } + }, + "backloggedStorageBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The size of the replication backlog in bytes.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A disk that should be replicated.

      " + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationInfoReplicatedDisks": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationInfoReplicatedDisk" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 60 + } + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiation": { + "type": "structure", + "members": { + "startDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time of the current attempt to initiate data replication.

      " + } + }, + "steps": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiationSteps", + "traits": { + "smithy.api#documentation": "

      The steps of the current attempt to initiate data replication.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Data replication initiation.

      " + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiationStep": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiationStepName", + "traits": { + "smithy.api#documentation": "

      The name of the step.

      " + } + }, + "status": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiationStepStatus", + "traits": { + "smithy.api#documentation": "

      The status of the step.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Data replication initiation step.

      " + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiationStepName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "LINK_FAILBACK_CLIENT_WITH_RECOVERY_INSTANCE", + "name": "LINK_FAILBACK_CLIENT_WITH_RECOVERY_INSTANCE" + }, + { + "value": "COMPLETE_VOLUME_MAPPING", + "name": "COMPLETE_VOLUME_MAPPING" + }, + { + "value": "ESTABLISH_RECOVERY_INSTANCE_COMMUNICATION", + "name": "ESTABLISH_RECOVERY_INSTANCE_COMMUNICATION" + }, + { + "value": "DOWNLOAD_REPLICATION_SOFTWARE_TO_FAILBACK_CLIENT", + "name": "DOWNLOAD_REPLICATION_SOFTWARE_TO_FAILBACK_CLIENT" + }, + { + "value": "CONFIGURE_REPLICATION_SOFTWARE", + "name": "CONFIGURE_REPLICATION_SOFTWARE" + }, + { + "value": "PAIR_AGENT_WITH_REPLICATION_SOFTWARE", + "name": "PAIR_AGENT_WITH_REPLICATION_SOFTWARE" + }, + { + "value": "ESTABLISH_AGENT_REPLICATOR_SOFTWARE_COMMUNICATION", + "name": "ESTABLISH_AGENT_REPLICATOR_SOFTWARE_COMMUNICATION" + } + ] + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiationStepStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NOT_STARTED", + "name": "NOT_STARTED" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "SKIPPED", + "name": "SKIPPED" + } + ] + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiationSteps": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#RecoveryInstanceDataReplicationInitiationStep" + } + }, + "com.amazonaws.drs#RecoveryInstanceDataReplicationState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "STOPPED", + "name": "STOPPED" + }, + { + "value": "INITIATING", + "name": "INITIATING" + }, + { + "value": "INITIAL_SYNC", + "name": "INITIAL_SYNC" + }, + { + "value": "BACKLOG", + "name": "BACKLOG" + }, + { + "value": "CREATING_SNAPSHOT", + "name": "CREATING_SNAPSHOT" + }, + { + "value": "CONTINUOUS", + "name": "CONTINUOUS" + }, + { + "value": "PAUSED", + "name": "PAUSED" + }, + { + "value": "RESCAN", + "name": "RESCAN" + }, + { + "value": "STALLED", + "name": "STALLED" + }, + { + "value": "DISCONNECTED", + "name": "DISCONNECTED" + } + ] + } + }, + "com.amazonaws.drs#RecoveryInstanceDisk": { + "type": "structure", + "members": { + "internalDeviceName": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The internal device name of this disk. This is the name that is visible on the machine itself and not from the EC2 console.

      " + } + }, + "bytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The amount of storage on the disk in bytes.

      " + } + }, + "ebsVolumeID": { + "target": "com.amazonaws.drs#EbsVolumeID", + "traits": { + "smithy.api#documentation": "

      The EBS Volume ID of this disk.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      An object representing a block storage device on the Recovery Instance.

      " + } + }, + "com.amazonaws.drs#RecoveryInstanceDisks": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#RecoveryInstanceDisk" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + } + } + }, + "com.amazonaws.drs#RecoveryInstanceFailback": { + "type": "structure", + "members": { + "failbackClientID": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The ID of the failback client that this Recovery Instance is associated with.

      " + } + }, + "failbackJobID": { + "target": "com.amazonaws.drs#JobID", + "traits": { + "smithy.api#documentation": "

      The Job ID of the last failback log for this Recovery Instance.

      " + } + }, + "failbackInitiationTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time that the failback initiation started.

      " + } + }, + "state": { + "target": "com.amazonaws.drs#FailbackState", + "traits": { + "smithy.api#documentation": "

      The state of the failback process that this Recovery Instance is in.

      " + } + }, + "agentLastSeenByServiceDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time the agent on the Recovery Instance was last seen by the service.

      " + } + }, + "failbackClientLastSeenByServiceDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time that the failback client was last seen by the service.

      " + } + }, + "failbackToOriginalServer": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether we are failing back to the original Source Server for this Recovery Instance.

      " + } + }, + "firstByteDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time of the first byte that was replicated from the Recovery Instance.

      " + } + }, + "elapsedReplicationDuration": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The amount of time that the Recovery Instance has been replicating for.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      An object representing failback related information of the Recovery Instance.

      " + } + }, + "com.amazonaws.drs#RecoveryInstanceID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 19 + }, + "smithy.api#pattern": "^i-[0-9a-fA-F]{8,}$" + } + }, + "com.amazonaws.drs#RecoveryInstanceIDs": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#RecoveryInstanceID" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.drs#RecoveryInstanceProperties": { + "type": "structure", + "members": { + "lastUpdatedDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time the Recovery Instance properties were last updated on.

      " + } + }, + "identificationHints": { + "target": "com.amazonaws.drs#IdentificationHints", + "traits": { + "smithy.api#documentation": "

      Hints used to uniquely identify a machine.

      " + } + }, + "networkInterfaces": { + "target": "com.amazonaws.drs#NetworkInterfaces", + "traits": { + "smithy.api#documentation": "

      An array of network interfaces.

      " + } + }, + "disks": { + "target": "com.amazonaws.drs#RecoveryInstanceDisks", + "traits": { + "smithy.api#documentation": "

      An array of disks.

      " + } + }, + "cpus": { + "target": "com.amazonaws.drs#Cpus", + "traits": { + "smithy.api#documentation": "

      An array of CPUs.

      " + } + }, + "ramBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The amount of RAM in bytes.

      " + } + }, + "os": { + "target": "com.amazonaws.drs#OS", + "traits": { + "smithy.api#documentation": "

      Operating system.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Properties of the Recovery Instance machine.

      " + } + }, + "com.amazonaws.drs#RecoveryInstanceResource": { + "type": "resource", + "identifiers": { + "recoveryInstanceID": { + "target": "com.amazonaws.drs#RecoveryInstanceID" + } + }, + "list": { + "target": "com.amazonaws.drs#DescribeRecoveryInstances" + }, + "operations": [ + { + "target": "com.amazonaws.drs#DeleteRecoveryInstance" + }, + { + "target": "com.amazonaws.drs#DisconnectRecoveryInstance" + }, + { + "target": "com.amazonaws.drs#GetFailbackReplicationConfiguration" + }, + { + "target": "com.amazonaws.drs#StopFailback" + }, + { + "target": "com.amazonaws.drs#UpdateFailbackReplicationConfiguration" + } + ], + "collectionOperations": [ + { + "target": "com.amazonaws.drs#StartFailbackLaunch" + }, + { + "target": "com.amazonaws.drs#TerminateRecoveryInstances" + } + ], + "traits": { + "aws.api#arn": { + "template": "recovery-instance/{recoveryInstanceID}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.iam#conditionKeys": ["drs:EC2InstanceARN", "aws:ResourceTag"], + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.drs#RecoveryInstancesForTerminationRequest": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#RecoveryInstanceID" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.drs#RecoverySnapshot": { + "type": "structure", + "members": { + "snapshotID": { + "target": "com.amazonaws.drs#RecoverySnapshotID", + "traits": { + "smithy.api#documentation": "

      The ID of the Recovery Snapshot.

      ", + "smithy.api#required": {} + } + }, + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server that the snapshot was taken for.

      ", + "smithy.api#required": {} + } + }, + "expectedTimestamp": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The timestamp of when we expect the snapshot to be taken.

      ", + "smithy.api#required": {} + } + }, + "timestamp": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The actual timestamp that the snapshot was taken.

      " + } + }, + "ebsSnapshots": { + "target": "com.amazonaws.drs#EbsSnapshotsList", + "traits": { + "smithy.api#documentation": "

      A list of EBS snapshots.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      A snapshot of a Source Server used during recovery.

      " + } + }, + "com.amazonaws.drs#RecoverySnapshotID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 21, + "max": 21 + }, + "smithy.api#pattern": "^pit-[0-9a-zA-Z]{17}$" + } + }, + "com.amazonaws.drs#RecoverySnapshotsList": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#RecoverySnapshot" + } + }, + "com.amazonaws.drs#RecoverySnapshotsOrder": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASC", + "name": "ASC" + }, + { + "value": "DESC", + "name": "DESC" + } + ] + } + }, + "com.amazonaws.drs#ReplicationConfiguration": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server for this Replication Configuration.

      " + } + }, + "name": { + "target": "com.amazonaws.drs#SmallBoundedString", + "traits": { + "smithy.api#documentation": "

      The name of the Replication Configuration.

      " + } + }, + "stagingAreaSubnetId": { + "target": "com.amazonaws.drs#SubnetID", + "traits": { + "smithy.api#documentation": "

      The subnet to be used by the replication staging area.

      " + } + }, + "associateDefaultSecurityGroup": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration.

      " + } + }, + "replicationServersSecurityGroupsIDs": { + "target": "com.amazonaws.drs#ReplicationServersSecurityGroupsIDs", + "traits": { + "smithy.api#documentation": "

      The security group IDs that will be used by the replication server.

      " + } + }, + "replicationServerInstanceType": { + "target": "com.amazonaws.drs#EC2InstanceType", + "traits": { + "smithy.api#documentation": "

      The instance type to be used for the replication server.

      " + } + }, + "useDedicatedReplicationServer": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to use a dedicated Replication Server in the replication staging area.

      " + } + }, + "defaultLargeStagingDiskType": { + "target": "com.amazonaws.drs#ReplicationConfigurationDefaultLargeStagingDiskType", + "traits": { + "smithy.api#documentation": "

      The Staging Disk EBS volume type to be used during replication.

      " + } + }, + "replicatedDisks": { + "target": "com.amazonaws.drs#ReplicationConfigurationReplicatedDisks", + "traits": { + "smithy.api#documentation": "

      The configuration of the disks of the Source Server to be replicated.

      " + } + }, + "ebsEncryption": { + "target": "com.amazonaws.drs#ReplicationConfigurationEbsEncryption", + "traits": { + "smithy.api#documentation": "

      The type of EBS encryption to be used during replication.

      " + } + }, + "ebsEncryptionKeyArn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The ARN of the EBS encryption key to be used during replication.

      " + } + }, + "bandwidthThrottling": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

      " + } + }, + "dataPlaneRouting": { + "target": "com.amazonaws.drs#ReplicationConfigurationDataPlaneRouting", + "traits": { + "smithy.api#documentation": "

      The data plane routing mechanism that will be used for replication.

      " + } + }, + "createPublicIP": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to create a Public IP for the Recovery Instance by default.

      " + } + }, + "stagingAreaTags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

      " + } + }, + "pitPolicy": { + "target": "com.amazonaws.drs#PITPolicy", + "traits": { + "smithy.api#documentation": "

      The Point in time (PIT) policy to manage snapshots taken during replication.

      " + } + } + } + }, + "com.amazonaws.drs#ReplicationConfigurationDataPlaneRouting": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PRIVATE_IP", + "name": "PRIVATE_IP" + }, + { + "value": "PUBLIC_IP", + "name": "PUBLIC_IP" + } + ] + } + }, + "com.amazonaws.drs#ReplicationConfigurationDefaultLargeStagingDiskType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "GP2", + "name": "GP2" + }, + { + "value": "GP3", + "name": "GP3" + }, + { + "value": "ST1", + "name": "ST1" + } + ] + } + }, + "com.amazonaws.drs#ReplicationConfigurationEbsEncryption": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DEFAULT", + "name": "DEFAULT" + }, + { + "value": "CUSTOM", + "name": "CUSTOM" + } + ] + } + }, + "com.amazonaws.drs#ReplicationConfigurationReplicatedDisk": { + "type": "structure", + "members": { + "deviceName": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The name of the device.

      " + } + }, + "isBootDisk": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to boot from this disk or not.

      " + } + }, + "stagingDiskType": { + "target": "com.amazonaws.drs#ReplicationConfigurationReplicatedDiskStagingDiskType", + "traits": { + "smithy.api#documentation": "

      The Staging Disk EBS volume type to be used during replication.

      " + } + }, + "iops": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The requested number of I/O operations per second (IOPS).

      " + } + }, + "throughput": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The throughput to use for the EBS volume in MiB/s. This parameter is valid only for gp3 volumes.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      The configuration of a disk of the Source Server to be replicated.

      " + } + }, + "com.amazonaws.drs#ReplicationConfigurationReplicatedDiskStagingDiskType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AUTO", + "name": "AUTO" + }, + { + "value": "GP2", + "name": "GP2" + }, + { + "value": "GP3", + "name": "GP3" + }, + { + "value": "IO1", + "name": "IO1" + }, + { + "value": "SC1", + "name": "SC1" + }, + { + "value": "ST1", + "name": "ST1" + }, + { + "value": "STANDARD", + "name": "STANDARD" + } + ] + } + }, + "com.amazonaws.drs#ReplicationConfigurationReplicatedDisks": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#ReplicationConfigurationReplicatedDisk" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 60 + } + } + }, + "com.amazonaws.drs#ReplicationConfigurationTemplate": { + "type": "structure", + "members": { + "replicationConfigurationTemplateID": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplateID", + "traits": { + "smithy.api#documentation": "

      The Replication Configuration Template ID.

      ", + "smithy.api#required": {} + } + }, + "arn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The Replication Configuration Template ARN.

      " + } + }, + "stagingAreaSubnetId": { + "target": "com.amazonaws.drs#SubnetID", + "traits": { + "smithy.api#documentation": "

      The subnet to be used by the replication staging area.

      " + } + }, + "associateDefaultSecurityGroup": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration Template.

      " + } + }, + "replicationServersSecurityGroupsIDs": { + "target": "com.amazonaws.drs#ReplicationServersSecurityGroupsIDs", + "traits": { + "smithy.api#documentation": "

      The security group IDs that will be used by the replication server.

      " + } + }, + "replicationServerInstanceType": { + "target": "com.amazonaws.drs#EC2InstanceType", + "traits": { + "smithy.api#documentation": "

      The instance type to be used for the replication server.

      " + } + }, + "useDedicatedReplicationServer": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to use a dedicated Replication Server in the replication staging area.

      " + } + }, + "defaultLargeStagingDiskType": { + "target": "com.amazonaws.drs#ReplicationConfigurationDefaultLargeStagingDiskType", + "traits": { + "smithy.api#documentation": "

      The Staging Disk EBS volume type to be used during replication.

      " + } + }, + "ebsEncryption": { + "target": "com.amazonaws.drs#ReplicationConfigurationEbsEncryption", + "traits": { + "smithy.api#documentation": "

      The type of EBS encryption to be used during replication.

      " + } + }, + "ebsEncryptionKeyArn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The ARN of the EBS encryption key to be used during replication.

      " + } + }, + "bandwidthThrottling": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

      " + } + }, + "dataPlaneRouting": { + "target": "com.amazonaws.drs#ReplicationConfigurationDataPlaneRouting", + "traits": { + "smithy.api#documentation": "

      The data plane routing mechanism that will be used for replication.

      " + } + }, + "createPublicIP": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to create a Public IP for the Recovery Instance by default.

      " + } + }, + "stagingAreaTags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

      " + } + }, + "tags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      A set of tags to be associated with the Replication Configuration Template resource.

      " + } + }, + "pitPolicy": { + "target": "com.amazonaws.drs#PITPolicy", + "traits": { + "smithy.api#documentation": "

      The Point in time (PIT) policy to manage snapshots taken during replication.

      " + } + } + } + }, + "com.amazonaws.drs#ReplicationConfigurationTemplateID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 21, + "max": 21 + }, + "smithy.api#pattern": "^rct-[0-9a-zA-Z]{17}$" + } + }, + "com.amazonaws.drs#ReplicationConfigurationTemplateIDs": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplateID" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.drs#ReplicationConfigurationTemplateResource": { + "type": "resource", + "identifiers": { + "replicationConfigurationTemplateID": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplateID" + } + }, + "create": { + "target": "com.amazonaws.drs#CreateReplicationConfigurationTemplate" + }, + "update": { + "target": "com.amazonaws.drs#UpdateReplicationConfigurationTemplate" + }, + "delete": { + "target": "com.amazonaws.drs#DeleteReplicationConfigurationTemplate" + }, + "list": { + "target": "com.amazonaws.drs#DescribeReplicationConfigurationTemplates" + }, + "traits": { + "aws.api#arn": { + "template": "replication-configuration-template/{replicationConfigurationTemplateID}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.iam#conditionKeys": ["aws:ResourceTag"], + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.drs#ReplicationConfigurationTemplates": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplate" + } + }, + "com.amazonaws.drs#ReplicationServersSecurityGroupsIDs": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#SecurityGroupID" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 32 + } + } + }, + "com.amazonaws.drs#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "code": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "resourceId": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      The ID of the resource.

      " + } + }, + "resourceType": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      The type of the resource.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      The resource for this operation was not found.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.drs#RetryDataReplication": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#RetryDataReplicationRequest" + }, + "output": { + "target": "com.amazonaws.drs#SourceServer" + }, + "errors": [ + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Causes the data replication initiation sequence to begin immediately upon next Handshake for the specified Source Server ID, regardless of when the previous initiation started. This command will work only if the Source Server is stalled or is in a DISCONNECTED or STOPPED state.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/RetryDataReplication", + "code": 200 + } + } + }, + "com.amazonaws.drs#RetryDataReplicationRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server whose data replication should be retried.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#SecurityGroupID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^sg-[0-9a-fA-F]{8,}$" + } + }, + "com.amazonaws.drs#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "code": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "resourceId": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      The ID of the resource.

      " + } + }, + "resourceType": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      The type of the resource.

      " + } + }, + "serviceCode": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      Service code.

      " + } + }, + "quotaCode": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      Quota code.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      The request could not be completed because its exceeded the service quota.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.drs#SmallBoundedString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 128 + } + } + }, + "com.amazonaws.drs#SourceProperties": { + "type": "structure", + "members": { + "lastUpdatedDateTime": { + "target": "com.amazonaws.drs#ISO8601DatetimeString", + "traits": { + "smithy.api#documentation": "

      The date and time the Source Properties were last updated on.

      " + } + }, + "recommendedInstanceType": { + "target": "com.amazonaws.drs#EC2InstanceType", + "traits": { + "smithy.api#documentation": "

      The recommended EC2 instance type that will be used when recovering the Source Server.

      " + } + }, + "identificationHints": { + "target": "com.amazonaws.drs#IdentificationHints", + "traits": { + "smithy.api#documentation": "

      Hints used to uniquely identify a machine.

      " + } + }, + "networkInterfaces": { + "target": "com.amazonaws.drs#NetworkInterfaces", + "traits": { + "smithy.api#documentation": "

      An array of network interfaces.

      " + } + }, + "disks": { + "target": "com.amazonaws.drs#Disks", + "traits": { + "smithy.api#documentation": "

      An array of disks.

      " + } + }, + "cpus": { + "target": "com.amazonaws.drs#Cpus", + "traits": { + "smithy.api#documentation": "

      An array of CPUs.

      " + } + }, + "ramBytes": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      The amount of RAM in bytes.

      " + } + }, + "os": { + "target": "com.amazonaws.drs#OS", + "traits": { + "smithy.api#documentation": "

      Operating system.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Properties of the Source Server machine.

      " + } + }, + "com.amazonaws.drs#SourceServer": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server.

      " + } + }, + "arn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The ARN of the Source Server.

      " + } + }, + "tags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      The tags associated with the Source Server.

      " + } + }, + "recoveryInstanceId": { + "target": "com.amazonaws.drs#RecoveryInstanceID", + "traits": { + "smithy.api#documentation": "

      The ID of the Recovery Instance associated with this Source Server.

      " + } + }, + "lastLaunchResult": { + "target": "com.amazonaws.drs#LastLaunchResult", + "traits": { + "smithy.api#documentation": "

      The status of the last recovery launch of this Source Server.

      " + } + }, + "dataReplicationInfo": { + "target": "com.amazonaws.drs#DataReplicationInfo", + "traits": { + "smithy.api#documentation": "

      The Data Replication Info of the Source Server.

      " + } + }, + "lifeCycle": { + "target": "com.amazonaws.drs#LifeCycle", + "traits": { + "smithy.api#documentation": "

      The lifecycle information of this Source Server.

      " + } + }, + "sourceProperties": { + "target": "com.amazonaws.drs#SourceProperties", + "traits": { + "smithy.api#documentation": "

      The source properties of the Source Server.

      " + } + } + }, + "traits": { + "smithy.api#references": [ + { + "resource": "com.amazonaws.drs#SourceServerResource" + } + ] + } + }, + "com.amazonaws.drs#SourceServerID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 19, + "max": 19 + }, + "smithy.api#pattern": "^s-[0-9a-zA-Z]{17}$" + } + }, + "com.amazonaws.drs#SourceServerIDs": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#SourceServerID" + } + }, + "com.amazonaws.drs#SourceServerResource": { + "type": "resource", + "identifiers": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID" + } + }, + "delete": { + "target": "com.amazonaws.drs#DeleteSourceServer" + }, + "list": { + "target": "com.amazonaws.drs#DescribeSourceServers" + }, + "operations": [ + { + "target": "com.amazonaws.drs#DescribeRecoverySnapshots" + }, + { + "target": "com.amazonaws.drs#DisconnectSourceServer" + }, + { + "target": "com.amazonaws.drs#GetLaunchConfiguration" + }, + { + "target": "com.amazonaws.drs#GetReplicationConfiguration" + }, + { + "target": "com.amazonaws.drs#RetryDataReplication" + }, + { + "target": "com.amazonaws.drs#UpdateLaunchConfiguration" + }, + { + "target": "com.amazonaws.drs#UpdateReplicationConfiguration" + } + ], + "collectionOperations": [ + { + "target": "com.amazonaws.drs#StartRecovery" + } + ], + "traits": { + "aws.api#arn": { + "template": "source-server/{sourceServerID}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.iam#conditionKeys": ["aws:ResourceTag"], + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.drs#SourceServersList": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#SourceServer" + } + }, + "com.amazonaws.drs#StartFailbackLaunch": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#StartFailbackLaunchRequest" + }, + "output": { + "target": "com.amazonaws.drs#StartFailbackLaunchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Initiates a Job for launching the machine that is being failed back to from the specified Recovery Instance. This will run conversion on the failback client and will reboot your machine, thus completing the failback process.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/StartFailbackLaunch", + "code": 200 + } + } + }, + "com.amazonaws.drs#StartFailbackLaunchRequest": { + "type": "structure", + "members": { + "recoveryInstanceIDs": { + "target": "com.amazonaws.drs#StartFailbackRequestRecoveryInstanceIDs", + "traits": { + "smithy.api#documentation": "

      The IDs of the Recovery Instance whose failback launch we want to request.

      ", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      The tags to be associated with the failback launch Job.

      " + } + } + } + }, + "com.amazonaws.drs#StartFailbackLaunchResponse": { + "type": "structure", + "members": { + "job": { + "target": "com.amazonaws.drs#Job", + "traits": { + "smithy.api#documentation": "

      The failback launch Job.

      " + } + } + } + }, + "com.amazonaws.drs#StartFailbackRequestRecoveryInstanceIDs": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#RecoveryInstanceID" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.drs#StartRecovery": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#StartRecoveryRequest" + }, + "output": { + "target": "com.amazonaws.drs#StartRecoveryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "ec2:DetachVolume", + "ec2:DescribeInstances", + "ec2:TerminateInstances", + "ec2:CreateTags", + "ec2:DescribeLaunchTemplateVersions", + "ec2:RunInstances", + "ec2:DescribeSnapshots", + "ec2:StopInstances", + "ec2:CreateLaunchTemplateVersion", + "ec2:DeleteVolume", + "ec2:StartInstances", + "ec2:DescribeVolumes", + "ec2:DeleteLaunchTemplateVersions", + "ec2:AttachVolume", + "ec2:AuthorizeSecurityGroupEgress", + "ec2:AuthorizeSecurityGroupIngress", + "ec2:CreateLaunchTemplate", + "ec2:CreateSnapshot", + "ec2:CreateVolume", + "ec2:DeleteSnapshot", + "ec2:DescribeImages", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeLaunchTemplates", + "ec2:DescribeSecurityGroups", + "ec2:DescribeSubnets", + "ec2:ModifyInstanceAttribute", + "ec2:ModifyLaunchTemplate", + "ec2:RevokeSecurityGroupEgress", + "ec2:DescribeAccountAttributes", + "ec2:DescribeAvailabilityZones", + "ec2:DescribeInstanceTypes", + "iam:PassRole", + "drs:CreateRecoveryInstanceForDrs", + "drs:ListTagsForResource" + ], + "smithy.api#documentation": "

      Launches Recovery Instances for the specified Source Servers. For each Source Server you may choose a point in time snapshot to launch from, or use an on demand snapshot.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/StartRecovery", + "code": 202 + } + } + }, + "com.amazonaws.drs#StartRecoveryRequest": { + "type": "structure", + "members": { + "sourceServers": { + "target": "com.amazonaws.drs#StartRecoveryRequestSourceServers", + "traits": { + "smithy.api#documentation": "

      The Source Servers that we want to start a Recovery Job for.

      ", + "smithy.api#required": {} + } + }, + "isDrill": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether this Source Server Recovery operation is a drill or not.

      " + } + }, + "tags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      The tags to be associated with the Recovery Job.

      " + } + } + } + }, + "com.amazonaws.drs#StartRecoveryRequestSourceServer": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server you want to recover.

      ", + "smithy.api#required": {} + } + }, + "recoverySnapshotID": { + "target": "com.amazonaws.drs#RecoverySnapshotID", + "traits": { + "smithy.api#documentation": "

      The ID of a Recovery Snapshot we want to recover from. Omit this field to launch from the latest data by taking an on-demand snapshot.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      An object representing the Source Server to recover.

      " + } + }, + "com.amazonaws.drs#StartRecoveryRequestSourceServers": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#StartRecoveryRequestSourceServer" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.drs#StartRecoveryResponse": { + "type": "structure", + "members": { + "job": { + "target": "com.amazonaws.drs#Job", + "traits": { + "smithy.api#documentation": "

      The Recovery Job.

      " + } + } + } + }, + "com.amazonaws.drs#StopFailback": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#StopFailbackRequest" + }, + "errors": [ + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Stops the failback process for a specified Recovery Instance. This changes the Failback State of the Recovery Instance back to FAILBACK_NOT_STARTED.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/StopFailback", + "code": 200 + } + } + }, + "com.amazonaws.drs#StopFailbackRequest": { + "type": "structure", + "members": { + "recoveryInstanceID": { + "target": "com.amazonaws.drs#RecoveryInstanceID", + "traits": { + "smithy.api#documentation": "

      The ID of the Recovery Instance we want to stop failback for.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#StrictlyPositiveInteger": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1 + } + } + }, + "com.amazonaws.drs#SubnetID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^subnet-[0-9a-fA-F]{8,}$" + } + }, + "com.amazonaws.drs#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.drs#TagKeys": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#TagKey" + }, + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.drs#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#TagResourceRequest" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Adds or overwrites only the specified tags for the specified Elastic Disaster Recovery resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.drs#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      ARN of the resource for which tags are to be added or updated.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      Array of tags to be added or updated.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.drs#TagsMap": { + "type": "map", + "key": { + "target": "com.amazonaws.drs#TagKey" + }, + "value": { + "target": "com.amazonaws.drs#TagValue" + }, + "traits": { + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.drs#TargetInstanceTypeRightSizingMethod": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NONE", + "name": "NONE" + }, + { + "value": "BASIC", + "name": "BASIC" + } + ] + } + }, + "com.amazonaws.drs#TerminateRecoveryInstances": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#TerminateRecoveryInstancesRequest" + }, + "output": { + "target": "com.amazonaws.drs#TerminateRecoveryInstancesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "aws.iam#requiredActions": [ + "ec2:DescribeVolumes", + "ec2:DescribeInstances", + "ec2:TerminateInstances", + "ec2:DeleteVolume" + ], + "smithy.api#documentation": "

      Initiates a Job for terminating the EC2 resources associated with the specified Recovery Instances, and then will delete the Recovery Instances from the Elastic Disaster Recovery service.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/TerminateRecoveryInstances", + "code": 200 + } + } + }, + "com.amazonaws.drs#TerminateRecoveryInstancesRequest": { + "type": "structure", + "members": { + "recoveryInstanceIDs": { + "target": "com.amazonaws.drs#RecoveryInstancesForTerminationRequest", + "traits": { + "smithy.api#documentation": "

      The IDs of the Recovery Instances that should be terminated.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#TerminateRecoveryInstancesResponse": { + "type": "structure", + "members": { + "job": { + "target": "com.amazonaws.drs#Job", + "traits": { + "smithy.api#documentation": "

      The Job for terminating the Recovery Instances.

      " + } + } + } + }, + "com.amazonaws.drs#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#required": {} + } + }, + "serviceCode": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      Service code.

      " + } + }, + "quotaCode": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      Quota code.

      " + } + }, + "retryAfterSeconds": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      The number of seconds after which the request should be safe to retry.

      ", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "

      The request was denied due to request throttling.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.drs#UninitializedAccountException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "code": { + "target": "com.amazonaws.drs#LargeBoundedString" + } + }, + "traits": { + "smithy.api#documentation": "

      The account performing the request has not been initialized.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.drs#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#UntagResourceRequest" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Deletes the specified set of tags from the specified set of Elastic Disaster Recovery resources.

      ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.drs#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      ARN of the resource for which tags are to be removed.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.drs#TagKeys", + "traits": { + "smithy.api#documentation": "

      Array of tags to be removed.

      ", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.drs#UpdateFailbackReplicationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#UpdateFailbackReplicationConfigurationRequest" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + } + ], + "traits": { + "smithy.api#documentation": "

      Allows you to update the failback replication configuration of a Recovery Instance by ID.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/UpdateFailbackReplicationConfiguration", + "code": 200 + } + } + }, + "com.amazonaws.drs#UpdateFailbackReplicationConfigurationRequest": { + "type": "structure", + "members": { + "recoveryInstanceID": { + "target": "com.amazonaws.drs#RecoveryInstanceID", + "traits": { + "smithy.api#documentation": "

      The ID of the Recovery Instance.

      ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.drs#BoundedString", + "traits": { + "smithy.api#documentation": "

      The name of the Failback Replication Configuration.

      " + } + }, + "bandwidthThrottling": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      Configure bandwidth throttling for the outbound data transfer rate of the Recovery Instance in Mbps.

      " + } + }, + "usePrivateIP": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to use Private IP for the failback replication of the Recovery Instance.

      " + } + } + } + }, + "com.amazonaws.drs#UpdateLaunchConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#UpdateLaunchConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.drs#LaunchConfiguration" + }, + "errors": [ + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Updates a LaunchConfiguration by Source Server ID.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/UpdateLaunchConfiguration", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.drs#UpdateLaunchConfigurationRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server that we want to retrieve a Launch Configuration for.

      ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.drs#SmallBoundedString", + "traits": { + "smithy.api#documentation": "

      The name of the launch configuration.

      " + } + }, + "launchDisposition": { + "target": "com.amazonaws.drs#LaunchDisposition", + "traits": { + "smithy.api#documentation": "

      The state of the Recovery Instance in EC2 after the recovery operation.

      " + } + }, + "targetInstanceTypeRightSizingMethod": { + "target": "com.amazonaws.drs#TargetInstanceTypeRightSizingMethod", + "traits": { + "smithy.api#documentation": "

      Whether Elastic Disaster Recovery should try to automatically choose the instance type that best matches the OS, CPU, and RAM of your Source Server.

      " + } + }, + "copyPrivateIp": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether we should copy the Private IP of the Source Server to the Recovery Instance.

      " + } + }, + "copyTags": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether we want to copy the tags of the Source Server to the EC2 machine of the Recovery Instance.

      " + } + }, + "licensing": { + "target": "com.amazonaws.drs#Licensing", + "traits": { + "smithy.api#documentation": "

      The licensing configuration to be used for this launch configuration.

      " + } + } + } + }, + "com.amazonaws.drs#UpdateReplicationConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#UpdateReplicationConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.drs#ReplicationConfiguration" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#ConflictException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Allows you to update a ReplicationConfiguration by Source Server ID.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/UpdateReplicationConfiguration", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.drs#UpdateReplicationConfigurationRequest": { + "type": "structure", + "members": { + "sourceServerID": { + "target": "com.amazonaws.drs#SourceServerID", + "traits": { + "smithy.api#documentation": "

      The ID of the Source Server for this Replication Configuration.

      ", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.drs#SmallBoundedString", + "traits": { + "smithy.api#documentation": "

      The name of the Replication Configuration.

      " + } + }, + "stagingAreaSubnetId": { + "target": "com.amazonaws.drs#SubnetID", + "traits": { + "smithy.api#documentation": "

      The subnet to be used by the replication staging area.

      " + } + }, + "associateDefaultSecurityGroup": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration.

      " + } + }, + "replicationServersSecurityGroupsIDs": { + "target": "com.amazonaws.drs#ReplicationServersSecurityGroupsIDs", + "traits": { + "smithy.api#documentation": "

      The security group IDs that will be used by the replication server.

      " + } + }, + "replicationServerInstanceType": { + "target": "com.amazonaws.drs#EC2InstanceType", + "traits": { + "smithy.api#documentation": "

      The instance type to be used for the replication server.

      " + } + }, + "useDedicatedReplicationServer": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to use a dedicated Replication Server in the replication staging area.

      " + } + }, + "defaultLargeStagingDiskType": { + "target": "com.amazonaws.drs#ReplicationConfigurationDefaultLargeStagingDiskType", + "traits": { + "smithy.api#documentation": "

      The Staging Disk EBS volume type to be used during replication.

      " + } + }, + "replicatedDisks": { + "target": "com.amazonaws.drs#ReplicationConfigurationReplicatedDisks", + "traits": { + "smithy.api#documentation": "

      The configuration of the disks of the Source Server to be replicated.

      " + } + }, + "ebsEncryption": { + "target": "com.amazonaws.drs#ReplicationConfigurationEbsEncryption", + "traits": { + "smithy.api#documentation": "

      The type of EBS encryption to be used during replication.

      " + } + }, + "ebsEncryptionKeyArn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The ARN of the EBS encryption key to be used during replication.

      " + } + }, + "bandwidthThrottling": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

      " + } + }, + "dataPlaneRouting": { + "target": "com.amazonaws.drs#ReplicationConfigurationDataPlaneRouting", + "traits": { + "smithy.api#documentation": "

      The data plane routing mechanism that will be used for replication.

      " + } + }, + "createPublicIP": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to create a Public IP for the Recovery Instance by default.

      " + } + }, + "stagingAreaTags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

      " + } + }, + "pitPolicy": { + "target": "com.amazonaws.drs#PITPolicy", + "traits": { + "smithy.api#documentation": "

      The Point in time (PIT) policy to manage snapshots taken during replication.

      " + } + } + } + }, + "com.amazonaws.drs#UpdateReplicationConfigurationTemplate": { + "type": "operation", + "input": { + "target": "com.amazonaws.drs#UpdateReplicationConfigurationTemplateRequest" + }, + "output": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplate" + }, + "errors": [ + { + "target": "com.amazonaws.drs#AccessDeniedException" + }, + { + "target": "com.amazonaws.drs#InternalServerException" + }, + { + "target": "com.amazonaws.drs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.drs#ThrottlingException" + }, + { + "target": "com.amazonaws.drs#UninitializedAccountException" + }, + { + "target": "com.amazonaws.drs#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Updates a ReplicationConfigurationTemplate by ID.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/UpdateReplicationConfigurationTemplate", + "code": 200 + } + } + }, + "com.amazonaws.drs#UpdateReplicationConfigurationTemplateRequest": { + "type": "structure", + "members": { + "replicationConfigurationTemplateID": { + "target": "com.amazonaws.drs#ReplicationConfigurationTemplateID", + "traits": { + "smithy.api#documentation": "

      The Replication Configuration Template ID.

      ", + "smithy.api#required": {} + } + }, + "arn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The Replication Configuration Template ARN.

      " + } + }, + "stagingAreaSubnetId": { + "target": "com.amazonaws.drs#SubnetID", + "traits": { + "smithy.api#documentation": "

      The subnet to be used by the replication staging area.

      " + } + }, + "associateDefaultSecurityGroup": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration Template.

      " + } + }, + "replicationServersSecurityGroupsIDs": { + "target": "com.amazonaws.drs#ReplicationServersSecurityGroupsIDs", + "traits": { + "smithy.api#documentation": "

      The security group IDs that will be used by the replication server.

      " + } + }, + "replicationServerInstanceType": { + "target": "com.amazonaws.drs#EC2InstanceType", + "traits": { + "smithy.api#documentation": "

      The instance type to be used for the replication server.

      " + } + }, + "useDedicatedReplicationServer": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to use a dedicated Replication Server in the replication staging area.

      " + } + }, + "defaultLargeStagingDiskType": { + "target": "com.amazonaws.drs#ReplicationConfigurationDefaultLargeStagingDiskType", + "traits": { + "smithy.api#documentation": "

      The Staging Disk EBS volume type to be used during replication.

      " + } + }, + "ebsEncryption": { + "target": "com.amazonaws.drs#ReplicationConfigurationEbsEncryption", + "traits": { + "smithy.api#documentation": "

      The type of EBS encryption to be used during replication.

      " + } + }, + "ebsEncryptionKeyArn": { + "target": "com.amazonaws.drs#ARN", + "traits": { + "smithy.api#documentation": "

      The ARN of the EBS encryption key to be used during replication.

      " + } + }, + "bandwidthThrottling": { + "target": "com.amazonaws.drs#PositiveInteger", + "traits": { + "smithy.api#documentation": "

      Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

      " + } + }, + "dataPlaneRouting": { + "target": "com.amazonaws.drs#ReplicationConfigurationDataPlaneRouting", + "traits": { + "smithy.api#documentation": "

      The data plane routing mechanism that will be used for replication.

      " + } + }, + "createPublicIP": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      Whether to create a Public IP for the Recovery Instance by default.

      " + } + }, + "stagingAreaTags": { + "target": "com.amazonaws.drs#TagsMap", + "traits": { + "smithy.api#documentation": "

      A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

      " + } + }, + "pitPolicy": { + "target": "com.amazonaws.drs#PITPolicy", + "traits": { + "smithy.api#documentation": "

      The Point in time (PIT) policy to manage snapshots taken during replication.

      " + } + } + } + }, + "com.amazonaws.drs#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "code": { + "target": "com.amazonaws.drs#LargeBoundedString" + }, + "reason": { + "target": "com.amazonaws.drs#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "

      Validation exception reason.

      " + } + }, + "fieldList": { + "target": "com.amazonaws.drs#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "

      A list of fields that failed validation.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      The input fails to satisfy the constraints specified by the AWS service.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.drs#ValidationExceptionField": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      Validate exception field name.

      " + } + }, + "message": { + "target": "com.amazonaws.drs#LargeBoundedString", + "traits": { + "smithy.api#documentation": "

      Validate exception field message.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Validate exception field.

      " + } + }, + "com.amazonaws.drs#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.drs#ValidationExceptionField" + } + }, + "com.amazonaws.drs#ValidationExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "unknownOperation", + "name": "UNKNOWN_OPERATION" + }, + { + "value": "cannotParse", + "name": "CANNOT_PARSE" + }, + { + "value": "fieldValidationFailed", + "name": "FIELD_VALIDATION_FAILED" + }, + { + "value": "other", + "name": "OTHER" + } + ] + } + }, + "com.amazonaws.drs#ebsSnapshot": { + "type": "string", + "traits": { + "smithy.api#pattern": "^snap-[0-9a-zA-Z]{17}$" + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/ec2.json b/codegen/sdk-codegen/aws-models/ec2.json index f28327bc1008..01050cef61fc 100644 --- a/codegen/sdk-codegen/aws-models/ec2.json +++ b/codegen/sdk-codegen/aws-models/ec2.json @@ -42917,6 +42917,42 @@ "value": "c6gn.16xlarge", "name": "c6gn_16xlarge" }, + { + "value": "c6i.large", + "name": "c6i_large" + }, + { + "value": "c6i.xlarge", + "name": "c6i_xlarge" + }, + { + "value": "c6i.2xlarge", + "name": "c6i_2xlarge" + }, + { + "value": "c6i.4xlarge", + "name": "c6i_4xlarge" + }, + { + "value": "c6i.8xlarge", + "name": "c6i_8xlarge" + }, + { + "value": "c6i.12xlarge", + "name": "c6i_12xlarge" + }, + { + "value": "c6i.16xlarge", + "name": "c6i_16xlarge" + }, + { + "value": "c6i.24xlarge", + "name": "c6i_24xlarge" + }, + { + "value": "c6i.32xlarge", + "name": "c6i_32xlarge" + }, { "value": "cc1.4xlarge", "name": "cc1_4xlarge" @@ -43692,6 +43728,38 @@ { "value": "vt1.24xlarge", "name": "vt1_24xlarge" + }, + { + "value": "g5.xlarge", + "name": "g5_xlarge" + }, + { + "value": "g5.2xlarge", + "name": "g5_2xlarge" + }, + { + "value": "g5.4xlarge", + "name": "g5_4xlarge" + }, + { + "value": "g5.8xlarge", + "name": "g5_8xlarge" + }, + { + "value": "g5.12xlarge", + "name": "g5_12xlarge" + }, + { + "value": "g5.16xlarge", + "name": "g5_16xlarge" + }, + { + "value": "g5.24xlarge", + "name": "g5_24xlarge" + }, + { + "value": "g5.48xlarge", + "name": "g5_48xlarge" } ] } @@ -49821,6 +49889,12 @@ "traits": { "smithy.api#documentation": "

      The customer-owned IPv4 address pool associated with the subnet.

      \n

      You must set this value when you specify true for MapCustomerOwnedIpOnLaunch.

      " } + }, + "EnableDns64": { + "target": "com.amazonaws.ec2#AttributeBooleanValue", + "traits": { + "smithy.api#documentation": "

      Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet \n should return synthetic IPv6 addresses for IPv4-only destinations.

      " + } } } }, @@ -64959,6 +65033,14 @@ "smithy.api#documentation": "

      The Amazon Resource Name (ARN) of the Outpost.

      ", "smithy.api#xmlName": "outpostArn" } + }, + "EnableDns64": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "EnableDns64", + "smithy.api#documentation": "

      Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet \n should return synthetic IPv6 addresses for IPv4-only destinations.

      ", + "smithy.api#xmlName": "enableDns64" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/eks.json b/codegen/sdk-codegen/aws-models/eks.json index 4a610d7476fc..041639c43d0d 100644 --- a/codegen/sdk-codegen/aws-models/eks.json +++ b/codegen/sdk-codegen/aws-models/eks.json @@ -183,6 +183,19 @@ } ] }, + "com.amazonaws.eks#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.eks#String" + } + }, + "traits": { + "smithy.api#documentation": "

      You don't have permissions to perform the requested operation. The user or role that\n is making the request must have at least one IAM permissions policy attached that\n grants the required permissions. For more information, see Access\n Management in the IAM User Guide.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, "com.amazonaws.eks#Addon": { "type": "structure", "members": { @@ -248,7 +261,7 @@ } }, "traits": { - "smithy.api#documentation": "

      An Amazon EKS add-on.

      " + "smithy.api#documentation": "

      An Amazon EKS add-on. For more information, see Amazon EKS add-ons in\n the Amazon EKS User Guide.

      " } }, "com.amazonaws.eks#AddonHealth": { @@ -983,7 +996,7 @@ "roleArn": { "target": "com.amazonaws.eks#String", "traits": { - "smithy.api#documentation": "

      The Amazon Resource Name (ARN) of the role that is used by the EKS connector to communicate with AWS services from the connected Kubernetes cluster.

      " + "smithy.api#documentation": "

      The Amazon Resource Name (ARN) of the role to communicate with services from the connected Kubernetes cluster.

      " } } }, @@ -1020,7 +1033,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Creates an Amazon EKS add-on.

      \n

      Amazon EKS add-ons help to automate the provisioning and lifecycle management of common\n operational software for Amazon EKS clusters. Amazon EKS add-ons can only be used with Amazon EKS\n clusters running version 1.18 with platform version eks.3 or later because\n add-ons rely on the Server-side Apply Kubernetes feature, which is only available in\n Kubernetes 1.18 and later.

      ", + "smithy.api#documentation": "

      Creates an Amazon EKS add-on.

      \n

      Amazon EKS add-ons help to automate the provisioning and lifecycle management\n of common operational software for Amazon EKS clusters. Amazon EKS\n add-ons require clusters running version 1.18 or later because Amazon EKS\n add-ons rely on the Server-side Apply Kubernetes feature, which is only available in\n Kubernetes 1.18 and later. For more information, see Amazon EKS add-ons in\n the Amazon EKS User Guide.

      ", "smithy.api#http": { "method": "POST", "uri": "/clusters/{clusterName}/addons", @@ -1740,6 +1753,9 @@ "target": "com.amazonaws.eks#DeregisterClusterResponse" }, "errors": [ + { + "target": "com.amazonaws.eks#AccessDeniedException" + }, { "target": "com.amazonaws.eks#ClientException" }, @@ -2976,7 +2992,7 @@ "code": { "target": "com.amazonaws.eks#NodegroupIssueCode", "traits": { - "smithy.api#documentation": "

      A brief description of the error.

      \n
        \n
      • \n

        \n AccessDenied: Amazon EKS or one or more of your\n managed nodes is failing to authenticate or authorize with your Kubernetes\n cluster API server.

        \n
      • \n
      • \n

        \n AsgInstanceLaunchFailures: Your Auto Scaling group is\n experiencing failures while attempting to launch instances.

        \n
      • \n
      • \n

        \n AutoScalingGroupNotFound: We couldn't find\n the Auto Scaling group associated with the managed node group. You may be able to\n recreate an Auto Scaling group with the same settings to recover.

        \n
      • \n
      • \n

        \n ClusterUnreachable: Amazon EKS or one or more of\n your managed nodes is unable to to communicate with your Kubernetes cluster API\n server. This can happen if there are network disruptions or if API servers are\n timing out processing requests.

        \n
      • \n
      • \n

        \n Ec2LaunchTemplateNotFound: We couldn't find\n the Amazon EC2 launch template for your managed node group. You may be able to\n recreate a launch template with the same settings to recover.

        \n
      • \n
      • \n

        \n Ec2LaunchTemplateVersionMismatch: The Amazon EC2\n launch template version for your managed node group does not match the version\n that Amazon EKS created. You may be able to revert to the version that Amazon EKS created\n to recover.

        \n
      • \n
      • \n

        \n Ec2SecurityGroupDeletionFailure: We could not\n delete the remote access security group for your managed node group. Remove any\n dependencies from the security group.

        \n
      • \n
      • \n

        \n Ec2SecurityGroupNotFound: We couldn't find\n the cluster security group for the cluster. You must recreate your\n cluster.

        \n
      • \n
      • \n

        \n Ec2SubnetInvalidConfiguration: One or more\n Amazon EC2 subnets specified for a node group do not automatically assign public IP\n addresses to instances launched into it. If you want your instances to be\n assigned a public IP address, then you need to enable the auto-assign\n public IP address setting for the subnet. See Modifying\n the public IPv4 addressing attribute for your subnet in the Amazon\n VPC User Guide.

        \n
      • \n
      • \n

        \n IamInstanceProfileNotFound: We couldn't find\n the IAM instance profile for your managed node group. You may be able to\n recreate an instance profile with the same settings to recover.

        \n
      • \n
      • \n

        \n IamNodeRoleNotFound: We couldn't find the\n IAM role for your managed node group. You may be able to recreate an IAM role\n with the same settings to recover.

        \n
      • \n
      • \n

        \n InstanceLimitExceeded: Your Amazon Web Services account is\n unable to launch any more instances of the specified instance type. You may be\n able to request an Amazon EC2 instance limit increase to recover.

        \n
      • \n
      • \n

        \n InsufficientFreeAddresses: One or more of the\n subnets associated with your managed node group does not have enough available\n IP addresses for new nodes.

        \n
      • \n
      • \n

        \n InternalFailure: These errors are usually\n caused by an Amazon EKS server-side issue.

        \n
      • \n
      • \n

        \n NodeCreationFailure: Your launched instances\n are unable to register with your Amazon EKS cluster. Common causes of this failure\n are insufficient node IAM role\n permissions or lack of outbound internet access for the nodes.

        \n
      • \n
      " + "smithy.api#documentation": "

      A brief description of the error.

      \n
        \n
      • \n

        \n AccessDenied: Amazon EKS or one or more of your\n managed nodes is failing to authenticate or authorize with your Kubernetes\n cluster API server.

        \n
      • \n
      • \n

        \n AsgInstanceLaunchFailures: Your Auto Scaling group is\n experiencing failures while attempting to launch instances.

        \n
      • \n
      • \n

        \n AutoScalingGroupNotFound: We couldn't find\n the Auto Scaling group associated with the managed node group. You may be able to\n recreate an Auto Scaling group with the same settings to recover.

        \n
      • \n
      • \n

        \n ClusterUnreachable: Amazon EKS or one or more of\n your managed nodes is unable to to communicate with your Kubernetes cluster API\n server. This can happen if there are network disruptions or if API servers are\n timing out processing requests.

        \n
      • \n
      • \n

        \n Ec2LaunchTemplateNotFound: We couldn't find\n the Amazon EC2 launch template for your managed node group. You may be able to\n recreate a launch template with the same settings to recover.

        \n
      • \n
      • \n

        \n Ec2LaunchTemplateVersionMismatch: The Amazon EC2\n launch template version for your managed node group does not match the version\n that Amazon EKS created. You may be able to revert to the version that Amazon EKS created\n to recover.

        \n
      • \n
      • \n

        \n Ec2SecurityGroupDeletionFailure: We could not\n delete the remote access security group for your managed node group. Remove any\n dependencies from the security group.

        \n
      • \n
      • \n

        \n Ec2SecurityGroupNotFound: We couldn't find\n the cluster security group for the cluster. You must recreate your\n cluster.

        \n
      • \n
      • \n

        \n Ec2SubnetInvalidConfiguration: One or more\n Amazon EC2 subnets specified for a node group do not automatically assign public IP\n addresses to instances launched into it. If you want your instances to be\n assigned a public IP address, then you need to enable the auto-assign\n public IP address setting for the subnet. See Modifying\n the public IPv4 addressing attribute for your subnet in the Amazon\n VPC User Guide.

        \n
      • \n
      • \n

        \n IamInstanceProfileNotFound: We couldn't find\n the IAM instance profile for your managed node group. You may be able to\n recreate an instance profile with the same settings to recover.

        \n
      • \n
      • \n

        \n IamNodeRoleNotFound: We couldn't find the\n IAM role for your managed node group. You may be able to recreate an IAM role\n with the same settings to recover.

        \n
      • \n
      • \n

        \n InstanceLimitExceeded: Your Amazon Web Services account is\n unable to launch any more instances of the specified instance type. You may be\n able to request an Amazon EC2 instance limit increase to recover.

        \n
      • \n
      • \n

        \n InsufficientFreeAddresses: One or more of the\n subnets associated with your managed node group does not have enough available\n IP addresses for new nodes.

        \n
      • \n
      • \n

        \n InternalFailure: These errors are usually\n caused by an Amazon EKS server-side issue.

        \n
      • \n
      • \n

        \n NodeCreationFailure: Your launched instances\n are unable to register with your Amazon EKS cluster. Common causes of this failure\n are insufficient node IAM role\n permissions or lack of outbound internet access for the nodes.

        \n
      • \n
      " } }, "message": { @@ -3008,7 +3024,7 @@ "serviceIpv4Cidr": { "target": "com.amazonaws.eks#String", "traits": { - "smithy.api#documentation": "

      The CIDR block to assign Kubernetes service IP addresses from. If you don't specify a\n block, Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR\n blocks. We recommend that you specify a block that does not overlap with resources in\n other networks that are peered or connected to your VPC. The block must meet the\n following requirements:

      \n
        \n
      • \n

        Within one of the following private IP address blocks: 10.0.0.0/8,\n 172.16.0.0.0/12, or 192.168.0.0/16.

        \n
      • \n
      • \n

        Doesn't overlap with any CIDR block assigned to the VPC that you selected for\n VPC.

        \n
      • \n
      • \n

        Between /24 and /12.

        \n
      • \n
      \n \n

      You can only specify a custom CIDR block when you create a cluster and can't\n change this value once the cluster is created.

      \n
      " + "smithy.api#documentation": "

      The CIDR block to assign Kubernetes service IP addresses from. If you don't specify a\n block, Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR\n blocks. We recommend that you specify a block that does not overlap with resources in\n other networks that are peered or connected to your VPC. The block must meet the\n following requirements:

      \n
        \n
      • \n

        Within one of the following private IP address blocks: 10.0.0.0/8,\n 172.16.0.0/12, or 192.168.0.0/16.

        \n
      • \n
      • \n

        Doesn't overlap with any CIDR block assigned to the VPC that you selected for\n VPC.

        \n
      • \n
      • \n

        Between /24 and /12.

        \n
      • \n
      \n \n

      You can only specify a custom CIDR block when you create a cluster and can't\n change this value once the cluster is created.

      \n
      " } } }, @@ -4013,7 +4029,7 @@ "desiredSize": { "target": "com.amazonaws.eks#ZeroCapacity", "traits": { - "smithy.api#documentation": "

      The current number of nodes that the managed node group should maintain.

      " + "smithy.api#documentation": "

      The current number of nodes that the managed node group should maintain.

      \n \n

      If you use Cluster Autoscaler, you shouldn't change the desiredSize value\n directly, as this can cause the Cluster Autoscaler to suddenly scale up or scale\n down.

      \n
      \n

      Whenever this parameter changes, the number of worker nodes in the node group is\n updated to the specified size. If this parameter is given a value that is smaller than\n the current number of running worker nodes, the necessary number of worker nodes are\n terminated to match the given value.\n \n When using CloudFormation, no action occurs if you remove this parameter from your CFN\n template.

      \n

      This parameter can be different from minSize in some cases, such as when starting with\n extra hosts for testing. This parameter can also be different when you want to start\n with an estimated number of needed hosts, but let Cluster Autoscaler reduce the number\n if there are too many. When Cluster Autoscaler is used, the desiredSize parameter is\n altered by Cluster Autoscaler (but can be out-of-date for short periods of time).\n Cluster Autoscaler doesn't scale a managed node group lower than minSize or higher than\n maxSize.

      " } } }, @@ -4284,6 +4300,9 @@ "target": "com.amazonaws.eks#RegisterClusterResponse" }, "errors": [ + { + "target": "com.amazonaws.eks#AccessDeniedException" + }, { "target": "com.amazonaws.eks#ClientException" }, @@ -4301,7 +4320,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Connects a Kubernetes cluster to the Amazon EKS control plane.

      \n

      Any Kubernetes cluster can be connected to the Amazon EKS control plane to view current information about the cluster and its nodes.\n

      \n

      Cluster connection requires two steps. First, send a \n RegisterClusterRequest\n to add it to the Amazon EKS control plane.

      \n

      Second, a Manifest containing the activationID and activationCode must be applied to the Kubernetes cluster through it's native provider to provide visibility.

      \n \n

      After the Manifest is updated and applied, then the connected cluster is visible to the Amazon EKS control plane. If the Manifest is not applied within a set amount of time, \n then the connected cluster will no longer be visible and must be deregistered. See DeregisterCluster.

      ", + "smithy.api#documentation": "

      Connects a Kubernetes cluster to the Amazon EKS control plane.

      \n

      Any Kubernetes cluster can be connected to the Amazon EKS control plane to view current information about the cluster and its nodes.\n

      \n

      Cluster connection requires two steps. First, send a \n RegisterClusterRequest\n to add it to the Amazon EKS control plane.

      \n

      Second, a Manifest containing the activationID and activationCode must be applied to the Kubernetes cluster through it's native provider to provide visibility.

      \n \n

      After the Manifest is updated and applied, then the connected cluster is visible to the Amazon EKS control plane. If the Manifest is not applied within three days, \n then the connected cluster will no longer be visible and must be deregistered. See DeregisterCluster.

      ", "smithy.api#http": { "method": "POST", "uri": "/cluster-registrations", @@ -4315,7 +4334,7 @@ "name": { "target": "com.amazonaws.eks#ClusterName", "traits": { - "smithy.api#documentation": "

      Define a unique name for this cluster within your AWS account.

      ", + "smithy.api#documentation": "

      Define a unique name for this cluster for your Region.

      ", "smithy.api#required": {} } }, @@ -4332,6 +4351,12 @@ "smithy.api#documentation": "

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

      ", "smithy.api#idempotencyToken": {} } + }, + "tags": { + "target": "com.amazonaws.eks#TagMap", + "traits": { + "smithy.api#documentation": "

      The metadata that you apply to the cluster to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n define. Cluster tags do not propagate to any other resources associated with the\n cluster.

      " + } } } }, diff --git a/codegen/sdk-codegen/aws-models/kendra.json b/codegen/sdk-codegen/aws-models/kendra.json index 1a2083f1ab39..46233b5e3473 100644 --- a/codegen/sdk-codegen/aws-models/kendra.json +++ b/codegen/sdk-codegen/aws-models/kendra.json @@ -3919,7 +3919,7 @@ } }, "com.amazonaws.kendra#DocumentAttributeValue": { - "type": "union", + "type": "structure", "members": { "StringValue": { "target": "com.amazonaws.kendra#DocumentAttributeStringValue", diff --git a/codegen/sdk-codegen/aws-models/location.json b/codegen/sdk-codegen/aws-models/location.json index 4add6455bc2e..83a26bc6ede7 100644 --- a/codegen/sdk-codegen/aws-models/location.json +++ b/codegen/sdk-codegen/aws-models/location.json @@ -895,7 +895,7 @@ } ], "traits": { - "smithy.api#documentation": "

      \n Calculates a route given the following required parameters:\n DeparturePostiton and DestinationPosition. Requires that\n you first create a\n route calculator resource\n

      \n

      By default, a request that doesn't specify a departure time uses the best time of day\n to travel with the best traffic conditions when calculating the route.

      \n

      Additional options include:

      \n
        \n
      • \n

        \n Specifying a departure time using either DepartureTime or\n DepartureNow. This calculates a route based on predictive\n traffic data at the given time.

        \n \n

        You can't specify both DepartureTime and\n DepartureNow in a single request. Specifying both\n parameters returns an error message.

        \n
        \n
      • \n
      • \n

        \n Specifying a travel mode using TravelMode. This lets you specify an\n additional route preference such as CarModeOptions if traveling by\n Car, or TruckModeOptions if traveling by\n Truck.

        \n
      • \n
      \n

      \n

      ", + "smithy.api#documentation": "

      \n Calculates a route given the following required parameters:\n DeparturePostiton and DestinationPosition. Requires that\n you first create a\n route calculator resource.

      \n

      By default, a request that doesn't specify a departure time uses the best time of day\n to travel with the best traffic conditions when calculating the route.

      \n

      Additional options include:

      \n
        \n
      • \n

        \n Specifying a departure time using either DepartureTime or\n DepartureNow. This calculates a route based on predictive\n traffic data at the given time.

        \n \n

        You can't specify both DepartureTime and\n DepartureNow in a single request. Specifying both\n parameters returns a validation error.

        \n
        \n
      • \n
      • \n

        \n Specifying a travel mode using TravelMode. This lets you specify an\n additional route preference such as CarModeOptions if traveling by\n Car, or TruckModeOptions if traveling by\n Truck.

        \n
      • \n
      \n

      \n

      ", "smithy.api#endpoint": { "hostPrefix": "routes." }, @@ -933,7 +933,7 @@ "CalculatorName": { "target": "com.amazonaws.location#ResourceName", "traits": { - "smithy.api#documentation": "

      The name of the route calculator resource that you want to use to calculate a route.

      ", + "smithy.api#documentation": "

      The name of the route calculator resource that you want to use to calculate the route.

      ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -970,7 +970,7 @@ "DepartureTime": { "target": "com.amazonaws.location#Timestamp", "traits": { - "smithy.api#documentation": "

      Specifies the desired time of departure. Uses the given time to calculate a route.\n Otherwise, the best time of day to travel with the best traffic conditions is used to\n calculate the route.

      \n \n

      Setting a departure time in the past returns a 400\n ValidationException error.

      \n
      \n
        \n
      • \n

        In ISO\n 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. For example,\n 2020–07-2T12:15:20.000Z+01:00\n

        \n
      • \n
      " + "smithy.api#documentation": "

      Specifies the desired time of departure. Uses the given time to calculate the route.\n Otherwise, the best time of day to travel with the best traffic conditions is used to\n calculate the route.

      \n \n

      Setting a departure time in the past returns a 400\n ValidationException error.

      \n
      \n
        \n
      • \n

        In ISO\n 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. For example,\n 2020–07-2T12:15:20.000Z+01:00\n

        \n
      • \n
      " } }, "DepartNow": { @@ -1067,7 +1067,7 @@ "DistanceUnit": { "target": "com.amazonaws.location#DistanceUnit", "traits": { - "smithy.api#documentation": "

      The unit of measurement for the distance.

      ", + "smithy.api#documentation": "

      The unit of measurement for route distances.

      ", "smithy.api#required": {} } } @@ -1213,7 +1213,7 @@ "Tags": { "target": "com.amazonaws.location#TagMap", "traits": { - "smithy.api#documentation": "

      Applies one or more tags to the geofence collection. A tag is a key-value pair helps\n manage, identify, search, and filter your resources by labelling them.

      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource

        \n
      • \n
      • \n

        Each resource tag must be unique with a maximum of one value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters:\n + - = . _ : / @.

        \n
      • \n
      " + "smithy.api#documentation": "

      Applies one or more tags to the geofence collection. A tag is a key-value pair helps\n manage, identify, search, and filter your resources by labelling them.

      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource

        \n
      • \n
      • \n

        Each resource tag must be unique with a maximum of one value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters:\n + - = . _ : / @.

        \n
      • \n
      • \n

        Cannot use \"aws:\" as a prefix for a key.

        \n
      • \n
      " } }, "KmsKeyId": { @@ -1321,7 +1321,7 @@ "Tags": { "target": "com.amazonaws.location#TagMap", "traits": { - "smithy.api#documentation": "

      Applies one or more tags to the map resource. A tag is a key-value pair helps manage,\n identify, search, and filter your resources by labelling them.

      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource

        \n
      • \n
      • \n

        Each resource tag must be unique with a maximum of one value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : /\n @.

        \n
      • \n
      " + "smithy.api#documentation": "

      Applies one or more tags to the map resource. A tag is a key-value pair helps manage,\n identify, search, and filter your resources by labelling them.

      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource

        \n
      • \n
      • \n

        Each resource tag must be unique with a maximum of one value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : /\n @.

        \n
      • \n
      • \n

        Cannot use \"aws:\" as a prefix for a key.

        \n
      • \n
      " } } } @@ -1378,7 +1378,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Creates a place index resource in your AWS account, which supports functions with\n geospatial data sourced from your chosen data provider.

      ", + "smithy.api#documentation": "

      Creates a place index resource in your AWS account. Use a place index resource to\n geocode addresses and other text queries by using the SearchPlaceIndexForText operation,\n and reverse geocode coordinates by using the SearchPlaceIndexForPosition operation.

      ", "smithy.api#endpoint": { "hostPrefix": "places." }, @@ -1403,7 +1403,7 @@ "DataSource": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

      Specifies the data provider of geospatial data.

      \n \n

      This field is case-sensitive. Enter the valid values as shown. For example, entering\n HERE returns an error.

      \n
      \n

      Valid values include:

      \n \n

      For additional information , see Data providers\n on the Amazon Location Service Developer Guide.

      ", + "smithy.api#documentation": "

      Specifies the geospatial data provider for the new place index.

      \n \n

      This field is case-sensitive. Enter the valid values as shown. For example, entering\n HERE returns an error.

      \n
      \n

      Valid values include:

      \n \n

      For additional information , see Data providers\n on the Amazon Location Service Developer Guide.

      ", "smithy.api#required": {} } }, @@ -1429,7 +1429,7 @@ "Tags": { "target": "com.amazonaws.location#TagMap", "traits": { - "smithy.api#documentation": "

      Applies one or more tags to the place index resource. A tag is a key-value pair helps\n manage, identify, search, and filter your resources by labelling them.

      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource

        \n
      • \n
      • \n

        Each resource tag must be unique with a maximum of one value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + -\n = . _ : / @.

        \n
      • \n
      " + "smithy.api#documentation": "

      Applies one or more tags to the place index resource. A tag is a key-value pair that helps you\n manage, identify, search, and filter your resources.

      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource.

        \n
      • \n
      • \n

        Each tag key must be unique and must have exactly one associated value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8.

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8.

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + -\n = . _ : / @

        \n
      • \n
      • \n

        Cannot use \"aws:\" as a prefix for a key.

        \n
      • \n
      " } } } @@ -1531,7 +1531,7 @@ "Tags": { "target": "com.amazonaws.location#TagMap", "traits": { - "smithy.api#documentation": "

      Applies one or more tags to the route calculator resource. A tag is a key-value pair\n helps manage, identify, search, and filter your resources by labelling them.

      \n
        \n
      • \n

        For example: { \"tag1\" : \"value1\", \"tag2\" :\n \"value2\"}

        \n
      • \n
      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource

        \n
      • \n
      • \n

        Each resource tag must be unique with a maximum of one value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters:\n + - = . _ : / @.

        \n
      • \n
      " + "smithy.api#documentation": "

      Applies one or more tags to the route calculator resource. A tag is a key-value pair\n helps manage, identify, search, and filter your resources by labelling them.

      \n
        \n
      • \n

        For example: { \"tag1\" : \"value1\", \"tag2\" :\n \"value2\"}

        \n
      • \n
      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource

        \n
      • \n
      • \n

        Each resource tag must be unique with a maximum of one value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters:\n + - = . _ : / @.

        \n
      • \n
      • \n

        Cannot use \"aws:\" as a prefix for a key.

        \n
      • \n
      " } } } @@ -1638,13 +1638,13 @@ "Tags": { "target": "com.amazonaws.location#TagMap", "traits": { - "smithy.api#documentation": "

      Applies one or more tags to the tracker resource. A tag is a key-value pair helps\n manage, identify, search, and filter your resources by labelling them.

      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource

        \n
      • \n
      • \n

        Each resource tag must be unique with a maximum of one value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters:\n + - = . _ : / @.

        \n
      • \n
      " + "smithy.api#documentation": "

      Applies one or more tags to the tracker resource. A tag is a key-value pair helps\n manage, identify, search, and filter your resources by labelling them.

      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource

        \n
      • \n
      • \n

        Each resource tag must be unique with a maximum of one value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters:\n + - = . _ : / @.

        \n
      • \n
      • \n

        Cannot use \"aws:\" as a prefix for a key.

        \n
      • \n
      " } }, "PositionFiltering": { "target": "com.amazonaws.location#PositionFiltering", "traits": { - "smithy.api#documentation": "

      Specifies the position filtering for the tracker resource.

      \n

      Valid values:

      \n
        \n
      • \n

        \n TimeBased - Location updates are evaluated against linked geofence collections, \n but not every location update is stored. If your update frequency is more often than 30 seconds, \n only one update per 30 seconds is stored for each unique device ID.\n

        \n
      • \n
      • \n

        \n DistanceBased - If the device has moved less than 30 m (98.4 ft), location updates are \n ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. \n This helps control costs by reducing the number of geofence evaluations and device positions to retrieve. \n Distance-based filtering can also reduce the jitter effect when displaying device trajectory on a map.\n

        \n
      • \n
      \n

      This field is optional. If not specified, the default value is TimeBased.

      " + "smithy.api#documentation": "

      Specifies the position filtering for the tracker resource.

      \n

      Valid values:

      \n
        \n
      • \n

        \n TimeBased - Location updates are evaluated against linked geofence collections, \n but not every location update is stored. If your update frequency is more often than 30 seconds, \n only one update per 30 seconds is stored for each unique device ID.\n

        \n
      • \n
      • \n

        \n DistanceBased - If the device has moved less than 30 m (98.4 ft), location updates are \n ignored. Location updates within this area are neither evaluated against linked geofence collections, nor stored.\n This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through.\n Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.\n

        \n
      • \n
      \n

      This field is optional. If not specified, the default value is TimeBased.

      " } } } @@ -1681,7 +1681,7 @@ "IntendedUse": { "target": "com.amazonaws.location#IntendedUse", "traits": { - "smithy.api#documentation": "

      Specifies how the results of an operation will be stored by the caller.

      \n

      Valid values include:

      \n
        \n
      • \n

        \n SingleUse specifies that the results won't be stored.

        \n
      • \n
      • \n

        \n Storage specifies that the result can be cached or stored in a database.

        \n
      • \n
      \n

      Default value: SingleUse\n

      " + "smithy.api#documentation": "

      Specifies how the results of an operation will be stored by the caller.

      \n

      Valid values include:

      \n
        \n
      • \n

        \n SingleUse specifies that the results won't be stored.

        \n
      • \n
      • \n

        \n Storage specifies that the result can be cached or stored in a database.

        \n
      • \n
      \n

      Default value: SingleUse\n

      " } } }, @@ -2300,7 +2300,7 @@ "DataSource": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

      The data provider of geospatial data. Indicates one of the available providers:

      \n
        \n
      • \n

        \n Esri\n

        \n
      • \n
      • \n

        \n Here\n

        \n
      • \n
      \n

      For additional details on data providers, see Amazon Location Service data providers.

      ", + "smithy.api#documentation": "

      The data provider of geospatial data. Values can be one of the following:

      \n
        \n
      • \n

        \n Esri\n

        \n
      • \n
      • \n

        \n Here\n

        \n
      • \n
      \n

      For more information about data providers, see Amazon Location Service data providers.

      ", "smithy.api#required": {} } }, @@ -3501,6 +3501,15 @@ } } }, + "com.amazonaws.location#LanguageTag": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 35 + } + } + }, "com.amazonaws.location#Leg": { "type": "structure", "members": { @@ -4213,7 +4222,7 @@ "NextToken": { "target": "com.amazonaws.location#Token", "traits": { - "smithy.api#documentation": "

      A pagination token indicating there are additional pages available. You can use the\n token in a following request to fetch the next set of results.

      " + "smithy.api#documentation": "

      A pagination token indicating that there are additional pages available. You can use the\n token in a new request to fetch the next page of results.

      " } } } @@ -4238,7 +4247,7 @@ "DataSource": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

      The data provider of geospatial data. Indicates one of the available providers:

      \n
        \n
      • \n

        \n Esri\n

        \n
      • \n
      • \n

        \n Here\n

        \n
      • \n
      \n

      For additional details on data providers, see Amazon Location Service data providers.

      ", + "smithy.api#documentation": "

      The data provider of geospatial data. Values can be one of the following:

      \n
        \n
      • \n

        \n Esri\n

        \n
      • \n
      • \n

        \n Here\n

        \n
      • \n
      \n

      For more information about data providers, see Amazon Location Service data providers.

      ", "smithy.api#required": {} } }, @@ -4700,6 +4709,21 @@ }, "com.amazonaws.location#LocationService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Location", + "arnNamespace": "geo", + "cloudFormationName": "LocationService", + "cloudTrailEventSource": "geo.amazonaws.com", + "endpointPrefix": "geo" + }, + "aws.auth#sigv4": { + "name": "geo" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Suite of geospatial services including Maps, Places, Routes, Tracking, and Geofencing", + "smithy.api#title": "Amazon Location Service" + }, "version": "2020-11-19", "resources": [ { @@ -4720,22 +4744,7 @@ { "target": "com.amazonaws.location#TrackerResource" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Location", - "arnNamespace": "geo", - "cloudFormationName": "LocationService", - "cloudTrailEventSource": "geo.amazonaws.com", - "endpointPrefix": "geo" - }, - "aws.auth#sigv4": { - "name": "geo" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Suite of geospatial services including Maps, Places, Routes, Tracking, and Geofencing", - "smithy.api#title": "Amazon Location Service" - } + ] }, "com.amazonaws.location#MapConfiguration": { "type": "structure", @@ -4850,7 +4859,7 @@ "SubRegion": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

      A country, or an area that's part of a larger region . For example, Metro\n Vancouver.

      " + "smithy.api#documentation": "

      A country, or an area that's part of a larger region. For example, Metro\n Vancouver.

      " } }, "Region": { @@ -4870,6 +4879,18 @@ "traits": { "smithy.api#documentation": "

      A group of numbers and letters in a country-specific format, which accompanies the\n address for the purpose of identifying a location.

      " } + }, + "Interpolated": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

      \n True if the result is interpolated from other known places.

      \n

      \n False if the Place is a known place.

      \n

      Not returned when the partner does not provide the information.

      \n

      For example, returns False for an address location that is found in the \n partner data, but returns True if an address does not exist in the partner\n data and its location is calculated by interpolating between other known addresses.\n

      " + } + }, + "TimeZone": { + "target": "com.amazonaws.location#TimeZone", + "traits": { + "smithy.api#documentation": "

      The time zone in which the Place is located. Returned only when using \n Here as the selected partner.

      " + } } }, "traits": { @@ -4961,11 +4982,15 @@ "smithy.api#enum": [ { "value": "TimeBased", - "documentation": "Filtering device position updates based on time" + "documentation": "Filters device position updates according to their sample time" }, { "value": "DistanceBased", - "documentation": "Filtering device position updates based on distance" + "documentation": "Filters device position updates according to the distance between them" + }, + { + "value": "AccuracyBased", + "documentation": "Filters device position updates according to their accuracy" } ] } @@ -5162,13 +5187,23 @@ "Place": { "target": "com.amazonaws.location#Place", "traits": { - "smithy.api#documentation": "

      Contains details about the relevant point of interest.

      ", + "smithy.api#documentation": "

      Details about the search result, such as its address and position.

      ", + "smithy.api#required": {} + } + }, + "Distance": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

      The distance in meters of a great-circle arc between the query position and the \n result.

      \n \n

      A great-circle arc is the shortest path on a sphere, in this case the \n Earth. This returns the shortest distance between two locations.

      \n
      ", + "smithy.api#range": { + "min": 0 + }, "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

      Specifies a single point of interest, or Place as a result of a search query obtained\n from a dataset configured in the place index resource.

      " + "smithy.api#documentation": "

      Contains a search result from a position search query that is run on a place index resource.

      " } }, "com.amazonaws.location#SearchForPositionResultList": { @@ -5183,13 +5218,32 @@ "Place": { "target": "com.amazonaws.location#Place", "traits": { - "smithy.api#documentation": "

      Contains details about the relevant point of interest.

      ", + "smithy.api#documentation": "

      Details about the search result, such as its address and position.

      ", "smithy.api#required": {} } + }, + "Distance": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

      The distance in meters of a great-circle arc between the bias position specified \n and the result. Distance will be returned only if a bias position was \n specified in the query.

      \n \n

      A great-circle arc is the shortest path on a sphere, in this case the \n Earth. This returns the shortest distance between two locations.

      \n
      ", + "smithy.api#range": { + "min": 0 + } + } + }, + "Relevance": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "

      The relative confidence in the match for a result among the results returned. For \n example, if more fields for an address match (including house number, street, city, \n country/region, and postal code), the relevance score is closer to 1.

      \n

      Returned only when the partner selected is Esri.

      ", + "smithy.api#range": { + "min": 0, + "max": 1 + } + } } }, "traits": { - "smithy.api#documentation": "

      Contains relevant Places returned by calling\n SearchPlaceIndexForText.

      " + "smithy.api#documentation": "

      Contains a search result from a text search query that is run on a place index resource.

      " } }, "com.amazonaws.location#SearchForTextResultList": { @@ -5250,14 +5304,20 @@ "Position": { "target": "com.amazonaws.location#Position", "traits": { - "smithy.api#documentation": "

      Specifies a coordinate for the query defined by a longitude, and latitude.

      \n
        \n
      • \n

        The first position is the X coordinate, or longitude.

        \n
      • \n
      • \n

        The second position is the Y coordinate, or latitude.

        \n
      • \n
      \n

      For example, position=xLongitude&position=yLatitude .

      ", + "smithy.api#documentation": "

      Specifies the longitude and latitude of the position to query.

      \n

      \n This parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; \n the second number represents the Y coordinate, or latitude.

      \n

      For example, [-123.1174, 49.2847] represents a position with\n longitude -123.1174 and\n latitude 49.2847.

      ", "smithy.api#required": {} } }, "MaxResults": { "target": "com.amazonaws.location#PlaceIndexSearchResultLimit", "traits": { - "smithy.api#documentation": "

      An optional paramer. The maximum number of results returned per request.

      \n

      Default value: 50\n

      " + "smithy.api#documentation": "

      An optional parameter. The maximum number of results returned per request.

      \n

      Default value: 50\n

      " + } + }, + "Language": { + "target": "com.amazonaws.location#LanguageTag", + "traits": { + "smithy.api#documentation": "

      The preferred language used to return results. The value must be a valid BCP 47 language tag, for example,\n en for English.

      \n

      This setting affects the languages used in the results. It does not change which \n results are returned. If the language is not specified, or not supported for a \n particular result, the partner automatically chooses a language for the result.

      " } } } @@ -5268,7 +5328,7 @@ "Summary": { "target": "com.amazonaws.location#SearchPlaceIndexForPositionSummary", "traits": { - "smithy.api#documentation": "

      Contains a summary of the request.

      ", + "smithy.api#documentation": "

      Contains a summary of the request. Echoes the input values for Position,\n Language, MaxResults, and the DataSource of the place index.\n

      ", "smithy.api#required": {} } }, @@ -5287,26 +5347,32 @@ "Position": { "target": "com.amazonaws.location#Position", "traits": { - "smithy.api#documentation": "

      The position given in the reverse geocoding request.

      ", + "smithy.api#documentation": "

      The position specified in the request.

      ", "smithy.api#required": {} } }, "MaxResults": { "target": "com.amazonaws.location#PlaceIndexSearchResultLimit", "traits": { - "smithy.api#documentation": "

      An optional parameter. The maximum number of results returned per request.

      \n

      Default value: 50\n

      " + "smithy.api#documentation": "

      Contains the optional result count limit that is specified in the request.

      \n

      Default value: 50\n

      " } }, "DataSource": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

      The data provider of geospatial data. Indicates one of the available providers:

      \n
        \n
      • \n

        Esri

        \n
      • \n
      • \n

        HERE

        \n
      • \n
      \n

      For additional details on data providers, see Amazon Location Service data providers.

      ", + "smithy.api#documentation": "

      The geospatial data provider attached to the place index resource specified in the request.\n Values can be one of the following:

      \n
        \n
      • \n

        Esri

        \n
      • \n
      • \n

        Here

        \n
      • \n
      \n

      For more information about data providers, see Amazon Location Service data providers.

      ", "smithy.api#required": {} } + }, + "Language": { + "target": "com.amazonaws.location#LanguageTag", + "traits": { + "smithy.api#documentation": "

      The preferred language used to return results. Matches the language in the request. \n The value is a valid BCP 47 language tag, for example,\n en for English.

      " + } } }, "traits": { - "smithy.api#documentation": "

      A summary of the reverse geocoding request sent using SearchPlaceIndexForPosition.

      " + "smithy.api#documentation": "

      A summary of the request sent by using SearchPlaceIndexForPosition.

      " } }, "com.amazonaws.location#SearchPlaceIndexForText": { @@ -5335,7 +5401,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Geocodes free-form text, such as an address, name, city, or region to allow you to\n search for Places or points of interest.

      \n

      Includes the option to apply additional parameters to narrow your list of\n results.

      \n \n

      You can search for places near a given position using BiasPosition, or\n filter results within a bounding box using FilterBBox. Providing both\n parameters simultaneously returns an error.

      \n
      ", + "smithy.api#documentation": "

      Geocodes free-form text, such as an address, name, city, or region to allow you to\n search for Places or points of interest.

      \n

      Optional parameters let you narrow your search results by bounding box or\n country, or bias your search toward a specific position on the globe.

      \n \n

      You can search for places near a given position using BiasPosition, or\n filter results within a bounding box using FilterBBox. Providing both\n parameters simultaneously returns an error.

      \n
      \n

      Search results are returned in order of highest to lowest relevance.

      ", "smithy.api#endpoint": { "hostPrefix": "places." }, @@ -5361,7 +5427,7 @@ "Text": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

      The address, name,\n city, or region to be used in the search. In free-form text format. For example, 123 Any\n Street.

      ", + "smithy.api#documentation": "

      The address, name,\n city, or region to be used in the search in free-form text format. For example, 123 Any\n Street.

      ", "smithy.api#length": { "min": 1, "max": 200 @@ -5373,19 +5439,19 @@ "BiasPosition": { "target": "com.amazonaws.location#Position", "traits": { - "smithy.api#documentation": "

      Searches for results closest to the given position. An optional parameter defined by\n longitude, and latitude.

      \n
        \n
      • \n

        The first bias position is the X coordinate, or longitude.

        \n
      • \n
      • \n

        The second bias position is the Y coordinate, or latitude.

        \n
      • \n
      \n

      For example, bias=xLongitude&bias=yLatitude.

      " + "smithy.api#documentation": "

      An optional parameter that indicates a preference for places that are closer to a specified position.

      \n

      \n If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the \n second number represents the Y coordinate, or latitude.

      \n

      For example, [-123.1174, 49.2847] represents the position with\n longitude -123.1174 and\n latitude 49.2847.

      \n \n

      \n BiasPosition and FilterBBox are mutually exclusive. Specifying both options \n results in an error.\n

      \n
      " } }, "FilterBBox": { "target": "com.amazonaws.location#BoundingBox", "traits": { - "smithy.api#documentation": "

      Filters the results by returning only Places within the provided bounding box. An\n optional parameter.

      \n

      The first 2 bbox parameters describe the lower southwest corner:

      \n
        \n
      • \n

        The first bbox position is the X coordinate or longitude of the lower\n southwest corner.

        \n
      • \n
      • \n

        The second bbox position is the Y coordinate or latitude of the lower\n southwest corner.

        \n
      • \n
      \n

      For example, bbox=xLongitudeSW&bbox=yLatitudeSW.

      \n

      The next bbox parameters describe the upper northeast corner:

      \n
        \n
      • \n

        The third bbox position is the X coordinate, or longitude of the\n upper northeast corner.

        \n
      • \n
      • \n

        The fourth bbox position is the Y coordinate, or longitude of the\n upper northeast corner.

        \n
      • \n
      \n

      For example, bbox=xLongitudeNE&bbox=yLatitudeNE\n

      " + "smithy.api#documentation": "

      An optional parameter that limits the search results by returning only places that are within the provided bounding box.

      \n

      \n If provided, this parameter must contain a total of four consecutive numbers in two pairs.\n The first pair of numbers represents the X and Y coordinates (longitude and latitude, respectively)\n of the southwest corner of the bounding box; the second pair of numbers represents the X and Y coordinates (longitude and latitude, respectively)\n of the northeast corner of the bounding box.

      \n

      For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents\n a bounding box where the southwest corner has longitude -12.7935 and latitude -37.4835, \n and the northeast corner has longitude -12.0684 and latitude -36.9542.

      \n \n

      \n FilterBBox and BiasPosition are mutually exclusive. Specifying both options results in an error.\n

      \n
      " } }, "FilterCountries": { "target": "com.amazonaws.location#CountryCodeList", "traits": { - "smithy.api#documentation": "

      Limits the search to the given a list of countries/regions. An optional\n parameter.

      \n
        \n
      • \n

        Use the ISO 3166 3-digit\n country code. For example, Australia uses three upper-case characters:\n AUS.

        \n
      • \n
      " + "smithy.api#documentation": "

      An optional parameter that limits the search results by returning only places that are in a specified list of countries.

      \n
        \n
      • \n

        Valid values include ISO 3166 3-digit\n country codes. For example, Australia uses three upper-case characters:\n AUS.

        \n
      • \n
      " } }, "MaxResults": { @@ -5393,6 +5459,12 @@ "traits": { "smithy.api#documentation": "

      An optional parameter. The maximum number of results returned per request.

      \n

      The default: 50\n

      " } + }, + "Language": { + "target": "com.amazonaws.location#LanguageTag", + "traits": { + "smithy.api#documentation": "

      The preferred language used to return results. The value must be a valid BCP 47 language tag, for example,\n en for English.

      \n

      This setting affects the languages used in the results. It does not change which \n results are returned. If the language is not specified, or not supported for a \n particular result, the partner automatically chooses a language for the result.

      " + } } } }, @@ -5402,14 +5474,14 @@ "Summary": { "target": "com.amazonaws.location#SearchPlaceIndexForTextSummary", "traits": { - "smithy.api#documentation": "

      Contains a summary of the request. Contains the BiasPosition,\n DataSource, FilterBBox, FilterCountries,\n MaxResults, ResultBBox, and Text.

      ", + "smithy.api#documentation": "

      Contains a summary of the request. Echoes the input values for BiasPosition,\n FilterBBox, FilterCountries, Language, MaxResults,\n and Text. Also includes the DataSource of the place index and\n the bounding box, ResultBBox, which surrounds the search results.\n

      ", "smithy.api#required": {} } }, "Results": { "target": "com.amazonaws.location#SearchForTextResultList", "traits": { - "smithy.api#documentation": "

      A list of Places closest to the specified position. Each result contains additional\n information about the specific point of interest.

      ", + "smithy.api#documentation": "

      A list of Places matching the input text. Each result contains additional\n information about the specific point of interest.

      ", "smithy.api#required": {} } } @@ -5421,7 +5493,7 @@ "Text": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

      The address, name, city or region to be used in the geocoding request. In free-form text\n format. For example, Vancouver.

      ", + "smithy.api#documentation": "

      The search text specified in the request.

      ", "smithy.api#required": {}, "smithy.api#sensitive": {} } @@ -5429,43 +5501,49 @@ "BiasPosition": { "target": "com.amazonaws.location#Position", "traits": { - "smithy.api#documentation": "

      Contains the coordinates for the bias position entered in the geocoding request.

      " + "smithy.api#documentation": "

      Contains the coordinates for the optional bias position specified in the request.

      " } }, "FilterBBox": { "target": "com.amazonaws.location#BoundingBox", "traits": { - "smithy.api#documentation": "

      Contains the coordinates for the optional bounding box coordinated entered in the\n geocoding request.

      " + "smithy.api#documentation": "

      Contains the coordinates for the optional bounding box specified in the request.

      " } }, "FilterCountries": { "target": "com.amazonaws.location#CountryCodeList", "traits": { - "smithy.api#documentation": "

      Contains the country filter entered in the geocoding request.

      " + "smithy.api#documentation": "

      Contains the optional country filter specified in the request.

      " } }, "MaxResults": { "target": "com.amazonaws.location#PlaceIndexSearchResultLimit", "traits": { - "smithy.api#documentation": "

      Contains the maximum number of results indicated for the request.

      " + "smithy.api#documentation": "

      Contains the optional result count limit specified in the request.

      " } }, "ResultBBox": { "target": "com.amazonaws.location#BoundingBox", "traits": { - "smithy.api#documentation": "

      A bounding box that contains the search results within the specified area indicated by\n FilterBBox. A subset of bounding box specified using\n FilterBBox.

      " + "smithy.api#documentation": "

      The bounding box that fully contains all search results.

      \n \n

      If you specified the optional FilterBBox parameter in the request, ResultBBox \n is contained within FilterBBox.

      \n
      " } }, "DataSource": { "target": "smithy.api#String", "traits": { - "smithy.api#documentation": "

      The data provider of geospatial data. Indicates one of the available providers:

      \n
        \n
      • \n

        Esri

        \n
      • \n
      • \n

        HERE

        \n
      • \n
      \n

      For additional details on data providers, see Amazon Location Service data providers.

      ", + "smithy.api#documentation": "

      The geospatial data provider attached to the place index resource specified in the request.\n Values can be one of the following:

      \n
        \n
      • \n

        Esri

        \n
      • \n
      • \n

        Here

        \n
      • \n
      \n

      For more information about data providers, see Amazon Location Service data providers.

      ", "smithy.api#required": {} } + }, + "Language": { + "target": "com.amazonaws.location#LanguageTag", + "traits": { + "smithy.api#documentation": "

      The preferred language used to return results. Matches the language in the request. \n The value is a valid BCP 47 language tag, for example,\n en for English.

      " + } } }, "traits": { - "smithy.api#documentation": "

      A summary of the geocoding request sent using SearchPlaceIndexForText.

      " + "smithy.api#documentation": "

      A summary of the request sent by using SearchPlaceIndexForText.

      " } }, "com.amazonaws.location#ServiceQuotaExceededException": { @@ -5550,7 +5628,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + "smithy.api#pattern": "^[a-zA-Z+-=._:/]+$" } }, "com.amazonaws.location#TagKeys": { @@ -5630,7 +5708,7 @@ "Tags": { "target": "com.amazonaws.location#TagMap", "traits": { - "smithy.api#documentation": "

      Tags that have been applied to the specified resource. Tags are mapped from the tag key to the tag value: \"TagKey\" : \"TagValue\".

      \n\t
        \n
      • \n

        Format example: {\"tag1\" : \"value1\", \"tag2\" : \"value2\"} \n

        \n
      • \n
      ", + "smithy.api#documentation": "

      Applies one or more tags to specific resource. A tag is a key-value pair that helps you\n manage, identify, search, and filter your resources.

      \n

      Format: \"key\" : \"value\"\n

      \n

      Restrictions:

      \n
        \n
      • \n

        Maximum 50 tags per resource.

        \n
      • \n
      • \n

        Each tag key must be unique and must have exactly one associated value.

        \n
      • \n
      • \n

        Maximum key length: 128 Unicode characters in UTF-8.

        \n
      • \n
      • \n

        Maximum value length: 256 Unicode characters in UTF-8.

        \n
      • \n
      • \n

        Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + -\n = . _ : / @

        \n
      • \n
      • \n

        Cannot use \"aws:\" as a prefix for a key.

        \n
      • \n
      ", "smithy.api#required": {} } } @@ -5668,6 +5746,27 @@ "smithy.api#retryable": {} } }, + "com.amazonaws.location#TimeZone": { + "type": "structure", + "members": { + "Name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

      The name of the time zone, following the \n IANA time zone standard. For example, America/Los_Angeles.

      ", + "smithy.api#required": {} + } + }, + "Offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

      The time zone's offset, in seconds, from UTC.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Information about a time zone. Includes the name of the time zone and the offset\n from UTC in seconds.

      " + } + }, "com.amazonaws.location#Timestamp": { "type": "timestamp", "traits": { diff --git a/codegen/sdk-codegen/aws-models/mediaconvert.json b/codegen/sdk-codegen/aws-models/mediaconvert.json index e9a304e35758..3d062db2083e 100644 --- a/codegen/sdk-codegen/aws-models/mediaconvert.json +++ b/codegen/sdk-codegen/aws-models/mediaconvert.json @@ -1935,7 +1935,7 @@ "BackgroundColor": { "target": "com.amazonaws.mediaconvert#BurninSubtitleBackgroundColor", "traits": { - "smithy.api#documentation": "Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.", + "smithy.api#documentation": "Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.", "smithy.api#jsonName": "backgroundColor" } }, @@ -2109,7 +2109,7 @@ "com.amazonaws.mediaconvert#BurninSubtitleBackgroundColor": { "type": "string", "traits": { - "smithy.api#documentation": "Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present. Within your job settings, all of your DVB-Sub settings must be identical.", + "smithy.api#documentation": "Specify the color of the rectangle behind the captions. Leave background color (BackgroundColor) blank and set Style passthrough (StylePassthrough) to enabled to use the background color data from your input captions, if present.", "smithy.api#enum": [ { "value": "NONE", @@ -3453,7 +3453,7 @@ "AudioRenditionSets": { "target": "com.amazonaws.mediaconvert#__string", "traits": { - "smithy.api#documentation": "List the audio rendition groups that you want included with this video rendition. Use a comma-separated list. For example, say you want to include the audio rendition groups that have the audio group IDs \"audio_aac_1\" and \"audio_dolby\". Then you would specify this value: \"audio_aac_1, audio_dolby\". Related setting: The rendition groups that you include in your comma-separated list should all match values that you specify in the setting Audio group ID (AudioGroupId) for audio renditions in the same output group as this video rendition. Default behavior: If you don't specify anything here and for Audio group ID, MediaConvert puts each audio variant in its own audio rendition group and associates it with every video variant. Each value in your list appears in your HLS parent manifest in the EXT-X-STREAM-INF tag as the value for the AUDIO attribute. To continue the previous example, say that the file name for the child manifest for your video rendition is \"amazing_video_1.m3u8\". Then, in your parent manifest, each value will appear on separate lines, like this: #EXT-X-STREAM-INF:AUDIO=\"audio_aac_1\"... amazing_video_1.m3u8 #EXT-X-STREAM-INF:AUDIO=\"audio_dolby\"... amazing_video_1.m3u8", + "smithy.api#documentation": "List the audio rendition groups that you want included with this video rendition. Use a comma-separated list. For example, say you want to include the audio rendition groups that have the audio group IDs \"audio_aac_1\" and \"audio_dolby\". Then you would specify this value: \"audio_aac_1,audio_dolby\". Related setting: The rendition groups that you include in your comma-separated list should all match values that you specify in the setting Audio group ID (AudioGroupId) for audio renditions in the same output group as this video rendition. Default behavior: If you don't specify anything here and for Audio group ID, MediaConvert puts each audio variant in its own audio rendition group and associates it with every video variant. Each value in your list appears in your HLS parent manifest in the EXT-X-STREAM-INF tag as the value for the AUDIO attribute. To continue the previous example, say that the file name for the child manifest for your video rendition is \"amazing_video_1.m3u8\". Then, in your parent manifest, each value will appear on separate lines, like this: #EXT-X-STREAM-INF:AUDIO=\"audio_aac_1\"... amazing_video_1.m3u8 #EXT-X-STREAM-INF:AUDIO=\"audio_dolby\"... amazing_video_1.m3u8", "smithy.api#jsonName": "audioRenditionSets" } }, @@ -5490,7 +5490,7 @@ "TeletextSpacing": { "target": "com.amazonaws.mediaconvert#DvbSubtitleTeletextSpacing", "traits": { - "smithy.api#documentation": "Specify whether the Text spacing (TextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical.", + "smithy.api#documentation": "Specify whether the Text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical.", "smithy.api#jsonName": "teletextSpacing" } }, @@ -5742,7 +5742,7 @@ "com.amazonaws.mediaconvert#DvbSubtitleTeletextSpacing": { "type": "string", "traits": { - "smithy.api#documentation": "Specify whether the Text spacing (TextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical.", + "smithy.api#documentation": "Specify whether the Text spacing (TeletextSpacing) in your captions is set by the captions grid, or varies depending on letter width. Choose fixed grid (FIXED_GRID) to conform to the spacing specified in the captions file more accurately. Choose proportional (PROPORTIONAL) to make the text easier to read for closed captions. Within your job settings, all of your DVB-Sub settings must be identical.", "smithy.api#enum": [ { "value": "FIXED_GRID", @@ -7554,7 +7554,7 @@ "com.amazonaws.mediaconvert#H264GopSizeUnits": { "type": "string", "traits": { - "smithy.api#documentation": "Indicates if the GOP Size in H264 is specified in frames or seconds. If seconds the system will convert the GOP Size into a frame count at run time.", + "smithy.api#documentation": "Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).", "smithy.api#enum": [ { "value": "FRAMES", @@ -7563,6 +7563,10 @@ { "value": "SECONDS", "name": "SECONDS" + }, + { + "value": "AUTO", + "name": "AUTO" } ] } @@ -7829,21 +7833,21 @@ "GopClosedCadence": { "target": "com.amazonaws.mediaconvert#__integerMin0Max2147483647", "traits": { - "smithy.api#documentation": "Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.", + "smithy.api#documentation": "Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.", "smithy.api#jsonName": "gopClosedCadence" } }, "GopSize": { "target": "com.amazonaws.mediaconvert#__doubleMin0", "traits": { - "smithy.api#documentation": "GOP Length (keyframe interval) in frames or seconds. Must be greater than zero.", + "smithy.api#documentation": "Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.", "smithy.api#jsonName": "gopSize" } }, "GopSizeUnits": { "target": "com.amazonaws.mediaconvert#H264GopSizeUnits", "traits": { - "smithy.api#documentation": "Indicates if the GOP Size in H264 is specified in frames or seconds. If seconds the system will convert the GOP Size into a frame count at run time.", + "smithy.api#documentation": "Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).", "smithy.api#jsonName": "gopSizeUnits" } }, @@ -7878,14 +7882,14 @@ "MinIInterval": { "target": "com.amazonaws.mediaconvert#__integerMin0Max30", "traits": { - "smithy.api#documentation": "Enforces separation between repeated (cadence) I-frames and I-frames inserted by Scene Change Detection. If a scene change I-frame is within I-interval frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. This setting is only used when Scene Change Detect is enabled. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1", + "smithy.api#documentation": "Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.", "smithy.api#jsonName": "minIInterval" } }, "NumberBFramesBetweenReferenceFrames": { "target": "com.amazonaws.mediaconvert#__integerMin0Max7", "traits": { - "smithy.api#documentation": "Specify the number of B-frames that MediaConvert puts between reference frames in this output. Valid values are whole numbers from 0 through 7. When you don't specify a value, MediaConvert defaults to 2.", + "smithy.api#documentation": "This setting to determines the number of B-frames that MediaConvert puts between reference frames in this output. We recommend that you use automatic behavior to allow the transcoder to choose the best value based on characteristics of your input video. In the console, choose AUTO to select this automatic behavior. When you manually edit your JSON job specification, leave this setting out to choose automatic behavior. When you want to specify this number explicitly, choose a whole number from 0 through 7.", "smithy.api#jsonName": "numberBFramesBetweenReferenceFrames" } }, @@ -8359,7 +8363,7 @@ "com.amazonaws.mediaconvert#H265GopSizeUnits": { "type": "string", "traits": { - "smithy.api#documentation": "Indicates if the GOP Size in H265 is specified in frames or seconds. If seconds the system will convert the GOP Size into a frame count at run time.", + "smithy.api#documentation": "Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).", "smithy.api#enum": [ { "value": "FRAMES", @@ -8368,6 +8372,10 @@ { "value": "SECONDS", "name": "SECONDS" + }, + { + "value": "AUTO", + "name": "AUTO" } ] } @@ -8631,21 +8639,21 @@ "GopClosedCadence": { "target": "com.amazonaws.mediaconvert#__integerMin0Max2147483647", "traits": { - "smithy.api#documentation": "Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.", + "smithy.api#documentation": "Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. If you do explicitly specify a value, for segmented outputs, don't set this value to 0.", "smithy.api#jsonName": "gopClosedCadence" } }, "GopSize": { "target": "com.amazonaws.mediaconvert#__doubleMin0", "traits": { - "smithy.api#documentation": "GOP Length (keyframe interval) in frames or seconds. Must be greater than zero.", + "smithy.api#documentation": "Use this setting only when you set GOP mode control (GopSizeUnits) to Specified, frames (FRAMES) or Specified, seconds (SECONDS). Specify the GOP length using a whole number of frames or a decimal value of seconds. MediaConvert will interpret this value as frames or seconds depending on the value you choose for GOP mode control (GopSizeUnits). If you want to allow MediaConvert to automatically determine GOP size, leave GOP size blank and set GOP mode control to Auto (AUTO). If your output group specifies HLS, DASH, or CMAF, leave GOP size blank and set GOP mode control to Auto in each output in your output group.", "smithy.api#jsonName": "gopSize" } }, "GopSizeUnits": { "target": "com.amazonaws.mediaconvert#H265GopSizeUnits", "traits": { - "smithy.api#documentation": "Indicates if the GOP Size in H265 is specified in frames or seconds. If seconds the system will convert the GOP Size into a frame count at run time.", + "smithy.api#documentation": "Specify how the transcoder determines GOP size for this output. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, choose Auto (AUTO) and and leave GOP size (GopSize) blank. By default, if you don't specify GOP mode control (GopSizeUnits), MediaConvert will use automatic behavior. If your output group specifies HLS, DASH, or CMAF, set GOP mode control to Auto and leave GOP size blank in each output in your output group. To explicitly specify the GOP length, choose Specified, frames (FRAMES) or Specified, seconds (SECONDS) and then provide the GOP length in the related setting GOP size (GopSize).", "smithy.api#jsonName": "gopSizeUnits" } }, @@ -8680,7 +8688,7 @@ "MinIInterval": { "target": "com.amazonaws.mediaconvert#__integerMin0Max30", "traits": { - "smithy.api#documentation": "Enforces separation between repeated (cadence) I-frames and I-frames inserted by Scene Change Detection. If a scene change I-frame is within I-interval frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. This setting is only used when Scene Change Detect is enabled. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1", + "smithy.api#documentation": "Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. We recommend that you have the transcoder automatically choose this value for you based on characteristics of your input video. To enable this automatic behavior, keep the default value by leaving this setting out of your JSON job specification. In the console, do this by keeping the default empty value. When you explicitly specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.", "smithy.api#jsonName": "minIInterval" } }, @@ -13312,6 +13320,21 @@ }, "com.amazonaws.mediaconvert#MediaConvert": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "MediaConvert", + "arnNamespace": "mediaconvert", + "cloudFormationName": "MediaConvert", + "cloudTrailEventSource": "mediaconvert.amazonaws.com", + "endpointPrefix": "mediaconvert" + }, + "aws.auth#sigv4": { + "name": "mediaconvert" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "AWS Elemental MediaConvert", + "smithy.api#title": "AWS Elemental MediaConvert" + }, "version": "2017-08-29", "operations": [ { @@ -13398,22 +13421,7 @@ { "target": "com.amazonaws.mediaconvert#UpdateQueue" } - ], - "traits": { - "aws.api#service": { - "sdkId": "MediaConvert", - "arnNamespace": "mediaconvert", - "cloudFormationName": "MediaConvert", - "cloudTrailEventSource": "mediaconvert.amazonaws.com", - "endpointPrefix": "mediaconvert" - }, - "aws.auth#sigv4": { - "name": "mediaconvert" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "AWS Elemental MediaConvert", - "smithy.api#title": "AWS Elemental MediaConvert" - } + ] }, "com.amazonaws.mediaconvert#MotionImageInserter": { "type": "structure", @@ -14314,7 +14322,7 @@ "GopClosedCadence": { "target": "com.amazonaws.mediaconvert#__integerMin0Max2147483647", "traits": { - "smithy.api#documentation": "Frequency of closed GOPs. In streaming applications, it is recommended that this be set to 1 so a decoder joining mid-stream will receive an IDR frame as quickly as possible. Setting this value to 0 will break output segmenting.", + "smithy.api#documentation": "Specify the relative frequency of open to closed GOPs in this output. For example, if you want to allow four open GOPs and then require a closed GOP, set this value to 5. When you create a streaming output, we recommend that you keep the default value, 1, so that players starting mid-stream receive an IDR frame as quickly as possible. Don't set this value to 0; that would break output segmenting.", "smithy.api#jsonName": "gopClosedCadence" } }, @@ -14370,7 +14378,7 @@ "MinIInterval": { "target": "com.amazonaws.mediaconvert#__integerMin0Max30", "traits": { - "smithy.api#documentation": "Enforces separation between repeated (cadence) I-frames and I-frames inserted by Scene Change Detection. If a scene change I-frame is within I-interval frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. GOP stretch requires enabling lookahead as well as setting I-interval. The normal cadence resumes for the next GOP. This setting is only used when Scene Change Detect is enabled. Note: Maximum GOP stretch = GOP size + Min-I-interval - 1", + "smithy.api#documentation": "Use this setting only when you also enable Scene change detection (SceneChangeDetect). This setting determines how the encoder manages the spacing between I-frames that it inserts as part of the I-frame cadence and the I-frames that it inserts for Scene change detection. When you specify a value for this setting, the encoder determines whether to skip a cadence-driven I-frame by the value you set. For example, if you set Min I interval (minIInterval) to 5 and a cadence-driven I-frame would fall within 5 frames of a scene-change I-frame, then the encoder skips the cadence-driven I-frame. In this way, one GOP is shrunk slightly and one GOP is stretched slightly. When the cadence-driven I-frames are farther from the scene-change I-frame than the value you set, then the encoder leaves all I-frames in place and the GOPs surrounding the scene change are smaller than the usual cadence GOPs.", "smithy.api#jsonName": "minIInterval" } }, diff --git a/codegen/sdk-codegen/aws-models/migrationhubstrategy.json b/codegen/sdk-codegen/aws-models/migrationhubstrategy.json new file mode 100644 index 000000000000..f7d1df0fe514 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/migrationhubstrategy.json @@ -0,0 +1,3999 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.migrationhubstrategy#AWSMigrationHubStrategyRecommendation": { + "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "MigrationHubStrategy", + "arnNamespace": "awsmigrationhubstrategyrecommendation", + "cloudFormationName": "AWSMigrationHubStrategyRecommendation", + "cloudTrailEventSource": "migrationhub-strategy.amazonaws.com", + "endpointPrefix": "migrationhub-strategy" + }, + "aws.auth#sigv4": { + "name": "migrationhub-strategy" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Migration Hub Strategy Recommendations\n\n

      This API reference provides descriptions, syntax, and other details about each of the\n actions and data types for Migration Hub Strategy Recommendations (Strategy Recommendations). The topic for each action shows the API\n request parameters and the response. Alternatively, you can use one of the AWS SDKs to access\n an API that is tailored to the programming language or platform that you're using. For more\n information, see AWS SDKs.

      ", + "smithy.api#title": "Migration Hub Strategy Recommendations" + }, + "version": "2020-02-19", + "operations": [ + { + "target": "com.amazonaws.migrationhubstrategy#GetApplicationComponentDetails" + }, + { + "target": "com.amazonaws.migrationhubstrategy#GetApplicationComponentStrategies" + }, + { + "target": "com.amazonaws.migrationhubstrategy#GetAssessment" + }, + { + "target": "com.amazonaws.migrationhubstrategy#GetImportFileTask" + }, + { + "target": "com.amazonaws.migrationhubstrategy#GetPortfolioPreferences" + }, + { + "target": "com.amazonaws.migrationhubstrategy#GetPortfolioSummary" + }, + { + "target": "com.amazonaws.migrationhubstrategy#GetRecommendationReportDetails" + }, + { + "target": "com.amazonaws.migrationhubstrategy#GetServerDetails" + }, + { + "target": "com.amazonaws.migrationhubstrategy#GetServerStrategies" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ListApplicationComponents" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ListCollectors" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ListImportFileTask" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ListServers" + }, + { + "target": "com.amazonaws.migrationhubstrategy#PutPortfolioPreferences" + }, + { + "target": "com.amazonaws.migrationhubstrategy#StartAssessment" + }, + { + "target": "com.amazonaws.migrationhubstrategy#StartImportFileTask" + }, + { + "target": "com.amazonaws.migrationhubstrategy#StartRecommendationReportGeneration" + }, + { + "target": "com.amazonaws.migrationhubstrategy#StopAssessment" + }, + { + "target": "com.amazonaws.migrationhubstrategy#UpdateApplicationComponentConfig" + }, + { + "target": "com.amazonaws.migrationhubstrategy#UpdateServerConfig" + } + ] + }, + "com.amazonaws.migrationhubstrategy#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The AWS user account does not have permission to perform the action. Check the\n AWS Identity and Access Management (IAM) policy associated with this account.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.migrationhubstrategy#AntipatternReportStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "SUCCESS", + "name": "SUCCESS" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#AntipatternSeveritySummary": { + "type": "structure", + "members": { + "severity": { + "target": "com.amazonaws.migrationhubstrategy#Severity", + "traits": { + "smithy.api#documentation": "

      \n Contains the severity of anti-patterns.\n

      " + } + }, + "count": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      \n Contains the count of anti-patterns.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Contains the summary of anti-patterns and their severity.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#AppType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DotNetFramework", + "name": "dotNetFramework" + }, + { + "value": "Java", + "name": "java" + }, + { + "value": "SQLServer", + "name": "sqlServer" + }, + { + "value": "IIS", + "name": "IIS" + }, + { + "value": "Oracle", + "name": "oracle" + }, + { + "value": "Other", + "name": "other" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#ApplicationComponentCriteria": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NOT_DEFINED", + "name": "NOT_DEFINED" + }, + { + "value": "APP_NAME", + "name": "APP_NAME" + }, + { + "value": "SERVER_ID", + "name": "SERVER_ID" + }, + { + "value": "APP_TYPE", + "name": "APP_TYPE" + }, + { + "value": "STRATEGY", + "name": "STRATEGY" + }, + { + "value": "DESTINATION", + "name": "DESTINATION" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#ApplicationComponentDetail": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#ResourceId", + "traits": { + "smithy.api#documentation": "

      The ID of the application component.

      " + } + }, + "name": { + "target": "com.amazonaws.migrationhubstrategy#ResourceName", + "traits": { + "smithy.api#documentation": "

      The name of application component.

      " + } + }, + "recommendationSet": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationSet", + "traits": { + "smithy.api#documentation": "

      The top recommendation set for the application component.

      " + } + }, + "analysisStatus": { + "target": "com.amazonaws.migrationhubstrategy#SrcCodeOrDbAnalysisStatus", + "traits": { + "smithy.api#documentation": "

      The status of analysis, if the application component has source code or an associated\n database.

      " + } + }, + "statusMessage": { + "target": "com.amazonaws.migrationhubstrategy#StatusMessage", + "traits": { + "smithy.api#documentation": "

      A detailed description of the analysis status and any failure message.

      " + } + }, + "listAntipatternSeveritySummary": { + "target": "com.amazonaws.migrationhubstrategy#ListAntipatternSeveritySummary", + "traits": { + "smithy.api#documentation": "

      A list of anti-pattern severity summaries.

      " + } + }, + "databaseConfigDetail": { + "target": "com.amazonaws.migrationhubstrategy#DatabaseConfigDetail", + "traits": { + "smithy.api#documentation": "

      Configuration details for the database associated with the application component.

      " + } + }, + "sourceCodeRepositories": { + "target": "com.amazonaws.migrationhubstrategy#SourceCodeRepositories", + "traits": { + "smithy.api#documentation": "

      Details about the source code repository associated with the application component.\n

      " + } + }, + "appType": { + "target": "com.amazonaws.migrationhubstrategy#AppType", + "traits": { + "smithy.api#documentation": "

      The type of application component.

      " + } + }, + "resourceSubType": { + "target": "com.amazonaws.migrationhubstrategy#ResourceSubType", + "traits": { + "smithy.api#documentation": "

      The application component subtype.

      " + } + }, + "inclusionStatus": { + "target": "com.amazonaws.migrationhubstrategy#InclusionStatus", + "traits": { + "smithy.api#documentation": "

      Indicates whether the application component has been included for server recommendation\n or not.

      " + } + }, + "antipatternReportS3Object": { + "target": "com.amazonaws.migrationhubstrategy#S3Object", + "traits": { + "smithy.api#documentation": "

      The S3 bucket name and the Amazon S3 key name for the anti-pattern report.

      " + } + }, + "antipatternReportStatus": { + "target": "com.amazonaws.migrationhubstrategy#AntipatternReportStatus", + "traits": { + "smithy.api#documentation": "

      The status of the anti-pattern report generation.

      " + } + }, + "antipatternReportStatusMessage": { + "target": "com.amazonaws.migrationhubstrategy#StatusMessage", + "traits": { + "smithy.api#documentation": "

      The status message for the anti-pattern.

      " + } + }, + "osVersion": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      OS version.

      " + } + }, + "osDriver": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      OS driver.

      " + } + }, + "lastAnalyzedTimestamp": { + "target": "com.amazonaws.migrationhubstrategy#TimeStamp", + "traits": { + "smithy.api#documentation": "

      The timestamp of when the application component was assessed.

      " + } + }, + "associatedServerId": { + "target": "com.amazonaws.migrationhubstrategy#ServerId", + "traits": { + "smithy.api#documentation": "

      The ID of the server that the application component is running on.

      " + } + }, + "moreServerAssociationExists": { + "target": "com.amazonaws.migrationhubstrategy#Boolean", + "traits": { + "smithy.api#documentation": "

      Set to true if the application component is running on multiple servers.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Contains detailed information about an application component.

      " + } + }, + "com.amazonaws.migrationhubstrategy#ApplicationComponentDetails": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentDetail" + } + }, + "com.amazonaws.migrationhubstrategy#ApplicationComponentId": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 44 + }, + "smithy.api#pattern": "[0-9a-zA-Z-]+" + } + }, + "com.amazonaws.migrationhubstrategy#ApplicationComponentStrategies": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentStrategy" + } + }, + "com.amazonaws.migrationhubstrategy#ApplicationComponentStrategy": { + "type": "structure", + "members": { + "recommendation": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationSet", + "traits": { + "smithy.api#documentation": "

      Strategy recommendation for the application component.

      " + } + }, + "status": { + "target": "com.amazonaws.migrationhubstrategy#StrategyRecommendation", + "traits": { + "smithy.api#documentation": "

      The recommendation status of a strategy for an application component.

      " + } + }, + "isPreferred": { + "target": "com.amazonaws.migrationhubstrategy#Boolean", + "traits": { + "smithy.api#documentation": "

      Set to true if the recommendation is set as preferred.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Contains information about a strategy recommendation for an application component.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#ApplicationComponentSummary": { + "type": "structure", + "members": { + "appType": { + "target": "com.amazonaws.migrationhubstrategy#AppType", + "traits": { + "smithy.api#documentation": "

      \n Contains the name of application types.\n

      " + } + }, + "count": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      \n Contains the count of application type.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Contains the summary of application components.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#ApplicationPreferences": { + "type": "structure", + "members": { + "managementPreference": { + "target": "com.amazonaws.migrationhubstrategy#ManagementPreference", + "traits": { + "smithy.api#documentation": "

      \n Application preferences that you specify to prefer managed environment.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Application preferences that you specify.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#AssessmentStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "COMPLETE", + "name": "COMPLETE" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "STOPPED", + "name": "STOPPED" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#AssessmentSummary": { + "type": "structure", + "members": { + "listServerStrategySummary": { + "target": "com.amazonaws.migrationhubstrategy#ListStrategySummary", + "traits": { + "smithy.api#documentation": "

      \n List of ServerStrategySummary.\n

      " + } + }, + "listApplicationComponentStrategySummary": { + "target": "com.amazonaws.migrationhubstrategy#ListStrategySummary", + "traits": { + "smithy.api#documentation": "

      \n List of ApplicationComponentStrategySummary.\n

      " + } + }, + "listAntipatternSeveritySummary": { + "target": "com.amazonaws.migrationhubstrategy#ListAntipatternSeveritySummary", + "traits": { + "smithy.api#documentation": "

      \n List of AntipatternSeveritySummary.\n

      " + } + }, + "listApplicationComponentSummary": { + "target": "com.amazonaws.migrationhubstrategy#ListApplicationComponentSummary", + "traits": { + "smithy.api#documentation": "

      \n List of ApplicationComponentSummary.\n

      " + } + }, + "listServerSummary": { + "target": "com.amazonaws.migrationhubstrategy#ListServerSummary", + "traits": { + "smithy.api#documentation": "

      \n List of ServerSummary.\n

      " + } + }, + "antipatternReportS3Object": { + "target": "com.amazonaws.migrationhubstrategy#S3Object", + "traits": { + "smithy.api#documentation": "

      \n The Amazon S3 object containing the anti-pattern report.\n

      " + } + }, + "antipatternReportStatus": { + "target": "com.amazonaws.migrationhubstrategy#AntipatternReportStatus", + "traits": { + "smithy.api#documentation": "

      \n The status of the anti-pattern report.\n

      " + } + }, + "antipatternReportStatusMessage": { + "target": "com.amazonaws.migrationhubstrategy#StatusMessage", + "traits": { + "smithy.api#documentation": "

      \n The status message of the anti-pattern report.\n

      " + } + }, + "lastAnalyzedTimestamp": { + "target": "com.amazonaws.migrationhubstrategy#TimeStamp", + "traits": { + "smithy.api#documentation": "

      \n The time the assessment was performed.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Contains the summary of the assessment results.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#AssociatedApplication": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n Name of the application as defined in Application Discovery Service.\n

      " + } + }, + "id": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n ID of the application as defined in Application Discovery Service.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Object containing details about applications as defined in Application Discovery Service.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#AssociatedApplications": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#AssociatedApplication" + } + }, + "com.amazonaws.migrationhubstrategy#AssociatedServerIDs": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#String" + } + }, + "com.amazonaws.migrationhubstrategy#AsyncTaskId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 52 + }, + "smithy.api#pattern": "[0-9a-z-:]+" + } + }, + "com.amazonaws.migrationhubstrategy#AwsManagedResources": { + "type": "structure", + "members": { + "targetDestination": { + "target": "com.amazonaws.migrationhubstrategy#AwsManagedTargetDestinations", + "traits": { + "smithy.api#documentation": "

      \n The choice of application destination that you specify.\n

      ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Object containing the choice of application destination that you specify.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#AwsManagedTargetDestination": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "None specified", + "name": "NONE_SPECIFIED" + }, + { + "value": "AWS Elastic BeanStalk", + "name": "AWS_ELASTIC_BEANSTALK" + }, + { + "value": "AWS Fargate", + "name": "AWS_FARGATE" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#AwsManagedTargetDestinations": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#AwsManagedTargetDestination" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.migrationhubstrategy#Boolean": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.migrationhubstrategy#BusinessGoals": { + "type": "structure", + "members": { + "speedOfMigration": { + "target": "com.amazonaws.migrationhubstrategy#BusinessGoalsInteger", + "traits": { + "smithy.api#documentation": "

      \n Business goal to achieve migration at a fast pace.\n

      " + } + }, + "reduceOperationalOverheadWithManagedServices": { + "target": "com.amazonaws.migrationhubstrategy#BusinessGoalsInteger", + "traits": { + "smithy.api#documentation": "

      \n Business goal to reduce the operational overhead on the team by moving into managed services.\n

      " + } + }, + "modernizeInfrastructureWithCloudNativeTechnologies": { + "target": "com.amazonaws.migrationhubstrategy#BusinessGoalsInteger", + "traits": { + "smithy.api#documentation": "

      \n Business goal to modernize infrastructure by moving to cloud native technologies.\n

      " + } + }, + "licenseCostReduction": { + "target": "com.amazonaws.migrationhubstrategy#BusinessGoalsInteger", + "traits": { + "smithy.api#documentation": "

      \n Business goal to reduce license costs.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Business goals that you specify.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#BusinessGoalsInteger": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.migrationhubstrategy#Collector": { + "type": "structure", + "members": { + "collectorId": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n The ID of the collector.\n

      " + } + }, + "ipAddress": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n IP address of the server that is hosting the collector.\n

      " + } + }, + "hostName": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n Hostname of the server that is hosting the collector.\n

      " + } + }, + "collectorHealth": { + "target": "com.amazonaws.migrationhubstrategy#CollectorHealth", + "traits": { + "smithy.api#documentation": "

      \n Indicates the health of a collector.\n

      " + } + }, + "collectorVersion": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n Current version of the collector that is running in the environment that you specify.\n

      " + } + }, + "registeredTimeStamp": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n Time when the collector registered with the service.\n

      " + } + }, + "lastActivityTimeStamp": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n Time when the collector last pinged the service.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Process data collector that runs in the environment that you specify.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#CollectorHealth": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "COLLECTOR_HEALTHY", + "name": "COLLECTOR_HEALTHY" + }, + { + "value": "COLLECTOR_UNHEALTHY", + "name": "COLLECTOR_UNHEALTHY" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#Collectors": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#Collector" + } + }, + "com.amazonaws.migrationhubstrategy#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Exception to indicate that there is an ongoing task when a new task is created. \n Return when once the existing tasks are complete.\n

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.migrationhubstrategy#DataCollectionDetails": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.migrationhubstrategy#AssessmentStatus", + "traits": { + "smithy.api#documentation": "

      The status of the assessment.

      " + } + }, + "servers": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The total number of servers in the assessment.

      " + } + }, + "failed": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The number of failed servers in the assessment.

      " + } + }, + "success": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The number of successful servers in the assessment.

      " + } + }, + "inProgress": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The number of servers with the assessment status IN_PROGESS.

      " + } + }, + "startTime": { + "target": "com.amazonaws.migrationhubstrategy#TimeStamp", + "traits": { + "smithy.api#documentation": "

      The start time of assessment.

      " + } + }, + "completionTime": { + "target": "com.amazonaws.migrationhubstrategy#TimeStamp", + "traits": { + "smithy.api#documentation": "

      The time the assessment completes.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Detailed information about an assessment.

      " + } + }, + "com.amazonaws.migrationhubstrategy#DataSourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ApplicationDiscoveryService", + "name": "ADS" + }, + { + "value": "MPA", + "name": "MPA" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#DatabaseConfigDetail": { + "type": "structure", + "members": { + "secretName": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n AWS Secrets Manager key that holds the credentials that you use to connect to a database.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Configuration information used for assessing databases.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#DatabaseManagementPreference": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AWS-managed", + "name": "AWS_MANAGED" + }, + { + "value": "Self-manage", + "name": "SELF_MANAGE" + }, + { + "value": "No preference", + "name": "NO_PREFERENCE" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#DatabaseMigrationPreference": { + "type": "union", + "members": { + "heterogeneous": { + "target": "com.amazonaws.migrationhubstrategy#Heterogeneous", + "traits": { + "smithy.api#documentation": "

      Indicates whether you are interested in moving from one type of database to another. For\n example, from SQL Server to Amazon Aurora MySQL-Compatible Edition.

      " + } + }, + "homogeneous": { + "target": "com.amazonaws.migrationhubstrategy#Homogeneous", + "traits": { + "smithy.api#documentation": "

      Indicates whether you are interested in moving to the same type of database into AWS.\n For example, from SQL Server in your environment to SQL Server on AWS.

      " + } + }, + "noPreference": { + "target": "com.amazonaws.migrationhubstrategy#NoDatabaseMigrationPreference", + "traits": { + "smithy.api#documentation": "

      \n Indicated that you do not prefer heterogeneous or homogeneous.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Preferences for migrating a database to AWS.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#DatabasePreferences": { + "type": "structure", + "members": { + "databaseManagementPreference": { + "target": "com.amazonaws.migrationhubstrategy#DatabaseManagementPreference", + "traits": { + "smithy.api#documentation": "

      Specifies whether you're interested in self-managed databases or databases managed by\n AWS.

      " + } + }, + "databaseMigrationPreference": { + "target": "com.amazonaws.migrationhubstrategy#DatabaseMigrationPreference", + "traits": { + "smithy.api#documentation": "

      \n Specifies your preferred migration path.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Preferences on managing your databases on AWS.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#GetApplicationComponentDetails": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#GetApplicationComponentDetailsRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#GetApplicationComponentDetailsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves details about an application component.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/get-applicationcomponent-details/{applicationComponentId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#GetApplicationComponentDetailsRequest": { + "type": "structure", + "members": { + "applicationComponentId": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentId", + "traits": { + "smithy.api#documentation": "

      The ID of the application component. The ID is unique within an AWS account.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetApplicationComponentDetailsResponse": { + "type": "structure", + "members": { + "applicationComponentDetail": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentDetail", + "traits": { + "smithy.api#documentation": "

      Detailed information about an application component.

      " + } + }, + "associatedApplications": { + "target": "com.amazonaws.migrationhubstrategy#AssociatedApplications", + "traits": { + "smithy.api#documentation": "

      The associated application group as defined in AWS Application Discovery Service.

      " + } + }, + "moreApplicationResource": { + "target": "com.amazonaws.migrationhubstrategy#Boolean", + "traits": { + "smithy.api#documentation": "

      Set to true if the application component belongs to more than one application group.\n

      " + } + }, + "associatedServerIds": { + "target": "com.amazonaws.migrationhubstrategy#AssociatedServerIDs", + "traits": { + "smithy.api#documentation": "

      A list of the IDs of the servers on which the application component is running.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetApplicationComponentStrategies": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#GetApplicationComponentStrategiesRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#GetApplicationComponentStrategiesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves a list of all the recommended strategies and tools for an application component\n running on a server.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/get-applicationcomponent-strategies/{applicationComponentId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#GetApplicationComponentStrategiesRequest": { + "type": "structure", + "members": { + "applicationComponentId": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentId", + "traits": { + "smithy.api#documentation": "

      The ID of the application component. The ID is unique within an AWS account.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetApplicationComponentStrategiesResponse": { + "type": "structure", + "members": { + "applicationComponentStrategies": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentStrategies", + "traits": { + "smithy.api#documentation": "

      A list of application component strategy recommendations.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetAssessment": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#GetAssessmentRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#GetAssessmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves the status of an on-going assessment.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/get-assessment/{id}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#GetAssessmentRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#AsyncTaskId", + "traits": { + "smithy.api#documentation": "

      The assessmentid returned by StartAssessment.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetAssessmentResponse": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#AsyncTaskId", + "traits": { + "smithy.api#documentation": "

      The ID for the specific assessment task.

      " + } + }, + "dataCollectionDetails": { + "target": "com.amazonaws.migrationhubstrategy#DataCollectionDetails", + "traits": { + "smithy.api#documentation": "

      Detailed information about the assessment.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetImportFileTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#GetImportFileTaskRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#GetImportFileTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves the details about a specific import task.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/get-import-file-task/{id}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#GetImportFileTaskRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The ID of the import file task. This ID is returned in the response of\n StartImportFileTask.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetImportFileTaskResponse": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The import file task id returned in the response of StartImportFileTask.

      " + } + }, + "status": { + "target": "com.amazonaws.migrationhubstrategy#ImportFileTaskStatus", + "traits": { + "smithy.api#documentation": "

      Status of import file task.

      " + } + }, + "startTime": { + "target": "com.amazonaws.migrationhubstrategy#TimeStamp", + "traits": { + "smithy.api#documentation": "

      Start time of the import task.

      " + } + }, + "inputS3Bucket": { + "target": "com.amazonaws.migrationhubstrategy#importS3Bucket", + "traits": { + "smithy.api#documentation": "

      The S3 bucket where import file is located.

      " + } + }, + "inputS3Key": { + "target": "com.amazonaws.migrationhubstrategy#importS3Key", + "traits": { + "smithy.api#documentation": "

      The Amazon S3 key name of the import file.

      " + } + }, + "statusReportS3Bucket": { + "target": "com.amazonaws.migrationhubstrategy#importS3Bucket", + "traits": { + "smithy.api#documentation": "

      The S3 bucket name for status report of import task.

      " + } + }, + "statusReportS3Key": { + "target": "com.amazonaws.migrationhubstrategy#importS3Key", + "traits": { + "smithy.api#documentation": "

      The Amazon S3 key name for status report of import task. The report contains details about\n whether each record imported successfully or why it did not.

      " + } + }, + "completionTime": { + "target": "com.amazonaws.migrationhubstrategy#TimeStamp", + "traits": { + "smithy.api#documentation": "

      The time that the import task completed.

      " + } + }, + "numberOfRecordsSuccess": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The number of records successfully imported.

      " + } + }, + "numberOfRecordsFailed": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The number of records that failed to be imported.

      " + } + }, + "importName": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The name of the import task given in StartImportFileTask.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetPortfolioPreferences": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#GetPortfolioPreferencesRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#GetPortfolioPreferencesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves your migration and modernization preferences.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/get-portfolio-preferences", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#GetPortfolioPreferencesRequest": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubstrategy#GetPortfolioPreferencesResponse": { + "type": "structure", + "members": { + "prioritizeBusinessGoals": { + "target": "com.amazonaws.migrationhubstrategy#PrioritizeBusinessGoals", + "traits": { + "smithy.api#documentation": "

      The rank of business goals based on priority.

      " + } + }, + "applicationPreferences": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationPreferences", + "traits": { + "smithy.api#documentation": "

      The transformation preferences for non-database applications.

      " + } + }, + "databasePreferences": { + "target": "com.amazonaws.migrationhubstrategy#DatabasePreferences", + "traits": { + "smithy.api#documentation": "

      The transformation preferences for database applications.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetPortfolioSummary": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#GetPortfolioSummaryRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#GetPortfolioSummaryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves overall summary including the number of servers to rehost and the overall\n number of anti-patterns.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/get-portfolio-summary", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#GetPortfolioSummaryRequest": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubstrategy#GetPortfolioSummaryResponse": { + "type": "structure", + "members": { + "assessmentSummary": { + "target": "com.amazonaws.migrationhubstrategy#AssessmentSummary", + "traits": { + "smithy.api#documentation": "

      An assessment summary for the portfolio including the number of servers to rehost and the\n overall number of anti-patterns.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetRecommendationReportDetails": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#GetRecommendationReportDetailsRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#GetRecommendationReportDetailsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves detailed information about the specified recommendation report.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/get-recommendation-report-details/{id}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#GetRecommendationReportDetailsRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationTaskId", + "traits": { + "smithy.api#documentation": "

      The recommendation report generation task id returned by \n StartRecommendationReportGeneration.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetRecommendationReportDetailsResponse": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationTaskId", + "traits": { + "smithy.api#documentation": "

      The ID of the recommendation report generation task. See the response of StartRecommendationReportGeneration.

      " + } + }, + "recommendationReportDetails": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationReportDetails", + "traits": { + "smithy.api#documentation": "

      Detailed information about the recommendation report.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetServerDetails": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#GetServerDetailsRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#GetServerDetailsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves detailed information about a specified server.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/get-server-details/{serverId}", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "associatedApplications", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#GetServerDetailsRequest": { + "type": "structure", + "members": { + "serverId": { + "target": "com.amazonaws.migrationhubstrategy#ServerId", + "traits": { + "smithy.api#documentation": "

      The ID of the server.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#NextToken", + "traits": { + "smithy.api#documentation": "

      The token from a previous call that you use to retrieve the next set of results. For example, \nif a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along\n with a token. You then use the returned token to retrieve the next set of 10.

      ", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.migrationhubstrategy#MaxResult", + "traits": { + "smithy.api#documentation": "

      The maximum number of items to include in the response. The maximum value is 100.

      ", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetServerDetailsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The token you use to retrieve the next set of results, or null if there are no more results.

      " + } + }, + "serverDetail": { + "target": "com.amazonaws.migrationhubstrategy#ServerDetail", + "traits": { + "smithy.api#documentation": "

      Detailed information about the server.

      " + } + }, + "associatedApplications": { + "target": "com.amazonaws.migrationhubstrategy#AssociatedApplications", + "traits": { + "smithy.api#documentation": "

      The associated application group the server belongs to, as defined in AWS Application Discovery Service.\n

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetServerStrategies": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#GetServerStrategiesRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#GetServerStrategiesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves recommended strategies and tools for the specified server.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/get-server-strategies/{serverId}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#GetServerStrategiesRequest": { + "type": "structure", + "members": { + "serverId": { + "target": "com.amazonaws.migrationhubstrategy#ServerId", + "traits": { + "smithy.api#documentation": "

      The ID of the server.

      ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubstrategy#GetServerStrategiesResponse": { + "type": "structure", + "members": { + "serverStrategies": { + "target": "com.amazonaws.migrationhubstrategy#ServerStrategies", + "traits": { + "smithy.api#documentation": "

      A list of strategy recommendations for the server.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#Group": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.migrationhubstrategy#GroupName", + "traits": { + "smithy.api#documentation": "

      \n The key of the specific import group.\n

      " + } + }, + "value": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n The value of the specific import group.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n The object containing information about distinct imports or groups for Strategy Recommendations.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#GroupIds": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#Group" + } + }, + "com.amazonaws.migrationhubstrategy#GroupName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ExternalId", + "name": "EXTERNAL_ID" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#Heterogeneous": { + "type": "structure", + "members": { + "targetDatabaseEngine": { + "target": "com.amazonaws.migrationhubstrategy#HeterogeneousTargetDatabaseEngines", + "traits": { + "smithy.api#documentation": "

      \n The target database engine for heterogeneous database migration preference.\n

      ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n The object containing details about heterogeneous database preferences.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#HeterogeneousTargetDatabaseEngine": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "None specified", + "name": "NONE_SPECIFIED" + }, + { + "value": "Amazon Aurora", + "name": "AMAZON_AURORA" + }, + { + "value": "AWS PostgreSQL", + "name": "AWS_POSTGRESQL" + }, + { + "value": "MySQL", + "name": "MYSQL" + }, + { + "value": "Microsoft SQL Server", + "name": "MICROSOFT_SQL_SERVER" + }, + { + "value": "Oracle Database", + "name": "ORACLE_DATABASE" + }, + { + "value": "MariaDB", + "name": "MARIA_DB" + }, + { + "value": "SAP", + "name": "SAP" + }, + { + "value": "Db2 LUW", + "name": "DB2_LUW" + }, + { + "value": "MongoDB", + "name": "MONGO_DB" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#HeterogeneousTargetDatabaseEngines": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#HeterogeneousTargetDatabaseEngine" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.migrationhubstrategy#Homogeneous": { + "type": "structure", + "members": { + "targetDatabaseEngine": { + "target": "com.amazonaws.migrationhubstrategy#HomogeneousTargetDatabaseEngines", + "traits": { + "smithy.api#documentation": "

      \n The target database engine for homogeneous database migration preferences.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n The object containing details about homogeneous database preferences.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#HomogeneousTargetDatabaseEngine": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "None specified", + "name": "NONE_SPECIFIED" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#HomogeneousTargetDatabaseEngines": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#HomogeneousTargetDatabaseEngine" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.migrationhubstrategy#IPAddress": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 15 + }, + "smithy.api#pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" + } + }, + "com.amazonaws.migrationhubstrategy#ImportFileTaskInformation": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The ID of the import file task.

      " + } + }, + "status": { + "target": "com.amazonaws.migrationhubstrategy#ImportFileTaskStatus", + "traits": { + "smithy.api#documentation": "

      Status of import file task.

      " + } + }, + "startTime": { + "target": "com.amazonaws.migrationhubstrategy#TimeStamp", + "traits": { + "smithy.api#documentation": "

      Start time of the import task.

      " + } + }, + "inputS3Bucket": { + "target": "com.amazonaws.migrationhubstrategy#importS3Bucket", + "traits": { + "smithy.api#documentation": "

      The S3 bucket where the import file is located.

      " + } + }, + "inputS3Key": { + "target": "com.amazonaws.migrationhubstrategy#importS3Key", + "traits": { + "smithy.api#documentation": "

      The Amazon S3 key name of the import file.

      " + } + }, + "statusReportS3Bucket": { + "target": "com.amazonaws.migrationhubstrategy#importS3Bucket", + "traits": { + "smithy.api#documentation": "

      The S3 bucket name for status report of import task.

      " + } + }, + "statusReportS3Key": { + "target": "com.amazonaws.migrationhubstrategy#importS3Key", + "traits": { + "smithy.api#documentation": "

      The Amazon S3 key name for status report of import task. The report contains details about\n whether each record imported successfully or why it did not.

      " + } + }, + "completionTime": { + "target": "com.amazonaws.migrationhubstrategy#TimeStamp", + "traits": { + "smithy.api#documentation": "

      The time that the import task completes.

      " + } + }, + "numberOfRecordsSuccess": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The number of records successfully imported.

      " + } + }, + "numberOfRecordsFailed": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The number of records that failed to be imported.

      " + } + }, + "importName": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The name of the import task given in StartImportFileTask.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Information about the import file tasks you request.

      " + } + }, + "com.amazonaws.migrationhubstrategy#ImportFileTaskStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ImportInProgress", + "name": "IMPORT_IN_PROGRESS" + }, + { + "value": "ImportFailed", + "name": "IMPORT_FAILED" + }, + { + "value": "ImportPartialSuccess", + "name": "IMPORT_PARTIAL_SUCCESS" + }, + { + "value": "ImportSuccess", + "name": "IMPORT_SUCCESS" + }, + { + "value": "DeleteInProgress", + "name": "DELETE_IN_PROGRESS" + }, + { + "value": "DeleteFailed", + "name": "DELETE_FAILED" + }, + { + "value": "DeletePartialSuccess", + "name": "DELETE_PARTIAL_SUCCESS" + }, + { + "value": "DeleteSuccess", + "name": "DELETE_SUCCESS" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#InclusionStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "excludeFromAssessment", + "name": "EXCLUDE_FROM_RECOMMENDATION" + }, + { + "value": "includeInAssessment", + "name": "INCLUDE_IN_RECOMMENDATION" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#Integer": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.migrationhubstrategy#InterfaceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.migrationhubstrategy#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.migrationhubstrategy#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

      The server experienced an internal error. Try again.

      ", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.migrationhubstrategy#ListAntipatternSeveritySummary": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#AntipatternSeveritySummary" + } + }, + "com.amazonaws.migrationhubstrategy#ListApplicationComponentSummary": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentSummary" + } + }, + "com.amazonaws.migrationhubstrategy#ListApplicationComponents": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#ListApplicationComponentsRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#ListApplicationComponentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ServiceLinkedRoleLockClientException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves a list of all the application components (processes).

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/list-applicationcomponents", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "applicationComponentInfos", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.migrationhubstrategy#ListApplicationComponentsRequest": { + "type": "structure", + "members": { + "applicationComponentCriteria": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentCriteria", + "traits": { + "smithy.api#documentation": "

      Criteria for filtering the list of application components.

      " + } + }, + "filterValue": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      Specify the value based on the application component criteria type. For example, if\n applicationComponentCriteria is set to SERVER_ID and\n filterValue is set to server1, then ListApplicationComponents returns all the application components running on\n server1.

      ", + "smithy.api#length": { + "max": 256 + } + } + }, + "sort": { + "target": "com.amazonaws.migrationhubstrategy#SortOrder", + "traits": { + "smithy.api#documentation": "

      Specifies whether to sort by ascending (ASC) or descending\n (DESC) order.

      " + } + }, + "groupIdFilter": { + "target": "com.amazonaws.migrationhubstrategy#GroupIds", + "traits": { + "smithy.api#documentation": "

      The group ID specified in to filter on.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#NextToken", + "traits": { + "smithy.api#documentation": "

      The token from a previous call that you use to retrieve the next set of results. For example, \nif a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along\n with a token. You then use the returned token to retrieve the next set of 10.

      " + } + }, + "maxResults": { + "target": "com.amazonaws.migrationhubstrategy#MaxResult", + "traits": { + "smithy.api#documentation": "

      The maximum number of items to include in the response. The maximum value is 100.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#ListApplicationComponentsResponse": { + "type": "structure", + "members": { + "applicationComponentInfos": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentDetails", + "traits": { + "smithy.api#documentation": "

      The list of application components with detailed information about each component.\n

      " + } + }, + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#NextToken", + "traits": { + "smithy.api#documentation": "

      The token you use to retrieve the next set of results, or null if there are no more results.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#ListCollectors": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#ListCollectorsRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#ListCollectorsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves a list of all the installed collectors.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/list-collectors", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "Collectors", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#ListCollectorsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#NextToken", + "traits": { + "smithy.api#documentation": "

      The token from a previous call that you use to retrieve the next set of results. For example, \nif a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along\n with a token. You then use the returned token to retrieve the next set of 10.

      ", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.migrationhubstrategy#MaxResult", + "traits": { + "smithy.api#documentation": "

      The maximum number of items to include in the response. The maximum value is 100.

      ", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.migrationhubstrategy#ListCollectorsResponse": { + "type": "structure", + "members": { + "Collectors": { + "target": "com.amazonaws.migrationhubstrategy#Collectors", + "traits": { + "smithy.api#documentation": "

      The list of all the installed collectors.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#NextToken", + "traits": { + "smithy.api#documentation": "

      The token you use to retrieve the next set of results, or null if there are no more results.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#ListImportFileTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#ListImportFileTaskRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#ListImportFileTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Retrieves a list of all the imports performed.

      ", + "smithy.api#http": { + "method": "GET", + "uri": "/list-import-file-task", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "taskInfos", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.migrationhubstrategy#ListImportFileTaskInformation": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#ImportFileTaskInformation" + } + }, + "com.amazonaws.migrationhubstrategy#ListImportFileTaskRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The token from a previous call that you use to retrieve the next set of results. For example, \nif a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along\n with a token. You then use the returned token to retrieve the next set of 10.

      ", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The total number of items to return. The maximum value is 100.

      ", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.migrationhubstrategy#ListImportFileTaskResponse": { + "type": "structure", + "members": { + "taskInfos": { + "target": "com.amazonaws.migrationhubstrategy#ListImportFileTaskInformation", + "traits": { + "smithy.api#documentation": "

      Lists information about the files you import.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The token you use to retrieve the next set of results, or null if there are no more results.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#ListServerSummary": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#ServerSummary" + } + }, + "com.amazonaws.migrationhubstrategy#ListServers": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#ListServersRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#ListServersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Returns a list of all the servers.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/list-servers", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "serverInfos", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.migrationhubstrategy#ListServersRequest": { + "type": "structure", + "members": { + "serverCriteria": { + "target": "com.amazonaws.migrationhubstrategy#ServerCriteria", + "traits": { + "smithy.api#documentation": "

      Criteria for filtering servers.

      " + } + }, + "filterValue": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      Specifies the filter value, which is based on the type of server criteria. For example,\n if serverCriteria is OS_NAME, and the filterValue is\n equal to WindowsServer, then ListServers returns all of the servers\n matching the OS name WindowsServer.

      " + } + }, + "sort": { + "target": "com.amazonaws.migrationhubstrategy#SortOrder", + "traits": { + "smithy.api#documentation": "

      Specifies whether to sort by ascending (ASC) or descending\n (DESC) order.

      " + } + }, + "groupIdFilter": { + "target": "com.amazonaws.migrationhubstrategy#GroupIds", + "traits": { + "smithy.api#documentation": "

      Specifies the group ID to filter on.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#NextToken", + "traits": { + "smithy.api#documentation": "

      The token from a previous call that you use to retrieve the next set of results. For example, \nif a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along\n with a token. You then use the returned token to retrieve the next set of 10.

      " + } + }, + "maxResults": { + "target": "com.amazonaws.migrationhubstrategy#MaxResult", + "traits": { + "smithy.api#documentation": "

      The maximum number of items to include in the response. The maximum value is 100.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#ListServersResponse": { + "type": "structure", + "members": { + "serverInfos": { + "target": "com.amazonaws.migrationhubstrategy#ServerDetails", + "traits": { + "smithy.api#documentation": "

      The list of servers with detailed information about each server.

      " + } + }, + "nextToken": { + "target": "com.amazonaws.migrationhubstrategy#NextToken", + "traits": { + "smithy.api#documentation": "

      The token you use to retrieve the next set of results, or null if there are no more results.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#ListStrategySummary": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#StrategySummary" + } + }, + "com.amazonaws.migrationhubstrategy#Location": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#MacAddress": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 17 + }, + "smithy.api#pattern": "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})|([0-9a-fA-F]{4}\\\\.[0-9a-fA-F]{4}\\\\.[0-9a-fA-F]{4})$”$" + } + }, + "com.amazonaws.migrationhubstrategy#ManagementPreference": { + "type": "union", + "members": { + "awsManagedResources": { + "target": "com.amazonaws.migrationhubstrategy#AwsManagedResources", + "traits": { + "smithy.api#documentation": "

      \n Indicates interest in solutions that are managed by AWS.\n

      " + } + }, + "selfManageResources": { + "target": "com.amazonaws.migrationhubstrategy#SelfManageResources", + "traits": { + "smithy.api#documentation": "

      \n Indicates interest in managing your own resources on AWS.\n

      " + } + }, + "noPreference": { + "target": "com.amazonaws.migrationhubstrategy#NoManagementPreference", + "traits": { + "smithy.api#documentation": "

      \n No specific preference.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Preferences for migrating an application to AWS.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#MaxResult": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.migrationhubstrategy#NetMask": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.migrationhubstrategy#NetworkInfo": { + "type": "structure", + "members": { + "interfaceName": { + "target": "com.amazonaws.migrationhubstrategy#InterfaceName", + "traits": { + "smithy.api#documentation": "

      \n Information about the name of the interface of the server for which the assessment was run.\n

      ", + "smithy.api#required": {} + } + }, + "ipAddress": { + "target": "com.amazonaws.migrationhubstrategy#IPAddress", + "traits": { + "smithy.api#documentation": "

      \n Information about the IP address of the server for which the assessment was run.\n

      ", + "smithy.api#required": {} + } + }, + "macAddress": { + "target": "com.amazonaws.migrationhubstrategy#MacAddress", + "traits": { + "smithy.api#documentation": "

      \n Information about the MAC address of the server for which the assessment was run.\n

      ", + "smithy.api#required": {} + } + }, + "netMask": { + "target": "com.amazonaws.migrationhubstrategy#NetMask", + "traits": { + "smithy.api#documentation": "

      \n Information about the subnet mask of the server for which the assessment was run.\n

      ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Information about the server's network for which the assessment was run.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#NetworkInfoList": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#NetworkInfo" + } + }, + "com.amazonaws.migrationhubstrategy#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#NoDatabaseMigrationPreference": { + "type": "structure", + "members": { + "targetDatabaseEngine": { + "target": "com.amazonaws.migrationhubstrategy#TargetDatabaseEngines", + "traits": { + "smithy.api#documentation": "

      \n The target database engine for database migration preference that you specify.\n

      ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The object containing details about database migration preferences, when you have no\n particular preference.

      " + } + }, + "com.amazonaws.migrationhubstrategy#NoManagementPreference": { + "type": "structure", + "members": { + "targetDestination": { + "target": "com.amazonaws.migrationhubstrategy#NoPreferenceTargetDestinations", + "traits": { + "smithy.api#documentation": "

      \n The choice of application destination that you specify.\n

      ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Object containing the choice of application destination that you specify.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#NoPreferenceTargetDestination": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "None specified", + "name": "NONE_SPECIFIED" + }, + { + "value": "AWS Elastic BeanStalk", + "name": "AWS_ELASTIC_BEANSTALK" + }, + { + "value": "AWS Fargate", + "name": "AWS_FARGATE" + }, + { + "value": "Amazon Elastic Cloud Compute (EC2)", + "name": "AMAZON_ELASTIC_CLOUD_COMPUTE" + }, + { + "value": "Amazon Elastic Container Service (ECS)", + "name": "AMAZON_ELASTIC_CONTAINER_SERVICE" + }, + { + "value": "Amazon Elastic Kubernetes Service (EKS)", + "name": "AMAZON_ELASTIC_KUBERNETES_SERVICE" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#NoPreferenceTargetDestinations": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#NoPreferenceTargetDestination" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.migrationhubstrategy#OSInfo": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.migrationhubstrategy#OSType", + "traits": { + "smithy.api#documentation": "

      \n Information about the type of operating system.\n

      " + } + }, + "version": { + "target": "com.amazonaws.migrationhubstrategy#OSVersion", + "traits": { + "smithy.api#documentation": "

      \n Information about the version of operating system.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Information about the operating system.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#OSType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "LINUX", + "name": "LINUX" + }, + { + "value": "WINDOWS", + "name": "WINDOWS" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#OSVersion": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#OutputFormat": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Excel", + "name": "Excel" + }, + { + "value": "Json", + "name": "Json" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#PrioritizeBusinessGoals": { + "type": "structure", + "members": { + "businessGoals": { + "target": "com.amazonaws.migrationhubstrategy#BusinessGoals", + "traits": { + "smithy.api#documentation": "

      \n Rank of business goals based on priority.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Rank of business goals based on priority.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#PutPortfolioPreferences": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#PutPortfolioPreferencesRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#PutPortfolioPreferencesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Saves the specified migration and modernization preferences.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/put-portfolio-preferences", + "code": 200 + } + } + }, + "com.amazonaws.migrationhubstrategy#PutPortfolioPreferencesRequest": { + "type": "structure", + "members": { + "prioritizeBusinessGoals": { + "target": "com.amazonaws.migrationhubstrategy#PrioritizeBusinessGoals", + "traits": { + "smithy.api#documentation": "

      The rank of the business goals based on priority.

      " + } + }, + "applicationPreferences": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationPreferences", + "traits": { + "smithy.api#documentation": "

      The transformation preferences for non-database applications.

      " + } + }, + "databasePreferences": { + "target": "com.amazonaws.migrationhubstrategy#DatabasePreferences", + "traits": { + "smithy.api#documentation": "

      The transformation preferences for database applications.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#PutPortfolioPreferencesResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubstrategy#RecommendationReportDetails": { + "type": "structure", + "members": { + "status": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationReportStatus", + "traits": { + "smithy.api#documentation": "

      \n The status of the recommendation report generation task.\n

      " + } + }, + "statusMessage": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationReportStatusMessage", + "traits": { + "smithy.api#documentation": "

      \n The status message for recommendation report generation.\n

      " + } + }, + "startTime": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationReportTimeStamp", + "traits": { + "smithy.api#documentation": "

      \n The time that the recommendation report generation task starts.\n

      " + } + }, + "completionTime": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationReportTimeStamp", + "traits": { + "smithy.api#documentation": "

      \n The time that the recommendation report generation task completes.\n

      " + } + }, + "s3Bucket": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n The S3 bucket where the report file is located.\n

      " + } + }, + "s3Keys": { + "target": "com.amazonaws.migrationhubstrategy#S3Keys", + "traits": { + "smithy.api#documentation": "

      \n The Amazon S3 key name of the report file.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Contains detailed information about a recommendation report.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#RecommendationReportStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "SUCCESS", + "name": "SUCCESS" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#RecommendationReportStatusMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 512 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#RecommendationReportTimeStamp": { + "type": "timestamp" + }, + "com.amazonaws.migrationhubstrategy#RecommendationSet": { + "type": "structure", + "members": { + "transformationTool": { + "target": "com.amazonaws.migrationhubstrategy#TransformationTool", + "traits": { + "smithy.api#documentation": "

      \n The target destination for the recommendation set.\n

      " + } + }, + "targetDestination": { + "target": "com.amazonaws.migrationhubstrategy#TargetDestination", + "traits": { + "smithy.api#documentation": "

      \n The recommended target destination.\n

      " + } + }, + "strategy": { + "target": "com.amazonaws.migrationhubstrategy#Strategy", + "traits": { + "smithy.api#documentation": "

      \n The recommended strategy.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Contains a recommendation set.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#RecommendationTaskId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 52 + }, + "smithy.api#pattern": "[0-9a-z-:]+" + } + }, + "com.amazonaws.migrationhubstrategy#ResourceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 44 + }, + "smithy.api#pattern": "^[0-9a-b]+" + } + }, + "com.amazonaws.migrationhubstrategy#ResourceName": { + "type": "string" + }, + "com.amazonaws.migrationhubstrategy#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.migrationhubstrategy#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

      The specified ID in the request is not found.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.migrationhubstrategy#ResourceSubType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Database", + "name": "DATABASE" + }, + { + "value": "Process", + "name": "PROCESS" + }, + { + "value": "DatabaseProcess", + "name": "DATABASE_PROCESS" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#RunTimeAssessmentStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "dataCollectionTaskToBeScheduled", + "name": "DC_TO_BE_SCHEDULED" + }, + { + "value": "dataCollectionTaskScheduled", + "name": "DC_REQ_SENT" + }, + { + "value": "dataCollectionTaskStarted", + "name": "DC_STARTED" + }, + { + "value": "dataCollectionTaskStopped", + "name": "DC_STOPPED" + }, + { + "value": "dataCollectionTaskSuccess", + "name": "DC_SUCCESS" + }, + { + "value": "dataCollectionTaskFailed", + "name": "DC_FAILED" + }, + { + "value": "dataCollectionTaskPartialSuccess", + "name": "DC_PARTIAL_SUCCESS" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#S3Bucket": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 63 + }, + "smithy.api#pattern": "[0-9a-z]+[0-9a-z\\.\\-]*[0-9a-z]+" + } + }, + "com.amazonaws.migrationhubstrategy#S3Key": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#S3Keys": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#String" + } + }, + "com.amazonaws.migrationhubstrategy#S3Object": { + "type": "structure", + "members": { + "s3Bucket": { + "target": "com.amazonaws.migrationhubstrategy#S3Bucket", + "traits": { + "smithy.api#documentation": "

      The S3 bucket name.

      " + } + }, + "s3key": { + "target": "com.amazonaws.migrationhubstrategy#S3Key", + "traits": { + "smithy.api#documentation": "

      The Amazon S3 key name.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Contains the S3 bucket name and the Amazon S3 key name.

      " + } + }, + "com.amazonaws.migrationhubstrategy#SecretsManagerKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + }, + "smithy.api#pattern": ".*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.migrationhubstrategy#SelfManageResources": { + "type": "structure", + "members": { + "targetDestination": { + "target": "com.amazonaws.migrationhubstrategy#SelfManageTargetDestinations", + "traits": { + "smithy.api#documentation": "

      Self-managed resources target destination.

      ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      Self-managed resources.

      " + } + }, + "com.amazonaws.migrationhubstrategy#SelfManageTargetDestination": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "None specified", + "name": "NONE_SPECIFIED" + }, + { + "value": "Amazon Elastic Cloud Compute (EC2)", + "name": "AMAZON_ELASTIC_CLOUD_COMPUTE" + }, + { + "value": "Amazon Elastic Container Service (ECS)", + "name": "AMAZON_ELASTIC_CONTAINER_SERVICE" + }, + { + "value": "Amazon Elastic Kubernetes Service (EKS)", + "name": "AMAZON_ELASTIC_KUBERNETES_SERVICE" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#SelfManageTargetDestinations": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#SelfManageTargetDestination" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.migrationhubstrategy#ServerCriteria": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NOT_DEFINED", + "name": "NOT_DEFINED" + }, + { + "value": "OS_NAME", + "name": "OS_NAME" + }, + { + "value": "STRATEGY", + "name": "STRATEGY" + }, + { + "value": "DESTINATION", + "name": "DESTINATION" + }, + { + "value": "SERVER_ID", + "name": "SERVER_ID" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#ServerDetail": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#ResourceId", + "traits": { + "smithy.api#documentation": "

      The server ID.

      " + } + }, + "name": { + "target": "com.amazonaws.migrationhubstrategy#ResourceName", + "traits": { + "smithy.api#documentation": "

      The name of the server.

      " + } + }, + "recommendationSet": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationSet", + "traits": { + "smithy.api#documentation": "

      A set of recommendations.

      " + } + }, + "dataCollectionStatus": { + "target": "com.amazonaws.migrationhubstrategy#RunTimeAssessmentStatus", + "traits": { + "smithy.api#documentation": "

      The status of assessment for the server.

      " + } + }, + "statusMessage": { + "target": "com.amazonaws.migrationhubstrategy#StatusMessage", + "traits": { + "smithy.api#documentation": "

      A message about the status of data collection, which contains detailed descriptions of\n any error messages.

      " + } + }, + "listAntipatternSeveritySummary": { + "target": "com.amazonaws.migrationhubstrategy#ListAntipatternSeveritySummary", + "traits": { + "smithy.api#documentation": "

      A list of anti-pattern severity summaries.

      " + } + }, + "systemInfo": { + "target": "com.amazonaws.migrationhubstrategy#SystemInfo", + "traits": { + "smithy.api#documentation": "

      System information about the server.

      " + } + }, + "applicationComponentStrategySummary": { + "target": "com.amazonaws.migrationhubstrategy#ListStrategySummary", + "traits": { + "smithy.api#documentation": "

      A list of strategy summaries.

      " + } + }, + "antipatternReportS3Object": { + "target": "com.amazonaws.migrationhubstrategy#S3Object", + "traits": { + "smithy.api#documentation": "

      The S3 bucket name and Amazon S3 key name for anti-pattern report.

      " + } + }, + "antipatternReportStatus": { + "target": "com.amazonaws.migrationhubstrategy#AntipatternReportStatus", + "traits": { + "smithy.api#documentation": "

      The status of the anti-pattern report generation.

      " + } + }, + "antipatternReportStatusMessage": { + "target": "com.amazonaws.migrationhubstrategy#StatusMessage", + "traits": { + "smithy.api#documentation": "

      A message about the status of the anti-pattern report generation.

      " + } + }, + "serverType": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The type of server.

      " + } + }, + "lastAnalyzedTimestamp": { + "target": "com.amazonaws.migrationhubstrategy#TimeStamp", + "traits": { + "smithy.api#documentation": "

      The timestamp of when the server was assessed.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Detailed information about a server.

      " + } + }, + "com.amazonaws.migrationhubstrategy#ServerDetails": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#ServerDetail" + } + }, + "com.amazonaws.migrationhubstrategy#ServerId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 27 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#ServerOsType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "WindowsServer", + "name": "windowsServer" + }, + { + "value": "AmazonLinux", + "name": "amazonLinux" + }, + { + "value": "EndOfSupportWindowsServer", + "name": "endOfSupportWindowsServer" + }, + { + "value": "Redhat", + "name": "redhat" + }, + { + "value": "Other", + "name": "other" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#ServerStrategies": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#ServerStrategy" + } + }, + "com.amazonaws.migrationhubstrategy#ServerStrategy": { + "type": "structure", + "members": { + "recommendation": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationSet", + "traits": { + "smithy.api#documentation": "

      Strategy recommendation for the server.

      " + } + }, + "status": { + "target": "com.amazonaws.migrationhubstrategy#StrategyRecommendation", + "traits": { + "smithy.api#documentation": "

      The recommendation status of the strategy for the server.

      " + } + }, + "numberOfApplicationComponents": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      The number of application components with this strategy recommendation running on the\n server.

      " + } + }, + "isPreferred": { + "target": "com.amazonaws.migrationhubstrategy#Boolean", + "traits": { + "smithy.api#documentation": "

      Set to true if the recommendation is set as preferred.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Contains information about a strategy recommendation for a server.

      " + } + }, + "com.amazonaws.migrationhubstrategy#ServerSummary": { + "type": "structure", + "members": { + "ServerOsType": { + "target": "com.amazonaws.migrationhubstrategy#ServerOsType", + "traits": { + "smithy.api#documentation": "

      \n Type of operating system for the servers.\n

      " + } + }, + "count": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      \n Number of servers.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Object containing details about the servers imported by Application Discovery Service\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#ServiceLinkedRoleLockClientException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.migrationhubstrategy#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

      \n Exception to indicate that the service-linked role (SLR) is locked.\n

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      The AWS account has reached its quota of imports. Contact AWS Support to increase the\n quota for this account.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.migrationhubstrategy#Severity": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "HIGH", + "name": "HIGH" + }, + { + "value": "MEDIUM", + "name": "MEDIUM" + }, + { + "value": "LOW", + "name": "LOW" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#SortOrder": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASC", + "name": "ASC" + }, + { + "value": "DESC", + "name": "DESC" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#SourceCode": { + "type": "structure", + "members": { + "versionControl": { + "target": "com.amazonaws.migrationhubstrategy#VersionControl", + "traits": { + "smithy.api#documentation": "

      \n The type of repository to use for the source code.\n

      " + } + }, + "sourceVersion": { + "target": "com.amazonaws.migrationhubstrategy#SourceVersion", + "traits": { + "smithy.api#documentation": "

      \n The branch of the source code.\n

      " + } + }, + "location": { + "target": "com.amazonaws.migrationhubstrategy#Location", + "traits": { + "smithy.api#documentation": "

      \n The repository name for the source code.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Object containing source code information that is linked to an application component.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#SourceCodeList": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#SourceCode" + } + }, + "com.amazonaws.migrationhubstrategy#SourceCodeRepositories": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#SourceCodeRepository" + } + }, + "com.amazonaws.migrationhubstrategy#SourceCodeRepository": { + "type": "structure", + "members": { + "repository": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n The repository name for the source code.\n

      " + } + }, + "branch": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n The branch of the source code.\n

      " + } + }, + "versionControlType": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n The type of repository to use for the source code.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Object containing source code information that is linked to an application component.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#SourceVersion": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 40 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#SrcCodeOrDbAnalysisStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ANALYSIS_TO_BE_SCHEDULED", + "name": "ANALYSIS_TO_BE_SCHEDULED" + }, + { + "value": "ANALYSIS_STARTED", + "name": "ANALYSIS_STARTED" + }, + { + "value": "ANALYSIS_SUCCESS", + "name": "ANALYSIS_SUCCESS" + }, + { + "value": "ANALYSIS_FAILED", + "name": "ANALYSIS_FAILED" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#StartAssessment": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#StartAssessmentRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#StartAssessmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

      Starts the assessment of an on-premises environment.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/start-assessment", + "code": 200 + } + } + }, + "com.amazonaws.migrationhubstrategy#StartAssessmentRequest": { + "type": "structure", + "members": { + "s3bucketForAnalysisData": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n The S3 bucket used by the collectors to send analysis data to the service.\n The bucket name must begin with migrationhub-strategy-.\n

      ", + "smithy.api#length": { + "min": 0, + "max": 63 + }, + "smithy.api#pattern": "[0-9a-z]+[0-9a-z\\.\\-]*[0-9a-z]+" + } + }, + "s3bucketForReportData": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n The S3 bucket where all the reports generated by the service are stored.\n The bucket name must begin with migrationhub-strategy-.\n

      ", + "smithy.api#length": { + "min": 0, + "max": 63 + }, + "smithy.api#pattern": "[0-9a-z]+[0-9a-z\\.\\-]*[0-9a-z]+" + } + } + } + }, + "com.amazonaws.migrationhubstrategy#StartAssessmentResponse": { + "type": "structure", + "members": { + "assessmentId": { + "target": "com.amazonaws.migrationhubstrategy#AsyncTaskId", + "traits": { + "smithy.api#documentation": "

      \n The ID of the assessment.\n

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#StartImportFileTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#StartImportFileTaskRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#StartImportFileTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Starts a file import.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/start-import-file-task", + "code": 200 + } + } + }, + "com.amazonaws.migrationhubstrategy#StartImportFileTaskRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      A descriptive name for the request.

      ", + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "[a-zA-Z0-9_-]+", + "smithy.api#required": {} + } + }, + "S3Bucket": { + "target": "com.amazonaws.migrationhubstrategy#importS3Bucket", + "traits": { + "smithy.api#documentation": "

      The S3 bucket where the import file is located. The bucket name is required to begin with\n migrationhub-strategy-.

      ", + "smithy.api#required": {} + } + }, + "s3key": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The Amazon S3 key name of the import file.

      ", + "smithy.api#required": {} + } + }, + "dataSourceType": { + "target": "com.amazonaws.migrationhubstrategy#DataSourceType", + "traits": { + "smithy.api#documentation": "

      Specifies the source that the servers are coming from. By default, Strategy Recommendations assumes that\n the servers specified in the import file are available in AWS Application Discovery Service.

      " + } + }, + "groupId": { + "target": "com.amazonaws.migrationhubstrategy#GroupIds", + "traits": { + "smithy.api#documentation": "

      Groups the resources in the import file together with a unique name. This ID can be as\n filter in ListApplicationComponents and ListServers.

      " + } + }, + "s3bucketForReportData": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The S3 bucket where Strategy Recommendations uploads import results. The bucket name is required to\n begin with migrationhub-strategy-.

      ", + "smithy.api#length": { + "min": 0, + "max": 63 + }, + "smithy.api#pattern": "[0-9a-z]+[0-9a-z\\.\\-]*[0-9a-z]+" + } + } + } + }, + "com.amazonaws.migrationhubstrategy#StartImportFileTaskResponse": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      The ID for a specific import task. The ID is unique within an AWS account.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#StartRecommendationReportGeneration": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#StartRecommendationReportGenerationRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#StartRecommendationReportGenerationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ConflictException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Starts generating a recommendation report.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/start-recommendation-report-generation", + "code": 200 + } + } + }, + "com.amazonaws.migrationhubstrategy#StartRecommendationReportGenerationRequest": { + "type": "structure", + "members": { + "outputFormat": { + "target": "com.amazonaws.migrationhubstrategy#OutputFormat", + "traits": { + "smithy.api#documentation": "

      The output format for the recommendation report file. The default format is Microsoft Excel.

      " + } + }, + "groupIdFilter": { + "target": "com.amazonaws.migrationhubstrategy#GroupIds", + "traits": { + "smithy.api#documentation": "

      Groups the resources in the recommendation report with a unique name.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#StartRecommendationReportGenerationResponse": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.migrationhubstrategy#RecommendationTaskId", + "traits": { + "smithy.api#documentation": "

      The ID of the recommendation report generation task.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#StatusMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#StopAssessment": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#StopAssessmentRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#StopAssessmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Stops the assessment of an on-premises environment.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/stop-assessment", + "code": 200 + } + } + }, + "com.amazonaws.migrationhubstrategy#StopAssessmentRequest": { + "type": "structure", + "members": { + "assessmentId": { + "target": "com.amazonaws.migrationhubstrategy#AsyncTaskId", + "traits": { + "smithy.api#documentation": "

      The assessmentId returned by StartAssessment.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.migrationhubstrategy#StopAssessmentResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubstrategy#Strategy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Rehost", + "name": "REHOST" + }, + { + "value": "Retirement", + "name": "RETIREMENT" + }, + { + "value": "Refactor", + "name": "REFACTOR" + }, + { + "value": "Replatform", + "name": "REPLATFORM" + }, + { + "value": "Retain", + "name": "RETAIN" + }, + { + "value": "Relocate", + "name": "RELOCATE" + }, + { + "value": "Repurchase", + "name": "REPURCHASE" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#StrategyOption": { + "type": "structure", + "members": { + "strategy": { + "target": "com.amazonaws.migrationhubstrategy#Strategy", + "traits": { + "smithy.api#documentation": "

      \n Type of transformation. For example, Rehost, Replatform, and so on.\n

      " + } + }, + "toolName": { + "target": "com.amazonaws.migrationhubstrategy#TransformationToolName", + "traits": { + "smithy.api#documentation": "

      \n The name of the tool that can be used to transform an application component using this strategy.\n

      " + } + }, + "targetDestination": { + "target": "com.amazonaws.migrationhubstrategy#TargetDestination", + "traits": { + "smithy.api#documentation": "

      \n Destination information about where the application component can migrate to. For example, EC2, ECS, and so on.\n

      " + } + }, + "isPreferred": { + "target": "com.amazonaws.migrationhubstrategy#Boolean", + "traits": { + "smithy.api#documentation": "

      \n Indicates if a specific strategy is preferred for the application component.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Information about all the available strategy options for migrating and modernizing an application component.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#StrategyRecommendation": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "recommended", + "name": "RECOMMENDED" + }, + { + "value": "viableOption", + "name": "VIABLE_OPTION" + }, + { + "value": "notRecommended", + "name": "NOT_RECOMMENDED" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#StrategySummary": { + "type": "structure", + "members": { + "strategy": { + "target": "com.amazonaws.migrationhubstrategy#Strategy", + "traits": { + "smithy.api#documentation": "

      \n The name of recommended strategy.\n

      " + } + }, + "count": { + "target": "com.amazonaws.migrationhubstrategy#Integer", + "traits": { + "smithy.api#documentation": "

      \n The count of recommendations per strategy.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Object containing the summary of the strategy recommendations.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#String": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#SystemInfo": { + "type": "structure", + "members": { + "osInfo": { + "target": "com.amazonaws.migrationhubstrategy#OSInfo", + "traits": { + "smithy.api#documentation": "

      \n Operating system corresponding to a server.\n

      " + } + }, + "fileSystemType": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n File system type for the server.\n

      " + } + }, + "networkInfoList": { + "target": "com.amazonaws.migrationhubstrategy#NetworkInfoList", + "traits": { + "smithy.api#documentation": "

      \n Networking information related to a server.\n

      " + } + }, + "cpuArchitecture": { + "target": "com.amazonaws.migrationhubstrategy#String", + "traits": { + "smithy.api#documentation": "

      \n CPU architecture type for the server.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Information about the server that hosts application components.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#TargetDatabaseEngine": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "None specified", + "name": "NONE_SPECIFIED" + }, + { + "value": "Amazon Aurora", + "name": "AMAZON_AURORA" + }, + { + "value": "AWS PostgreSQL", + "name": "AWS_POSTGRESQL" + }, + { + "value": "MySQL", + "name": "MYSQL" + }, + { + "value": "Microsoft SQL Server", + "name": "MICROSOFT_SQL_SERVER" + }, + { + "value": "Oracle Database", + "name": "ORACLE_DATABASE" + }, + { + "value": "MariaDB", + "name": "MARIA_DB" + }, + { + "value": "SAP", + "name": "SAP" + }, + { + "value": "Db2 LUW", + "name": "DB2_LUW" + }, + { + "value": "MongoDB", + "name": "MONGO_DB" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#TargetDatabaseEngines": { + "type": "list", + "member": { + "target": "com.amazonaws.migrationhubstrategy#TargetDatabaseEngine" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.migrationhubstrategy#TargetDestination": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "None specified", + "name": "NONE_SPECIFIED" + }, + { + "value": "AWS Elastic BeanStalk", + "name": "AWS_ELASTIC_BEANSTALK" + }, + { + "value": "AWS Fargate", + "name": "AWS_FARGATE" + }, + { + "value": "Amazon Elastic Cloud Compute (EC2)", + "name": "AMAZON_ELASTIC_CLOUD_COMPUTE" + }, + { + "value": "Amazon Elastic Container Service (ECS)", + "name": "AMAZON_ELASTIC_CONTAINER_SERVICE" + }, + { + "value": "Amazon Elastic Kubernetes Service (EKS)", + "name": "AMAZON_ELASTIC_KUBERNETES_SERVICE" + }, + { + "value": "Aurora MySQL", + "name": "AURORA_MYSQL" + }, + { + "value": "Aurora PostgreSQL", + "name": "AURORA_POSTGRESQL" + }, + { + "value": "Amazon Relational Database Service on MySQL", + "name": "AMAZON_RDS_MYSQL" + }, + { + "value": "Amazon Relational Database Service on PostgreSQL", + "name": "AMAZON_RDS_POSTGRESQL" + }, + { + "value": "Amazon DocumentDB", + "name": "AMAZON_DOCUMENTDB" + }, + { + "value": "Amazon DynamoDB", + "name": "AMAZON_DYNAMODB" + }, + { + "value": "Amazon Relational Database Service", + "name": "AMAZON_RDS" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.migrationhubstrategy#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

      The request was denied due to request throttling.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.migrationhubstrategy#TimeStamp": { + "type": "timestamp" + }, + "com.amazonaws.migrationhubstrategy#TranformationToolDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#TranformationToolInstallationLink": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.migrationhubstrategy#TransformationTool": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.migrationhubstrategy#TransformationToolName", + "traits": { + "smithy.api#documentation": "

      \n Name of the tool. \n

      " + } + }, + "description": { + "target": "com.amazonaws.migrationhubstrategy#TranformationToolDescription", + "traits": { + "smithy.api#documentation": "

      \n Description of the tool.\n

      " + } + }, + "tranformationToolInstallationLink": { + "target": "com.amazonaws.migrationhubstrategy#TranformationToolInstallationLink", + "traits": { + "smithy.api#documentation": "

      \n URL for installing the tool.\n

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      \n Information of the transformation tool that can be used to migrate and modernize the application.\n

      " + } + }, + "com.amazonaws.migrationhubstrategy#TransformationToolName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "App2Container", + "name": "APP2CONTAINER" + }, + { + "value": "Porting Assistant For .NET", + "name": "PORTING_ASSISTANT" + }, + { + "value": "End of Support Migration", + "name": "EMP" + }, + { + "value": "Windows Web Application Migration Assistant", + "name": "WWAMA" + }, + { + "value": "Application Migration Service", + "name": "MGN" + }, + { + "value": "Strategy Recommendation Support", + "name": "STRATEGY_RECOMMENDATION_SUPPORT" + }, + { + "value": "In Place Operating System Upgrade", + "name": "IN_PLACE_OS_UPGRADE" + }, + { + "value": "Schema Conversion Tool", + "name": "SCT" + }, + { + "value": "Database Migration Service", + "name": "DMS" + }, + { + "value": "Native SQL Server Backup/Restore", + "name": "NATIVE_SQL" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#UpdateApplicationComponentConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#UpdateApplicationComponentConfigRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#UpdateApplicationComponentConfigResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Updates the configuration of an application component.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/update-applicationcomponent-config/", + "code": 200 + } + } + }, + "com.amazonaws.migrationhubstrategy#UpdateApplicationComponentConfigRequest": { + "type": "structure", + "members": { + "applicationComponentId": { + "target": "com.amazonaws.migrationhubstrategy#ApplicationComponentId", + "traits": { + "smithy.api#documentation": "

      The ID of the application component. The ID is unique within an AWS account.

      ", + "smithy.api#required": {} + } + }, + "inclusionStatus": { + "target": "com.amazonaws.migrationhubstrategy#InclusionStatus", + "traits": { + "smithy.api#documentation": "

      Indicates whether the application component has been included for server recommendation\n or not.

      " + } + }, + "strategyOption": { + "target": "com.amazonaws.migrationhubstrategy#StrategyOption", + "traits": { + "smithy.api#documentation": "

      The preferred strategy options for the application component. Use values from the GetApplicationComponentStrategies response.

      " + } + }, + "sourceCodeList": { + "target": "com.amazonaws.migrationhubstrategy#SourceCodeList", + "traits": { + "smithy.api#documentation": "

      The list of source code configurations to update for the application component.

      " + } + }, + "secretsManagerKey": { + "target": "com.amazonaws.migrationhubstrategy#SecretsManagerKey", + "traits": { + "smithy.api#documentation": "

      Database credentials.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#UpdateApplicationComponentConfigResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubstrategy#UpdateServerConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubstrategy#UpdateServerConfigRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubstrategy#UpdateServerConfigResponse" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubstrategy#InternalServerException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ThrottlingException" + }, + { + "target": "com.amazonaws.migrationhubstrategy#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

      Updates the configuration of the specified server.

      ", + "smithy.api#http": { + "method": "POST", + "uri": "/update-server-config/", + "code": 200 + } + } + }, + "com.amazonaws.migrationhubstrategy#UpdateServerConfigRequest": { + "type": "structure", + "members": { + "serverId": { + "target": "com.amazonaws.migrationhubstrategy#ServerId", + "traits": { + "smithy.api#documentation": "

      The ID of the server.

      ", + "smithy.api#required": {} + } + }, + "strategyOption": { + "target": "com.amazonaws.migrationhubstrategy#StrategyOption", + "traits": { + "smithy.api#documentation": "

      The preferred strategy options for the application component. See the response from GetServerStrategies.

      " + } + } + } + }, + "com.amazonaws.migrationhubstrategy#UpdateServerConfigResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.migrationhubstrategy#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.migrationhubstrategy#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

      The request body isn't valid.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.migrationhubstrategy#VersionControl": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "GITHUB", + "name": "GITHUB" + }, + { + "value": "GITHUB_ENTERPRISE", + "name": "GITHUB_ENTERPRISE" + } + ] + } + }, + "com.amazonaws.migrationhubstrategy#errorMessage": { + "type": "string" + }, + "com.amazonaws.migrationhubstrategy#importS3Bucket": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 63 + }, + "smithy.api#pattern": "[0-9a-z]+[0-9a-z\\.\\-]*[0-9a-z]+" + } + }, + "com.amazonaws.migrationhubstrategy#importS3Key": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": ".*\\S.*" + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/redshift-data.json b/codegen/sdk-codegen/aws-models/redshift-data.json index 81cff2cbacad..456b543ae9cd 100644 --- a/codegen/sdk-codegen/aws-models/redshift-data.json +++ b/codegen/sdk-codegen/aws-models/redshift-data.json @@ -34,7 +34,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Runs one or more SQL statements, which can be data manipulation language (DML) or data definition\n language (DDL). \n Depending on the authorization\n method, use one of the following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the \n cluster identifier that matches the cluster in the secret.

        \n
      • \n
      • \n

        Temporary credentials - specify the cluster identifier, the database name, and the\n database user name. Permission to call the redshift:GetClusterCredentials\n operation is required to use this method.

        \n
      • \n
      " + "smithy.api#documentation": "

      Runs one or more SQL statements, which can be data manipulation language (DML) or data definition\n language (DDL). \n Depending on the authorization\n method, use one of the following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.\nWhen connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        \n
      • \n
      • \n

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. \nAlso, permission to call the redshift:GetClusterCredentials operation is required.\nWhen connecting to a serverless endpoint, specify the database name.

        \n
      • \n
      " } }, "com.amazonaws.redshiftdata#BatchExecuteStatementException": { @@ -73,8 +73,7 @@ "ClusterIdentifier": { "target": "com.amazonaws.redshiftdata#Location", "traits": { - "smithy.api#documentation": "

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      ", - "smithy.api#required": {} + "smithy.api#documentation": "

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      " } }, "SecretArn": { @@ -86,7 +85,7 @@ "DbUser": { "target": "com.amazonaws.redshiftdata#String", "traits": { - "smithy.api#documentation": "

      The database user name. This parameter is required when authenticating using temporary credentials.

      " + "smithy.api#documentation": "

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      " } }, "Database": { @@ -128,7 +127,7 @@ "ClusterIdentifier": { "target": "com.amazonaws.redshiftdata#Location", "traits": { - "smithy.api#documentation": "

      The cluster identifier.

      " + "smithy.api#documentation": "

      The cluster identifier. This parameter is not returned when connecting to a serverless endpoint.

      " } }, "DbUser": { @@ -181,6 +180,9 @@ "target": "com.amazonaws.redshiftdata#CancelStatementResponse" }, "errors": [ + { + "target": "com.amazonaws.redshiftdata#DatabaseConnectionException" + }, { "target": "com.amazonaws.redshiftdata#InternalServerException" }, @@ -316,6 +318,22 @@ "target": "com.amazonaws.redshiftdata#ColumnMetadata" } }, + "com.amazonaws.redshiftdata#DatabaseConnectionException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.redshiftdata#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      Connection to a database failed.

      ", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, "com.amazonaws.redshiftdata#DatabaseList": { "type": "list", "member": { @@ -431,7 +449,7 @@ "HasResultSet": { "target": "smithy.api#Boolean", "traits": { - "smithy.api#documentation": "

      A value that indicates whether the statement has a result set. The result set can be empty.

      " + "smithy.api#documentation": "

      A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set.\n The value is true if any substatement returns a result set.

      " } }, "QueryString": { @@ -481,6 +499,9 @@ "target": "com.amazonaws.redshiftdata#DescribeTableResponse" }, "errors": [ + { + "target": "com.amazonaws.redshiftdata#DatabaseConnectionException" + }, { "target": "com.amazonaws.redshiftdata#InternalServerException" }, @@ -489,7 +510,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Describes the detailed information about a table from metadata in the cluster. The\n information includes its columns. \n A token is returned to page through the column list.\n Depending on the authorization method, use one of the\n following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the \n cluster identifier that matches the cluster in the secret.

        \n
      • \n
      • \n

        Temporary credentials - specify the cluster identifier, the database name, and the database\n user name. Permission to call the redshift:GetClusterCredentials operation is\n required to use this method.

        \n
      • \n
      ", + "smithy.api#documentation": "

      Describes the detailed information about a table from metadata in the cluster. The\n information includes its columns. \n A token is returned to page through the column list.\n Depending on the authorization method, use one of the\n following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.\nWhen connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        \n
      • \n
      • \n

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. \nAlso, permission to call the redshift:GetClusterCredentials operation is required.\nWhen connecting to a serverless endpoint, specify the database name.

        \n
      • \n
      ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -505,8 +526,7 @@ "ClusterIdentifier": { "target": "com.amazonaws.redshiftdata#Location", "traits": { - "smithy.api#documentation": "

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      ", - "smithy.api#required": {} + "smithy.api#documentation": "

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      " } }, "SecretArn": { @@ -518,7 +538,7 @@ "DbUser": { "target": "com.amazonaws.redshiftdata#String", "traits": { - "smithy.api#documentation": "

      The database user name. This parameter is required when authenticating using temporary credentials.

      " + "smithy.api#documentation": "

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      " } }, "Database": { @@ -603,7 +623,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Runs an SQL statement, which can be data manipulation language (DML) or data definition\n language (DDL). This statement must be a single SQL statement. \n Depending on the authorization\n method, use one of the following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the \n cluster identifier that matches the cluster in the secret.

        \n
      • \n
      • \n

        Temporary credentials - specify the cluster identifier, the database name, and the\n database user name. Permission to call the redshift:GetClusterCredentials\n operation is required to use this method.

        \n
      • \n
      " + "smithy.api#documentation": "

      Runs an SQL statement, which can be data manipulation language (DML) or data definition\n language (DDL). This statement must be a single SQL statement. \n Depending on the authorization\n method, use one of the following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.\nWhen connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        \n
      • \n
      • \n

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. \nAlso, permission to call the redshift:GetClusterCredentials operation is required.\nWhen connecting to a serverless endpoint, specify the database name.

        \n
      • \n
      " } }, "com.amazonaws.redshiftdata#ExecuteStatementException": { @@ -643,8 +663,7 @@ "ClusterIdentifier": { "target": "com.amazonaws.redshiftdata#Location", "traits": { - "smithy.api#documentation": "

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      ", - "smithy.api#required": {} + "smithy.api#documentation": "

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      " } }, "SecretArn": { @@ -656,7 +675,7 @@ "DbUser": { "target": "com.amazonaws.redshiftdata#String", "traits": { - "smithy.api#documentation": "

      The database user name. This parameter is required when authenticating using temporary credentials.

      " + "smithy.api#documentation": "

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      " } }, "Database": { @@ -704,7 +723,7 @@ "ClusterIdentifier": { "target": "com.amazonaws.redshiftdata#Location", "traits": { - "smithy.api#documentation": "

      The cluster identifier.

      " + "smithy.api#documentation": "

      The cluster identifier. This parameter is not returned when connecting to a serverless endpoint.

      " } }, "DbUser": { @@ -883,6 +902,9 @@ "target": "com.amazonaws.redshiftdata#ListDatabasesResponse" }, "errors": [ + { + "target": "com.amazonaws.redshiftdata#DatabaseConnectionException" + }, { "target": "com.amazonaws.redshiftdata#InternalServerException" }, @@ -891,7 +913,7 @@ } ], "traits": { - "smithy.api#documentation": "

      List the databases in a cluster. \n A token is returned to page through the database list.\n Depending on the authorization method, use one of the\n following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the \n cluster identifier that matches the cluster in the secret.

        \n
      • \n
      • \n

        Temporary credentials - specify the cluster identifier, the database name, and the\n database user name. Permission to call the redshift:GetClusterCredentials\n operation is required to use this method.

        \n
      • \n
      ", + "smithy.api#documentation": "

      List the databases in a cluster. \n A token is returned to page through the database list.\n Depending on the authorization method, use one of the\n following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.\nWhen connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        \n
      • \n
      • \n

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. \nAlso, permission to call the redshift:GetClusterCredentials operation is required.\nWhen connecting to a serverless endpoint, specify the database name.

        \n
      • \n
      ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -907,8 +929,7 @@ "ClusterIdentifier": { "target": "com.amazonaws.redshiftdata#Location", "traits": { - "smithy.api#documentation": "

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      ", - "smithy.api#required": {} + "smithy.api#documentation": "

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      " } }, "Database": { @@ -927,7 +948,7 @@ "DbUser": { "target": "com.amazonaws.redshiftdata#String", "traits": { - "smithy.api#documentation": "

      The database user name. This parameter is required when authenticating using temporary credentials.

      " + "smithy.api#documentation": "

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      " } }, "NextToken": { @@ -970,6 +991,9 @@ "target": "com.amazonaws.redshiftdata#ListSchemasResponse" }, "errors": [ + { + "target": "com.amazonaws.redshiftdata#DatabaseConnectionException" + }, { "target": "com.amazonaws.redshiftdata#InternalServerException" }, @@ -978,7 +1002,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Lists the schemas in a database. \n A token is returned to page through the schema list. \n Depending on the authorization method, use one of the\n following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the \n cluster identifier that matches the cluster in the secret.

        \n
      • \n
      • \n

        Temporary credentials - specify the cluster identifier, the database name, and the\n database user name. Permission to call the redshift:GetClusterCredentials\n operation is required to use this method.

        \n
      • \n
      ", + "smithy.api#documentation": "

      Lists the schemas in a database. \n A token is returned to page through the schema list. \n Depending on the authorization method, use one of the\n following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.\nWhen connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        \n
      • \n
      • \n

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. \nAlso, permission to call the redshift:GetClusterCredentials operation is required.\nWhen connecting to a serverless endpoint, specify the database name.

        \n
      • \n
      ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -994,8 +1018,7 @@ "ClusterIdentifier": { "target": "com.amazonaws.redshiftdata#Location", "traits": { - "smithy.api#documentation": "

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      ", - "smithy.api#required": {} + "smithy.api#documentation": "

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      " } }, "SecretArn": { @@ -1007,7 +1030,7 @@ "DbUser": { "target": "com.amazonaws.redshiftdata#String", "traits": { - "smithy.api#documentation": "

      The database user name. This parameter is required when authenticating using temporary credentials.

      " + "smithy.api#documentation": "

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      " } }, "Database": { @@ -1158,6 +1181,9 @@ "target": "com.amazonaws.redshiftdata#ListTablesResponse" }, "errors": [ + { + "target": "com.amazonaws.redshiftdata#DatabaseConnectionException" + }, { "target": "com.amazonaws.redshiftdata#InternalServerException" }, @@ -1166,7 +1192,7 @@ } ], "traits": { - "smithy.api#documentation": "

      List the tables in a database. If neither SchemaPattern nor TablePattern are specified, then \n all tables in the database are returned.\n A token is returned to page through the table list. \n Depending on the authorization method, use one of the\n following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the \n cluster identifier that matches the cluster in the secret.

        \n
      • \n
      • \n

        Temporary credentials - specify the cluster identifier, the database name, and the\n database user name. Permission to call the redshift:GetClusterCredentials\n operation is required to use this method.

        \n
      • \n
      ", + "smithy.api#documentation": "

      List the tables in a database. If neither SchemaPattern nor TablePattern are specified, then \n all tables in the database are returned.\n A token is returned to page through the table list. \n Depending on the authorization method, use one of the\n following combinations of request parameters:

      \n
        \n
      • \n

        Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret.\nWhen connecting to a serverless endpoint, specify the Amazon Resource Name (ARN) of the secret and the database name.

        \n
      • \n
      • \n

        Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the database user name. \nAlso, permission to call the redshift:GetClusterCredentials operation is required.\nWhen connecting to a serverless endpoint, specify the database name.

        \n
      • \n
      ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1182,8 +1208,7 @@ "ClusterIdentifier": { "target": "com.amazonaws.redshiftdata#Location", "traits": { - "smithy.api#documentation": "

      The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

      ", - "smithy.api#required": {} + "smithy.api#documentation": "

      The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.

      " } }, "SecretArn": { @@ -1195,7 +1220,7 @@ "DbUser": { "target": "com.amazonaws.redshiftdata#String", "traits": { - "smithy.api#documentation": "

      The database user name. This parameter is required when authenticating using temporary credentials.

      " + "smithy.api#documentation": "

      The database user name. This parameter is required when connecting to a cluster and authenticating using temporary credentials.

      " } }, "Database": { @@ -1285,6 +1310,22 @@ }, "com.amazonaws.redshiftdata#RedshiftData": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Redshift Data", + "arnNamespace": "redshift-data", + "cloudFormationName": "RedshiftData", + "cloudTrailEventSource": "redshift-data.amazonaws.com", + "endpointPrefix": "redshift-data" + }, + "aws.auth#sigv4": { + "name": "redshift-data" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#cors": {}, + "smithy.api#documentation": "

      You can use the Amazon Redshift Data API to run queries on Amazon Redshift tables. You\n can run SQL statements, which are committed if the statement succeeds.

      \n

      For more information about the Amazon Redshift Data API, see \n Using the Amazon Redshift Data API in the \n Amazon Redshift Cluster Management Guide.

      ", + "smithy.api#title": "Redshift Data API Service" + }, "version": "2019-12-20", "operations": [ { @@ -1317,23 +1358,7 @@ { "target": "com.amazonaws.redshiftdata#ListTables" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Redshift Data", - "arnNamespace": "redshift-data", - "cloudFormationName": "RedshiftData", - "cloudTrailEventSource": "redshift-data.amazonaws.com", - "endpointPrefix": "redshift-data" - }, - "aws.auth#sigv4": { - "name": "redshift-data" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#cors": {}, - "smithy.api#documentation": "

      You can use the Amazon Redshift Data API to run queries on Amazon Redshift tables. You\n can run SQL statements, which are committed if the statement succeeds.

      \n

      For more information about the Amazon Redshift Data API, see \n Using the Amazon Redshift Data API in the \n Amazon Redshift Cluster Management Guide.

      ", - "smithy.api#title": "Redshift Data API Service" - } + ] }, "com.amazonaws.redshiftdata#ResourceNotFoundException": { "type": "structure", @@ -1653,7 +1678,7 @@ "HasResultSet": { "target": "smithy.api#Boolean", "traits": { - "smithy.api#documentation": "

      A value that indicates whether the statement has a result set. The result set can be empty.

      " + "smithy.api#documentation": "

      A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set.

      " } } }, diff --git a/codegen/sdk-codegen/aws-models/sns.json b/codegen/sdk-codegen/aws-models/sns.json index e532a8379dad..12f1c78070ab 100644 --- a/codegen/sdk-codegen/aws-models/sns.json +++ b/codegen/sdk-codegen/aws-models/sns.json @@ -55,7 +55,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Adds a statement to a topic's access control policy, granting access for the specified\n accounts to the specified actions.

      " + "smithy.api#documentation": "

      Adds a statement to a topic's access control policy, granting access for the specified\n Amazon Web Services accounts to the specified actions.

      " } }, "com.amazonaws.sns#AddPermissionInput": { @@ -78,7 +78,7 @@ "AWSAccountId": { "target": "com.amazonaws.sns#DelegatesList", "traits": { - "smithy.api#documentation": "

      The account IDs of the users (principals) who will be given access to the\n specified actions. The users must have account, but do not need to be signed up for\n this service.

      ", + "smithy.api#documentation": "

      The Amazon Web Services account IDs of the users (principals) who will be given access to the\n specified actions. The users must have Amazon Web Services account, but do not need to be signed up for\n this service.

      ", "smithy.api#required": {} } }, @@ -102,6 +102,24 @@ }, "com.amazonaws.sns#AmazonSimpleNotificationService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "SNS", + "arnNamespace": "sns", + "cloudFormationName": "SNS", + "cloudTrailEventSource": "sns.amazonaws.com", + "endpointPrefix": "sns" + }, + "aws.auth#sigv4": { + "name": "sns" + }, + "aws.protocols#awsQuery": {}, + "smithy.api#documentation": "Amazon Simple Notification Service\n

      Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build\n distributed web-enabled applications. Applications can use Amazon SNS to easily push\n real-time notification messages to interested subscribers over multiple delivery\n protocols. For more information about this product see the Amazon SNS product page. For detailed information about Amazon SNS features\n and their associated API calls, see the Amazon SNS Developer Guide.

      \n

      For information on the permissions you need to use this API, see Identity and access management in Amazon SNS in the Amazon SNS Developer\n Guide.\n

      \n

      We also provide SDKs that enable you to access Amazon SNS from your preferred programming\n language. The SDKs contain functionality that automatically takes care of tasks such as:\n cryptographically signing your service requests, retrying requests, and handling error\n responses. For a list of available SDKs, go to Tools for Amazon Web Services.

      ", + "smithy.api#title": "Amazon Simple Notification Service", + "smithy.api#xmlNamespace": { + "uri": "http://sns.amazonaws.com/doc/2010-03-31/" + } + }, "version": "2010-03-31", "operations": [ { @@ -188,6 +206,9 @@ { "target": "com.amazonaws.sns#Publish" }, + { + "target": "com.amazonaws.sns#PublishBatch" + }, { "target": "com.amazonaws.sns#RemovePermission" }, @@ -221,25 +242,7 @@ { "target": "com.amazonaws.sns#VerifySMSSandboxPhoneNumber" } - ], - "traits": { - "aws.api#service": { - "sdkId": "SNS", - "arnNamespace": "sns", - "cloudFormationName": "SNS", - "cloudTrailEventSource": "sns.amazonaws.com", - "endpointPrefix": "sns" - }, - "aws.auth#sigv4": { - "name": "sns" - }, - "aws.protocols#awsQuery": {}, - "smithy.api#documentation": "Amazon Simple Notification Service\n

      Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build\n distributed web-enabled applications. Applications can use Amazon SNS to easily push\n real-time notification messages to interested subscribers over multiple delivery\n protocols. For more information about this product see the Amazon SNS product page. For detailed information about Amazon SNS features\n and their associated API calls, see the Amazon SNS Developer Guide.

      \n

      For information on the permissions you need to use this API, see Identity and access management in Amazon SNS in the Amazon SNS Developer\n Guide.\n

      \n

      We also provide SDKs that enable you to access Amazon SNS from your preferred programming\n language. The SDKs contain functionality that automatically takes care of tasks such as:\n cryptographically signing your service requests, retrying requests, and handling error\n responses. For a list of available SDKs, go to Tools for Amazon Web Services.

      ", - "smithy.api#title": "Amazon Simple Notification Service", - "smithy.api#xmlNamespace": { - "uri": "http://sns.amazonaws.com/doc/2010-03-31/" - } - } + ] }, "com.amazonaws.sns#AuthorizationErrorException": { "type": "structure", @@ -258,6 +261,81 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.sns#BatchEntryIdsNotDistinctException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sns#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "BatchEntryIdsNotDistinct", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

      Two or more batch entries in the request have the same Id.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sns#BatchRequestTooLongException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sns#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "BatchRequestTooLong", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

      The length of all the batch messages put together is more than the limit.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sns#BatchResultErrorEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sns#String", + "traits": { + "smithy.api#documentation": "

      The Id of an entry in a batch request

      ", + "smithy.api#required": {} + } + }, + "Code": { + "target": "com.amazonaws.sns#String", + "traits": { + "smithy.api#documentation": "

      An error code representing why the action failed on this entry.

      ", + "smithy.api#required": {} + } + }, + "Message": { + "target": "com.amazonaws.sns#String", + "traits": { + "smithy.api#documentation": "

      A message explaining why the action failed on this entry.

      " + } + }, + "SenderFault": { + "target": "com.amazonaws.sns#boolean", + "traits": { + "smithy.api#documentation": "

      Specifies whether the error happened due to the caller of the batch API action.

      ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

      Gives a detailed description of failed messages in the batch.

      " + } + }, + "com.amazonaws.sns#BatchResultErrorEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sns#BatchResultErrorEntry" + } + }, "com.amazonaws.sns#Binary": { "type": "blob" }, @@ -284,7 +362,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Accepts a phone number and indicates whether the phone holder has opted out of\n receiving SMS messages from your account. You cannot send SMS messages to a number that\n is opted out.

      \n

      To resume sending messages, you can opt in the number by using the\n OptInPhoneNumber action.

      " + "smithy.api#documentation": "

      Accepts a phone number and indicates whether the phone holder has opted out of\n receiving SMS messages from your Amazon Web Services account. You cannot send SMS messages to a number that\n is opted out.

      \n

      To resume sending messages, you can opt in the number by using the\n OptInPhoneNumber action.

      " } }, "com.amazonaws.sns#CheckIfPhoneNumberIsOptedOutInput": { @@ -441,7 +519,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Creates a platform application object for one of the supported push notification\n services, such as APNS and GCM (Firebase Cloud Messaging), to which devices and mobile\n apps may register. You must specify PlatformPrincipal and\n PlatformCredential attributes when using the\n CreatePlatformApplication action.

      \n

      \n PlatformPrincipal and PlatformCredential are received from\n the notification service.

      \n
        \n
      • \n

        For ADM, PlatformPrincipal is client id\n and PlatformCredential is client secret.

        \n
      • \n
      • \n

        For Baidu, PlatformPrincipal is API key\n and PlatformCredential is secret key.

        \n
      • \n
      • \n

        For APNS and APNS_SANDBOX,\n PlatformPrincipal is SSL certificate and\n PlatformCredential is private key.

        \n
      • \n
      • \n

        For GCM (Firebase Cloud Messaging), there is no\n PlatformPrincipal and the PlatformCredential is\n API key.

        \n
      • \n
      • \n

        For MPNS, PlatformPrincipal is TLS\n certificate and PlatformCredential is private\n key.

        \n
      • \n
      • \n

        For WNS, PlatformPrincipal is Package Security\n Identifier and PlatformCredential is secret\n key.

        \n
      • \n
      \n

      You can use the returned PlatformApplicationArn as an attribute for the\n CreatePlatformEndpoint action.

      " + "smithy.api#documentation": "

      Creates a platform application object for one of the supported push notification\n services, such as APNS and GCM (Firebase Cloud Messaging), to which devices and mobile\n apps may register. You must specify PlatformPrincipal and\n PlatformCredential attributes when using the\n CreatePlatformApplication action.

      \n

      \n PlatformPrincipal and PlatformCredential are received from\n the notification service.

      \n
        \n
      • \n

        For ADM, PlatformPrincipal is client id\n and PlatformCredential is client secret.

        \n
      • \n
      • \n

        For Baidu, PlatformPrincipal is API key\n and PlatformCredential is secret key.

        \n
      • \n
      • \n

        For APNS and APNS_SANDBOX using certificate credentials,\n PlatformPrincipal is SSL certificate and\n PlatformCredential is private key.

        \n
      • \n
      • \n

        For APNS and APNS_SANDBOX using token credentials,\n PlatformPrincipal is signing key ID and\n PlatformCredential is signing key.

        \n
      • \n
      • \n

        For GCM (Firebase Cloud Messaging), there is no\n PlatformPrincipal and the PlatformCredential is\n API key.

        \n
      • \n
      • \n

        For MPNS, PlatformPrincipal is TLS\n certificate and PlatformCredential is private\n key.

        \n
      • \n
      • \n

        For WNS, PlatformPrincipal is Package Security\n Identifier and PlatformCredential is secret\n key.

        \n
      • \n
      \n

      You can use the returned PlatformApplicationArn as an attribute for the\n CreatePlatformEndpoint action.

      " } }, "com.amazonaws.sns#CreatePlatformApplicationInput": { @@ -576,7 +654,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Adds a destination phone number to an account in the SMS sandbox and sends a\n one-time password (OTP) to that phone number.

      \n

      When you start using Amazon SNS to send SMS messages, your account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " + "smithy.api#documentation": "

      Adds a destination phone number to an Amazon Web Services account in the SMS sandbox and sends a\n one-time password (OTP) to that phone number.

      \n

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " } }, "com.amazonaws.sns#CreateSMSSandboxPhoneNumberInput": { @@ -788,7 +866,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Deletes an account's verified or pending phone number from the SMS sandbox.

      \n

      When you start using Amazon SNS to send SMS messages, your account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " + "smithy.api#documentation": "

      Deletes an Amazon Web Services account's verified or pending phone number from the SMS sandbox.

      \n

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " } }, "com.amazonaws.sns#DeleteSMSSandboxPhoneNumberInput": { @@ -851,13 +929,30 @@ } } }, + "com.amazonaws.sns#EmptyBatchRequestException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sns#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "EmptyBatchRequest", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

      The batch request doesn't contain any entries.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.sns#Endpoint": { "type": "structure", "members": { "EndpointArn": { "target": "com.amazonaws.sns#String", "traits": { - "smithy.api#documentation": "

      EndpointArn for mobile app and device.

      " + "smithy.api#documentation": "

      The EndpointArn for mobile app and device.

      " } }, "Attributes": { @@ -868,7 +963,7 @@ } }, "traits": { - "smithy.api#documentation": "

      Endpoint for mobile app and device.

      " + "smithy.api#documentation": "

      The endpoint for mobile app and device.

      " } }, "com.amazonaws.sns#Endpoint2": { @@ -906,7 +1001,7 @@ "code": "FilterPolicyLimitExceeded", "httpResponseCode": 403 }, - "smithy.api#documentation": "

      Indicates that the number of filter polices in your account exceeds the limit. To\n add more filter polices, submit an SNS Limit Increase case in the Amazon Web Services Support\n Center.

      ", + "smithy.api#documentation": "

      Indicates that the number of filter polices in your Amazon Web Services account exceeds the limit. To\n add more filter polices, submit an Amazon SNS Limit Increase case in the Amazon Web Services Support\n Center.

      ", "smithy.api#error": "client", "smithy.api#httpError": 403 } @@ -1013,7 +1108,7 @@ "Attributes": { "target": "com.amazonaws.sns#MapStringToString", "traits": { - "smithy.api#documentation": "

      Attributes include the following:

      \n
        \n
      • \n

        \n EventEndpointCreated – Topic ARN to which EndpointCreated\n event notifications should be sent.

        \n
      • \n
      • \n

        \n EventEndpointDeleted – Topic ARN to which EndpointDeleted\n event notifications should be sent.

        \n
      • \n
      • \n

        \n EventEndpointUpdated – Topic ARN to which EndpointUpdate\n event notifications should be sent.

        \n
      • \n
      • \n

        \n EventDeliveryFailure – Topic ARN to which DeliveryFailure\n event notifications should be sent upon Direct Publish delivery failure\n (permanent) to one of the application's endpoints.

        \n
      • \n
      " + "smithy.api#documentation": "

      Attributes include the following:

      \n
        \n
      • \n

        \n AppleCertificateExpiryDate – The expiry date of the SSL certificate used to configure certificate-based authentication.

        \n
      • \n
      • \n

        \n ApplePlatformTeamID – The Apple developer account ID used to configure token-based authentication.

        \n
      • \n
      • \n

        \n ApplePlatformBundleID – The app identifier used to configure token-based authentication.

        \n
      • \n
      • \n

        \n EventEndpointCreated – Topic ARN to which EndpointCreated\n event notifications should be sent.

        \n
      • \n
      • \n

        \n EventEndpointDeleted – Topic ARN to which EndpointDeleted\n event notifications should be sent.

        \n
      • \n
      • \n

        \n EventEndpointUpdated – Topic ARN to which EndpointUpdate\n event notifications should be sent.

        \n
      • \n
      • \n

        \n EventDeliveryFailure – Topic ARN to which DeliveryFailure\n event notifications should be sent upon Direct Publish delivery failure\n (permanent) to one of the application's endpoints.

        \n
      • \n
      " } } }, @@ -1044,7 +1139,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Returns the settings for sending SMS messages from your account.

      \n

      These settings are set with the SetSMSAttributes action.

      " + "smithy.api#documentation": "

      Returns the settings for sending SMS messages from your Amazon Web Services account.

      \n

      These settings are set with the SetSMSAttributes action.

      " } }, "com.amazonaws.sns#GetSMSAttributesInput": { @@ -1095,7 +1190,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Retrieves the SMS sandbox status for the calling account in the target Region.

      \n

      When you start using Amazon SNS to send SMS messages, your account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " + "smithy.api#documentation": "

      Retrieves the SMS sandbox status for the calling Amazon Web Services account in the target Amazon Web Services Region.

      \n

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " } }, "com.amazonaws.sns#GetSMSSandboxAccountStatusInput": { @@ -1108,7 +1203,7 @@ "IsInSandbox": { "target": "com.amazonaws.sns#boolean", "traits": { - "smithy.api#documentation": "

      Indicates whether the calling account is in the SMS sandbox.

      ", + "smithy.api#documentation": "

      Indicates whether the calling Amazon Web Services account is in the SMS sandbox.

      ", "smithy.api#required": {} } } @@ -1161,7 +1256,7 @@ "Attributes": { "target": "com.amazonaws.sns#SubscriptionAttributesMap", "traits": { - "smithy.api#documentation": "

      A map of the subscription's attributes. Attributes in this map include the\n following:

      \n
        \n
      • \n

        \n ConfirmationWasAuthenticatedtrue if the\n subscription confirmation request was authenticated.

        \n
      • \n
      • \n

        \n DeliveryPolicy – The JSON serialization of the\n subscription's delivery policy.

        \n
      • \n
      • \n

        \n EffectiveDeliveryPolicy – The JSON serialization of the\n effective delivery policy that takes into account the topic delivery policy and\n account system defaults.

        \n
      • \n
      • \n

        \n FilterPolicy – The filter policy JSON that is assigned to\n the subscription. For more information, see Amazon SNS Message\n Filtering in the Amazon SNS Developer Guide.

        \n
      • \n
      • \n

        \n Owner – The account ID of the subscription's\n owner.

        \n
      • \n
      • \n

        \n PendingConfirmationtrue if the subscription\n hasn't been confirmed. To confirm a pending subscription, call the\n ConfirmSubscription action with a confirmation token.

        \n
      • \n
      • \n

        \n RawMessageDeliverytrue if raw message\n delivery is enabled for the subscription. Raw messages are free of JSON\n formatting and can be sent to HTTP/S and Amazon SQS endpoints.

        \n
      • \n
      • \n

        \n RedrivePolicy – When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. \n Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable)\n or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held \n in the dead-letter queue for further analysis or reprocessing.

        \n
      • \n
      • \n

        \n SubscriptionArn – The subscription's ARN.

        \n
      • \n
      • \n

        \n TopicArn – The topic ARN that the subscription is associated\n with.

        \n
      • \n
      \n \n

      The following attribute applies only to Amazon Kinesis Data Firehose delivery stream subscriptions:

      \n
        \n
      • \n

        \n SubscriptionRoleArn – The ARN of the IAM role that has the following:

        \n
          \n
        • \n

          Permission to write to the Kinesis Data Firehose delivery stream

          \n
        • \n
        • \n

          Amazon SNS listed as a trusted entity

          \n
        • \n
        \n

        Specifying a valid ARN for this attribute is required for Kinesis Data Firehose delivery stream subscriptions. \n For more information, see Fanout \n to Kinesis Data Firehose delivery streams in the Amazon SNS Developer Guide.

        \n
      • \n
      " + "smithy.api#documentation": "

      A map of the subscription's attributes. Attributes in this map include the\n following:

      \n
        \n
      • \n

        \n ConfirmationWasAuthenticatedtrue if the\n subscription confirmation request was authenticated.

        \n
      • \n
      • \n

        \n DeliveryPolicy – The JSON serialization of the\n subscription's delivery policy.

        \n
      • \n
      • \n

        \n EffectiveDeliveryPolicy – The JSON serialization of the\n effective delivery policy that takes into account the topic delivery policy and\n account system defaults.

        \n
      • \n
      • \n

        \n FilterPolicy – The filter policy JSON that is assigned to\n the subscription. For more information, see Amazon SNS Message\n Filtering in the Amazon SNS Developer Guide.

        \n
      • \n
      • \n

        \n Owner – The Amazon Web Services account ID of the subscription's\n owner.

        \n
      • \n
      • \n

        \n PendingConfirmationtrue if the subscription\n hasn't been confirmed. To confirm a pending subscription, call the\n ConfirmSubscription action with a confirmation token.

        \n
      • \n
      • \n

        \n RawMessageDeliverytrue if raw message\n delivery is enabled for the subscription. Raw messages are free of JSON\n formatting and can be sent to HTTP/S and Amazon SQS endpoints.

        \n
      • \n
      • \n

        \n RedrivePolicy – When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. \n Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable)\n or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held \n in the dead-letter queue for further analysis or reprocessing.

        \n
      • \n
      • \n

        \n SubscriptionArn – The subscription's ARN.

        \n
      • \n
      • \n

        \n TopicArn – The topic ARN that the subscription is associated\n with.

        \n
      • \n
      \n \n

      The following attribute applies only to Amazon Kinesis Data Firehose delivery stream subscriptions:

      \n
        \n
      • \n

        \n SubscriptionRoleArn – The ARN of the IAM role that has the following:

        \n
          \n
        • \n

          Permission to write to the Kinesis Data Firehose delivery stream

          \n
        • \n
        • \n

          Amazon SNS listed as a trusted entity

          \n
        • \n
        \n

        Specifying a valid ARN for this attribute is required for Kinesis Data Firehose delivery stream subscriptions. \n For more information, see Fanout \n to Kinesis Data Firehose delivery streams in the Amazon SNS Developer Guide.

        \n
      • \n
      " } } }, @@ -1219,7 +1314,7 @@ "Attributes": { "target": "com.amazonaws.sns#TopicAttributesMap", "traits": { - "smithy.api#documentation": "

      A map of the topic's attributes. Attributes in this map include the following:

      \n
        \n
      • \n

        \n DeliveryPolicy – The JSON serialization of the topic's\n delivery policy.

        \n
      • \n
      • \n

        \n DisplayName – The human-readable name used in the\n From field for notifications to email and\n email-json endpoints.

        \n
      • \n
      • \n

        \n Owner – The account ID of the topic's owner.

        \n
      • \n
      • \n

        \n Policy – The JSON serialization of the topic's access\n control policy.

        \n
      • \n
      • \n

        \n SubscriptionsConfirmed – The number of confirmed\n subscriptions for the topic.

        \n
      • \n
      • \n

        \n SubscriptionsDeleted – The number of deleted subscriptions\n for the topic.

        \n
      • \n
      • \n

        \n SubscriptionsPending – The number of subscriptions pending\n confirmation for the topic.

        \n
      • \n
      • \n

        \n TopicArn – The topic's ARN.

        \n
      • \n
      • \n

        \n EffectiveDeliveryPolicy – The JSON serialization of the\n effective delivery policy, taking system defaults into account.

        \n
      • \n
      \n \n

      The following attribute applies only to server-side-encryption:

      \n
        \n
      • \n

        \n KmsMasterKeyId - The ID of an Amazon Web Services managed customer master key\n (CMK) for Amazon SNS or a custom CMK. For more information, see Key\n Terms. For more examples, see KeyId in the Key Management Service API\n Reference.

        \n
      • \n
      \n \n \n

      The following attributes apply only to FIFO topics:

      \n
        \n
      • \n

        \n FifoTopic – When this is set to true, a FIFO\n topic is created.

        \n
      • \n
      • \n

        \n ContentBasedDeduplication – Enables content-based deduplication for\n FIFO topics.

        \n \n
          \n
        • \n

          By default, ContentBasedDeduplication is set to false.\n If you create a FIFO topic and this attribute is false, you must\n specify a value for the MessageDeduplicationId parameter for the\n Publish action.

          \n
        • \n
        • \n

          When you set ContentBasedDeduplication to true, \n Amazon SNS uses a SHA-256 hash to generate the MessageDeduplicationId using \n the body of the message (but not the attributes of the message).

          \n

          (Optional) To override the generated value, you can specify a value\n for the MessageDeduplicationId parameter for the Publish\n action.

          \n
        • \n
        \n
      • \n
      " + "smithy.api#documentation": "

      A map of the topic's attributes. Attributes in this map include the following:

      \n
        \n
      • \n

        \n DeliveryPolicy – The JSON serialization of the topic's\n delivery policy.

        \n
      • \n
      • \n

        \n DisplayName – The human-readable name used in the\n From field for notifications to email and\n email-json endpoints.

        \n
      • \n
      • \n

        \n Owner – The Amazon Web Services account ID of the topic's owner.

        \n
      • \n
      • \n

        \n Policy – The JSON serialization of the topic's access\n control policy.

        \n
      • \n
      • \n

        \n SubscriptionsConfirmed – The number of confirmed\n subscriptions for the topic.

        \n
      • \n
      • \n

        \n SubscriptionsDeleted – The number of deleted subscriptions\n for the topic.

        \n
      • \n
      • \n

        \n SubscriptionsPending – The number of subscriptions pending\n confirmation for the topic.

        \n
      • \n
      • \n

        \n TopicArn – The topic's ARN.

        \n
      • \n
      • \n

        \n EffectiveDeliveryPolicy – The JSON serialization of the\n effective delivery policy, taking system defaults into account.

        \n
      • \n
      \n \n

      The following attribute applies only to server-side-encryption:

      \n
        \n
      • \n

        \n KmsMasterKeyId - The ID of an Amazon Web Services managed customer master key\n (CMK) for Amazon SNS or a custom CMK. For more information, see Key\n Terms. For more examples, see KeyId in the Key Management Service API\n Reference.

        \n
      • \n
      \n \n \n

      The following attributes apply only to FIFO topics:

      \n
        \n
      • \n

        \n FifoTopic – When this is set to true, a FIFO\n topic is created.

        \n
      • \n
      • \n

        \n ContentBasedDeduplication – Enables content-based deduplication for\n FIFO topics.

        \n \n
          \n
        • \n

          By default, ContentBasedDeduplication is set to false.\n If you create a FIFO topic and this attribute is false, you must\n specify a value for the MessageDeduplicationId parameter for the\n Publish action.

          \n
        • \n
        • \n

          When you set ContentBasedDeduplication to true, \n Amazon SNS uses a SHA-256 hash to generate the MessageDeduplicationId using \n the body of the message (but not the attributes of the message).

          \n

          (Optional) To override the generated value, you can specify a value\n for the MessageDeduplicationId parameter for the Publish\n action.

          \n
        • \n
        \n
      • \n
      " } } }, @@ -1244,6 +1339,23 @@ "smithy.api#httpError": 500 } }, + "com.amazonaws.sns#InvalidBatchEntryIdException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sns#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidBatchEntryId", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

      The Id of a batch entry in a batch request doesn't abide by the specification.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.sns#InvalidParameterException": { "type": "structure", "members": { @@ -1267,7 +1379,7 @@ "message": { "target": "com.amazonaws.sns#String", "traits": { - "smithy.api#documentation": "

      The parameter value is invalid.

      " + "smithy.api#documentation": "

      The parameter of an entry in a request doesn't abide by the specification.

      " } } }, @@ -1276,7 +1388,7 @@ "code": "ParameterValueInvalid", "httpResponseCode": 400 }, - "smithy.api#documentation": "

      Indicates that a request parameter does not comply with the associated\n constraints.

      ", + "smithy.api#documentation": "

      Indicates that a request parameter does not comply with the associated constraints.

      ", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -1581,7 +1693,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Lists the calling account's dedicated origination numbers and their metadata. For\n more information about origination numbers, see Origination numbers in the Amazon SNS Developer\n Guide.

      ", + "smithy.api#documentation": "

      Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata. For\n more information about origination numbers, see Origination numbers in the Amazon SNS Developer\n Guide.

      ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1776,7 +1888,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Lists the calling account's current verified and pending destination phone numbers\n in the SMS sandbox.

      \n

      When you start using Amazon SNS to send SMS messages, your account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      ", + "smithy.api#documentation": "

      Lists the calling Amazon Web Services account's current verified and pending destination phone numbers\n in the SMS sandbox.

      \n

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -2128,7 +2240,7 @@ "StringValue": { "target": "com.amazonaws.sns#String", "traits": { - "smithy.api#documentation": "

      Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

      " + "smithy.api#documentation": "

      Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

      " } }, "BinaryValue": { @@ -2139,7 +2251,7 @@ } }, "traits": { - "smithy.api#documentation": "

      The user-specified message attribute value. For string data types, the value attribute\n has the same restrictions on the content as the message body. For more information, see\n Publish.

      \n

      Name, type, and value must not be empty or null. In addition, the message body should\n not be empty or null. All parts of the message attribute, including name, type, and\n value, are included in the message size restriction, which is currently 256 KB (262,144\n bytes). For more information, see Amazon SNS message attributes and\n Publishing\n to a mobile phone in the Amazon SNS Developer Guide.\n

      " + "smithy.api#documentation": "

      The user-specified message attribute value. For string data types, the value attribute\n has the same restrictions on the content as the message body. For more information, see\n Publish.

      \n

      Name, type, and value must not be empty or null. In addition, the message body should\n not be empty or null. All parts of the message attribute, including name, type, and\n value, are included in the message size restriction, which is currently 256 KB (262,144\n bytes). For more information, see Amazon SNS message attributes and\n Publishing\n to a mobile phone in the Amazon SNS Developer Guide.\n

      " } }, "com.amazonaws.sns#NotFoundException": { @@ -2259,7 +2371,7 @@ "code": "OptedOut", "httpResponseCode": 400 }, - "smithy.api#documentation": "

      Indicates that the specified phone number opted out of receiving SMS messages from\n your account. You can't send SMS messages to phone numbers that opt out.

      ", + "smithy.api#documentation": "

      Indicates that the specified phone number opted out of receiving SMS messages from\n your Amazon Web Services account. You can't send SMS messages to phone numbers that opt out.

      ", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2429,7 +2541,204 @@ } ], "traits": { - "smithy.api#documentation": "

      Sends a message to an Amazon SNS topic, a text message (SMS message) directly to a phone\n number, or a message to a mobile platform endpoint (when you specify the\n TargetArn).

      \n

      If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is\n subscribed to the topic. The format of the message depends on the notification protocol\n for each subscribed endpoint.

      \n

      When a messageId is returned, the message has been saved and Amazon SNS\n will attempt to deliver it shortly.

      \n

      To use the Publish action for sending a message to a mobile endpoint,\n such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for\n the TargetArn parameter. The EndpointArn is returned when making a call with the\n CreatePlatformEndpoint action.

      \n

      For more information about formatting messages, see Send Custom\n Platform-Specific Payloads in Messages to Mobile Devices.

      \n \n

      You can publish messages only to topics and endpoints in the same Region.

      \n
      " + "smithy.api#documentation": "

      Sends a message to an Amazon SNS topic, a text message (SMS message) directly to a phone\n number, or a message to a mobile platform endpoint (when you specify the\n TargetArn).

      \n

      If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is\n subscribed to the topic. The format of the message depends on the notification protocol\n for each subscribed endpoint.

      \n

      When a messageId is returned, the message is saved and Amazon SNS\n immediately deliverers it to subscribers.

      \n

      To use the Publish action for publishing a message to a mobile endpoint,\n such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for\n the TargetArn parameter. The EndpointArn is returned when making a call with the\n CreatePlatformEndpoint action.

      \n

      For more information about formatting messages, see Send Custom\n Platform-Specific Payloads in Messages to Mobile Devices.

      \n \n

      You can publish messages only to topics and endpoints in the same Amazon Web Services Region.

      \n
      " + } + }, + "com.amazonaws.sns#PublishBatch": { + "type": "operation", + "input": { + "target": "com.amazonaws.sns#PublishBatchInput" + }, + "output": { + "target": "com.amazonaws.sns#PublishBatchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.sns#AuthorizationErrorException" + }, + { + "target": "com.amazonaws.sns#BatchEntryIdsNotDistinctException" + }, + { + "target": "com.amazonaws.sns#BatchRequestTooLongException" + }, + { + "target": "com.amazonaws.sns#EmptyBatchRequestException" + }, + { + "target": "com.amazonaws.sns#EndpointDisabledException" + }, + { + "target": "com.amazonaws.sns#InternalErrorException" + }, + { + "target": "com.amazonaws.sns#InvalidBatchEntryIdException" + }, + { + "target": "com.amazonaws.sns#InvalidParameterException" + }, + { + "target": "com.amazonaws.sns#InvalidParameterValueException" + }, + { + "target": "com.amazonaws.sns#InvalidSecurityException" + }, + { + "target": "com.amazonaws.sns#KMSAccessDeniedException" + }, + { + "target": "com.amazonaws.sns#KMSDisabledException" + }, + { + "target": "com.amazonaws.sns#KMSInvalidStateException" + }, + { + "target": "com.amazonaws.sns#KMSNotFoundException" + }, + { + "target": "com.amazonaws.sns#KMSOptInRequired" + }, + { + "target": "com.amazonaws.sns#KMSThrottlingException" + }, + { + "target": "com.amazonaws.sns#NotFoundException" + }, + { + "target": "com.amazonaws.sns#PlatformApplicationDisabledException" + }, + { + "target": "com.amazonaws.sns#TooManyEntriesInBatchRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

      Publishes up to ten messages to the specified topic. This is a batch version of Publish. For FIFO topics, multiple messages within a single batch are published in the order they are sent, and messages are deduplicated within the batch and across batches for 5 minutes.

      \n

      The result of publishing each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

      \n

      The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KB (262,144 bytes).

      \n

      Some actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:

      \n

      &AttributeName.1=first

      \n

      &AttributeName.2=second

      \n

      If you send a batch message to a topic, Amazon SNS publishes the batch message to each endpoint that is\n subscribed to the topic. The format of the batch message depends on the notification protocol\n for each subscribed endpoint.

      \n

      When a messageId is returned, the batch message is saved and Amazon SNS immediately delivers the message to subscribers.

      " + } + }, + "com.amazonaws.sns#PublishBatchInput": { + "type": "structure", + "members": { + "TopicArn": { + "target": "com.amazonaws.sns#topicARN", + "traits": { + "smithy.api#documentation": "

      The Amazon resource name (ARN) of the topic you want to batch publish to.

      ", + "smithy.api#required": {} + } + }, + "PublishBatchRequestEntries": { + "target": "com.amazonaws.sns#PublishBatchRequestEntryList", + "traits": { + "smithy.api#documentation": "

      A list of PublishBatch request entries to be sent to the SNS topic.

      ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.sns#PublishBatchRequestEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sns#String", + "traits": { + "smithy.api#documentation": "

      An identifier for the message in this batch.

      \n \n

      The Ids of a batch request must be unique within a request.

      \n

      This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

      \n
      ", + "smithy.api#required": {} + } + }, + "Message": { + "target": "com.amazonaws.sns#message", + "traits": { + "smithy.api#documentation": "

      The body of the message.

      ", + "smithy.api#required": {} + } + }, + "Subject": { + "target": "com.amazonaws.sns#subject", + "traits": { + "smithy.api#documentation": "

      The subject of the batch message.

      " + } + }, + "MessageStructure": { + "target": "com.amazonaws.sns#messageStructure", + "traits": { + "smithy.api#documentation": "

      Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

      \n
        \n
      • \n

        be a syntactically valid JSON object; and

        \n
      • \n
      • \n

        contain at least a top-level JSON key of \"default\" with a value that is a string.

        \n
      • \n
      \n

      You can define other top-level keys that define the message you want to send to a\n specific transport protocol (e.g. http).

      " + } + }, + "MessageAttributes": { + "target": "com.amazonaws.sns#MessageAttributeMap", + "traits": { + "smithy.api#documentation": "

      Each message attribute consists of a Name, Type, and Value. For more information, see Amazon SNS message attributes in the Amazon SNS Developer Guide.

      " + } + }, + "MessageDeduplicationId": { + "target": "com.amazonaws.sns#String", + "traits": { + "smithy.api#documentation": "

      This parameter applies only to FIFO (first-in-first-out) topics.

      \n

      The token used for deduplication of messages within a 5-minute minimum deduplication interval. If a message with a particular MessageDeduplicationId is sent successfully, subsequent messages with the same MessageDeduplicationId are accepted successfully but aren't delivered.

      \n
        \n
      • \n

        Every message must have a unique MessageDeduplicationId.

        \n
          \n
        • \n

          You may provide a MessageDeduplicationId explicitly.

          \n
        • \n
        • \n

          If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication for your topic, Amazon SNS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message).

          \n
        • \n
        • \n

          If you don't provide a MessageDeduplicationId and the topic doesn't have ContentBasedDeduplication set, the action fails with an error.

          \n
        • \n
        • \n

          If the topic has a ContentBasedDeduplication set, your\n MessageDeduplicationId overrides the generated one.

          \n
        • \n
        \n
      • \n
      • \n

        When ContentBasedDeduplication is in effect, messages with identical content sent within the deduplication interval are treated as duplicates and only one copy of the message is delivered.

        \n
      • \n
      • \n

        If you send one message with ContentBasedDeduplication enabled, and then another\n message with a MessageDeduplicationId that is the same as the one\n generated for the first MessageDeduplicationId, the two messages\n are treated as duplicates and only one copy of the message is delivered.

        \n
      • \n
      \n \n

      The MessageDeduplicationId is available to the consumer of the message (this can be useful for troubleshooting delivery issues).

      \n

      If a message is sent successfully but the acknowledgement is lost and the message is resent with the same MessageDeduplicationId after the deduplication interval, Amazon SNS can't detect duplicate messages.

      \n

      Amazon SNS continues to keep track of the message deduplication ID even after the message is received and deleted.

      \n
      \n

      The length of MessageDeduplicationId is 128 characters.

      \n

      \n MessageDeduplicationId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

      " + } + }, + "MessageGroupId": { + "target": "com.amazonaws.sns#String", + "traits": { + "smithy.api#documentation": "

      This parameter applies only to FIFO (first-in-first-out) topics.

      \n

      The tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are processed in a FIFO manner (however, messages in different message groups might be processed out of order). To interleave multiple ordered streams within a single topic, use MessageGroupId values (for example, session data for multiple users). In this scenario, multiple consumers can process the topic, but the session data of each user is processed in a FIFO fashion.

      \n

      You must associate a non-empty MessageGroupId with a message. If you don't provide a MessageGroupId, the action fails.

      \n

      The length of MessageGroupId is 128 characters.

      \n

      \n MessageGroupId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

      \n \n \n \n

      \n MessageGroupId is required for FIFO topics. You can't use it for standard topics.

      \n
      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Contains the details of a single Amazon SNS message along with an Id that identifies a message within the batch.

      " + } + }, + "com.amazonaws.sns#PublishBatchRequestEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sns#PublishBatchRequestEntry" + } + }, + "com.amazonaws.sns#PublishBatchResponse": { + "type": "structure", + "members": { + "Successful": { + "target": "com.amazonaws.sns#PublishBatchResultEntryList", + "traits": { + "smithy.api#documentation": "

      A list of successful PublishBatch responses.

      " + } + }, + "Failed": { + "target": "com.amazonaws.sns#BatchResultErrorEntryList", + "traits": { + "smithy.api#documentation": "

      A list of failed PublishBatch responses.

      " + } + } + } + }, + "com.amazonaws.sns#PublishBatchResultEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sns#String", + "traits": { + "smithy.api#documentation": "

      The Id of an entry in a batch request.

      " + } + }, + "MessageId": { + "target": "com.amazonaws.sns#messageId", + "traits": { + "smithy.api#documentation": "

      An identifier for the message.

      " + } + }, + "SequenceNumber": { + "target": "com.amazonaws.sns#String", + "traits": { + "smithy.api#documentation": "

      This parameter applies only to FIFO (first-in-first-out) topics.

      \n

      The large, non-consecutive number that Amazon SNS assigns to each message.

      \n

      The length of SequenceNumber is 128 bits. SequenceNumber continues to increase for a particular MessageGroupId.

      " + } + } + }, + "traits": { + "smithy.api#documentation": "

      Encloses data related to a successful message in a batch request for topic.

      " + } + }, + "com.amazonaws.sns#PublishBatchResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sns#PublishBatchResultEntry" } }, "com.amazonaws.sns#PublishInput": { @@ -2481,13 +2790,13 @@ "MessageDeduplicationId": { "target": "com.amazonaws.sns#String", "traits": { - "smithy.api#documentation": "

      This parameter applies only to FIFO (first-in-first-out) topics. The\n MessageDeduplicationId can contain up to 128 alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

      \n

      Every message must have a unique MessageDeduplicationId, which is a token\n used for deduplication of sent messages. If a message with a particular\n MessageDeduplicationId is sent successfully, any message sent with the\n same MessageDeduplicationId during the 5-minute deduplication interval is\n treated as a duplicate.

      \n

      If the topic has ContentBasedDeduplication set, the system generates a\n MessageDeduplicationId based on the contents of the message. Your\n MessageDeduplicationId overrides the generated one.

      " + "smithy.api#documentation": "

      This parameter applies only to FIFO (first-in-first-out) topics. The\n MessageDeduplicationId can contain up to 128 alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

      \n

      Every message must have a unique MessageDeduplicationId, which is a token\n used for deduplication of sent messages. If a message with a particular\n MessageDeduplicationId is sent successfully, any message sent with the\n same MessageDeduplicationId during the 5-minute deduplication interval is\n treated as a duplicate.

      \n

      If the topic has ContentBasedDeduplication set, the system generates a\n MessageDeduplicationId based on the contents of the message. Your\n MessageDeduplicationId overrides the generated one.

      " } }, "MessageGroupId": { "target": "com.amazonaws.sns#String", "traits": { - "smithy.api#documentation": "

      This parameter applies only to FIFO (first-in-first-out) topics. The\n MessageGroupId can contain up to 128 alphanumeric characters (a-z, A-Z,\n 0-9) and punctuation (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

      \n

      The MessageGroupId is a tag that specifies that a message belongs to a\n specific message group. Messages that belong to the same message group are processed in\n a FIFO manner (however, messages in different message groups might be processed out of\n order). Every message must include a MessageGroupId.

      " + "smithy.api#documentation": "

      This parameter applies only to FIFO (first-in-first-out) topics. The\n MessageGroupId can contain up to 128 alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

      \n

      The MessageGroupId is a tag that specifies that a message belongs to a\n specific message group. Messages that belong to the same message group are processed in\n a FIFO manner (however, messages in different message groups might be processed out of\n order). Every message must include a MessageGroupId.

      " } } }, @@ -2614,7 +2923,7 @@ } }, "traits": { - "smithy.api#documentation": "

      A verified or pending destination phone number in the SMS sandbox.

      \n

      When you start using Amazon SNS to send SMS messages, your account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " + "smithy.api#documentation": "

      A verified or pending destination phone number in the SMS sandbox.

      \n

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " } }, "com.amazonaws.sns#SMSSandboxPhoneNumberList": { @@ -2720,7 +3029,7 @@ "Attributes": { "target": "com.amazonaws.sns#MapStringToString", "traits": { - "smithy.api#documentation": "

      A map of the platform application attributes. Attributes in this map include the\n following:

      \n
        \n
      • \n

        \n PlatformCredential – The credential received from the\n notification service. For APNS and APNS_SANDBOX,\n PlatformCredential is private key. For\n GCM (Firebase Cloud Messaging), PlatformCredential\n is API key. For ADM, PlatformCredential\n is client secret.

        \n
      • \n
      • \n

        \n PlatformPrincipal – The principal received from the\n notification service. For APNS and APNS_SANDBOX,\n PlatformPrincipal is SSL certificate. For\n GCM (Firebase Cloud Messaging), there is no\n PlatformPrincipal. For ADM,\n PlatformPrincipal is client id.

        \n
      • \n
      • \n

        \n EventEndpointCreated – Topic ARN to which\n EndpointCreated event notifications are sent.

        \n
      • \n
      • \n

        \n EventEndpointDeleted – Topic ARN to which\n EndpointDeleted event notifications are sent.

        \n
      • \n
      • \n

        \n EventEndpointUpdated – Topic ARN to which\n EndpointUpdate event notifications are sent.

        \n
      • \n
      • \n

        \n EventDeliveryFailure – Topic ARN to which\n DeliveryFailure event notifications are sent upon Direct\n Publish delivery failure (permanent) to one of the application's\n endpoints.

        \n
      • \n
      • \n

        \n SuccessFeedbackRoleArn – IAM role ARN used to give Amazon SNS\n write access to use CloudWatch Logs on your behalf.

        \n
      • \n
      • \n

        \n FailureFeedbackRoleArn – IAM role ARN used to give Amazon SNS\n write access to use CloudWatch Logs on your behalf.

        \n
      • \n
      • \n

        \n SuccessFeedbackSampleRate – Sample rate percentage (0-100)\n of successfully delivered messages.

        \n
      • \n
      ", + "smithy.api#documentation": "

      A map of the platform application attributes. Attributes in this map include the\n following:

      \n
        \n
      • \n

        \n PlatformCredential – The credential received from the notification service.

        \n
          \n
        • \n

          For ADM, PlatformCredentialis client secret.

          \n
        • \n
        • \n

          For Apple Services using certificate credentials, PlatformCredential is private key.

          \n
        • \n
        • \n

          For Apple Services using token credentials, PlatformCredential is signing key.

          \n
        • \n
        • \n

          For GCM (Firebase Cloud Messaging), PlatformCredential is API key.

          \n
        • \n
        \n
      • \n
      \n
        \n
      • \n

        \n PlatformPrincipal – The principal received from the notification service.

        \n
          \n
        • \n

          For ADM, PlatformPrincipalis client id.

          \n
        • \n
        • \n

          For Apple Services using certificate credentials, PlatformPrincipal is SSL certificate.

          \n
        • \n
        • \n

          For Apple Services using token credentials, PlatformPrincipal is signing key ID.

          \n
        • \n
        • \n

          For GCM (Firebase Cloud Messaging), there is no PlatformPrincipal.

          \n
        • \n
        \n
      • \n
      \n
        \n
      • \n

        \n EventEndpointCreated – Topic ARN to which\n EndpointCreated event notifications are sent.

        \n
      • \n
      • \n

        \n EventEndpointDeleted – Topic ARN to which\n EndpointDeleted event notifications are sent.

        \n
      • \n
      • \n

        \n EventEndpointUpdated – Topic ARN to which\n EndpointUpdate event notifications are sent.

        \n
      • \n
      • \n

        \n EventDeliveryFailure – Topic ARN to which\n DeliveryFailure event notifications are sent upon Direct\n Publish delivery failure (permanent) to one of the application's\n endpoints.

        \n
      • \n
      • \n

        \n SuccessFeedbackRoleArn – IAM role ARN used to give Amazon SNS\n write access to use CloudWatch Logs on your behalf.

        \n
      • \n
      • \n

        \n FailureFeedbackRoleArn – IAM role ARN used to give Amazon SNS\n write access to use CloudWatch Logs on your behalf.

        \n
      • \n
      • \n

        \n SuccessFeedbackSampleRate – Sample rate percentage (0-100)\n of successfully delivered messages.

        \n
      • \n
      \n

      The following attributes only apply to APNs token-based authentication:

      \n
        \n
      • \n

        \n ApplePlatformTeamID – The identifier that's assigned to your Apple developer account team.

        \n
      • \n
      • \n

        \n ApplePlatformBundleID – The bundle identifier that's assigned to your iOS app.

        \n
      • \n
      ", "smithy.api#required": {} } } @@ -2761,7 +3070,7 @@ "attributes": { "target": "com.amazonaws.sns#MapStringToString", "traits": { - "smithy.api#documentation": "

      The default settings for sending SMS messages from your account. You can set values\n for the following attribute names:

      \n

      \n MonthlySpendLimit – The maximum amount in USD that you are willing to spend\n each month to send SMS messages. When Amazon SNS determines that sending an SMS message would\n incur a cost that exceeds this limit, it stops sending SMS messages within\n minutes.

      \n \n

      Amazon SNS stops sending SMS messages within minutes of the limit being crossed. During\n that interval, if you continue to send SMS messages, you will incur costs that\n exceed your limit.

      \n
      \n

      By default, the spend limit is set to the maximum allowed by Amazon SNS. If you want to\n raise the limit, submit an SNS Limit Increase case. For New limit\n value, enter your desired monthly spend limit. In the Use Case Description field, explain that you are requesting\n an SMS monthly spend limit increase.

      \n

      \n DeliveryStatusIAMRole – The ARN of the IAM role that allows Amazon SNS to write\n logs about SMS deliveries in CloudWatch Logs. For each SMS message that you send, Amazon SNS\n writes a log that includes the message price, the success or failure status, the reason\n for failure (if the message failed), the message dwell time, and other\n information.

      \n

      \n DeliveryStatusSuccessSamplingRate – The percentage of successful SMS\n deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value can be an\n integer from 0 - 100. For example, to write logs only for failed deliveries, set this\n value to 0. To write logs for 10% of your successful deliveries, set it to\n 10.

      \n

      \n DefaultSenderID – A string, such as your business brand, that is displayed\n as the sender on the receiving device. Support for sender IDs varies by country. The\n sender ID can be 1 - 11 alphanumeric characters, and it must contain at least one\n letter.

      \n

      \n DefaultSMSType – The type of SMS message that you will send by default. You\n can assign the following values:

      \n
        \n
      • \n

        \n Promotional – (Default) Noncritical messages, such as marketing\n messages. Amazon SNS optimizes the message delivery to incur the lowest cost.

        \n
      • \n
      • \n

        \n Transactional – Critical messages that support customer\n transactions, such as one-time passcodes for multi-factor authentication. Amazon\n SNS optimizes the message delivery to achieve the highest reliability.

        \n
      • \n
      \n

      \n UsageReportS3Bucket – The name of the Amazon S3 bucket to receive daily SMS\n usage reports from Amazon SNS. Each day, Amazon SNS will deliver a usage report as a CSV file to\n the bucket. The report includes the following information for each SMS message that was\n successfully delivered by your account:

      \n
        \n
      • \n

        Time that the message was published (in UTC)

        \n
      • \n
      • \n

        Message ID

        \n
      • \n
      • \n

        Destination phone number

        \n
      • \n
      • \n

        Message type

        \n
      • \n
      • \n

        Delivery status

        \n
      • \n
      • \n

        Message price (in USD)

        \n
      • \n
      • \n

        Part number (a message is split into multiple parts if it is too long for a\n single message)

        \n
      • \n
      • \n

        Total number of parts

        \n
      • \n
      \n

      To receive the report, the bucket must have a policy that allows the Amazon SNS service\n principal to perform the s3:PutObject and s3:GetBucketLocation\n actions.

      \n

      For an example bucket policy and usage report, see Monitoring SMS Activity in the\n Amazon SNS Developer Guide.

      ", + "smithy.api#documentation": "

      The default settings for sending SMS messages from your Amazon Web Services account. You can set values\n for the following attribute names:

      \n

      \n MonthlySpendLimit – The maximum amount in USD that you are willing to spend\n each month to send SMS messages. When Amazon SNS determines that sending an SMS message would\n incur a cost that exceeds this limit, it stops sending SMS messages within\n minutes.

      \n \n

      Amazon SNS stops sending SMS messages within minutes of the limit being crossed. During\n that interval, if you continue to send SMS messages, you will incur costs that\n exceed your limit.

      \n
      \n

      By default, the spend limit is set to the maximum allowed by Amazon SNS. If you want to\n raise the limit, submit an SNS Limit Increase case. For New limit\n value, enter your desired monthly spend limit. In the Use Case Description field, explain that you are requesting\n an SMS monthly spend limit increase.

      \n

      \n DeliveryStatusIAMRole – The ARN of the IAM role that allows Amazon SNS to write\n logs about SMS deliveries in CloudWatch Logs. For each SMS message that you send, Amazon SNS\n writes a log that includes the message price, the success or failure status, the reason\n for failure (if the message failed), the message dwell time, and other\n information.

      \n

      \n DeliveryStatusSuccessSamplingRate – The percentage of successful SMS\n deliveries for which Amazon SNS will write logs in CloudWatch Logs. The value can be an\n integer from 0 - 100. For example, to write logs only for failed deliveries, set this\n value to 0. To write logs for 10% of your successful deliveries, set it to\n 10.

      \n

      \n DefaultSenderID – A string, such as your business brand, that is displayed\n as the sender on the receiving device. Support for sender IDs varies by country. The\n sender ID can be 1 - 11 alphanumeric characters, and it must contain at least one\n letter.

      \n

      \n DefaultSMSType – The type of SMS message that you will send by default. You\n can assign the following values:

      \n
        \n
      • \n

        \n Promotional – (Default) Noncritical messages, such as marketing\n messages. Amazon SNS optimizes the message delivery to incur the lowest cost.

        \n
      • \n
      • \n

        \n Transactional – Critical messages that support customer\n transactions, such as one-time passcodes for multi-factor authentication. Amazon SNS optimizes the message delivery to achieve the highest reliability.

        \n
      • \n
      \n

      \n UsageReportS3Bucket – The name of the Amazon S3 bucket to receive daily SMS\n usage reports from Amazon SNS. Each day, Amazon SNS will deliver a usage report as a CSV file to\n the bucket. The report includes the following information for each SMS message that was\n successfully delivered by your Amazon Web Services account:

      \n
        \n
      • \n

        Time that the message was published (in UTC)

        \n
      • \n
      • \n

        Message ID

        \n
      • \n
      • \n

        Destination phone number

        \n
      • \n
      • \n

        Message type

        \n
      • \n
      • \n

        Delivery status

        \n
      • \n
      • \n

        Message price (in USD)

        \n
      • \n
      • \n

        Part number (a message is split into multiple parts if it is too long for a\n single message)

        \n
      • \n
      • \n

        Total number of parts

        \n
      • \n
      \n

      To receive the report, the bucket must have a policy that allows the Amazon SNS service\n principal to perform the s3:PutObject and s3:GetBucketLocation\n actions.

      \n

      For an example bucket policy and usage report, see Monitoring SMS Activity in the\n Amazon SNS Developer Guide.

      ", "smithy.api#required": {} } } @@ -2937,7 +3246,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is HTTP/S or email, or\n if the endpoint and the topic are not in the same account, the endpoint owner must\n run the ConfirmSubscription action to confirm the subscription.

      \n

      You call the ConfirmSubscription action with the token from the\n subscription response. Confirmation tokens are valid for three days.

      \n

      This action is throttled at 100 transactions per second (TPS).

      " + "smithy.api#documentation": "

      Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is HTTP/S or email, or\n if the endpoint and the topic are not in the same Amazon Web Services account, the endpoint owner must\n run the ConfirmSubscription action to confirm the subscription.

      \n

      You call the ConfirmSubscription action with the token from the\n subscription response. Confirmation tokens are valid for three days.

      \n

      This action is throttled at 100 transactions per second (TPS).

      " } }, "com.amazonaws.sns#SubscribeInput": { @@ -3173,7 +3482,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Add tags to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the\n Amazon SNS Developer Guide.

      \n

      When you use topic tags, keep the following guidelines in mind:

      \n
        \n
      • \n

        Adding more than 50 tags to a topic isn't recommended.

        \n
      • \n
      • \n

        Tags don't have any semantic meaning. Amazon SNS interprets tags as character\n strings.

        \n
      • \n
      • \n

        Tags are case-sensitive.

        \n
      • \n
      • \n

        A new tag with a key identical to that of an existing tag overwrites the\n existing tag.

        \n
      • \n
      • \n

        Tagging actions are limited to 10 TPS per account, per Region. If your\n application requires a higher throughput, file a technical support request.

        \n
      • \n
      " + "smithy.api#documentation": "

      Add tags to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the\n Amazon SNS Developer Guide.

      \n

      When you use topic tags, keep the following guidelines in mind:

      \n
        \n
      • \n

        Adding more than 50 tags to a topic isn't recommended.

        \n
      • \n
      • \n

        Tags don't have any semantic meaning. Amazon SNS interprets tags as character\n strings.

        \n
      • \n
      • \n

        Tags are case-sensitive.

        \n
      • \n
      • \n

        A new tag with a key identical to that of an existing tag overwrites the\n existing tag.

        \n
      • \n
      • \n

        Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If your\n application requires a higher throughput, file a technical support request.

        \n
      • \n
      " } }, "com.amazonaws.sns#TagResourceRequest": { @@ -3223,7 +3532,7 @@ "code": "Throttled", "httpResponseCode": 429 }, - "smithy.api#documentation": "

      Indicates that the rate at which requests have been submitted for this action exceeds\n the limit for your account.

      ", + "smithy.api#documentation": "

      Indicates that the rate at which requests have been submitted for this action exceeds the limit for your Amazon Web Services account.

      ", "smithy.api#error": "client", "smithy.api#httpError": 429 } @@ -3231,6 +3540,23 @@ "com.amazonaws.sns#Timestamp": { "type": "timestamp" }, + "com.amazonaws.sns#TooManyEntriesInBatchRequestException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sns#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "TooManyEntriesInBatchRequest", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

      The batch request contains more entries than permissible.

      ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.sns#Topic": { "type": "structure", "members": { @@ -3464,7 +3790,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Verifies a destination phone number with a one-time password (OTP) for the calling account.

      \n

      When you start using Amazon SNS to send SMS messages, your account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " + "smithy.api#documentation": "

      Verifies a destination phone number with a one-time password (OTP) for the calling Amazon Web Services account.

      \n

      When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the\n SMS sandbox. The SMS sandbox provides a safe environment for \n you to try Amazon SNS features without risking your reputation as an SMS sender. While your \n Amazon Web Services account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send \n SMS messages only to verified destination phone numbers. For more information, including how to \n move out of the sandbox to send messages without restrictions, \n see SMS sandbox in \n the Amazon SNS Developer Guide.

      " } }, "com.amazonaws.sns#VerifySMSSandboxPhoneNumberInput": { diff --git a/codegen/sdk-codegen/aws-models/ssm.json b/codegen/sdk-codegen/aws-models/ssm.json index eaf9da18e3d1..745f19c27624 100644 --- a/codegen/sdk-codegen/aws-models/ssm.json +++ b/codegen/sdk-codegen/aws-models/ssm.json @@ -293,6 +293,24 @@ }, "com.amazonaws.ssm#AmazonSSM": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "SSM", + "arnNamespace": "ssm", + "cloudFormationName": "SSM", + "cloudTrailEventSource": "ssm.amazonaws.com", + "endpointPrefix": "ssm" + }, + "aws.auth#sigv4": { + "name": "ssm" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "

      Amazon Web Services Systems Manager is a collection of capabilities that helps you automate management tasks such as\n collecting system inventory, applying operating system (OS) patches, automating the creation of\n Amazon Machine Images (AMIs), and configuring operating systems (OSs) and applications at scale.\n Systems Manager lets you remotely and securely manage the configuration of your managed instances. A\n managed instance is any Amazon Elastic Compute Cloud instance (EC2 instance), or any\n on-premises server or virtual machine (VM) in your hybrid environment that has been configured\n for Systems Manager.

      \n

      This reference is intended to be used with the Amazon Web Services Systems Manager User Guide.

      \n

      To get started, verify prerequisites and configure managed instances. For more information,\n see Setting up\n Amazon Web Services Systems Manager in the Amazon Web Services Systems Manager User Guide.

      \n

      \n Related resources\n

      \n ", + "smithy.api#title": "Amazon Simple Systems Manager (SSM)", + "smithy.api#xmlNamespace": { + "uri": "http://ssm.amazonaws.com/doc/2014-11-06/" + } + }, "version": "2014-11-06", "operations": [ { @@ -700,25 +718,7 @@ { "target": "com.amazonaws.ssm#UpdateServiceSetting" } - ], - "traits": { - "aws.api#service": { - "sdkId": "SSM", - "arnNamespace": "ssm", - "cloudFormationName": "SSM", - "cloudTrailEventSource": "ssm.amazonaws.com", - "endpointPrefix": "ssm" - }, - "aws.auth#sigv4": { - "name": "ssm" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

      Amazon Web Services Systems Manager is a collection of capabilities that helps you automate management tasks such as\n collecting system inventory, applying operating system (OS) patches, automating the creation of\n Amazon Machine Images (AMIs), and configuring operating systems (OSs) and applications at scale.\n Systems Manager lets you remotely and securely manage the configuration of your managed instances. A\n managed instance is any Amazon Elastic Compute Cloud instance (EC2 instance), or any\n on-premises server or virtual machine (VM) in your hybrid environment that has been configured\n for Systems Manager.

      \n

      This reference is intended to be used with the Amazon Web Services Systems Manager User Guide.

      \n

      To get started, verify prerequisites and configure managed instances. For more information,\n see Setting up\n Amazon Web Services Systems Manager in the Amazon Web Services Systems Manager User Guide.

      \n

      \n Related resources\n

      \n ", - "smithy.api#title": "Amazon Simple Systems Manager (SSM)", - "smithy.api#xmlNamespace": { - "uri": "http://ssm.amazonaws.com/doc/2014-11-06/" - } - } + ] }, "com.amazonaws.ssm#ApplyOnlyAtCronInterval": { "type": "boolean" @@ -978,7 +978,7 @@ "AutomationTargetParameterName": { "target": "com.amazonaws.ssm#AutomationTargetParameterName", "traits": { - "smithy.api#documentation": "

      Specify the target for the association. This target is required for associations that use an\n Automation runbook and target resources by using rate controls. Automation is a capability of\n Amazon Web Services Systems Manager.

      " + "smithy.api#documentation": "

      Choose the parameter that will define how your automation will branch out. This target is\n required for associations that use an Automation runbook and target resources by using rate\n controls. Automation is a capability of Amazon Web Services Systems Manager.

      " } }, "Parameters": { @@ -4481,7 +4481,7 @@ "AutomationTargetParameterName": { "target": "com.amazonaws.ssm#AutomationTargetParameterName", "traits": { - "smithy.api#documentation": "

      Specify the target for the association. This target is required for associations that use an\n Automation runbook and target resources by using rate controls. Automation is a capability of\n Amazon Web Services Systems Manager.

      " + "smithy.api#documentation": "

      Choose the parameter that will define how your automation will branch out. This target is\n required for associations that use an Automation runbook and target resources by using rate\n controls. Automation is a capability of Amazon Web Services Systems Manager.

      " } }, "MaxErrors": { @@ -16748,6 +16748,16 @@ } } }, + "com.amazonaws.ssm#MaxSessionDuration": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4 + }, + "smithy.api#pattern": "^([1-9]|[1-9][0-9]|[1-9][0-9][0-9]|1[0-4][0-3][0-9]|1440)$" + } + }, "com.amazonaws.ssm#MetadataKey": { "type": "string", "traits": { @@ -17034,6 +17044,10 @@ { "value": "MACOS", "name": "MacOS" + }, + { + "value": "RASPBIAN", + "name": "Raspbian" } ] } @@ -19240,7 +19254,7 @@ "Key": { "target": "com.amazonaws.ssm#ParameterStringFilterKey", "traits": { - "smithy.api#documentation": "

      The name of the filter.

      \n

      The ParameterStringFilter object is used by the DescribeParameters and GetParametersByPath API operations.\n However, not all of the pattern values listed for Key can be used with both\n operations.

      \n

      For DescribeActions, all of the listed patterns are valid except\n Label.

      \n

      For GetParametersByPath, the following patterns listed for Key\n aren't valid: tag, DataType, Name, Path, and\n Tier.

      \n

      For examples of Amazon Web Services CLI commands demonstrating valid parameter filter constructions, see\n Searching for Systems Manager parameters in the Amazon Web Services Systems Manager User Guide.

      ", + "smithy.api#documentation": "

      The name of the filter.

      \n

      The ParameterStringFilter object is used by the DescribeParameters and GetParametersByPath API operations.\n However, not all of the pattern values listed for Key can be used with both\n operations.

      \n

      For DescribeParameters, all of the listed patterns are valid except\n Label.

      \n

      For GetParametersByPath, the following patterns listed for Key\n aren't valid: tag, DataType, Name, Path, and\n Tier.

      \n

      For examples of Amazon Web Services CLI commands demonstrating valid parameter filter constructions, see\n Searching for Systems Manager parameters in the Amazon Web Services Systems Manager User Guide.

      ", "smithy.api#required": {} } }, @@ -22789,6 +22803,12 @@ "smithy.api#documentation": "

      The ID of the Amazon Web Services user account that started the session.

      " } }, + "Reason": { + "target": "com.amazonaws.ssm#SessionReason", + "traits": { + "smithy.api#documentation": "

      The reason for connecting to the instance.

      " + } + }, "Details": { "target": "com.amazonaws.ssm#SessionDetails", "traits": { @@ -22800,6 +22820,12 @@ "traits": { "smithy.api#documentation": "

      Reserved for future use.

      " } + }, + "MaxSessionDuration": { + "target": "com.amazonaws.ssm#MaxSessionDuration", + "traits": { + "smithy.api#documentation": "

      The maximum duration of a session before it terminates.

      " + } } }, "traits": { @@ -22993,6 +23019,16 @@ } } }, + "com.amazonaws.ssm#SessionReason": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^.{1,256}$" + } + }, "com.amazonaws.ssm#SessionState": { "type": "string", "traits": { @@ -23479,6 +23515,12 @@ "smithy.api#documentation": "

      The name of the SSM document to define the parameters and plugin settings for the session.\n For example, SSM-SessionManagerRunShell. You can call the GetDocument API to verify the document exists before attempting to start a session.\n If no document name is provided, a shell to the instance is launched by default.

      " } }, + "Reason": { + "target": "com.amazonaws.ssm#SessionReason", + "traits": { + "smithy.api#documentation": "

      The reason for connecting to the instance. This value is included in the details for the Amazon CloudWatch Events event created when you start the session.

      " + } + }, "Parameters": { "target": "com.amazonaws.ssm#SessionManagerParameters", "traits": { @@ -24561,7 +24603,7 @@ "AutomationTargetParameterName": { "target": "com.amazonaws.ssm#AutomationTargetParameterName", "traits": { - "smithy.api#documentation": "

      Specify the target for the association. This target is required for associations that use an\n Automation runbook and target resources by using rate controls. Automation is a capability of\n Amazon Web Services Systems Manager.

      " + "smithy.api#documentation": "

      Choose the parameter that will define how your automation will branch out. This target is\n required for associations that use an Automation runbook and target resources by using rate\n controls. Automation is a capability of Amazon Web Services Systems Manager.

      " } }, "MaxErrors": { diff --git a/codegen/sdk-codegen/aws-models/transfer.json b/codegen/sdk-codegen/aws-models/transfer.json index 37a104462e2d..421f8e63876a 100644 --- a/codegen/sdk-codegen/aws-models/transfer.json +++ b/codegen/sdk-codegen/aws-models/transfer.json @@ -301,7 +301,7 @@ "IdentityProviderType": { "target": "com.amazonaws.transfer#IdentityProviderType", "traits": { - "smithy.api#documentation": "

      Specifies the mode of authentication for a server. The default value is\n SERVICE_MANAGED, which allows you to store and access user credentials within\n the Amazon Web Services Transfer Family service.

      \n

      Use AWS_DIRECTORY_SERVICE to provide access to\n Active Directory groups in Amazon Web Services Managed Active Directory or Microsoft Active Directory in your\n on-premises environment or in Amazon Web Services using AD Connectors. This option also requires you to\n provide a Directory ID using the IdentityProviderDetails parameter.

      \n

      Use the API_GATEWAY value to integrate with an identity provider of your choosing. The\n API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call\n for authentication using the IdentityProviderDetails parameter.

      " + "smithy.api#documentation": "

      Specifies the mode of authentication for a server. The default value is\n SERVICE_MANAGED, which allows you to store and access user credentials within\n the Amazon Web Services Transfer Family service.

      \n

      Use AWS_DIRECTORY_SERVICE to provide access to\n Active Directory groups in Amazon Web Services Managed Active Directory or Microsoft Active Directory in your\n on-premises environment or in Amazon Web Services using AD Connectors. This option also requires you to\n provide a Directory ID using the IdentityProviderDetails parameter.

      \n

      Use the API_GATEWAY value to integrate with an identity provider of your choosing. The\n API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call\n for authentication using the IdentityProviderDetails parameter.

      \n

      Use the LAMBDA value to directly use a Lambda function as your identity provider. If you choose this value,\n you must specify the ARN for the lambda function in the Function parameter for the IdentityProviderDetails data type.

      " } }, "LoggingRole": { @@ -1370,7 +1370,7 @@ "IdentityProviderType": { "target": "com.amazonaws.transfer#IdentityProviderType", "traits": { - "smithy.api#documentation": "

      Specifies the mode of authentication for a server. The default value is\n SERVICE_MANAGED, which allows you to store and access user credentials within\n the Amazon Web Services Transfer Family service.

      \n

      Use AWS_DIRECTORY_SERVICE to provide access to\n Active Directory groups in Amazon Web Services Managed Active Directory or Microsoft Active Directory in your\n on-premises environment or in Amazon Web Services using AD Connectors. This option also requires you to\n provide a Directory ID using the IdentityProviderDetails parameter.

      \n

      Use the API_GATEWAY value to integrate with an identity provider of your choosing. The\n API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call\n for authentication using the IdentityProviderDetails parameter.

      " + "smithy.api#documentation": "

      Specifies the mode of authentication for a server. The default value is\n SERVICE_MANAGED, which allows you to store and access user credentials within\n the Amazon Web Services Transfer Family service.

      \n

      Use AWS_DIRECTORY_SERVICE to provide access to\n Active Directory groups in Amazon Web Services Managed Active Directory or Microsoft Active Directory in your\n on-premises environment or in Amazon Web Services using AD Connectors. This option also requires you to\n provide a Directory ID using the IdentityProviderDetails parameter.

      \n

      Use the API_GATEWAY value to integrate with an identity provider of your choosing. The\n API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call\n for authentication using the IdentityProviderDetails parameter.

      \n

      Use the LAMBDA value to directly use a Lambda function as your identity provider. If you choose this value,\n you must specify the ARN for the lambda function in the Function parameter for the IdentityProviderDetails data type.

      " } }, "LoggingRole": { @@ -1825,6 +1825,16 @@ "smithy.api#box": {} } }, + "com.amazonaws.transfer#Function": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 170 + }, + "smithy.api#pattern": "^arn:[a-z-]+:lambda:.*$" + } + }, "com.amazonaws.transfer#HomeDirectory": { "type": "string", "traits": { @@ -1917,6 +1927,12 @@ "traits": { "smithy.api#documentation": "

      The identifier of the Amazon Web ServicesDirectory Service directory that you want to stop sharing.

      " } + }, + "Function": { + "target": "com.amazonaws.transfer#Function", + "traits": { + "smithy.api#documentation": "

      The ARN for a lambda function to use for the Identity provider.

      " + } } }, "traits": { @@ -1939,6 +1955,10 @@ { "value": "AWS_DIRECTORY_SERVICE", "name": "AWS_DIRECTORY_SERVICE" + }, + { + "value": "AWS_LAMBDA", + "name": "AWS_LAMBDA" } ] } @@ -2718,7 +2738,7 @@ "IdentityProviderType": { "target": "com.amazonaws.transfer#IdentityProviderType", "traits": { - "smithy.api#documentation": "

      Specifies the mode of authentication for a server. The default value is\n SERVICE_MANAGED, which allows you to store and access user credentials within\n the Amazon Web Services Transfer Family service.

      \n

      Use AWS_DIRECTORY_SERVICE to provide access to\n Active Directory groups in Amazon Web Services Managed Active Directory or Microsoft Active Directory in your\n on-premises environment or in Amazon Web Services using AD Connectors. This option also requires you to\n provide a Directory ID using the IdentityProviderDetails parameter.

      \n

      Use the API_GATEWAY value to integrate with an identity provider of your choosing. The\n API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call\n for authentication using the IdentityProviderDetails parameter.

      " + "smithy.api#documentation": "

      Specifies the mode of authentication for a server. The default value is\n SERVICE_MANAGED, which allows you to store and access user credentials within\n the Amazon Web Services Transfer Family service.

      \n

      Use AWS_DIRECTORY_SERVICE to provide access to\n Active Directory groups in Amazon Web Services Managed Active Directory or Microsoft Active Directory in your\n on-premises environment or in Amazon Web Services using AD Connectors. This option also requires you to\n provide a Directory ID using the IdentityProviderDetails parameter.

      \n

      Use the API_GATEWAY value to integrate with an identity provider of your choosing. The\n API_GATEWAY setting requires you to provide an API Gateway endpoint URL to call\n for authentication using the IdentityProviderDetails parameter.

      \n

      Use the LAMBDA value to directly use a Lambda function as your identity provider. If you choose this value,\n you must specify the ARN for the lambda function in the Function parameter for the IdentityProviderDetails data type.

      " } }, "EndpointType": { @@ -3906,6 +3926,21 @@ }, "com.amazonaws.transfer#TransferService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Transfer", + "arnNamespace": "transfer", + "cloudFormationName": "Transfer", + "cloudTrailEventSource": "transfer.amazonaws.com", + "endpointPrefix": "transfer" + }, + "aws.auth#sigv4": { + "name": "transfer" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "

      Amazon Web Services Transfer Family is a fully managed service that enables the transfer of files over the\n File Transfer Protocol (FTP), File Transfer Protocol over SSL (FTPS), or Secure Shell (SSH)\n File Transfer Protocol (SFTP) directly into and out of Amazon Simple Storage Service (Amazon\n S3). Amazon Web Services helps you seamlessly migrate your file transfer workflows to Amazon Web Services Transfer Family by\n integrating with existing authentication systems, and providing DNS routing with Amazon Route\n 53 so nothing changes for your customers and partners, or their applications. With your data\n in Amazon S3, you can use it with Amazon Web Services services for processing, analytics, machine learning,\n and archiving. Getting started with Amazon Web Services Transfer Family is easy since there is no\n infrastructure to buy and set up.

      ", + "smithy.api#title": "AWS Transfer Family" + }, "version": "2018-11-05", "operations": [ { @@ -4004,22 +4039,7 @@ { "target": "com.amazonaws.transfer#UpdateUser" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Transfer", - "arnNamespace": "transfer", - "cloudFormationName": "Transfer", - "cloudTrailEventSource": "transfer.amazonaws.com", - "endpointPrefix": "transfer" - }, - "aws.auth#sigv4": { - "name": "transfer" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

      Amazon Web Services Transfer Family is a fully managed service that enables the transfer of files over the\n File Transfer Protocol (FTP), File Transfer Protocol over SSL (FTPS), or Secure Shell (SSH)\n File Transfer Protocol (SFTP) directly into and out of Amazon Simple Storage Service (Amazon\n S3). Amazon Web Services helps you seamlessly migrate your file transfer workflows to Amazon Web Services Transfer Family by\n integrating with existing authentication systems, and providing DNS routing with Amazon Route\n 53 so nothing changes for your customers and partners, or their applications. With your data\n in Amazon S3, you can use it with Amazon Web Services services for processing, analytics, machine learning,\n and archiving. Getting started with Amazon Web Services Transfer Family is easy since there is no\n infrastructure to buy and set up.

      ", - "smithy.api#title": "AWS Transfer Family" - } + ] }, "com.amazonaws.transfer#UntagResource": { "type": "operation", diff --git a/codegen/sdk-codegen/aws-models/wafv2.json b/codegen/sdk-codegen/aws-models/wafv2.json index 1375218e83d1..df953f986040 100644 --- a/codegen/sdk-codegen/aws-models/wafv2.json +++ b/codegen/sdk-codegen/aws-models/wafv2.json @@ -31,6 +31,24 @@ "shapes": { "com.amazonaws.wafv2#AWSWAF_20190729": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "WAFV2", + "arnNamespace": "wafv2", + "cloudFormationName": "WAFv2", + "cloudTrailEventSource": "wafv2.amazonaws.com", + "endpointPrefix": "wafv2" + }, + "aws.auth#sigv4": { + "name": "wafv2" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "WAF\n \n

      This is the latest version of the WAF API,\n released in November, 2019. The names of the entities that you use to access this API,\n like endpoints and namespaces, all have the versioning information added, like \"V2\" or\n \"v2\", to distinguish from the prior version. We recommend migrating your resources to\n this version, because it has a number of significant improvements.

      \n

      If you used WAF prior to this release, you can't use this WAFV2 API to access any\n WAF resources that you created before. You can access your old rules, web ACLs, and\n other WAF resources only through the WAF Classic APIs. The WAF Classic APIs\n have retained the prior names, endpoints, and namespaces.

      \n

      For information, including how to migrate your WAF resources to this version,\n see the WAF Developer Guide.

      \n
      \n

      WAF is a web application firewall that lets you monitor the HTTP and HTTPS\n requests that are forwarded to Amazon CloudFront, an Amazon API Gateway REST API, an Application Load Balancer, or an AppSync\n GraphQL API. WAF also lets you control access to your content. Based on conditions that\n you specify, such as the IP addresses that requests originate from or the values of query\n strings, the Amazon API Gateway REST API, CloudFront distribution, the Application Load Balancer, or the AppSync GraphQL\n API responds to requests either with the requested content or with an HTTP 403 status code\n (Forbidden). You also can configure CloudFront to return a custom error page when a request is\n blocked.

      \n

      This API guide is for developers who need detailed information about WAF API actions,\n data types, and errors. For detailed information about WAF features and an overview of\n how to use WAF, see the WAF Developer\n Guide.

      \n

      You can make calls using the endpoints listed in WAF endpoints and quotas.

      \n
        \n
      • \n

        For regional applications, you can use any of the endpoints in the list.\n A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

        \n
      • \n
      • \n

        For Amazon CloudFront applications, you must use the API endpoint listed for\n US East (N. Virginia): us-east-1.

        \n
      • \n
      \n

      Alternatively, you can use one of the Amazon Web Services SDKs to access an API that's tailored to the\n programming language or platform that you're using. For more information, see Amazon Web Services SDKs.

      \n

      We currently provide two versions of the WAF API: this API and the prior versions,\n the classic WAF APIs. This new API provides the same functionality as the older versions,\n with the following major improvements:

      \n
        \n
      • \n

        You use one API for both global and regional applications. Where you need to\n distinguish the scope, you specify a Scope parameter and set it to\n CLOUDFRONT or REGIONAL.

        \n
      • \n
      • \n

        You can define a web ACL or rule group with a single call, and update it with a\n single call. You define all rule specifications in JSON format, and pass them to your\n rule group or web ACL calls.

        \n
      • \n
      • \n

        The limits WAF places on the use of rules more closely reflects the cost of\n running each type of rule. Rule groups include capacity settings, so you know the\n maximum cost of a rule group when you use it.

        \n
      • \n
      ", + "smithy.api#title": "AWS WAFV2", + "smithy.api#xmlNamespace": { + "uri": "http://waf.amazonaws.com/doc/2019-07-29/" + } + }, "version": "2019-07-29", "operations": [ { @@ -168,25 +186,7 @@ { "target": "com.amazonaws.wafv2#UpdateWebACL" } - ], - "traits": { - "aws.api#service": { - "sdkId": "WAFV2", - "arnNamespace": "wafv2", - "cloudFormationName": "WAFv2", - "cloudTrailEventSource": "wafv2.amazonaws.com", - "endpointPrefix": "wafv2" - }, - "aws.auth#sigv4": { - "name": "wafv2" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "WAF\n \n

      This is the latest version of the WAF API,\n released in November, 2019. The names of the entities that you use to access this API,\n like endpoints and namespaces, all have the versioning information added, like \"V2\" or\n \"v2\", to distinguish from the prior version. We recommend migrating your resources to\n this version, because it has a number of significant improvements.

      \n

      If you used WAF prior to this release, you can't use this WAFV2 API to access any\n WAF resources that you created before. You can access your old rules, web ACLs, and\n other WAF resources only through the WAF Classic APIs. The WAF Classic APIs\n have retained the prior names, endpoints, and namespaces.

      \n

      For information, including how to migrate your WAF resources to this version,\n see the WAF Developer Guide.

      \n
      \n

      WAF is a web application firewall that lets you monitor the HTTP and HTTPS\n requests that are forwarded to Amazon CloudFront, an Amazon API Gateway REST API, an Application Load Balancer, or an AppSync\n GraphQL API. WAF also lets you control access to your content. Based on conditions that\n you specify, such as the IP addresses that requests originate from or the values of query\n strings, the Amazon API Gateway REST API, CloudFront distribution, the Application Load Balancer, or the AppSync GraphQL\n API responds to requests either with the requested content or with an HTTP 403 status code\n (Forbidden). You also can configure CloudFront to return a custom error page when a request is\n blocked.

      \n

      This API guide is for developers who need detailed information about WAF API actions,\n data types, and errors. For detailed information about WAF features and an overview of\n how to use WAF, see the WAF Developer\n Guide.

      \n

      You can make calls using the endpoints listed in WAF endpoints and quotas.

      \n
        \n
      • \n

        For regional applications, you can use any of the endpoints in the list.\n A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

        \n
      • \n
      • \n

        For Amazon CloudFront applications, you must use the API endpoint listed for\n US East (N. Virginia): us-east-1.

        \n
      • \n
      \n

      Alternatively, you can use one of the Amazon Web Services SDKs to access an API that's tailored to the\n programming language or platform that you're using. For more information, see Amazon Web Services SDKs.

      \n

      We currently provide two versions of the WAF API: this API and the prior versions,\n the classic WAF APIs. This new API provides the same functionality as the older versions,\n with the following major improvements:

      \n
        \n
      • \n

        You use one API for both global and regional applications. Where you need to\n distinguish the scope, you specify a Scope parameter and set it to\n CLOUDFRONT or REGIONAL.

        \n
      • \n
      • \n

        You can define a web ACL or rule group with a single call, and update it with a\n single call. You define all rule specifications in JSON format, and pass them to your\n rule group or web ACL calls.

        \n
      • \n
      • \n

        The limits WAF places on the use of rules more closely reflects the cost of\n running each type of rule. Rule groups include capacity settings, so you know the\n maximum cost of a rule group when you use it.

        \n
      • \n
      ", - "smithy.api#title": "AWS WAFV2", - "smithy.api#xmlNamespace": { - "uri": "http://waf.amazonaws.com/doc/2019-07-29/" - } - } + ] }, "com.amazonaws.wafv2#Action": { "type": "string" @@ -3942,11 +3942,6 @@ "type": "list", "member": { "target": "com.amazonaws.wafv2#IPAddress" - }, - "traits": { - "smithy.api#length": { - "min": 1 - } } }, "com.amazonaws.wafv2#IPSet": { @@ -5009,14 +5004,14 @@ "LogDestinationConfigs": { "target": "com.amazonaws.wafv2#LogDestinationConfigs", "traits": { - "smithy.api#documentation": "

      The Amazon Kinesis Data Firehose Amazon Resource Name (ARNs) that you want to associate\n with the web ACL.

      ", + "smithy.api#documentation": "

      The Amazon Resource Names (ARNs) of the logging destinations that you want to associate\n with the web ACL.

      ", "smithy.api#required": {} } }, "RedactedFields": { "target": "com.amazonaws.wafv2#RedactedFields", "traits": { - "smithy.api#documentation": "

      The parts of the request that you want to keep out of the logs. For\n example, if you redact the SingleHeader field, the HEADER field in the firehose will be xxx.

      \n \n

      You can specify only the following fields for redaction: UriPath, QueryString, SingleHeader, Method, and JsonBody.

      \n
      " + "smithy.api#documentation": "

      The parts of the request that you want to keep out of the logs. For\n example, if you redact the SingleHeader field, the HEADER field in the logs will be xxx.

      \n \n

      You can specify only the following fields for redaction: UriPath, QueryString, SingleHeader, Method, and JsonBody.

      \n
      " } }, "ManagedByFirewallManager": { @@ -5033,7 +5028,7 @@ } }, "traits": { - "smithy.api#documentation": "

      Defines an association between Amazon Kinesis Data Firehose destinations and a web ACL\n resource, for logging from WAF. As part of the association, you can specify parts of\n the standard logging fields to keep out of the logs and you can specify filters so that you\n log only a subset of the logging records.

      " + "smithy.api#documentation": "

      Defines an association between logging destinations and a web ACL\n resource, for logging from WAF. As part of the association, you can specify parts of\n the standard logging fields to keep out of the logs and you can specify filters so that you\n log only a subset of the logging records.

      \n

      For information about configuring web ACL logging destinations, see \n Logging web ACL traffic information \n in the WAF Developer Guide.

      " } }, "com.amazonaws.wafv2#LoggingConfigurations": { @@ -5630,6 +5625,10 @@ { "value": "ASSOCIABLE_RESOURCE", "name": "ASSOCIABLE_RESOURCE" + }, + { + "value": "LOG_DESTINATION", + "name": "LOG_DESTINATION" } ] } @@ -5712,6 +5711,9 @@ { "target": "com.amazonaws.wafv2#WAFLimitsExceededException" }, + { + "target": "com.amazonaws.wafv2#WAFLogDestinationPermissionIssueException" + }, { "target": "com.amazonaws.wafv2#WAFNonexistentItemException" }, @@ -5723,7 +5725,7 @@ } ], "traits": { - "smithy.api#documentation": "

      Enables the specified LoggingConfiguration, to start logging from a\n web ACL, according to the configuration provided.

      \n

      You can access information about all traffic that WAF inspects using the following\n steps:

      \n
        \n
      1. \n

        Create an Amazon Kinesis Data Firehose.

        \n

        Create the data firehose with a PUT source and in the Region that you are\n operating. If you are capturing logs for Amazon CloudFront, always create the firehose in US\n East (N. Virginia).

        \n

        Give the data firehose a name that starts with the prefix\n aws-waf-logs-. For example,\n aws-waf-logs-us-east-2-analytics.

        \n \n

        Do not create the data firehose using a Kinesis stream as your\n source.

        \n
        \n
      2. \n
      3. \n

        Associate that firehose to your web ACL using a\n PutLoggingConfiguration request.

        \n
      4. \n
      \n

      When you successfully enable logging using a PutLoggingConfiguration\n request, WAF will create a service linked role with the necessary permissions to write\n logs to the Amazon Kinesis Data Firehose. For more information, see Logging Web ACL\n Traffic Information in the WAF Developer\n Guide.

      \n \n

      This operation completely replaces the mutable specifications that you already have for the logging configuration with the ones that you provide to this call. To modify the logging configuration, retrieve it by calling GetLoggingConfiguration, update the settings as needed, and then provide the complete logging configuration specification to this call.

      \n
      " + "smithy.api#documentation": "

      Enables the specified LoggingConfiguration, to start logging from a\n web ACL, according to the configuration provided.

      \n

      You can access information about all traffic that WAF inspects using the following\n steps:

      \n
        \n
      1. \n

        Create your logging destination. You can use an Amazon CloudWatch Logs log group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon Kinesis Data Firehose. \n For information about configuring logging destinations and the permissions that are required for each, see \n Logging web ACL traffic information \n in the WAF Developer Guide.

        \n
      2. \n
      3. \n

        Associate your logging destination to your web ACL using a\n PutLoggingConfiguration request.

        \n
      4. \n
      \n

      When you successfully enable logging using a PutLoggingConfiguration\n request, WAF creates an additional role or policy that is required to write\n logs to the logging destination. For an Amazon CloudWatch Logs log group, WAF creates a resource policy on the log group.\n For an Amazon S3 bucket, WAF creates a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked role.

      \n \n

      This operation completely replaces the mutable specifications that you already have for the logging configuration with the ones that you provide to this call. To modify the logging configuration, retrieve it by calling GetLoggingConfiguration, update the settings as needed, and then provide the complete logging configuration specification to this call.

      \n
      " } }, "com.amazonaws.wafv2#PutLoggingConfigurationRequest": { @@ -7918,6 +7920,18 @@ "smithy.api#error": "client" } }, + "com.amazonaws.wafv2#WAFLogDestinationPermissionIssueException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.wafv2#ErrorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

      The operation failed because you don't have the permissions that your logging configuration requires. For information, see \n Logging web ACL traffic information \n in the WAF Developer Guide.

      ", + "smithy.api#error": "client" + } + }, "com.amazonaws.wafv2#WAFNonexistentItemException": { "type": "structure", "members": {