diff --git a/clients/client-frauddetector/src/FraudDetector.ts b/clients/client-frauddetector/src/FraudDetector.ts index a208c03d1e15..409ec38364fe 100644 --- a/clients/client-frauddetector/src/FraudDetector.ts +++ b/clients/client-frauddetector/src/FraudDetector.ts @@ -36,6 +36,7 @@ import { CreateDetectorVersionCommandInput, CreateDetectorVersionCommandOutput, } from "./commands/CreateDetectorVersionCommand"; +import { CreateListCommand, CreateListCommandInput, CreateListCommandOutput } from "./commands/CreateListCommand"; import { CreateModelCommand, CreateModelCommandInput, CreateModelCommandOutput } from "./commands/CreateModelCommand"; import { CreateModelVersionCommand, @@ -90,6 +91,7 @@ import { DeleteExternalModelCommandOutput, } from "./commands/DeleteExternalModelCommand"; import { DeleteLabelCommand, DeleteLabelCommandInput, DeleteLabelCommandOutput } from "./commands/DeleteLabelCommand"; +import { DeleteListCommand, DeleteListCommandInput, DeleteListCommandOutput } from "./commands/DeleteListCommand"; import { DeleteModelCommand, DeleteModelCommandInput, DeleteModelCommandOutput } from "./commands/DeleteModelCommand"; import { DeleteModelVersionCommand, @@ -174,6 +176,16 @@ import { GetKMSEncryptionKeyCommandOutput, } from "./commands/GetKMSEncryptionKeyCommand"; import { GetLabelsCommand, GetLabelsCommandInput, GetLabelsCommandOutput } from "./commands/GetLabelsCommand"; +import { + GetListElementsCommand, + GetListElementsCommandInput, + GetListElementsCommandOutput, +} from "./commands/GetListElementsCommand"; +import { + GetListsMetadataCommand, + GetListsMetadataCommandInput, + GetListsMetadataCommandOutput, +} from "./commands/GetListsMetadataCommand"; import { GetModelsCommand, GetModelsCommandInput, GetModelsCommandOutput } from "./commands/GetModelsCommand"; import { GetModelVersionCommand, @@ -247,6 +259,7 @@ import { UpdateEventLabelCommandInput, UpdateEventLabelCommandOutput, } from "./commands/UpdateEventLabelCommand"; +import { UpdateListCommand, UpdateListCommandInput, UpdateListCommandOutput } from "./commands/UpdateListCommand"; import { UpdateModelCommand, UpdateModelCommandInput, UpdateModelCommandOutput } from "./commands/UpdateModelCommand"; import { UpdateModelVersionCommand, @@ -511,6 +524,36 @@ export class FraudDetector extends FraudDetectorClient { } } + /** + *

+ * Creates a list. + *

+ *

List is a set of input data for a variable in your event dataset. You use the input data in a rule that's associated with your detector. + * For more information, see Lists.

+ */ + public createList(args: CreateListCommandInput, options?: __HttpHandlerOptions): Promise; + public createList(args: CreateListCommandInput, cb: (err: any, data?: CreateListCommandOutput) => void): void; + public createList( + args: CreateListCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateListCommandOutput) => void + ): void; + public createList( + args: CreateListCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateListCommandOutput) => void), + cb?: (err: any, data?: CreateListCommandOutput) => void + ): Promise | void { + const command = new CreateListCommand(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 a model using the specified model type.

*/ @@ -947,6 +990,35 @@ export class FraudDetector extends FraudDetectorClient { } } + /** + *

+ * Deletes the list, provided it is not used in a rule. + *

+ *

When you delete a list, Amazon Fraud Detector permanently deletes that list and the elements in the list.

+ */ + public deleteList(args: DeleteListCommandInput, options?: __HttpHandlerOptions): Promise; + public deleteList(args: DeleteListCommandInput, cb: (err: any, data?: DeleteListCommandOutput) => void): void; + public deleteList( + args: DeleteListCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteListCommandOutput) => void + ): void; + public deleteList( + args: DeleteListCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteListCommandOutput) => void), + cb?: (err: any, data?: DeleteListCommandOutput) => void + ): Promise | void { + const command = new DeleteListCommand(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 model.

*

You can delete models and model versions in Amazon Fraud Detector, provided that they are not associated with a detector version.

@@ -1600,6 +1672,74 @@ export class FraudDetector extends FraudDetectorClient { } } + /** + *

+ * Gets all the elements in the specified list. + *

+ */ + public getListElements( + args: GetListElementsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getListElements( + args: GetListElementsCommandInput, + cb: (err: any, data?: GetListElementsCommandOutput) => void + ): void; + public getListElements( + args: GetListElementsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetListElementsCommandOutput) => void + ): void; + public getListElements( + args: GetListElementsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetListElementsCommandOutput) => void), + cb?: (err: any, data?: GetListElementsCommandOutput) => void + ): Promise | void { + const command = new GetListElementsCommand(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 metadata of either all the lists under the account or the specified list. + *

+ */ + public getListsMetadata( + args: GetListsMetadataCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getListsMetadata( + args: GetListsMetadataCommandInput, + cb: (err: any, data?: GetListsMetadataCommandOutput) => void + ): void; + public getListsMetadata( + args: GetListsMetadataCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetListsMetadataCommandOutput) => void + ): void; + public getListsMetadata( + args: GetListsMetadataCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetListsMetadataCommandOutput) => void), + cb?: (err: any, data?: GetListsMetadataCommandOutput) => void + ): Promise | void { + const command = new GetListsMetadataCommand(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 one or more models. Gets all models for the Amazon Web Services account if no model type and no model id provided. Gets all models for the Amazon Web Services account and model type, if the model type is specified but model id is not provided. Gets a specific model if (model type, model id) tuple is specified.

*

This is a paginated API. If you @@ -2250,6 +2390,34 @@ export class FraudDetector extends FraudDetectorClient { } } + /** + *

+ * Updates a list. + *

+ */ + public updateList(args: UpdateListCommandInput, options?: __HttpHandlerOptions): Promise; + public updateList(args: UpdateListCommandInput, cb: (err: any, data?: UpdateListCommandOutput) => void): void; + public updateList( + args: UpdateListCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateListCommandOutput) => void + ): void; + public updateList( + args: UpdateListCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateListCommandOutput) => void), + cb?: (err: any, data?: UpdateListCommandOutput) => void + ): Promise | void { + const command = new UpdateListCommand(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 model description.

*/ diff --git a/clients/client-frauddetector/src/FraudDetectorClient.ts b/clients/client-frauddetector/src/FraudDetectorClient.ts index 53e0776ab7e4..e7e5b52ee1a1 100644 --- a/clients/client-frauddetector/src/FraudDetectorClient.ts +++ b/clients/client-frauddetector/src/FraudDetectorClient.ts @@ -74,6 +74,7 @@ import { CreateDetectorVersionCommandInput, CreateDetectorVersionCommandOutput, } from "./commands/CreateDetectorVersionCommand"; +import { CreateListCommandInput, CreateListCommandOutput } from "./commands/CreateListCommand"; import { CreateModelCommandInput, CreateModelCommandOutput } from "./commands/CreateModelCommand"; import { CreateModelVersionCommandInput, CreateModelVersionCommandOutput } from "./commands/CreateModelVersionCommand"; import { CreateRuleCommandInput, CreateRuleCommandOutput } from "./commands/CreateRuleCommand"; @@ -103,6 +104,7 @@ import { DeleteExternalModelCommandOutput, } from "./commands/DeleteExternalModelCommand"; import { DeleteLabelCommandInput, DeleteLabelCommandOutput } from "./commands/DeleteLabelCommand"; +import { DeleteListCommandInput, DeleteListCommandOutput } from "./commands/DeleteListCommand"; import { DeleteModelCommandInput, DeleteModelCommandOutput } from "./commands/DeleteModelCommand"; import { DeleteModelVersionCommandInput, DeleteModelVersionCommandOutput } from "./commands/DeleteModelVersionCommand"; import { DeleteOutcomeCommandInput, DeleteOutcomeCommandOutput } from "./commands/DeleteOutcomeCommand"; @@ -138,6 +140,8 @@ import { GetKMSEncryptionKeyCommandOutput, } from "./commands/GetKMSEncryptionKeyCommand"; import { GetLabelsCommandInput, GetLabelsCommandOutput } from "./commands/GetLabelsCommand"; +import { GetListElementsCommandInput, GetListElementsCommandOutput } from "./commands/GetListElementsCommand"; +import { GetListsMetadataCommandInput, GetListsMetadataCommandOutput } from "./commands/GetListsMetadataCommand"; import { GetModelsCommandInput, GetModelsCommandOutput } from "./commands/GetModelsCommand"; import { GetModelVersionCommandInput, GetModelVersionCommandOutput } from "./commands/GetModelVersionCommand"; import { GetOutcomesCommandInput, GetOutcomesCommandOutput } from "./commands/GetOutcomesCommand"; @@ -177,6 +181,7 @@ import { UpdateDetectorVersionStatusCommandOutput, } from "./commands/UpdateDetectorVersionStatusCommand"; import { UpdateEventLabelCommandInput, UpdateEventLabelCommandOutput } from "./commands/UpdateEventLabelCommand"; +import { UpdateListCommandInput, UpdateListCommandOutput } from "./commands/UpdateListCommand"; import { UpdateModelCommandInput, UpdateModelCommandOutput } from "./commands/UpdateModelCommand"; import { UpdateModelVersionCommandInput, UpdateModelVersionCommandOutput } from "./commands/UpdateModelVersionCommand"; import { @@ -202,6 +207,7 @@ export type ServiceInputTypes = | CreateBatchImportJobCommandInput | CreateBatchPredictionJobCommandInput | CreateDetectorVersionCommandInput + | CreateListCommandInput | CreateModelCommandInput | CreateModelVersionCommandInput | CreateRuleCommandInput @@ -216,6 +222,7 @@ export type ServiceInputTypes = | DeleteEventsByEventTypeCommandInput | DeleteExternalModelCommandInput | DeleteLabelCommandInput + | DeleteListCommandInput | DeleteModelCommandInput | DeleteModelVersionCommandInput | DeleteOutcomeCommandInput @@ -236,6 +243,8 @@ export type ServiceInputTypes = | GetExternalModelsCommandInput | GetKMSEncryptionKeyCommandInput | GetLabelsCommandInput + | GetListElementsCommandInput + | GetListsMetadataCommandInput | GetModelVersionCommandInput | GetModelsCommandInput | GetOutcomesCommandInput @@ -257,6 +266,7 @@ export type ServiceInputTypes = | UpdateDetectorVersionMetadataCommandInput | UpdateDetectorVersionStatusCommandInput | UpdateEventLabelCommandInput + | UpdateListCommandInput | UpdateModelCommandInput | UpdateModelVersionCommandInput | UpdateModelVersionStatusCommandInput @@ -272,6 +282,7 @@ export type ServiceOutputTypes = | CreateBatchImportJobCommandOutput | CreateBatchPredictionJobCommandOutput | CreateDetectorVersionCommandOutput + | CreateListCommandOutput | CreateModelCommandOutput | CreateModelVersionCommandOutput | CreateRuleCommandOutput @@ -286,6 +297,7 @@ export type ServiceOutputTypes = | DeleteEventsByEventTypeCommandOutput | DeleteExternalModelCommandOutput | DeleteLabelCommandOutput + | DeleteListCommandOutput | DeleteModelCommandOutput | DeleteModelVersionCommandOutput | DeleteOutcomeCommandOutput @@ -306,6 +318,8 @@ export type ServiceOutputTypes = | GetExternalModelsCommandOutput | GetKMSEncryptionKeyCommandOutput | GetLabelsCommandOutput + | GetListElementsCommandOutput + | GetListsMetadataCommandOutput | GetModelVersionCommandOutput | GetModelsCommandOutput | GetOutcomesCommandOutput @@ -327,6 +341,7 @@ export type ServiceOutputTypes = | UpdateDetectorVersionMetadataCommandOutput | UpdateDetectorVersionStatusCommandOutput | UpdateEventLabelCommandOutput + | UpdateListCommandOutput | UpdateModelCommandOutput | UpdateModelVersionCommandOutput | UpdateModelVersionStatusCommandOutput diff --git a/clients/client-frauddetector/src/commands/CreateListCommand.ts b/clients/client-frauddetector/src/commands/CreateListCommand.ts new file mode 100644 index 000000000000..d621e8f23788 --- /dev/null +++ b/clients/client-frauddetector/src/commands/CreateListCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +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 { FraudDetectorClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FraudDetectorClient"; +import { + CreateListRequest, + CreateListRequestFilterSensitiveLog, + CreateListResult, + CreateListResultFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_json1_1CreateListCommand, + serializeAws_json1_1CreateListCommand, +} from "../protocols/Aws_json1_1"; + +export interface CreateListCommandInput extends CreateListRequest {} +export interface CreateListCommandOutput extends CreateListResult, __MetadataBearer {} + +/** + *

+ * Creates a list. + *

+ *

List is a set of input data for a variable in your event dataset. You use the input data in a rule that's associated with your detector. + * For more information, see Lists.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { FraudDetectorClient, CreateListCommand } from "@aws-sdk/client-frauddetector"; // ES Modules import + * // const { FraudDetectorClient, CreateListCommand } = require("@aws-sdk/client-frauddetector"); // CommonJS import + * const client = new FraudDetectorClient(config); + * const command = new CreateListCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateListCommandInput} for command's `input` shape. + * @see {@link CreateListCommandOutput} for command's `response` shape. + * @see {@link FraudDetectorClientResolvedConfig | config} for FraudDetectorClient's `config` shape. + * + */ +export class CreateListCommand extends $Command< + CreateListCommandInput, + CreateListCommandOutput, + FraudDetectorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + constructor(readonly input: CreateListCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: FraudDetectorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, CreateListCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "FraudDetectorClient"; + const commandName = "CreateListCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateListRequestFilterSensitiveLog, + outputFilterSensitiveLog: CreateListResultFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateListCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1CreateListCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1CreateListCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-frauddetector/src/commands/DeleteListCommand.ts b/clients/client-frauddetector/src/commands/DeleteListCommand.ts new file mode 100644 index 000000000000..77f7a5577512 --- /dev/null +++ b/clients/client-frauddetector/src/commands/DeleteListCommand.ts @@ -0,0 +1,115 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +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 { FraudDetectorClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FraudDetectorClient"; +import { + DeleteListRequest, + DeleteListRequestFilterSensitiveLog, + DeleteListResult, + DeleteListResultFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_json1_1DeleteListCommand, + serializeAws_json1_1DeleteListCommand, +} from "../protocols/Aws_json1_1"; + +export interface DeleteListCommandInput extends DeleteListRequest {} +export interface DeleteListCommandOutput extends DeleteListResult, __MetadataBearer {} + +/** + *

+ * Deletes the list, provided it is not used in a rule. + *

+ *

When you delete a list, Amazon Fraud Detector permanently deletes that list and the elements in the list.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { FraudDetectorClient, DeleteListCommand } from "@aws-sdk/client-frauddetector"; // ES Modules import + * // const { FraudDetectorClient, DeleteListCommand } = require("@aws-sdk/client-frauddetector"); // CommonJS import + * const client = new FraudDetectorClient(config); + * const command = new DeleteListCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteListCommandInput} for command's `input` shape. + * @see {@link DeleteListCommandOutput} for command's `response` shape. + * @see {@link FraudDetectorClientResolvedConfig | config} for FraudDetectorClient's `config` shape. + * + */ +export class DeleteListCommand extends $Command< + DeleteListCommandInput, + DeleteListCommandOutput, + FraudDetectorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + constructor(readonly input: DeleteListCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: FraudDetectorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, DeleteListCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "FraudDetectorClient"; + const commandName = "DeleteListCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteListRequestFilterSensitiveLog, + outputFilterSensitiveLog: DeleteListResultFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteListCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteListCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1DeleteListCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-frauddetector/src/commands/GetListElementsCommand.ts b/clients/client-frauddetector/src/commands/GetListElementsCommand.ts new file mode 100644 index 000000000000..43f4d6b39d2a --- /dev/null +++ b/clients/client-frauddetector/src/commands/GetListElementsCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +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 { FraudDetectorClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FraudDetectorClient"; +import { + GetListElementsRequest, + GetListElementsRequestFilterSensitiveLog, + GetListElementsResult, + GetListElementsResultFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_json1_1GetListElementsCommand, + serializeAws_json1_1GetListElementsCommand, +} from "../protocols/Aws_json1_1"; + +export interface GetListElementsCommandInput extends GetListElementsRequest {} +export interface GetListElementsCommandOutput extends GetListElementsResult, __MetadataBearer {} + +/** + *

+ * Gets all the elements in the specified list. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { FraudDetectorClient, GetListElementsCommand } from "@aws-sdk/client-frauddetector"; // ES Modules import + * // const { FraudDetectorClient, GetListElementsCommand } = require("@aws-sdk/client-frauddetector"); // CommonJS import + * const client = new FraudDetectorClient(config); + * const command = new GetListElementsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetListElementsCommandInput} for command's `input` shape. + * @see {@link GetListElementsCommandOutput} for command's `response` shape. + * @see {@link FraudDetectorClientResolvedConfig | config} for FraudDetectorClient's `config` shape. + * + */ +export class GetListElementsCommand extends $Command< + GetListElementsCommandInput, + GetListElementsCommandOutput, + FraudDetectorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + constructor(readonly input: GetListElementsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: FraudDetectorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetListElementsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "FraudDetectorClient"; + const commandName = "GetListElementsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetListElementsRequestFilterSensitiveLog, + outputFilterSensitiveLog: GetListElementsResultFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetListElementsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1GetListElementsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1GetListElementsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-frauddetector/src/commands/GetListsMetadataCommand.ts b/clients/client-frauddetector/src/commands/GetListsMetadataCommand.ts new file mode 100644 index 000000000000..34e18a48e1e8 --- /dev/null +++ b/clients/client-frauddetector/src/commands/GetListsMetadataCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +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 { FraudDetectorClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FraudDetectorClient"; +import { + GetListsMetadataRequest, + GetListsMetadataRequestFilterSensitiveLog, + GetListsMetadataResult, + GetListsMetadataResultFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_json1_1GetListsMetadataCommand, + serializeAws_json1_1GetListsMetadataCommand, +} from "../protocols/Aws_json1_1"; + +export interface GetListsMetadataCommandInput extends GetListsMetadataRequest {} +export interface GetListsMetadataCommandOutput extends GetListsMetadataResult, __MetadataBearer {} + +/** + *

+ * Gets the metadata of either all the lists under the account or the specified list. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { FraudDetectorClient, GetListsMetadataCommand } from "@aws-sdk/client-frauddetector"; // ES Modules import + * // const { FraudDetectorClient, GetListsMetadataCommand } = require("@aws-sdk/client-frauddetector"); // CommonJS import + * const client = new FraudDetectorClient(config); + * const command = new GetListsMetadataCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetListsMetadataCommandInput} for command's `input` shape. + * @see {@link GetListsMetadataCommandOutput} for command's `response` shape. + * @see {@link FraudDetectorClientResolvedConfig | config} for FraudDetectorClient's `config` shape. + * + */ +export class GetListsMetadataCommand extends $Command< + GetListsMetadataCommandInput, + GetListsMetadataCommandOutput, + FraudDetectorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + constructor(readonly input: GetListsMetadataCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: FraudDetectorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetListsMetadataCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "FraudDetectorClient"; + const commandName = "GetListsMetadataCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetListsMetadataRequestFilterSensitiveLog, + outputFilterSensitiveLog: GetListsMetadataResultFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetListsMetadataCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1GetListsMetadataCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1GetListsMetadataCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-frauddetector/src/commands/UpdateListCommand.ts b/clients/client-frauddetector/src/commands/UpdateListCommand.ts new file mode 100644 index 000000000000..046af9344366 --- /dev/null +++ b/clients/client-frauddetector/src/commands/UpdateListCommand.ts @@ -0,0 +1,114 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +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 { FraudDetectorClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FraudDetectorClient"; +import { + UpdateListRequest, + UpdateListRequestFilterSensitiveLog, + UpdateListResult, + UpdateListResultFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_json1_1UpdateListCommand, + serializeAws_json1_1UpdateListCommand, +} from "../protocols/Aws_json1_1"; + +export interface UpdateListCommandInput extends UpdateListRequest {} +export interface UpdateListCommandOutput extends UpdateListResult, __MetadataBearer {} + +/** + *

+ * Updates a list. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { FraudDetectorClient, UpdateListCommand } from "@aws-sdk/client-frauddetector"; // ES Modules import + * // const { FraudDetectorClient, UpdateListCommand } = require("@aws-sdk/client-frauddetector"); // CommonJS import + * const client = new FraudDetectorClient(config); + * const command = new UpdateListCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateListCommandInput} for command's `input` shape. + * @see {@link UpdateListCommandOutput} for command's `response` shape. + * @see {@link FraudDetectorClientResolvedConfig | config} for FraudDetectorClient's `config` shape. + * + */ +export class UpdateListCommand extends $Command< + UpdateListCommandInput, + UpdateListCommandOutput, + FraudDetectorClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + constructor(readonly input: UpdateListCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: FraudDetectorClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UpdateListCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "FraudDetectorClient"; + const commandName = "UpdateListCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateListRequestFilterSensitiveLog, + outputFilterSensitiveLog: UpdateListResultFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateListCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateListCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1UpdateListCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-frauddetector/src/commands/index.ts b/clients/client-frauddetector/src/commands/index.ts index 5c73d55fdbfa..f0bba9991023 100644 --- a/clients/client-frauddetector/src/commands/index.ts +++ b/clients/client-frauddetector/src/commands/index.ts @@ -6,6 +6,7 @@ export * from "./CancelBatchPredictionJobCommand"; export * from "./CreateBatchImportJobCommand"; export * from "./CreateBatchPredictionJobCommand"; export * from "./CreateDetectorVersionCommand"; +export * from "./CreateListCommand"; export * from "./CreateModelCommand"; export * from "./CreateModelVersionCommand"; export * from "./CreateRuleCommand"; @@ -20,6 +21,7 @@ export * from "./DeleteEventTypeCommand"; export * from "./DeleteEventsByEventTypeCommand"; export * from "./DeleteExternalModelCommand"; export * from "./DeleteLabelCommand"; +export * from "./DeleteListCommand"; export * from "./DeleteModelCommand"; export * from "./DeleteModelVersionCommand"; export * from "./DeleteOutcomeCommand"; @@ -40,6 +42,8 @@ export * from "./GetEventTypesCommand"; export * from "./GetExternalModelsCommand"; export * from "./GetKMSEncryptionKeyCommand"; export * from "./GetLabelsCommand"; +export * from "./GetListElementsCommand"; +export * from "./GetListsMetadataCommand"; export * from "./GetModelVersionCommand"; export * from "./GetModelsCommand"; export * from "./GetOutcomesCommand"; @@ -61,6 +65,7 @@ export * from "./UpdateDetectorVersionCommand"; export * from "./UpdateDetectorVersionMetadataCommand"; export * from "./UpdateDetectorVersionStatusCommand"; export * from "./UpdateEventLabelCommand"; +export * from "./UpdateListCommand"; export * from "./UpdateModelCommand"; export * from "./UpdateModelVersionCommand"; export * from "./UpdateModelVersionStatusCommand"; diff --git a/clients/client-frauddetector/src/endpoint/EndpointParameters.ts b/clients/client-frauddetector/src/endpoint/EndpointParameters.ts index 6847ddaf817b..a890ad8369aa 100644 --- a/clients/client-frauddetector/src/endpoint/EndpointParameters.ts +++ b/clients/client-frauddetector/src/endpoint/EndpointParameters.ts @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = ( }; export interface EndpointParameters extends __EndpointParameters { - Region: string; + Region?: string; UseDualStack?: boolean; UseFIPS?: boolean; Endpoint?: string; diff --git a/clients/client-frauddetector/src/endpoint/ruleset.ts b/clients/client-frauddetector/src/endpoint/ruleset.ts index ad7d8e337e29..93ee7d7fccaf 100644 --- a/clients/client-frauddetector/src/endpoint/ruleset.ts +++ b/clients/client-frauddetector/src/endpoint/ruleset.ts @@ -6,24 +6,25 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints"; or see "smithy.rules#endpointRuleSet" in codegen/sdk-codegen/aws-models/frauddetector.json */ -const q="fn", -r="argv", -s="ref"; -const a=true, -b=false, -c="String", -d="PartitionResult", -e="tree", -f="error", -g="endpoint", -h={"required":true,"default":false,"type":"Boolean"}, -i={[s]:"Endpoint"}, -j={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]}, -k={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]}, -l={}, -m={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsFIPS"]}]}, -n={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsDualStack"]}]}, +const q="required", +r="fn", +s="argv", +t="ref"; +const a="isSet", +b="tree", +c="error", +d="endpoint", +e="PartitionResult", +f={[q]:false,"type":"String"}, +g={[q]:true,"default":false,"type":"Boolean"}, +h={[t]:"Endpoint"}, +i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]}, +j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]}, +k={}, +l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]}, +m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]}, +n=[i], o=[j], -p=[k]; -const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[q]:"isSet",[r]:[i]}],type:e,rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:p,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:i,properties:l,headers:l},type:g}]}]},{conditions:[j,k],type:e,rules:[{conditions:[m,n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://frauddetector-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:o,type:e,rules:[{conditions:[m],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://frauddetector-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://frauddetector.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://frauddetector.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]}]}; +p=[{[t]:"Region"}]; +const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://frauddetector-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://frauddetector-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://frauddetector.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://frauddetector.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]}; export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-frauddetector/src/models/models_0.ts b/clients/client-frauddetector/src/models/models_0.ts index d2e673242a0f..4ba8bd3179fd 100644 --- a/clients/client-frauddetector/src/models/models_0.ts +++ b/clients/client-frauddetector/src/models/models_0.ts @@ -96,6 +96,55 @@ export interface AggregatedVariablesImportanceMetrics { logOddsMetrics?: AggregatedLogOddsMetric[]; } +/** + *

+ * The metadata of a list. + *

+ */ +export interface AllowDenyList { + /** + *

+ * The name of the list. + *

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

+ * The description of the list. + *

+ */ + description?: string; + + /** + *

+ * The variable type of the list. + *

+ */ + variableType?: string; + + /** + *

+ * The time the list was created. + *

+ */ + createdTime?: string; + + /** + *

+ * The time the list was last updated. + *

+ */ + updatedTime?: string; + + /** + *

+ * The ARN of the list. + *

+ */ + arn?: string; +} + export enum AsyncJobStatus { CANCELED = "CANCELED", CANCEL_IN_PROGRESS = "CANCEL_IN_PROGRESS", @@ -676,6 +725,46 @@ export interface CreateDetectorVersionResult { status?: DetectorVersionStatus | string; } +export interface CreateListRequest { + /** + *

+ * The name of the list. + *

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

+ * The names of the elements, if providing. You can also create an empty list and add elements later using the UpdateList API. + *

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

+ * The variable type of the list. You can only assign the variable type with String data type. For more information, see + * Variable types. + *

+ */ + variableType?: string; + + /** + *

+ * The description of the list. + *

+ */ + description?: string; + + /** + *

+ * A collection of the key and value pairs. + *

+ */ + tags?: Tag[]; +} + +export interface CreateListResult {} + export interface CreateModelRequest { /** *

The model ID.

@@ -1086,6 +1175,17 @@ export interface DeleteLabelRequest { export interface DeleteLabelResult {} +export interface DeleteListRequest { + /** + *

+ * The name of the list to delete. + *

+ */ + name: string | undefined; +} + +export interface DeleteListResult {} + export interface DeleteModelRequest { /** *

The model ID of the model to delete.

@@ -3113,6 +3213,84 @@ export interface GetLabelsResult { nextToken?: string; } +export interface GetListElementsRequest { + /** + *

+ * The name of the list. + *

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

+ * The next token for the subsequent request. + *

+ */ + nextToken?: string; + + /** + *

+ * The maximum number of objects to return for the request. + *

+ */ + maxResults?: number; +} + +export interface GetListElementsResult { + /** + *

+ * The list elements. + *

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

+ * The next page token. + *

+ */ + nextToken?: string; +} + +export interface GetListsMetadataRequest { + /** + *

+ * The name of the list. + *

+ */ + name?: string; + + /** + *

+ * The next token for the subsequent request. + *

+ */ + nextToken?: string; + + /** + *

+ * The maximum number of objects to return for the request. + *

+ */ + maxResults?: number; +} + +export interface GetListsMetadataResult { + /** + *

+ * The metadata of the specified list or all lists under the account. + *

+ */ + lists?: AllowDenyList[]; + + /** + *

+ * The next page token. + *

+ */ + nextToken?: string; +} + export interface GetModelsRequest { /** *

The model ID.

@@ -4006,6 +4184,66 @@ export interface UpdateEventLabelRequest { export interface UpdateEventLabelResult {} +export enum ListUpdateMode { + APPEND = "APPEND", + REMOVE = "REMOVE", + REPLACE = "REPLACE", +} + +export interface UpdateListRequest { + /** + *

+ * The name of the list to update. + *

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

+ * One or more list elements to add or replace. If you are providing the elements, make sure to specify the updateMode to use. + *

+ *

If you are deleting all elements from the list, use REPLACE for the updateMode and provide an empty list (0 elements).

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

+ * The new description. + *

+ */ + description?: string; + + /** + *

+ * The update mode (type). + *

+ *
    + *
  • + *

    Use APPEND if you are adding elements to the list.

    + *
  • + *
  • + *

    Use REPLACE if you replacing existing elements in the list.

    + *
  • + *
  • + *

    Use REMOVE if you are removing elements from the list.

    + *
  • + *
+ */ + updateMode?: ListUpdateMode | string; + + /** + *

+ * The variable type you want to assign to the list. + *

+ * + *

You cannot update a variable type of a list that already has a variable type assigned to it. You can assign a variable type to a list only if the list does not already have a variable type.

+ *
+ */ + variableType?: string; +} + +export interface UpdateListResult {} + export interface UpdateModelRequest { /** *

The model ID.

@@ -4211,6 +4449,13 @@ export const AggregatedVariablesImportanceMetricsFilterSensitiveLog = ( ...obj, }); +/** + * @internal + */ +export const AllowDenyListFilterSensitiveLog = (obj: AllowDenyList): any => ({ + ...obj, +}); + /** * @internal */ @@ -4379,6 +4624,21 @@ export const CreateDetectorVersionResultFilterSensitiveLog = (obj: CreateDetecto ...obj, }); +/** + * @internal + */ +export const CreateListRequestFilterSensitiveLog = (obj: CreateListRequest): any => ({ + ...obj, + ...(obj.elements && { elements: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const CreateListResultFilterSensitiveLog = (obj: CreateListResult): any => ({ + ...obj, +}); + /** * @internal */ @@ -4611,6 +4871,20 @@ export const DeleteLabelResultFilterSensitiveLog = (obj: DeleteLabelResult): any ...obj, }); +/** + * @internal + */ +export const DeleteListRequestFilterSensitiveLog = (obj: DeleteListRequest): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const DeleteListResultFilterSensitiveLog = (obj: DeleteListResult): any => ({ + ...obj, +}); + /** * @internal */ @@ -5217,6 +5491,35 @@ export const GetLabelsResultFilterSensitiveLog = (obj: GetLabelsResult): any => ...obj, }); +/** + * @internal + */ +export const GetListElementsRequestFilterSensitiveLog = (obj: GetListElementsRequest): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const GetListElementsResultFilterSensitiveLog = (obj: GetListElementsResult): any => ({ + ...obj, + ...(obj.elements && { elements: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const GetListsMetadataRequestFilterSensitiveLog = (obj: GetListsMetadataRequest): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const GetListsMetadataResultFilterSensitiveLog = (obj: GetListsMetadataResult): any => ({ + ...obj, +}); + /** * @internal */ @@ -5561,6 +5864,21 @@ export const UpdateEventLabelResultFilterSensitiveLog = (obj: UpdateEventLabelRe ...obj, }); +/** + * @internal + */ +export const UpdateListRequestFilterSensitiveLog = (obj: UpdateListRequest): any => ({ + ...obj, + ...(obj.elements && { elements: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const UpdateListResultFilterSensitiveLog = (obj: UpdateListResult): any => ({ + ...obj, +}); + /** * @internal */ diff --git a/clients/client-frauddetector/src/pagination/GetListElementsPaginator.ts b/clients/client-frauddetector/src/pagination/GetListElementsPaginator.ts new file mode 100644 index 000000000000..66f30dd3fd68 --- /dev/null +++ b/clients/client-frauddetector/src/pagination/GetListElementsPaginator.ts @@ -0,0 +1,61 @@ +// smithy-typescript generated code +import { Paginator } from "@aws-sdk/types"; + +import { + GetListElementsCommand, + GetListElementsCommandInput, + GetListElementsCommandOutput, +} from "../commands/GetListElementsCommand"; +import { FraudDetector } from "../FraudDetector"; +import { FraudDetectorClient } from "../FraudDetectorClient"; +import { FraudDetectorPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: FraudDetectorClient, + input: GetListElementsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetListElementsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: FraudDetector, + input: GetListElementsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.getListElements(input, ...args); +}; +export async function* paginateGetListElements( + config: FraudDetectorPaginationConfiguration, + input: GetListElementsCommandInput, + ...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: GetListElementsCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof FraudDetector) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof FraudDetectorClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected FraudDetector | FraudDetectorClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-frauddetector/src/pagination/GetListsMetadataPaginator.ts b/clients/client-frauddetector/src/pagination/GetListsMetadataPaginator.ts new file mode 100644 index 000000000000..ae510defecf7 --- /dev/null +++ b/clients/client-frauddetector/src/pagination/GetListsMetadataPaginator.ts @@ -0,0 +1,61 @@ +// smithy-typescript generated code +import { Paginator } from "@aws-sdk/types"; + +import { + GetListsMetadataCommand, + GetListsMetadataCommandInput, + GetListsMetadataCommandOutput, +} from "../commands/GetListsMetadataCommand"; +import { FraudDetector } from "../FraudDetector"; +import { FraudDetectorClient } from "../FraudDetectorClient"; +import { FraudDetectorPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: FraudDetectorClient, + input: GetListsMetadataCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetListsMetadataCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: FraudDetector, + input: GetListsMetadataCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.getListsMetadata(input, ...args); +}; +export async function* paginateGetListsMetadata( + config: FraudDetectorPaginationConfiguration, + input: GetListsMetadataCommandInput, + ...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: GetListsMetadataCommandOutput; + while (hasNext) { + input.nextToken = token; + input["maxResults"] = config.pageSize; + if (config.client instanceof FraudDetector) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof FraudDetectorClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected FraudDetector | FraudDetectorClient"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-frauddetector/src/pagination/index.ts b/clients/client-frauddetector/src/pagination/index.ts index 759fb1dd5402..2250949a5968 100644 --- a/clients/client-frauddetector/src/pagination/index.ts +++ b/clients/client-frauddetector/src/pagination/index.ts @@ -14,11 +14,13 @@ export * from "./GetExternalModelsPaginator"; export * from "./GetLabelsPaginator"; -export * from "./GetModelsPaginator"; +export * from "./GetListElementsPaginator"; -export * from "./GetOutcomesPaginator"; +export * from "./GetListsMetadataPaginator"; // smithy-typescript generated code export * from "./Interfaces"; +export * from "./GetModelsPaginator"; +export * from "./GetOutcomesPaginator"; export * from "./GetRulesPaginator"; export * from "./GetVariablesPaginator"; export * from "./ListEventPredictionsPaginator"; diff --git a/clients/client-frauddetector/src/protocols/Aws_json1_1.ts b/clients/client-frauddetector/src/protocols/Aws_json1_1.ts index b01dfda6427e..e7c5b621228c 100644 --- a/clients/client-frauddetector/src/protocols/Aws_json1_1.ts +++ b/clients/client-frauddetector/src/protocols/Aws_json1_1.ts @@ -41,6 +41,7 @@ import { CreateDetectorVersionCommandInput, CreateDetectorVersionCommandOutput, } from "../commands/CreateDetectorVersionCommand"; +import { CreateListCommandInput, CreateListCommandOutput } from "../commands/CreateListCommand"; import { CreateModelCommandInput, CreateModelCommandOutput } from "../commands/CreateModelCommand"; import { CreateModelVersionCommandInput, CreateModelVersionCommandOutput } from "../commands/CreateModelVersionCommand"; import { CreateRuleCommandInput, CreateRuleCommandOutput } from "../commands/CreateRuleCommand"; @@ -70,6 +71,7 @@ import { DeleteExternalModelCommandOutput, } from "../commands/DeleteExternalModelCommand"; import { DeleteLabelCommandInput, DeleteLabelCommandOutput } from "../commands/DeleteLabelCommand"; +import { DeleteListCommandInput, DeleteListCommandOutput } from "../commands/DeleteListCommand"; import { DeleteModelCommandInput, DeleteModelCommandOutput } from "../commands/DeleteModelCommand"; import { DeleteModelVersionCommandInput, DeleteModelVersionCommandOutput } from "../commands/DeleteModelVersionCommand"; import { DeleteOutcomeCommandInput, DeleteOutcomeCommandOutput } from "../commands/DeleteOutcomeCommand"; @@ -105,6 +107,8 @@ import { GetKMSEncryptionKeyCommandOutput, } from "../commands/GetKMSEncryptionKeyCommand"; import { GetLabelsCommandInput, GetLabelsCommandOutput } from "../commands/GetLabelsCommand"; +import { GetListElementsCommandInput, GetListElementsCommandOutput } from "../commands/GetListElementsCommand"; +import { GetListsMetadataCommandInput, GetListsMetadataCommandOutput } from "../commands/GetListsMetadataCommand"; import { GetModelsCommandInput, GetModelsCommandOutput } from "../commands/GetModelsCommand"; import { GetModelVersionCommandInput, GetModelVersionCommandOutput } from "../commands/GetModelVersionCommand"; import { GetOutcomesCommandInput, GetOutcomesCommandOutput } from "../commands/GetOutcomesCommand"; @@ -144,6 +148,7 @@ import { UpdateDetectorVersionStatusCommandOutput, } from "../commands/UpdateDetectorVersionStatusCommand"; import { UpdateEventLabelCommandInput, UpdateEventLabelCommandOutput } from "../commands/UpdateEventLabelCommand"; +import { UpdateListCommandInput, UpdateListCommandOutput } from "../commands/UpdateListCommand"; import { UpdateModelCommandInput, UpdateModelCommandOutput } from "../commands/UpdateModelCommand"; import { UpdateModelVersionCommandInput, UpdateModelVersionCommandOutput } from "../commands/UpdateModelVersionCommand"; import { @@ -159,6 +164,7 @@ import { AggregatedLogOddsMetric, AggregatedVariablesImpactExplanation, AggregatedVariablesImportanceMetrics, + AllowDenyList, ATIMetricDataPoint, ATIModelPerformance, ATITrainingMetricsValue, @@ -181,6 +187,8 @@ import { CreateBatchPredictionJobResult, CreateDetectorVersionRequest, CreateDetectorVersionResult, + CreateListRequest, + CreateListResult, CreateModelRequest, CreateModelResult, CreateModelVersionRequest, @@ -210,6 +218,8 @@ import { DeleteExternalModelResult, DeleteLabelRequest, DeleteLabelResult, + DeleteListRequest, + DeleteListResult, DeleteModelRequest, DeleteModelResult, DeleteModelVersionRequest, @@ -267,6 +277,10 @@ import { GetKMSEncryptionKeyResult, GetLabelsRequest, GetLabelsResult, + GetListElementsRequest, + GetListElementsResult, + GetListsMetadataRequest, + GetListsMetadataResult, GetModelsRequest, GetModelsResult, GetModelVersionRequest, @@ -348,6 +362,8 @@ import { UpdateDetectorVersionStatusResult, UpdateEventLabelRequest, UpdateEventLabelResult, + UpdateListRequest, + UpdateListResult, UpdateModelRequest, UpdateModelResult, UpdateModelVersionRequest, @@ -458,6 +474,19 @@ export const serializeAws_json1_1CreateDetectorVersionCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1CreateListCommand = async ( + input: CreateListCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSHawksNestServiceFacade.CreateList", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1CreateListRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1CreateModelCommand = async ( input: CreateModelCommandInput, context: __SerdeContext @@ -640,6 +669,19 @@ export const serializeAws_json1_1DeleteLabelCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DeleteListCommand = async ( + input: DeleteListCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSHawksNestServiceFacade.DeleteList", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DeleteListRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1DeleteModelCommand = async ( input: DeleteModelCommandInput, context: __SerdeContext @@ -899,6 +941,32 @@ export const serializeAws_json1_1GetLabelsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1GetListElementsCommand = async ( + input: GetListElementsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSHawksNestServiceFacade.GetListElements", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1GetListElementsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_1GetListsMetadataCommand = async ( + input: GetListsMetadataCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSHawksNestServiceFacade.GetListsMetadata", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1GetListsMetadataRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1GetModelsCommand = async ( input: GetModelsCommandInput, context: __SerdeContext @@ -1172,6 +1240,19 @@ export const serializeAws_json1_1UpdateEventLabelCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1UpdateListCommand = async ( + input: UpdateListCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AWSHawksNestServiceFacade.UpdateList", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1UpdateListRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1UpdateModelCommand = async ( input: UpdateModelCommandInput, context: __SerdeContext @@ -1615,6 +1696,56 @@ const deserializeAws_json1_1CreateDetectorVersionCommandError = async ( } }; +export const deserializeAws_json1_1CreateListCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateListCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateListResult(data, context); + const response: CreateListCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1CreateListCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.frauddetector#AccessDeniedException": + throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.frauddetector#InternalServerException": + throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.frauddetector#ThrottlingException": + throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.frauddetector#ValidationException": + throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + export const deserializeAws_json1_1CreateModelCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -2342,6 +2473,59 @@ const deserializeAws_json1_1DeleteLabelCommandError = async ( } }; +export const deserializeAws_json1_1DeleteListCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DeleteListCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteListResult(data, context); + const response: DeleteListCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1DeleteListCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.frauddetector#AccessDeniedException": + throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.frauddetector#ConflictException": + throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.frauddetector#InternalServerException": + throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.frauddetector#ThrottlingException": + throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.frauddetector#ValidationException": + throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + export const deserializeAws_json1_1DeleteModelCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -3405,6 +3589,112 @@ const deserializeAws_json1_1GetLabelsCommandError = async ( } }; +export const deserializeAws_json1_1GetListElementsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetListElementsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetListElementsResult(data, context); + const response: GetListElementsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1GetListElementsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.frauddetector#AccessDeniedException": + throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.frauddetector#InternalServerException": + throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.frauddetector#ResourceNotFoundException": + throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.frauddetector#ThrottlingException": + throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.frauddetector#ValidationException": + throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + +export const deserializeAws_json1_1GetListsMetadataCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetListsMetadataCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetListsMetadataResult(data, context); + const response: GetListsMetadataCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1GetListsMetadataCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.frauddetector#AccessDeniedException": + throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.frauddetector#InternalServerException": + throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.frauddetector#ResourceNotFoundException": + throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.frauddetector#ThrottlingException": + throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.frauddetector#ValidationException": + throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + export const deserializeAws_json1_1GetModelsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -4521,6 +4811,62 @@ const deserializeAws_json1_1UpdateEventLabelCommandError = async ( } }; +export const deserializeAws_json1_1UpdateListCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateListCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateListResult(data, context); + const response: UpdateListCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1UpdateListCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.frauddetector#AccessDeniedException": + throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.frauddetector#ConflictException": + throw await deserializeAws_json1_1ConflictExceptionResponse(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.frauddetector#InternalServerException": + throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.frauddetector#ResourceNotFoundException": + throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.frauddetector#ThrottlingException": + throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.frauddetector#ValidationException": + throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + export const deserializeAws_json1_1UpdateModelCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -5033,6 +5379,16 @@ const serializeAws_json1_1CreateDetectorVersionRequest = ( }; }; +const serializeAws_json1_1CreateListRequest = (input: CreateListRequest, context: __SerdeContext): any => { + return { + ...(input.description != null && { description: input.description }), + ...(input.elements != null && { elements: serializeAws_json1_1ElementsList(input.elements, context) }), + ...(input.name != null && { name: input.name }), + ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }), + ...(input.variableType != null && { variableType: input.variableType }), + }; +}; + const serializeAws_json1_1CreateModelRequest = (input: CreateModelRequest, context: __SerdeContext): any => { return { ...(input.description != null && { description: input.description }), @@ -5176,6 +5532,12 @@ const serializeAws_json1_1DeleteLabelRequest = (input: DeleteLabelRequest, conte }; }; +const serializeAws_json1_1DeleteListRequest = (input: DeleteListRequest, context: __SerdeContext): any => { + return { + ...(input.name != null && { name: input.name }), + }; +}; + const serializeAws_json1_1DeleteModelRequest = (input: DeleteModelRequest, context: __SerdeContext): any => { return { ...(input.modelId != null && { modelId: input.modelId }), @@ -5233,6 +5595,14 @@ const serializeAws_json1_1DescribeModelVersionsRequest = ( }; }; +const serializeAws_json1_1ElementsList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return entry; + }); +}; + const serializeAws_json1_1Entity = (input: Entity, context: __SerdeContext): any => { return { ...(input.entityId != null && { entityId: input.entityId }), @@ -5403,6 +5773,22 @@ const serializeAws_json1_1GetLabelsRequest = (input: GetLabelsRequest, context: }; }; +const serializeAws_json1_1GetListElementsRequest = (input: GetListElementsRequest, context: __SerdeContext): any => { + return { + ...(input.maxResults != null && { maxResults: input.maxResults }), + ...(input.name != null && { name: input.name }), + ...(input.nextToken != null && { nextToken: input.nextToken }), + }; +}; + +const serializeAws_json1_1GetListsMetadataRequest = (input: GetListsMetadataRequest, context: __SerdeContext): any => { + return { + ...(input.maxResults != null && { maxResults: input.maxResults }), + ...(input.name != null && { name: input.name }), + ...(input.nextToken != null && { nextToken: input.nextToken }), + }; +}; + const serializeAws_json1_1GetModelsRequest = (input: GetModelsRequest, context: __SerdeContext): any => { return { ...(input.maxResults != null && { maxResults: input.maxResults }), @@ -5809,6 +6195,16 @@ const serializeAws_json1_1UpdateEventLabelRequest = (input: UpdateEventLabelRequ }; }; +const serializeAws_json1_1UpdateListRequest = (input: UpdateListRequest, context: __SerdeContext): any => { + return { + ...(input.description != null && { description: input.description }), + ...(input.elements != null && { elements: serializeAws_json1_1ElementsList(input.elements, context) }), + ...(input.name != null && { name: input.name }), + ...(input.updateMode != null && { updateMode: input.updateMode }), + ...(input.variableType != null && { variableType: input.variableType }), + }; +}; + const serializeAws_json1_1UpdateModelRequest = (input: UpdateModelRequest, context: __SerdeContext): any => { return { ...(input.description != null && { description: input.description }), @@ -5942,6 +6338,29 @@ const deserializeAws_json1_1AggregatedVariablesImportanceMetrics = ( } as any; }; +const deserializeAws_json1_1AllowDenyList = (output: any, context: __SerdeContext): AllowDenyList => { + return { + arn: __expectString(output.arn), + createdTime: __expectString(output.createdTime), + description: __expectString(output.description), + name: __expectString(output.name), + updatedTime: __expectString(output.updatedTime), + variableType: __expectString(output.variableType), + } as any; +}; + +const deserializeAws_json1_1AllowDenyLists = (output: any, context: __SerdeContext): AllowDenyList[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_1AllowDenyList(entry, context); + }); + return retVal; +}; + const deserializeAws_json1_1ATIMetricDataPoint = (output: any, context: __SerdeContext): ATIMetricDataPoint => { return { adr: __limitedParseFloat32(output.adr), @@ -6158,6 +6577,10 @@ const deserializeAws_json1_1CreateDetectorVersionResult = ( } as any; }; +const deserializeAws_json1_1CreateListResult = (output: any, context: __SerdeContext): CreateListResult => { + return {} as any; +}; + const deserializeAws_json1_1CreateModelResult = (output: any, context: __SerdeContext): CreateModelResult => { return {} as any; }; @@ -6265,6 +6688,10 @@ const deserializeAws_json1_1DeleteLabelResult = (output: any, context: __SerdeCo return {} as any; }; +const deserializeAws_json1_1DeleteListResult = (output: any, context: __SerdeContext): DeleteListResult => { + return {} as any; +}; + const deserializeAws_json1_1DeleteModelResult = (output: any, context: __SerdeContext): DeleteModelResult => { return {} as any; }; @@ -6360,6 +6787,18 @@ const deserializeAws_json1_1DetectorVersionSummaryList = ( return retVal; }; +const deserializeAws_json1_1ElementsList = (output: any, context: __SerdeContext): string[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); + return retVal; +}; + const deserializeAws_json1_1Entity = (output: any, context: __SerdeContext): Entity => { return { entityId: __expectString(output.entityId), @@ -6794,6 +7233,20 @@ const deserializeAws_json1_1GetLabelsResult = (output: any, context: __SerdeCont } as any; }; +const deserializeAws_json1_1GetListElementsResult = (output: any, context: __SerdeContext): GetListElementsResult => { + return { + elements: output.elements != null ? deserializeAws_json1_1ElementsList(output.elements, context) : undefined, + nextToken: __expectString(output.nextToken), + } as any; +}; + +const deserializeAws_json1_1GetListsMetadataResult = (output: any, context: __SerdeContext): GetListsMetadataResult => { + return { + lists: output.lists != null ? deserializeAws_json1_1AllowDenyLists(output.lists, context) : undefined, + nextToken: __expectString(output.nextToken), + } as any; +}; + const deserializeAws_json1_1GetModelsResult = (output: any, context: __SerdeContext): GetModelsResult => { return { models: output.models != null ? deserializeAws_json1_1modelList(output.models, context) : undefined, @@ -7732,6 +8185,10 @@ const deserializeAws_json1_1UpdateEventLabelResult = (output: any, context: __Se return {} as any; }; +const deserializeAws_json1_1UpdateListResult = (output: any, context: __SerdeContext): UpdateListResult => { + return {} as any; +}; + const deserializeAws_json1_1UpdateModelResult = (output: any, context: __SerdeContext): UpdateModelResult => { return {} as any; }; diff --git a/codegen/sdk-codegen/aws-models/frauddetector.json b/codegen/sdk-codegen/aws-models/frauddetector.json index d51050c615a9..35cbc82819c2 100644 --- a/codegen/sdk-codegen/aws-models/frauddetector.json +++ b/codegen/sdk-codegen/aws-models/frauddetector.json @@ -126,6 +126,9 @@ { "target": "com.amazonaws.frauddetector#CreateDetectorVersion" }, + { + "target": "com.amazonaws.frauddetector#CreateList" + }, { "target": "com.amazonaws.frauddetector#CreateModel" }, @@ -168,6 +171,9 @@ { "target": "com.amazonaws.frauddetector#DeleteLabel" }, + { + "target": "com.amazonaws.frauddetector#DeleteList" + }, { "target": "com.amazonaws.frauddetector#DeleteModel" }, @@ -228,6 +234,12 @@ { "target": "com.amazonaws.frauddetector#GetLabels" }, + { + "target": "com.amazonaws.frauddetector#GetListElements" + }, + { + "target": "com.amazonaws.frauddetector#GetListsMetadata" + }, { "target": "com.amazonaws.frauddetector#GetModels" }, @@ -291,6 +303,9 @@ { "target": "com.amazonaws.frauddetector#UpdateEventLabel" }, + { + "target": "com.amazonaws.frauddetector#UpdateList" + }, { "target": "com.amazonaws.frauddetector#UpdateModel" }, @@ -332,7 +347,7 @@ "parameters": { "Region": { "builtIn": "AWS::Region", - "required": true, + "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "String" }, @@ -361,13 +376,12 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "isSet", "argv": [ { - "ref": "Region" + "ref": "Endpoint" } - ], - "assign": "PartitionResult" + ] } ], "type": "tree", @@ -375,14 +389,20 @@ { "conditions": [ { - "fn": "isSet", + "fn": "booleanEquals", "argv": [ { - "ref": "Endpoint" - } + "ref": "UseFIPS" + }, + true ] } ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], "type": "tree", "rules": [ { @@ -391,67 +411,42 @@ "fn": "booleanEquals", "argv": [ { - "ref": "UseFIPS" + "ref": "UseDualStack" }, true ] } ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", "type": "error" }, { "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" + "endpoint": { + "url": { + "ref": "Endpoint" }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ { "conditions": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", + "fn": "isSet", "argv": [ { - "ref": "UseDualStack" - }, - true + "ref": "Region" + } ] } ], @@ -460,154 +455,215 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "aws.partition", "argv": [ - true, { - "fn": "getAttr", + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseFIPS" }, - "supportsFIPS" + true ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, + }, { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseDualStack" }, - "supportsDualStack" + true ] } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], + ], "type": "tree", "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://frauddetector-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, { "conditions": [], - "endpoint": { - "url": "https://frauddetector-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" } ] - } - ] - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ { - "fn": "booleanEquals", - "argv": [ - true, + "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseFIPS" }, - "supportsFIPS" + true ] } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], + ], "type": "tree", "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://frauddetector-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, { "conditions": [], - "endpoint": { - "url": "https://frauddetector-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" } ] - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ { - "fn": "booleanEquals", - "argv": [ - true, + "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseDualStack" }, - "supportsDualStack" + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://frauddetector.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] - } - ], - "type": "tree", - "rules": [ + }, { "conditions": [], "type": "tree", @@ -615,7 +671,7 @@ { "conditions": [], "endpoint": { - "url": "https://frauddetector.{Region}.{PartitionResult#dualStackDnsSuffix}", + "url": "https://frauddetector.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, @@ -624,28 +680,13 @@ ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } ] }, { "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://frauddetector.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] } @@ -654,250 +695,250 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector-fips.cn-north-1.api.amazonwebservices.com.cn" + "url": "https://frauddetector.ap-southeast-1.amazonaws.com" } }, "params": { - "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "Region": "ap-southeast-1", + "UseDualStack": false, + "UseFIPS": false } }, { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector-fips.cn-north-1.amazonaws.com.cn" + "url": "https://frauddetector.ap-southeast-2.amazonaws.com" } }, "params": { - "UseFIPS": true, + "Region": "ap-southeast-2", "UseDualStack": false, - "Region": "cn-north-1" + "UseFIPS": false } }, { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector.cn-north-1.api.amazonwebservices.com.cn" + "url": "https://frauddetector.eu-west-1.amazonaws.com" } }, "params": { - "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "Region": "eu-west-1", + "UseDualStack": false, + "UseFIPS": false } }, { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector.cn-north-1.amazonaws.com.cn" + "url": "https://frauddetector.us-east-1.amazonaws.com" } }, "params": { - "UseFIPS": false, + "Region": "us-east-1", "UseDualStack": false, - "Region": "cn-north-1" + "UseFIPS": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://frauddetector.us-east-2.amazonaws.com" } }, "params": { - "UseFIPS": true, + "Region": "us-east-2", "UseDualStack": false, - "Region": "us-iso-east-1" + "UseFIPS": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector.us-iso-east-1.c2s.ic.gov" + "url": "https://frauddetector.us-west-2.amazonaws.com" } }, "params": { - "UseFIPS": false, + "Region": "us-west-2", "UseDualStack": false, - "Region": "us-iso-east-1" + "UseFIPS": false } }, { - "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://frauddetector.us-west-2.amazonaws.com" + "url": "https://frauddetector-fips.us-east-1.api.aws" } }, "params": { - "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true } }, { - "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector.ap-southeast-1.amazonaws.com" + "url": "https://frauddetector-fips.us-east-1.amazonaws.com" } }, "params": { - "UseFIPS": false, + "Region": "us-east-1", "UseDualStack": false, - "Region": "ap-southeast-1" + "UseFIPS": true } }, { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://frauddetector.ap-southeast-2.amazonaws.com" + "url": "https://frauddetector.us-east-1.api.aws" } }, "params": { - "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://frauddetector.us-east-1.amazonaws.com" + "url": "https://frauddetector-fips.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { - "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": true } }, { - "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector.us-east-2.amazonaws.com" + "url": "https://frauddetector-fips.cn-north-1.amazonaws.com.cn" } }, "params": { - "UseFIPS": false, + "Region": "cn-north-1", "UseDualStack": false, - "Region": "us-east-2" + "UseFIPS": true } }, { - "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://frauddetector.eu-west-1.amazonaws.com" + "url": "https://frauddetector.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { - "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "Region": "cn-north-1", + "UseDualStack": true, + "UseFIPS": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector-fips.us-east-1.api.aws" + "url": "https://frauddetector.cn-north-1.amazonaws.com.cn" } }, "params": { - "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "Region": "cn-north-1", + "UseDualStack": false, + "UseFIPS": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://frauddetector-fips.us-east-1.amazonaws.com" + "url": "https://frauddetector-fips.us-gov-east-1.api.aws" } }, "params": { - "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "Region": "us-gov-east-1", + "UseDualStack": true, + "UseFIPS": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector.us-east-1.api.aws" + "url": "https://frauddetector-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "Region": "us-gov-east-1", + "UseDualStack": false, + "UseFIPS": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://frauddetector-fips.us-gov-east-1.api.aws" + "url": "https://frauddetector.us-gov-east-1.api.aws" } }, "params": { - "UseFIPS": true, + "Region": "us-gov-east-1", "UseDualStack": true, - "Region": "us-gov-east-1" + "UseFIPS": false } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector-fips.us-gov-east-1.amazonaws.com" + "url": "https://frauddetector.us-gov-east-1.amazonaws.com" } }, "params": { - "UseFIPS": true, + "Region": "us-gov-east-1", "UseDualStack": false, - "Region": "us-gov-east-1" + "UseFIPS": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector.us-gov-east-1.api.aws" + "url": "https://frauddetector-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://frauddetector.us-gov-east-1.amazonaws.com" + "url": "https://frauddetector.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseFIPS": false, + "Region": "us-iso-east-1", "UseDualStack": false, - "Region": "us-gov-east-1" + "UseFIPS": false } }, { @@ -908,9 +949,9 @@ } }, "params": { - "UseFIPS": true, + "Region": "us-isob-east-1", "UseDualStack": false, - "Region": "us-isob-east-1" + "UseFIPS": true } }, { @@ -921,22 +962,35 @@ } }, "params": { - "UseFIPS": false, + "Region": "us-isob-east-1", "UseDualStack": false, - "Region": "us-isob-east-1" + "UseFIPS": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseDualStack": false, "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseDualStack": false, - "Region": "us-east-1", + "UseFIPS": false, "Endpoint": "https://example.com" } }, @@ -946,9 +1000,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseFIPS": true, - "UseDualStack": false, "Region": "us-east-1", + "UseDualStack": false, + "UseFIPS": true, "Endpoint": "https://example.com" } }, @@ -958,9 +1012,9 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseFIPS": false, - "UseDualStack": true, "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": false, "Endpoint": "https://example.com" } } @@ -1047,6 +1101,57 @@ "smithy.api#documentation": "

The details of the relative importance of the aggregated variables.

\n

Account Takeover Insights (ATI) model uses event variables from the login data you \n provide to continuously calculate a set of variables (aggregated variables) based on historical events. For example, your ATI model might calculate the number of times an user has logged in using the same IP address. \n In this case, event variables used to derive the aggregated variables are IP address and user.

" } }, + "com.amazonaws.frauddetector#AllowDenyList": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.frauddetector#noDashIdentifier", + "traits": { + "smithy.api#documentation": "

\n The name of the list.\n

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.frauddetector#description", + "traits": { + "smithy.api#documentation": "

\n The description of the list.\n

" + } + }, + "variableType": { + "target": "com.amazonaws.frauddetector#variableType", + "traits": { + "smithy.api#documentation": "

\n The variable type of the list.\n

" + } + }, + "createdTime": { + "target": "com.amazonaws.frauddetector#time", + "traits": { + "smithy.api#documentation": "

\n The time the list was created.\n

" + } + }, + "updatedTime": { + "target": "com.amazonaws.frauddetector#time", + "traits": { + "smithy.api#documentation": "

\n The time the list was last updated.\n

" + } + }, + "arn": { + "target": "com.amazonaws.frauddetector#fraudDetectorArn", + "traits": { + "smithy.api#documentation": "

\n The ARN of the list.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The metadata of a list.\n

" + } + }, + "com.amazonaws.frauddetector#AllowDenyLists": { + "type": "list", + "member": { + "target": "com.amazonaws.frauddetector#AllowDenyList" + } + }, "com.amazonaws.frauddetector#AsyncJobStatus": { "type": "enum", "members": { @@ -1163,6 +1268,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#BatchCreateVariableResult": { @@ -1245,6 +1353,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#BatchGetVariableResult": { @@ -1502,6 +1613,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#CancelBatchImportJobResult": { @@ -1547,6 +1661,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#CancelBatchPredictionJobResult": { @@ -1642,6 +1759,9 @@ "smithy.api#documentation": "

A collection of key-value pairs associated with this request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#CreateBatchImportJobResult": { @@ -1734,6 +1854,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#CreateBatchPredictionJobResult": { @@ -1816,6 +1939,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#CreateDetectorVersionResult": { @@ -1824,23 +1950,92 @@ "detectorId": { "target": "com.amazonaws.frauddetector#identifier", "traits": { - "smithy.api#documentation": "

The ID for the created version's parent detector.

" + "smithy.api#documentation": "

The ID for the created version's parent detector.

" + } + }, + "detectorVersionId": { + "target": "com.amazonaws.frauddetector#wholeNumberVersionString", + "traits": { + "smithy.api#documentation": "

The ID for the created detector.

" + } + }, + "status": { + "target": "com.amazonaws.frauddetector#DetectorVersionStatus", + "traits": { + "smithy.api#documentation": "

The status of the detector version.

" + } + } + } + }, + "com.amazonaws.frauddetector#CreateList": { + "type": "operation", + "input": { + "target": "com.amazonaws.frauddetector#CreateListRequest" + }, + "output": { + "target": "com.amazonaws.frauddetector#CreateListResult" + }, + "errors": [ + { + "target": "com.amazonaws.frauddetector#AccessDeniedException" + }, + { + "target": "com.amazonaws.frauddetector#InternalServerException" + }, + { + "target": "com.amazonaws.frauddetector#ThrottlingException" + }, + { + "target": "com.amazonaws.frauddetector#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Creates a list. \n

\n

List is a set of input data for a variable in your event dataset. You use the input data in a rule that's associated with your detector. \n For more information, see Lists.

" + } + }, + "com.amazonaws.frauddetector#CreateListRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.frauddetector#noDashIdentifier", + "traits": { + "smithy.api#documentation": "

\n The name of the list.\n

", + "smithy.api#required": {} } }, - "detectorVersionId": { - "target": "com.amazonaws.frauddetector#wholeNumberVersionString", + "elements": { + "target": "com.amazonaws.frauddetector#ElementsList", "traits": { - "smithy.api#documentation": "

The ID for the created detector.

" + "smithy.api#documentation": "

\n The names of the elements, if providing. You can also create an empty list and add elements later using the UpdateList API.\n

" } }, - "status": { - "target": "com.amazonaws.frauddetector#DetectorVersionStatus", + "variableType": { + "target": "com.amazonaws.frauddetector#variableType", "traits": { - "smithy.api#documentation": "

The status of the detector version.

" + "smithy.api#documentation": "

\n The variable type of the list. You can only assign the variable type with String data type. For more information, see \n Variable types.\n

" + } + }, + "description": { + "target": "com.amazonaws.frauddetector#description", + "traits": { + "smithy.api#documentation": "

\n The description of the list.\n

" + } + }, + "tags": { + "target": "com.amazonaws.frauddetector#tagList", + "traits": { + "smithy.api#documentation": "

\n A collection of the key and value pairs.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, + "com.amazonaws.frauddetector#CreateListResult": { + "type": "structure", + "members": {} + }, "com.amazonaws.frauddetector#CreateModel": { "type": "operation", "input": { @@ -1903,6 +2098,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#CreateModelResult": { @@ -1987,6 +2185,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#CreateModelVersionResult": { @@ -2094,6 +2295,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#CreateRuleResult": { @@ -2182,6 +2386,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#CreateVariableResult": { @@ -2308,6 +2515,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteBatchImportJobResult": { @@ -2350,6 +2560,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteBatchPredictionJobResult": { @@ -2395,6 +2608,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteDetectorResult": { @@ -2450,6 +2666,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteDetectorVersionResult": { @@ -2495,6 +2714,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteEntityTypeResult": { @@ -2550,6 +2772,9 @@ "smithy.api#documentation": "

Specifies whether or not to delete any predictions associated with the event.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteEventResult": { @@ -2595,6 +2820,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteEventTypeResult": { @@ -2643,6 +2871,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteEventsByEventTypeResult": { @@ -2701,6 +2932,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteExternalModelResult": { @@ -2743,12 +2977,63 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteLabelResult": { "type": "structure", "members": {} }, + "com.amazonaws.frauddetector#DeleteList": { + "type": "operation", + "input": { + "target": "com.amazonaws.frauddetector#DeleteListRequest" + }, + "output": { + "target": "com.amazonaws.frauddetector#DeleteListResult" + }, + "errors": [ + { + "target": "com.amazonaws.frauddetector#AccessDeniedException" + }, + { + "target": "com.amazonaws.frauddetector#ConflictException" + }, + { + "target": "com.amazonaws.frauddetector#InternalServerException" + }, + { + "target": "com.amazonaws.frauddetector#ThrottlingException" + }, + { + "target": "com.amazonaws.frauddetector#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Deletes the list, provided it is not used in a rule.\n

\n

When you delete a list, Amazon Fraud Detector permanently deletes that list and the elements in the list.

" + } + }, + "com.amazonaws.frauddetector#DeleteListRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.frauddetector#noDashIdentifier", + "traits": { + "smithy.api#documentation": "

\n The name of the list to delete.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.frauddetector#DeleteListResult": { + "type": "structure", + "members": {} + }, "com.amazonaws.frauddetector#DeleteModel": { "type": "operation", "input": { @@ -2795,6 +3080,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteModelResult": { @@ -2854,6 +3142,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteModelVersionResult": { @@ -2899,6 +3190,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteOutcomeResult": { @@ -2943,6 +3237,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteRuleResult": { @@ -2988,6 +3285,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DeleteVariableResult": { @@ -3045,6 +3345,9 @@ "smithy.api#documentation": "

The maximum number of results to return for the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DescribeDetectorResult": { @@ -3143,6 +3446,9 @@ "smithy.api#documentation": "

The maximum number of results to return.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#DescribeModelVersionsResult": { @@ -3291,6 +3597,29 @@ } } }, + "com.amazonaws.frauddetector#Elements": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 320 + }, + "smithy.api#pattern": "^\\S+( +\\S+)*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.frauddetector#ElementsList": { + "type": "list", + "member": { + "target": "com.amazonaws.frauddetector#Elements" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100000 + } + } + }, "com.amazonaws.frauddetector#Entity": { "type": "structure", "members": { @@ -4003,6 +4332,9 @@ "smithy.api#documentation": "

The next token from the previous request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetBatchImportJobsResult": { @@ -4077,6 +4409,9 @@ "smithy.api#documentation": "

The next token from the previous request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetBatchPredictionJobsResult": { @@ -4135,6 +4470,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetDeleteEventsByEventTypeStatusResult": { @@ -4200,6 +4538,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetDetectorVersionResult": { @@ -4328,6 +4669,9 @@ "smithy.api#documentation": "

The maximum number of objects to return for the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetDetectorsResult": { @@ -4402,6 +4746,9 @@ "smithy.api#documentation": "

The maximum number of objects to return for the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetEntityTypesResult": { @@ -4552,6 +4899,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetEventPredictionMetadataResult": { @@ -4706,6 +5056,9 @@ "smithy.api#documentation": "

The Amazon SageMaker model endpoint input data blobs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetEventPredictionResult": { @@ -4748,6 +5101,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetEventResult": { @@ -4816,6 +5172,9 @@ "smithy.api#documentation": "

The maximum number of objects to return for the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetEventTypesResult": { @@ -4835,13 +5194,127 @@ } } }, - "com.amazonaws.frauddetector#GetExternalModels": { + "com.amazonaws.frauddetector#GetExternalModels": { + "type": "operation", + "input": { + "target": "com.amazonaws.frauddetector#GetExternalModelsRequest" + }, + "output": { + "target": "com.amazonaws.frauddetector#GetExternalModelsResult" + }, + "errors": [ + { + "target": "com.amazonaws.frauddetector#AccessDeniedException" + }, + { + "target": "com.amazonaws.frauddetector#InternalServerException" + }, + { + "target": "com.amazonaws.frauddetector#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.frauddetector#ThrottlingException" + }, + { + "target": "com.amazonaws.frauddetector#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the details for one or more Amazon SageMaker models that have been imported into the\n service. This is a paginated API. If you provide a null maxResults, this\n actions retrieves a maximum of 10 records per page. If you provide a\n maxResults, the value must be between 5 and 10. To get the next page\n results, provide the pagination token from the GetExternalModelsResult as part\n of your request. A null pagination token fetches the records from the beginning.

", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults" + } + } + }, + "com.amazonaws.frauddetector#GetExternalModelsRequest": { + "type": "structure", + "members": { + "modelEndpoint": { + "target": "com.amazonaws.frauddetector#string", + "traits": { + "smithy.api#documentation": "

The Amazon SageMaker model endpoint.

" + } + }, + "nextToken": { + "target": "com.amazonaws.frauddetector#string", + "traits": { + "smithy.api#documentation": "

The next page token for the request.

" + } + }, + "maxResults": { + "target": "com.amazonaws.frauddetector#ExternalModelsMaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of objects to return for the request.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.frauddetector#GetExternalModelsResult": { + "type": "structure", + "members": { + "externalModels": { + "target": "com.amazonaws.frauddetector#ExternalModelList", + "traits": { + "smithy.api#documentation": "

Gets the Amazon SageMaker models.

" + } + }, + "nextToken": { + "target": "com.amazonaws.frauddetector#string", + "traits": { + "smithy.api#documentation": "

The next page token to be used in subsequent requests.

" + } + } + } + }, + "com.amazonaws.frauddetector#GetKMSEncryptionKey": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.amazonaws.frauddetector#GetKMSEncryptionKeyResult" + }, + "errors": [ + { + "target": "com.amazonaws.frauddetector#AccessDeniedException" + }, + { + "target": "com.amazonaws.frauddetector#InternalServerException" + }, + { + "target": "com.amazonaws.frauddetector#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.frauddetector#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the encryption key if a KMS key has been specified to be used to encrypt content in Amazon Fraud Detector.

" + } + }, + "com.amazonaws.frauddetector#GetKMSEncryptionKeyResult": { + "type": "structure", + "members": { + "kmsKey": { + "target": "com.amazonaws.frauddetector#KMSKey", + "traits": { + "smithy.api#documentation": "

The KMS encryption key.

" + } + } + } + }, + "com.amazonaws.frauddetector#GetLabels": { "type": "operation", "input": { - "target": "com.amazonaws.frauddetector#GetExternalModelsRequest" + "target": "com.amazonaws.frauddetector#GetLabelsRequest" }, "output": { - "target": "com.amazonaws.frauddetector#GetExternalModelsResult" + "target": "com.amazonaws.frauddetector#GetLabelsResult" }, "errors": [ { @@ -4861,7 +5334,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the details for one or more Amazon SageMaker models that have been imported into the\n service. This is a paginated API. If you provide a null maxResults, this\n actions retrieves a maximum of 10 records per page. If you provide a\n maxResults, the value must be between 5 and 10. To get the next page\n results, provide the pagination token from the GetExternalModelsResult as part\n of your request. A null pagination token fetches the records from the beginning.

", + "smithy.api#documentation": "

Gets all labels or a specific label if name is provided. This is a paginated API. If you\n provide a null maxResults, this action retrieves a maximum of 50 records\n per page. If you provide a maxResults, the value must be between 10 and 50.\n To get the next page results, provide the pagination token from the\n GetGetLabelsResponse as part of your request. A null pagination token\n fetches the records from the beginning.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4869,53 +5342,56 @@ } } }, - "com.amazonaws.frauddetector#GetExternalModelsRequest": { + "com.amazonaws.frauddetector#GetLabelsRequest": { "type": "structure", "members": { - "modelEndpoint": { - "target": "com.amazonaws.frauddetector#string", + "name": { + "target": "com.amazonaws.frauddetector#identifier", "traits": { - "smithy.api#documentation": "

The Amazon SageMaker model endpoint.

" + "smithy.api#documentation": "

The name of the label or labels to get.

" } }, "nextToken": { "target": "com.amazonaws.frauddetector#string", "traits": { - "smithy.api#documentation": "

The next page token for the request.

" + "smithy.api#documentation": "

The next token for the subsequent request.

" } }, "maxResults": { - "target": "com.amazonaws.frauddetector#ExternalModelsMaxResults", + "target": "com.amazonaws.frauddetector#labelsMaxResults", "traits": { "smithy.api#documentation": "

The maximum number of objects to return for the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, - "com.amazonaws.frauddetector#GetExternalModelsResult": { + "com.amazonaws.frauddetector#GetLabelsResult": { "type": "structure", "members": { - "externalModels": { - "target": "com.amazonaws.frauddetector#ExternalModelList", + "labels": { + "target": "com.amazonaws.frauddetector#labelList", "traits": { - "smithy.api#documentation": "

Gets the Amazon SageMaker models.

" + "smithy.api#documentation": "

An array of labels.

" } }, "nextToken": { "target": "com.amazonaws.frauddetector#string", "traits": { - "smithy.api#documentation": "

The next page token to be used in subsequent requests.

" + "smithy.api#documentation": "

The next page token.

" } } } }, - "com.amazonaws.frauddetector#GetKMSEncryptionKey": { + "com.amazonaws.frauddetector#GetListElements": { "type": "operation", "input": { - "target": "smithy.api#Unit" + "target": "com.amazonaws.frauddetector#GetListElementsRequest" }, "output": { - "target": "com.amazonaws.frauddetector#GetKMSEncryptionKeyResult" + "target": "com.amazonaws.frauddetector#GetListElementsResult" }, "errors": [ { @@ -4929,30 +5405,71 @@ }, { "target": "com.amazonaws.frauddetector#ThrottlingException" + }, + { + "target": "com.amazonaws.frauddetector#ValidationException" } ], "traits": { - "smithy.api#documentation": "

Gets the encryption key if a KMS key has been specified to be used to encrypt content in Amazon Fraud Detector.

" + "smithy.api#documentation": "

\n Gets all the elements in the specified list.\n

", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults" + } } }, - "com.amazonaws.frauddetector#GetKMSEncryptionKeyResult": { + "com.amazonaws.frauddetector#GetListElementsRequest": { "type": "structure", "members": { - "kmsKey": { - "target": "com.amazonaws.frauddetector#KMSKey", + "name": { + "target": "com.amazonaws.frauddetector#noDashIdentifier", "traits": { - "smithy.api#documentation": "

The KMS encryption key.

" + "smithy.api#documentation": "

\n The name of the list.\n

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.frauddetector#nextToken", + "traits": { + "smithy.api#documentation": "

\n The next token for the subsequent request.\n

" + } + }, + "maxResults": { + "target": "com.amazonaws.frauddetector#ListsElementsMaxResults", + "traits": { + "smithy.api#documentation": "

\n The maximum number of objects to return for the request.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, - "com.amazonaws.frauddetector#GetLabels": { + "com.amazonaws.frauddetector#GetListElementsResult": { + "type": "structure", + "members": { + "elements": { + "target": "com.amazonaws.frauddetector#ElementsList", + "traits": { + "smithy.api#documentation": "

\n The list elements.\n

" + } + }, + "nextToken": { + "target": "com.amazonaws.frauddetector#nextToken", + "traits": { + "smithy.api#documentation": "

\n The next page token.\n

" + } + } + } + }, + "com.amazonaws.frauddetector#GetListsMetadata": { "type": "operation", "input": { - "target": "com.amazonaws.frauddetector#GetLabelsRequest" + "target": "com.amazonaws.frauddetector#GetListsMetadataRequest" }, "output": { - "target": "com.amazonaws.frauddetector#GetLabelsResult" + "target": "com.amazonaws.frauddetector#GetListsMetadataResult" }, "errors": [ { @@ -4972,7 +5489,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets all labels or a specific label if name is provided. This is a paginated API. If you\n provide a null maxResults, this action retrieves a maximum of 50 records\n per page. If you provide a maxResults, the value must be between 10 and 50.\n To get the next page results, provide the pagination token from the\n GetGetLabelsResponse as part of your request. A null pagination token\n fetches the records from the beginning.

", + "smithy.api#documentation": "

\n Gets the metadata of either all the lists under the account or the specified list. \n

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4980,42 +5497,45 @@ } } }, - "com.amazonaws.frauddetector#GetLabelsRequest": { + "com.amazonaws.frauddetector#GetListsMetadataRequest": { "type": "structure", "members": { "name": { - "target": "com.amazonaws.frauddetector#identifier", + "target": "com.amazonaws.frauddetector#noDashIdentifier", "traits": { - "smithy.api#documentation": "

The name of the label or labels to get.

" + "smithy.api#documentation": "

\n The name of the list.\n

" } }, "nextToken": { - "target": "com.amazonaws.frauddetector#string", + "target": "com.amazonaws.frauddetector#nextToken", "traits": { - "smithy.api#documentation": "

The next token for the subsequent request.

" + "smithy.api#documentation": "

\n The next token for the subsequent request.\n

" } }, "maxResults": { - "target": "com.amazonaws.frauddetector#labelsMaxResults", + "target": "com.amazonaws.frauddetector#ListsMetadataMaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of objects to return for the request.

" + "smithy.api#documentation": "

\n The maximum number of objects to return for the request.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, - "com.amazonaws.frauddetector#GetLabelsResult": { + "com.amazonaws.frauddetector#GetListsMetadataResult": { "type": "structure", "members": { - "labels": { - "target": "com.amazonaws.frauddetector#labelList", + "lists": { + "target": "com.amazonaws.frauddetector#AllowDenyLists", "traits": { - "smithy.api#documentation": "

An array of labels.

" + "smithy.api#documentation": "

\n The metadata of the specified list or all lists under the account.\n

" } }, "nextToken": { - "target": "com.amazonaws.frauddetector#string", + "target": "com.amazonaws.frauddetector#nextToken", "traits": { - "smithy.api#documentation": "

The next page token.

" + "smithy.api#documentation": "

\n The next page token.\n

" } } } @@ -5073,6 +5593,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetModelVersionResult": { @@ -5195,6 +5718,9 @@ "smithy.api#documentation": "

The maximum number of objects to return for the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetModelsResult": { @@ -5269,6 +5795,9 @@ "smithy.api#documentation": "

The maximum number of objects to return for the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetOutcomesResult": { @@ -5356,6 +5885,9 @@ "smithy.api#documentation": "

The maximum number of rules to return for the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetRulesResult": { @@ -5430,6 +5962,9 @@ "smithy.api#documentation": "

The max size per page determined for the get variable request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#GetVariablesResult": { @@ -5727,6 +6262,9 @@ "smithy.api#documentation": "

\nThe maximum number of predictions to return for the request.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#ListEventPredictionsResult": { @@ -5877,6 +6415,9 @@ "smithy.api#documentation": "

The maximum number of objects to return for the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#ListTagsForResourceResult": { @@ -5896,6 +6437,47 @@ } } }, + "com.amazonaws.frauddetector#ListUpdateMode": { + "type": "enum", + "members": { + "REPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLACE" + } + }, + "APPEND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPEND" + } + }, + "REMOVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REMOVE" + } + } + } + }, + "com.amazonaws.frauddetector#ListsElementsMaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 500, + "max": 5000 + } + } + }, + "com.amazonaws.frauddetector#ListsMetadataMaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 5, + "max": 50 + } + } + }, "com.amazonaws.frauddetector#LogOddsMetric": { "type": "structure", "members": { @@ -6646,6 +7228,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#PutDetectorResult": { @@ -6703,6 +7288,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#PutEntityTypeResult": { @@ -6786,6 +7374,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#PutEventTypeResult": { @@ -6872,6 +7463,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#PutExternalModelResult": { @@ -6920,6 +7514,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#PutKMSEncryptionKeyResult": { @@ -6977,6 +7574,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#PutLabelResult": { @@ -7034,6 +7634,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#PutOutcomeResult": { @@ -7306,6 +7909,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#SendEventResult": { @@ -7455,6 +8061,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#TagResourceResult": { @@ -7713,6 +8322,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UntagResourceResult": { @@ -7804,6 +8416,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateDetectorVersionMetadataResult": { @@ -7859,6 +8474,9 @@ "smithy.api#documentation": "

The rule execution mode to add to the detector.

\n

If you specify FIRST_MATCHED, Amazon Fraud Detector evaluates rules sequentially, first to last, stopping at the first matched rule. Amazon Fraud dectector then provides the outcomes for that single rule.

\n

If you specifiy ALL_MATCHED, Amazon Fraud Detector evaluates all rules and returns the outcomes for all matched rules. You can define and edit the rule mode at the detector version level, when it is in draft status.

\n

The default behavior is FIRST_MATCHED.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateDetectorVersionResult": { @@ -7921,6 +8539,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateDetectorVersionStatusResult": { @@ -7990,12 +8611,90 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateEventLabelResult": { "type": "structure", "members": {} }, + "com.amazonaws.frauddetector#UpdateList": { + "type": "operation", + "input": { + "target": "com.amazonaws.frauddetector#UpdateListRequest" + }, + "output": { + "target": "com.amazonaws.frauddetector#UpdateListResult" + }, + "errors": [ + { + "target": "com.amazonaws.frauddetector#AccessDeniedException" + }, + { + "target": "com.amazonaws.frauddetector#ConflictException" + }, + { + "target": "com.amazonaws.frauddetector#InternalServerException" + }, + { + "target": "com.amazonaws.frauddetector#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.frauddetector#ThrottlingException" + }, + { + "target": "com.amazonaws.frauddetector#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Updates a list.\n

" + } + }, + "com.amazonaws.frauddetector#UpdateListRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.frauddetector#noDashIdentifier", + "traits": { + "smithy.api#documentation": "

\n The name of the list to update.\n

", + "smithy.api#required": {} + } + }, + "elements": { + "target": "com.amazonaws.frauddetector#ElementsList", + "traits": { + "smithy.api#documentation": "

\n One or more list elements to add or replace. If you are providing the elements, make sure to specify the updateMode to use.\n

\n

If you are deleting all elements from the list, use REPLACE for the updateMode and provide an empty list (0 elements).

" + } + }, + "description": { + "target": "com.amazonaws.frauddetector#description", + "traits": { + "smithy.api#documentation": "

\n The new description.\n

" + } + }, + "updateMode": { + "target": "com.amazonaws.frauddetector#ListUpdateMode", + "traits": { + "smithy.api#documentation": "

\n The update mode (type).\n

\n
    \n
  • \n

    Use APPEND if you are adding elements to the list.

    \n
  • \n
  • \n

    Use REPLACE if you replacing existing elements in the list.

    \n
  • \n
  • \n

    Use REMOVE if you are removing elements from the list.

    \n
  • \n
" + } + }, + "variableType": { + "target": "com.amazonaws.frauddetector#variableType", + "traits": { + "smithy.api#documentation": "

\n The variable type you want to assign to the list.\n

\n \n

You cannot update a variable type of a list that already has a variable type assigned to it. You can assign a variable type to a list only if the list does not already have a variable type.

\n
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.frauddetector#UpdateListResult": { + "type": "structure", + "members": {} + }, "com.amazonaws.frauddetector#UpdateModel": { "type": "operation", "input": { @@ -8051,6 +8750,9 @@ "smithy.api#documentation": "

The new model description.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateModelResult": { @@ -8131,6 +8833,9 @@ "smithy.api#documentation": "

A collection of key and value pairs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateModelVersionResult": { @@ -8225,6 +8930,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateModelVersionStatusResult": { @@ -8280,6 +8988,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateRuleMetadataResult": { @@ -8361,6 +9072,9 @@ "smithy.api#documentation": "

The tags to assign to the rule version.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateRuleVersionResult": { @@ -8434,6 +9148,9 @@ "smithy.api#documentation": "

The variable type. For more information see Variable types.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.frauddetector#UpdateVariableResult": { @@ -8877,6 +9594,26 @@ } } }, + "com.amazonaws.frauddetector#nextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 8192 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.frauddetector#noDashIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[0-9a-z_]+$" + } + }, "com.amazonaws.frauddetector#ruleExpression": { "type": "string", "traits": { @@ -8986,6 +9723,16 @@ } } }, + "com.amazonaws.frauddetector#variableType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^[A-Z_]{1,64}$" + } + }, "com.amazonaws.frauddetector#variableValue": { "type": "string", "traits": {