From 526302260790ff22397663382fe49e81150d91dc Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 7 Jun 2023 18:52:02 +0000 Subject: [PATCH] feat(client-customer-profiles): This release introduces event stream related APIs. --- clients/client-customer-profiles/README.md | 32 ++ .../src/CustomerProfiles.ts | 89 +++ .../src/CustomerProfilesClient.ts | 12 + .../src/commands/CreateEventStreamCommand.ts | 168 ++++++ .../src/commands/DeleteEventStreamCommand.ts | 156 ++++++ .../src/commands/GetEventStreamCommand.ts | 171 ++++++ .../src/commands/ListEventStreamsCommand.ts | 176 ++++++ .../src/commands/index.ts | 4 + clients/client-customer-profiles/src/index.ts | 1 + .../src/models/models_0.ts | 270 +++++++++ .../src/pagination/Interfaces.ts | 11 + .../pagination/ListEventStreamsPaginator.ts | 50 ++ .../src/pagination/index.ts | 3 + .../src/protocols/Aws_restJson1.ts | 433 ++++++++++++++ .../aws-models/customer-profiles.json | 529 ++++++++++++++++++ 15 files changed, 2105 insertions(+) create mode 100644 clients/client-customer-profiles/src/commands/CreateEventStreamCommand.ts create mode 100644 clients/client-customer-profiles/src/commands/DeleteEventStreamCommand.ts create mode 100644 clients/client-customer-profiles/src/commands/GetEventStreamCommand.ts create mode 100644 clients/client-customer-profiles/src/commands/ListEventStreamsCommand.ts create mode 100644 clients/client-customer-profiles/src/pagination/Interfaces.ts create mode 100644 clients/client-customer-profiles/src/pagination/ListEventStreamsPaginator.ts create mode 100644 clients/client-customer-profiles/src/pagination/index.ts diff --git a/clients/client-customer-profiles/README.md b/clients/client-customer-profiles/README.md index 995eb07523683..9247e57b55d4f 100644 --- a/clients/client-customer-profiles/README.md +++ b/clients/client-customer-profiles/README.md @@ -232,6 +232,14 @@ CreateDomain [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/classes/createdomaincommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/createdomaincommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/createdomaincommandoutput.html) + +
+ +CreateEventStream + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/classes/createeventstreamcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/createeventstreamcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/createeventstreamcommandoutput.html) +
@@ -264,6 +272,14 @@ DeleteDomain [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/classes/deletedomaincommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/deletedomaincommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/deletedomaincommandoutput.html) +
+
+ +DeleteEventStream + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/classes/deleteeventstreamcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/deleteeventstreamcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/deleteeventstreamcommandoutput.html) +
@@ -344,6 +360,14 @@ GetDomain [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/classes/getdomaincommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/getdomaincommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/getdomaincommandoutput.html) +
+
+ +GetEventStream + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/classes/geteventstreamcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/geteventstreamcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/geteventstreamcommandoutput.html) +
@@ -432,6 +456,14 @@ ListDomains [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/classes/listdomainscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/listdomainscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/listdomainscommandoutput.html) +
+
+ +ListEventStreams + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/classes/listeventstreamscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/listeventstreamscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-customer-profiles/interfaces/listeventstreamscommandoutput.html) +
diff --git a/clients/client-customer-profiles/src/CustomerProfiles.ts b/clients/client-customer-profiles/src/CustomerProfiles.ts index e72a7c91bfa26..c0a9341732f9a 100644 --- a/clients/client-customer-profiles/src/CustomerProfiles.ts +++ b/clients/client-customer-profiles/src/CustomerProfiles.ts @@ -17,6 +17,11 @@ import { CreateDomainCommandInput, CreateDomainCommandOutput, } from "./commands/CreateDomainCommand"; +import { + CreateEventStreamCommand, + CreateEventStreamCommandInput, + CreateEventStreamCommandOutput, +} from "./commands/CreateEventStreamCommand"; import { CreateIntegrationWorkflowCommand, CreateIntegrationWorkflowCommandInput, @@ -37,6 +42,11 @@ import { DeleteDomainCommandInput, DeleteDomainCommandOutput, } from "./commands/DeleteDomainCommand"; +import { + DeleteEventStreamCommand, + DeleteEventStreamCommandInput, + DeleteEventStreamCommandOutput, +} from "./commands/DeleteEventStreamCommand"; import { DeleteIntegrationCommand, DeleteIntegrationCommandInput, @@ -83,6 +93,11 @@ import { GetCalculatedAttributeForProfileCommandOutput, } from "./commands/GetCalculatedAttributeForProfileCommand"; import { GetDomainCommand, GetDomainCommandInput, GetDomainCommandOutput } from "./commands/GetDomainCommand"; +import { + GetEventStreamCommand, + GetEventStreamCommandInput, + GetEventStreamCommandOutput, +} from "./commands/GetEventStreamCommand"; import { GetIdentityResolutionJobCommand, GetIdentityResolutionJobCommandInput, @@ -126,6 +141,11 @@ import { ListCalculatedAttributesForProfileCommandOutput, } from "./commands/ListCalculatedAttributesForProfileCommand"; import { ListDomainsCommand, ListDomainsCommandInput, ListDomainsCommandOutput } from "./commands/ListDomainsCommand"; +import { + ListEventStreamsCommand, + ListEventStreamsCommandInput, + ListEventStreamsCommandOutput, +} from "./commands/ListEventStreamsCommand"; import { ListIdentityResolutionJobsCommand, ListIdentityResolutionJobsCommandInput, @@ -213,10 +233,12 @@ const commands = { AddProfileKeyCommand, CreateCalculatedAttributeDefinitionCommand, CreateDomainCommand, + CreateEventStreamCommand, CreateIntegrationWorkflowCommand, CreateProfileCommand, DeleteCalculatedAttributeDefinitionCommand, DeleteDomainCommand, + DeleteEventStreamCommand, DeleteIntegrationCommand, DeleteProfileCommand, DeleteProfileKeyCommand, @@ -227,6 +249,7 @@ const commands = { GetCalculatedAttributeDefinitionCommand, GetCalculatedAttributeForProfileCommand, GetDomainCommand, + GetEventStreamCommand, GetIdentityResolutionJobCommand, GetIntegrationCommand, GetMatchesCommand, @@ -238,6 +261,7 @@ const commands = { ListCalculatedAttributeDefinitionsCommand, ListCalculatedAttributesForProfileCommand, ListDomainsCommand, + ListEventStreamsCommand, ListIdentityResolutionJobsCommand, ListIntegrationsCommand, ListProfileObjectsCommand, @@ -297,6 +321,23 @@ export interface CustomerProfiles { cb: (err: any, data?: CreateDomainCommandOutput) => void ): void; + /** + * @see {@link CreateEventStreamCommand} + */ + createEventStream( + args: CreateEventStreamCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createEventStream( + args: CreateEventStreamCommandInput, + cb: (err: any, data?: CreateEventStreamCommandOutput) => void + ): void; + createEventStream( + args: CreateEventStreamCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateEventStreamCommandOutput) => void + ): void; + /** * @see {@link CreateIntegrationWorkflowCommand} */ @@ -353,6 +394,23 @@ export interface CustomerProfiles { cb: (err: any, data?: DeleteDomainCommandOutput) => void ): void; + /** + * @see {@link DeleteEventStreamCommand} + */ + deleteEventStream( + args: DeleteEventStreamCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteEventStream( + args: DeleteEventStreamCommandInput, + cb: (err: any, data?: DeleteEventStreamCommandOutput) => void + ): void; + deleteEventStream( + args: DeleteEventStreamCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteEventStreamCommandOutput) => void + ): void; + /** * @see {@link DeleteIntegrationCommand} */ @@ -508,6 +566,20 @@ export interface CustomerProfiles { cb: (err: any, data?: GetDomainCommandOutput) => void ): void; + /** + * @see {@link GetEventStreamCommand} + */ + getEventStream( + args: GetEventStreamCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getEventStream(args: GetEventStreamCommandInput, cb: (err: any, data?: GetEventStreamCommandOutput) => void): void; + getEventStream( + args: GetEventStreamCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetEventStreamCommandOutput) => void + ): void; + /** * @see {@link GetIdentityResolutionJobCommand} */ @@ -674,6 +746,23 @@ export interface CustomerProfiles { cb: (err: any, data?: ListDomainsCommandOutput) => void ): void; + /** + * @see {@link ListEventStreamsCommand} + */ + listEventStreams( + args: ListEventStreamsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listEventStreams( + args: ListEventStreamsCommandInput, + cb: (err: any, data?: ListEventStreamsCommandOutput) => void + ): void; + listEventStreams( + args: ListEventStreamsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListEventStreamsCommandOutput) => void + ): void; + /** * @see {@link ListIdentityResolutionJobsCommand} */ diff --git a/clients/client-customer-profiles/src/CustomerProfilesClient.ts b/clients/client-customer-profiles/src/CustomerProfilesClient.ts index f23cb093e86e9..801938f6b932b 100644 --- a/clients/client-customer-profiles/src/CustomerProfilesClient.ts +++ b/clients/client-customer-profiles/src/CustomerProfilesClient.ts @@ -57,6 +57,7 @@ import { CreateCalculatedAttributeDefinitionCommandOutput, } from "./commands/CreateCalculatedAttributeDefinitionCommand"; import { CreateDomainCommandInput, CreateDomainCommandOutput } from "./commands/CreateDomainCommand"; +import { CreateEventStreamCommandInput, CreateEventStreamCommandOutput } from "./commands/CreateEventStreamCommand"; import { CreateIntegrationWorkflowCommandInput, CreateIntegrationWorkflowCommandOutput, @@ -67,6 +68,7 @@ import { DeleteCalculatedAttributeDefinitionCommandOutput, } from "./commands/DeleteCalculatedAttributeDefinitionCommand"; import { DeleteDomainCommandInput, DeleteDomainCommandOutput } from "./commands/DeleteDomainCommand"; +import { DeleteEventStreamCommandInput, DeleteEventStreamCommandOutput } from "./commands/DeleteEventStreamCommand"; import { DeleteIntegrationCommandInput, DeleteIntegrationCommandOutput } from "./commands/DeleteIntegrationCommand"; import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "./commands/DeleteProfileCommand"; import { DeleteProfileKeyCommandInput, DeleteProfileKeyCommandOutput } from "./commands/DeleteProfileKeyCommand"; @@ -92,6 +94,7 @@ import { GetCalculatedAttributeForProfileCommandOutput, } from "./commands/GetCalculatedAttributeForProfileCommand"; import { GetDomainCommandInput, GetDomainCommandOutput } from "./commands/GetDomainCommand"; +import { GetEventStreamCommandInput, GetEventStreamCommandOutput } from "./commands/GetEventStreamCommand"; import { GetIdentityResolutionJobCommandInput, GetIdentityResolutionJobCommandOutput, @@ -121,6 +124,7 @@ import { ListCalculatedAttributesForProfileCommandOutput, } from "./commands/ListCalculatedAttributesForProfileCommand"; import { ListDomainsCommandInput, ListDomainsCommandOutput } from "./commands/ListDomainsCommand"; +import { ListEventStreamsCommandInput, ListEventStreamsCommandOutput } from "./commands/ListEventStreamsCommand"; import { ListIdentityResolutionJobsCommandInput, ListIdentityResolutionJobsCommandOutput, @@ -173,10 +177,12 @@ export type ServiceInputTypes = | AddProfileKeyCommandInput | CreateCalculatedAttributeDefinitionCommandInput | CreateDomainCommandInput + | CreateEventStreamCommandInput | CreateIntegrationWorkflowCommandInput | CreateProfileCommandInput | DeleteCalculatedAttributeDefinitionCommandInput | DeleteDomainCommandInput + | DeleteEventStreamCommandInput | DeleteIntegrationCommandInput | DeleteProfileCommandInput | DeleteProfileKeyCommandInput @@ -187,6 +193,7 @@ export type ServiceInputTypes = | GetCalculatedAttributeDefinitionCommandInput | GetCalculatedAttributeForProfileCommandInput | GetDomainCommandInput + | GetEventStreamCommandInput | GetIdentityResolutionJobCommandInput | GetIntegrationCommandInput | GetMatchesCommandInput @@ -198,6 +205,7 @@ export type ServiceInputTypes = | ListCalculatedAttributeDefinitionsCommandInput | ListCalculatedAttributesForProfileCommandInput | ListDomainsCommandInput + | ListEventStreamsCommandInput | ListIdentityResolutionJobsCommandInput | ListIntegrationsCommandInput | ListProfileObjectTypeTemplatesCommandInput @@ -223,10 +231,12 @@ export type ServiceOutputTypes = | AddProfileKeyCommandOutput | CreateCalculatedAttributeDefinitionCommandOutput | CreateDomainCommandOutput + | CreateEventStreamCommandOutput | CreateIntegrationWorkflowCommandOutput | CreateProfileCommandOutput | DeleteCalculatedAttributeDefinitionCommandOutput | DeleteDomainCommandOutput + | DeleteEventStreamCommandOutput | DeleteIntegrationCommandOutput | DeleteProfileCommandOutput | DeleteProfileKeyCommandOutput @@ -237,6 +247,7 @@ export type ServiceOutputTypes = | GetCalculatedAttributeDefinitionCommandOutput | GetCalculatedAttributeForProfileCommandOutput | GetDomainCommandOutput + | GetEventStreamCommandOutput | GetIdentityResolutionJobCommandOutput | GetIntegrationCommandOutput | GetMatchesCommandOutput @@ -248,6 +259,7 @@ export type ServiceOutputTypes = | ListCalculatedAttributeDefinitionsCommandOutput | ListCalculatedAttributesForProfileCommandOutput | ListDomainsCommandOutput + | ListEventStreamsCommandOutput | ListIdentityResolutionJobsCommandOutput | ListIntegrationsCommandOutput | ListProfileObjectTypeTemplatesCommandOutput diff --git a/clients/client-customer-profiles/src/commands/CreateEventStreamCommand.ts b/clients/client-customer-profiles/src/commands/CreateEventStreamCommand.ts new file mode 100644 index 0000000000000..739f87164d139 --- /dev/null +++ b/clients/client-customer-profiles/src/commands/CreateEventStreamCommand.ts @@ -0,0 +1,168 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { CustomerProfilesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CustomerProfilesClient"; +import { CreateEventStreamRequest, CreateEventStreamResponse } from "../models/models_0"; +import { de_CreateEventStreamCommand, se_CreateEventStreamCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateEventStreamCommand}. + */ +export interface CreateEventStreamCommandInput extends CreateEventStreamRequest {} +/** + * @public + * + * The output of {@link CreateEventStreamCommand}. + */ +export interface CreateEventStreamCommandOutput extends CreateEventStreamResponse, __MetadataBearer {} + +/** + * @public + *

Creates an event stream, which is a subscription to real-time events, such as when profiles are created and + * updated through Amazon Connect Customer Profiles.

+ *

Each event stream can be associated with only one Kinesis Data Stream destination in the same region and + * Amazon Web Services account as the customer profiles domain

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CustomerProfilesClient, CreateEventStreamCommand } from "@aws-sdk/client-customer-profiles"; // ES Modules import + * // const { CustomerProfilesClient, CreateEventStreamCommand } = require("@aws-sdk/client-customer-profiles"); // CommonJS import + * const client = new CustomerProfilesClient(config); + * const input = { // CreateEventStreamRequest + * DomainName: "STRING_VALUE", // required + * Uri: "STRING_VALUE", // required + * EventStreamName: "STRING_VALUE", // required + * Tags: { // TagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateEventStreamCommand(input); + * const response = await client.send(command); + * // { // CreateEventStreamResponse + * // EventStreamArn: "STRING_VALUE", // required + * // Tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param CreateEventStreamCommandInput - {@link CreateEventStreamCommandInput} + * @returns {@link CreateEventStreamCommandOutput} + * @see {@link CreateEventStreamCommandInput} for command's `input` shape. + * @see {@link CreateEventStreamCommandOutput} for command's `response` shape. + * @see {@link CustomerProfilesClientResolvedConfig | config} for CustomerProfilesClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link BadRequestException} (client fault) + *

The input you provided is invalid.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal service error occurred.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource does not exist, or access was denied.

+ * + * @throws {@link ThrottlingException} (client fault) + *

You exceeded the maximum number of requests.

+ * + * @throws {@link CustomerProfilesServiceException} + *

Base exception class for all service exceptions from CustomerProfiles service.

+ * + */ +export class CreateEventStreamCommand extends $Command< + CreateEventStreamCommandInput, + CreateEventStreamCommandOutput, + CustomerProfilesClientResolvedConfig +> { + // 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" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateEventStreamCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CustomerProfilesClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreateEventStreamCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CustomerProfilesClient"; + const commandName = "CreateEventStreamCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateEventStreamCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateEventStreamCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateEventStreamCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-customer-profiles/src/commands/DeleteEventStreamCommand.ts b/clients/client-customer-profiles/src/commands/DeleteEventStreamCommand.ts new file mode 100644 index 0000000000000..a53f20fd0389b --- /dev/null +++ b/clients/client-customer-profiles/src/commands/DeleteEventStreamCommand.ts @@ -0,0 +1,156 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { CustomerProfilesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CustomerProfilesClient"; +import { DeleteEventStreamRequest, DeleteEventStreamResponse } from "../models/models_0"; +import { de_DeleteEventStreamCommand, se_DeleteEventStreamCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteEventStreamCommand}. + */ +export interface DeleteEventStreamCommandInput extends DeleteEventStreamRequest {} +/** + * @public + * + * The output of {@link DeleteEventStreamCommand}. + */ +export interface DeleteEventStreamCommandOutput extends DeleteEventStreamResponse, __MetadataBearer {} + +/** + * @public + *

Disables and deletes the specified event stream.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CustomerProfilesClient, DeleteEventStreamCommand } from "@aws-sdk/client-customer-profiles"; // ES Modules import + * // const { CustomerProfilesClient, DeleteEventStreamCommand } = require("@aws-sdk/client-customer-profiles"); // CommonJS import + * const client = new CustomerProfilesClient(config); + * const input = { // DeleteEventStreamRequest + * DomainName: "STRING_VALUE", // required + * EventStreamName: "STRING_VALUE", // required + * }; + * const command = new DeleteEventStreamCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteEventStreamCommandInput - {@link DeleteEventStreamCommandInput} + * @returns {@link DeleteEventStreamCommandOutput} + * @see {@link DeleteEventStreamCommandInput} for command's `input` shape. + * @see {@link DeleteEventStreamCommandOutput} for command's `response` shape. + * @see {@link CustomerProfilesClientResolvedConfig | config} for CustomerProfilesClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link BadRequestException} (client fault) + *

The input you provided is invalid.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal service error occurred.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource does not exist, or access was denied.

+ * + * @throws {@link ThrottlingException} (client fault) + *

You exceeded the maximum number of requests.

+ * + * @throws {@link CustomerProfilesServiceException} + *

Base exception class for all service exceptions from CustomerProfiles service.

+ * + */ +export class DeleteEventStreamCommand extends $Command< + DeleteEventStreamCommandInput, + DeleteEventStreamCommandOutput, + CustomerProfilesClientResolvedConfig +> { + // 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" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteEventStreamCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CustomerProfilesClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeleteEventStreamCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CustomerProfilesClient"; + const commandName = "DeleteEventStreamCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteEventStreamCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteEventStreamCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteEventStreamCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-customer-profiles/src/commands/GetEventStreamCommand.ts b/clients/client-customer-profiles/src/commands/GetEventStreamCommand.ts new file mode 100644 index 0000000000000..3b2ee3c7784cd --- /dev/null +++ b/clients/client-customer-profiles/src/commands/GetEventStreamCommand.ts @@ -0,0 +1,171 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { CustomerProfilesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CustomerProfilesClient"; +import { GetEventStreamRequest, GetEventStreamResponse } from "../models/models_0"; +import { de_GetEventStreamCommand, se_GetEventStreamCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetEventStreamCommand}. + */ +export interface GetEventStreamCommandInput extends GetEventStreamRequest {} +/** + * @public + * + * The output of {@link GetEventStreamCommand}. + */ +export interface GetEventStreamCommandOutput extends GetEventStreamResponse, __MetadataBearer {} + +/** + * @public + *

Returns information about the specified event stream in a specific domain.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CustomerProfilesClient, GetEventStreamCommand } from "@aws-sdk/client-customer-profiles"; // ES Modules import + * // const { CustomerProfilesClient, GetEventStreamCommand } = require("@aws-sdk/client-customer-profiles"); // CommonJS import + * const client = new CustomerProfilesClient(config); + * const input = { // GetEventStreamRequest + * DomainName: "STRING_VALUE", // required + * EventStreamName: "STRING_VALUE", // required + * }; + * const command = new GetEventStreamCommand(input); + * const response = await client.send(command); + * // { // GetEventStreamResponse + * // DomainName: "STRING_VALUE", // required + * // EventStreamArn: "STRING_VALUE", // required + * // CreatedAt: new Date("TIMESTAMP"), // required + * // State: "RUNNING" || "STOPPED", // required + * // StoppedSince: new Date("TIMESTAMP"), + * // DestinationDetails: { // EventStreamDestinationDetails + * // Uri: "STRING_VALUE", // required + * // Status: "HEALTHY" || "UNHEALTHY", // required + * // UnhealthySince: new Date("TIMESTAMP"), + * // Message: "STRING_VALUE", + * // }, + * // Tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param GetEventStreamCommandInput - {@link GetEventStreamCommandInput} + * @returns {@link GetEventStreamCommandOutput} + * @see {@link GetEventStreamCommandInput} for command's `input` shape. + * @see {@link GetEventStreamCommandOutput} for command's `response` shape. + * @see {@link CustomerProfilesClientResolvedConfig | config} for CustomerProfilesClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link BadRequestException} (client fault) + *

The input you provided is invalid.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal service error occurred.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource does not exist, or access was denied.

+ * + * @throws {@link ThrottlingException} (client fault) + *

You exceeded the maximum number of requests.

+ * + * @throws {@link CustomerProfilesServiceException} + *

Base exception class for all service exceptions from CustomerProfiles service.

+ * + */ +export class GetEventStreamCommand extends $Command< + GetEventStreamCommandInput, + GetEventStreamCommandOutput, + CustomerProfilesClientResolvedConfig +> { + // 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" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetEventStreamCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CustomerProfilesClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetEventStreamCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CustomerProfilesClient"; + const commandName = "GetEventStreamCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetEventStreamCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetEventStreamCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_GetEventStreamCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-customer-profiles/src/commands/ListEventStreamsCommand.ts b/clients/client-customer-profiles/src/commands/ListEventStreamsCommand.ts new file mode 100644 index 0000000000000..cf29da782f8f9 --- /dev/null +++ b/clients/client-customer-profiles/src/commands/ListEventStreamsCommand.ts @@ -0,0 +1,176 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { CustomerProfilesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CustomerProfilesClient"; +import { ListEventStreamsRequest, ListEventStreamsResponse } from "../models/models_0"; +import { de_ListEventStreamsCommand, se_ListEventStreamsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListEventStreamsCommand}. + */ +export interface ListEventStreamsCommandInput extends ListEventStreamsRequest {} +/** + * @public + * + * The output of {@link ListEventStreamsCommand}. + */ +export interface ListEventStreamsCommandOutput extends ListEventStreamsResponse, __MetadataBearer {} + +/** + * @public + *

Returns a list of all the event streams in a specific domain.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CustomerProfilesClient, ListEventStreamsCommand } from "@aws-sdk/client-customer-profiles"; // ES Modules import + * // const { CustomerProfilesClient, ListEventStreamsCommand } = require("@aws-sdk/client-customer-profiles"); // CommonJS import + * const client = new CustomerProfilesClient(config); + * const input = { // ListEventStreamsRequest + * DomainName: "STRING_VALUE", // required + * NextToken: "STRING_VALUE", + * MaxResults: Number("int"), + * }; + * const command = new ListEventStreamsCommand(input); + * const response = await client.send(command); + * // { // ListEventStreamsResponse + * // Items: [ // EventStreamSummaryList + * // { // EventStreamSummary + * // DomainName: "STRING_VALUE", // required + * // EventStreamName: "STRING_VALUE", // required + * // EventStreamArn: "STRING_VALUE", // required + * // State: "RUNNING" || "STOPPED", // required + * // StoppedSince: new Date("TIMESTAMP"), + * // DestinationSummary: { // DestinationSummary + * // Uri: "STRING_VALUE", // required + * // Status: "HEALTHY" || "UNHEALTHY", // required + * // UnhealthySince: new Date("TIMESTAMP"), + * // }, + * // Tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListEventStreamsCommandInput - {@link ListEventStreamsCommandInput} + * @returns {@link ListEventStreamsCommandOutput} + * @see {@link ListEventStreamsCommandInput} for command's `input` shape. + * @see {@link ListEventStreamsCommandOutput} for command's `response` shape. + * @see {@link CustomerProfilesClientResolvedConfig | config} for CustomerProfilesClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link BadRequestException} (client fault) + *

The input you provided is invalid.

+ * + * @throws {@link InternalServerException} (server fault) + *

An internal service error occurred.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The requested resource does not exist, or access was denied.

+ * + * @throws {@link ThrottlingException} (client fault) + *

You exceeded the maximum number of requests.

+ * + * @throws {@link CustomerProfilesServiceException} + *

Base exception class for all service exceptions from CustomerProfiles service.

+ * + */ +export class ListEventStreamsCommand extends $Command< + ListEventStreamsCommandInput, + ListEventStreamsCommandOutput, + CustomerProfilesClientResolvedConfig +> { + // 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" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListEventStreamsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CustomerProfilesClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListEventStreamsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CustomerProfilesClient"; + const commandName = "ListEventStreamsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListEventStreamsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListEventStreamsCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListEventStreamsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-customer-profiles/src/commands/index.ts b/clients/client-customer-profiles/src/commands/index.ts index 64fd188e755e5..da296fba90048 100644 --- a/clients/client-customer-profiles/src/commands/index.ts +++ b/clients/client-customer-profiles/src/commands/index.ts @@ -2,10 +2,12 @@ export * from "./AddProfileKeyCommand"; export * from "./CreateCalculatedAttributeDefinitionCommand"; export * from "./CreateDomainCommand"; +export * from "./CreateEventStreamCommand"; export * from "./CreateIntegrationWorkflowCommand"; export * from "./CreateProfileCommand"; export * from "./DeleteCalculatedAttributeDefinitionCommand"; export * from "./DeleteDomainCommand"; +export * from "./DeleteEventStreamCommand"; export * from "./DeleteIntegrationCommand"; export * from "./DeleteProfileCommand"; export * from "./DeleteProfileKeyCommand"; @@ -16,6 +18,7 @@ export * from "./GetAutoMergingPreviewCommand"; export * from "./GetCalculatedAttributeDefinitionCommand"; export * from "./GetCalculatedAttributeForProfileCommand"; export * from "./GetDomainCommand"; +export * from "./GetEventStreamCommand"; export * from "./GetIdentityResolutionJobCommand"; export * from "./GetIntegrationCommand"; export * from "./GetMatchesCommand"; @@ -27,6 +30,7 @@ export * from "./ListAccountIntegrationsCommand"; export * from "./ListCalculatedAttributeDefinitionsCommand"; export * from "./ListCalculatedAttributesForProfileCommand"; export * from "./ListDomainsCommand"; +export * from "./ListEventStreamsCommand"; export * from "./ListIdentityResolutionJobsCommand"; export * from "./ListIntegrationsCommand"; export * from "./ListProfileObjectTypeTemplatesCommand"; diff --git a/clients/client-customer-profiles/src/index.ts b/clients/client-customer-profiles/src/index.ts index bed7c810012fa..bec94fe37ce33 100644 --- a/clients/client-customer-profiles/src/index.ts +++ b/clients/client-customer-profiles/src/index.ts @@ -13,6 +13,7 @@ export * from "./CustomerProfilesClient"; export * from "./CustomerProfiles"; export * from "./commands"; +export * from "./pagination"; export * from "./models"; export { CustomerProfilesServiceException } from "./models/CustomerProfilesServiceException"; diff --git a/clients/client-customer-profiles/src/models/models_0.ts b/clients/client-customer-profiles/src/models/models_0.ts index cd807d9a738bc..cd63118041a11 100644 --- a/clients/client-customer-profiles/src/models/models_0.ts +++ b/clients/client-customer-profiles/src/models/models_0.ts @@ -1546,6 +1546,47 @@ export interface CreateDomainResponse { Tags?: Record; } +/** + * @public + */ +export interface CreateEventStreamRequest { + /** + *

The unique name of the domain.

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

The StreamARN of the destination to deliver profile events to. For example, + * arn:aws:kinesis:region:account-id:stream/stream-name

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

The name of the event stream.

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

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

+ */ + Tags?: Record; +} + +/** + * @public + */ +export interface CreateEventStreamResponse { + /** + *

A unique identifier for the event stream.

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

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

+ */ + Tags?: Record; +} + /** * @public *

Configuration data for integration workflow.

@@ -1832,6 +1873,26 @@ export interface DeleteDomainResponse { Message: string | undefined; } +/** + * @public + */ +export interface DeleteEventStreamRequest { + /** + *

The unique name of the domain.

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

The name of the event stream

+ */ + EventStreamName: string | undefined; +} + +/** + * @public + */ +export interface DeleteEventStreamResponse {} + /** * @public */ @@ -2255,6 +2316,117 @@ export interface GetDomainResponse { Tags?: Record; } +/** + * @public + */ +export interface GetEventStreamRequest { + /** + *

The unique name of the domain.

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

The name of the event stream provided during create operations.

+ */ + EventStreamName: string | undefined; +} + +/** + * @public + * @enum + */ +export const EventStreamDestinationStatus = { + HEALTHY: "HEALTHY", + UNHEALTHY: "UNHEALTHY", +} as const; + +/** + * @public + */ +export type EventStreamDestinationStatus = + (typeof EventStreamDestinationStatus)[keyof typeof EventStreamDestinationStatus]; + +/** + * @public + *

Details of the destination being used for the EventStream.

+ */ +export interface EventStreamDestinationDetails { + /** + *

The StreamARN of the destination to deliver profile events to. For example, + * arn:aws:kinesis:region:account-id:stream/stream-name.

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

The status of enabling the Kinesis stream as a destination for export.

+ */ + Status: EventStreamDestinationStatus | string | undefined; + + /** + *

The timestamp when the status last changed to UNHEALHY.

+ */ + UnhealthySince?: Date; + + /** + *

The human-readable string that corresponds to the error or success while enabling the streaming destination.

+ */ + Message?: string; +} + +/** + * @public + * @enum + */ +export const EventStreamState = { + RUNNING: "RUNNING", + STOPPED: "STOPPED", +} as const; + +/** + * @public + */ +export type EventStreamState = (typeof EventStreamState)[keyof typeof EventStreamState]; + +/** + * @public + */ +export interface GetEventStreamResponse { + /** + *

The unique name of the domain.

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

A unique identifier for the event stream.

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

The timestamp of when the export was created.

+ */ + CreatedAt: Date | undefined; + + /** + *

The operational state of destination stream for export.

+ */ + State: EventStreamState | string | undefined; + + /** + *

The timestamp when the State changed to STOPPED.

+ */ + StoppedSince?: Date; + + /** + *

Details regarding the Kinesis stream.

+ */ + DestinationDetails: EventStreamDestinationDetails | undefined; + + /** + *

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

+ */ + Tags?: Record; +} + /** * @public */ @@ -3168,6 +3340,104 @@ export interface ListDomainsResponse { NextToken?: string; } +/** + * @public + */ +export interface ListEventStreamsRequest { + /** + *

The unique name of the domain.

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

Identifies the next page of results to return.

+ */ + NextToken?: string; + + /** + *

The maximum number of objects returned per page.

+ */ + MaxResults?: number; +} + +/** + * @public + *

Summary information about the Kinesis data stream

+ */ +export interface DestinationSummary { + /** + *

The StreamARN of the destination to deliver profile events to. For example, + * arn:aws:kinesis:region:account-id:stream/stream-name.

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

The status of enabling the Kinesis stream as a destination for export.

+ */ + Status: EventStreamDestinationStatus | string | undefined; + + /** + *

The timestamp when the status last changed to UNHEALHY.

+ */ + UnhealthySince?: Date; +} + +/** + * @public + *

An instance of EventStream in a list of EventStreams.

+ */ +export interface EventStreamSummary { + /** + *

The unique name of the domain.

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

The name of the event stream.

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

A unique identifier for the event stream.

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

The operational state of destination stream for export.

+ */ + State: EventStreamState | string | undefined; + + /** + *

The timestamp when the State changed to STOPPED.

+ */ + StoppedSince?: Date; + + /** + *

Summary information about the Kinesis data stream.

+ */ + DestinationSummary?: DestinationSummary; + + /** + *

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

+ */ + Tags?: Record; +} + +/** + * @public + */ +export interface ListEventStreamsResponse { + /** + *

Contains summary information about an EventStream.

+ */ + Items?: EventStreamSummary[]; + + /** + *

Identifies the next page of results to return.

+ */ + NextToken?: string; +} + /** * @public */ diff --git a/clients/client-customer-profiles/src/pagination/Interfaces.ts b/clients/client-customer-profiles/src/pagination/Interfaces.ts new file mode 100644 index 0000000000000..b8e47996674ec --- /dev/null +++ b/clients/client-customer-profiles/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@aws-sdk/types"; + +import { CustomerProfilesClient } from "../CustomerProfilesClient"; + +/** + * @public + */ +export interface CustomerProfilesPaginationConfiguration extends PaginationConfiguration { + client: CustomerProfilesClient; +} diff --git a/clients/client-customer-profiles/src/pagination/ListEventStreamsPaginator.ts b/clients/client-customer-profiles/src/pagination/ListEventStreamsPaginator.ts new file mode 100644 index 0000000000000..a8aa03c30023f --- /dev/null +++ b/clients/client-customer-profiles/src/pagination/ListEventStreamsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@aws-sdk/types"; + +import { + ListEventStreamsCommand, + ListEventStreamsCommandInput, + ListEventStreamsCommandOutput, +} from "../commands/ListEventStreamsCommand"; +import { CustomerProfilesClient } from "../CustomerProfilesClient"; +import { CustomerProfilesPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: CustomerProfilesClient, + input: ListEventStreamsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListEventStreamsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListEventStreams( + config: CustomerProfilesPaginationConfiguration, + input: ListEventStreamsCommandInput, + ...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: ListEventStreamsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof CustomerProfilesClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected CustomerProfiles | CustomerProfilesClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-customer-profiles/src/pagination/index.ts b/clients/client-customer-profiles/src/pagination/index.ts new file mode 100644 index 0000000000000..f58a4be7ba127 --- /dev/null +++ b/clients/client-customer-profiles/src/pagination/index.ts @@ -0,0 +1,3 @@ +// smithy-typescript generated code +export * from "./Interfaces"; +export * from "./ListEventStreamsPaginator"; diff --git a/clients/client-customer-profiles/src/protocols/Aws_restJson1.ts b/clients/client-customer-profiles/src/protocols/Aws_restJson1.ts index 33aacb0fffbfe..2c90cfb9b1a1d 100644 --- a/clients/client-customer-profiles/src/protocols/Aws_restJson1.ts +++ b/clients/client-customer-profiles/src/protocols/Aws_restJson1.ts @@ -28,6 +28,7 @@ import { CreateCalculatedAttributeDefinitionCommandOutput, } from "../commands/CreateCalculatedAttributeDefinitionCommand"; import { CreateDomainCommandInput, CreateDomainCommandOutput } from "../commands/CreateDomainCommand"; +import { CreateEventStreamCommandInput, CreateEventStreamCommandOutput } from "../commands/CreateEventStreamCommand"; import { CreateIntegrationWorkflowCommandInput, CreateIntegrationWorkflowCommandOutput, @@ -38,6 +39,7 @@ import { DeleteCalculatedAttributeDefinitionCommandOutput, } from "../commands/DeleteCalculatedAttributeDefinitionCommand"; import { DeleteDomainCommandInput, DeleteDomainCommandOutput } from "../commands/DeleteDomainCommand"; +import { DeleteEventStreamCommandInput, DeleteEventStreamCommandOutput } from "../commands/DeleteEventStreamCommand"; import { DeleteIntegrationCommandInput, DeleteIntegrationCommandOutput } from "../commands/DeleteIntegrationCommand"; import { DeleteProfileCommandInput, DeleteProfileCommandOutput } from "../commands/DeleteProfileCommand"; import { DeleteProfileKeyCommandInput, DeleteProfileKeyCommandOutput } from "../commands/DeleteProfileKeyCommand"; @@ -63,6 +65,7 @@ import { GetCalculatedAttributeForProfileCommandOutput, } from "../commands/GetCalculatedAttributeForProfileCommand"; import { GetDomainCommandInput, GetDomainCommandOutput } from "../commands/GetDomainCommand"; +import { GetEventStreamCommandInput, GetEventStreamCommandOutput } from "../commands/GetEventStreamCommand"; import { GetIdentityResolutionJobCommandInput, GetIdentityResolutionJobCommandOutput, @@ -92,6 +95,7 @@ import { ListCalculatedAttributesForProfileCommandOutput, } from "../commands/ListCalculatedAttributesForProfileCommand"; import { ListDomainsCommandInput, ListDomainsCommandOutput } from "../commands/ListDomainsCommand"; +import { ListEventStreamsCommandInput, ListEventStreamsCommandOutput } from "../commands/ListEventStreamsCommand"; import { ListIdentityResolutionJobsCommandInput, ListIdentityResolutionJobsCommandOutput, @@ -143,6 +147,9 @@ import { ConflictResolution, ConnectorOperator, Consolidation, + DestinationSummary, + EventStreamDestinationDetails, + EventStreamSummary, ExportingConfig, FieldSourceProfileIds, FlowDefinition, @@ -295,6 +302,47 @@ export const se_CreateDomainCommand = async ( }); }; +/** + * serializeAws_restJson1CreateEventStreamCommand + */ +export const se_CreateEventStreamCommand = async ( + input: CreateEventStreamCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/domains/{DomainName}/event-streams/{EventStreamName}"; + resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "EventStreamName", + () => input.EventStreamName!, + "{EventStreamName}", + false + ); + let body: any; + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + Uri: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1CreateIntegrationWorkflowCommand */ @@ -440,6 +488,39 @@ export const se_DeleteDomainCommand = async ( }); }; +/** + * serializeAws_restJson1DeleteEventStreamCommand + */ +export const se_DeleteEventStreamCommand = async ( + input: DeleteEventStreamCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/domains/{DomainName}/event-streams/{EventStreamName}"; + resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "EventStreamName", + () => input.EventStreamName!, + "{EventStreamName}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1DeleteIntegrationCommand */ @@ -753,6 +834,39 @@ export const se_GetDomainCommand = async ( }); }; +/** + * serializeAws_restJson1GetEventStreamCommand + */ +export const se_GetEventStreamCommand = async ( + input: GetEventStreamCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/domains/{DomainName}/event-streams/{EventStreamName}"; + resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); + resolvedPath = __resolvedPath( + resolvedPath, + input, + "EventStreamName", + () => input.EventStreamName!, + "{EventStreamName}", + false + ); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1GetIdentityResolutionJobCommand */ @@ -1075,6 +1189,35 @@ export const se_ListDomainsCommand = async ( }); }; +/** + * serializeAws_restJson1ListEventStreamsCommand + */ +export const se_ListEventStreamsCommand = async ( + input: ListEventStreamsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/event-streams"; + resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); + const query: any = map({ + "next-token": [, input.NextToken!], + "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], + }); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + /** * serializeAws_restJson1ListIdentityResolutionJobsCommand */ @@ -1862,6 +2005,66 @@ const de_CreateDomainCommandError = async ( } }; +/** + * deserializeAws_restJson1CreateEventStreamCommand + */ +export const de_CreateEventStreamCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateEventStreamCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + EventStreamArn: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1CreateEventStreamCommandError + */ +const de_CreateEventStreamCommandError = 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.customerprofiles#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "BadRequestException": + case "com.amazonaws.customerprofiles#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.customerprofiles#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.customerprofiles#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.customerprofiles#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1CreateIntegrationWorkflowCommand */ @@ -2095,6 +2298,61 @@ const de_DeleteDomainCommandError = async ( } }; +/** + * deserializeAws_restJson1DeleteEventStreamCommand + */ +export const de_DeleteEventStreamCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_DeleteEventStreamCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteEventStreamCommandError + */ +const de_DeleteEventStreamCommandError = 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.customerprofiles#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "BadRequestException": + case "com.amazonaws.customerprofiles#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.customerprofiles#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.customerprofiles#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.customerprofiles#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1DeleteIntegrationCommand */ @@ -2703,6 +2961,71 @@ const de_GetDomainCommandError = async ( } }; +/** + * deserializeAws_restJson1GetEventStreamCommand + */ +export const de_GetEventStreamCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_GetEventStreamCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DestinationDetails: (_) => de_EventStreamDestinationDetails(_, context), + DomainName: __expectString, + EventStreamArn: __expectString, + State: __expectString, + StoppedSince: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Tags: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetEventStreamCommandError + */ +const de_GetEventStreamCommandError = 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.customerprofiles#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "BadRequestException": + case "com.amazonaws.customerprofiles#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.customerprofiles#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.customerprofiles#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.customerprofiles#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1GetIdentityResolutionJobCommand */ @@ -3404,6 +3727,66 @@ const de_ListDomainsCommandError = async ( } }; +/** + * deserializeAws_restJson1ListEventStreamsCommand + */ +export const de_ListEventStreamsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListEventStreamsCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + Items: (_) => de_EventStreamSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListEventStreamsCommandError + */ +const de_ListEventStreamsCommandError = 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.customerprofiles#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "BadRequestException": + case "com.amazonaws.customerprofiles#BadRequestException": + throw await de_BadRequestExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.customerprofiles#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.customerprofiles#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.customerprofiles#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1ListIdentityResolutionJobsCommand */ @@ -4783,6 +5166,17 @@ const de_CalculatedAttributeDefinitionsList = ( // de_Consolidation omitted. +/** + * deserializeAws_restJson1DestinationSummary + */ +const de_DestinationSummary = (output: any, context: __SerdeContext): DestinationSummary => { + return take(output, { + Status: __expectString, + UnhealthySince: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Uri: __expectString, + }) as any; +}; + /** * deserializeAws_restJson1DomainList */ @@ -4797,6 +5191,45 @@ const de_DomainList = (output: any, context: __SerdeContext): ListDomainItem[] = // de_DomainStats omitted. +/** + * deserializeAws_restJson1EventStreamDestinationDetails + */ +const de_EventStreamDestinationDetails = (output: any, context: __SerdeContext): EventStreamDestinationDetails => { + return take(output, { + Message: __expectString, + Status: __expectString, + UnhealthySince: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Uri: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1EventStreamSummary + */ +const de_EventStreamSummary = (output: any, context: __SerdeContext): EventStreamSummary => { + return take(output, { + DestinationSummary: (_: any) => de_DestinationSummary(_, context), + DomainName: __expectString, + EventStreamArn: __expectString, + EventStreamName: __expectString, + State: __expectString, + StoppedSince: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Tags: _json, + }) as any; +}; + +/** + * deserializeAws_restJson1EventStreamSummaryList + */ +const de_EventStreamSummaryList = (output: any, context: __SerdeContext): EventStreamSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_EventStreamSummary(entry, context); + }); + return retVal; +}; + // de_ExportingConfig omitted. // de_ExportingLocation omitted. diff --git a/codegen/sdk-codegen/aws-models/customer-profiles.json b/codegen/sdk-codegen/aws-models/customer-profiles.json index 7ddce5a87a937..f5ef09b9e8e93 100644 --- a/codegen/sdk-codegen/aws-models/customer-profiles.json +++ b/codegen/sdk-codegen/aws-models/customer-profiles.json @@ -967,6 +967,98 @@ "smithy.api#output": {} } }, + "com.amazonaws.customerprofiles#CreateEventStream": { + "type": "operation", + "input": { + "target": "com.amazonaws.customerprofiles#CreateEventStreamRequest" + }, + "output": { + "target": "com.amazonaws.customerprofiles#CreateEventStreamResponse" + }, + "errors": [ + { + "target": "com.amazonaws.customerprofiles#AccessDeniedException" + }, + { + "target": "com.amazonaws.customerprofiles#BadRequestException" + }, + { + "target": "com.amazonaws.customerprofiles#InternalServerException" + }, + { + "target": "com.amazonaws.customerprofiles#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.customerprofiles#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an event stream, which is a subscription to real-time events, such as when profiles are created and \n updated through Amazon Connect Customer Profiles.

\n

Each event stream can be associated with only one Kinesis Data Stream destination in the same region and \n Amazon Web Services account as the customer profiles domain

", + "smithy.api#http": { + "method": "POST", + "uri": "/domains/{DomainName}/event-streams/{EventStreamName}", + "code": 200 + } + } + }, + "com.amazonaws.customerprofiles#CreateEventStreamRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The unique name of the domain.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Uri": { + "target": "com.amazonaws.customerprofiles#string1To255", + "traits": { + "smithy.api#documentation": "

The StreamARN of the destination to deliver profile events to. For example, \n arn:aws:kinesis:region:account-id:stream/stream-name

", + "smithy.api#required": {} + } + }, + "EventStreamName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The name of the event stream.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.customerprofiles#TagMap", + "traits": { + "smithy.api#documentation": "

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

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.customerprofiles#CreateEventStreamResponse": { + "type": "structure", + "members": { + "EventStreamArn": { + "target": "com.amazonaws.customerprofiles#string1To255", + "traits": { + "smithy.api#documentation": "

A unique identifier for the event stream.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.customerprofiles#TagMap", + "traits": { + "smithy.api#documentation": "

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

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.customerprofiles#CreateIntegrationWorkflow": { "type": "operation", "input": { @@ -1289,6 +1381,9 @@ { "target": "com.amazonaws.customerprofiles#CreateDomain" }, + { + "target": "com.amazonaws.customerprofiles#CreateEventStream" + }, { "target": "com.amazonaws.customerprofiles#CreateIntegrationWorkflow" }, @@ -1301,6 +1396,9 @@ { "target": "com.amazonaws.customerprofiles#DeleteDomain" }, + { + "target": "com.amazonaws.customerprofiles#DeleteEventStream" + }, { "target": "com.amazonaws.customerprofiles#DeleteIntegration" }, @@ -1331,6 +1429,9 @@ { "target": "com.amazonaws.customerprofiles#GetDomain" }, + { + "target": "com.amazonaws.customerprofiles#GetEventStream" + }, { "target": "com.amazonaws.customerprofiles#GetIdentityResolutionJob" }, @@ -1364,6 +1465,9 @@ { "target": "com.amazonaws.customerprofiles#ListDomains" }, + { + "target": "com.amazonaws.customerprofiles#ListEventStreams" + }, { "target": "com.amazonaws.customerprofiles#ListIdentityResolutionJobs" }, @@ -2373,6 +2477,72 @@ "smithy.api#output": {} } }, + "com.amazonaws.customerprofiles#DeleteEventStream": { + "type": "operation", + "input": { + "target": "com.amazonaws.customerprofiles#DeleteEventStreamRequest" + }, + "output": { + "target": "com.amazonaws.customerprofiles#DeleteEventStreamResponse" + }, + "errors": [ + { + "target": "com.amazonaws.customerprofiles#AccessDeniedException" + }, + { + "target": "com.amazonaws.customerprofiles#BadRequestException" + }, + { + "target": "com.amazonaws.customerprofiles#InternalServerException" + }, + { + "target": "com.amazonaws.customerprofiles#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.customerprofiles#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Disables and deletes the specified event stream.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/domains/{DomainName}/event-streams/{EventStreamName}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.customerprofiles#DeleteEventStreamRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The unique name of the domain.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "EventStreamName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The name of the event stream

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.customerprofiles#DeleteEventStreamResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.customerprofiles#DeleteIntegration": { "type": "operation", "input": { @@ -2834,6 +3004,34 @@ "smithy.api#pattern": ".*" } }, + "com.amazonaws.customerprofiles#DestinationSummary": { + "type": "structure", + "members": { + "Uri": { + "target": "com.amazonaws.customerprofiles#string1To255", + "traits": { + "smithy.api#documentation": "

The StreamARN of the destination to deliver profile events to. For example, \n arn:aws:kinesis:region:account-id:stream/stream-name.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.customerprofiles#EventStreamDestinationStatus", + "traits": { + "smithy.api#documentation": "

The status of enabling the Kinesis stream as a destination for export.

", + "smithy.api#required": {} + } + }, + "UnhealthySince": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the status last changed to UNHEALHY.

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

Summary information about the Kinesis data stream

" + } + }, "com.amazonaws.customerprofiles#DomainList": { "type": "list", "member": { @@ -2888,6 +3086,134 @@ } } }, + "com.amazonaws.customerprofiles#EventStreamDestinationDetails": { + "type": "structure", + "members": { + "Uri": { + "target": "com.amazonaws.customerprofiles#string1To255", + "traits": { + "smithy.api#documentation": "

The StreamARN of the destination to deliver profile events to. For example, \n arn:aws:kinesis:region:account-id:stream/stream-name.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.customerprofiles#EventStreamDestinationStatus", + "traits": { + "smithy.api#documentation": "

The status of enabling the Kinesis stream as a destination for export.

", + "smithy.api#required": {} + } + }, + "UnhealthySince": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the status last changed to UNHEALHY.

" + } + }, + "Message": { + "target": "com.amazonaws.customerprofiles#string1To1000", + "traits": { + "smithy.api#documentation": "

The human-readable string that corresponds to the error or success while enabling the streaming destination.

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

Details of the destination being used for the EventStream.

" + } + }, + "com.amazonaws.customerprofiles#EventStreamDestinationStatus": { + "type": "enum", + "members": { + "HEALTHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HEALTHY" + } + }, + "UNHEALTHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNHEALTHY" + } + } + } + }, + "com.amazonaws.customerprofiles#EventStreamState": { + "type": "enum", + "members": { + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPED" + } + } + } + }, + "com.amazonaws.customerprofiles#EventStreamSummary": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The unique name of the domain.

", + "smithy.api#required": {} + } + }, + "EventStreamName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The name of the event stream.

", + "smithy.api#required": {} + } + }, + "EventStreamArn": { + "target": "com.amazonaws.customerprofiles#string1To255", + "traits": { + "smithy.api#documentation": "

A unique identifier for the event stream.

", + "smithy.api#required": {} + } + }, + "State": { + "target": "com.amazonaws.customerprofiles#EventStreamState", + "traits": { + "smithy.api#documentation": "

The operational state of destination stream for export.

", + "smithy.api#required": {} + } + }, + "StoppedSince": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the State changed to STOPPED.

" + } + }, + "DestinationSummary": { + "target": "com.amazonaws.customerprofiles#DestinationSummary", + "traits": { + "smithy.api#documentation": "

Summary information about the Kinesis data stream.

" + } + }, + "Tags": { + "target": "com.amazonaws.customerprofiles#TagMap", + "traits": { + "smithy.api#documentation": "

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

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

An instance of EventStream in a list of EventStreams.

" + } + }, + "com.amazonaws.customerprofiles#EventStreamSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.customerprofiles#EventStreamSummary" + } + }, "com.amazonaws.customerprofiles#ExportingConfig": { "type": "structure", "members": { @@ -3654,6 +3980,119 @@ "smithy.api#output": {} } }, + "com.amazonaws.customerprofiles#GetEventStream": { + "type": "operation", + "input": { + "target": "com.amazonaws.customerprofiles#GetEventStreamRequest" + }, + "output": { + "target": "com.amazonaws.customerprofiles#GetEventStreamResponse" + }, + "errors": [ + { + "target": "com.amazonaws.customerprofiles#AccessDeniedException" + }, + { + "target": "com.amazonaws.customerprofiles#BadRequestException" + }, + { + "target": "com.amazonaws.customerprofiles#InternalServerException" + }, + { + "target": "com.amazonaws.customerprofiles#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.customerprofiles#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about the specified event stream in a specific domain.

", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainName}/event-streams/{EventStreamName}", + "code": 200 + } + } + }, + "com.amazonaws.customerprofiles#GetEventStreamRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The unique name of the domain.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "EventStreamName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The name of the event stream provided during create operations.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.customerprofiles#GetEventStreamResponse": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The unique name of the domain.

", + "smithy.api#required": {} + } + }, + "EventStreamArn": { + "target": "com.amazonaws.customerprofiles#string1To255", + "traits": { + "smithy.api#documentation": "

A unique identifier for the event stream.

", + "smithy.api#required": {} + } + }, + "CreatedAt": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of when the export was created.

", + "smithy.api#required": {} + } + }, + "State": { + "target": "com.amazonaws.customerprofiles#EventStreamState", + "traits": { + "smithy.api#documentation": "

The operational state of destination stream for export.

", + "smithy.api#required": {} + } + }, + "StoppedSince": { + "target": "com.amazonaws.customerprofiles#timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp when the State changed to STOPPED.

" + } + }, + "DestinationDetails": { + "target": "com.amazonaws.customerprofiles#EventStreamDestinationDetails", + "traits": { + "smithy.api#documentation": "

Details regarding the Kinesis stream.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.customerprofiles#TagMap", + "traits": { + "smithy.api#documentation": "

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

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.customerprofiles#GetIdentityResolutionJob": { "type": "operation", "input": { @@ -5201,6 +5640,96 @@ "smithy.api#output": {} } }, + "com.amazonaws.customerprofiles#ListEventStreams": { + "type": "operation", + "input": { + "target": "com.amazonaws.customerprofiles#ListEventStreamsRequest" + }, + "output": { + "target": "com.amazonaws.customerprofiles#ListEventStreamsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.customerprofiles#AccessDeniedException" + }, + { + "target": "com.amazonaws.customerprofiles#BadRequestException" + }, + { + "target": "com.amazonaws.customerprofiles#InternalServerException" + }, + { + "target": "com.amazonaws.customerprofiles#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.customerprofiles#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of all the event streams in a specific domain.

", + "smithy.api#http": { + "method": "GET", + "uri": "/domains/{DomainName}/event-streams", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Items", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.customerprofiles#ListEventStreamsRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.customerprofiles#name", + "traits": { + "smithy.api#documentation": "

The unique name of the domain.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.customerprofiles#token", + "traits": { + "smithy.api#documentation": "

Identifies the next page of results to return.

", + "smithy.api#httpQuery": "next-token" + } + }, + "MaxResults": { + "target": "com.amazonaws.customerprofiles#maxSize100", + "traits": { + "smithy.api#documentation": "

The maximum number of objects returned per page.

", + "smithy.api#httpQuery": "max-results" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.customerprofiles#ListEventStreamsResponse": { + "type": "structure", + "members": { + "Items": { + "target": "com.amazonaws.customerprofiles#EventStreamSummaryList", + "traits": { + "smithy.api#documentation": "

Contains summary information about an EventStream.

" + } + }, + "NextToken": { + "target": "com.amazonaws.customerprofiles#token", + "traits": { + "smithy.api#documentation": "

Identifies the next page of results to return.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.customerprofiles#ListIdentityResolutionJobs": { "type": "operation", "input": {