Skip to content

Commit

Permalink
feat(client-eventbridge): Introduces a new rule state ENABLED_WITH_AL…
Browse files Browse the repository at this point in the history
…L_CLOUDTRAIL_MANAGEMENT_EVENTS for matching with Get, List and Describe AWS API call events from CloudTrail.
  • Loading branch information
awstools committed Nov 17, 2023
1 parent 7a42bf1 commit e581203
Show file tree
Hide file tree
Showing 17 changed files with 301 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export interface CreateApiDestinationCommandOutput extends CreateApiDestinationR
* @public
* <p>Creates an API destination, which is an HTTP invocation endpoint configured as a target
* for events.</p>
* <p>API destinations do not support private destinations, such as interface VPC endpoints.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html">API destinations</a> in the <i>EventBridge User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,27 @@ export interface CreatePartnerEventSourceCommandOutput extends CreatePartnerEven
* <i>partner_name</i>/<i>event_namespace</i>/<i>event_name</i>
* </code>
* </p>
* <p>
* <i>partner_name</i> is determined during partner registration and identifies
* the partner to Amazon Web Services customers. <i>event_namespace</i> is determined by the
* partner and is a way for the partner to categorize their events.
* <i>event_name</i> is determined by the partner, and should uniquely identify
* an event-generating resource within the partner system. The combination of
* <i>event_namespace</i> and <i>event_name</i> should help Amazon Web Services
* <ul>
* <li>
* <p>
* <i>partner_name</i> is determined during partner registration, and
* identifies the partner to Amazon Web Services customers. </p>
* </li>
* <li>
* <p>
* <i>event_namespace</i> is determined by the partner, and is a way for
* the partner to categorize their events.</p>
* </li>
* <li>
* <p>
* <i>event_name</i> is determined by the partner, and should uniquely identify
* an event-generating resource within the partner system. </p>
* <p>The <i>event_name</i> must be unique across all Amazon Web Services customers. This is because the event source is a shared resource
* between the partner and customer accounts, and each partner event source unique in the partner account.</p>
* </li>
* </ul>
* <p>The combination of
* <i>event_namespace</i> and <i>event_name</i> should help Amazon Web Services
* customers decide whether to create an event bus to receive these events.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface DeleteEndpointCommandOutput extends DeleteEndpointResponse, __M

