Skip to content

Commit

Permalink
Update generated code (#1601)
Browse files Browse the repository at this point in the history
* update generated code

* Disable tests using fakesqs

* Update SQS test to be compatible with JSON API

---------

Co-authored-by: Jérémy Derussé <[email protected]>
  • Loading branch information
async-aws-bot and jderusse authored Nov 23, 2023
1 parent d9cb632 commit 35648ed
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Added

- AWS api-change: Introduces a new rule state ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS for matching with Get, List and Describe AWS API call events from CloudTrail.

### Changed

- Allow passing explicit null values for optional fields of input objects
Expand Down
9 changes: 9 additions & 0 deletions src/EventBridgeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,17 @@ class EventBridgeClient extends AbstractApi
/**
* Sends custom events to Amazon EventBridge so that they can be matched to rules.
*
* The maximum size for a PutEvents event entry is 256 KB. Entry size is calculated including the event and any
* necessary characters and keys of the JSON representation of the event. To learn more, see Calculating PutEvents event
* entry size [^1] in the *Amazon EventBridge User Guide*
*
* PutEvents accepts the data in JSON format. For the JSON number (integer) data type, the constraints are: a minimum
* value of -9,223,372,036,854,775,808 and a maximum value of 9,223,372,036,854,775,807.
*
* > PutEvents will only process nested JSON up to 1100 levels deep.
*
* [^1]: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-putevent-size.html
*
* @see https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html
* @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-events-2015-10-07.html#putevents
*
Expand Down
24 changes: 20 additions & 4 deletions src/ValueObject/PutEventsRequestEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ final class PutEventsRequestEntry
/**
* The source of the event.
*
* > `Detail`, `DetailType`, and `Source` are required for EventBridge to successfully send an event to an event bus. If
* > you include event entries in a request that do not include each of those properties, EventBridge fails that entry.
* > If you submit a request in which *none* of the entries have each of these properties, EventBridge fails the entire
* > request.
*
* @var string|null
*/
private $source;
Expand All @@ -36,12 +41,22 @@ final class PutEventsRequestEntry
/**
* Free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.
*
* > `Detail`, `DetailType`, and `Source` are required for EventBridge to successfully send an event to an event bus. If
* > you include event entries in a request that do not include each of those properties, EventBridge fails that entry.
* > If you submit a request in which *none* of the entries have each of these properties, EventBridge fails the entire
* > request.
*
* @var string|null
*/
private $detailType;

/**
* A valid JSON object. There is no other schema imposed. The JSON object may contain fields and nested subobjects.
* A valid JSON object. There is no other schema imposed. The JSON object may contain fields and nested sub-objects.
*
* > `Detail`, `DetailType`, and `Source` are required for EventBridge to successfully send an event to an event bus. If
* > you include event entries in a request that do not include each of those properties, EventBridge fails that entry.
* > If you submit a request in which *none* of the entries have each of these properties, EventBridge fails the entire
* > request.
*
* @var string|null
*/
Expand All @@ -51,9 +66,10 @@ final class PutEventsRequestEntry
* The name or ARN of the event bus to receive the event. Only the rules that are associated with this event bus are
* used to match the event. If you omit this, the default event bus is used.
*
* > If you're using a global endpoint with a custom bus, you must enter the name, not the ARN, of the event bus in
* > either the primary or secondary Region here and the corresponding event bus in the other Region will be determined
* > based on the endpoint referenced by the `EndpointId`.
* > If you're using a global endpoint with a custom bus, you can enter either the name or Amazon Resource Name (ARN) of
* > the event bus in either the primary or secondary Region here. EventBridge then determines the corresponding event
* > bus in the other Region based on the endpoint referenced by the `EndpointId`. Specifying the event bus ARN is
* > preferred.
*
* @var string|null
*/
Expand Down
47 changes: 45 additions & 2 deletions src/ValueObject/PutEventsResultEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

namespace AsyncAws\EventBridge\ValueObject;

use AsyncAws\Core\Exception\InvalidArgument;

/**
* Represents an event that failed to be submitted. For information about the errors that are common to all actions, see
* Common Errors [^1].
* Represents the results of an event submitted to an event bus.
*
* If the submission was successful, the entry has the event ID in it. Otherwise, you can use the error code and error
* message to identify the problem with the entry.
*
* For information about the errors that are common to all actions, see Common Errors [^1].
*
* [^1]: https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html
*/
Expand All @@ -20,6 +26,43 @@ final class PutEventsResultEntry
/**
* The error code that indicates why the event submission failed.
*
* Retryable errors include:
*
* - `InternalFailure [^1]`
*
* The request processing has failed because of an unknown error, exception or failure.
* - `ThrottlingException [^2]`
*
* The request was denied due to request throttling.
*
* Non-retryable errors include:
*
* - `AccessDeniedException [^3]`
*
* You do not have sufficient access to perform this action.
* - `InvalidAccountIdException`
*
* The account ID provided is not valid.
* - `InvalidArgument`
*
* A specified parameter is not valid.
* - `MalformedDetail`
*
* The JSON provided is not valid.
* - `RedactionFailure`
*
* Redacting the CloudTrail event failed.
* - `NotAuthorizedForSourceException`
*
* You do not have permissions to publish events with this source onto this event bus.
* - `NotAuthorizedForDetailTypeException`
*
* You do not have permissions to publish events with this detail type onto this event bus.
*
* [^1]: https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html
* [^2]: https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html
* [^3]: https://docs.aws.amazon.com/eventbridge/latest/APIReference/CommonErrors.html
*
* @var string|null
*/
private $errorCode;
Expand Down

0 comments on commit 35648ed

Please sign in to comment.