From 1853dabb140cea9f693bd0bf1c17c2109094c927 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 11 Jan 2024 19:13:37 +0000 Subject: [PATCH] feat(client-eventbridge): Adding AppSync as an EventBridge Target --- .../src/commands/ListTargetsByRuleCommand.ts | 3 + .../src/commands/PutTargetsCommand.ts | 3 + .../client-eventbridge/src/models/models_0.ts | 80 +++++++------------ .../src/protocols/Aws_json1_1.ts | 5 ++ .../sdk-codegen/aws-models/eventbridge.json | 34 +++++++- 5 files changed, 72 insertions(+), 53 deletions(-) diff --git a/clients/client-eventbridge/src/commands/ListTargetsByRuleCommand.ts b/clients/client-eventbridge/src/commands/ListTargetsByRuleCommand.ts index 658fdc212996..7f29f74cf384 100644 --- a/clients/client-eventbridge/src/commands/ListTargetsByRuleCommand.ts +++ b/clients/client-eventbridge/src/commands/ListTargetsByRuleCommand.ts @@ -172,6 +172,9 @@ export interface ListTargetsByRuleCommandOutput extends ListTargetsByRuleRespons * // MaximumRetryAttempts: Number("int"), * // MaximumEventAgeInSeconds: Number("int"), * // }, + * // AppSyncParameters: { // AppSyncParameters + * // GraphQLOperation: "STRING_VALUE", + * // }, * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-eventbridge/src/commands/PutTargetsCommand.ts b/clients/client-eventbridge/src/commands/PutTargetsCommand.ts index f2bab42f8199..07dcbc208c88 100644 --- a/clients/client-eventbridge/src/commands/PutTargetsCommand.ts +++ b/clients/client-eventbridge/src/commands/PutTargetsCommand.ts @@ -273,6 +273,9 @@ export interface PutTargetsCommandOutput extends PutTargetsResponse, __MetadataB * MaximumRetryAttempts: Number("int"), * MaximumEventAgeInSeconds: Number("int"), * }, + * AppSyncParameters: { // AppSyncParameters + * GraphQLOperation: "STRING_VALUE", + * }, * }, * ], * }; diff --git a/clients/client-eventbridge/src/models/models_0.ts b/clients/client-eventbridge/src/models/models_0.ts index 533536920921..5b3be3ecf786 100644 --- a/clients/client-eventbridge/src/models/models_0.ts +++ b/clients/client-eventbridge/src/models/models_0.ts @@ -207,6 +207,19 @@ export interface ApiDestination { LastModifiedTime?: Date; } +/** + * @public + *

Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.

+ */ +export interface AppSyncParameters { + /** + * @public + *

The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service.

+ *

For more information, see Operations in the AppSync User Guide.

+ */ + GraphQLOperation?: string; +} + /** * @public * @enum @@ -3124,31 +3137,6 @@ export interface Rule { /** * @public *

The state of the rule.

- *

Valid values include:

- * */ State?: RuleState; @@ -4072,6 +4060,12 @@ export interface Target { * for the dead-letter queue.

*/ RetryPolicy?: RetryPolicy; + + /** + * @public + *

Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.

+ */ + AppSyncParameters?: AppSyncParameters; } /** @@ -4568,32 +4562,7 @@ export interface PutRuleRequest { /** * @public - *

The state of the rule.

- *

Valid values include:

- * + *

Indicates whether the rule is enabled or disabled.

*/ State?: RuleState; @@ -5405,6 +5374,14 @@ export interface UpdateEndpointResponse { State?: EndpointState; } +/** + * @internal + */ +export const AppSyncParametersFilterSensitiveLog = (obj: AppSyncParameters): any => ({ + ...obj, + ...(obj.GraphQLOperation && { GraphQLOperation: SENSITIVE_STRING }), +}); + /** * @internal */ @@ -5571,6 +5548,7 @@ export const TargetFilterSensitiveLog = (obj: Target): any => ({ ...(obj.RedshiftDataParameters && { RedshiftDataParameters: RedshiftDataParametersFilterSensitiveLog(obj.RedshiftDataParameters), }), + ...(obj.AppSyncParameters && { AppSyncParameters: AppSyncParametersFilterSensitiveLog(obj.AppSyncParameters) }), }); /** diff --git a/clients/client-eventbridge/src/protocols/Aws_json1_1.ts b/clients/client-eventbridge/src/protocols/Aws_json1_1.ts index 6fd90c7c161b..f95351a5fb9b 100644 --- a/clients/client-eventbridge/src/protocols/Aws_json1_1.ts +++ b/clients/client-eventbridge/src/protocols/Aws_json1_1.ts @@ -128,6 +128,7 @@ import { EventBridgeServiceException as __BaseException } from "../models/EventB import { ActivateEventSourceRequest, ApiDestination, + AppSyncParameters, Archive, AwsVpcConfiguration, BatchArrayProperties, @@ -4079,6 +4080,8 @@ const de_ResourceNotFoundExceptionRes = async ( // se_ActivateEventSourceRequest omitted. +// se_AppSyncParameters omitted. + // se_AwsVpcConfiguration omitted. // se_BatchArrayProperties omitted. @@ -4427,6 +4430,8 @@ const de_ApiDestinationResponseList = (output: any, context: __SerdeContext): Ap return retVal; }; +// de_AppSyncParameters omitted. + /** * deserializeAws_json1_1Archive */ diff --git a/codegen/sdk-codegen/aws-models/eventbridge.json b/codegen/sdk-codegen/aws-models/eventbridge.json index 9608edd68ec4..99950203adb8 100644 --- a/codegen/sdk-codegen/aws-models/eventbridge.json +++ b/codegen/sdk-codegen/aws-models/eventbridge.json @@ -1817,6 +1817,20 @@ } } }, + "com.amazonaws.eventbridge#AppSyncParameters": { + "type": "structure", + "members": { + "GraphQLOperation": { + "target": "com.amazonaws.eventbridge#GraphQLOperation", + "traits": { + "smithy.api#documentation": "

The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service.

\n

For more information, see Operations in the AppSync User Guide.

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

Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.

" + } + }, "com.amazonaws.eventbridge#Archive": { "type": "structure", "members": { @@ -5431,6 +5445,16 @@ "smithy.api#documentation": "

The failover configuration for an endpoint. This includes what triggers failover and what happens when it's triggered.

" } }, + "com.amazonaws.eventbridge#GraphQLOperation": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1048576 + }, + "smithy.api#sensitive": {} + } + }, "com.amazonaws.eventbridge#HeaderKey": { "type": "string", "traits": { @@ -7381,7 +7405,7 @@ "State": { "target": "com.amazonaws.eventbridge#RuleState", "traits": { - "smithy.api#documentation": "

The state of the rule.

\n

Valid values include:

\n " + "smithy.api#documentation": "

Indicates whether the rule is enabled or disabled.

" } }, "Description": { @@ -8142,7 +8166,7 @@ "State": { "target": "com.amazonaws.eventbridge#RuleState", "traits": { - "smithy.api#documentation": "

The state of the rule.

\n

Valid values include:

\n " + "smithy.api#documentation": "

The state of the rule.

" } }, "Description": { @@ -8815,6 +8839,12 @@ "traits": { "smithy.api#documentation": "

The RetryPolicy object that contains the retry policy configuration to use\n for the dead-letter queue.

" } + }, + "AppSyncParameters": { + "target": "com.amazonaws.eventbridge#AppSyncParameters", + "traits": { + "smithy.api#documentation": "

Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.

" + } } }, "traits": {