/**
* @public
* <p>Delete an existing global endpoint. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the Amazon EventBridge User Guide.</p>
* <p>Delete an existing global endpoint. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the <i>Amazon EventBridge User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface DescribeEndpointCommandOutput extends DescribeEndpointResponse,

/**
* @public
* <p>Get the information about an existing global endpoint. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the Amazon EventBridge User Guide..</p>
* <p>Get the information about an existing global endpoint. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the <i>Amazon EventBridge User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface DescribeRuleCommandOutput extends DescribeRuleResponse, __Metad
* // Arn: "STRING_VALUE",
* // EventPattern: "STRING_VALUE",
* // ScheduleExpression: "STRING_VALUE",
* // State: "ENABLED" || "DISABLED",
* // State: "ENABLED" || "DISABLED" || "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS",
* // Description: "STRING_VALUE",
* // RoleArn: "STRING_VALUE",
* // ManagedBy: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface ListEndpointsCommandOutput extends ListEndpointsResponse, __Met

/**
* @public
* <p>List the global endpoints associated with this account. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the Amazon EventBridge User Guide..</p>
* <p>List the global endpoints associated with this account. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the <i>Amazon EventBridge User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface ListRuleNamesByTargetCommandOutput extends ListRuleNamesByTarge
* @public
* <p>Lists the rules for the specified target. You can see which of the rules in Amazon
* EventBridge can invoke a specific target in your account.</p>
* <p>The maximum number of results per page for requests is 100.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
3 changes: 2 additions & 1 deletion clients/client-eventbridge/src/commands/ListRulesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface ListRulesCommandOutput extends ListRulesResponse, __MetadataBea
* @public
* <p>Lists your Amazon EventBridge rules. You can either list all the rules or you can provide
* a prefix to match to the rule names.</p>
* <p>The maximum number of results per page for requests is 100.</p>
* <p>ListRules does not list the targets of a rule. To see the targets associated with a rule,
* use <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListTargetsByRule.html">ListTargetsByRule</a>.</p>
* @example
Expand All @@ -61,7 +62,7 @@ export interface ListRulesCommandOutput extends ListRulesResponse, __MetadataBea
* // Name: "STRING_VALUE",
* // Arn: "STRING_VALUE",
* // EventPattern: "STRING_VALUE",
* // State: "ENABLED" || "DISABLED",
* // State: "ENABLED" || "DISABLED" || "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS",
* // Description: "STRING_VALUE",
* // ScheduleExpression: "STRING_VALUE",
* // RoleArn: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface ListTargetsByRuleCommandOutput extends ListTargetsByRuleRespons
/**
* @public
* <p>Lists the targets assigned to the specified rule.</p>
* <p>The maximum number of results per page for requests is 100.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
7 changes: 7 additions & 0 deletions clients/client-eventbridge/src/commands/PutEventsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ export interface PutEventsCommandOutput extends PutEventsResponse, __MetadataBea
/**
* @public
* <p>Sends custom events to Amazon EventBridge so that they can be matched to rules.</p>
* <p>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
* <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-putevent-size.html">Calculating PutEvents event entry size</a> in the <i>Amazon EventBridge User Guide</i>
* </p>
* <p>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.</p>
* <note>
* <p>PutEvents will only process nested JSON up to 1100 levels deep.</p>
* </note>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export interface PutPartnerEventsCommandOutput extends PutPartnerEventsResponse,
* @public
* <p>This is used by SaaS partners to write events to a customer's partner event bus. Amazon Web Services
* customers do not use this operation.</p>
* <p>For information on calculating event batch size, see
* <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-putevent-size.html">Calculating EventBridge PutEvents event entry size</a>
* in the <i>EventBridge User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-eventbridge/src/commands/PutRuleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export interface PutRuleCommandOutput extends PutRuleResponse, __MetadataBearer
* Name: "STRING_VALUE", // required
* ScheduleExpression: "STRING_VALUE",
* EventPattern: "STRING_VALUE",
* State: "ENABLED" || "DISABLED",
* State: "ENABLED" || "DISABLED" || "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS",
* Description: "STRING_VALUE",
* RoleArn: "STRING_VALUE",
* Tags: [ // TagList
Expand Down
123 changes: 29 additions & 94 deletions clients/client-eventbridge/src/commands/PutTargetsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,126 +40,57 @@ export interface PutTargetsCommandOutput extends PutTargetsResponse, __MetadataB
* <p>Adds the specified targets to the specified rule, or updates the targets if they are
* already associated with the rule.</p>
* <p>Targets are the resources that are invoked when a rule is triggered.</p>
* <p>The maximum number of entries per request is 10.</p>
* <note>
* <p>Each rule can have up to five (5) targets associated with it at one time.</p>
* </note>
* <p>You can configure the following as targets for Events:</p>
* <p>For a list of services you can configure as targets for events, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html">EventBridge targets</a>
* in the <i>Amazon EventBridge User Guide</i>.</p>
* <p>Creating rules with built-in targets is supported only in the Amazon Web Services Management Console. The
* built-in targets are:</p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html">API destination</a>
* <code>Amazon EBS CreateSnapshot API call</code>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-gateway-target.html">API Gateway</a>
* <code>Amazon EC2 RebootInstances API call</code>
* </p>
* </li>
* <li>
* <p>Batch job queue</p>
* </li>
* <li>
* <p>CloudWatch group</p>
* </li>
* <li>
* <p>CodeBuild project</p>
* </li>
* <li>
* <p>CodePipeline</p>
* </li>
* <li>
* <p>EC2 <code>CreateSnapshot</code> API call</p>
* </li>
* <li>
* <p>EC2 Image Builder</p>
* </li>
* <li>
* <p>EC2 <code>RebootInstances</code> API call</p>
* </li>
* <li>
* <p>EC2 <code>StopInstances</code> API call</p>
* </li>
* <li>
* <p>EC2 <code>TerminateInstances</code> API call</p>
* </li>
* <li>
* <p>ECS task</p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cross-account.html">Event bus in a different account or
* Region</a>
* <code>Amazon EC2 StopInstances API call</code>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-bus-to-bus.html">Event bus in the same account and
* Region</a>
* <code>Amazon EC2 TerminateInstances API
* call</code>
* </p>
* </li>
* <li>
* <p>Firehose delivery stream</p>
* </li>
* <li>
* <p>Glue workflow</p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/incident-manager/latest/userguide/incident-creation.html#incident-tracking-auto-eventbridge">Incident Manager response plan</a>
* </p>
* </li>
* <li>
* <p>Inspector assessment template</p>
* </li>
* <li>
* <p>Kinesis stream</p>
* </li>
* <li>
* <p>Lambda function</p>
* </li>
* <li>
* <p>Redshift cluster</p>
* </li>
* <li>
* <p>Redshift Serverless workgroup</p>
* </li>
* <li>
* <p>SageMaker Pipeline</p>
* </li>
* <li>
* <p>SNS topic</p>
* </li>
* <li>
* <p>SQS queue</p>
* </li>
* <li>
* <p>Step Functions state machine</p>
* </li>
* <li>
* <p>Systems Manager Automation</p>
* </li>
* <li>
* <p>Systems Manager OpsItem</p>
* </li>
* <li>
* <p>Systems Manager Run Command</p>
* </li>
* </ul>
* <p>Creating rules with built-in targets is supported only in the Amazon Web Services Management Console. The
* built-in targets are <code>EC2 CreateSnapshot API call</code>, <code>EC2 RebootInstances API
* call</code>, <code>EC2 StopInstances API call</code>, and <code>EC2 TerminateInstances API
* call</code>. </p>
* <p>For some target types, <code>PutTargets</code> provides target-specific parameters. If the
* target is a Kinesis data stream, you can optionally specify which shard the event goes to by
* using the <code>KinesisParameters</code> argument. To invoke a command on multiple EC2
* instances with one rule, you can use the <code>RunCommandParameters</code> field.</p>
* <p>To be able to make API calls against the resources that you own, Amazon EventBridge
* needs the appropriate permissions. For Lambda and Amazon SNS
* resources, EventBridge relies on resource-based policies. For EC2 instances, Kinesis Data Streams,
* Step Functions state machines and API Gateway APIs, EventBridge relies on
* IAM roles that you specify in the <code>RoleARN</code> argument in <code>PutTargets</code>.
* For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html">Authentication
* and Access Control</a> in the <i>Amazon EventBridge User Guide</i>.</p>
* needs the appropriate permissions:
* </p>
* <ul>
* <li>
* <p>For Lambda and Amazon SNS
* resources, EventBridge relies on resource-based policies.</p>
* </li>
* <li>
* <p>For EC2 instances, Kinesis Data Streams,
* Step Functions state machines and API Gateway APIs, EventBridge relies on
* IAM roles that you specify in the <code>RoleARN</code> argument in <code>PutTargets</code>.</p>
* </li>
* </ul>
* <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html">Authentication
* and Access Control</a> in the <i>Amazon EventBridge User Guide</i>.</p>
* <p>If another Amazon Web Services account is in the same region and has granted you permission (using
* <code>PutPermission</code>), you can send events to that account. Set that account's event
* bus as a target of the rules in your account. To send the matched events to the other account,
Expand All @@ -180,6 +111,10 @@ export interface PutTargetsCommandOutput extends PutTargetsResponse, __MetadataB
* <code>Target</code> structure. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html">Sending and
* Receiving Events Between Amazon Web Services Accounts</a> in the <i>Amazon EventBridge User
* Guide</i>.</p>
* <note>
* <p>If you have an IAM role on a cross-account event bus target,
* a <code>PutTargets</code> call without a role on the same target (same <code>Id</code> and <code>Arn</code>) will not remove the role.</p>
* </note>
* <p>For more information about enabling cross-account events, see <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPermission.html">PutPermission</a>.</p>
* <p>
* <b>Input</b>, <b>InputPath</b>, and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export interface RemoveTargetsCommandOutput extends RemoveTargetsResponse, __Met
* <p>This action can partially fail if too many requests are made at the same time. If that
* happens, <code>FailedEntryCount</code> is non-zero in the response and each entry in
* <code>FailedEntries</code> provides the ID of the failed target and the error code.</p>
* <p>The maximum number of entries per request is 10.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface UpdateEndpointCommandOutput extends UpdateEndpointResponse, __M

/**
* @public
* <p>Update an existing endpoint. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the Amazon EventBridge User Guide..</p>
* <p>Update an existing endpoint. For more information about global endpoints, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html">Making applications Regional-fault tolerant with global endpoints and event replication</a> in the <i>Amazon EventBridge User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Loading

0 comments on commit e581203

Please sign in to comment.