Skip to content

Commit

Permalink
feat(client-eventbridge): Adding AppSync as an EventBridge Target
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Jan 11, 2024
1 parent 8b7b13e commit 1853dab
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 53 deletions.
Expand Up @@ -172,6 +172,9 @@ export interface ListTargetsByRuleCommandOutput extends ListTargetsByRuleRespons
* // MaximumRetryAttempts: Number("int"),
* // MaximumEventAgeInSeconds: Number("int"),
* // },
* // AppSyncParameters: { // AppSyncParameters
* // GraphQLOperation: "STRING_VALUE",
* // },
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
3 changes: 3 additions & 0 deletions clients/client-eventbridge/src/commands/PutTargetsCommand.ts
Expand Up @@ -273,6 +273,9 @@ export interface PutTargetsCommandOutput extends PutTargetsResponse, __MetadataB
* MaximumRetryAttempts: Number("int"),
* MaximumEventAgeInSeconds: Number("int"),
* },
* AppSyncParameters: { // AppSyncParameters
* GraphQLOperation: "STRING_VALUE",
* },
* },
* ],
* };
Expand Down
80 changes: 29 additions & 51 deletions clients/client-eventbridge/src/models/models_0.ts
Expand Up @@ -207,6 +207,19 @@ export interface ApiDestination {
LastModifiedTime?: Date;
}

/**
* @public
* <p>Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.</p>
*/
export interface AppSyncParameters {
/**
* @public
* <p>The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/appsync/latest/devguide/graphql-architecture.html#graphql-operations">Operations</a> in the <i>AppSync User Guide</i>.</p>
*/
GraphQLOperation?: string;
}

/**
* @public
* @enum
Expand Down Expand Up @@ -3124,31 +3137,6 @@ export interface Rule {
/**
* @public
* <p>The state of the rule.</p>
* <p>Valid values include:</p>
* <ul>
* <li>
* <p>
* <code>DISABLED</code>: The rule is disabled. EventBridge does not match any events against the rule.</p>
* </li>
* <li>
* <p>
* <code>ENABLED</code>: The rule is enabled.
* EventBridge matches events against the rule, <i>except</i> for Amazon Web Services management events delivered through CloudTrail.</p>
* </li>
* <li>
* <p>
* <code>ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS</code>: The rule is enabled for all
* events, including Amazon Web Services management events delivered through CloudTrail.</p>
* <p>Management events provide visibility into management operations that are performed on
* resources in your Amazon Web Services account. These are also known as control plane
* operations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events">Logging management events</a> in the <i>CloudTrail User
* Guide</i>, and <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail">Filtering management events from Amazon Web Services services</a> in the
* <i>Amazon EventBridge User Guide</i>.</p>
* <p>This value is only valid for rules on the <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses">default</a> event bus
* or <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html">custom event buses</a>.
* It does not apply to <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html">partner event buses</a>.</p>
* </li>
* </ul>
*/
State?: RuleState;

Expand Down Expand Up @@ -4072,6 +4060,12 @@ export interface Target {
* for the dead-letter queue.</p>
*/
RetryPolicy?: RetryPolicy;

/**
* @public
* <p>Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.</p>
*/
AppSyncParameters?: AppSyncParameters;
}

/**
Expand Down Expand Up @@ -4568,32 +4562,7 @@ export interface PutRuleRequest {

/**
* @public
* <p>The state of the rule.</p>
* <p>Valid values include:</p>
* <ul>
* <li>
* <p>
* <code>DISABLED</code>: The rule is disabled. EventBridge does not match any events against the rule.</p>
* </li>
* <li>
* <p>
* <code>ENABLED</code>: The rule is enabled.
* EventBridge matches events against the rule, <i>except</i> for Amazon Web Services management events delivered through CloudTrail.</p>
* </li>
* <li>
* <p>
* <code>ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS</code>: The rule is enabled for all
* events, including Amazon Web Services management events delivered through CloudTrail.</p>
* <p>Management events provide visibility into management operations that are performed on
* resources in your Amazon Web Services account. These are also known as control plane
* operations. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events">Logging management events</a> in the <i>CloudTrail User
* Guide</i>, and <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail">Filtering management events from Amazon Web Services services</a> in the
* <i>Amazon EventBridge User Guide</i>.</p>
* <p>This value is only valid for rules on the <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses">default</a> event bus
* or <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html">custom event buses</a>.
* It does not apply to <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html">partner event buses</a>.</p>
* </li>
* </ul>
* <p>Indicates whether the rule is enabled or disabled.</p>
*/
State?: RuleState;

Expand Down Expand Up @@ -5405,6 +5374,14 @@ export interface UpdateEndpointResponse {
State?: EndpointState;
}

