Skip to content

Commit

Permalink
feat(client-cloudwatch-logs): Update LogSamples field in Anomaly mode…
Browse files Browse the repository at this point in the history
…l to be a list of LogEvent
  • Loading branch information
awstools committed Mar 19, 2024
1 parent 1c3d2b4 commit d5823e3
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 44 deletions.
Expand Up @@ -35,7 +35,7 @@ export interface CreateDeliveryCommandOutput extends CreateDeliveryResponse, __M
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html">Enabling
* logging from Amazon Web Services services.</a>
* </p>
* <p>A delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Kinesis Data Firehose.</p>
* <p>A delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Firehose.</p>
* <p>To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:</p>
* <ul>
* <li>
Expand Down
Expand Up @@ -36,7 +36,7 @@ export interface DescribeDeliveriesCommandOutput extends DescribeDeliveriesRespo
* <i>delivery destination</i>
* </a>.</p>
* <p>A delivery source represents an Amazon Web Services resource that sends logs to an logs delivery destination.
* The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.
* The destination can be CloudWatch Logs, Amazon S3, or Firehose.
* Only some Amazon Web Services services support being configured as a delivery source. These services are listed
* in <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html">Enable logging from Amazon Web Services
* services.</a>
Expand Down
Expand Up @@ -35,7 +35,7 @@ export interface GetDeliveryCommandOutput extends GetDeliveryResponse, __Metadat
* <i>delivery destination</i>
* </a>.</p>
* <p>A delivery source represents an Amazon Web Services resource that sends logs to an logs delivery destination.
* The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.
* The destination can be CloudWatch Logs, Amazon S3, or Firehose.
* Only some Amazon Web Services services support being configured as a delivery source. These services are listed
* in <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html">Enable logging from Amazon Web Services
* services.</a>
Expand Down
Expand Up @@ -61,7 +61,10 @@ export interface ListAnomaliesCommandOutput extends ListAnomaliesResponse, __Met
* // "<keys>": Number("long"),
* // },
* // logSamples: [ // LogSamples // required
* // "STRING_VALUE",
* // { // LogEvent
* // timestamp: Number("long"),
* // message: "STRING_VALUE",
* // },
* // ],
* // patternTokens: [ // PatternTokens // required
* // { // PatternToken
Expand Down
Expand Up @@ -65,7 +65,7 @@ export interface PutAccountPolicyCommandOutput extends PutAccountPolicyResponse,
* </p>
* <p>A subscription filter policy sets up a real-time feed of log events from CloudWatch Logs to other Amazon Web Services services.
* Account-level subscription filter policies apply to both existing log groups and log groups that are created later in
* this account. Supported destinations are Kinesis Data Streams, Kinesis Data Firehose, and
* this account. Supported destinations are Kinesis Data Streams, Firehose, and
* Lambda. When log events are sent to the receiving service, they are Base64 encoded and
* compressed with the GZIP format.</p>
* <p>The following destinations are supported for subscription filters:</p>
Expand All @@ -74,14 +74,14 @@ export interface PutAccountPolicyCommandOutput extends PutAccountPolicyResponse,
* <p>An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.</p>
* </li>
* <li>
* <p>An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery.</p>
* <p>An Firehose data stream in the same account as the subscription policy, for same-account delivery.</p>
* </li>
* <li>
* <p>A Lambda function in the same account as the subscription policy, for same-account delivery.</p>
* </li>
* <li>
* <p>A logical destination in a different account created with <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html">PutDestination</a>, for cross-account
* delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations.</p>
* 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.
Expand Down
Expand Up @@ -29,7 +29,7 @@ export interface PutDeliveryDestinationCommandOutput extends PutDeliveryDestinat
/**
* <p>Creates or updates a logical <i>delivery destination</i>. A delivery destination is an Amazon Web Services resource that represents an
* Amazon Web Services service that logs can be sent to. CloudWatch Logs, Amazon S3, and
* Kinesis Data Firehose are supported as logs delivery destinations.</p>
* Firehose are supported as logs delivery destinations.</p>
* <p>To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:</p>
* <ul>
* <li>
Expand Down
Expand Up @@ -28,7 +28,7 @@ export interface PutDeliverySourceCommandOutput extends PutDeliverySourceRespons

/**
* <p>Creates or updates a logical <i>delivery source</i>. A delivery source represents an Amazon Web Services resource that sends logs to an
* logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.</p>
* logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, or Firehose.</p>
* <p>To configure logs delivery between a delivery destination and an Amazon Web Services service that is supported as a delivery source, you must do the following:</p>
* <ul>
* <li>
Expand Down
Expand Up @@ -40,7 +40,7 @@ export interface PutSubscriptionFilterCommandOutput extends __MetadataBearer {}
* </li>
* <li>
* <p>A logical destination created with <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html">PutDestination</a> that belongs to a different account, for cross-account delivery.
* We currently support Kinesis Data Streams and Kinesis Data Firehose as logical destinations.</p>
* We currently support Kinesis Data Streams and Firehose as logical destinations.</p>
* </li>
* <li>
* <p>An Amazon Kinesis Data Firehose delivery stream that belongs to the same account as
Expand Down
58 changes: 45 additions & 13 deletions clients/client-cloudwatch-logs/src/models/models_0.ts
Expand Up @@ -99,6 +99,25 @@ export interface AccountPolicy {
accountId?: string;
}

/**
* <p>This structure contains the information for one sample log event that is associated
* with an anomaly found by a log anomaly detector.</p>
* @public
*/
export interface LogEvent {
/**
* <p>The time stamp of the log event.</p>
* @public
*/
timestamp?: number;

/**
* <p>The message content of the log event.</p>
* @public
*/
message?: string;
}

