Skip to content

Commit

Permalink
feat(client-cloudwatch-logs): This release introduces a new optional …
Browse files Browse the repository at this point in the history
…parameter: Entity, in PutLogEvents request
  • Loading branch information
awstools committed Aug 30, 2024
1 parent a30b03e commit 4723f34
Show file tree
Hide file tree
Showing 8 changed files with 275 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface PutAccountPolicyCommandOutput extends PutAccountPolicyResponse,
* delivery. Kinesis Data Streams and Firehose are supported as logical destinations.</p>
* </li>
* </ul>
* <p>Each account can have one account-level subscription filter policy.
* <p>Each account can have one account-level subscription filter policy per Region.
* If you are updating an existing filter, you must specify the correct name in <code>PolicyName</code>.
* To perform a <code>PutAccountPolicy</code> subscription filter operation for any destination except a Lambda
* function, you must also have the <code>iam:PassRole</code> permission.</p>
Expand Down
11 changes: 11 additions & 0 deletions clients/client-cloudwatch-logs/src/commands/PutLogEventsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ export interface PutLogEventsCommandOutput extends PutLogEventsResponse, __Metad
* },
* ],
* sequenceToken: "STRING_VALUE",
* entity: { // Entity
* keyAttributes: { // EntityKeyAttributes
* "<keys>": "STRING_VALUE",
* },
* attributes: { // EntityAttributes
* "<keys>": "STRING_VALUE",
* },
* },
* };
* const command = new PutLogEventsCommand(input);
* const response = await client.send(command);
Expand All @@ -103,6 +111,9 @@ export interface PutLogEventsCommandOutput extends PutLogEventsResponse, __Metad
* // tooOldLogEventEndIndex: Number("int"),
* // expiredLogEventEndIndex: Number("int"),
* // },
* // rejectedEntityInfo: { // RejectedEntityInfo
* // errorType: "InvalidEntity" || "InvalidTypeValue" || "InvalidKeyAttributes" || "InvalidAttributes" || "EntitySizeTooLarge" || "UnsupportedLogGroupType" || "MissingRequiredFields", // required
* // },
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ export interface PutMetricFilterCommandOutput extends __MetadataBearer {}
* through <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html">PutLogEvents</a>.</p>
* <p>The maximum number of metric filters that can be associated with a log group is
* 100.</p>
* <p>Using regular expressions to create metric filters is supported. For these filters,
* there is a quotas of quota of two regular expression patterns within a single filter pattern. There
* is also a quota of five regular expression patterns per log group.
* For more information about using regular expressions in metric filters,
* see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html">
* Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail</a>.</p>
* <p>When you create a metric filter, you can also optionally assign a unit and dimensions
* to the metric that is created.</p>
* <important>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ export interface PutSubscriptionFilterCommandOutput extends __MetadataBearer {}
* <p>Each log group can have up to two subscription filters associated with it. If you are
* updating an existing filter, you must specify the correct name in <code>filterName</code>.
* </p>
* <p>Using regular expressions to create subscription filters is supported. For these filters,
* there is a quotas of quota of two regular expression patterns within a single filter pattern. There
* is also a quota of five regular expression patterns per log group.
* For more information about using regular expressions in subscription filters,
* see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html">
* Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail</a>.</p>
* <p>To perform a <code>PutSubscriptionFilter</code> operation for any destination except a Lambda function,
* you must also have the
* <code>iam:PassRole</code> permission.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ export interface StartLiveTailCommandOutput extends StartLiveTailResponse, __Met
* which it starts dropping the oldest events.</p>
* </li>
* <li>
* <p>A <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionStreamingException.html">SessionStreamingException</a>
* <p>A <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartLiveTailResponseStream.html#CWL-Type-StartLiveTailResponseStream-SessionStreamingException">SessionStreamingException</a>
* object is returned if an unknown error occurs on the server side.</p>
* </li>
* <li>
* <p>A <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionTimeoutException.html">SessionTimeoutException</a>
* <p>A <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartLiveTailResponseStream.html#CWL-Type-StartLiveTailResponseStream-SessionTimeoutException">SessionTimeoutException</a>
* object is returned when the session times out, after it has been kept open for three hours.</p>
* </li>
* </ul>
Expand Down
78 changes: 71 additions & 7 deletions clients/client-cloudwatch-logs/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export interface LogEvent {
}

/**
* <p>A tructures that contains information about one pattern token related to
* <p>A structure that contains information about one pattern token related to
* an anomaly.</p>
* <p>For more information about patterns and tokens, see <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogAnomalyDetector.html">CreateLogAnomalyDetector</a>.
* </p>
Expand Down Expand Up @@ -2844,6 +2844,43 @@ export interface DisassociateKmsKeyRequest {
resourceIdentifier?: string;
}

/**
* <p>Reserved for future use.</p>
* @public
*/
export interface Entity {
/**
* <p>Reserved for future use.</p>
* @public
*/
keyAttributes?: Record<string, string>;

/**
* <p>Reserved for future use.</p>
* @public
*/
attributes?: Record<string, string>;
}

