Skip to content

Commit

Permalink
docs(client-cloudwatch-logs): Update to remove sequenceToken as a req…
Browse files Browse the repository at this point in the history
…uired field in PutLogEvents calls.
  • Loading branch information
awstools committed Jan 4, 2023
1 parent 124b702 commit 5d59f31
Show file tree
Hide file tree
Showing 10 changed files with 362 additions and 348 deletions.
32 changes: 13 additions & 19 deletions clients/client-cloudwatch-logs/src/CloudWatchLogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
* <p>You can export logs from multiple log groups or multiple time ranges to the same S3
* bucket. To separate log data for each export task, specify a prefix to be used as the Amazon
* S3 key prefix for all exported objects.</p>
*
* <note>
* <p>Time-based sorting on chunks of log data inside an exported file is not guaranteed. You can
* sort the exported log field data by using Linux utilities.</p>
Expand Down Expand Up @@ -1156,7 +1155,6 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
* <p>Lists log events from the specified log group. You can list all the log events or filter the results
* using a filter pattern, a time range, and the name of the log stream.</p>
* <p>You must have the <code>logs;FilterLogEvents</code> permission to perform this operation.</p>
*
* <p>By default, this operation returns as many log events as can fit in 1 MB (up to 10,000
* log events) or all the events found within the specified time range. If the results include a
* token, that means there are more log events available. You can get additional results by
Expand Down Expand Up @@ -1232,11 +1230,9 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
/**
* <p>Lists log events from the specified log stream. You can list all of the log events or
* filter using a time range.</p>
*
* <p>By default, this operation returns as many log events as can fit in a response size of 1MB (up to 10,000 log events).
* You can get additional log events by specifying one of the tokens in a subsequent call.
* This operation can return empty results while there are more log events available through the token.</p>
*
* <p>If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and
* view data from the linked source accounts. For more information, see
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html">CloudWatch cross-account observability</a>.</p>
Expand Down Expand Up @@ -1548,9 +1544,6 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
* <p>Creates or updates an access policy associated with an existing
* destination. An access policy is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html">IAM policy document</a> that is used
* to authorize claims to register a subscription filter against a given destination.</p>
* <p>If multiple Amazon Web Services accounts are sending logs to this destination, each sender account must be
* listed separately in the policy. The policy does not support specifying <code>*</code>
* as the Principal or the use of the <code>aws:PrincipalOrgId</code> global key.</p>
*/
public putDestinationPolicy(
args: PutDestinationPolicyCommandInput,
Expand Down Expand Up @@ -1583,12 +1576,13 @@ export class CloudWatchLogs extends CloudWatchLogsClient {

/**
* <p>Uploads a batch of log events to the specified log stream.</p>
* <p>You must include the sequence token obtained from the response of the previous call. An
* upload in a newly created log stream does not require a sequence token. You can also get the
* sequence token in the <code>expectedSequenceToken</code> field from
* <code>InvalidSequenceTokenException</code>. If you call <code>PutLogEvents</code> twice
* within a narrow time period using the same value for <code>sequenceToken</code>, both calls
* might be successful or one might be rejected.</p>
* <important>
* <p>The sequence token is now ignored in <code>PutLogEvents</code>
* actions. <code>PutLogEvents</code>
* actions are always accepted and never return <code>InvalidSequenceTokenException</code> or
* <code>DataAlreadyAcceptedException</code> even if the sequence token is not valid. You can use
* parallel <code>PutLogEvents</code> actions on the same log stream. </p>
* </important>
* <p>The batch of events must satisfy the following constraints:</p>
* <ul>
* <li>
Expand Down Expand Up @@ -1617,8 +1611,12 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
* <p>The maximum number of log events in a batch is 10,000.</p>
* </li>
* <li>
* <p>There is a quota of five requests per second per log stream. Additional requests
* are throttled. This quota can't be changed.</p>
* <important>
* <p>The quota of five requests per second per log stream
* has been removed. Instead, <code>PutLogEvents</code> actions are throttled based on a
* per-second per-account quota. You can request an increase to the per-second throttling
* quota by using the Service Quotas service.</p>
* </important>
* </li>
* </ul>
* <p>If a call to <code>PutLogEvents</code> returns "UnrecognizedClientException" the most
Expand Down Expand Up @@ -1707,7 +1705,6 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
/**
* <p>Creates or updates a query definition for CloudWatch Logs Insights. For
* more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html">Analyzing Log Data with CloudWatch Logs Insights</a>.</p>
*
* <p>To update a query definition, specify its <code>queryDefinitionId</code> in your request.
* The values of <code>name</code>, <code>queryString</code>, and <code>logGroupNames</code> are
* changed to the values that you specify in your update operation. No current values are
Expand Down Expand Up @@ -1890,16 +1887,13 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
* <p>Schedules a query of a log group using CloudWatch Logs Insights. You specify the log group
* and time range to query and the query string to use.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch Logs Insights Query Syntax</a>.</p>
*
* <p>Queries time out after 15 minutes of runtime. If your queries are timing out, reduce the
* time range being searched or partition your query into a number of queries.</p>
*
* <p>If you are using CloudWatch cross-account observability, you can use this operation in a
* monitoring account to start a query in a linked source account. For more information, see
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html">CloudWatch
* cross-account observability</a>. For a cross-account <code>StartQuery</code> operation,
* the query definition must be defined in the monitoring account.</p>
*
* <p>You can have up to 20 concurrent CloudWatch Logs insights queries, including queries
* that have been added to dashboards. </p>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export interface CreateExportTaskCommandOutput extends CreateExportTaskResponse,
* <p>You can export logs from multiple log groups or multiple time ranges to the same S3
* bucket. To separate log data for each export task, specify a prefix to be used as the Amazon
* S3 key prefix for all exported objects.</p>
*
* <note>
* <p>Time-based sorting on chunks of log data inside an exported file is not guaranteed. You can
* sort the exported log field data by using Linux utilities.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export interface FilterLogEventsCommandOutput extends FilterLogEventsResponse, _
* <p>Lists log events from the specified log group. You can list all the log events or filter the results
* using a filter pattern, a time range, and the name of the log stream.</p>
* <p>You must have the <code>logs;FilterLogEvents</code> permission to perform this operation.</p>
*
* <p>By default, this operation returns as many log events as can fit in 1 MB (up to 10,000
* log events) or all the events found within the specified time range. If the results include a
* token, that means there are more log events available. You can get additional results by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ export interface GetLogEventsCommandOutput extends GetLogEventsResponse, __Metad
/**
* <p>Lists log events from the specified log stream. You can list all of the log events or
* filter using a time range.</p>
*
* <p>By default, this operation returns as many log events as can fit in a response size of 1MB (up to 10,000 log events).
* You can get additional log events by specifying one of the tokens in a subsequent call.
* This operation can return empty results while there are more log events available through the token.</p>
*
* <p>If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and
* view data from the linked source accounts. For more information, see
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html">CloudWatch cross-account observability</a>.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ export interface PutDestinationPolicyCommandOutput extends __MetadataBearer {}
* <p>Creates or updates an access policy associated with an existing
* destination. An access policy is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html">IAM policy document</a> that is used
* to authorize claims to register a subscription filter against a given destination.</p>
* <p>If multiple Amazon Web Services accounts are sending logs to this destination, each sender account must be
* listed separately in the policy. The policy does not support specifying <code>*</code>
* as the Principal or the use of the <code>aws:PrincipalOrgId</code> global key.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
21 changes: 13 additions & 8 deletions clients/client-cloudwatch-logs/src/commands/PutLogEventsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ export interface PutLogEventsCommandOutput extends PutLogEventsResponse, __Metad

/**
* <p>Uploads a batch of log events to the specified log stream.</p>
* <p>You must include the sequence token obtained from the response of the previous call. An
* upload in a newly created log stream does not require a sequence token. You can also get the
* sequence token in the <code>expectedSequenceToken</code> field from
* <code>InvalidSequenceTokenException</code>. If you call <code>PutLogEvents</code> twice
* within a narrow time period using the same value for <code>sequenceToken</code>, both calls
* might be successful or one might be rejected.</p>
* <important>
* <p>The sequence token is now ignored in <code>PutLogEvents</code>
* actions. <code>PutLogEvents</code>
* actions are always accepted and never return <code>InvalidSequenceTokenException</code> or
* <code>DataAlreadyAcceptedException</code> even if the sequence token is not valid. You can use
* parallel <code>PutLogEvents</code> actions on the same log stream. </p>
* </important>
* <p>The batch of events must satisfy the following constraints:</p>
* <ul>
* <li>
Expand Down Expand Up @@ -64,8 +65,12 @@ export interface PutLogEventsCommandOutput extends PutLogEventsResponse, __Metad
* <p>The maximum number of log events in a batch is 10,000.</p>
* </li>
* <li>
* <p>There is a quota of five requests per second per log stream. Additional requests
* are throttled. This quota can't be changed.</p>
* <important>
* <p>The quota of five requests per second per log stream
* has been removed. Instead, <code>PutLogEvents</code> actions are throttled based on a
* per-second per-account quota. You can request an increase to the per-second throttling
* quota by using the Service Quotas service.</p>
* </important>
* </li>
* </ul>
* <p>If a call to <code>PutLogEvents</code> returns "UnrecognizedClientException" the most
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export interface PutQueryDefinitionCommandOutput extends PutQueryDefinitionRespo
/**
* <p>Creates or updates a query definition for CloudWatch Logs Insights. For
* more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html">Analyzing Log Data with CloudWatch Logs Insights</a>.</p>
*
* <p>To update a query definition, specify its <code>queryDefinitionId</code> in your request.
* The values of <code>name</code>, <code>queryString</code>, and <code>logGroupNames</code> are
* changed to the values that you specify in your update operation. No current values are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ export interface StartQueryCommandOutput extends StartQueryResponse, __MetadataB
* <p>Schedules a query of a log group using CloudWatch Logs Insights. You specify the log group
* and time range to query and the query string to use.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch Logs Insights Query Syntax</a>.</p>
*
* <p>Queries time out after 15 minutes of runtime. If your queries are timing out, reduce the
* time range being searched or partition your query into a number of queries.</p>
*
* <p>If you are using CloudWatch cross-account observability, you can use this operation in a
* monitoring account to start a query in a linked source account. For more information, see
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html">CloudWatch
* cross-account observability</a>. For a cross-account <code>StartQuery</code> operation,
* the query definition must be defined in the monitoring account.</p>
*
* <p>You can have up to 20 concurrent CloudWatch Logs insights queries, including queries
* that have been added to dashboards. </p>
* @example
Expand Down
48 changes: 37 additions & 11 deletions clients/client-cloudwatch-logs/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@ export interface CreateLogStreamRequest {

/**
* <p>The event was already logged.</p>
* <important>
* <p>
* <code>PutLogEvents</code>
* actions are now always accepted and never return
* <code>DataAlreadyAcceptedException</code> regardless of whether a given batch of log events
* has already been accepted. </p>
* </important>
*/
export class DataAlreadyAcceptedException extends __BaseException {
readonly name: "DataAlreadyAcceptedException" = "DataAlreadyAcceptedException";
Expand Down Expand Up @@ -581,9 +588,6 @@ export interface DescribeLogGroupsRequest {
* that match the string based on a case-sensitive substring search. For example, if you specify <code>Foo</code>, log groups
* named <code>FooBar</code>, <code>aws/Foo</code>, and <code>GroupFoo</code> would match, but <code>foo</code>,
* <code>F/o/o</code> and <code>Froo</code> would not match.</p>
*
*
*
* <note>
* <p>
* <code>logGroupNamePattern</code> and <code>logGroupNamePrefix</code> are mutually exclusive.
Expand All @@ -608,8 +612,6 @@ export interface DescribeLogGroupsRequest {
* <p>If you are using a monitoring account, set this to <code>True</code> to have the operation
* return log groups in
* the accounts listed in <code>accountIdentifiers</code>.</p>
*
*
* <p>If this parameter is set to <code>true</code> and <code>accountIdentifiers</code>
*
* contains a null value, the operation returns all log groups in the monitoring account
Expand Down Expand Up @@ -785,12 +787,19 @@ export interface LogStream {

/**
* <p>The ingestion time, expressed as the number of milliseconds after <code>Jan 1, 1970
* 00:00:00 UTC</code>.</p>
* 00:00:00 UTC</code> The <code>lastIngestionTime</code> value updates on an eventual consistency basis. It
* typically updates in less than an hour after ingestion, but in rare situations might take longer.</p>
*/
lastIngestionTime?: number;

/**
* <p>The sequence token.</p>
* <important>
* <p>The sequence token is now ignored in
* <code>PutLogEvents</code>
* actions. <code>PutLogEvents</code> actions are always accepted regardless of receiving an invalid sequence token.
* You don't need to obtain <code>uploadSequenceToken</code> to use a <code>PutLogEvents</code> action.</p>
* </important>
*/
uploadSequenceToken?: string;

Expand Down Expand Up @@ -1723,6 +1732,12 @@ export interface InputLogEvent {
* <p>The sequence token is not valid. You can get the correct sequence token in
* the <code>expectedSequenceToken</code> field in the <code>InvalidSequenceTokenException</code>
* message. </p>
* <important>
* <p>
* <code>PutLogEvents</code>
* actions are now always accepted and never return
* <code>InvalidSequenceTokenException</code> regardless of receiving an invalid sequence token. </p>
* </important>
*/
export class InvalidSequenceTokenException extends __BaseException {
readonly name: "InvalidSequenceTokenException" = "InvalidSequenceTokenException";
Expand Down Expand Up @@ -1917,10 +1932,13 @@ export interface PutLogEventsRequest {

/**
* <p>The sequence token obtained from the response of the previous <code>PutLogEvents</code>
* call. An upload in a newly created log stream does not require a sequence token. You can also
* get the sequence token using <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogStreams.html">DescribeLogStreams</a>. If you call <code>PutLogEvents</code> twice within a narrow
* time period using the same value for <code>sequenceToken</code>, both calls might be
* successful or one might be rejected.</p>
* call.</p>
* <important>
* <p>The <code>sequenceToken</code> parameter is now ignored in <code>PutLogEvents</code>
* actions. <code>PutLogEvents</code>
* actions are now accepted and never return <code>InvalidSequenceTokenException</code> or
* <code>DataAlreadyAcceptedException</code> even if the sequence token is not valid.</p>
* </important>
*/
sequenceToken?: string;
}
Expand Down Expand Up @@ -1948,6 +1966,15 @@ export interface RejectedLogEventsInfo {
export interface PutLogEventsResponse {
/**
* <p>The next sequence token.</p>
* <important>
* <p>This field has been deprecated.</p>
* <p>The sequence token is now ignored in <code>PutLogEvents</code>
* actions. <code>PutLogEvents</code>
* actions are always accepted even if the sequence token is not valid. You can use
* parallel <code>PutLogEvents</code> actions on the same log stream and you do not need
* to wait for the response of a previous <code>PutLogEvents</code> action to obtain
* the <code>nextSequenceToken</code> value.</p>
* </important>
*/
nextSequenceToken?: string;

Expand Down Expand Up @@ -2083,7 +2110,6 @@ export interface PutResourcePolicyRequest {
* }
* ]
* }</code>
*
* </p>
*/
policyDocument?: string;
Expand Down
Loading

0 comments on commit 5d59f31

Please sign in to comment.