/**
* @internal
*/
export const AppSyncParametersFilterSensitiveLog = (obj: AppSyncParameters): any => ({
...obj,
...(obj.GraphQLOperation && { GraphQLOperation: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand Down Expand Up @@ -5571,6 +5548,7 @@ export const TargetFilterSensitiveLog = (obj: Target): any => ({
...(obj.RedshiftDataParameters && {
RedshiftDataParameters: RedshiftDataParametersFilterSensitiveLog(obj.RedshiftDataParameters),
}),
...(obj.AppSyncParameters && { AppSyncParameters: AppSyncParametersFilterSensitiveLog(obj.AppSyncParameters) }),
});

/**
Expand Down
5 changes: 5 additions & 0 deletions clients/client-eventbridge/src/protocols/Aws_json1_1.ts
Expand Up @@ -128,6 +128,7 @@ import { EventBridgeServiceException as __BaseException } from "../models/EventB
import {
ActivateEventSourceRequest,
ApiDestination,
AppSyncParameters,
Archive,
AwsVpcConfiguration,
BatchArrayProperties,
Expand Down Expand Up @@ -4079,6 +4080,8 @@ const de_ResourceNotFoundExceptionRes = async (

// se_ActivateEventSourceRequest omitted.

// se_AppSyncParameters omitted.

// se_AwsVpcConfiguration omitted.

// se_BatchArrayProperties omitted.
Expand Down Expand Up @@ -4427,6 +4430,8 @@ const de_ApiDestinationResponseList = (output: any, context: __SerdeContext): Ap
return retVal;
};

// de_AppSyncParameters omitted.

/**
* deserializeAws_json1_1Archive
*/
Expand Down
34 changes: 32 additions & 2 deletions codegen/sdk-codegen/aws-models/eventbridge.json
Expand Up @@ -1817,6 +1817,20 @@
}
}
},
"com.amazonaws.eventbridge#AppSyncParameters": {
"type": "structure",
"members": {
"GraphQLOperation": {
"target": "com.amazonaws.eventbridge#GraphQLOperation",
"traits": {
"smithy.api#documentation": "<p>The GraphQL operation; that is, the query, mutation, or subscription to be parsed and executed by the GraphQL service.</p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/appsync/latest/devguide/graphql-architecture.html#graphql-operations\">Operations</a> in the <i>AppSync User Guide</i>.</p>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.</p>"
}
},
"com.amazonaws.eventbridge#Archive": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -5431,6 +5445,16 @@
"smithy.api#documentation": "<p>The failover configuration for an endpoint. This includes what triggers failover and what happens when it's triggered.</p>"
}
},
"com.amazonaws.eventbridge#GraphQLOperation": {
"type": "string",
"traits": {
"smithy.api#length": {
"min": 1,
"max": 1048576
},
"smithy.api#sensitive": {}
}
},
"com.amazonaws.eventbridge#HeaderKey": {
"type": "string",
"traits": {
Expand Down Expand Up @@ -7381,7 +7405,7 @@
"State": {
"target": "com.amazonaws.eventbridge#RuleState",
"traits": {
"smithy.api#documentation": "<p>The state of the rule.</p>\n <p>Valid values include:</p>\n <ul>\n <li>\n <p>\n <code>DISABLED</code>: The rule is disabled. EventBridge does not match any events against the rule.</p>\n </li>\n <li>\n <p>\n <code>ENABLED</code>: The rule is enabled. \n EventBridge matches events against the rule, <i>except</i> for Amazon Web Services management events delivered through CloudTrail.</p>\n </li>\n <li>\n <p>\n <code>ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS</code>: The rule is enabled for all\n events, including Amazon Web Services management events delivered through CloudTrail.</p>\n <p>Management events provide visibility into management operations that are performed on\n resources in your Amazon Web Services account. These are also known as control plane\n operations. For more information, see <a href=\"https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events\">Logging management events</a> in the <i>CloudTrail User\n Guide</i>, and <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail\">Filtering management events from Amazon Web Services services</a> in the\n <i>Amazon EventBridge User Guide</i>.</p>\n <p>This value is only valid for rules on the <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses\">default</a> event bus \n or <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html\">custom event buses</a>. \n It does not apply to <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html\">partner event buses</a>.</p>\n </li>\n </ul>"
"smithy.api#documentation": "<p>Indicates whether the rule is enabled or disabled.</p>"
}
},
"Description": {
Expand Down Expand Up @@ -8142,7 +8166,7 @@
"State": {
"target": "com.amazonaws.eventbridge#RuleState",
"traits": {
"smithy.api#documentation": "<p>The state of the rule.</p>\n <p>Valid values include:</p>\n <ul>\n <li>\n <p>\n <code>DISABLED</code>: The rule is disabled. EventBridge does not match any events against the rule.</p>\n </li>\n <li>\n <p>\n <code>ENABLED</code>: The rule is enabled. \n EventBridge matches events against the rule, <i>except</i> for Amazon Web Services management events delivered through CloudTrail.</p>\n </li>\n <li>\n <p>\n <code>ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS</code>: The rule is enabled for all\n events, including Amazon Web Services management events delivered through CloudTrail.</p>\n <p>Management events provide visibility into management operations that are performed on\n resources in your Amazon Web Services account. These are also known as control plane\n operations. For more information, see <a href=\"https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events\">Logging management events</a> in the <i>CloudTrail User\n Guide</i>, and <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-cloudtrail\">Filtering management events from Amazon Web Services services</a> in the\n <i>Amazon EventBridge User Guide</i>.</p>\n <p>This value is only valid for rules on the <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is-how-it-works-concepts.html#eb-bus-concepts-buses\">default</a> event bus \n or <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html\">custom event buses</a>. \n It does not apply to <a href=\"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas.html\">partner event buses</a>.</p>\n </li>\n </ul>"
"smithy.api#documentation": "<p>The state of the rule.</p>"
}
},
"Description": {
Expand Down Expand Up @@ -8815,6 +8839,12 @@
"traits": {
"smithy.api#documentation": "<p>The <code>RetryPolicy</code> object that contains the retry policy configuration to use\n for the dead-letter queue.</p>"
}
},
"AppSyncParameters": {
"target": "com.amazonaws.eventbridge#AppSyncParameters",
"traits": {
"smithy.api#documentation": "<p>Contains the GraphQL operation to be parsed and executed, if the event target is an AppSync API.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 1853dab

Please sign in to comment.