/**
* @public
* @enum
*/
export const EntityRejectionErrorType = {
ENTITY_SIZE_TOO_LARGE: "EntitySizeTooLarge",
INVALID_ATTRIBUTES: "InvalidAttributes",
INVALID_ENTITY: "InvalidEntity",
INVALID_KEY_ATTRIBUTE: "InvalidKeyAttributes",
INVALID_TYPE_VALUE: "InvalidTypeValue",
MISSING_REQUIRED_FIELDS: "MissingRequiredFields",
UNSUPPORTED_LOG_GROUP_TYPE: "UnsupportedLogGroupType",
} as const;

/**
* @public
*/
export type EntityRejectionErrorType = (typeof EntityRejectionErrorType)[keyof typeof EntityRejectionErrorType];

/**
* <p>Represents a matched event.</p>
* @public
Expand Down Expand Up @@ -2913,17 +2950,16 @@ export interface FilterLogEventsRequest {

/**
* <p>Filters the results to only logs from the log streams in this list.</p>
* <p>If you specify a value for both <code>logStreamNamePrefix</code> and <code>logStreamNames</code>, the action
* <p>If you specify a value for both <code>logStreamNames</code> and <code>logStreamNamePrefix</code>, the action
* returns an <code>InvalidParameterException</code> error.</p>
* @public
*/
logStreamNames?: string[];

/**
* <p>Filters the results to include only events from log streams that have names starting with this prefix.</p>
* <p>If you specify a value for both <code>logStreamNamePrefix</code> and <code>logStreamNames</code>, but the value for
* <code>logStreamNamePrefix</code> does not match any log stream names specified in <code>logStreamNames</code>, the action
* returns an <code>InvalidParameterException</code> error.</p>
* <p>If you specify a value for both <code>logStreamNamePrefix</code> and <code>logStreamNames</code>, the action
* returns an <code>InvalidParameterException</code> error.</p>
* @public
*/
logStreamNamePrefix?: string;
Expand Down Expand Up @@ -4008,7 +4044,7 @@ export interface PutAccountPolicyRequest {
* </li>
* <li>
* <p>
* <b>Distribution</b>The method used to distribute log data to the destination.
* <b>Distribution</b> The method used to distribute log data to the destination.
* By default, log data is
* grouped by log stream, but the grouping can be set to <code>Random</code> for a more even distribution.
* This property is only applicable when the destination is an Kinesis Data Streams data stream.</p>
Expand Down Expand Up @@ -4222,11 +4258,15 @@ export interface PutDeliverySourceRequest {
* <p>Defines the type of log that the source is sending.</p>
* <ul>
* <li>
* <p>For Amazon Bedrock, the valid value is
* <code>APPLICATION_LOGS</code>.</p>
* </li>
* <li>
* <p>For Amazon CodeWhisperer, the valid value is
* <code>EVENT_LOGS</code>.</p>
* </li>
* <li>
* <p>For IAM Identity Centerr, the valid value is
* <p>For IAM Identity Center, the valid value is
* <code>ERROR_LOGS</code>.</p>
* </li>
* <li>
Expand Down Expand Up @@ -4371,6 +4411,24 @@ export interface PutLogEventsRequest {
* @public
*/
sequenceToken?: string;

/**
* <p>Reserved for future use.</p>
* @public
*/
entity?: Entity;
}

/**
* <p>Reserved for future use.</p>
* @public
*/
export interface RejectedEntityInfo {
/**
* <p>Reserved for future use.</p>
* @public
*/
errorType: EntityRejectionErrorType | undefined;
}

/**
Expand Down Expand Up @@ -4421,6 +4479,12 @@ export interface PutLogEventsResponse {
* @public
*/
rejectedLogEventsInfo?: RejectedLogEventsInfo;

/**
* <p>Reserved for future use.</p>
* @public
*/
rejectedEntityInfo?: RejectedEntityInfo;
}

/**
Expand Down
9 changes: 9 additions & 0 deletions clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ import {
DescribeResourcePoliciesRequest,
DescribeSubscriptionFiltersRequest,
DisassociateKmsKeyRequest,
Entity,
FilterLogEventsRequest,
GetDataProtectionPolicyRequest,
GetDeliveryDestinationPolicyRequest,
Expand Down Expand Up @@ -3173,6 +3174,12 @@ const de_SessionTimeoutExceptionRes = async (

// se_DisassociateKmsKeyRequest omitted.

// se_Entity omitted.

// se_EntityAttributes omitted.

// se_EntityKeyAttributes omitted.

// se_FilterLogEventsRequest omitted.

// se_GetDataProtectionPolicyRequest omitted.
Expand Down Expand Up @@ -3613,6 +3620,8 @@ const de_QueryStatistics = (output: any, context: __SerdeContext): QueryStatisti
}) as any;
};

// de_RejectedEntityInfo omitted.

// de_RejectedLogEventsInfo omitted.

// de_ResourceAlreadyExistsException omitted.
Expand Down
Loading

0 comments on commit 4723f34

Please sign in to comment.