/**
* <p>A tructures that contains information about one pattern token related to
* an anomaly.</p>
Expand Down Expand Up @@ -247,7 +266,7 @@ export interface Anomaly {
* <p>An array of sample log event messages that are considered to be part of this anomaly.</p>
* @public
*/
logSamples: string[] | undefined;
logSamples: LogEvent[] | undefined;

/**
* <p>An array of structures where each structure contains information about one token that makes up the pattern.</p>
Expand Down Expand Up @@ -654,7 +673,7 @@ export interface Delivery {
deliveryDestinationArn?: string;

/**
* <p>Displays whether the delivery destination associated with this delivery is CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.</p>
* <p>Displays whether the delivery destination associated with this delivery is CloudWatch Logs, Amazon S3, or Firehose.</p>
* @public
*/
deliveryDestinationType?: DeliveryDestinationType;
Expand Down Expand Up @@ -1262,7 +1281,7 @@ export interface DeleteSubscriptionFilterRequest {
export interface DeliveryDestinationConfiguration {
/**
* <p>The ARN of the Amazon Web Services destination that this delivery destination represents. That Amazon Web Services destination
* can be a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Kinesis Data Firehose.</p>
* can be a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Firehose.</p>
* @public
*/
destinationResourceArn: string | undefined;
Expand All @@ -1288,7 +1307,7 @@ export type OutputFormat = (typeof OutputFormat)[keyof typeof OutputFormat];
/**
* <p>This structure contains information about one <i>delivery destination</i> in your account.
* A delivery destination is an Amazon Web Services resource that represents an
* Amazon Web Services service that logs can be sent to. CloudWatch Logs, Amazon S3, are supported as Kinesis Data Firehose delivery destinations.</p>
* Amazon Web Services service that logs can be sent to. CloudWatch Logs, Amazon S3, are supported as Firehose delivery destinations.</p>
* <p>To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:</p>
* <ul>
* <li>
Expand Down Expand Up @@ -1330,7 +1349,7 @@ export interface DeliveryDestination {
arn?: string;

/**
* <p>Displays whether this delivery destination is CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.</p>
* <p>Displays whether this delivery destination is CloudWatch Logs, Amazon S3, or Firehose.</p>
* @public
*/
deliveryDestinationType?: DeliveryDestinationType;
Expand All @@ -1357,7 +1376,7 @@ export interface DeliveryDestination {
/**
* <p>This structure contains information about one <i>delivery source</i> in your account.
* A delivery source is an Amazon Web Services resource that sends logs to an
* Amazon Web Services destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.</p>
* Amazon Web Services destination. The destination can be CloudWatch Logs, Amazon S3, or Firehose.</p>
* <p>Only some Amazon Web Services services support being configured as a delivery source. These services are listed
* as <b>Supported [V2 Permissions]</b> in the table at
* <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html">Enabling
Expand Down Expand Up @@ -3928,7 +3947,7 @@ export interface PutAccountPolicyRequest {
* sensitive data terms. This <code>Audit</code> action must contain a <code>FindingsDestination</code>
* object. You can optionally use that <code>FindingsDestination</code> object to list one or more
* destinations to send audit findings to. If you specify destinations such as log groups,
* Kinesis Data Firehose streams, and S3 buckets, they must already exist.</p>
* Firehose streams, and S3 buckets, they must already exist.</p>
* </li>
* <li>
* <p>The second block must include both a <code>DataIdentifer</code> array and an
Expand Down Expand Up @@ -3965,14 +3984,14 @@ export interface PutAccountPolicyRequest {
* <p>An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.</p>
* </li>
* <li>
* <p>An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery.</p>
* <p>An Firehose data stream in the same account as the subscription policy, for same-account delivery.</p>
* </li>
* <li>
* <p>A Lambda function in the same account as the subscription policy, for same-account delivery.</p>
* </li>
* <li>
* <p>A logical destination in a different account created with <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html">PutDestination</a>, for cross-account
* delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations.</p>
* delivery. Kinesis Data Streams and Firehose are supported as logical destinations.</p>
* </li>
* </ul>
* </li>
Expand Down Expand Up @@ -4060,7 +4079,7 @@ export interface PutDataProtectionPolicyRequest {
* sensitive data terms. This <code>Audit</code> action must contain a <code>FindingsDestination</code>
* object. You can optionally use that <code>FindingsDestination</code> object to list one or more
* destinations to send audit findings to. If you specify destinations such as log groups,
* Kinesis Data Firehose streams, and S3 buckets, they must already exist.</p>
* Firehose streams, and S3 buckets, they must already exist.</p>
* </li>
* <li>
* <p>The second block must include both a <code>DataIdentifer</code> array and an
Expand Down Expand Up @@ -4200,8 +4219,21 @@ export interface PutDeliverySourceRequest {
resourceArn: string | undefined;

/**
* <p>Defines the type of log that the source is sending. For Amazon CodeWhisperer, the valid value is
* <p>Defines the type of log that the source is sending.</p>
* <ul>
* <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
* <code>ERROR_LOGS</code>.</p>
* </li>
* <li>
* <p>For Amazon WorkMail, the valid values are
* <code>ACCESS_CONTROL_LOGS</code>, <code>AUTHENTICATION_LOGS</code>, <code>WORKMAIL_AVAILABILITY_PROVIDER_LOGS</code>, and <code>WORKMAIL_MAILBOX_ACCESS_LOGS</code>.</p>
* </li>
* </ul>
* @public
*/
logType: string | undefined;
Expand Down Expand Up @@ -4347,13 +4379,13 @@ export interface PutLogEventsRequest {
*/
export interface RejectedLogEventsInfo {
/**
* <p>The log events that are too new.</p>
* <p>The index of the first log event that is too new. This field is inclusive.</p>
* @public
*/
tooNewLogEventStartIndex?: number;

/**
* <p>The log events that are dated too far in the past.</p>
* <p>The index of the last log event that is too old. This field is exclusive.</p>
* @public
*/
tooOldLogEventEndIndex?: number;
Expand Down
2 changes: 2 additions & 0 deletions clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts
Expand Up @@ -3479,6 +3479,8 @@ const de_GetQueryResultsResponse = (output: any, context: __SerdeContext): GetQu

// de_LiveTailSessionUpdate omitted.

// de_LogEvent omitted.

// de_LogGroup omitted.

// de_LogGroupArnList omitted.
Expand Down

0 comments on commit d5823e3

Please sign in to comment.