From 0dade09afdadc2ca221dfc79c6c89e7b8aaafc25 Mon Sep 17 00:00:00 2001 From: Tianyi Wang Date: Fri, 17 Nov 2023 12:03:31 -0500 Subject: [PATCH 1/3] Remove macie service --- models/apis/logs/2014-03-28/api-2.json | 2443 +-- models/apis/macie/2017-12-19/api-2.json | 365 - models/apis/macie/2017-12-19/docs-2.json | 261 - models/apis/macie/2017-12-19/examples-1.json | 5 - .../apis/macie/2017-12-19/paginators-1.json | 14 - service/cloudwatchlogs/api.go | 12388 ++++++---------- .../cloudwatchlogsiface/interface.go | 73 +- service/cloudwatchlogs/errors.go | 36 +- service/cloudwatchlogs/service.go | 3 + service/macie/api.go | 2093 --- service/macie/doc.go | 35 - service/macie/errors.go | 45 - service/macie/macieiface/interface.go | 98 - service/macie/service.go | 109 - 14 files changed, 6365 insertions(+), 11603 deletions(-) delete mode 100644 models/apis/macie/2017-12-19/api-2.json delete mode 100644 models/apis/macie/2017-12-19/docs-2.json delete mode 100644 models/apis/macie/2017-12-19/examples-1.json delete mode 100644 models/apis/macie/2017-12-19/paginators-1.json delete mode 100644 service/macie/api.go delete mode 100644 service/macie/doc.go delete mode 100644 service/macie/errors.go delete mode 100644 service/macie/macieiface/interface.go delete mode 100644 service/macie/service.go diff --git a/models/apis/logs/2014-03-28/api-2.json b/models/apis/logs/2014-03-28/api-2.json index efb057f957e..805743e359e 100644 --- a/models/apis/logs/2014-03-28/api-2.json +++ b/models/apis/logs/2014-03-28/api-2.json @@ -24,7 +24,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Associates the specified KMS key with either one log group in the account, or with all stored CloudWatch Logs query insights results in the account.

When you use AssociateKmsKey, you specify either the logGroupName parameter or the resourceIdentifier parameter. You can't specify both of those parameters in the same operation.

If you delete the key that is used to encrypt log events or log group query results, then all the associated stored log events or query results that were encrypted with that key will be unencryptable and unusable.

CloudWatch Logs supports only symmetric KMS keys. Do not use an associate an asymmetric KMS key with your log group or query results. For more information, see Using Symmetric and Asymmetric Keys.

It can take up to 5 minutes for this operation to take effect.

If you attempt to associate a KMS key with a log group but the KMS key does not exist or the KMS key is disabled, you receive an InvalidParameterException error.

" }, "CancelExportTask":{ "name":"CancelExportTask", @@ -38,25 +39,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"InvalidOperationException"}, {"shape":"ServiceUnavailableException"} - ] - }, - "CreateDelivery":{ - "name":"CreateDelivery", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateDeliveryRequest"}, - "output":{"shape":"CreateDeliveryResponse"}, - "errors":[ - {"shape":"ServiceUnavailableException"}, - {"shape":"ConflictException"}, - {"shape":"ResourceNotFoundException"}, - {"shape":"ValidationException"}, - {"shape":"AccessDeniedException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ThrottlingException"} - ] + ], + "documentation":"

Cancels the specified export task.

The task must be in the PENDING or RUNNING state.

" }, "CreateExportTask":{ "name":"CreateExportTask", @@ -73,7 +57,8 @@ {"shape":"ServiceUnavailableException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ResourceAlreadyExistsException"} - ] + ], + "documentation":"

Creates an export task so that you can efficiently export data from a log group to an Amazon S3 bucket. When you perform a CreateExportTask operation, you must use credentials that have permission to write to the S3 bucket that you specify as the destination.

Exporting log data to S3 buckets that are encrypted by KMS is supported. Exporting log data to Amazon S3 buckets that have S3 Object Lock enabled with a retention period is also supported.

Exporting to S3 buckets that are encrypted with AES-256 is supported.

This is an asynchronous call. If all the required information is provided, this operation initiates an export task and responds with the ID of the task. After the task has started, you can use DescribeExportTasks to get the status of the export task. Each account can only have one active (RUNNING or PENDING) export task at a time. To cancel an export task, use CancelExportTask.

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.

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.

" }, "CreateLogGroup":{ "name":"CreateLogGroup", @@ -88,7 +73,8 @@ {"shape":"LimitExceededException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Creates a log group with the specified name. You can create up to 1,000,000 log groups per Region per account.

You must use the following guidelines when naming a log group:

When you create a log group, by default the log events in the log group do not expire. To set a retention policy so that events expire and are deleted after a specified time, use PutRetentionPolicy.

If you associate an KMS key with the log group, ingested data is encrypted using the KMS key. This association is stored as long as the data encrypted with the KMS key is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested.

If you attempt to associate a KMS key with the log group but the KMS key does not exist or the KMS key is disabled, you receive an InvalidParameterException error.

CloudWatch Logs supports only symmetric KMS keys. Do not associate an asymmetric KMS key with your log group. For more information, see Using Symmetric and Asymmetric Keys.

" }, "CreateLogStream":{ "name":"CreateLogStream", @@ -102,7 +88,8 @@ {"shape":"ResourceAlreadyExistsException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Creates a log stream for the specified log group. A log stream is a sequence of log events that originate from a single source, such as an application instance or a resource that is being monitored.

There is no limit on the number of log streams that you can create for a log group. There is a limit of 50 TPS on CreateLogStream operations, after which transactions are throttled.

You must use the following guidelines when naming a log stream:

" }, "DeleteAccountPolicy":{ "name":"DeleteAccountPolicy", @@ -116,7 +103,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"}, {"shape":"OperationAbortedException"} - ] + ], + "documentation":"

Deletes a CloudWatch Logs account policy.

To use this operation, you must be signed on with the logs:DeleteDataProtectionPolicy and logs:DeleteAccountPolicy permissions.

" }, "DeleteDataProtectionPolicy":{ "name":"DeleteDataProtectionPolicy", @@ -130,69 +118,8 @@ {"shape":"OperationAbortedException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] - }, - "DeleteDelivery":{ - "name":"DeleteDelivery", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteDeliveryRequest"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"ServiceUnavailableException"}, - {"shape":"ConflictException"}, - {"shape":"ValidationException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ThrottlingException"} - ] - }, - "DeleteDeliveryDestination":{ - "name":"DeleteDeliveryDestination", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteDeliveryDestinationRequest"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"ServiceUnavailableException"}, - {"shape":"ConflictException"}, - {"shape":"ValidationException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ThrottlingException"} - ] - }, - "DeleteDeliveryDestinationPolicy":{ - "name":"DeleteDeliveryDestinationPolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteDeliveryDestinationPolicyRequest"}, - "errors":[ - {"shape":"ServiceUnavailableException"}, - {"shape":"ValidationException"}, - {"shape":"ResourceNotFoundException"}, - {"shape":"ConflictException"} - ] - }, - "DeleteDeliverySource":{ - "name":"DeleteDeliverySource", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteDeliverySourceRequest"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"ServiceUnavailableException"}, - {"shape":"ConflictException"}, - {"shape":"ValidationException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ThrottlingException"} - ] + ], + "documentation":"

Deletes the data protection policy from the specified log group.

For more information about data protection policies, see PutDataProtectionPolicy.

" }, "DeleteDestination":{ "name":"DeleteDestination", @@ -206,7 +133,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Deletes the specified destination, and eventually disables all the subscription filters that publish to it. This operation does not delete the physical resource encapsulated by the destination.

" }, "DeleteLogGroup":{ "name":"DeleteLogGroup", @@ -220,7 +148,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Deletes the specified log group and permanently deletes all the archived log events associated with the log group.

" }, "DeleteLogStream":{ "name":"DeleteLogStream", @@ -234,7 +163,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Deletes the specified log stream and permanently deletes all the archived log events associated with the log stream.

" }, "DeleteMetricFilter":{ "name":"DeleteMetricFilter", @@ -248,7 +178,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Deletes the specified metric filter.

" }, "DeleteQueryDefinition":{ "name":"DeleteQueryDefinition", @@ -262,7 +193,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Deletes a saved CloudWatch Logs Insights query definition. A query definition contains details about a saved CloudWatch Logs Insights query.

Each DeleteQueryDefinition operation can delete one query definition.

You must have the logs:DeleteQueryDefinition permission to be able to perform this operation.

" }, "DeleteResourcePolicy":{ "name":"DeleteResourcePolicy", @@ -275,7 +207,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Deletes a resource policy from this account. This revokes the access of the identities in that policy to put log events to this account.

" }, "DeleteRetentionPolicy":{ "name":"DeleteRetentionPolicy", @@ -289,7 +222,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Deletes the specified retention policy.

Log events do not expire if they belong to log groups without a retention policy.

" }, "DeleteSubscriptionFilter":{ "name":"DeleteSubscriptionFilter", @@ -303,7 +237,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Deletes the specified subscription filter.

" }, "DescribeAccountPolicies":{ "name":"DescribeAccountPolicies", @@ -318,52 +253,8 @@ {"shape":"OperationAbortedException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] - }, - "DescribeDeliveries":{ - "name":"DescribeDeliveries", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeDeliveriesRequest"}, - "output":{"shape":"DescribeDeliveriesResponse"}, - "errors":[ - {"shape":"ServiceUnavailableException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ValidationException"}, - {"shape":"ThrottlingException"} - ] - }, - "DescribeDeliveryDestinations":{ - "name":"DescribeDeliveryDestinations", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeDeliveryDestinationsRequest"}, - "output":{"shape":"DescribeDeliveryDestinationsResponse"}, - "errors":[ - {"shape":"ServiceUnavailableException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ValidationException"}, - {"shape":"ThrottlingException"} - ] - }, - "DescribeDeliverySources":{ - "name":"DescribeDeliverySources", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeDeliverySourcesRequest"}, - "output":{"shape":"DescribeDeliverySourcesResponse"}, - "errors":[ - {"shape":"ServiceUnavailableException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ValidationException"}, - {"shape":"ThrottlingException"} - ] + ], + "documentation":"

Returns a list of all CloudWatch Logs account policies in the account.

" }, "DescribeDestinations":{ "name":"DescribeDestinations", @@ -376,7 +267,8 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Lists all your destinations. The results are ASCII-sorted by destination name.

" }, "DescribeExportTasks":{ "name":"DescribeExportTasks", @@ -389,7 +281,8 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Lists the specified export tasks. You can list all your export tasks or filter the results based on task ID or task status.

" }, "DescribeLogGroups":{ "name":"DescribeLogGroups", @@ -402,7 +295,8 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Lists the specified log groups. You can list all your log groups or filter the results by prefix. The results are ASCII-sorted by log group name.

CloudWatch Logs doesn’t support IAM policies that control access to the DescribeLogGroups action by using the aws:ResourceTag/key-name condition key. Other CloudWatch Logs actions do support the use of the aws:ResourceTag/key-name condition key to control access. For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.

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 CloudWatch cross-account observability.

" }, "DescribeLogStreams":{ "name":"DescribeLogStreams", @@ -416,7 +310,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Lists the log streams for the specified log group. You can list all the log streams or filter the results by prefix. You can also control how the results are ordered.

You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both.

This operation has a limit of five transactions per second, after which transactions are throttled.

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 CloudWatch cross-account observability.

" }, "DescribeMetricFilters":{ "name":"DescribeMetricFilters", @@ -430,7 +325,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Lists the specified metric filters. You can list all of the metric filters or filter the results by log name, prefix, metric name, or metric namespace. The results are ASCII-sorted by filter name.

" }, "DescribeQueries":{ "name":"DescribeQueries", @@ -444,7 +340,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Returns a list of CloudWatch Logs Insights queries that are scheduled, running, or have been run recently in this account. You can request all queries or limit it to queries of a specific log group or queries with a certain status.

" }, "DescribeQueryDefinitions":{ "name":"DescribeQueryDefinitions", @@ -457,7 +354,8 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions. You can retrieve query definitions from the current account or from a source account that is linked to the current account.

You can use the queryDefinitionNamePrefix parameter to limit the results to only the query definitions that have names that start with a certain string.

" }, "DescribeResourcePolicies":{ "name":"DescribeResourcePolicies", @@ -470,7 +368,8 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Lists the resource policies in this account.

" }, "DescribeSubscriptionFilters":{ "name":"DescribeSubscriptionFilters", @@ -484,7 +383,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Lists the subscription filters for the specified log group. You can list all the subscription filters or filter the results by prefix. The results are ASCII-sorted by filter name.

" }, "DisassociateKmsKey":{ "name":"DisassociateKmsKey", @@ -498,7 +398,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Disassociates the specified KMS key from the specified log group or from all CloudWatch Logs Insights query results in the account.

When you use DisassociateKmsKey, you specify either the logGroupName parameter or the resourceIdentifier parameter. You can't specify both of those parameters in the same operation.

It can take up to 5 minutes for this operation to take effect.

" }, "FilterLogEvents":{ "name":"FilterLogEvents", @@ -512,7 +413,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

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.

You must have the logs:FilterLogEvents permission to perform this operation.

You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both.

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 specifying the token in a subsequent call. This operation can return empty results while there are more log events available through the token.

The returned log events are sorted by event timestamp, the timestamp when the event was ingested by CloudWatch Logs, and the ID of the PutLogEvents request.

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 CloudWatch cross-account observability.

" }, "GetDataProtectionPolicy":{ "name":"GetDataProtectionPolicy", @@ -527,69 +429,8 @@ {"shape":"OperationAbortedException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] - }, - "GetDelivery":{ - "name":"GetDelivery", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"GetDeliveryRequest"}, - "output":{"shape":"GetDeliveryResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"ServiceUnavailableException"}, - {"shape":"ValidationException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ThrottlingException"} - ] - }, - "GetDeliveryDestination":{ - "name":"GetDeliveryDestination", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"GetDeliveryDestinationRequest"}, - "output":{"shape":"GetDeliveryDestinationResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"ServiceUnavailableException"}, - {"shape":"ValidationException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ThrottlingException"} - ] - }, - "GetDeliveryDestinationPolicy":{ - "name":"GetDeliveryDestinationPolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"GetDeliveryDestinationPolicyRequest"}, - "output":{"shape":"GetDeliveryDestinationPolicyResponse"}, - "errors":[ - {"shape":"ServiceUnavailableException"}, - {"shape":"ValidationException"}, - {"shape":"ResourceNotFoundException"} - ] - }, - "GetDeliverySource":{ - "name":"GetDeliverySource", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"GetDeliverySourceRequest"}, - "output":{"shape":"GetDeliverySourceResponse"}, - "errors":[ - {"shape":"ResourceNotFoundException"}, - {"shape":"ServiceUnavailableException"}, - {"shape":"ValidationException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ThrottlingException"} - ] + ], + "documentation":"

Returns information about a log group data protection policy.

" }, "GetLogEvents":{ "name":"GetLogEvents", @@ -603,7 +444,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Lists log events from the specified log stream. You can list all of the log events or filter using a time range.

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.

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 CloudWatch cross-account observability.

You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both.

" }, "GetLogGroupFields":{ "name":"GetLogGroupFields", @@ -618,7 +460,8 @@ {"shape":"LimitExceededException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Returns a list of the fields that are included in log events in the specified log group. Includes the percentage of log events that contain each field. The search is limited to a time period that you specify.

You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must specify one of these parameters, but you can't specify both.

In the results, fields that start with @ are fields generated by CloudWatch Logs. For example, @timestamp is the timestamp of each log event. For more information about the fields that are generated by CloudWatch logs, see Supported Logs and Discovered Fields.

The response results are sorted by the frequency percentage, starting with the highest percentage.

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 CloudWatch cross-account observability.

" }, "GetLogRecord":{ "name":"GetLogRecord", @@ -633,7 +476,8 @@ {"shape":"LimitExceededException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Retrieves all of the fields and values of a single log event. All fields are retrieved, even if the original query that produced the logRecordPointer retrieved only a subset of fields. Fields are returned as field name/field value pairs.

The full unparsed log event is returned within @message.

" }, "GetQueryResults":{ "name":"GetQueryResults", @@ -647,7 +491,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Returns the results from the specified query.

Only the fields requested in the query are returned, along with a @ptr field, which is the identifier for the log record. You can use the value of @ptr in a GetLogRecord operation to get the full log record.

GetQueryResults does not start running a query. To run a query, use StartQuery. For more information about how long results of previous queries are available, see CloudWatch Logs quotas.

If the value of the Status field in the output is Running, this operation returns only partial results. If you see a value of Scheduled or Running for the status, you can retry the operation later to see the final results.

If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account to start queries in linked source accounts. For more information, see CloudWatch cross-account observability.

" }, "ListTagsForResource":{ "name":"ListTagsForResource", @@ -661,7 +506,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Displays the tags associated with a CloudWatch Logs resource. Currently, log groups and destinations support tagging.

" }, "ListTagsLogGroup":{ "name":"ListTagsLogGroup", @@ -675,6 +521,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} ], + "documentation":"

The ListTagsLogGroup operation is on the path to deprecation. We recommend that you use ListTagsForResource instead.

Lists the tags for the specified log group.

", "deprecated":true, "deprecatedMessage":"Please use the generic tagging API ListTagsForResource" }, @@ -691,7 +538,8 @@ {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"}, {"shape":"LimitExceededException"} - ] + ], + "documentation":"

Creates an account-level data protection policy that applies to all log groups in the account. A data protection policy can help safeguard sensitive data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only one account-level policy.

Sensitive data is detected and masked when it is ingested into a log group. When you set a data protection policy, log events ingested into the log groups before that time are not masked.

If you use PutAccountPolicy to create a data protection policy for your whole account, it applies to both existing log groups and all log groups that are created later in this account. The account policy is applied to existing log groups with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked.

By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a GetLogEvents or FilterLogEvents operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command.

For more information, including a list of types of data that can be audited and masked, see Protect sensitive log data with masking.

To use the PutAccountPolicy operation, you must be signed on with the logs:PutDataProtectionPolicy and logs:PutAccountPolicy permissions.

The PutAccountPolicy operation applies to all log groups in the account. You can also use PutDataProtectionPolicy to create a data protection policy that applies to just one log group. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked.

" }, "PutDataProtectionPolicy":{ "name":"PutDataProtectionPolicy", @@ -707,56 +555,8 @@ {"shape":"OperationAbortedException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] - }, - "PutDeliveryDestination":{ - "name":"PutDeliveryDestination", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"PutDeliveryDestinationRequest"}, - "output":{"shape":"PutDeliveryDestinationResponse"}, - "errors":[ - {"shape":"ServiceUnavailableException"}, - {"shape":"ConflictException"}, - {"shape":"ValidationException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ThrottlingException"}, - {"shape":"ResourceNotFoundException"} - ] - }, - "PutDeliveryDestinationPolicy":{ - "name":"PutDeliveryDestinationPolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"PutDeliveryDestinationPolicyRequest"}, - "output":{"shape":"PutDeliveryDestinationPolicyResponse"}, - "errors":[ - {"shape":"ServiceUnavailableException"}, - {"shape":"ValidationException"}, - {"shape":"ResourceNotFoundException"}, - {"shape":"ConflictException"} - ] - }, - "PutDeliverySource":{ - "name":"PutDeliverySource", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"PutDeliverySourceRequest"}, - "output":{"shape":"PutDeliverySourceResponse"}, - "errors":[ - {"shape":"ServiceUnavailableException"}, - {"shape":"ConflictException"}, - {"shape":"ValidationException"}, - {"shape":"ServiceQuotaExceededException"}, - {"shape":"ResourceNotFoundException"}, - {"shape":"ThrottlingException"} - ] + ], + "documentation":"

Creates a data protection policy for the specified log group. A data protection policy can help safeguard sensitive data that's ingested by the log group by auditing and masking the sensitive log data.

Sensitive data is detected and masked when it is ingested into the log group. When you set a data protection policy, log events ingested into the log group before that time are not masked.

By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a GetLogEvents or FilterLogEvents operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command.

For more information, including a list of types of data that can be audited and masked, see Protect sensitive log data with masking.

The PutDataProtectionPolicy operation applies to only the specified log group. You can also use PutAccountPolicy to create an account-level data protection policy that applies to all log groups in the account, including both existing log groups and log groups that are created level. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked.

" }, "PutDestination":{ "name":"PutDestination", @@ -770,7 +570,8 @@ {"shape":"InvalidParameterException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Creates or updates a destination. This operation is used only to create destinations for cross-account subscriptions.

A destination encapsulates a physical resource (such as an Amazon Kinesis stream). With a destination, you can subscribe to a real-time stream of log events for a different account, ingested using PutLogEvents.

Through an access policy, a destination controls what is written to it. By default, PutDestination does not set any access policy with the destination, which means a cross-account user cannot call PutSubscriptionFilter against this destination. To enable this, the destination owner must call PutDestinationPolicy after PutDestination.

To perform a PutDestination operation, you must also have the iam:PassRole permission.

" }, "PutDestinationPolicy":{ "name":"PutDestinationPolicy", @@ -783,7 +584,8 @@ {"shape":"InvalidParameterException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Creates or updates an access policy associated with an existing destination. An access policy is an IAM policy document that is used to authorize claims to register a subscription filter against a given destination.

" }, "PutLogEvents":{ "name":"PutLogEvents", @@ -800,7 +602,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"}, {"shape":"UnrecognizedClientException"} - ] + ], + "documentation":"

Uploads a batch of log events to the specified log stream.

The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions are always accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException even if the sequence token is not valid. You can use parallel PutLogEvents actions on the same log stream.

The batch of events must satisfy the following constraints:

If a call to PutLogEvents returns \"UnrecognizedClientException\" the most likely cause is a non-valid Amazon Web Services access key ID or secret key.

" }, "PutMetricFilter":{ "name":"PutMetricFilter", @@ -815,7 +618,8 @@ {"shape":"OperationAbortedException"}, {"shape":"LimitExceededException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Creates or updates a metric filter and associates it with the specified log group. With metric filters, you can configure rules to extract metric data from log events ingested through PutLogEvents.

The maximum number of metric filters that can be associated with a log group is 100.

When you create a metric filter, you can also optionally assign a unit and dimensions to the metric that is created.

Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric.

CloudWatch Logs might disable a metric filter if it generates 1,000 different name/value pairs for your specified dimensions within one hour.

You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.

" }, "PutQueryDefinition":{ "name":"PutQueryDefinition", @@ -830,7 +634,8 @@ {"shape":"LimitExceededException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Creates or updates a query definition for CloudWatch Logs Insights. For more information, see Analyzing Log Data with CloudWatch Logs Insights.

To update a query definition, specify its queryDefinitionId in your request. The values of name, queryString, and logGroupNames are changed to the values that you specify in your update operation. No current values are retained from the current query definition. For example, imagine updating a current query definition that includes log groups. If you don't specify the logGroupNames parameter in your update operation, the query definition changes to contain no log groups.

You must have the logs:PutQueryDefinition permission to be able to perform this operation.

" }, "PutResourcePolicy":{ "name":"PutResourcePolicy", @@ -844,7 +649,8 @@ {"shape":"InvalidParameterException"}, {"shape":"LimitExceededException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Creates or updates a resource policy allowing other Amazon Web Services services to put log events to this account, such as Amazon Route 53. An account can have up to 10 resource policies per Amazon Web Services Region.

" }, "PutRetentionPolicy":{ "name":"PutRetentionPolicy", @@ -858,7 +664,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Sets the retention of the specified log group. With a retention policy, you can configure the number of days for which to retain log events in the specified log group.

CloudWatch Logs doesn’t immediately delete log events when they reach their retention setting. It typically takes up to 72 hours after that before log events are deleted, but in rare situations might take longer.

To illustrate, imagine that you change a log group to have a longer retention setting when it contains log events that are past the expiration date, but haven’t been deleted. Those log events will take up to 72 hours to be deleted after the new retention date is reached. To make sure that log data is deleted permanently, keep a log group at its lower retention setting until 72 hours after the previous retention period ends. Alternatively, wait to change the retention setting until you confirm that the earlier log events are deleted.

When log events reach their retention setting they are marked for deletion. After they are marked for deletion, they do not add to your archival storage costs anymore, even if they are not actually deleted until later. These log events marked for deletion are also not included when you use an API to retrieve the storedBytes value to see how many bytes a log group is storing.

" }, "PutSubscriptionFilter":{ "name":"PutSubscriptionFilter", @@ -873,7 +680,26 @@ {"shape":"OperationAbortedException"}, {"shape":"LimitExceededException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Creates or updates a subscription filter and associates it with the specified log group. With subscription filters, you can subscribe to a real-time stream of log events ingested through PutLogEvents and have them delivered to a specific destination. When log events are sent to the receiving service, they are Base64 encoded and compressed with the GZIP format.

The following destinations are supported for subscription filters:

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 filterName.

To perform a PutSubscriptionFilter operation for any destination except a Lambda function, you must also have the iam:PassRole permission.

" + }, + "StartLiveTail":{ + "name":"StartLiveTail", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"StartLiveTailRequest"}, + "output":{"shape":"StartLiveTailResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"LimitExceededException"}, + {"shape":"InvalidOperationException"} + ], + "documentation":"

To Be Written

", + "endpoint":{"hostPrefix":"streaming-"} }, "StartQuery":{ "name":"StartQuery", @@ -889,7 +715,8 @@ {"shape":"LimitExceededException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

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.

For more information, see CloudWatch Logs Insights Query Syntax.

After you run a query using StartQuery, the query results are stored by CloudWatch Logs. You can use GetQueryResults to retrieve the results of a query, using the queryId that StartQuery returns.

If you have associated a KMS key with the query results in this account, then StartQuery uses that key to encrypt the results when it stores them. If no key is associated with query results, the query results are encrypted with the default CloudWatch Logs encryption method.

Queries time out after 60 minutes of runtime. If your queries are timing out, reduce the time range being searched or partition your query into a number of queries.

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 CloudWatch cross-account observability. For a cross-account StartQuery operation, the query definition must be defined in the monitoring account.

You can have up to 30 concurrent CloudWatch Logs insights queries, including queries that have been added to dashboards.

" }, "StopQuery":{ "name":"StopQuery", @@ -903,7 +730,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Stops a CloudWatch Logs Insights query that is in progress. If the query has already ended, the operation returns an error indicating that the specified query is not running.

" }, "TagLogGroup":{ "name":"TagLogGroup", @@ -916,6 +744,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"InvalidParameterException"} ], + "documentation":"

The TagLogGroup operation is on the path to deprecation. We recommend that you use TagResource instead.

Adds or updates the specified tags for the specified log group.

To list the tags for a log group, use ListTagsForResource. To remove tags, use UntagResource.

For more information about tags, see Tag Log Groups in Amazon CloudWatch Logs in the Amazon CloudWatch Logs User Guide.

CloudWatch Logs doesn’t support IAM policies that prevent users from assigning specified tags to log groups using the aws:Resource/key-name or aws:TagKeys condition keys. For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.

", "deprecated":true, "deprecatedMessage":"Please use the generic tagging API TagResource" }, @@ -931,7 +760,8 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"}, {"shape":"TooManyTagsException"} - ] + ], + "documentation":"

Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs resource. Currently, the only CloudWatch Logs resources that can be tagged are log groups and destinations.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.

You can use the TagResource action with a resource that already has tags. If you specify a new tag key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a CloudWatch Logs resource.

" }, "TestMetricFilter":{ "name":"TestMetricFilter", @@ -944,7 +774,8 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Tests the filter pattern of a metric filter against a sample of log event messages. You can use this operation to validate the correctness of a metric filter pattern.

" }, "UntagLogGroup":{ "name":"UntagLogGroup", @@ -956,6 +787,7 @@ "errors":[ {"shape":"ResourceNotFoundException"} ], + "documentation":"

The UntagLogGroup operation is on the path to deprecation. We recommend that you use UntagResource instead.

Removes the specified tags from the specified log group.

To list the tags for a log group, use ListTagsForResource. To add tags, use TagResource.

CloudWatch Logs doesn’t support IAM policies that prevent users from assigning specified tags to log groups using the aws:Resource/key-name or aws:TagKeys condition keys.

", "deprecated":true, "deprecatedMessage":"Please use the generic tagging API UntagResource" }, @@ -970,7 +802,8 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ] + ], + "documentation":"

Removes one or more tags from the specified resource.

" } }, "shapes":{ @@ -978,6 +811,7 @@ "type":"structure", "members":{ }, + "documentation":"

To Be Written

", "exception":true }, "AccessPolicy":{ @@ -1003,13 +837,32 @@ "AccountPolicy":{ "type":"structure", "members":{ - "policyName":{"shape":"PolicyName"}, - "policyDocument":{"shape":"AccountPolicyDocument"}, - "lastUpdatedTime":{"shape":"Timestamp"}, - "policyType":{"shape":"PolicyType"}, - "scope":{"shape":"Scope"}, - "accountId":{"shape":"AccountId"} - } + "policyName":{ + "shape":"PolicyName", + "documentation":"

The name of the account policy.

" + }, + "policyDocument":{ + "shape":"AccountPolicyDocument", + "documentation":"

The policy document for this account policy.

The JSON specified in policyDocument can be up to 30,720 characters.

" + }, + "lastUpdatedTime":{ + "shape":"Timestamp", + "documentation":"

The date and time that this policy was most recently updated.

" + }, + "policyType":{ + "shape":"PolicyType", + "documentation":"

The type of policy for this account policy.

" + }, + "scope":{ + "shape":"Scope", + "documentation":"

The scope of the account policy.

" + }, + "accountId":{ + "shape":"AccountId", + "documentation":"

The Amazon Web Services account ID that the policy applies to.

" + } + }, + "documentation":"

A structure that contains information about one CloudWatch Logs account policy.

" }, "AccountPolicyDocument":{"type":"string"}, "AmazonResourceName":{ @@ -1023,16 +876,28 @@ "type":"structure", "required":["kmsKeyId"], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "kmsKeyId":{"shape":"KmsKeyId"}, - "resourceIdentifier":{"shape":"ResourceIdentifier"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

In your AssociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.

" + }, + "kmsKeyId":{ + "shape":"KmsKeyId", + "documentation":"

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see Amazon Resource Names and Using Symmetric and Asymmetric Keys.

" + }, + "resourceIdentifier":{ + "shape":"ResourceIdentifier", + "documentation":"

Specifies the target for this operation. You must specify one of the following:

In your AssociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.

" + } } }, "CancelExportTaskRequest":{ "type":"structure", "required":["taskId"], "members":{ - "taskId":{"shape":"ExportTaskId"} + "taskId":{ + "shape":"ExportTaskId", + "documentation":"

The ID of the export task.

" + } } }, "ClientToken":{ @@ -1041,31 +906,7 @@ "min":36, "pattern":"\\S{36,128}" }, - "ConflictException":{ - "type":"structure", - "members":{ - }, - "exception":true - }, - "CreateDeliveryRequest":{ - "type":"structure", - "required":[ - "deliverySourceName", - "deliveryDestinationArn" - ], - "members":{ - "deliverySourceName":{"shape":"DeliverySourceName"}, - "deliveryDestinationArn":{"shape":"Arn"}, - "tags":{"shape":"Tags"} - } - }, - "CreateDeliveryResponse":{ - "type":"structure", - "members":{ - "delivery":{"shape":"Delivery"} - } - }, - "CreateExportTaskRequest":{ + "CreateExportTaskRequest":{ "type":"structure", "required":[ "logGroupName", @@ -1074,28 +915,61 @@ "destination" ], "members":{ - "taskName":{"shape":"ExportTaskName"}, - "logGroupName":{"shape":"LogGroupName"}, - "logStreamNamePrefix":{"shape":"LogStreamName"}, - "from":{"shape":"Timestamp"}, - "to":{"shape":"Timestamp"}, - "destination":{"shape":"ExportDestinationBucket"}, - "destinationPrefix":{"shape":"ExportDestinationPrefix"} + "taskName":{ + "shape":"ExportTaskName", + "documentation":"

The name of the export task.

" + }, + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "logStreamNamePrefix":{ + "shape":"LogStreamName", + "documentation":"

Export only log streams that match the provided prefix. If you don't specify a value, no prefix filter is applied.

" + }, + "from":{ + "shape":"Timestamp", + "documentation":"

The start time of the range for the request, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this time are not exported.

" + }, + "to":{ + "shape":"Timestamp", + "documentation":"

The end time of the range for the request, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported.

You must specify a time that is not earlier than when this log group was created.

" + }, + "destination":{ + "shape":"ExportDestinationBucket", + "documentation":"

The name of S3 bucket for the exported log data. The bucket must be in the same Amazon Web Services Region.

" + }, + "destinationPrefix":{ + "shape":"ExportDestinationPrefix", + "documentation":"

The prefix used as the start of the key for every object exported. If you don't specify a value, the default is exportedlogs.

" + } } }, "CreateExportTaskResponse":{ "type":"structure", "members":{ - "taskId":{"shape":"ExportTaskId"} + "taskId":{ + "shape":"ExportTaskId", + "documentation":"

The ID of the export task.

" + } } }, "CreateLogGroupRequest":{ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "kmsKeyId":{"shape":"KmsKeyId"}, - "tags":{"shape":"Tags"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "kmsKeyId":{ + "shape":"KmsKeyId", + "documentation":"

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see Amazon Resource Names.

" + }, + "tags":{ + "shape":"Tags", + "documentation":"

The key-value pairs to use for the tags.

You can grant users access to certain log groups while preventing them from accessing other log groups. To do so, tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log group, you must have either the logs:TagResource or logs:TagLogGroup permission. For more information about tagging, see Tagging Amazon Web Services resources. For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.

" + } } }, "CreateLogStreamRequest":{ @@ -1105,8 +979,14 @@ "logStreamName" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "logStreamName":{"shape":"LogStreamName"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "logStreamName":{ + "shape":"LogStreamName", + "documentation":"

The name of the log stream.

" + } } }, "DataAlreadyAcceptedException":{ @@ -1114,6 +994,7 @@ "members":{ "expectedSequenceToken":{"shape":"SequenceToken"} }, + "documentation":"

The event was already logged.

PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException regardless of whether a given batch of log events has already been accepted.

", "exception":true }, "DataProtectionPolicyDocument":{"type":"string"}, @@ -1126,7 +1007,10 @@ "DISABLED" ] }, - "Days":{"type":"integer"}, + "Days":{ + "type":"integer", + "documentation":"

The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1096, 1827, 2192, 2557, 2922, 3288, and 3653.

To set a log group so that its log events do not expire, use DeleteRetentionPolicy.

" + }, "DefaultValue":{"type":"double"}, "DeleteAccountPolicyRequest":{ "type":"structure", @@ -1135,57 +1019,44 @@ "policyType" ], "members":{ - "policyName":{"shape":"PolicyName"}, - "policyType":{"shape":"PolicyType"} + "policyName":{ + "shape":"PolicyName", + "documentation":"

The name of the policy to delete.

" + }, + "policyType":{ + "shape":"PolicyType", + "documentation":"

The type of policy to delete. Currently, the only valid value is DATA_PROTECTION_POLICY.

" + } } }, "DeleteDataProtectionPolicyRequest":{ "type":"structure", "required":["logGroupIdentifier"], "members":{ - "logGroupIdentifier":{"shape":"LogGroupIdentifier"} - } - }, - "DeleteDeliveryDestinationPolicyRequest":{ - "type":"structure", - "required":["deliveryDestinationName"], - "members":{ - "deliveryDestinationName":{"shape":"DeliveryDestinationName"} - } - }, - "DeleteDeliveryDestinationRequest":{ - "type":"structure", - "required":["name"], - "members":{ - "name":{"shape":"DeliveryDestinationName"} - } - }, - "DeleteDeliveryRequest":{ - "type":"structure", - "required":["id"], - "members":{ - "id":{"shape":"DeliveryId"} - } - }, - "DeleteDeliverySourceRequest":{ - "type":"structure", - "required":["name"], - "members":{ - "name":{"shape":"DeliverySourceName"} + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

The name or ARN of the log group that you want to delete the data protection policy for.

" + } } }, "DeleteDestinationRequest":{ "type":"structure", "required":["destinationName"], "members":{ - "destinationName":{"shape":"DestinationName"} + "destinationName":{ + "shape":"DestinationName", + "documentation":"

The name of the destination.

" + } } }, "DeleteLogGroupRequest":{ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{"shape":"LogGroupName"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + } } }, "DeleteLogStreamRequest":{ @@ -1195,8 +1066,14 @@ "logStreamName" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "logStreamName":{"shape":"LogStreamName"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "logStreamName":{ + "shape":"LogStreamName", + "documentation":"

The name of the log stream.

" + } } }, "DeleteMetricFilterRequest":{ @@ -1206,34 +1083,52 @@ "filterName" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "filterName":{"shape":"FilterName"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "filterName":{ + "shape":"FilterName", + "documentation":"

The name of the metric filter.

" + } } }, "DeleteQueryDefinitionRequest":{ "type":"structure", "required":["queryDefinitionId"], "members":{ - "queryDefinitionId":{"shape":"QueryId"} + "queryDefinitionId":{ + "shape":"QueryId", + "documentation":"

The ID of the query definition that you want to delete. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions.

" + } } }, "DeleteQueryDefinitionResponse":{ "type":"structure", "members":{ - "success":{"shape":"Success"} + "success":{ + "shape":"Success", + "documentation":"

A value of TRUE indicates that the operation succeeded. FALSE indicates that the operation failed.

" + } } }, "DeleteResourcePolicyRequest":{ "type":"structure", "members":{ - "policyName":{"shape":"PolicyName"} + "policyName":{ + "shape":"PolicyName", + "documentation":"

The name of the policy to be revoked. This parameter is required.

" + } } }, "DeleteRetentionPolicyRequest":{ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{"shape":"LogGroupName"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + } } }, "DeleteSubscriptionFilterRequest":{ @@ -1243,179 +1138,99 @@ "filterName" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "filterName":{"shape":"FilterName"} - } - }, - "Deliveries":{ - "type":"list", - "member":{"shape":"Delivery"} - }, - "Delivery":{ - "type":"structure", - "members":{ - "id":{"shape":"DeliveryId"}, - "arn":{"shape":"Arn"}, - "deliverySourceName":{"shape":"DeliverySourceName"}, - "deliveryDestinationArn":{"shape":"Arn"}, - "deliveryDestinationType":{"shape":"DeliveryDestinationType"}, - "tags":{"shape":"Tags"} - } - }, - "DeliveryDestination":{ - "type":"structure", - "members":{ - "name":{"shape":"DeliveryDestinationName"}, - "arn":{"shape":"Arn"}, - "deliveryDestinationType":{"shape":"DeliveryDestinationType"}, - "outputFormat":{"shape":"OutputFormat"}, - "deliveryDestinationConfiguration":{"shape":"DeliveryDestinationConfiguration"}, - "tags":{"shape":"Tags"} - } - }, - "DeliveryDestinationConfiguration":{ - "type":"structure", - "required":["destinationResourceArn"], - "members":{ - "destinationResourceArn":{"shape":"Arn"} - } - }, - "DeliveryDestinationName":{ - "type":"string", - "max":60, - "min":1, - "pattern":"[\\w-]*" - }, - "DeliveryDestinationPolicy":{ - "type":"string", - "max":51200, - "min":1 - }, - "DeliveryDestinationType":{ - "type":"string", - "enum":[ - "S3", - "CWL", - "FH" - ] - }, - "DeliveryDestinations":{ - "type":"list", - "member":{"shape":"DeliveryDestination"} - }, - "DeliveryId":{ - "type":"string", - "max":64, - "min":1, - "pattern":"^[0-9A-Za-z]+$" - }, - "DeliverySource":{ - "type":"structure", - "members":{ - "name":{"shape":"DeliverySourceName"}, - "arn":{"shape":"Arn"}, - "resourceArns":{"shape":"ResourceArns"}, - "service":{"shape":"Service"}, - "logType":{"shape":"LogType"}, - "tags":{"shape":"Tags"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "filterName":{ + "shape":"FilterName", + "documentation":"

The name of the subscription filter.

" + } } }, - "DeliverySourceName":{ - "type":"string", - "max":60, - "min":1, - "pattern":"[\\w-]*" - }, - "DeliverySources":{ - "type":"list", - "member":{"shape":"DeliverySource"} - }, "Descending":{"type":"boolean"}, "DescribeAccountPoliciesRequest":{ "type":"structure", "required":["policyType"], "members":{ - "policyType":{"shape":"PolicyType"}, - "policyName":{"shape":"PolicyName"}, - "accountIdentifiers":{"shape":"AccountIds"} + "policyType":{ + "shape":"PolicyType", + "documentation":"

Use this parameter to limit the returned policies to only the policies that match the policy type that you specify. Currently, the only valid value is DATA_PROTECTION_POLICY.

" + }, + "policyName":{ + "shape":"PolicyName", + "documentation":"

Use this parameter to limit the returned policies to only the policy with the name that you specify.

" + }, + "accountIdentifiers":{ + "shape":"AccountIds", + "documentation":"

If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account observability, you can use this to specify the account ID of a source account. If you do, the operation returns the account policy for the specified account. Currently, you can specify only one account ID in this parameter.

If you omit this parameter, only the policy in the current account is returned.

" + } } }, "DescribeAccountPoliciesResponse":{ "type":"structure", "members":{ - "accountPolicies":{"shape":"AccountPolicies"} - } - }, - "DescribeDeliveriesRequest":{ - "type":"structure", - "members":{ - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"} - } - }, - "DescribeDeliveriesResponse":{ - "type":"structure", - "members":{ - "deliveries":{"shape":"Deliveries"}, - "nextToken":{"shape":"NextToken"} - } - }, - "DescribeDeliveryDestinationsRequest":{ - "type":"structure", - "members":{ - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"} - } - }, - "DescribeDeliveryDestinationsResponse":{ - "type":"structure", - "members":{ - "deliveryDestinations":{"shape":"DeliveryDestinations"}, - "nextToken":{"shape":"NextToken"} - } - }, - "DescribeDeliverySourcesRequest":{ - "type":"structure", - "members":{ - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"} - } - }, - "DescribeDeliverySourcesResponse":{ - "type":"structure", - "members":{ - "deliverySources":{"shape":"DeliverySources"}, - "nextToken":{"shape":"NextToken"} + "accountPolicies":{ + "shape":"AccountPolicies", + "documentation":"

An array of structures that contain information about the CloudWatch Logs account policies that match the specified filters.

" + } } }, "DescribeDestinationsRequest":{ "type":"structure", "members":{ - "DestinationNamePrefix":{"shape":"DestinationName"}, - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"} + "DestinationNamePrefix":{ + "shape":"DestinationName", + "documentation":"

The prefix to match. If you don't specify a value, no prefix filter is applied.

" + }, + "nextToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" + }, + "limit":{ + "shape":"DescribeLimit", + "documentation":"

The maximum number of items returned. If you don't specify a value, the default maximum value of 50 items is used.

" + } } }, "DescribeDestinationsResponse":{ "type":"structure", "members":{ - "destinations":{"shape":"Destinations"}, + "destinations":{ + "shape":"Destinations", + "documentation":"

The destinations.

" + }, "nextToken":{"shape":"NextToken"} } }, "DescribeExportTasksRequest":{ "type":"structure", "members":{ - "taskId":{"shape":"ExportTaskId"}, - "statusCode":{"shape":"ExportTaskStatusCode"}, - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"} + "taskId":{ + "shape":"ExportTaskId", + "documentation":"

The ID of the export task. Specifying a task ID filters the results to one or zero export tasks.

" + }, + "statusCode":{ + "shape":"ExportTaskStatusCode", + "documentation":"

The status code of the export task. Specifying a status code filters the results to zero or more export tasks.

" + }, + "nextToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" + }, + "limit":{ + "shape":"DescribeLimit", + "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" + } } }, "DescribeExportTasksResponse":{ "type":"structure", "members":{ - "exportTasks":{"shape":"ExportTasks"}, + "exportTasks":{ + "shape":"ExportTasks", + "documentation":"

The export tasks.

" + }, "nextToken":{"shape":"NextToken"} } }, @@ -1427,55 +1242,121 @@ "DescribeLogGroupsRequest":{ "type":"structure", "members":{ - "accountIdentifiers":{"shape":"AccountIds"}, - "logGroupNamePrefix":{"shape":"LogGroupName"}, - "logGroupNamePattern":{"shape":"LogGroupNamePattern"}, - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"}, - "includeLinkedAccounts":{"shape":"IncludeLinkedAccounts"} + "accountIdentifiers":{ + "shape":"AccountIds", + "documentation":"

When includeLinkedAccounts is set to True, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array.

" + }, + "logGroupNamePrefix":{ + "shape":"LogGroupName", + "documentation":"

The prefix to match.

logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these parameters can be passed.

" + }, + "logGroupNamePattern":{ + "shape":"LogGroupNamePattern", + "documentation":"

If you specify a string for this parameter, the operation returns only log groups that have names that match the string based on a case-sensitive substring search. For example, if you specify Foo, log groups named FooBar, aws/Foo, and GroupFoo would match, but foo, F/o/o and Froo would not match.

If you specify logGroupNamePattern in your request, then only arn, creationTime, and logGroupName are included in the response.

logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these parameters can be passed.

" + }, + "nextToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" + }, + "limit":{ + "shape":"DescribeLimit", + "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" + }, + "includeLinkedAccounts":{ + "shape":"IncludeLinkedAccounts", + "documentation":"

If you are using a monitoring account, set this to True to have the operation return log groups in the accounts listed in accountIdentifiers.

If this parameter is set to true and accountIdentifiers contains a null value, the operation returns all log groups in the monitoring account and all log groups in all source accounts that are linked to the monitoring account.

" + } } }, "DescribeLogGroupsResponse":{ "type":"structure", "members":{ - "logGroups":{"shape":"LogGroups"}, + "logGroups":{ + "shape":"LogGroups", + "documentation":"

The log groups.

If the retentionInDays value is not included for a log group, then that log group's events do not expire.

" + }, "nextToken":{"shape":"NextToken"} } }, "DescribeLogStreamsRequest":{ "type":"structure", "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, - "logStreamNamePrefix":{"shape":"LogStreamName"}, - "orderBy":{"shape":"OrderBy"}, - "descending":{"shape":"Descending"}, - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

You must include either logGroupIdentifier or logGroupName, but not both.

" + }, + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.

You must include either logGroupIdentifier or logGroupName, but not both.

" + }, + "logStreamNamePrefix":{ + "shape":"LogStreamName", + "documentation":"

The prefix to match.

If orderBy is LastEventTime, you cannot specify this parameter.

" + }, + "orderBy":{ + "shape":"OrderBy", + "documentation":"

If the value is LogStreamName, the results are ordered by log stream name. If the value is LastEventTime, the results are ordered by the event time. The default value is LogStreamName.

If you order the results by event time, you cannot specify the logStreamNamePrefix parameter.

lastEventTimestamp represents the time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.

" + }, + "descending":{ + "shape":"Descending", + "documentation":"

If the value is true, results are returned in descending order. If the value is to false, results are returned in ascending order. The default value is false.

" + }, + "nextToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" + }, + "limit":{ + "shape":"DescribeLimit", + "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" + } } }, "DescribeLogStreamsResponse":{ "type":"structure", "members":{ - "logStreams":{"shape":"LogStreams"}, + "logStreams":{ + "shape":"LogStreams", + "documentation":"

The log streams.

" + }, "nextToken":{"shape":"NextToken"} } }, "DescribeMetricFiltersRequest":{ "type":"structure", "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "filterNamePrefix":{"shape":"FilterName"}, - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"}, - "metricName":{"shape":"MetricName"}, - "metricNamespace":{"shape":"MetricNamespace"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "filterNamePrefix":{ + "shape":"FilterName", + "documentation":"

The prefix to match. CloudWatch Logs uses the value that you set here only if you also include the logGroupName parameter in your request.

" + }, + "nextToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" + }, + "limit":{ + "shape":"DescribeLimit", + "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" + }, + "metricName":{ + "shape":"MetricName", + "documentation":"

Filters results to include only those with the specified metric name. If you include this parameter in your request, you must also include the metricNamespace parameter.

" + }, + "metricNamespace":{ + "shape":"MetricNamespace", + "documentation":"

Filters results to include only those in the specified namespace. If you include this parameter in your request, you must also include the metricName parameter.

" + } } }, "DescribeMetricFiltersResponse":{ "type":"structure", "members":{ - "metricFilters":{"shape":"MetricFilters"}, + "metricFilters":{ + "shape":"MetricFilters", + "documentation":"

The metric filters.

" + }, "nextToken":{"shape":"NextToken"} } }, @@ -1487,31 +1368,52 @@ "DescribeQueriesRequest":{ "type":"structure", "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "status":{"shape":"QueryStatus"}, - "maxResults":{"shape":"DescribeQueriesMaxResults"}, + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

Limits the returned queries to only those for the specified log group.

" + }, + "status":{ + "shape":"QueryStatus", + "documentation":"

Limits the returned queries to only those that have the specified status. Valid values are Cancelled, Complete, Failed, Running, and Scheduled.

" + }, + "maxResults":{ + "shape":"DescribeQueriesMaxResults", + "documentation":"

Limits the number of returned queries to the specified number.

" + }, "nextToken":{"shape":"NextToken"} } }, "DescribeQueriesResponse":{ "type":"structure", "members":{ - "queries":{"shape":"QueryInfoList"}, + "queries":{ + "shape":"QueryInfoList", + "documentation":"

The list of queries that match the request.

" + }, "nextToken":{"shape":"NextToken"} } }, "DescribeQueryDefinitionsRequest":{ "type":"structure", "members":{ - "queryDefinitionNamePrefix":{"shape":"QueryDefinitionName"}, - "maxResults":{"shape":"QueryListMaxResults"}, + "queryDefinitionNamePrefix":{ + "shape":"QueryDefinitionName", + "documentation":"

Use this parameter to filter your results to only the query definitions that have names that start with the prefix you specify.

" + }, + "maxResults":{ + "shape":"QueryListMaxResults", + "documentation":"

Limits the number of returned query definitions to the specified number.

" + }, "nextToken":{"shape":"NextToken"} } }, "DescribeQueryDefinitionsResponse":{ "type":"structure", "members":{ - "queryDefinitions":{"shape":"QueryDefinitionList"}, + "queryDefinitions":{ + "shape":"QueryDefinitionList", + "documentation":"

The list of query definitions that match your request.

" + }, "nextToken":{"shape":"NextToken"} } }, @@ -1519,13 +1421,19 @@ "type":"structure", "members":{ "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"} + "limit":{ + "shape":"DescribeLimit", + "documentation":"

The maximum number of resource policies to be displayed with one call of this API.

" + } } }, "DescribeResourcePoliciesResponse":{ "type":"structure", "members":{ - "resourcePolicies":{"shape":"ResourcePolicies"}, + "resourcePolicies":{ + "shape":"ResourcePolicies", + "documentation":"

The resource policies that exist in this account.

" + }, "nextToken":{"shape":"NextToken"} } }, @@ -1533,29 +1441,63 @@ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "filterNamePrefix":{"shape":"FilterName"}, - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"DescribeLimit"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "filterNamePrefix":{ + "shape":"FilterName", + "documentation":"

The prefix to match. If you don't specify a value, no prefix filter is applied.

" + }, + "nextToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" + }, + "limit":{ + "shape":"DescribeLimit", + "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" + } } }, "DescribeSubscriptionFiltersResponse":{ "type":"structure", "members":{ - "subscriptionFilters":{"shape":"SubscriptionFilters"}, + "subscriptionFilters":{ + "shape":"SubscriptionFilters", + "documentation":"

The subscription filters.

" + }, "nextToken":{"shape":"NextToken"} } }, "Destination":{ "type":"structure", "members":{ - "destinationName":{"shape":"DestinationName"}, - "targetArn":{"shape":"TargetArn"}, - "roleArn":{"shape":"RoleArn"}, - "accessPolicy":{"shape":"AccessPolicy"}, - "arn":{"shape":"Arn"}, - "creationTime":{"shape":"Timestamp"} - } + "destinationName":{ + "shape":"DestinationName", + "documentation":"

The name of the destination.

" + }, + "targetArn":{ + "shape":"TargetArn", + "documentation":"

The Amazon Resource Name (ARN) of the physical target where the log events are delivered (for example, a Kinesis stream).

" + }, + "roleArn":{ + "shape":"RoleArn", + "documentation":"

A role for impersonation, used when delivering log events to the target.

" + }, + "accessPolicy":{ + "shape":"AccessPolicy", + "documentation":"

An IAM policy document that governs which Amazon Web Services accounts can create subscription filters against this destination.

" + }, + "arn":{ + "shape":"Arn", + "documentation":"

The ARN of this destination.

" + }, + "creationTime":{ + "shape":"Timestamp", + "documentation":"

The creation time of the destination, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + } + }, + "documentation":"

Represents a cross-account destination that receives subscription log events.

" }, "DestinationArn":{ "type":"string", @@ -1587,12 +1529,19 @@ "DisassociateKmsKeyRequest":{ "type":"structure", "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "resourceIdentifier":{"shape":"ResourceIdentifier"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

In your DisassociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.

" + }, + "resourceIdentifier":{ + "shape":"ResourceIdentifier", + "documentation":"

Specifies the target for this operation. You must specify one of the following:

In your DisssociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.

" + } } }, "Distribution":{ "type":"string", + "documentation":"

The method used to distribute log data to the destination, which can be either random or grouped by log stream.

", "enum":[ "Random", "ByLogStream" @@ -1622,23 +1571,58 @@ "ExportTask":{ "type":"structure", "members":{ - "taskId":{"shape":"ExportTaskId"}, - "taskName":{"shape":"ExportTaskName"}, - "logGroupName":{"shape":"LogGroupName"}, - "from":{"shape":"Timestamp"}, - "to":{"shape":"Timestamp"}, - "destination":{"shape":"ExportDestinationBucket"}, - "destinationPrefix":{"shape":"ExportDestinationPrefix"}, - "status":{"shape":"ExportTaskStatus"}, - "executionInfo":{"shape":"ExportTaskExecutionInfo"} - } + "taskId":{ + "shape":"ExportTaskId", + "documentation":"

The ID of the export task.

" + }, + "taskName":{ + "shape":"ExportTaskName", + "documentation":"

The name of the export task.

" + }, + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group from which logs data was exported.

" + }, + "from":{ + "shape":"Timestamp", + "documentation":"

The start time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not exported.

" + }, + "to":{ + "shape":"Timestamp", + "documentation":"

The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported.

" + }, + "destination":{ + "shape":"ExportDestinationBucket", + "documentation":"

The name of the S3 bucket to which the log data was exported.

" + }, + "destinationPrefix":{ + "shape":"ExportDestinationPrefix", + "documentation":"

The prefix that was used as the start of Amazon S3 key for every object exported.

" + }, + "status":{ + "shape":"ExportTaskStatus", + "documentation":"

The status of the export task.

" + }, + "executionInfo":{ + "shape":"ExportTaskExecutionInfo", + "documentation":"

Execution information about the export task.

" + } + }, + "documentation":"

Represents an export task.

" }, "ExportTaskExecutionInfo":{ "type":"structure", "members":{ - "creationTime":{"shape":"Timestamp"}, - "completionTime":{"shape":"Timestamp"} - } + "creationTime":{ + "shape":"Timestamp", + "documentation":"

The creation time of the export task, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + }, + "completionTime":{ + "shape":"Timestamp", + "documentation":"

The completion time of the export task, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + } + }, + "documentation":"

Represents the status of an export task.

" }, "ExportTaskId":{ "type":"string", @@ -1653,9 +1637,16 @@ "ExportTaskStatus":{ "type":"structure", "members":{ - "code":{"shape":"ExportTaskStatusCode"}, - "message":{"shape":"ExportTaskStatusMessage"} - } + "code":{ + "shape":"ExportTaskStatusCode", + "documentation":"

The status code of the export task.

" + }, + "message":{ + "shape":"ExportTaskStatusMessage", + "documentation":"

The status message related to the status code.

" + } + }, + "documentation":"

Represents the status of an export task.

" }, "ExportTaskStatusCode":{ "type":"string", @@ -1683,29 +1674,69 @@ "FilterLogEventsRequest":{ "type":"structure", "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, - "logStreamNames":{"shape":"InputLogStreamNames"}, - "logStreamNamePrefix":{"shape":"LogStreamName"}, - "startTime":{"shape":"Timestamp"}, - "endTime":{"shape":"Timestamp"}, - "filterPattern":{"shape":"FilterPattern"}, - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"EventsLimit"}, + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group to search.

You must include either logGroupIdentifier or logGroupName, but not both.

" + }, + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

Specify either the name or ARN of the log group to view log events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.

You must include either logGroupIdentifier or logGroupName, but not both.

" + }, + "logStreamNames":{ + "shape":"InputLogStreamNames", + "documentation":"

Filters the results to only logs from the log streams in this list.

If you specify a value for both logStreamNamePrefix and logStreamNames, the action returns an InvalidParameterException error.

" + }, + "logStreamNamePrefix":{ + "shape":"LogStreamName", + "documentation":"

Filters the results to include only events from log streams that have names starting with this prefix.

If you specify a value for both logStreamNamePrefix and logStreamNames, but the value for logStreamNamePrefix does not match any log stream names specified in logStreamNames, the action returns an InvalidParameterException error.

" + }, + "startTime":{ + "shape":"Timestamp", + "documentation":"

The start of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not returned.

" + }, + "endTime":{ + "shape":"Timestamp", + "documentation":"

The end of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not returned.

" + }, + "filterPattern":{ + "shape":"FilterPattern", + "documentation":"

The filter pattern to use. For more information, see Filter and Pattern Syntax.

If not provided, all the events are matched.

" + }, + "nextToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of events to return. (You received this token from a previous call.)

" + }, + "limit":{ + "shape":"EventsLimit", + "documentation":"

The maximum number of events to return. The default is 10,000 events.

" + }, "interleaved":{ "shape":"Interleaved", + "documentation":"

If the value is true, the operation attempts to provide responses that contain events from multiple log streams within the log group, interleaved in a single response. If the value is false, all the matched log events in the first log stream are searched first, then those in the next log stream, and so on.

Important As of June 17, 2019, this parameter is ignored and the value is assumed to be true. The response from this operation always interleaves events from multiple log streams within a log group.

", "deprecated":true, "deprecatedMessage":"Starting on June 17, 2019, this parameter will be ignored and the value will be assumed to be true. The response from this operation will always interleave events from multiple log streams within a log group." }, - "unmask":{"shape":"Unmask"} + "unmask":{ + "shape":"Unmask", + "documentation":"

Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false.

To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.

" + } } }, "FilterLogEventsResponse":{ "type":"structure", "members":{ - "events":{"shape":"FilteredLogEvents"}, - "searchedLogStreams":{"shape":"SearchedLogStreams"}, - "nextToken":{"shape":"NextToken"} + "events":{ + "shape":"FilteredLogEvents", + "documentation":"

The matched events.

" + }, + "searchedLogStreams":{ + "shape":"SearchedLogStreams", + "documentation":"

Important As of May 15, 2020, this parameter is no longer supported. This parameter returns an empty list.

Indicates which log streams have been searched and whether each has been searched completely.

" + }, + "nextToken":{ + "shape":"NextToken", + "documentation":"

The token to use when requesting the next set of items. The token expires after 24 hours.

" + } } }, "FilterName":{ @@ -1716,18 +1747,35 @@ }, "FilterPattern":{ "type":"string", + "documentation":"

A symbolic description of how CloudWatch Logs should interpret the data in each log event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You use the filter pattern to specify what to look for in the log event message.

", "max":1024, "min":0 }, "FilteredLogEvent":{ "type":"structure", "members":{ - "logStreamName":{"shape":"LogStreamName"}, - "timestamp":{"shape":"Timestamp"}, - "message":{"shape":"EventMessage"}, - "ingestionTime":{"shape":"Timestamp"}, - "eventId":{"shape":"EventId"} - } + "logStreamName":{ + "shape":"LogStreamName", + "documentation":"

The name of the log stream to which this event belongs.

" + }, + "timestamp":{ + "shape":"Timestamp", + "documentation":"

The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + }, + "message":{ + "shape":"EventMessage", + "documentation":"

The data contained in the log event.

" + }, + "ingestionTime":{ + "shape":"Timestamp", + "documentation":"

The time the event was ingested, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + }, + "eventId":{ + "shape":"EventId", + "documentation":"

The ID of the event.

" + } + }, + "documentation":"

Represents a matched event.

" }, "FilteredLogEvents":{ "type":"list", @@ -1738,134 +1786,166 @@ "type":"structure", "required":["logGroupIdentifier"], "members":{ - "logGroupIdentifier":{"shape":"LogGroupIdentifier"} + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

The name or ARN of the log group that contains the data protection policy that you want to see.

" + } } }, "GetDataProtectionPolicyResponse":{ "type":"structure", "members":{ - "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, - "policyDocument":{"shape":"DataProtectionPolicyDocument"}, - "lastUpdatedTime":{"shape":"Timestamp"} - } - }, - "GetDeliveryDestinationPolicyRequest":{ - "type":"structure", - "required":["deliveryDestinationName"], - "members":{ - "deliveryDestinationName":{"shape":"DeliveryDestinationName"} - } - }, - "GetDeliveryDestinationPolicyResponse":{ - "type":"structure", - "members":{ - "policy":{"shape":"Policy"} - } - }, - "GetDeliveryDestinationRequest":{ - "type":"structure", - "required":["name"], - "members":{ - "name":{"shape":"DeliveryDestinationName"} - } - }, - "GetDeliveryDestinationResponse":{ - "type":"structure", - "members":{ - "deliveryDestination":{"shape":"DeliveryDestination"} - } - }, - "GetDeliveryRequest":{ - "type":"structure", - "required":["id"], - "members":{ - "id":{"shape":"DeliveryId"} - } - }, - "GetDeliveryResponse":{ - "type":"structure", - "members":{ - "delivery":{"shape":"Delivery"} - } - }, - "GetDeliverySourceRequest":{ - "type":"structure", - "required":["name"], - "members":{ - "name":{"shape":"DeliverySourceName"} - } - }, - "GetDeliverySourceResponse":{ - "type":"structure", - "members":{ - "deliverySource":{"shape":"DeliverySource"} + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

The log group name or ARN that you specified in your request.

" + }, + "policyDocument":{ + "shape":"DataProtectionPolicyDocument", + "documentation":"

The data protection policy document for this log group.

" + }, + "lastUpdatedTime":{ + "shape":"Timestamp", + "documentation":"

The date and time that this policy was most recently updated.

" + } } }, "GetLogEventsRequest":{ "type":"structure", "required":["logStreamName"], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, - "logStreamName":{"shape":"LogStreamName"}, - "startTime":{"shape":"Timestamp"}, - "endTime":{"shape":"Timestamp"}, - "nextToken":{"shape":"NextToken"}, - "limit":{"shape":"EventsLimit"}, - "startFromHead":{"shape":"StartFromHead"}, - "unmask":{"shape":"Unmask"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

You must include either logGroupIdentifier or logGroupName, but not both.

" + }, + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

Specify either the name or ARN of the log group to view events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.

You must include either logGroupIdentifier or logGroupName, but not both.

" + }, + "logStreamName":{ + "shape":"LogStreamName", + "documentation":"

The name of the log stream.

" + }, + "startTime":{ + "shape":"Timestamp", + "documentation":"

The start of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this time or later than this time are included. Events with a timestamp earlier than this time are not included.

" + }, + "endTime":{ + "shape":"Timestamp", + "documentation":"

The end of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later than this time are not included.

" + }, + "nextToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" + }, + "limit":{ + "shape":"EventsLimit", + "documentation":"

The maximum number of log events returned. If you don't specify a limit, the default is as many log events as can fit in a response size of 1 MB (up to 10,000 log events).

" + }, + "startFromHead":{ + "shape":"StartFromHead", + "documentation":"

If the value is true, the earliest log events are returned first. If the value is false, the latest log events are returned first. The default value is false.

If you are using a previous nextForwardToken value as the nextToken in this operation, you must specify true for startFromHead.

" + }, + "unmask":{ + "shape":"Unmask", + "documentation":"

Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false.

To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.

" + } } }, "GetLogEventsResponse":{ "type":"structure", "members":{ - "events":{"shape":"OutputLogEvents"}, - "nextForwardToken":{"shape":"NextToken"}, - "nextBackwardToken":{"shape":"NextToken"} + "events":{ + "shape":"OutputLogEvents", + "documentation":"

The events.

" + }, + "nextForwardToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of items in the forward direction. The token expires after 24 hours. If you have reached the end of the stream, it returns the same token you passed in.

" + }, + "nextBackwardToken":{ + "shape":"NextToken", + "documentation":"

The token for the next set of items in the backward direction. The token expires after 24 hours. This token is not null. If you have reached the end of the stream, it returns the same token you passed in.

" + } } }, "GetLogGroupFieldsRequest":{ "type":"structure", "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "time":{"shape":"Timestamp"}, - "logGroupIdentifier":{"shape":"LogGroupIdentifier"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group to search.

You must include either logGroupIdentifier or logGroupName, but not both.

" + }, + "time":{ + "shape":"Timestamp", + "documentation":"

The time to set as the center of the query. If you specify time, the 8 minutes before and 8 minutes after this time are searched. If you omit time, the most recent 15 minutes up to the current time are searched.

The time value is specified as epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.

" + }, + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must specify the ARN.

You must include either logGroupIdentifier or logGroupName, but not both.

" + } } }, "GetLogGroupFieldsResponse":{ "type":"structure", "members":{ - "logGroupFields":{"shape":"LogGroupFieldList"} + "logGroupFields":{ + "shape":"LogGroupFieldList", + "documentation":"

The array of fields found in the query. Each object in the array contains the name of the field, along with the percentage of time it appeared in the log events that were queried.

" + } } }, "GetLogRecordRequest":{ "type":"structure", "required":["logRecordPointer"], "members":{ - "logRecordPointer":{"shape":"LogRecordPointer"}, - "unmask":{"shape":"Unmask"} + "logRecordPointer":{ + "shape":"LogRecordPointer", + "documentation":"

The pointer corresponding to the log event record you want to retrieve. You get this from the response of a GetQueryResults operation. In that response, the value of the @ptr field for a log event is the value to use as logRecordPointer to retrieve that complete log event record.

" + }, + "unmask":{ + "shape":"Unmask", + "documentation":"

Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false.

To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.

" + } } }, "GetLogRecordResponse":{ "type":"structure", "members":{ - "logRecord":{"shape":"LogRecord"} + "logRecord":{ + "shape":"LogRecord", + "documentation":"

The requested log event, as a JSON string.

" + } } }, "GetQueryResultsRequest":{ "type":"structure", "required":["queryId"], "members":{ - "queryId":{"shape":"QueryId"} + "queryId":{ + "shape":"QueryId", + "documentation":"

The ID number of the query.

" + } } }, "GetQueryResultsResponse":{ "type":"structure", "members":{ - "results":{"shape":"QueryResults"}, - "statistics":{"shape":"QueryStatistics"}, - "status":{"shape":"QueryStatus"}, - "encryptionKey":{"shape":"EncryptionKey"} + "results":{ + "shape":"QueryResults", + "documentation":"

The log events that matched the query criteria during the most recent time it ran.

The results value is an array of arrays. Each log event is one object in the top-level array. Each of these log event objects is an array of field/value pairs.

" + }, + "statistics":{ + "shape":"QueryStatistics", + "documentation":"

Includes the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the scanned log events. These values reflect the full raw results of the query.

" + }, + "status":{ + "shape":"QueryStatus", + "documentation":"

The status of the most recent running of the query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, Timeout, and Unknown.

Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range being searched or partition your query into a number of queries.

" + }, + "encryptionKey":{ + "shape":"EncryptionKey", + "documentation":"

If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field displays the ARN of the key that's used to encrypt the query results when StartQuery stores them.

" + } } }, "IncludeLinkedAccounts":{"type":"boolean"}, @@ -1884,9 +1964,16 @@ "message" ], "members":{ - "timestamp":{"shape":"Timestamp"}, - "message":{"shape":"EventMessage"} - } + "timestamp":{ + "shape":"Timestamp", + "documentation":"

The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + }, + "message":{ + "shape":"EventMessage", + "documentation":"

The raw event message. Each log event can be no larger than 256 KB.

" + } + }, + "documentation":"

Represents a log event, which is a record of activity that was recorded by the application or resource being monitored.

" }, "InputLogEvents":{ "type":"list", @@ -1905,12 +1992,14 @@ "type":"structure", "members":{ }, + "documentation":"

The operation is not valid on the specified resource.

", "exception":true }, "InvalidParameterException":{ "type":"structure", "members":{ }, + "documentation":"

A parameter is specified incorrectly.

", "exception":true }, "InvalidSequenceTokenException":{ @@ -1918,8 +2007,10 @@ "members":{ "expectedSequenceToken":{"shape":"SequenceToken"} }, + "documentation":"

The sequence token is not valid. You can get the correct sequence token in the expectedSequenceToken field in the InvalidSequenceTokenException message.

PutLogEvents actions are now always accepted and never return InvalidSequenceTokenException regardless of receiving an invalid sequence token.

", "exception":true }, + "IsSampled":{"type":"boolean"}, "KmsKeyId":{ "type":"string", "max":256 @@ -1928,26 +2019,36 @@ "type":"structure", "members":{ }, + "documentation":"

You have reached the maximum number of resources that can be created.

", "exception":true }, "ListTagsForResourceRequest":{ "type":"structure", "required":["resourceArn"], "members":{ - "resourceArn":{"shape":"AmazonResourceName"} + "resourceArn":{ + "shape":"AmazonResourceName", + "documentation":"

The ARN of the resource that you want to view tags for.

The ARN format of a log group is arn:aws:logs:Region:account-id:log-group:log-group-name

The ARN format of a destination is arn:aws:logs:Region:account-id:destination:destination-name

For more information about ARN format, see CloudWatch Logs resources and operations.

" + } } }, "ListTagsForResourceResponse":{ "type":"structure", "members":{ - "tags":{"shape":"Tags"} + "tags":{ + "shape":"Tags", + "documentation":"

The list of tags associated with the requested resource.>

" + } } }, "ListTagsLogGroupRequest":{ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{"shape":"LogGroupName"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + } }, "deprecated":true, "deprecatedMessage":"Please use the generic tagging API model ListTagsForResourceRequest and ListTagsForResourceResponse" @@ -1955,32 +2056,150 @@ "ListTagsLogGroupResponse":{ "type":"structure", "members":{ - "tags":{"shape":"Tags"} + "tags":{ + "shape":"Tags", + "documentation":"

The tags for the log group.

" + } }, "deprecated":true, "deprecatedMessage":"Please use the generic tagging API model ListTagsForResourceRequest and ListTagsForResourceResponse" }, + "LiveTailSessionLogEvent":{ + "type":"structure", + "members":{ + "logStreamName":{ + "shape":"LogStreamName", + "documentation":"

To Be Written

" + }, + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

To Be Written

" + }, + "message":{ + "shape":"EventMessage", + "documentation":"

To Be Written

" + }, + "timestamp":{ + "shape":"Timestamp", + "documentation":"

To Be Written

" + }, + "ingestionTime":{ + "shape":"Timestamp", + "documentation":"

To Be Written

" + } + }, + "documentation":"

To Be Written

" + }, + "LiveTailSessionMetadata":{ + "type":"structure", + "members":{ + "sampled":{ + "shape":"IsSampled", + "documentation":"

To Be Written

" + } + }, + "documentation":"

To Be Written

" + }, + "LiveTailSessionResults":{ + "type":"list", + "member":{"shape":"LiveTailSessionLogEvent"} + }, + "LiveTailSessionStart":{ + "type":"structure", + "members":{ + "requestId":{ + "shape":"RequestId", + "documentation":"

To Be Written

" + }, + "sessionId":{ + "shape":"SessionId", + "documentation":"

To Be Written

" + }, + "logGroupIdentifiers":{ + "shape":"StartLiveTailLogGroupIdentifiers", + "documentation":"

To Be Written

" + }, + "logStreamNames":{ + "shape":"InputLogStreamNames", + "documentation":"

To Be Written

" + }, + "logStreamNamePrefixes":{ + "shape":"InputLogStreamNames", + "documentation":"

To Be Written

" + }, + "logEventFilterPattern":{"shape":"FilterPattern"} + }, + "documentation":"

To Be Written

", + "event":true + }, + "LiveTailSessionUpdate":{ + "type":"structure", + "members":{ + "sessionMetadata":{ + "shape":"LiveTailSessionMetadata", + "documentation":"

To Be Written

" + }, + "sessionResults":{ + "shape":"LiveTailSessionResults", + "documentation":"

To be written

" + } + }, + "documentation":"

To Be Written

", + "event":true + }, "LogEventIndex":{"type":"integer"}, "LogGroup":{ "type":"structure", "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "creationTime":{"shape":"Timestamp"}, + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "creationTime":{ + "shape":"Timestamp", + "documentation":"

The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + }, "retentionInDays":{"shape":"Days"}, - "metricFilterCount":{"shape":"FilterCount"}, - "arn":{"shape":"Arn"}, - "storedBytes":{"shape":"StoredBytes"}, - "kmsKeyId":{"shape":"KmsKeyId"}, - "dataProtectionStatus":{"shape":"DataProtectionStatus"}, - "inheritedProperties":{"shape":"InheritedProperties"} - } + "metricFilterCount":{ + "shape":"FilterCount", + "documentation":"

The number of metric filters.

" + }, + "arn":{ + "shape":"Arn", + "documentation":"

The Amazon Resource Name (ARN) of the log group.

" + }, + "storedBytes":{ + "shape":"StoredBytes", + "documentation":"

The number of bytes stored.

" + }, + "kmsKeyId":{ + "shape":"KmsKeyId", + "documentation":"

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data.

" + }, + "dataProtectionStatus":{ + "shape":"DataProtectionStatus", + "documentation":"

Displays whether this log group has a protection policy, or whether it had one in the past. For more information, see PutDataProtectionPolicy.

" + }, + "inheritedProperties":{ + "shape":"InheritedProperties", + "documentation":"

Displays all the properties that this log group has inherited from account-level settings.

" + } + }, + "documentation":"

Represents a log group.

" }, "LogGroupField":{ "type":"structure", "members":{ - "name":{"shape":"Field"}, - "percent":{"shape":"Percentage"} - } + "name":{ + "shape":"Field", + "documentation":"

The name of a log field.

" + }, + "percent":{ + "shape":"Percentage", + "documentation":"

The percentage of log events queried that contained the field.

" + } + }, + "documentation":"

The fields contained in log events found by a GetLogGroupFields operation, along with the percentage of queried log events in which each field appears.

" }, "LogGroupFieldList":{ "type":"list", @@ -2025,19 +2244,42 @@ "LogStream":{ "type":"structure", "members":{ - "logStreamName":{"shape":"LogStreamName"}, - "creationTime":{"shape":"Timestamp"}, - "firstEventTimestamp":{"shape":"Timestamp"}, - "lastEventTimestamp":{"shape":"Timestamp"}, - "lastIngestionTime":{"shape":"Timestamp"}, - "uploadSequenceToken":{"shape":"SequenceToken"}, - "arn":{"shape":"Arn"}, + "logStreamName":{ + "shape":"LogStreamName", + "documentation":"

The name of the log stream.

" + }, + "creationTime":{ + "shape":"Timestamp", + "documentation":"

The creation time of the stream, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + }, + "firstEventTimestamp":{ + "shape":"Timestamp", + "documentation":"

The time of the first event, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + }, + "lastEventTimestamp":{ + "shape":"Timestamp", + "documentation":"

The time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. The lastEventTime value updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.

" + }, + "lastIngestionTime":{ + "shape":"Timestamp", + "documentation":"

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

" + }, + "uploadSequenceToken":{ + "shape":"SequenceToken", + "documentation":"

The sequence token.

The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions are always accepted regardless of receiving an invalid sequence token. You don't need to obtain uploadSequenceToken to use a PutLogEvents action.

" + }, + "arn":{ + "shape":"Arn", + "documentation":"

The Amazon Resource Name (ARN) of the log stream.

" + }, "storedBytes":{ "shape":"StoredBytes", + "documentation":"

The number of bytes stored.

Important: As of June 17, 2019, this parameter is no longer supported for log streams, and is always reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected.

", "deprecated":true, "deprecatedMessage":"Starting on June 17, 2019, this parameter will be deprecated for log streams, and will be reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected." } - } + }, + "documentation":"

Represents a log stream, which is a sequence of log events from a single emitter of logs.

" }, "LogStreamName":{ "type":"string", @@ -2050,37 +2292,55 @@ "type":"list", "member":{"shape":"LogStream"} }, - "LogType":{ - "type":"string", - "max":255, - "min":1, - "pattern":"[\\w]*" - }, "MalformedQueryException":{ "type":"structure", "members":{ "queryCompileError":{"shape":"QueryCompileError"} }, + "documentation":"

The query string is not valid. Details about this error are displayed in a QueryCompileError object. For more information, see QueryCompileError.

For more information about valid query syntax, see CloudWatch Logs Insights Query Syntax.

", "exception":true }, "Message":{"type":"string"}, "MetricFilter":{ "type":"structure", "members":{ - "filterName":{"shape":"FilterName"}, + "filterName":{ + "shape":"FilterName", + "documentation":"

The name of the metric filter.

" + }, "filterPattern":{"shape":"FilterPattern"}, - "metricTransformations":{"shape":"MetricTransformations"}, - "creationTime":{"shape":"Timestamp"}, - "logGroupName":{"shape":"LogGroupName"} - } + "metricTransformations":{ + "shape":"MetricTransformations", + "documentation":"

The metric transformations.

" + }, + "creationTime":{ + "shape":"Timestamp", + "documentation":"

The creation time of the metric filter, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + }, + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + } + }, + "documentation":"

Metric filters express how CloudWatch Logs would extract metric observations from ingested log events and transform them into metric data in a CloudWatch metric.

" }, "MetricFilterMatchRecord":{ "type":"structure", "members":{ - "eventNumber":{"shape":"EventNumber"}, - "eventMessage":{"shape":"EventMessage"}, - "extractedValues":{"shape":"ExtractedValues"} - } + "eventNumber":{ + "shape":"EventNumber", + "documentation":"

The event number.

" + }, + "eventMessage":{ + "shape":"EventMessage", + "documentation":"

The raw event data.

" + }, + "extractedValues":{ + "shape":"ExtractedValues", + "documentation":"

The values extracted from the event data by the filter.

" + } + }, + "documentation":"

Represents a matched event.

" }, "MetricFilterMatches":{ "type":"list", @@ -2092,6 +2352,7 @@ }, "MetricName":{ "type":"string", + "documentation":"

The name of the CloudWatch metric to which the monitored log information should be published. For example, you might publish to a metric named ErrorCount.

", "max":255, "pattern":"[^:*$]*" }, @@ -2108,13 +2369,32 @@ "metricValue" ], "members":{ - "metricName":{"shape":"MetricName"}, - "metricNamespace":{"shape":"MetricNamespace"}, - "metricValue":{"shape":"MetricValue"}, - "defaultValue":{"shape":"DefaultValue"}, - "dimensions":{"shape":"Dimensions"}, - "unit":{"shape":"StandardUnit"} - } + "metricName":{ + "shape":"MetricName", + "documentation":"

The name of the CloudWatch metric.

" + }, + "metricNamespace":{ + "shape":"MetricNamespace", + "documentation":"

A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.

" + }, + "metricValue":{ + "shape":"MetricValue", + "documentation":"

The value to publish to the CloudWatch metric when a filter pattern matches a log event.

" + }, + "defaultValue":{ + "shape":"DefaultValue", + "documentation":"

(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.

" + }, + "dimensions":{ + "shape":"Dimensions", + "documentation":"

The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.

Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric.

CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.

You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.

" + }, + "unit":{ + "shape":"StandardUnit", + "documentation":"

The unit to assign to the metric. If you omit this, the unit is set as None.

" + } + }, + "documentation":"

Indicates how to transform ingested log events to metric data in a CloudWatch metric.

" }, "MetricTransformations":{ "type":"list", @@ -2124,16 +2404,19 @@ }, "MetricValue":{ "type":"string", + "documentation":"

The value to publish to the CloudWatch metric. For example, if you're counting the occurrences of a term like Error, the value is 1 for each occurrence. If you're counting the bytes transferred, the value is the value in the log event.

", "max":100 }, "NextToken":{ "type":"string", + "documentation":"

The token for the next set of items to return. The token expires after 24 hours.

", "min":1 }, "OperationAbortedException":{ "type":"structure", "members":{ }, + "documentation":"

Multiple concurrent requests to update the same resource were in conflict.

", "exception":true }, "OrderBy":{ @@ -2143,23 +2426,23 @@ "LastEventTime" ] }, - "OutputFormat":{ - "type":"string", - "enum":[ - "json", - "plain", - "w3c", - "raw", - "parquet" - ] - }, "OutputLogEvent":{ "type":"structure", "members":{ - "timestamp":{"shape":"Timestamp"}, - "message":{"shape":"EventMessage"}, - "ingestionTime":{"shape":"Timestamp"} - } + "timestamp":{ + "shape":"Timestamp", + "documentation":"

The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + }, + "message":{ + "shape":"EventMessage", + "documentation":"

The data contained in the log event.

" + }, + "ingestionTime":{ + "shape":"Timestamp", + "documentation":"

The time the event was ingested, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + } + }, + "documentation":"

Represents a log event.

" }, "OutputLogEvents":{ "type":"list", @@ -2170,12 +2453,6 @@ "max":100, "min":0 }, - "Policy":{ - "type":"structure", - "members":{ - "deliveryDestinationPolicy":{"shape":"DeliveryDestinationPolicy"} - } - }, "PolicyDocument":{ "type":"string", "max":5120, @@ -2194,16 +2471,31 @@ "policyType" ], "members":{ - "policyName":{"shape":"PolicyName"}, - "policyDocument":{"shape":"AccountPolicyDocument"}, - "policyType":{"shape":"PolicyType"}, - "scope":{"shape":"Scope"} + "policyName":{ + "shape":"PolicyName", + "documentation":"

A name for the policy. This must be unique within the account.

" + }, + "policyDocument":{ + "shape":"AccountPolicyDocument", + "documentation":"

Specify the data protection policy, in JSON.

This policy must include two JSON blocks:

For an example data protection policy, see the Examples section on this page.

The contents of the two DataIdentifer arrays must match exactly.

In addition to the two JSON blocks, the policyDocument can also include Name, Description, and Version fields. The Name is different than the operation's policyName parameter, and is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch.

The JSON specified in policyDocument can be up to 30,720 characters.

" + }, + "policyType":{ + "shape":"PolicyType", + "documentation":"

Currently the only valid value for this parameter is DATA_PROTECTION_POLICY.

" + }, + "scope":{ + "shape":"Scope", + "documentation":"

Currently the only valid value for this parameter is ALL, which specifies that the data protection policy applies to all log groups in the account. If you omit this parameter, the default of ALL is used.

" + } } }, "PutAccountPolicyResponse":{ "type":"structure", "members":{ - "accountPolicy":{"shape":"AccountPolicy"} + "accountPolicy":{ + "shape":"AccountPolicy", + "documentation":"

The account policy that you created.

" + } } }, "PutDataProtectionPolicyRequest":{ @@ -2213,72 +2505,31 @@ "policyDocument" ], "members":{ - "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, - "policyDocument":{"shape":"DataProtectionPolicyDocument"} + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

Specify either the log group name or log group ARN.

" + }, + "policyDocument":{ + "shape":"DataProtectionPolicyDocument", + "documentation":"

Specify the data protection policy, in JSON.

This policy must include two JSON blocks:

For an example data protection policy, see the Examples section on this page.

The contents of the two DataIdentifer arrays must match exactly.

In addition to the two JSON blocks, the policyDocument can also include Name, Description, and Version fields. The Name is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch.

The JSON specified in policyDocument can be up to 30,720 characters.

" + } } }, "PutDataProtectionPolicyResponse":{ "type":"structure", "members":{ - "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, - "policyDocument":{"shape":"DataProtectionPolicyDocument"}, - "lastUpdatedTime":{"shape":"Timestamp"} - } - }, - "PutDeliveryDestinationPolicyRequest":{ - "type":"structure", - "required":[ - "deliveryDestinationName", - "deliveryDestinationPolicy" - ], - "members":{ - "deliveryDestinationName":{"shape":"DeliveryDestinationName"}, - "deliveryDestinationPolicy":{"shape":"DeliveryDestinationPolicy"} - } - }, - "PutDeliveryDestinationPolicyResponse":{ - "type":"structure", - "members":{ - "policy":{"shape":"Policy"} - } - }, - "PutDeliveryDestinationRequest":{ - "type":"structure", - "required":[ - "name", - "deliveryDestinationConfiguration" - ], - "members":{ - "name":{"shape":"DeliveryDestinationName"}, - "outputFormat":{"shape":"OutputFormat"}, - "deliveryDestinationConfiguration":{"shape":"DeliveryDestinationConfiguration"}, - "tags":{"shape":"Tags"} - } - }, - "PutDeliveryDestinationResponse":{ - "type":"structure", - "members":{ - "deliveryDestination":{"shape":"DeliveryDestination"} - } - }, - "PutDeliverySourceRequest":{ - "type":"structure", - "required":[ - "name", - "resourceArn", - "logType" - ], - "members":{ - "name":{"shape":"DeliverySourceName"}, - "resourceArn":{"shape":"Arn"}, - "logType":{"shape":"LogType"}, - "tags":{"shape":"Tags"} - } - }, - "PutDeliverySourceResponse":{ - "type":"structure", - "members":{ - "deliverySource":{"shape":"DeliverySource"} + "logGroupIdentifier":{ + "shape":"LogGroupIdentifier", + "documentation":"

The log group name or ARN that you specified in your request.

" + }, + "policyDocument":{ + "shape":"DataProtectionPolicyDocument", + "documentation":"

The data protection policy used for this log group.

" + }, + "lastUpdatedTime":{ + "shape":"Timestamp", + "documentation":"

The date and time that this policy was most recently updated.

" + } } }, "PutDestinationPolicyRequest":{ @@ -2288,9 +2539,18 @@ "accessPolicy" ], "members":{ - "destinationName":{"shape":"DestinationName"}, - "accessPolicy":{"shape":"AccessPolicy"}, - "forceUpdate":{"shape":"ForceUpdate"} + "destinationName":{ + "shape":"DestinationName", + "documentation":"

A name for an existing destination.

" + }, + "accessPolicy":{ + "shape":"AccessPolicy", + "documentation":"

An IAM policy document that authorizes cross-account users to deliver their log events to the associated destination. This can be up to 5120 bytes.

" + }, + "forceUpdate":{ + "shape":"ForceUpdate", + "documentation":"

Specify true if you are updating an existing destination policy to grant permission to an organization ID instead of granting permission to individual Amazon Web Services accounts. Before you update a destination policy this way, you must first update the subscription filters in the accounts that send logs to this destination. If you do not, the subscription filters might stop working. By specifying true for forceUpdate, you are affirming that you have already updated the subscription filters. For more information, see Updating an existing cross-account subscription

If you omit this parameter, the default of false is used.

" + } } }, "PutDestinationRequest":{ @@ -2301,16 +2561,31 @@ "roleArn" ], "members":{ - "destinationName":{"shape":"DestinationName"}, - "targetArn":{"shape":"TargetArn"}, - "roleArn":{"shape":"RoleArn"}, - "tags":{"shape":"Tags"} + "destinationName":{ + "shape":"DestinationName", + "documentation":"

A name for the destination.

" + }, + "targetArn":{ + "shape":"TargetArn", + "documentation":"

The ARN of an Amazon Kinesis stream to which to deliver matching log events.

" + }, + "roleArn":{ + "shape":"RoleArn", + "documentation":"

The ARN of an IAM role that grants CloudWatch Logs permissions to call the Amazon Kinesis PutRecord operation on the destination stream.

" + }, + "tags":{ + "shape":"Tags", + "documentation":"

An optional list of key-value pairs to associate with the resource.

For more information about tagging, see Tagging Amazon Web Services resources

" + } } }, "PutDestinationResponse":{ "type":"structure", "members":{ - "destination":{"shape":"Destination"} + "destination":{ + "shape":"Destination", + "documentation":"

The destination.

" + } } }, "PutLogEventsRequest":{ @@ -2321,17 +2596,35 @@ "logEvents" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "logStreamName":{"shape":"LogStreamName"}, - "logEvents":{"shape":"InputLogEvents"}, - "sequenceToken":{"shape":"SequenceToken"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "logStreamName":{ + "shape":"LogStreamName", + "documentation":"

The name of the log stream.

" + }, + "logEvents":{ + "shape":"InputLogEvents", + "documentation":"

The log events.

" + }, + "sequenceToken":{ + "shape":"SequenceToken", + "documentation":"

The sequence token obtained from the response of the previous PutLogEvents call.

The sequenceToken parameter is now ignored in PutLogEvents actions. PutLogEvents actions are now accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException even if the sequence token is not valid.

" + } } }, "PutLogEventsResponse":{ "type":"structure", "members":{ - "nextSequenceToken":{"shape":"SequenceToken"}, - "rejectedLogEventsInfo":{"shape":"RejectedLogEventsInfo"} + "nextSequenceToken":{ + "shape":"SequenceToken", + "documentation":"

The next sequence token.

This field has been deprecated.

The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions are always accepted even if the sequence token is not valid. You can use parallel PutLogEvents actions on the same log stream and you do not need to wait for the response of a previous PutLogEvents action to obtain the nextSequenceToken value.

" + }, + "rejectedLogEventsInfo":{ + "shape":"RejectedLogEventsInfo", + "documentation":"

The rejected events.

" + } } }, "PutMetricFilterRequest":{ @@ -2343,10 +2636,22 @@ "metricTransformations" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "filterName":{"shape":"FilterName"}, - "filterPattern":{"shape":"FilterPattern"}, - "metricTransformations":{"shape":"MetricTransformations"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "filterName":{ + "shape":"FilterName", + "documentation":"

A name for the metric filter.

" + }, + "filterPattern":{ + "shape":"FilterPattern", + "documentation":"

A filter pattern for extracting metric data out of ingested log events.

" + }, + "metricTransformations":{ + "shape":"MetricTransformations", + "documentation":"

A collection of information that defines how metric data gets emitted.

" + } } }, "PutQueryDefinitionRequest":{ @@ -2356,12 +2661,25 @@ "queryString" ], "members":{ - "name":{"shape":"QueryDefinitionName"}, - "queryDefinitionId":{"shape":"QueryId"}, - "logGroupNames":{"shape":"LogGroupNames"}, - "queryString":{"shape":"QueryDefinitionString"}, + "name":{ + "shape":"QueryDefinitionName", + "documentation":"

A name for the query definition. If you are saving numerous query definitions, we recommend that you name them. This way, you can find the ones you want by using the first part of the name as a filter in the queryDefinitionNamePrefix parameter of DescribeQueryDefinitions.

" + }, + "queryDefinitionId":{ + "shape":"QueryId", + "documentation":"

If you are updating a query definition, use this parameter to specify the ID of the query definition that you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions.

If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the new query definition and include it in the response to this operation.

" + }, + "logGroupNames":{ + "shape":"LogGroupNames", + "documentation":"

Use this parameter to include specific log groups as part of your query definition.

If you are updating a query definition and you omit this parameter, then the updated definition will contain no log groups.

" + }, + "queryString":{ + "shape":"QueryDefinitionString", + "documentation":"

The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax.

" + }, "clientToken":{ "shape":"ClientToken", + "documentation":"

Used as an idempotency token, to avoid returning an exception if the service receives the same request twice because of a network error.

", "idempotencyToken":true } } @@ -2369,20 +2687,32 @@ "PutQueryDefinitionResponse":{ "type":"structure", "members":{ - "queryDefinitionId":{"shape":"QueryId"} + "queryDefinitionId":{ + "shape":"QueryId", + "documentation":"

The ID of the query definition.

" + } } }, "PutResourcePolicyRequest":{ "type":"structure", "members":{ - "policyName":{"shape":"PolicyName"}, - "policyDocument":{"shape":"PolicyDocument"} + "policyName":{ + "shape":"PolicyName", + "documentation":"

Name of the new policy. This parameter is required.

" + }, + "policyDocument":{ + "shape":"PolicyDocument", + "documentation":"

Details of the new policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. This parameter is required.

The following example creates a resource policy enabling the Route 53 service to put DNS query logs in to the specified log group. Replace \"logArn\" with the ARN of your CloudWatch Logs resource, such as a log group or log stream.

CloudWatch Logs also supports aws:SourceArn and aws:SourceAccount condition context keys.

In the example resource policy, you would replace the value of SourceArn with the resource making the call from Route 53 to CloudWatch Logs. You would also replace the value of SourceAccount with the Amazon Web Services account ID making that call.

{ \"Version\": \"2012-10-17\", \"Statement\": [ { \"Sid\": \"Route53LogsToCloudWatchLogs\", \"Effect\": \"Allow\", \"Principal\": { \"Service\": [ \"route53.amazonaws.com\" ] }, \"Action\": \"logs:PutLogEvents\", \"Resource\": \"logArn\", \"Condition\": { \"ArnLike\": { \"aws:SourceArn\": \"myRoute53ResourceArn\" }, \"StringEquals\": { \"aws:SourceAccount\": \"myAwsAccountId\" } } } ] }

" + } } }, "PutResourcePolicyResponse":{ "type":"structure", "members":{ - "resourcePolicy":{"shape":"ResourcePolicy"} + "resourcePolicy":{ + "shape":"ResourcePolicy", + "documentation":"

The new policy.

" + } } }, "PutRetentionPolicyRequest":{ @@ -2392,7 +2722,10 @@ "retentionInDays" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, "retentionInDays":{"shape":"Days"} } }, @@ -2405,38 +2738,86 @@ "destinationArn" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "filterName":{"shape":"FilterName"}, - "filterPattern":{"shape":"FilterPattern"}, - "destinationArn":{"shape":"DestinationArn"}, - "roleArn":{"shape":"RoleArn"}, - "distribution":{"shape":"Distribution"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "filterName":{ + "shape":"FilterName", + "documentation":"

A name for the subscription filter. If you are updating an existing filter, you must specify the correct name in filterName. To find the name of the filter currently associated with a log group, use DescribeSubscriptionFilters.

" + }, + "filterPattern":{ + "shape":"FilterPattern", + "documentation":"

A filter pattern for subscribing to a filtered stream of log events.

" + }, + "destinationArn":{ + "shape":"DestinationArn", + "documentation":"

The ARN of the destination to deliver matching log events to. Currently, the supported destinations are:

" + }, + "roleArn":{ + "shape":"RoleArn", + "documentation":"

The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.

" + }, + "distribution":{ + "shape":"Distribution", + "documentation":"

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 random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis data stream.

" + } } }, "QueryCharOffset":{"type":"integer"}, "QueryCompileError":{ "type":"structure", "members":{ - "location":{"shape":"QueryCompileErrorLocation"}, - "message":{"shape":"Message"} - } + "location":{ + "shape":"QueryCompileErrorLocation", + "documentation":"

Reserved.

" + }, + "message":{ + "shape":"Message", + "documentation":"

Reserved.

" + } + }, + "documentation":"

Reserved.

" }, "QueryCompileErrorLocation":{ "type":"structure", "members":{ - "startCharOffset":{"shape":"QueryCharOffset"}, - "endCharOffset":{"shape":"QueryCharOffset"} - } + "startCharOffset":{ + "shape":"QueryCharOffset", + "documentation":"

Reserved.

" + }, + "endCharOffset":{ + "shape":"QueryCharOffset", + "documentation":"

Reserved.

" + } + }, + "documentation":"

Reserved.

" }, "QueryDefinition":{ "type":"structure", "members":{ - "queryDefinitionId":{"shape":"QueryId"}, - "name":{"shape":"QueryDefinitionName"}, - "queryString":{"shape":"QueryDefinitionString"}, - "lastModified":{"shape":"Timestamp"}, - "logGroupNames":{"shape":"LogGroupNames"} - } + "queryDefinitionId":{ + "shape":"QueryId", + "documentation":"

The unique ID of the query definition.

" + }, + "name":{ + "shape":"QueryDefinitionName", + "documentation":"

The name of the query definition.

" + }, + "queryString":{ + "shape":"QueryDefinitionString", + "documentation":"

The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax.

" + }, + "lastModified":{ + "shape":"Timestamp", + "documentation":"

The date that the query definition was most recently modified.

" + }, + "logGroupNames":{ + "shape":"LogGroupNames", + "documentation":"

If this query definition contains a list of log groups that it is limited to, that list appears here.

" + } + }, + "documentation":"

This structure contains details about a saved CloudWatch Logs Insights query definition.

" }, "QueryDefinitionList":{ "type":"list", @@ -2460,12 +2841,28 @@ "QueryInfo":{ "type":"structure", "members":{ - "queryId":{"shape":"QueryId"}, - "queryString":{"shape":"QueryString"}, - "status":{"shape":"QueryStatus"}, - "createTime":{"shape":"Timestamp"}, - "logGroupName":{"shape":"LogGroupName"} - } + "queryId":{ + "shape":"QueryId", + "documentation":"

The unique ID number of this query.

" + }, + "queryString":{ + "shape":"QueryString", + "documentation":"

The query string used in this query.

" + }, + "status":{ + "shape":"QueryStatus", + "documentation":"

The status of this query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, and Unknown.

" + }, + "createTime":{ + "shape":"Timestamp", + "documentation":"

The date and time that this query was created.

" + }, + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group scanned by this query.

" + } + }, + "documentation":"

Information about one CloudWatch Logs Insights query that matches the request in a DescribeQueries operation.

" }, "QueryInfoList":{ "type":"list", @@ -2483,10 +2880,20 @@ "QueryStatistics":{ "type":"structure", "members":{ - "recordsMatched":{"shape":"StatsValue"}, - "recordsScanned":{"shape":"StatsValue"}, - "bytesScanned":{"shape":"StatsValue"} - } + "recordsMatched":{ + "shape":"StatsValue", + "documentation":"

The number of log events that matched the query string.

" + }, + "recordsScanned":{ + "shape":"StatsValue", + "documentation":"

The total number of log events scanned during the query.

" + }, + "bytesScanned":{ + "shape":"StatsValue", + "documentation":"

The total number of bytes in the log events scanned during the query.

" + } + }, + "documentation":"

Contains the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the log events that were scanned.

" }, "QueryStatus":{ "type":"string", @@ -2508,21 +2915,33 @@ "RejectedLogEventsInfo":{ "type":"structure", "members":{ - "tooNewLogEventStartIndex":{"shape":"LogEventIndex"}, - "tooOldLogEventEndIndex":{"shape":"LogEventIndex"}, - "expiredLogEventEndIndex":{"shape":"LogEventIndex"} - } + "tooNewLogEventStartIndex":{ + "shape":"LogEventIndex", + "documentation":"

The log events that are too new.

" + }, + "tooOldLogEventEndIndex":{ + "shape":"LogEventIndex", + "documentation":"

The log events that are dated too far in the past.

" + }, + "expiredLogEventEndIndex":{ + "shape":"LogEventIndex", + "documentation":"

The expired log events.

" + } + }, + "documentation":"

Represents the rejected events.

" + }, + "RequestId":{ + "type":"string", + "max":256, + "min":0 }, "ResourceAlreadyExistsException":{ "type":"structure", "members":{ }, + "documentation":"

The specified resource already exists.

", "exception":true }, - "ResourceArns":{ - "type":"list", - "member":{"shape":"Arn"} - }, "ResourceIdentifier":{ "type":"string", "max":2048, @@ -2533,6 +2952,7 @@ "type":"structure", "members":{ }, + "documentation":"

The specified resource does not exist.

", "exception":true }, "ResourcePolicies":{ @@ -2542,17 +2962,34 @@ "ResourcePolicy":{ "type":"structure", "members":{ - "policyName":{"shape":"PolicyName"}, - "policyDocument":{"shape":"PolicyDocument"}, - "lastUpdatedTime":{"shape":"Timestamp"} - } + "policyName":{ + "shape":"PolicyName", + "documentation":"

The name of the resource policy.

" + }, + "policyDocument":{ + "shape":"PolicyDocument", + "documentation":"

The details of the policy.

" + }, + "lastUpdatedTime":{ + "shape":"Timestamp", + "documentation":"

Timestamp showing when this policy was last updated, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + } + }, + "documentation":"

A policy enabling one or more entities to put logs to a log group in this account.

" }, "ResultField":{ "type":"structure", "members":{ - "field":{"shape":"Field"}, - "value":{"shape":"Value"} - } + "field":{ + "shape":"Field", + "documentation":"

The log event field.

" + }, + "value":{ + "shape":"Value", + "documentation":"

The value of this field.

" + } + }, + "documentation":"

Contains one field from one log event returned by a CloudWatch Logs Insights query, along with the value of that field.

For more information about the fields that are generated by CloudWatch logs, see Supported Logs and Discovered Fields.

" }, "ResultRows":{ "type":"list", @@ -2569,9 +3006,16 @@ "SearchedLogStream":{ "type":"structure", "members":{ - "logStreamName":{"shape":"LogStreamName"}, - "searchedCompletely":{"shape":"LogStreamSearchedCompletely"} - } + "logStreamName":{ + "shape":"LogStreamName", + "documentation":"

The name of the log stream.

" + }, + "searchedCompletely":{ + "shape":"LogStreamSearchedCompletely", + "documentation":"

Indicates whether all the events in this log stream were searched.

" + } + }, + "documentation":"

Represents the search status of a log stream.

" }, "SearchedLogStreams":{ "type":"list", @@ -2581,24 +3025,34 @@ "type":"string", "min":1 }, - "Service":{ + "ServiceUnavailableException":{ + "type":"structure", + "members":{ + }, + "documentation":"

The service cannot complete the request.

", + "exception":true, + "fault":true + }, + "SessionId":{ "type":"string", - "max":255, - "min":1, - "pattern":"[\\w]*" + "max":256, + "min":0 }, - "ServiceQuotaExceededException":{ + "SessionStreamingException":{ "type":"structure", "members":{ + "message":{"shape":"Message"} }, + "documentation":"

To Be Written

", "exception":true }, - "ServiceUnavailableException":{ + "SessionTimeoutException":{ "type":"structure", "members":{ + "message":{"shape":"Message"} }, - "exception":true, - "fault":true + "documentation":"

To Be Written

", + "exception":true }, "StandardUnit":{ "type":"string", @@ -2633,6 +3087,63 @@ ] }, "StartFromHead":{"type":"boolean"}, + "StartLiveTailLogGroupIdentifiers":{ + "type":"list", + "member":{"shape":"LogGroupIdentifier"}, + "max":10, + "min":1 + }, + "StartLiveTailRequest":{ + "type":"structure", + "required":["logGroupIdentifiers"], + "members":{ + "logGroupIdentifiers":{ + "shape":"StartLiveTailLogGroupIdentifiers", + "documentation":"

To Be Written

" + }, + "logStreamNames":{ + "shape":"InputLogStreamNames", + "documentation":"

To Be Written

" + }, + "logStreamNamePrefixes":{ + "shape":"InputLogStreamNames", + "documentation":"

To Be Written

" + }, + "logEventFilterPattern":{"shape":"FilterPattern"} + } + }, + "StartLiveTailResponse":{ + "type":"structure", + "members":{ + "responseStream":{ + "shape":"StartLiveTailResponseStream", + "documentation":"

To Be Written

" + } + } + }, + "StartLiveTailResponseStream":{ + "type":"structure", + "members":{ + "sessionStart":{ + "shape":"LiveTailSessionStart", + "documentation":"

To Be Written

" + }, + "sessionUpdate":{ + "shape":"LiveTailSessionUpdate", + "documentation":"

To Be Written

" + }, + "SessionTimeoutException":{ + "shape":"SessionTimeoutException", + "documentation":"

To Be Written

" + }, + "SessionStreamingException":{ + "shape":"SessionStreamingException", + "documentation":"

To Be Written

" + } + }, + "documentation":"

To Be Written

", + "eventstream":true + }, "StartQueryRequest":{ "type":"structure", "required":[ @@ -2641,19 +3152,43 @@ "queryString" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "logGroupNames":{"shape":"LogGroupNames"}, - "logGroupIdentifiers":{"shape":"LogGroupIdentifiers"}, - "startTime":{"shape":"Timestamp"}, - "endTime":{"shape":"Timestamp"}, - "queryString":{"shape":"QueryString"}, - "limit":{"shape":"EventsLimit"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The log group on which to perform the query.

A StartQuery operation must include exactly one of the following parameters: logGroupName, logGroupNames, or logGroupIdentifiers.

" + }, + "logGroupNames":{ + "shape":"LogGroupNames", + "documentation":"

The list of log groups to be queried. You can include up to 50 log groups.

A StartQuery operation must include exactly one of the following parameters: logGroupName, logGroupNames, or logGroupIdentifiers.

" + }, + "logGroupIdentifiers":{ + "shape":"LogGroupIdentifiers", + "documentation":"

The list of log groups to query. You can include up to 50 log groups.

You can specify them by the log group name or ARN. If a log group that you're querying is in a source account and you're using a monitoring account, you must specify the ARN of the log group here. The query definition must also be defined in the monitoring account.

If you specify an ARN, the ARN can't end with an asterisk (*).

A StartQuery operation must include exactly one of the following parameters: logGroupName, logGroupNames, or logGroupIdentifiers.

" + }, + "startTime":{ + "shape":"Timestamp", + "documentation":"

The beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

" + }, + "endTime":{ + "shape":"Timestamp", + "documentation":"

The end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

" + }, + "queryString":{ + "shape":"QueryString", + "documentation":"

The query string to use. For more information, see CloudWatch Logs Insights Query Syntax.

" + }, + "limit":{ + "shape":"EventsLimit", + "documentation":"

The maximum number of log events to return in the query. If the query string uses the fields command, only the specified fields and their values are returned. The default is 1000.

" + } } }, "StartQueryResponse":{ "type":"structure", "members":{ - "queryId":{"shape":"QueryId"} + "queryId":{ + "shape":"QueryId", + "documentation":"

The unique ID of the query.

" + } } }, "StatsValue":{"type":"double"}, @@ -2661,13 +3196,19 @@ "type":"structure", "required":["queryId"], "members":{ - "queryId":{"shape":"QueryId"} + "queryId":{ + "shape":"QueryId", + "documentation":"

The ID number of the query to stop. To find this ID number, use DescribeQueries.

" + } } }, "StopQueryResponse":{ "type":"structure", "members":{ - "success":{"shape":"Success"} + "success":{ + "shape":"Success", + "documentation":"

This is true if the query was stopped by the StopQuery operation.

" + } } }, "StoredBytes":{ @@ -2677,14 +3218,30 @@ "SubscriptionFilter":{ "type":"structure", "members":{ - "filterName":{"shape":"FilterName"}, - "logGroupName":{"shape":"LogGroupName"}, + "filterName":{ + "shape":"FilterName", + "documentation":"

The name of the subscription filter.

" + }, + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, "filterPattern":{"shape":"FilterPattern"}, - "destinationArn":{"shape":"DestinationArn"}, - "roleArn":{"shape":"RoleArn"}, + "destinationArn":{ + "shape":"DestinationArn", + "documentation":"

The Amazon Resource Name (ARN) of the destination.

" + }, + "roleArn":{ + "shape":"RoleArn", + "documentation":"

" + }, "distribution":{"shape":"Distribution"}, - "creationTime":{"shape":"Timestamp"} - } + "creationTime":{ + "shape":"Timestamp", + "documentation":"

The creation time of the subscription filter, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" + } + }, + "documentation":"

Represents a subscription filter.

" }, "SubscriptionFilters":{ "type":"list", @@ -2715,8 +3272,14 @@ "tags" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "tags":{"shape":"Tags"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "tags":{ + "shape":"Tags", + "documentation":"

The key-value pairs to use for the tags.

" + } }, "deprecated":true, "deprecatedMessage":"Please use the generic tagging API model TagResourceRequest" @@ -2728,8 +3291,14 @@ "tags" ], "members":{ - "resourceArn":{"shape":"AmazonResourceName"}, - "tags":{"shape":"Tags"} + "resourceArn":{ + "shape":"AmazonResourceName", + "documentation":"

The ARN of the resource that you're adding tags to.

The ARN format of a log group is arn:aws:logs:Region:account-id:log-group:log-group-name

The ARN format of a destination is arn:aws:logs:Region:account-id:destination:destination-name

For more information about ARN format, see CloudWatch Logs resources and operations.

" + }, + "tags":{ + "shape":"Tags", + "documentation":"

The list of key-value pairs to associate with the resource.

" + } } }, "TagValue":{ @@ -2762,21 +3331,21 @@ ], "members":{ "filterPattern":{"shape":"FilterPattern"}, - "logEventMessages":{"shape":"TestEventMessages"} + "logEventMessages":{ + "shape":"TestEventMessages", + "documentation":"

The log event messages to test.

" + } } }, "TestMetricFilterResponse":{ "type":"structure", "members":{ - "matches":{"shape":"MetricFilterMatches"} + "matches":{ + "shape":"MetricFilterMatches", + "documentation":"

The matched events.

" + } } }, - "ThrottlingException":{ - "type":"structure", - "members":{ - }, - "exception":true - }, "Timestamp":{ "type":"long", "min":0 @@ -2786,8 +3355,12 @@ "type":"structure", "members":{ "message":{"shape":"Message"}, - "resourceName":{"shape":"AmazonResourceName"} + "resourceName":{ + "shape":"AmazonResourceName", + "documentation":"

The name of the resource.

" + } }, + "documentation":"

A resource can have no more than 50 tags.

", "exception":true }, "Unmask":{"type":"boolean"}, @@ -2795,6 +3368,7 @@ "type":"structure", "members":{ }, + "documentation":"

The most likely cause is an Amazon Web Services access key ID or secret key that's not valid.

", "exception":true }, "UntagLogGroupRequest":{ @@ -2804,8 +3378,14 @@ "tags" ], "members":{ - "logGroupName":{"shape":"LogGroupName"}, - "tags":{"shape":"TagList"} + "logGroupName":{ + "shape":"LogGroupName", + "documentation":"

The name of the log group.

" + }, + "tags":{ + "shape":"TagList", + "documentation":"

The tag keys. The corresponding tags are removed from the log group.

" + } }, "deprecated":true, "deprecatedMessage":"Please use the generic tagging API model UntagResourceRequest" @@ -2817,16 +3397,17 @@ "tagKeys" ], "members":{ - "resourceArn":{"shape":"AmazonResourceName"}, - "tagKeys":{"shape":"TagKeyList"} + "resourceArn":{ + "shape":"AmazonResourceName", + "documentation":"

The ARN of the CloudWatch Logs resource that you're removing tags from.

The ARN format of a log group is arn:aws:logs:Region:account-id:log-group:log-group-name

The ARN format of a destination is arn:aws:logs:Region:account-id:destination:destination-name

For more information about ARN format, see CloudWatch Logs resources and operations.

" + }, + "tagKeys":{ + "shape":"TagKeyList", + "documentation":"

The list of tag keys to remove from the resource.

" + } } }, - "ValidationException":{ - "type":"structure", - "members":{ - }, - "exception":true - }, "Value":{"type":"string"} - } + }, + "documentation":"

You can use Amazon CloudWatch Logs to monitor, store, and access your log files from EC2 instances, CloudTrail, and other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch console. Alternatively, you can use CloudWatch Logs commands in the Amazon Web Services CLI, CloudWatch Logs API, or CloudWatch Logs SDK.

You can use CloudWatch Logs to:

" } diff --git a/models/apis/macie/2017-12-19/api-2.json b/models/apis/macie/2017-12-19/api-2.json deleted file mode 100644 index b5ea29b2cc2..00000000000 --- a/models/apis/macie/2017-12-19/api-2.json +++ /dev/null @@ -1,365 +0,0 @@ -{ - "version":"2.0", - "metadata":{ - "apiVersion":"2017-12-19", - "endpointPrefix":"macie", - "jsonVersion":"1.1", - "protocol":"json", - "serviceFullName":"Amazon Macie", - "serviceId":"Macie", - "signatureVersion":"v4", - "targetPrefix":"MacieService", - "uid":"macie-2017-12-19" - }, - "operations":{ - "AssociateMemberAccount":{ - "name":"AssociateMemberAccount", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"AssociateMemberAccountRequest"}, - "errors":[ - {"shape":"InvalidInputException"}, - {"shape":"LimitExceededException"}, - {"shape":"InternalException"} - ] - }, - "AssociateS3Resources":{ - "name":"AssociateS3Resources", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"AssociateS3ResourcesRequest"}, - "output":{"shape":"AssociateS3ResourcesResult"}, - "errors":[ - {"shape":"InvalidInputException"}, - {"shape":"AccessDeniedException"}, - {"shape":"LimitExceededException"}, - {"shape":"InternalException"} - ] - }, - "DisassociateMemberAccount":{ - "name":"DisassociateMemberAccount", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DisassociateMemberAccountRequest"}, - "errors":[ - {"shape":"InvalidInputException"}, - {"shape":"InternalException"} - ] - }, - "DisassociateS3Resources":{ - "name":"DisassociateS3Resources", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DisassociateS3ResourcesRequest"}, - "output":{"shape":"DisassociateS3ResourcesResult"}, - "errors":[ - {"shape":"InvalidInputException"}, - {"shape":"AccessDeniedException"}, - {"shape":"InternalException"} - ] - }, - "ListMemberAccounts":{ - "name":"ListMemberAccounts", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListMemberAccountsRequest"}, - "output":{"shape":"ListMemberAccountsResult"}, - "errors":[ - {"shape":"InternalException"}, - {"shape":"InvalidInputException"} - ] - }, - "ListS3Resources":{ - "name":"ListS3Resources", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListS3ResourcesRequest"}, - "output":{"shape":"ListS3ResourcesResult"}, - "errors":[ - {"shape":"InvalidInputException"}, - {"shape":"AccessDeniedException"}, - {"shape":"InternalException"} - ] - }, - "UpdateS3Resources":{ - "name":"UpdateS3Resources", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"UpdateS3ResourcesRequest"}, - "output":{"shape":"UpdateS3ResourcesResult"}, - "errors":[ - {"shape":"InvalidInputException"}, - {"shape":"AccessDeniedException"}, - {"shape":"InternalException"} - ] - } - }, - "shapes":{ - "AWSAccountId":{ - "type":"string", - "pattern":"[0-9]{12}" - }, - "AccessDeniedException":{ - "type":"structure", - "members":{ - "message":{"shape":"ExceptionMessage"}, - "resourceType":{"shape":"ResourceType"} - }, - "exception":true - }, - "AssociateMemberAccountRequest":{ - "type":"structure", - "required":["memberAccountId"], - "members":{ - "memberAccountId":{"shape":"AWSAccountId"} - } - }, - "AssociateS3ResourcesRequest":{ - "type":"structure", - "required":["s3Resources"], - "members":{ - "memberAccountId":{"shape":"AWSAccountId"}, - "s3Resources":{"shape":"S3ResourcesClassification"} - } - }, - "AssociateS3ResourcesResult":{ - "type":"structure", - "members":{ - "failedS3Resources":{"shape":"FailedS3Resources"} - } - }, - "BucketName":{ - "type":"string", - "max":500 - }, - "ClassificationType":{ - "type":"structure", - "required":[ - "oneTime", - "continuous" - ], - "members":{ - "oneTime":{"shape":"S3OneTimeClassificationType"}, - "continuous":{"shape":"S3ContinuousClassificationType"} - } - }, - "ClassificationTypeUpdate":{ - "type":"structure", - "members":{ - "oneTime":{"shape":"S3OneTimeClassificationType"}, - "continuous":{"shape":"S3ContinuousClassificationType"} - } - }, - "DisassociateMemberAccountRequest":{ - "type":"structure", - "required":["memberAccountId"], - "members":{ - "memberAccountId":{"shape":"AWSAccountId"} - } - }, - "DisassociateS3ResourcesRequest":{ - "type":"structure", - "required":["associatedS3Resources"], - "members":{ - "memberAccountId":{"shape":"AWSAccountId"}, - "associatedS3Resources":{"shape":"S3Resources"} - } - }, - "DisassociateS3ResourcesResult":{ - "type":"structure", - "members":{ - "failedS3Resources":{"shape":"FailedS3Resources"} - } - }, - "ErrorCode":{ - "type":"string", - "max":10 - }, - "ExceptionMessage":{ - "type":"string", - "max":10000 - }, - "FailedS3Resource":{ - "type":"structure", - "members":{ - "failedItem":{"shape":"S3Resource"}, - "errorCode":{"shape":"ErrorCode"}, - "errorMessage":{"shape":"ExceptionMessage"} - } - }, - "FailedS3Resources":{ - "type":"list", - "member":{"shape":"FailedS3Resource"} - }, - "FieldName":{ - "type":"string", - "max":1000 - }, - "InternalException":{ - "type":"structure", - "members":{ - "errorCode":{"shape":"ErrorCode"}, - "message":{"shape":"ExceptionMessage"} - }, - "exception":true, - "fault":true - }, - "InvalidInputException":{ - "type":"structure", - "members":{ - "errorCode":{"shape":"ErrorCode"}, - "message":{"shape":"ExceptionMessage"}, - "fieldName":{"shape":"FieldName"} - }, - "exception":true - }, - "LimitExceededException":{ - "type":"structure", - "members":{ - "errorCode":{"shape":"ErrorCode"}, - "message":{"shape":"ExceptionMessage"}, - "resourceType":{"shape":"ResourceType"} - }, - "exception":true - }, - "ListMemberAccountsRequest":{ - "type":"structure", - "members":{ - "nextToken":{"shape":"NextToken"}, - "maxResults":{"shape":"MaxResults"} - } - }, - "ListMemberAccountsResult":{ - "type":"structure", - "members":{ - "memberAccounts":{"shape":"MemberAccounts"}, - "nextToken":{"shape":"NextToken"} - } - }, - "ListS3ResourcesRequest":{ - "type":"structure", - "members":{ - "memberAccountId":{"shape":"AWSAccountId"}, - "nextToken":{"shape":"NextToken"}, - "maxResults":{"shape":"MaxResults"} - } - }, - "ListS3ResourcesResult":{ - "type":"structure", - "members":{ - "s3Resources":{"shape":"S3ResourcesClassification"}, - "nextToken":{"shape":"NextToken"} - } - }, - "MaxResults":{ - "type":"integer", - "box":true, - "max":250 - }, - "MemberAccount":{ - "type":"structure", - "members":{ - "accountId":{"shape":"AWSAccountId"} - } - }, - "MemberAccounts":{ - "type":"list", - "member":{"shape":"MemberAccount"} - }, - "NextToken":{ - "type":"string", - "max":500 - }, - "Prefix":{ - "type":"string", - "max":10000 - }, - "ResourceType":{ - "type":"string", - "max":1000 - }, - "S3ContinuousClassificationType":{ - "type":"string", - "enum":["FULL"] - }, - "S3OneTimeClassificationType":{ - "type":"string", - "enum":[ - "FULL", - "NONE" - ] - }, - "S3Resource":{ - "type":"structure", - "required":["bucketName"], - "members":{ - "bucketName":{"shape":"BucketName"}, - "prefix":{"shape":"Prefix"} - } - }, - "S3ResourceClassification":{ - "type":"structure", - "required":[ - "bucketName", - "classificationType" - ], - "members":{ - "bucketName":{"shape":"BucketName"}, - "prefix":{"shape":"Prefix"}, - "classificationType":{"shape":"ClassificationType"} - } - }, - "S3ResourceClassificationUpdate":{ - "type":"structure", - "required":[ - "bucketName", - "classificationTypeUpdate" - ], - "members":{ - "bucketName":{"shape":"BucketName"}, - "prefix":{"shape":"Prefix"}, - "classificationTypeUpdate":{"shape":"ClassificationTypeUpdate"} - } - }, - "S3Resources":{ - "type":"list", - "member":{"shape":"S3Resource"} - }, - "S3ResourcesClassification":{ - "type":"list", - "member":{"shape":"S3ResourceClassification"} - }, - "S3ResourcesClassificationUpdate":{ - "type":"list", - "member":{"shape":"S3ResourceClassificationUpdate"} - }, - "UpdateS3ResourcesRequest":{ - "type":"structure", - "required":["s3ResourcesUpdate"], - "members":{ - "memberAccountId":{"shape":"AWSAccountId"}, - "s3ResourcesUpdate":{"shape":"S3ResourcesClassificationUpdate"} - } - }, - "UpdateS3ResourcesResult":{ - "type":"structure", - "members":{ - "failedS3Resources":{"shape":"FailedS3Resources"} - } - } - } -} diff --git a/models/apis/macie/2017-12-19/docs-2.json b/models/apis/macie/2017-12-19/docs-2.json deleted file mode 100644 index 8d78d3f52c0..00000000000 --- a/models/apis/macie/2017-12-19/docs-2.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "version": "2.0", - "service": "Amazon Macie Classic

Amazon Macie Classic has been discontinued and is no longer available.

A new Amazon Macie is now available with significant design improvements and additional features, at a lower price and in most Amazon Web Services Regions. We encourage you to take advantage of the new and improved features, and benefit from the reduced cost. To learn about features and pricing for the new Macie, see Amazon Macie. To learn how to use the new Macie, see the Amazon Macie User Guide.

", - "operations": { - "AssociateMemberAccount": "

(Discontinued) Associates a specified Amazon Web Services account with Amazon Macie Classic as a member account.

", - "AssociateS3Resources": "

(Discontinued) Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification. If memberAccountId isn't specified, the action associates specified S3 resources with Macie Classic for the current Macie Classic administrator account. If memberAccountId is specified, the action associates specified S3 resources with Macie Classic for the specified member account.

", - "DisassociateMemberAccount": "

(Discontinued) Removes the specified member account from Amazon Macie Classic.

", - "DisassociateS3Resources": "

(Discontinued) Removes specified S3 resources from being monitored by Amazon Macie Classic. If memberAccountId isn't specified, the action removes specified S3 resources from Macie Classic for the current Macie Classic administrator account. If memberAccountId is specified, the action removes specified S3 resources from Macie Classic for the specified member account.

", - "ListMemberAccounts": "

(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.

", - "ListS3Resources": "

(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic. If memberAccountId isn't specified, the action lists the S3 resources associated with Macie Classic for the current Macie Classic administrator account. If memberAccountId is specified, the action lists the S3 resources associated with Macie Classic for the specified member account.

", - "UpdateS3Resources": "

(Discontinued) Updates the classification types for the specified S3 resources. If memberAccountId isn't specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the current Macie Classic administrator account. If memberAccountId is specified, the action updates the classification types of the S3 resources associated with Macie Classic for the specified member account.

" - }, - "shapes": { - "AWSAccountId": { - "base": null, - "refs": { - "AssociateMemberAccountRequest$memberAccountId": "

(Discontinued) The ID of the Amazon Web Services account that you want to associate with Amazon Macie Classic as a member account.

", - "AssociateS3ResourcesRequest$memberAccountId": "

(Discontinued) The ID of the Amazon Macie Classic member account whose resources you want to associate with Macie Classic.

", - "DisassociateMemberAccountRequest$memberAccountId": "

(Discontinued) The ID of the member account that you want to remove from Amazon Macie Classic.

", - "DisassociateS3ResourcesRequest$memberAccountId": "

(Discontinued) The ID of the Amazon Macie Classic member account whose resources you want to remove from being monitored by Macie Classic.

", - "ListS3ResourcesRequest$memberAccountId": "

(Discontinued) The Amazon Macie Classic member account ID whose associated S3 resources you want to list.

", - "MemberAccount$accountId": "

(Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic member account.

", - "UpdateS3ResourcesRequest$memberAccountId": "

(Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic member account whose S3 resources' classification types you want to update.

" - } - }, - "AccessDeniedException": { - "base": "

(Discontinued) You do not have required permissions to access the requested resource.

", - "refs": { - } - }, - "AssociateMemberAccountRequest": { - "base": null, - "refs": { - } - }, - "AssociateS3ResourcesRequest": { - "base": null, - "refs": { - } - }, - "AssociateS3ResourcesResult": { - "base": null, - "refs": { - } - }, - "BucketName": { - "base": null, - "refs": { - "S3Resource$bucketName": "

(Discontinued) The name of the S3 bucket.

", - "S3ResourceClassification$bucketName": "

(Discontinued) The name of the S3 bucket that you want to associate with Amazon Macie Classic.

", - "S3ResourceClassificationUpdate$bucketName": "

(Discontinued) The name of the S3 bucket whose classification types you want to update.

" - } - }, - "ClassificationType": { - "base": "

(Discontinued) The classification type that Amazon Macie Classic applies to the associated S3 resources.

", - "refs": { - "S3ResourceClassification$classificationType": "

(Discontinued) The classification type that you want to specify for the resource associated with Amazon Macie Classic.

" - } - }, - "ClassificationTypeUpdate": { - "base": "

(Discontinued) The classification type that Amazon Macie Classic applies to the associated S3 resources. At least one of the classification types (oneTime or continuous) must be specified.

", - "refs": { - "S3ResourceClassificationUpdate$classificationTypeUpdate": "

(Discontinued) The classification type that you want to update for the resource associated with Amazon Macie Classic.

" - } - }, - "DisassociateMemberAccountRequest": { - "base": null, - "refs": { - } - }, - "DisassociateS3ResourcesRequest": { - "base": null, - "refs": { - } - }, - "DisassociateS3ResourcesResult": { - "base": null, - "refs": { - } - }, - "ErrorCode": { - "base": "Error code for the exception", - "refs": { - "FailedS3Resource$errorCode": "

(Discontinued) The status code of a failed item.

", - "InternalException$errorCode": null, - "InvalidInputException$errorCode": null, - "LimitExceededException$errorCode": null - } - }, - "ExceptionMessage": { - "base": null, - "refs": { - "AccessDeniedException$message": null, - "FailedS3Resource$errorMessage": "

(Discontinued) The error message of a failed item.

", - "InternalException$message": null, - "InvalidInputException$message": null, - "LimitExceededException$message": null - } - }, - "FailedS3Resource": { - "base": "

(Discontinued) Includes details about the failed S3 resources.

", - "refs": { - "FailedS3Resources$member": null - } - }, - "FailedS3Resources": { - "base": null, - "refs": { - "AssociateS3ResourcesResult$failedS3Resources": "

(Discontinued) S3 resources that couldn't be associated with Amazon Macie Classic. An error code and an error message are provided for each failed item.

", - "DisassociateS3ResourcesResult$failedS3Resources": "

(Discontinued) S3 resources that couldn't be removed from being monitored and classified by Amazon Macie Classic. An error code and an error message are provided for each failed item.

", - "UpdateS3ResourcesResult$failedS3Resources": "

(Discontinued) The S3 resources whose classification types can't be updated. An error code and an error message are provided for each failed item.

" - } - }, - "FieldName": { - "base": "Field that has invalid input", - "refs": { - "InvalidInputException$fieldName": null - } - }, - "InternalException": { - "base": "

(Discontinued) Internal server error.

", - "refs": { - } - }, - "InvalidInputException": { - "base": "

(Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.

", - "refs": { - } - }, - "LimitExceededException": { - "base": "

(Discontinued) The request was rejected because it attempted to create resources beyond the current Amazon Web Services account quotas. The error code describes the quota exceeded.

", - "refs": { - } - }, - "ListMemberAccountsRequest": { - "base": null, - "refs": { - } - }, - "ListMemberAccountsResult": { - "base": null, - "refs": { - } - }, - "ListS3ResourcesRequest": { - "base": null, - "refs": { - } - }, - "ListS3ResourcesResult": { - "base": null, - "refs": { - } - }, - "MaxResults": { - "base": null, - "refs": { - "ListMemberAccountsRequest$maxResults": "

(Discontinued) Use this parameter to indicate the maximum number of items that you want in the response. The default value is 250.

", - "ListS3ResourcesRequest$maxResults": "

(Discontinued) Use this parameter to indicate the maximum number of items that you want in the response. The default value is 250.

" - } - }, - "MemberAccount": { - "base": "

(Discontinued) Contains information about the Amazon Macie Classic member account.

", - "refs": { - "MemberAccounts$member": null - } - }, - "MemberAccounts": { - "base": null, - "refs": { - "ListMemberAccountsResult$memberAccounts": "

(Discontinued) A list of the Amazon Macie Classic member accounts returned by the action. The current Macie Classic administrator account is also included in this list.

" - } - }, - "NextToken": { - "base": null, - "refs": { - "ListMemberAccountsRequest$nextToken": "

(Discontinued) Use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListMemberAccounts action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.

", - "ListMemberAccountsResult$nextToken": "

(Discontinued) When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.

", - "ListS3ResourcesRequest$nextToken": "

(Discontinued) Use this parameter when paginating results. Set its value to null on your first call to the ListS3Resources action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.

", - "ListS3ResourcesResult$nextToken": "

(Discontinued) When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.

" - } - }, - "Prefix": { - "base": null, - "refs": { - "S3Resource$prefix": "

(Discontinued) The prefix of the S3 bucket.

", - "S3ResourceClassification$prefix": "

(Discontinued) The prefix of the S3 bucket that you want to associate with Amazon Macie Classic.

", - "S3ResourceClassificationUpdate$prefix": "

(Discontinued) The prefix of the S3 bucket whose classification types you want to update.

" - } - }, - "ResourceType": { - "base": "Resource type that caused the exception", - "refs": { - "AccessDeniedException$resourceType": null, - "LimitExceededException$resourceType": null - } - }, - "S3ContinuousClassificationType": { - "base": null, - "refs": { - "ClassificationType$continuous": "

(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.

", - "ClassificationTypeUpdate$continuous": "

(Discontinued) A continuous classification of the objects that are added to a specified S3 bucket. Amazon Macie Classic begins performing continuous classification after a bucket is successfully associated with Macie Classic.

" - } - }, - "S3OneTimeClassificationType": { - "base": null, - "refs": { - "ClassificationType$oneTime": "

(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket.

", - "ClassificationTypeUpdate$oneTime": "

(Discontinued) A one-time classification of all of the existing objects in a specified S3 bucket.

" - } - }, - "S3Resource": { - "base": "

(Discontinued) Contains information about the S3 resource. This data type is used as a request parameter in the DisassociateS3Resources action and can be used as a response parameter in the AssociateS3Resources and UpdateS3Resources actions.

", - "refs": { - "FailedS3Resource$failedItem": "

(Discontinued) The failed S3 resources.

", - "S3Resources$member": null - } - }, - "S3ResourceClassification": { - "base": "

(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification. This data type is used as a request parameter in the AssociateS3Resources action and a response parameter in the ListS3Resources action.

", - "refs": { - "S3ResourcesClassification$member": null - } - }, - "S3ResourceClassificationUpdate": { - "base": "

(Discontinued) The S3 resources whose classification types you want to update. This data type is used as a request parameter in the UpdateS3Resources action.

", - "refs": { - "S3ResourcesClassificationUpdate$member": null - } - }, - "S3Resources": { - "base": null, - "refs": { - "DisassociateS3ResourcesRequest$associatedS3Resources": "

(Discontinued) The S3 resources (buckets or prefixes) that you want to remove from being monitored and classified by Amazon Macie Classic.

" - } - }, - "S3ResourcesClassification": { - "base": null, - "refs": { - "AssociateS3ResourcesRequest$s3Resources": "

(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification.

", - "ListS3ResourcesResult$s3Resources": "

(Discontinued) A list of the associated S3 resources returned by the action.

" - } - }, - "S3ResourcesClassificationUpdate": { - "base": null, - "refs": { - "UpdateS3ResourcesRequest$s3ResourcesUpdate": "

(Discontinued) The S3 resources whose classification types you want to update.

" - } - }, - "UpdateS3ResourcesRequest": { - "base": null, - "refs": { - } - }, - "UpdateS3ResourcesResult": { - "base": null, - "refs": { - } - } - } -} diff --git a/models/apis/macie/2017-12-19/examples-1.json b/models/apis/macie/2017-12-19/examples-1.json deleted file mode 100644 index 0ea7e3b0bbe..00000000000 --- a/models/apis/macie/2017-12-19/examples-1.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": "1.0", - "examples": { - } -} diff --git a/models/apis/macie/2017-12-19/paginators-1.json b/models/apis/macie/2017-12-19/paginators-1.json deleted file mode 100644 index ec567c5ae40..00000000000 --- a/models/apis/macie/2017-12-19/paginators-1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pagination": { - "ListMemberAccounts": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults" - }, - "ListS3Resources": { - "input_token": "nextToken", - "output_token": "nextToken", - "limit_key": "maxResults" - } - } -} diff --git a/service/cloudwatchlogs/api.go b/service/cloudwatchlogs/api.go index 3016b7fd3b7..aec7a26108b 100644 --- a/service/cloudwatchlogs/api.go +++ b/service/cloudwatchlogs/api.go @@ -3,13 +3,22 @@ package cloudwatchlogs import ( + "bytes" "fmt" + "io" + "sync" + "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi" "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" + "github.com/aws/aws-sdk-go/private/protocol/rest" ) const opAssociateKmsKey = "AssociateKmsKey" @@ -235,138 +244,6 @@ func (c *CloudWatchLogs) CancelExportTaskWithContext(ctx aws.Context, input *Can return out, req.Send() } -const opCreateDelivery = "CreateDelivery" - -// CreateDeliveryRequest generates a "aws/request.Request" representing the -// client's request for the CreateDelivery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateDelivery for more information on using the CreateDelivery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateDeliveryRequest method. -// req, resp := client.CreateDeliveryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateDelivery -func (c *CloudWatchLogs) CreateDeliveryRequest(input *CreateDeliveryInput) (req *request.Request, output *CreateDeliveryOutput) { - op := &request.Operation{ - Name: opCreateDelivery, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateDeliveryInput{} - } - - output = &CreateDeliveryOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDelivery API operation for Amazon CloudWatch Logs. -// -// Creates a delivery. A delivery is a connection between a logical delivery -// source and a logical delivery destination that you have already created. -// -// Only some Amazon Web Services services support being configured as a delivery -// source using this operation. These services are listed as Supported [V2 Permissions] -// in the table at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ -// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) -// -// A delivery destination can represent a log group in CloudWatch Logs, an Amazon -// S3 bucket, or a delivery stream in Kinesis Data Firehose. -// -// To configure logs delivery between a supported Amazon Web Services service -// and a destination, you must do the following: -// -// - Create a delivery source, which is a logical object that represents -// the resource that is actually sending the logs. For more information, -// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). -// -// - Create a delivery destination, which is a logical object that represents -// the actual delivery destination. For more information, see PutDeliveryDestination -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). -// -// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) -// in the destination account to assign an IAM policy to the destination. -// This policy allows delivery to that destination. -// -// - Use CreateDelivery to create a delivery by pairing exactly one delivery -// source and one delivery destination. -// -// You can configure a single delivery source to send logs to multiple destinations -// by creating multiple deliveries. You can also create multiple deliveries -// to configure multiple delivery sources to send logs to the same delivery -// destination. -// -// You can't update an existing delivery. You can only create and delete deliveries. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation CreateDelivery for usage and error information. -// -// Returned Error Types: -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - ConflictException -// This operation attempted to create a resource that already exists. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - ValidationException -// One of the parameters for the request is not valid. -// -// - AccessDeniedException -// You don't have sufficient permissions to perform this action. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. -// -// - ThrottlingException -// The request was throttled because of quota limits. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateDelivery -func (c *CloudWatchLogs) CreateDelivery(input *CreateDeliveryInput) (*CreateDeliveryOutput, error) { - req, out := c.CreateDeliveryRequest(input) - return out, req.Send() -} - -// CreateDeliveryWithContext is the same as CreateDelivery with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDelivery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) CreateDeliveryWithContext(ctx aws.Context, input *CreateDeliveryInput, opts ...request.Option) (*CreateDeliveryOutput, error) { - req, out := c.CreateDeliveryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - const opCreateExportTask = "CreateExportTask" // CreateExportTaskRequest generates a "aws/request.Request" representing the @@ -892,450 +769,423 @@ func (c *CloudWatchLogs) DeleteDataProtectionPolicyWithContext(ctx aws.Context, return out, req.Send() } -const opDeleteDelivery = "DeleteDelivery" +const opDeleteDestination = "DeleteDestination" -// DeleteDeliveryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDelivery operation. The "output" return +// DeleteDestinationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteDelivery for more information on using the DeleteDelivery +// See DeleteDestination for more information on using the DeleteDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteDeliveryRequest method. -// req, resp := client.DeleteDeliveryRequest(params) +// // Example sending a request using the DeleteDestinationRequest method. +// req, resp := client.DeleteDestinationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDelivery -func (c *CloudWatchLogs) DeleteDeliveryRequest(input *DeleteDeliveryInput) (req *request.Request, output *DeleteDeliveryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination +func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) { op := &request.Operation{ - Name: opDeleteDelivery, + Name: opDeleteDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDeliveryInput{} + input = &DeleteDestinationInput{} } - output = &DeleteDeliveryOutput{} + output = &DeleteDestinationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteDelivery API operation for Amazon CloudWatch Logs. +// DeleteDestination API operation for Amazon CloudWatch Logs. // -// Deletes s delivery. A delivery is a connection between a logical delivery -// source and a logical delivery destination. Deleting a delivery only deletes -// the connection between the delivery source and delivery destination. It does -// not delete the delivery destination or the delivery source. +// Deletes the specified destination, and eventually disables all the subscription +// filters that publish to it. This operation does not delete the physical resource +// encapsulated by the destination. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteDelivery for usage and error information. +// API operation DeleteDestination for usage and error information. // // Returned Error Types: // +// - InvalidParameterException +// A parameter is specified incorrectly. +// // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// - ConflictException -// This operation attempted to create a resource that already exists. -// -// - ValidationException -// One of the parameters for the request is not valid. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. -// -// - ThrottlingException -// The request was throttled because of quota limits. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDelivery -func (c *CloudWatchLogs) DeleteDelivery(input *DeleteDeliveryInput) (*DeleteDeliveryOutput, error) { - req, out := c.DeleteDeliveryRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination +func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) { + req, out := c.DeleteDestinationRequest(input) return out, req.Send() } -// DeleteDeliveryWithContext is the same as DeleteDelivery with the addition of +// DeleteDestinationWithContext is the same as DeleteDestination with the addition of // the ability to pass a context and additional request options. // -// See DeleteDelivery for details on how to use this API operation. +// See DeleteDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteDeliveryWithContext(ctx aws.Context, input *DeleteDeliveryInput, opts ...request.Option) (*DeleteDeliveryOutput, error) { - req, out := c.DeleteDeliveryRequest(input) +func (c *CloudWatchLogs) DeleteDestinationWithContext(ctx aws.Context, input *DeleteDestinationInput, opts ...request.Option) (*DeleteDestinationOutput, error) { + req, out := c.DeleteDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteDeliveryDestination = "DeleteDeliveryDestination" +const opDeleteLogGroup = "DeleteLogGroup" -// DeleteDeliveryDestinationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDeliveryDestination operation. The "output" return +// DeleteLogGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLogGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteDeliveryDestination for more information on using the DeleteDeliveryDestination +// See DeleteLogGroup for more information on using the DeleteLogGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteDeliveryDestinationRequest method. -// req, resp := client.DeleteDeliveryDestinationRequest(params) +// // Example sending a request using the DeleteLogGroupRequest method. +// req, resp := client.DeleteLogGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestination -func (c *CloudWatchLogs) DeleteDeliveryDestinationRequest(input *DeleteDeliveryDestinationInput) (req *request.Request, output *DeleteDeliveryDestinationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup +func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) { op := &request.Operation{ - Name: opDeleteDeliveryDestination, + Name: opDeleteLogGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDeliveryDestinationInput{} + input = &DeleteLogGroupInput{} } - output = &DeleteDeliveryDestinationOutput{} + output = &DeleteLogGroupOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteDeliveryDestination API operation for Amazon CloudWatch Logs. -// -// Deletes a delivery destination. A delivery is a connection between a logical -// delivery source and a logical delivery destination. +// DeleteLogGroup API operation for Amazon CloudWatch Logs. // -// You can't delete a delivery destination if any current deliveries are associated -// with it. To find whether any deliveries are associated with this delivery -// destination, use the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) -// operation and check the deliveryDestinationArn field in the results. +// Deletes the specified log group and permanently deletes all the archived +// log events associated with the log group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteDeliveryDestination for usage and error information. +// API operation DeleteLogGroup for usage and error information. // // Returned Error Types: // +// - InvalidParameterException +// A parameter is specified incorrectly. +// // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// - ConflictException -// This operation attempted to create a resource that already exists. -// -// - ValidationException -// One of the parameters for the request is not valid. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. -// -// - ThrottlingException -// The request was throttled because of quota limits. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestination -func (c *CloudWatchLogs) DeleteDeliveryDestination(input *DeleteDeliveryDestinationInput) (*DeleteDeliveryDestinationOutput, error) { - req, out := c.DeleteDeliveryDestinationRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup +func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) { + req, out := c.DeleteLogGroupRequest(input) return out, req.Send() } -// DeleteDeliveryDestinationWithContext is the same as DeleteDeliveryDestination with the addition of +// DeleteLogGroupWithContext is the same as DeleteLogGroup with the addition of // the ability to pass a context and additional request options. // -// See DeleteDeliveryDestination for details on how to use this API operation. +// See DeleteLogGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteDeliveryDestinationWithContext(ctx aws.Context, input *DeleteDeliveryDestinationInput, opts ...request.Option) (*DeleteDeliveryDestinationOutput, error) { - req, out := c.DeleteDeliveryDestinationRequest(input) +func (c *CloudWatchLogs) DeleteLogGroupWithContext(ctx aws.Context, input *DeleteLogGroupInput, opts ...request.Option) (*DeleteLogGroupOutput, error) { + req, out := c.DeleteLogGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteDeliveryDestinationPolicy = "DeleteDeliveryDestinationPolicy" +const opDeleteLogStream = "DeleteLogStream" -// DeleteDeliveryDestinationPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDeliveryDestinationPolicy operation. The "output" return +// DeleteLogStreamRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLogStream operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteDeliveryDestinationPolicy for more information on using the DeleteDeliveryDestinationPolicy +// See DeleteLogStream for more information on using the DeleteLogStream // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteDeliveryDestinationPolicyRequest method. -// req, resp := client.DeleteDeliveryDestinationPolicyRequest(params) +// // Example sending a request using the DeleteLogStreamRequest method. +// req, resp := client.DeleteLogStreamRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestinationPolicy -func (c *CloudWatchLogs) DeleteDeliveryDestinationPolicyRequest(input *DeleteDeliveryDestinationPolicyInput) (req *request.Request, output *DeleteDeliveryDestinationPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream +func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) { op := &request.Operation{ - Name: opDeleteDeliveryDestinationPolicy, + Name: opDeleteLogStream, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDeliveryDestinationPolicyInput{} + input = &DeleteLogStreamInput{} } - output = &DeleteDeliveryDestinationPolicyOutput{} + output = &DeleteLogStreamOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteDeliveryDestinationPolicy API operation for Amazon CloudWatch Logs. +// DeleteLogStream API operation for Amazon CloudWatch Logs. // -// Deletes a delivery destination policy. For more information about these policies, -// see PutDeliveryDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html). +// Deletes the specified log stream and permanently deletes all the archived +// log events associated with the log stream. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteDeliveryDestinationPolicy for usage and error information. +// API operation DeleteLogStream for usage and error information. // // Returned Error Types: // -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - ValidationException -// One of the parameters for the request is not valid. +// - InvalidParameterException +// A parameter is specified incorrectly. // // - ResourceNotFoundException // The specified resource does not exist. // -// - ConflictException -// This operation attempted to create a resource that already exists. +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// +// - ServiceUnavailableException +// The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestinationPolicy -func (c *CloudWatchLogs) DeleteDeliveryDestinationPolicy(input *DeleteDeliveryDestinationPolicyInput) (*DeleteDeliveryDestinationPolicyOutput, error) { - req, out := c.DeleteDeliveryDestinationPolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream +func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) { + req, out := c.DeleteLogStreamRequest(input) return out, req.Send() } -// DeleteDeliveryDestinationPolicyWithContext is the same as DeleteDeliveryDestinationPolicy with the addition of +// DeleteLogStreamWithContext is the same as DeleteLogStream with the addition of // the ability to pass a context and additional request options. // -// See DeleteDeliveryDestinationPolicy for details on how to use this API operation. +// See DeleteLogStream for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteDeliveryDestinationPolicyWithContext(ctx aws.Context, input *DeleteDeliveryDestinationPolicyInput, opts ...request.Option) (*DeleteDeliveryDestinationPolicyOutput, error) { - req, out := c.DeleteDeliveryDestinationPolicyRequest(input) +func (c *CloudWatchLogs) DeleteLogStreamWithContext(ctx aws.Context, input *DeleteLogStreamInput, opts ...request.Option) (*DeleteLogStreamOutput, error) { + req, out := c.DeleteLogStreamRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteDeliverySource = "DeleteDeliverySource" +const opDeleteMetricFilter = "DeleteMetricFilter" -// DeleteDeliverySourceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDeliverySource operation. The "output" return +// DeleteMetricFilterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteDeliverySource for more information on using the DeleteDeliverySource +// See DeleteMetricFilter for more information on using the DeleteMetricFilter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteDeliverySourceRequest method. -// req, resp := client.DeleteDeliverySourceRequest(params) +// // Example sending a request using the DeleteMetricFilterRequest method. +// req, resp := client.DeleteMetricFilterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliverySource -func (c *CloudWatchLogs) DeleteDeliverySourceRequest(input *DeleteDeliverySourceInput) (req *request.Request, output *DeleteDeliverySourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter +func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) { op := &request.Operation{ - Name: opDeleteDeliverySource, + Name: opDeleteMetricFilter, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDeliverySourceInput{} + input = &DeleteMetricFilterInput{} } - output = &DeleteDeliverySourceOutput{} + output = &DeleteMetricFilterOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteDeliverySource API operation for Amazon CloudWatch Logs. -// -// Deletes a delivery source. A delivery is a connection between a logical delivery -// source and a logical delivery destination. +// DeleteMetricFilter API operation for Amazon CloudWatch Logs. // -// You can't delete a delivery source if any current deliveries are associated -// with it. To find whether any deliveries are associated with this delivery -// source, use the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) -// operation and check the deliverySourceName field in the results. +// Deletes the specified metric filter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteDeliverySource for usage and error information. +// API operation DeleteMetricFilter for usage and error information. // // Returned Error Types: // +// - InvalidParameterException +// A parameter is specified incorrectly. +// // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// - ConflictException -// This operation attempted to create a resource that already exists. -// -// - ValidationException -// One of the parameters for the request is not valid. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. -// -// - ThrottlingException -// The request was throttled because of quota limits. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliverySource -func (c *CloudWatchLogs) DeleteDeliverySource(input *DeleteDeliverySourceInput) (*DeleteDeliverySourceOutput, error) { - req, out := c.DeleteDeliverySourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter +func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) { + req, out := c.DeleteMetricFilterRequest(input) return out, req.Send() } -// DeleteDeliverySourceWithContext is the same as DeleteDeliverySource with the addition of +// DeleteMetricFilterWithContext is the same as DeleteMetricFilter with the addition of // the ability to pass a context and additional request options. // -// See DeleteDeliverySource for details on how to use this API operation. +// See DeleteMetricFilter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteDeliverySourceWithContext(ctx aws.Context, input *DeleteDeliverySourceInput, opts ...request.Option) (*DeleteDeliverySourceOutput, error) { - req, out := c.DeleteDeliverySourceRequest(input) +func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *DeleteMetricFilterInput, opts ...request.Option) (*DeleteMetricFilterOutput, error) { + req, out := c.DeleteMetricFilterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteDestination = "DeleteDestination" +const opDeleteQueryDefinition = "DeleteQueryDefinition" -// DeleteDestinationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDestination operation. The "output" return +// DeleteQueryDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteQueryDefinition operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteDestination for more information on using the DeleteDestination +// See DeleteQueryDefinition for more information on using the DeleteQueryDefinition // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteDestinationRequest method. -// req, resp := client.DeleteDestinationRequest(params) +// // Example sending a request using the DeleteQueryDefinitionRequest method. +// req, resp := client.DeleteQueryDefinitionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination -func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition +func (c *CloudWatchLogs) DeleteQueryDefinitionRequest(input *DeleteQueryDefinitionInput) (req *request.Request, output *DeleteQueryDefinitionOutput) { op := &request.Operation{ - Name: opDeleteDestination, + Name: opDeleteQueryDefinition, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDestinationInput{} + input = &DeleteQueryDefinitionInput{} } - output = &DeleteDestinationOutput{} + output = &DeleteQueryDefinitionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteDestination API operation for Amazon CloudWatch Logs. +// DeleteQueryDefinition API operation for Amazon CloudWatch Logs. // -// Deletes the specified destination, and eventually disables all the subscription -// filters that publish to it. This operation does not delete the physical resource -// encapsulated by the destination. +// Deletes a saved CloudWatch Logs Insights query definition. A query definition +// contains details about a saved CloudWatch Logs Insights query. +// +// Each DeleteQueryDefinition operation can delete one query definition. +// +// You must have the logs:DeleteQueryDefinition permission to be able to perform +// this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteDestination for usage and error information. +// API operation DeleteQueryDefinition for usage and error information. // // Returned Error Types: // @@ -1345,87 +1195,84 @@ func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination -func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) { - req, out := c.DeleteDestinationRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition +func (c *CloudWatchLogs) DeleteQueryDefinition(input *DeleteQueryDefinitionInput) (*DeleteQueryDefinitionOutput, error) { + req, out := c.DeleteQueryDefinitionRequest(input) return out, req.Send() } -// DeleteDestinationWithContext is the same as DeleteDestination with the addition of +// DeleteQueryDefinitionWithContext is the same as DeleteQueryDefinition with the addition of // the ability to pass a context and additional request options. // -// See DeleteDestination for details on how to use this API operation. +// See DeleteQueryDefinition for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteDestinationWithContext(ctx aws.Context, input *DeleteDestinationInput, opts ...request.Option) (*DeleteDestinationOutput, error) { - req, out := c.DeleteDestinationRequest(input) +func (c *CloudWatchLogs) DeleteQueryDefinitionWithContext(ctx aws.Context, input *DeleteQueryDefinitionInput, opts ...request.Option) (*DeleteQueryDefinitionOutput, error) { + req, out := c.DeleteQueryDefinitionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteLogGroup = "DeleteLogGroup" +const opDeleteResourcePolicy = "DeleteResourcePolicy" -// DeleteLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLogGroup operation. The "output" return +// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteLogGroup for more information on using the DeleteLogGroup +// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteLogGroupRequest method. -// req, resp := client.DeleteLogGroupRequest(params) +// // Example sending a request using the DeleteResourcePolicyRequest method. +// req, resp := client.DeleteResourcePolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup -func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy +func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { op := &request.Operation{ - Name: opDeleteLogGroup, + Name: opDeleteResourcePolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteLogGroupInput{} + input = &DeleteResourcePolicyInput{} } - output = &DeleteLogGroupOutput{} + output = &DeleteResourcePolicyOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteLogGroup API operation for Amazon CloudWatch Logs. +// DeleteResourcePolicy API operation for Amazon CloudWatch Logs. // -// Deletes the specified log group and permanently deletes all the archived -// log events associated with the log group. +// Deletes a resource policy from this account. This revokes the access of the +// identities in that policy to put log events to this account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteLogGroup for usage and error information. +// API operation DeleteResourcePolicy for usage and error information. // // Returned Error Types: // @@ -1435,87 +1282,86 @@ func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup -func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) { - req, out := c.DeleteLogGroupRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy +func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) return out, req.Send() } -// DeleteLogGroupWithContext is the same as DeleteLogGroup with the addition of +// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of // the ability to pass a context and additional request options. // -// See DeleteLogGroup for details on how to use this API operation. +// See DeleteResourcePolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteLogGroupWithContext(ctx aws.Context, input *DeleteLogGroupInput, opts ...request.Option) (*DeleteLogGroupOutput, error) { - req, out := c.DeleteLogGroupRequest(input) +func (c *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteLogStream = "DeleteLogStream" +const opDeleteRetentionPolicy = "DeleteRetentionPolicy" -// DeleteLogStreamRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLogStream operation. The "output" return +// DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRetentionPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteLogStream for more information on using the DeleteLogStream +// See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteLogStreamRequest method. -// req, resp := client.DeleteLogStreamRequest(params) +// // Example sending a request using the DeleteRetentionPolicyRequest method. +// req, resp := client.DeleteRetentionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream -func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy +func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) { op := &request.Operation{ - Name: opDeleteLogStream, + Name: opDeleteRetentionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteLogStreamInput{} + input = &DeleteRetentionPolicyInput{} } - output = &DeleteLogStreamOutput{} + output = &DeleteRetentionPolicyOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteLogStream API operation for Amazon CloudWatch Logs. +// DeleteRetentionPolicy API operation for Amazon CloudWatch Logs. // -// Deletes the specified log stream and permanently deletes all the archived -// log events associated with the log stream. +// Deletes the specified retention policy. +// +// Log events do not expire if they belong to log groups without a retention +// policy. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteLogStream for usage and error information. +// API operation DeleteRetentionPolicy for usage and error information. // // Returned Error Types: // @@ -1531,80 +1377,80 @@ func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (re // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream -func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) { - req, out := c.DeleteLogStreamRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy +func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) { + req, out := c.DeleteRetentionPolicyRequest(input) return out, req.Send() } -// DeleteLogStreamWithContext is the same as DeleteLogStream with the addition of +// DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of // the ability to pass a context and additional request options. // -// See DeleteLogStream for details on how to use this API operation. +// See DeleteRetentionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteLogStreamWithContext(ctx aws.Context, input *DeleteLogStreamInput, opts ...request.Option) (*DeleteLogStreamOutput, error) { - req, out := c.DeleteLogStreamRequest(input) +func (c *CloudWatchLogs) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error) { + req, out := c.DeleteRetentionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteMetricFilter = "DeleteMetricFilter" +const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter" -// DeleteMetricFilterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMetricFilter operation. The "output" return +// DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSubscriptionFilter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteMetricFilter for more information on using the DeleteMetricFilter +// See DeleteSubscriptionFilter for more information on using the DeleteSubscriptionFilter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteMetricFilterRequest method. -// req, resp := client.DeleteMetricFilterRequest(params) +// // Example sending a request using the DeleteSubscriptionFilterRequest method. +// req, resp := client.DeleteSubscriptionFilterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter -func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter +func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) { op := &request.Operation{ - Name: opDeleteMetricFilter, + Name: opDeleteSubscriptionFilter, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteMetricFilterInput{} + input = &DeleteSubscriptionFilterInput{} } - output = &DeleteMetricFilterOutput{} + output = &DeleteSubscriptionFilterOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteMetricFilter API operation for Amazon CloudWatch Logs. +// DeleteSubscriptionFilter API operation for Amazon CloudWatch Logs. // -// Deletes the specified metric filter. +// Deletes the specified subscription filter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteMetricFilter for usage and error information. +// API operation DeleteSubscriptionFilter for usage and error information. // // Returned Error Types: // @@ -1620,606 +1466,633 @@ func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInpu // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter -func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) { - req, out := c.DeleteMetricFilterRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter +func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) { + req, out := c.DeleteSubscriptionFilterRequest(input) return out, req.Send() } -// DeleteMetricFilterWithContext is the same as DeleteMetricFilter with the addition of +// DeleteSubscriptionFilterWithContext is the same as DeleteSubscriptionFilter with the addition of // the ability to pass a context and additional request options. // -// See DeleteMetricFilter for details on how to use this API operation. +// See DeleteSubscriptionFilter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *DeleteMetricFilterInput, opts ...request.Option) (*DeleteMetricFilterOutput, error) { - req, out := c.DeleteMetricFilterRequest(input) +func (c *CloudWatchLogs) DeleteSubscriptionFilterWithContext(ctx aws.Context, input *DeleteSubscriptionFilterInput, opts ...request.Option) (*DeleteSubscriptionFilterOutput, error) { + req, out := c.DeleteSubscriptionFilterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteQueryDefinition = "DeleteQueryDefinition" +const opDescribeAccountPolicies = "DescribeAccountPolicies" -// DeleteQueryDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteQueryDefinition operation. The "output" return +// DescribeAccountPoliciesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAccountPolicies operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteQueryDefinition for more information on using the DeleteQueryDefinition +// See DescribeAccountPolicies for more information on using the DescribeAccountPolicies // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteQueryDefinitionRequest method. -// req, resp := client.DeleteQueryDefinitionRequest(params) +// // Example sending a request using the DescribeAccountPoliciesRequest method. +// req, resp := client.DescribeAccountPoliciesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition -func (c *CloudWatchLogs) DeleteQueryDefinitionRequest(input *DeleteQueryDefinitionInput) (req *request.Request, output *DeleteQueryDefinitionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies +func (c *CloudWatchLogs) DescribeAccountPoliciesRequest(input *DescribeAccountPoliciesInput) (req *request.Request, output *DescribeAccountPoliciesOutput) { op := &request.Operation{ - Name: opDeleteQueryDefinition, + Name: opDescribeAccountPolicies, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteQueryDefinitionInput{} + input = &DescribeAccountPoliciesInput{} } - output = &DeleteQueryDefinitionOutput{} + output = &DescribeAccountPoliciesOutput{} req = c.newRequest(op, input, output) return } -// DeleteQueryDefinition API operation for Amazon CloudWatch Logs. -// -// Deletes a saved CloudWatch Logs Insights query definition. A query definition -// contains details about a saved CloudWatch Logs Insights query. -// -// Each DeleteQueryDefinition operation can delete one query definition. +// DescribeAccountPolicies API operation for Amazon CloudWatch Logs. // -// You must have the logs:DeleteQueryDefinition permission to be able to perform -// this operation. +// Returns a list of all CloudWatch Logs account policies in the account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteQueryDefinition for usage and error information. +// API operation DescribeAccountPolicies for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition -func (c *CloudWatchLogs) DeleteQueryDefinition(input *DeleteQueryDefinitionInput) (*DeleteQueryDefinitionOutput, error) { - req, out := c.DeleteQueryDefinitionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies +func (c *CloudWatchLogs) DescribeAccountPolicies(input *DescribeAccountPoliciesInput) (*DescribeAccountPoliciesOutput, error) { + req, out := c.DescribeAccountPoliciesRequest(input) return out, req.Send() } -// DeleteQueryDefinitionWithContext is the same as DeleteQueryDefinition with the addition of +// DescribeAccountPoliciesWithContext is the same as DescribeAccountPolicies with the addition of // the ability to pass a context and additional request options. // -// See DeleteQueryDefinition for details on how to use this API operation. +// See DescribeAccountPolicies for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteQueryDefinitionWithContext(ctx aws.Context, input *DeleteQueryDefinitionInput, opts ...request.Option) (*DeleteQueryDefinitionOutput, error) { - req, out := c.DeleteQueryDefinitionRequest(input) +func (c *CloudWatchLogs) DescribeAccountPoliciesWithContext(ctx aws.Context, input *DescribeAccountPoliciesInput, opts ...request.Option) (*DescribeAccountPoliciesOutput, error) { + req, out := c.DescribeAccountPoliciesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteResourcePolicy = "DeleteResourcePolicy" +const opDescribeDestinations = "DescribeDestinations" -// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResourcePolicy operation. The "output" return +// DescribeDestinationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDestinations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy +// See DescribeDestinations for more information on using the DescribeDestinations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteResourcePolicyRequest method. -// req, resp := client.DeleteResourcePolicyRequest(params) +// // Example sending a request using the DescribeDestinationsRequest method. +// req, resp := client.DescribeDestinationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy -func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations +func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) { op := &request.Operation{ - Name: opDeleteResourcePolicy, + Name: opDescribeDestinations, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &DeleteResourcePolicyInput{} + input = &DescribeDestinationsInput{} } - output = &DeleteResourcePolicyOutput{} + output = &DescribeDestinationsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteResourcePolicy API operation for Amazon CloudWatch Logs. +// DescribeDestinations API operation for Amazon CloudWatch Logs. // -// Deletes a resource policy from this account. This revokes the access of the -// identities in that policy to put log events to this account. +// Lists all your destinations. The results are ASCII-sorted by destination +// name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteResourcePolicy for usage and error information. +// API operation DescribeDestinations for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - ResourceNotFoundException -// The specified resource does not exist. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy -func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations +func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) { + req, out := c.DescribeDestinationsRequest(input) return out, req.Send() } -// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of +// DescribeDestinationsWithContext is the same as DescribeDestinations with the addition of // the ability to pass a context and additional request options. // -// See DeleteResourcePolicy for details on how to use this API operation. +// See DescribeDestinations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) +func (c *CloudWatchLogs) DescribeDestinationsWithContext(ctx aws.Context, input *DescribeDestinationsInput, opts ...request.Option) (*DescribeDestinationsOutput, error) { + req, out := c.DescribeDestinationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteRetentionPolicy = "DeleteRetentionPolicy" - -// DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRetentionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. +// DescribeDestinationsPages iterates over the pages of a DescribeDestinations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. // -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. +// See DescribeDestinations method for more information on how to use this operation. // -// See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeDestinations operation. +// pageNum := 0 +// err := client.DescribeDestinationsPages(params, +// func(page *cloudwatchlogs.DescribeDestinationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool) error { + return c.DescribeDestinationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDestinationsPagesWithContext same as DescribeDestinationsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + EndPageOnSameToken: true, + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDestinationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDestinationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeExportTasks = "DescribeExportTasks" + +// DescribeExportTasksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeExportTasks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeExportTasks for more information on using the DescribeExportTasks // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteRetentionPolicyRequest method. -// req, resp := client.DeleteRetentionPolicyRequest(params) +// // Example sending a request using the DescribeExportTasksRequest method. +// req, resp := client.DescribeExportTasksRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy -func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks +func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) { op := &request.Operation{ - Name: opDeleteRetentionPolicy, + Name: opDescribeExportTasks, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteRetentionPolicyInput{} + input = &DescribeExportTasksInput{} } - output = &DeleteRetentionPolicyOutput{} + output = &DescribeExportTasksOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteRetentionPolicy API operation for Amazon CloudWatch Logs. -// -// Deletes the specified retention policy. +// DescribeExportTasks API operation for Amazon CloudWatch Logs. // -// Log events do not expire if they belong to log groups without a retention -// policy. +// Lists the specified export tasks. You can list all your export tasks or filter +// the results based on task ID or task status. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteRetentionPolicy for usage and error information. +// API operation DescribeExportTasks for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy -func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) { - req, out := c.DeleteRetentionPolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks +func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) { + req, out := c.DescribeExportTasksRequest(input) return out, req.Send() } -// DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of +// DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of // the ability to pass a context and additional request options. // -// See DeleteRetentionPolicy for details on how to use this API operation. +// See DescribeExportTasks for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error) { - req, out := c.DeleteRetentionPolicyRequest(input) +func (c *CloudWatchLogs) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) { + req, out := c.DescribeExportTasksRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter" +const opDescribeLogGroups = "DescribeLogGroups" -// DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSubscriptionFilter operation. The "output" return +// DescribeLogGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLogGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteSubscriptionFilter for more information on using the DeleteSubscriptionFilter +// See DescribeLogGroups for more information on using the DescribeLogGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteSubscriptionFilterRequest method. -// req, resp := client.DeleteSubscriptionFilterRequest(params) +// // Example sending a request using the DescribeLogGroupsRequest method. +// req, resp := client.DescribeLogGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter -func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups +func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) { op := &request.Operation{ - Name: opDeleteSubscriptionFilter, + Name: opDescribeLogGroups, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &DeleteSubscriptionFilterInput{} + input = &DescribeLogGroupsInput{} } - output = &DeleteSubscriptionFilterOutput{} + output = &DescribeLogGroupsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteSubscriptionFilter API operation for Amazon CloudWatch Logs. +// DescribeLogGroups API operation for Amazon CloudWatch Logs. // -// Deletes the specified subscription filter. +// Lists the specified log groups. You can list all your log groups or filter +// the results by prefix. The results are ASCII-sorted by log group name. +// +// CloudWatch Logs doesn’t support IAM policies that control access to the +// DescribeLogGroups action by using the aws:ResourceTag/key-name condition +// key. Other CloudWatch Logs actions do support the use of the aws:ResourceTag/key-name +// condition key to control access. For more information about using tags to +// control access, see Controlling access to Amazon Web Services resources using +// tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteSubscriptionFilter for usage and error information. +// API operation DescribeLogGroups for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter -func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) { - req, out := c.DeleteSubscriptionFilterRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups +func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) { + req, out := c.DescribeLogGroupsRequest(input) return out, req.Send() } -// DeleteSubscriptionFilterWithContext is the same as DeleteSubscriptionFilter with the addition of +// DescribeLogGroupsWithContext is the same as DescribeLogGroups with the addition of // the ability to pass a context and additional request options. // -// See DeleteSubscriptionFilter for details on how to use this API operation. +// See DescribeLogGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteSubscriptionFilterWithContext(ctx aws.Context, input *DeleteSubscriptionFilterInput, opts ...request.Option) (*DeleteSubscriptionFilterOutput, error) { - req, out := c.DeleteSubscriptionFilterRequest(input) +func (c *CloudWatchLogs) DescribeLogGroupsWithContext(ctx aws.Context, input *DescribeLogGroupsInput, opts ...request.Option) (*DescribeLogGroupsOutput, error) { + req, out := c.DescribeLogGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeAccountPolicies = "DescribeAccountPolicies" +// DescribeLogGroupsPages iterates over the pages of a DescribeLogGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeLogGroups method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeLogGroups operation. +// pageNum := 0 +// err := client.DescribeLogGroupsPages(params, +// func(page *cloudwatchlogs.DescribeLogGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool) error { + return c.DescribeLogGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// DescribeAccountPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountPolicies operation. The "output" return +// DescribeLogGroupsPagesWithContext same as DescribeLogGroupsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + EndPageOnSameToken: true, + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeLogGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeLogGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeLogStreams = "DescribeLogStreams" + +// DescribeLogStreamsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLogStreams operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeAccountPolicies for more information on using the DescribeAccountPolicies +// See DescribeLogStreams for more information on using the DescribeLogStreams // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeAccountPoliciesRequest method. -// req, resp := client.DescribeAccountPoliciesRequest(params) +// // Example sending a request using the DescribeLogStreamsRequest method. +// req, resp := client.DescribeLogStreamsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies -func (c *CloudWatchLogs) DescribeAccountPoliciesRequest(input *DescribeAccountPoliciesInput) (req *request.Request, output *DescribeAccountPoliciesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams +func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) { op := &request.Operation{ - Name: opDescribeAccountPolicies, + Name: opDescribeLogStreams, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &DescribeAccountPoliciesInput{} + input = &DescribeLogStreamsInput{} } - output = &DescribeAccountPoliciesOutput{} + output = &DescribeLogStreamsOutput{} req = c.newRequest(op, input, output) return } -// DescribeAccountPolicies API operation for Amazon CloudWatch Logs. -// -// Returns a list of all CloudWatch Logs account policies in the account. +// DescribeLogStreams API operation for Amazon CloudWatch Logs. // -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// Lists the log streams for the specified log group. You can list all the log +// streams or filter the results by prefix. You can also control how the results +// are ordered. +// +// You can specify the log group to search by using either logGroupIdentifier +// or logGroupName. You must include one of these two parameters, but you can't +// include both. +// +// This operation has a limit of five transactions per second, after which transactions +// are throttled. +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeAccountPolicies for usage and error information. +// API operation DescribeLogStreams for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies -func (c *CloudWatchLogs) DescribeAccountPolicies(input *DescribeAccountPoliciesInput) (*DescribeAccountPoliciesOutput, error) { - req, out := c.DescribeAccountPoliciesRequest(input) - return out, req.Send() -} - -// DescribeAccountPoliciesWithContext is the same as DescribeAccountPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountPolicies for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeAccountPoliciesWithContext(ctx aws.Context, input *DescribeAccountPoliciesInput, opts ...request.Option) (*DescribeAccountPoliciesOutput, error) { - req, out := c.DescribeAccountPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeDeliveries = "DescribeDeliveries" - -// DescribeDeliveriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDeliveries operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeDeliveries for more information on using the DescribeDeliveries -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeDeliveriesRequest method. -// req, resp := client.DescribeDeliveriesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveries -func (c *CloudWatchLogs) DescribeDeliveriesRequest(input *DescribeDeliveriesInput) (req *request.Request, output *DescribeDeliveriesOutput) { - op := &request.Operation{ - Name: opDescribeDeliveries, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeDeliveriesInput{} - } - - output = &DescribeDeliveriesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeDeliveries API operation for Amazon CloudWatch Logs. -// -// Retrieves a list of the deliveries that have been created in the account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeDeliveries for usage and error information. -// -// Returned Error Types: -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. -// -// - ValidationException -// One of the parameters for the request is not valid. -// -// - ThrottlingException -// The request was throttled because of quota limits. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveries -func (c *CloudWatchLogs) DescribeDeliveries(input *DescribeDeliveriesInput) (*DescribeDeliveriesOutput, error) { - req, out := c.DescribeDeliveriesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams +func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) { + req, out := c.DescribeLogStreamsRequest(input) return out, req.Send() } -// DescribeDeliveriesWithContext is the same as DescribeDeliveries with the addition of +// DescribeLogStreamsWithContext is the same as DescribeLogStreams with the addition of // the ability to pass a context and additional request options. // -// See DescribeDeliveries for details on how to use this API operation. +// See DescribeLogStreams for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDeliveriesWithContext(ctx aws.Context, input *DescribeDeliveriesInput, opts ...request.Option) (*DescribeDeliveriesOutput, error) { - req, out := c.DescribeDeliveriesRequest(input) +func (c *CloudWatchLogs) DescribeLogStreamsWithContext(ctx aws.Context, input *DescribeLogStreamsInput, opts ...request.Option) (*DescribeLogStreamsOutput, error) { + req, out := c.DescribeLogStreamsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeDeliveriesPages iterates over the pages of a DescribeDeliveries operation, +// DescribeLogStreamsPages iterates over the pages of a DescribeLogStreams operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeDeliveries method for more information on how to use this operation. +// See DescribeLogStreams method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a DescribeDeliveries operation. +// // Example iterating over at most 3 pages of a DescribeLogStreams operation. // pageNum := 0 -// err := client.DescribeDeliveriesPages(params, -// func(page *cloudwatchlogs.DescribeDeliveriesOutput, lastPage bool) bool { +// err := client.DescribeLogStreamsPages(params, +// func(page *cloudwatchlogs.DescribeLogStreamsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) -func (c *CloudWatchLogs) DescribeDeliveriesPages(input *DescribeDeliveriesInput, fn func(*DescribeDeliveriesOutput, bool) bool) error { - return c.DescribeDeliveriesPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool) error { + return c.DescribeLogStreamsPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeDeliveriesPagesWithContext same as DescribeDeliveriesPages except +// DescribeLogStreamsPagesWithContext same as DescribeLogStreamsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDeliveriesPagesWithContext(ctx aws.Context, input *DescribeDeliveriesInput, fn func(*DescribeDeliveriesOutput, bool) bool, opts ...request.Option) error { +func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDeliveriesInput + var inCpy *DescribeLogStreamsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.DescribeDeliveriesRequest(inCpy) + req, _ := c.DescribeLogStreamsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -2227,7 +2100,7 @@ func (c *CloudWatchLogs) DescribeDeliveriesPagesWithContext(ctx aws.Context, inp } for p.Next() { - if !fn(p.Page().(*DescribeDeliveriesOutput), !p.HasNextPage()) { + if !fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage()) { break } } @@ -2235,34 +2108,34 @@ func (c *CloudWatchLogs) DescribeDeliveriesPagesWithContext(ctx aws.Context, inp return p.Err() } -const opDescribeDeliveryDestinations = "DescribeDeliveryDestinations" +const opDescribeMetricFilters = "DescribeMetricFilters" -// DescribeDeliveryDestinationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDeliveryDestinations operation. The "output" return +// DescribeMetricFiltersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeMetricFilters operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeDeliveryDestinations for more information on using the DescribeDeliveryDestinations +// See DescribeMetricFilters for more information on using the DescribeMetricFilters // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeDeliveryDestinationsRequest method. -// req, resp := client.DescribeDeliveryDestinationsRequest(params) +// // Example sending a request using the DescribeMetricFiltersRequest method. +// req, resp := client.DescribeMetricFiltersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveryDestinations -func (c *CloudWatchLogs) DescribeDeliveryDestinationsRequest(input *DescribeDeliveryDestinationsInput) (req *request.Request, output *DescribeDeliveryDestinationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters +func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) { op := &request.Operation{ - Name: opDescribeDeliveryDestinations, + Name: opDescribeMetricFilters, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -2274,99 +2147,97 @@ func (c *CloudWatchLogs) DescribeDeliveryDestinationsRequest(input *DescribeDeli } if input == nil { - input = &DescribeDeliveryDestinationsInput{} + input = &DescribeMetricFiltersInput{} } - output = &DescribeDeliveryDestinationsOutput{} + output = &DescribeMetricFiltersOutput{} req = c.newRequest(op, input, output) return } -// DescribeDeliveryDestinations API operation for Amazon CloudWatch Logs. +// DescribeMetricFilters API operation for Amazon CloudWatch Logs. // -// Retrieves a list of the delivery destinations that have been created in the -// account. +// Lists the specified metric filters. You can list all of the metric filters +// or filter the results by log name, prefix, metric name, or metric namespace. +// The results are ASCII-sorted by filter name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeDeliveryDestinations for usage and error information. +// API operation DescribeMetricFilters for usage and error information. // // Returned Error Types: // -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. +// - InvalidParameterException +// A parameter is specified incorrectly. // -// - ValidationException -// One of the parameters for the request is not valid. +// - ResourceNotFoundException +// The specified resource does not exist. // -// - ThrottlingException -// The request was throttled because of quota limits. +// - ServiceUnavailableException +// The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveryDestinations -func (c *CloudWatchLogs) DescribeDeliveryDestinations(input *DescribeDeliveryDestinationsInput) (*DescribeDeliveryDestinationsOutput, error) { - req, out := c.DescribeDeliveryDestinationsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters +func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) { + req, out := c.DescribeMetricFiltersRequest(input) return out, req.Send() } -// DescribeDeliveryDestinationsWithContext is the same as DescribeDeliveryDestinations with the addition of +// DescribeMetricFiltersWithContext is the same as DescribeMetricFilters with the addition of // the ability to pass a context and additional request options. // -// See DescribeDeliveryDestinations for details on how to use this API operation. +// See DescribeMetricFilters for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDeliveryDestinationsWithContext(ctx aws.Context, input *DescribeDeliveryDestinationsInput, opts ...request.Option) (*DescribeDeliveryDestinationsOutput, error) { - req, out := c.DescribeDeliveryDestinationsRequest(input) +func (c *CloudWatchLogs) DescribeMetricFiltersWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, opts ...request.Option) (*DescribeMetricFiltersOutput, error) { + req, out := c.DescribeMetricFiltersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeDeliveryDestinationsPages iterates over the pages of a DescribeDeliveryDestinations operation, +// DescribeMetricFiltersPages iterates over the pages of a DescribeMetricFilters operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeDeliveryDestinations method for more information on how to use this operation. +// See DescribeMetricFilters method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a DescribeDeliveryDestinations operation. +// // Example iterating over at most 3 pages of a DescribeMetricFilters operation. // pageNum := 0 -// err := client.DescribeDeliveryDestinationsPages(params, -// func(page *cloudwatchlogs.DescribeDeliveryDestinationsOutput, lastPage bool) bool { +// err := client.DescribeMetricFiltersPages(params, +// func(page *cloudwatchlogs.DescribeMetricFiltersOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) -func (c *CloudWatchLogs) DescribeDeliveryDestinationsPages(input *DescribeDeliveryDestinationsInput, fn func(*DescribeDeliveryDestinationsOutput, bool) bool) error { - return c.DescribeDeliveryDestinationsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool) error { + return c.DescribeMetricFiltersPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeDeliveryDestinationsPagesWithContext same as DescribeDeliveryDestinationsPages except +// DescribeMetricFiltersPagesWithContext same as DescribeMetricFiltersPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDeliveryDestinationsPagesWithContext(ctx aws.Context, input *DescribeDeliveryDestinationsInput, fn func(*DescribeDeliveryDestinationsOutput, bool) bool, opts ...request.Option) error { +func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDeliveryDestinationsInput + var inCpy *DescribeMetricFiltersInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.DescribeDeliveryDestinationsRequest(inCpy) + req, _ := c.DescribeMetricFiltersRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -2374,7 +2245,7 @@ func (c *CloudWatchLogs) DescribeDeliveryDestinationsPagesWithContext(ctx aws.Co } for p.Next() { - if !fn(p.Page().(*DescribeDeliveryDestinationsOutput), !p.HasNextPage()) { + if !fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage()) { break } } @@ -2382,210 +2253,148 @@ func (c *CloudWatchLogs) DescribeDeliveryDestinationsPagesWithContext(ctx aws.Co return p.Err() } -const opDescribeDeliverySources = "DescribeDeliverySources" +const opDescribeQueries = "DescribeQueries" -// DescribeDeliverySourcesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDeliverySources operation. The "output" return +// DescribeQueriesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeQueries operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeDeliverySources for more information on using the DescribeDeliverySources +// See DescribeQueries for more information on using the DescribeQueries // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeDeliverySourcesRequest method. -// req, resp := client.DescribeDeliverySourcesRequest(params) +// // Example sending a request using the DescribeQueriesRequest method. +// req, resp := client.DescribeQueriesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliverySources -func (c *CloudWatchLogs) DescribeDeliverySourcesRequest(input *DescribeDeliverySourcesInput) (req *request.Request, output *DescribeDeliverySourcesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries +func (c *CloudWatchLogs) DescribeQueriesRequest(input *DescribeQueriesInput) (req *request.Request, output *DescribeQueriesOutput) { op := &request.Operation{ - Name: opDescribeDeliverySources, + Name: opDescribeQueries, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &DescribeDeliverySourcesInput{} + input = &DescribeQueriesInput{} } - output = &DescribeDeliverySourcesOutput{} + output = &DescribeQueriesOutput{} req = c.newRequest(op, input, output) return } -// DescribeDeliverySources API operation for Amazon CloudWatch Logs. +// DescribeQueries API operation for Amazon CloudWatch Logs. // -// Retrieves a list of the delivery sources that have been created in the account. +// Returns a list of CloudWatch Logs Insights queries that are scheduled, running, +// or have been run recently in this account. You can request all queries or +// limit it to queries of a specific log group or queries with a certain status. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeDeliverySources for usage and error information. +// API operation DescribeQueries for usage and error information. // // Returned Error Types: // -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. +// - InvalidParameterException +// A parameter is specified incorrectly. // -// - ValidationException -// One of the parameters for the request is not valid. +// - ResourceNotFoundException +// The specified resource does not exist. // -// - ThrottlingException -// The request was throttled because of quota limits. +// - ServiceUnavailableException +// The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliverySources -func (c *CloudWatchLogs) DescribeDeliverySources(input *DescribeDeliverySourcesInput) (*DescribeDeliverySourcesOutput, error) { - req, out := c.DescribeDeliverySourcesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries +func (c *CloudWatchLogs) DescribeQueries(input *DescribeQueriesInput) (*DescribeQueriesOutput, error) { + req, out := c.DescribeQueriesRequest(input) return out, req.Send() } -// DescribeDeliverySourcesWithContext is the same as DescribeDeliverySources with the addition of +// DescribeQueriesWithContext is the same as DescribeQueries with the addition of // the ability to pass a context and additional request options. // -// See DescribeDeliverySources for details on how to use this API operation. +// See DescribeQueries for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDeliverySourcesWithContext(ctx aws.Context, input *DescribeDeliverySourcesInput, opts ...request.Option) (*DescribeDeliverySourcesOutput, error) { - req, out := c.DescribeDeliverySourcesRequest(input) +func (c *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *DescribeQueriesInput, opts ...request.Option) (*DescribeQueriesOutput, error) { + req, out := c.DescribeQueriesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeDeliverySourcesPages iterates over the pages of a DescribeDeliverySources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDeliverySources method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeDeliverySources operation. -// pageNum := 0 -// err := client.DescribeDeliverySourcesPages(params, -// func(page *cloudwatchlogs.DescribeDeliverySourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudWatchLogs) DescribeDeliverySourcesPages(input *DescribeDeliverySourcesInput, fn func(*DescribeDeliverySourcesOutput, bool) bool) error { - return c.DescribeDeliverySourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDeliverySourcesPagesWithContext same as DescribeDeliverySourcesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDeliverySourcesPagesWithContext(ctx aws.Context, input *DescribeDeliverySourcesInput, fn func(*DescribeDeliverySourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDeliverySourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDeliverySourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeDeliverySourcesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeDestinations = "DescribeDestinations" +const opDescribeQueryDefinitions = "DescribeQueryDefinitions" -// DescribeDestinationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDestinations operation. The "output" return +// DescribeQueryDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeQueryDefinitions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeDestinations for more information on using the DescribeDestinations +// See DescribeQueryDefinitions for more information on using the DescribeQueryDefinitions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeDestinationsRequest method. -// req, resp := client.DescribeDestinationsRequest(params) +// // Example sending a request using the DescribeQueryDefinitionsRequest method. +// req, resp := client.DescribeQueryDefinitionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations -func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions +func (c *CloudWatchLogs) DescribeQueryDefinitionsRequest(input *DescribeQueryDefinitionsInput) (req *request.Request, output *DescribeQueryDefinitionsOutput) { op := &request.Operation{ - Name: opDescribeDestinations, + Name: opDescribeQueryDefinitions, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &DescribeDestinationsInput{} + input = &DescribeQueryDefinitionsInput{} } - output = &DescribeDestinationsOutput{} + output = &DescribeQueryDefinitionsOutput{} req = c.newRequest(op, input, output) return } -// DescribeDestinations API operation for Amazon CloudWatch Logs. +// DescribeQueryDefinitions API operation for Amazon CloudWatch Logs. // -// Lists all your destinations. The results are ASCII-sorted by destination -// name. +// This operation returns a paginated list of your saved CloudWatch Logs Insights +// query definitions. +// +// You can use the queryDefinitionNamePrefix parameter to limit the results +// to only the query definitions that have names that start with a certain string. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeDestinations for usage and error information. +// API operation DescribeQueryDefinitions for usage and error information. // // Returned Error Types: // @@ -2595,132 +2404,79 @@ func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinations // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations -func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) { - req, out := c.DescribeDestinationsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions +func (c *CloudWatchLogs) DescribeQueryDefinitions(input *DescribeQueryDefinitionsInput) (*DescribeQueryDefinitionsOutput, error) { + req, out := c.DescribeQueryDefinitionsRequest(input) return out, req.Send() } -// DescribeDestinationsWithContext is the same as DescribeDestinations with the addition of +// DescribeQueryDefinitionsWithContext is the same as DescribeQueryDefinitions with the addition of // the ability to pass a context and additional request options. // -// See DescribeDestinations for details on how to use this API operation. +// See DescribeQueryDefinitions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDestinationsWithContext(ctx aws.Context, input *DescribeDestinationsInput, opts ...request.Option) (*DescribeDestinationsOutput, error) { - req, out := c.DescribeDestinationsRequest(input) +func (c *CloudWatchLogs) DescribeQueryDefinitionsWithContext(ctx aws.Context, input *DescribeQueryDefinitionsInput, opts ...request.Option) (*DescribeQueryDefinitionsOutput, error) { + req, out := c.DescribeQueryDefinitionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeDestinationsPages iterates over the pages of a DescribeDestinations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDestinations method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeDestinations operation. -// pageNum := 0 -// err := client.DescribeDestinationsPages(params, -// func(page *cloudwatchlogs.DescribeDestinationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool) error { - return c.DescribeDestinationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDestinationsPagesWithContext same as DescribeDestinationsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDestinationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDestinationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeExportTasks = "DescribeExportTasks" +const opDescribeResourcePolicies = "DescribeResourcePolicies" -// DescribeExportTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeExportTasks operation. The "output" return +// DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeResourcePolicies operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeExportTasks for more information on using the DescribeExportTasks +// See DescribeResourcePolicies for more information on using the DescribeResourcePolicies // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeExportTasksRequest method. -// req, resp := client.DescribeExportTasksRequest(params) +// // Example sending a request using the DescribeResourcePoliciesRequest method. +// req, resp := client.DescribeResourcePoliciesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks -func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies +func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResourcePoliciesInput) (req *request.Request, output *DescribeResourcePoliciesOutput) { op := &request.Operation{ - Name: opDescribeExportTasks, + Name: opDescribeResourcePolicies, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeExportTasksInput{} + input = &DescribeResourcePoliciesInput{} } - output = &DescribeExportTasksOutput{} + output = &DescribeResourcePoliciesOutput{} req = c.newRequest(op, input, output) return } -// DescribeExportTasks API operation for Amazon CloudWatch Logs. +// DescribeResourcePolicies API operation for Amazon CloudWatch Logs. // -// Lists the specified export tasks. You can list all your export tasks or filter -// the results based on task ID or task status. +// Lists the resource policies in this account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeExportTasks for usage and error information. +// API operation DescribeResourcePolicies for usage and error information. // // Returned Error Types: // @@ -2730,56 +2486,56 @@ func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksIn // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks -func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) { - req, out := c.DescribeExportTasksRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies +func (c *CloudWatchLogs) DescribeResourcePolicies(input *DescribeResourcePoliciesInput) (*DescribeResourcePoliciesOutput, error) { + req, out := c.DescribeResourcePoliciesRequest(input) return out, req.Send() } -// DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of +// DescribeResourcePoliciesWithContext is the same as DescribeResourcePolicies with the addition of // the ability to pass a context and additional request options. // -// See DescribeExportTasks for details on how to use this API operation. +// See DescribeResourcePolicies for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) { - req, out := c.DescribeExportTasksRequest(input) +func (c *CloudWatchLogs) DescribeResourcePoliciesWithContext(ctx aws.Context, input *DescribeResourcePoliciesInput, opts ...request.Option) (*DescribeResourcePoliciesOutput, error) { + req, out := c.DescribeResourcePoliciesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeLogGroups = "DescribeLogGroups" +const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" -// DescribeLogGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLogGroups operation. The "output" return +// DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSubscriptionFilters operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeLogGroups for more information on using the DescribeLogGroups +// See DescribeSubscriptionFilters for more information on using the DescribeSubscriptionFilters // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeLogGroupsRequest method. -// req, resp := client.DescribeLogGroupsRequest(params) +// // Example sending a request using the DescribeSubscriptionFiltersRequest method. +// req, resp := client.DescribeSubscriptionFiltersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups -func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters +func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) { op := &request.Operation{ - Name: opDescribeLogGroups, + Name: opDescribeSubscriptionFilters, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -2791,104 +2547,97 @@ func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) } if input == nil { - input = &DescribeLogGroupsInput{} + input = &DescribeSubscriptionFiltersInput{} } - output = &DescribeLogGroupsOutput{} + output = &DescribeSubscriptionFiltersOutput{} req = c.newRequest(op, input, output) return } -// DescribeLogGroups API operation for Amazon CloudWatch Logs. -// -// Lists the specified log groups. You can list all your log groups or filter -// the results by prefix. The results are ASCII-sorted by log group name. -// -// CloudWatch Logs doesn’t support IAM policies that control access to the -// DescribeLogGroups action by using the aws:ResourceTag/key-name condition -// key. Other CloudWatch Logs actions do support the use of the aws:ResourceTag/key-name -// condition key to control access. For more information about using tags to -// control access, see Controlling access to Amazon Web Services resources using -// tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). +// DescribeSubscriptionFilters API operation for Amazon CloudWatch Logs. // -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// Lists the subscription filters for the specified log group. You can list +// all the subscription filters or filter the results by prefix. The results +// are ASCII-sorted by filter name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeLogGroups for usage and error information. +// API operation DescribeSubscriptionFilters for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - ResourceNotFoundException +// The specified resource does not exist. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups -func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) { - req, out := c.DescribeLogGroupsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters +func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) { + req, out := c.DescribeSubscriptionFiltersRequest(input) return out, req.Send() } -// DescribeLogGroupsWithContext is the same as DescribeLogGroups with the addition of +// DescribeSubscriptionFiltersWithContext is the same as DescribeSubscriptionFilters with the addition of // the ability to pass a context and additional request options. // -// See DescribeLogGroups for details on how to use this API operation. +// See DescribeSubscriptionFilters for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogGroupsWithContext(ctx aws.Context, input *DescribeLogGroupsInput, opts ...request.Option) (*DescribeLogGroupsOutput, error) { - req, out := c.DescribeLogGroupsRequest(input) +func (c *CloudWatchLogs) DescribeSubscriptionFiltersWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, opts ...request.Option) (*DescribeSubscriptionFiltersOutput, error) { + req, out := c.DescribeSubscriptionFiltersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeLogGroupsPages iterates over the pages of a DescribeLogGroups operation, +// DescribeSubscriptionFiltersPages iterates over the pages of a DescribeSubscriptionFilters operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeLogGroups method for more information on how to use this operation. +// See DescribeSubscriptionFilters method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a DescribeLogGroups operation. +// // Example iterating over at most 3 pages of a DescribeSubscriptionFilters operation. // pageNum := 0 -// err := client.DescribeLogGroupsPages(params, -// func(page *cloudwatchlogs.DescribeLogGroupsOutput, lastPage bool) bool { +// err := client.DescribeSubscriptionFiltersPages(params, +// func(page *cloudwatchlogs.DescribeSubscriptionFiltersOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) -func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool) error { - return c.DescribeLogGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool) error { + return c.DescribeSubscriptionFiltersPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeLogGroupsPagesWithContext same as DescribeLogGroupsPages except +// DescribeSubscriptionFiltersPagesWithContext same as DescribeSubscriptionFiltersPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool, opts ...request.Option) error { +func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLogGroupsInput + var inCpy *DescribeSubscriptionFiltersInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.DescribeLogGroupsRequest(inCpy) + req, _ := c.DescribeSubscriptionFiltersRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -2896,7 +2645,7 @@ func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, inpu } for p.Next() { - if !fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage()) { + if !fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage()) { break } } @@ -2904,76 +2653,81 @@ func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, inpu return p.Err() } -const opDescribeLogStreams = "DescribeLogStreams" +const opDisassociateKmsKey = "DisassociateKmsKey" -// DescribeLogStreamsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLogStreams operation. The "output" return +// DisassociateKmsKeyRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateKmsKey operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeLogStreams for more information on using the DescribeLogStreams +// See DisassociateKmsKey for more information on using the DisassociateKmsKey // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeLogStreamsRequest method. -// req, resp := client.DescribeLogStreamsRequest(params) +// // Example sending a request using the DisassociateKmsKeyRequest method. +// req, resp := client.DisassociateKmsKeyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams -func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey +func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInput) (req *request.Request, output *DisassociateKmsKeyOutput) { op := &request.Operation{ - Name: opDescribeLogStreams, + Name: opDisassociateKmsKey, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &DescribeLogStreamsInput{} + input = &DisassociateKmsKeyInput{} } - output = &DescribeLogStreamsOutput{} + output = &DisassociateKmsKeyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DescribeLogStreams API operation for Amazon CloudWatch Logs. +// DisassociateKmsKey API operation for Amazon CloudWatch Logs. // -// Lists the log streams for the specified log group. You can list all the log -// streams or filter the results by prefix. You can also control how the results -// are ordered. +// Disassociates the specified KMS key from the specified log group or from +// all CloudWatch Logs Insights query results in the account. // -// You can specify the log group to search by using either logGroupIdentifier -// or logGroupName. You must include one of these two parameters, but you can't -// include both. +// When you use DisassociateKmsKey, you specify either the logGroupName parameter +// or the resourceIdentifier parameter. You can't specify both of those parameters +// in the same operation. // -// This operation has a limit of five transactions per second, after which transactions -// are throttled. +// - Specify the logGroupName parameter to stop using the KMS key to encrypt +// future log events ingested and stored in the log group. Instead, they +// will be encrypted with the default CloudWatch Logs method. The log events +// that were ingested while the key was associated with the log group are +// still encrypted with that key. Therefore, CloudWatch Logs will need permissions +// for the key whenever that data is accessed. // -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// - Specify the resourceIdentifier parameter with the query-result resource +// to stop using the KMS key to encrypt the results of all future StartQuery +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) +// operations in the account. They will instead be encrypted with the default +// CloudWatch Logs method. The results from queries that ran while the key +// was associated with the account are still encrypted with that key. Therefore, +// CloudWatch Logs will need permissions for the key whenever that data is +// accessed. +// +// It can take up to 5 minutes for this operation to take effect. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeLogStreams for usage and error information. +// API operation DisassociateKmsKey for usage and error information. // // Returned Error Types: // @@ -2983,111 +2737,62 @@ func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInpu // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams -func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) { - req, out := c.DescribeLogStreamsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey +func (c *CloudWatchLogs) DisassociateKmsKey(input *DisassociateKmsKeyInput) (*DisassociateKmsKeyOutput, error) { + req, out := c.DisassociateKmsKeyRequest(input) return out, req.Send() } -// DescribeLogStreamsWithContext is the same as DescribeLogStreams with the addition of +// DisassociateKmsKeyWithContext is the same as DisassociateKmsKey with the addition of // the ability to pass a context and additional request options. // -// See DescribeLogStreams for details on how to use this API operation. +// See DisassociateKmsKey for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogStreamsWithContext(ctx aws.Context, input *DescribeLogStreamsInput, opts ...request.Option) (*DescribeLogStreamsOutput, error) { - req, out := c.DescribeLogStreamsRequest(input) +func (c *CloudWatchLogs) DisassociateKmsKeyWithContext(ctx aws.Context, input *DisassociateKmsKeyInput, opts ...request.Option) (*DisassociateKmsKeyOutput, error) { + req, out := c.DisassociateKmsKeyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeLogStreamsPages iterates over the pages of a DescribeLogStreams operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeLogStreams method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeLogStreams operation. -// pageNum := 0 -// err := client.DescribeLogStreamsPages(params, -// func(page *cloudwatchlogs.DescribeLogStreamsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool) error { - return c.DescribeLogStreamsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeLogStreamsPagesWithContext same as DescribeLogStreamsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLogStreamsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLogStreamsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeMetricFilters = "DescribeMetricFilters" +const opFilterLogEvents = "FilterLogEvents" -// DescribeMetricFiltersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMetricFilters operation. The "output" return +// FilterLogEventsRequest generates a "aws/request.Request" representing the +// client's request for the FilterLogEvents operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeMetricFilters for more information on using the DescribeMetricFilters +// See FilterLogEvents for more information on using the FilterLogEvents // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeMetricFiltersRequest method. -// req, resp := client.DescribeMetricFiltersRequest(params) +// // Example sending a request using the FilterLogEventsRequest method. +// req, resp := client.FilterLogEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters -func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents +func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) { op := &request.Operation{ - Name: opDescribeMetricFilters, + Name: opFilterLogEvents, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -3099,26 +2804,47 @@ func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFilte } if input == nil { - input = &DescribeMetricFiltersInput{} + input = &FilterLogEventsInput{} } - output = &DescribeMetricFiltersOutput{} + output = &FilterLogEventsOutput{} req = c.newRequest(op, input, output) return } -// DescribeMetricFilters API operation for Amazon CloudWatch Logs. +// FilterLogEvents API operation for Amazon CloudWatch Logs. // -// Lists the specified metric filters. You can list all of the metric filters -// or filter the results by log name, prefix, metric name, or metric namespace. -// The results are ASCII-sorted by filter name. +// 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. +// +// You must have the logs:FilterLogEvents permission to perform this operation. +// +// You can specify the log group to search by using either logGroupIdentifier +// or logGroupName. You must include one of these two parameters, but you can't +// include both. +// +// 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 specifying the token in a subsequent +// call. This operation can return empty results while there are more log events +// available through the token. +// +// The returned log events are sorted by event timestamp, the timestamp when +// the event was ingested by CloudWatch Logs, and the ID of the PutLogEvents +// request. +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeMetricFilters for usage and error information. +// API operation FilterLogEvents for usage and error information. // // Returned Error Types: // @@ -3131,65 +2857,65 @@ func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFilte // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters -func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) { - req, out := c.DescribeMetricFiltersRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents +func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) { + req, out := c.FilterLogEventsRequest(input) return out, req.Send() } -// DescribeMetricFiltersWithContext is the same as DescribeMetricFilters with the addition of +// FilterLogEventsWithContext is the same as FilterLogEvents with the addition of // the ability to pass a context and additional request options. // -// See DescribeMetricFilters for details on how to use this API operation. +// See FilterLogEvents for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeMetricFiltersWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, opts ...request.Option) (*DescribeMetricFiltersOutput, error) { - req, out := c.DescribeMetricFiltersRequest(input) +func (c *CloudWatchLogs) FilterLogEventsWithContext(ctx aws.Context, input *FilterLogEventsInput, opts ...request.Option) (*FilterLogEventsOutput, error) { + req, out := c.FilterLogEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeMetricFiltersPages iterates over the pages of a DescribeMetricFilters operation, +// FilterLogEventsPages iterates over the pages of a FilterLogEvents operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeMetricFilters method for more information on how to use this operation. +// See FilterLogEvents method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a DescribeMetricFilters operation. +// // Example iterating over at most 3 pages of a FilterLogEvents operation. // pageNum := 0 -// err := client.DescribeMetricFiltersPages(params, -// func(page *cloudwatchlogs.DescribeMetricFiltersOutput, lastPage bool) bool { +// err := client.FilterLogEventsPages(params, +// func(page *cloudwatchlogs.FilterLogEventsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) -func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool) error { - return c.DescribeMetricFiltersPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool) error { + return c.FilterLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeMetricFiltersPagesWithContext same as DescribeMetricFiltersPages except +// FilterLogEventsPagesWithContext same as FilterLogEventsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool, opts ...request.Option) error { +func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { - var inCpy *DescribeMetricFiltersInput + var inCpy *FilterLogEventsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.DescribeMetricFiltersRequest(inCpy) + req, _ := c.FilterLogEventsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -3197,7 +2923,7 @@ func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, } for p.Next() { - if !fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage()) { + if !fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage()) { break } } @@ -3205,481 +2931,520 @@ func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, return p.Err() } -const opDescribeQueries = "DescribeQueries" +const opGetDataProtectionPolicy = "GetDataProtectionPolicy" -// DescribeQueriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeQueries operation. The "output" return +// GetDataProtectionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetDataProtectionPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeQueries for more information on using the DescribeQueries +// See GetDataProtectionPolicy for more information on using the GetDataProtectionPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeQueriesRequest method. -// req, resp := client.DescribeQueriesRequest(params) +// // Example sending a request using the GetDataProtectionPolicyRequest method. +// req, resp := client.GetDataProtectionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries -func (c *CloudWatchLogs) DescribeQueriesRequest(input *DescribeQueriesInput) (req *request.Request, output *DescribeQueriesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDataProtectionPolicy +func (c *CloudWatchLogs) GetDataProtectionPolicyRequest(input *GetDataProtectionPolicyInput) (req *request.Request, output *GetDataProtectionPolicyOutput) { op := &request.Operation{ - Name: opDescribeQueries, + Name: opGetDataProtectionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeQueriesInput{} + input = &GetDataProtectionPolicyInput{} } - output = &DescribeQueriesOutput{} + output = &GetDataProtectionPolicyOutput{} req = c.newRequest(op, input, output) return } -// DescribeQueries API operation for Amazon CloudWatch Logs. +// GetDataProtectionPolicy API operation for Amazon CloudWatch Logs. // -// Returns a list of CloudWatch Logs Insights queries that are scheduled, running, -// or have been run recently in this account. You can request all queries or -// limit it to queries of a specific log group or queries with a certain status. +// Returns information about a log group data protection policy. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeQueries for usage and error information. +// API operation GetDataProtectionPolicy for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries -func (c *CloudWatchLogs) DescribeQueries(input *DescribeQueriesInput) (*DescribeQueriesOutput, error) { - req, out := c.DescribeQueriesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDataProtectionPolicy +func (c *CloudWatchLogs) GetDataProtectionPolicy(input *GetDataProtectionPolicyInput) (*GetDataProtectionPolicyOutput, error) { + req, out := c.GetDataProtectionPolicyRequest(input) return out, req.Send() } -// DescribeQueriesWithContext is the same as DescribeQueries with the addition of +// GetDataProtectionPolicyWithContext is the same as GetDataProtectionPolicy with the addition of // the ability to pass a context and additional request options. // -// See DescribeQueries for details on how to use this API operation. +// See GetDataProtectionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *DescribeQueriesInput, opts ...request.Option) (*DescribeQueriesOutput, error) { - req, out := c.DescribeQueriesRequest(input) +func (c *CloudWatchLogs) GetDataProtectionPolicyWithContext(ctx aws.Context, input *GetDataProtectionPolicyInput, opts ...request.Option) (*GetDataProtectionPolicyOutput, error) { + req, out := c.GetDataProtectionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeQueryDefinitions = "DescribeQueryDefinitions" +const opGetLogEvents = "GetLogEvents" -// DescribeQueryDefinitionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeQueryDefinitions operation. The "output" return +// GetLogEventsRequest generates a "aws/request.Request" representing the +// client's request for the GetLogEvents operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeQueryDefinitions for more information on using the DescribeQueryDefinitions +// See GetLogEvents for more information on using the GetLogEvents // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeQueryDefinitionsRequest method. -// req, resp := client.DescribeQueryDefinitionsRequest(params) +// // Example sending a request using the GetLogEventsRequest method. +// req, resp := client.GetLogEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions -func (c *CloudWatchLogs) DescribeQueryDefinitionsRequest(input *DescribeQueryDefinitionsInput) (req *request.Request, output *DescribeQueryDefinitionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents +func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) { op := &request.Operation{ - Name: opDescribeQueryDefinitions, + Name: opGetLogEvents, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextForwardToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &DescribeQueryDefinitionsInput{} + input = &GetLogEventsInput{} } - output = &DescribeQueryDefinitionsOutput{} + output = &GetLogEventsOutput{} req = c.newRequest(op, input, output) return } -// DescribeQueryDefinitions API operation for Amazon CloudWatch Logs. +// GetLogEvents API operation for Amazon CloudWatch Logs. // -// This operation returns a paginated list of your saved CloudWatch Logs Insights -// query definitions. +// Lists log events from the specified log stream. You can list all of the log +// events or filter using a time range. // -// You can use the queryDefinitionNamePrefix parameter to limit the results -// to only the query definitions that have names that start with a certain string. +// 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. +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// +// You can specify the log group to search by using either logGroupIdentifier +// or logGroupName. You must include one of these two parameters, but you can't +// include both. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeQueryDefinitions for usage and error information. +// API operation GetLogEvents for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - ResourceNotFoundException +// The specified resource does not exist. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions -func (c *CloudWatchLogs) DescribeQueryDefinitions(input *DescribeQueryDefinitionsInput) (*DescribeQueryDefinitionsOutput, error) { - req, out := c.DescribeQueryDefinitionsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents +func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) { + req, out := c.GetLogEventsRequest(input) return out, req.Send() } -// DescribeQueryDefinitionsWithContext is the same as DescribeQueryDefinitions with the addition of +// GetLogEventsWithContext is the same as GetLogEvents with the addition of // the ability to pass a context and additional request options. // -// See DescribeQueryDefinitions for details on how to use this API operation. +// See GetLogEvents for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeQueryDefinitionsWithContext(ctx aws.Context, input *DescribeQueryDefinitionsInput, opts ...request.Option) (*DescribeQueryDefinitionsOutput, error) { - req, out := c.DescribeQueryDefinitionsRequest(input) +func (c *CloudWatchLogs) GetLogEventsWithContext(ctx aws.Context, input *GetLogEventsInput, opts ...request.Option) (*GetLogEventsOutput, error) { + req, out := c.GetLogEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeResourcePolicies = "DescribeResourcePolicies" +// GetLogEventsPages iterates over the pages of a GetLogEvents operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetLogEvents method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetLogEvents operation. +// pageNum := 0 +// err := client.GetLogEventsPages(params, +// func(page *cloudwatchlogs.GetLogEventsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool) error { + return c.GetLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeResourcePolicies operation. The "output" return +// GetLogEventsPagesWithContext same as GetLogEventsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + EndPageOnSameToken: true, + NewRequest: func() (*request.Request, error) { + var inCpy *GetLogEventsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetLogEventsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opGetLogGroupFields = "GetLogGroupFields" + +// GetLogGroupFieldsRequest generates a "aws/request.Request" representing the +// client's request for the GetLogGroupFields operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeResourcePolicies for more information on using the DescribeResourcePolicies +// See GetLogGroupFields for more information on using the GetLogGroupFields // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeResourcePoliciesRequest method. -// req, resp := client.DescribeResourcePoliciesRequest(params) +// // Example sending a request using the GetLogGroupFieldsRequest method. +// req, resp := client.GetLogGroupFieldsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies -func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResourcePoliciesInput) (req *request.Request, output *DescribeResourcePoliciesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields +func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) (req *request.Request, output *GetLogGroupFieldsOutput) { op := &request.Operation{ - Name: opDescribeResourcePolicies, + Name: opGetLogGroupFields, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeResourcePoliciesInput{} + input = &GetLogGroupFieldsInput{} } - output = &DescribeResourcePoliciesOutput{} + output = &GetLogGroupFieldsOutput{} req = c.newRequest(op, input, output) return } -// DescribeResourcePolicies API operation for Amazon CloudWatch Logs. +// GetLogGroupFields API operation for Amazon CloudWatch Logs. // -// Lists the resource policies in this account. +// Returns a list of the fields that are included in log events in the specified +// log group. Includes the percentage of log events that contain each field. +// The search is limited to a time period that you specify. +// +// You can specify the log group to search by using either logGroupIdentifier +// or logGroupName. You must specify one of these parameters, but you can't +// specify both. +// +// In the results, fields that start with @ are fields generated by CloudWatch +// Logs. For example, @timestamp is the timestamp of each log event. For more +// information about the fields that are generated by CloudWatch logs, see Supported +// Logs and Discovered Fields (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html). +// +// The response results are sorted by the frequency percentage, starting with +// the highest percentage. +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeResourcePolicies for usage and error information. +// API operation GetLogGroupFields for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies -func (c *CloudWatchLogs) DescribeResourcePolicies(input *DescribeResourcePoliciesInput) (*DescribeResourcePoliciesOutput, error) { - req, out := c.DescribeResourcePoliciesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields +func (c *CloudWatchLogs) GetLogGroupFields(input *GetLogGroupFieldsInput) (*GetLogGroupFieldsOutput, error) { + req, out := c.GetLogGroupFieldsRequest(input) return out, req.Send() } -// DescribeResourcePoliciesWithContext is the same as DescribeResourcePolicies with the addition of +// GetLogGroupFieldsWithContext is the same as GetLogGroupFields with the addition of // the ability to pass a context and additional request options. // -// See DescribeResourcePolicies for details on how to use this API operation. +// See GetLogGroupFields for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeResourcePoliciesWithContext(ctx aws.Context, input *DescribeResourcePoliciesInput, opts ...request.Option) (*DescribeResourcePoliciesOutput, error) { - req, out := c.DescribeResourcePoliciesRequest(input) +func (c *CloudWatchLogs) GetLogGroupFieldsWithContext(ctx aws.Context, input *GetLogGroupFieldsInput, opts ...request.Option) (*GetLogGroupFieldsOutput, error) { + req, out := c.GetLogGroupFieldsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" +const opGetLogRecord = "GetLogRecord" -// DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSubscriptionFilters operation. The "output" return +// GetLogRecordRequest generates a "aws/request.Request" representing the +// client's request for the GetLogRecord operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeSubscriptionFilters for more information on using the DescribeSubscriptionFilters +// See GetLogRecord for more information on using the GetLogRecord // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeSubscriptionFiltersRequest method. -// req, resp := client.DescribeSubscriptionFiltersRequest(params) +// // Example sending a request using the GetLogRecordRequest method. +// req, resp := client.GetLogRecordRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters -func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord +func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *request.Request, output *GetLogRecordOutput) { op := &request.Operation{ - Name: opDescribeSubscriptionFilters, + Name: opGetLogRecord, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &DescribeSubscriptionFiltersInput{} + input = &GetLogRecordInput{} } - output = &DescribeSubscriptionFiltersOutput{} + output = &GetLogRecordOutput{} req = c.newRequest(op, input, output) return } -// DescribeSubscriptionFilters API operation for Amazon CloudWatch Logs. +// GetLogRecord API operation for Amazon CloudWatch Logs. // -// Lists the subscription filters for the specified log group. You can list -// all the subscription filters or filter the results by prefix. The results -// are ASCII-sorted by filter name. +// Retrieves all of the fields and values of a single log event. All fields +// are retrieved, even if the original query that produced the logRecordPointer +// retrieved only a subset of fields. Fields are returned as field name/field +// value pairs. +// +// The full unparsed log event is returned within @message. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeSubscriptionFilters for usage and error information. +// API operation GetLogRecord for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters -func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) { - req, out := c.DescribeSubscriptionFiltersRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord +func (c *CloudWatchLogs) GetLogRecord(input *GetLogRecordInput) (*GetLogRecordOutput, error) { + req, out := c.GetLogRecordRequest(input) return out, req.Send() } -// DescribeSubscriptionFiltersWithContext is the same as DescribeSubscriptionFilters with the addition of +// GetLogRecordWithContext is the same as GetLogRecord with the addition of // the ability to pass a context and additional request options. // -// See DescribeSubscriptionFilters for details on how to use this API operation. +// See GetLogRecord for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeSubscriptionFiltersWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, opts ...request.Option) (*DescribeSubscriptionFiltersOutput, error) { - req, out := c.DescribeSubscriptionFiltersRequest(input) +func (c *CloudWatchLogs) GetLogRecordWithContext(ctx aws.Context, input *GetLogRecordInput, opts ...request.Option) (*GetLogRecordOutput, error) { + req, out := c.GetLogRecordRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeSubscriptionFiltersPages iterates over the pages of a DescribeSubscriptionFilters operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. +const opGetQueryResults = "GetQueryResults" + +// GetQueryResultsRequest generates a "aws/request.Request" representing the +// client's request for the GetQueryResults operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. // -// See DescribeSubscriptionFilters method for more information on how to use this operation. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// Note: This operation can generate multiple requests to a service. +// See GetQueryResults for more information on using the GetQueryResults +// API call, and error handling. // -// // Example iterating over at most 3 pages of a DescribeSubscriptionFilters operation. -// pageNum := 0 -// err := client.DescribeSubscriptionFiltersPages(params, -// func(page *cloudwatchlogs.DescribeSubscriptionFiltersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool) error { - return c.DescribeSubscriptionFiltersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeSubscriptionFiltersPagesWithContext same as DescribeSubscriptionFiltersPages except -// it takes a Context and allows setting request options on the pages. +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeSubscriptionFiltersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeSubscriptionFiltersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDisassociateKmsKey = "DisassociateKmsKey" - -// DisassociateKmsKeyRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateKmsKey operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateKmsKey for more information on using the DisassociateKmsKey -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DisassociateKmsKeyRequest method. -// req, resp := client.DisassociateKmsKeyRequest(params) +// // Example sending a request using the GetQueryResultsRequest method. +// req, resp := client.GetQueryResultsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey -func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInput) (req *request.Request, output *DisassociateKmsKeyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults +func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { op := &request.Operation{ - Name: opDisassociateKmsKey, + Name: opGetQueryResults, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DisassociateKmsKeyInput{} + input = &GetQueryResultsInput{} } - output = &DisassociateKmsKeyOutput{} + output = &GetQueryResultsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DisassociateKmsKey API operation for Amazon CloudWatch Logs. +// GetQueryResults API operation for Amazon CloudWatch Logs. // -// Disassociates the specified KMS key from the specified log group or from -// all CloudWatch Logs Insights query results in the account. +// Returns the results from the specified query. // -// When you use DisassociateKmsKey, you specify either the logGroupName parameter -// or the resourceIdentifier parameter. You can't specify both of those parameters -// in the same operation. +// Only the fields requested in the query are returned, along with a @ptr field, +// which is the identifier for the log record. You can use the value of @ptr +// in a GetLogRecord (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html) +// operation to get the full log record. // -// - Specify the logGroupName parameter to stop using the KMS key to encrypt -// future log events ingested and stored in the log group. Instead, they -// will be encrypted with the default CloudWatch Logs method. The log events -// that were ingested while the key was associated with the log group are -// still encrypted with that key. Therefore, CloudWatch Logs will need permissions -// for the key whenever that data is accessed. +// GetQueryResults does not start running a query. To run a query, use StartQuery +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html). +// For more information about how long results of previous queries are available, +// see CloudWatch Logs quotas (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html). // -// - Specify the resourceIdentifier parameter with the query-result resource -// to stop using the KMS key to encrypt the results of all future StartQuery -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) -// operations in the account. They will instead be encrypted with the default -// CloudWatch Logs method. The results from queries that ran while the key -// was associated with the account are still encrypted with that key. Therefore, -// CloudWatch Logs will need permissions for the key whenever that data is -// accessed. +// If the value of the Status field in the output is Running, this operation +// returns only partial results. If you see a value of Scheduled or Running +// for the status, you can retry the operation later to see the final results. // -// It can take up to 5 minutes for this operation to take effect. +// If you are using CloudWatch cross-account observability, you can use this +// operation in a monitoring account to start queries in linked source accounts. +// For more information, see CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DisassociateKmsKey for usage and error information. +// API operation GetQueryResults for usage and error information. // // Returned Error Types: // @@ -3689,114 +3454,83 @@ func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInpu // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey -func (c *CloudWatchLogs) DisassociateKmsKey(input *DisassociateKmsKeyInput) (*DisassociateKmsKeyOutput, error) { - req, out := c.DisassociateKmsKeyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults +func (c *CloudWatchLogs) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { + req, out := c.GetQueryResultsRequest(input) return out, req.Send() } -// DisassociateKmsKeyWithContext is the same as DisassociateKmsKey with the addition of +// GetQueryResultsWithContext is the same as GetQueryResults with the addition of // the ability to pass a context and additional request options. // -// See DisassociateKmsKey for details on how to use this API operation. +// See GetQueryResults for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DisassociateKmsKeyWithContext(ctx aws.Context, input *DisassociateKmsKeyInput, opts ...request.Option) (*DisassociateKmsKeyOutput, error) { - req, out := c.DisassociateKmsKeyRequest(input) +func (c *CloudWatchLogs) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { + req, out := c.GetQueryResultsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opFilterLogEvents = "FilterLogEvents" +const opListTagsForResource = "ListTagsForResource" -// FilterLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the FilterLogEvents operation. The "output" return +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See FilterLogEvents for more information on using the FilterLogEvents +// See ListTagsForResource for more information on using the ListTagsForResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the FilterLogEventsRequest method. -// req, resp := client.FilterLogEventsRequest(params) +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents -func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResource +func (c *CloudWatchLogs) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { op := &request.Operation{ - Name: opFilterLogEvents, + Name: opListTagsForResource, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &FilterLogEventsInput{} + input = &ListTagsForResourceInput{} } - output = &FilterLogEventsOutput{} + output = &ListTagsForResourceOutput{} req = c.newRequest(op, input, output) return } -// FilterLogEvents API operation for Amazon CloudWatch Logs. -// -// 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. -// -// You must have the logs:FilterLogEvents permission to perform this operation. -// -// You can specify the log group to search by using either logGroupIdentifier -// or logGroupName. You must include one of these two parameters, but you can't -// include both. -// -// 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 specifying the token in a subsequent -// call. This operation can return empty results while there are more log events -// available through the token. -// -// The returned log events are sorted by event timestamp, the timestamp when -// the event was ingested by CloudWatch Logs, and the ID of the PutLogEvents -// request. +// ListTagsForResource API operation for Amazon CloudWatch Logs. // -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// Displays the tags associated with a CloudWatch Logs resource. Currently, +// log groups and destinations support tagging. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation FilterLogEvents for usage and error information. +// API operation ListTagsForResource for usage and error information. // // Returned Error Types: // @@ -3809,853 +3543,869 @@ func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (re // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents -func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) { - req, out := c.FilterLogEventsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResource +func (c *CloudWatchLogs) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) return out, req.Send() } -// FilterLogEventsWithContext is the same as FilterLogEvents with the addition of +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of // the ability to pass a context and additional request options. // -// See FilterLogEvents for details on how to use this API operation. +// See ListTagsForResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) FilterLogEventsWithContext(ctx aws.Context, input *FilterLogEventsInput, opts ...request.Option) (*FilterLogEventsOutput, error) { - req, out := c.FilterLogEventsRequest(input) +func (c *CloudWatchLogs) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// FilterLogEventsPages iterates over the pages of a FilterLogEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See FilterLogEvents method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a FilterLogEvents operation. -// pageNum := 0 -// err := client.FilterLogEventsPages(params, -// func(page *cloudwatchlogs.FilterLogEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool) error { - return c.FilterLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// FilterLogEventsPagesWithContext same as FilterLogEventsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *FilterLogEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.FilterLogEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetDataProtectionPolicy = "GetDataProtectionPolicy" +const opListTagsLogGroup = "ListTagsLogGroup" -// GetDataProtectionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetDataProtectionPolicy operation. The "output" return +// ListTagsLogGroupRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsLogGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetDataProtectionPolicy for more information on using the GetDataProtectionPolicy +// See ListTagsLogGroup for more information on using the ListTagsLogGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetDataProtectionPolicyRequest method. -// req, resp := client.GetDataProtectionPolicyRequest(params) +// // Example sending a request using the ListTagsLogGroupRequest method. +// req, resp := client.ListTagsLogGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDataProtectionPolicy -func (c *CloudWatchLogs) GetDataProtectionPolicyRequest(input *GetDataProtectionPolicyInput) (req *request.Request, output *GetDataProtectionPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup +// +// Deprecated: Please use the generic tagging API ListTagsForResource +func (c *CloudWatchLogs) ListTagsLogGroupRequest(input *ListTagsLogGroupInput) (req *request.Request, output *ListTagsLogGroupOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, ListTagsLogGroup, has been deprecated") + } op := &request.Operation{ - Name: opGetDataProtectionPolicy, + Name: opListTagsLogGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDataProtectionPolicyInput{} + input = &ListTagsLogGroupInput{} } - output = &GetDataProtectionPolicyOutput{} + output = &ListTagsLogGroupOutput{} req = c.newRequest(op, input, output) return } -// GetDataProtectionPolicy API operation for Amazon CloudWatch Logs. +// ListTagsLogGroup API operation for Amazon CloudWatch Logs. // -// Returns information about a log group data protection policy. +// The ListTagsLogGroup operation is on the path to deprecation. We recommend +// that you use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html) +// instead. +// +// Lists the tags for the specified log group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetDataProtectionPolicy for usage and error information. +// API operation ListTagsLogGroup for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDataProtectionPolicy -func (c *CloudWatchLogs) GetDataProtectionPolicy(input *GetDataProtectionPolicyInput) (*GetDataProtectionPolicyOutput, error) { - req, out := c.GetDataProtectionPolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup +// +// Deprecated: Please use the generic tagging API ListTagsForResource +func (c *CloudWatchLogs) ListTagsLogGroup(input *ListTagsLogGroupInput) (*ListTagsLogGroupOutput, error) { + req, out := c.ListTagsLogGroupRequest(input) return out, req.Send() } -// GetDataProtectionPolicyWithContext is the same as GetDataProtectionPolicy with the addition of +// ListTagsLogGroupWithContext is the same as ListTagsLogGroup with the addition of // the ability to pass a context and additional request options. // -// See GetDataProtectionPolicy for details on how to use this API operation. +// See ListTagsLogGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetDataProtectionPolicyWithContext(ctx aws.Context, input *GetDataProtectionPolicyInput, opts ...request.Option) (*GetDataProtectionPolicyOutput, error) { - req, out := c.GetDataProtectionPolicyRequest(input) +// +// Deprecated: Please use the generic tagging API ListTagsForResource +func (c *CloudWatchLogs) ListTagsLogGroupWithContext(ctx aws.Context, input *ListTagsLogGroupInput, opts ...request.Option) (*ListTagsLogGroupOutput, error) { + req, out := c.ListTagsLogGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDelivery = "GetDelivery" +const opPutAccountPolicy = "PutAccountPolicy" -// GetDeliveryRequest generates a "aws/request.Request" representing the -// client's request for the GetDelivery operation. The "output" return +// PutAccountPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutAccountPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetDelivery for more information on using the GetDelivery +// See PutAccountPolicy for more information on using the PutAccountPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetDeliveryRequest method. -// req, resp := client.GetDeliveryRequest(params) +// // Example sending a request using the PutAccountPolicyRequest method. +// req, resp := client.PutAccountPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDelivery -func (c *CloudWatchLogs) GetDeliveryRequest(input *GetDeliveryInput) (req *request.Request, output *GetDeliveryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutAccountPolicy +func (c *CloudWatchLogs) PutAccountPolicyRequest(input *PutAccountPolicyInput) (req *request.Request, output *PutAccountPolicyOutput) { op := &request.Operation{ - Name: opGetDelivery, + Name: opPutAccountPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDeliveryInput{} + input = &PutAccountPolicyInput{} } - output = &GetDeliveryOutput{} + output = &PutAccountPolicyOutput{} req = c.newRequest(op, input, output) return } -// GetDelivery API operation for Amazon CloudWatch Logs. +// PutAccountPolicy API operation for Amazon CloudWatch Logs. +// +// Creates an account-level data protection policy that applies to all log groups +// in the account. A data protection policy can help safeguard sensitive data +// that's ingested by your log groups by auditing and masking the sensitive +// log data. Each account can have only one account-level policy. +// +// Sensitive data is detected and masked when it is ingested into a log group. +// When you set a data protection policy, log events ingested into the log groups +// before that time are not masked. +// +// If you use PutAccountPolicy to create a data protection policy for your whole +// account, it applies to both existing log groups and all log groups that are +// created later in this account. The account policy is applied to existing +// log groups with eventual consistency. It might take up to 5 minutes before +// sensitive data in existing log groups begins to be masked. +// +// By default, when a user views a log event that includes masked data, the +// sensitive data is replaced by asterisks. A user who has the logs:Unmask permission +// can use a GetLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) +// or FilterLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) +// operation with the unmask parameter set to true to view the unmasked log +// events. Users with the logs:Unmask can also view unmasked data in the CloudWatch +// Logs console by running a CloudWatch Logs Insights query with the unmask +// query command. // -// Returns complete information about one delivery. A delivery is a connection -// between a logical delivery source and a logical delivery destination +// For more information, including a list of types of data that can be audited +// and masked, see Protect sensitive log data with masking (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). +// +// To use the PutAccountPolicy operation, you must be signed on with the logs:PutDataProtectionPolicy +// and logs:PutAccountPolicy permissions. // -// You need to specify the delivery id in this operation. You can find the IDs -// of the deliveries in your account with the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) -// operation. +// The PutAccountPolicy operation applies to all log groups in the account. +// You can also use PutDataProtectionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html) +// to create a data protection policy that applies to just one log group. If +// a log group has its own data protection policy and the account also has an +// account-level data protection policy, then the two policies are cumulative. +// Any sensitive term specified in either policy is masked. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetDelivery for usage and error information. +// API operation PutAccountPolicy for usage and error information. // // Returned Error Types: // -// - ResourceNotFoundException -// The specified resource does not exist. +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. // // - ServiceUnavailableException // The service cannot complete the request. // -// - ValidationException -// One of the parameters for the request is not valid. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. -// -// - ThrottlingException -// The request was throttled because of quota limits. +// - LimitExceededException +// You have reached the maximum number of resources that can be created. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDelivery -func (c *CloudWatchLogs) GetDelivery(input *GetDeliveryInput) (*GetDeliveryOutput, error) { - req, out := c.GetDeliveryRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutAccountPolicy +func (c *CloudWatchLogs) PutAccountPolicy(input *PutAccountPolicyInput) (*PutAccountPolicyOutput, error) { + req, out := c.PutAccountPolicyRequest(input) return out, req.Send() } -// GetDeliveryWithContext is the same as GetDelivery with the addition of +// PutAccountPolicyWithContext is the same as PutAccountPolicy with the addition of // the ability to pass a context and additional request options. // -// See GetDelivery for details on how to use this API operation. +// See PutAccountPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetDeliveryWithContext(ctx aws.Context, input *GetDeliveryInput, opts ...request.Option) (*GetDeliveryOutput, error) { - req, out := c.GetDeliveryRequest(input) +func (c *CloudWatchLogs) PutAccountPolicyWithContext(ctx aws.Context, input *PutAccountPolicyInput, opts ...request.Option) (*PutAccountPolicyOutput, error) { + req, out := c.PutAccountPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDeliveryDestination = "GetDeliveryDestination" +const opPutDataProtectionPolicy = "PutDataProtectionPolicy" -// GetDeliveryDestinationRequest generates a "aws/request.Request" representing the -// client's request for the GetDeliveryDestination operation. The "output" return +// PutDataProtectionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutDataProtectionPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetDeliveryDestination for more information on using the GetDeliveryDestination +// See PutDataProtectionPolicy for more information on using the PutDataProtectionPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetDeliveryDestinationRequest method. -// req, resp := client.GetDeliveryDestinationRequest(params) +// // Example sending a request using the PutDataProtectionPolicyRequest method. +// req, resp := client.PutDataProtectionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliveryDestination -func (c *CloudWatchLogs) GetDeliveryDestinationRequest(input *GetDeliveryDestinationInput) (req *request.Request, output *GetDeliveryDestinationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDataProtectionPolicy +func (c *CloudWatchLogs) PutDataProtectionPolicyRequest(input *PutDataProtectionPolicyInput) (req *request.Request, output *PutDataProtectionPolicyOutput) { op := &request.Operation{ - Name: opGetDeliveryDestination, + Name: opPutDataProtectionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDeliveryDestinationInput{} + input = &PutDataProtectionPolicyInput{} } - output = &GetDeliveryDestinationOutput{} + output = &PutDataProtectionPolicyOutput{} req = c.newRequest(op, input, output) return } -// GetDeliveryDestination API operation for Amazon CloudWatch Logs. +// PutDataProtectionPolicy API operation for Amazon CloudWatch Logs. +// +// Creates a data protection policy for the specified log group. A data protection +// policy can help safeguard sensitive data that's ingested by the log group +// by auditing and masking the sensitive log data. +// +// Sensitive data is detected and masked when it is ingested into the log group. +// When you set a data protection policy, log events ingested into the log group +// before that time are not masked. +// +// By default, when a user views a log event that includes masked data, the +// sensitive data is replaced by asterisks. A user who has the logs:Unmask permission +// can use a GetLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) +// or FilterLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) +// operation with the unmask parameter set to true to view the unmasked log +// events. Users with the logs:Unmask can also view unmasked data in the CloudWatch +// Logs console by running a CloudWatch Logs Insights query with the unmask +// query command. +// +// For more information, including a list of types of data that can be audited +// and masked, see Protect sensitive log data with masking (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). // -// Retrieves complete information about one delivery destination. +// The PutDataProtectionPolicy operation applies to only the specified log group. +// You can also use PutAccountPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html) +// to create an account-level data protection policy that applies to all log +// groups in the account, including both existing log groups and log groups +// that are created level. If a log group has its own data protection policy +// and the account also has an account-level data protection policy, then the +// two policies are cumulative. Any sensitive term specified in either policy +// is masked. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetDeliveryDestination for usage and error information. +// API operation PutDataProtectionPolicy for usage and error information. // // Returned Error Types: // +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// - ValidationException -// One of the parameters for the request is not valid. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. -// -// - ThrottlingException -// The request was throttled because of quota limits. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliveryDestination -func (c *CloudWatchLogs) GetDeliveryDestination(input *GetDeliveryDestinationInput) (*GetDeliveryDestinationOutput, error) { - req, out := c.GetDeliveryDestinationRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDataProtectionPolicy +func (c *CloudWatchLogs) PutDataProtectionPolicy(input *PutDataProtectionPolicyInput) (*PutDataProtectionPolicyOutput, error) { + req, out := c.PutDataProtectionPolicyRequest(input) return out, req.Send() } -// GetDeliveryDestinationWithContext is the same as GetDeliveryDestination with the addition of +// PutDataProtectionPolicyWithContext is the same as PutDataProtectionPolicy with the addition of // the ability to pass a context and additional request options. // -// See GetDeliveryDestination for details on how to use this API operation. +// See PutDataProtectionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetDeliveryDestinationWithContext(ctx aws.Context, input *GetDeliveryDestinationInput, opts ...request.Option) (*GetDeliveryDestinationOutput, error) { - req, out := c.GetDeliveryDestinationRequest(input) +func (c *CloudWatchLogs) PutDataProtectionPolicyWithContext(ctx aws.Context, input *PutDataProtectionPolicyInput, opts ...request.Option) (*PutDataProtectionPolicyOutput, error) { + req, out := c.PutDataProtectionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDeliveryDestinationPolicy = "GetDeliveryDestinationPolicy" +const opPutDestination = "PutDestination" -// GetDeliveryDestinationPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetDeliveryDestinationPolicy operation. The "output" return +// PutDestinationRequest generates a "aws/request.Request" representing the +// client's request for the PutDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetDeliveryDestinationPolicy for more information on using the GetDeliveryDestinationPolicy +// See PutDestination for more information on using the PutDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetDeliveryDestinationPolicyRequest method. -// req, resp := client.GetDeliveryDestinationPolicyRequest(params) +// // Example sending a request using the PutDestinationRequest method. +// req, resp := client.PutDestinationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliveryDestinationPolicy -func (c *CloudWatchLogs) GetDeliveryDestinationPolicyRequest(input *GetDeliveryDestinationPolicyInput) (req *request.Request, output *GetDeliveryDestinationPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination +func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) { op := &request.Operation{ - Name: opGetDeliveryDestinationPolicy, + Name: opPutDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDeliveryDestinationPolicyInput{} + input = &PutDestinationInput{} } - output = &GetDeliveryDestinationPolicyOutput{} + output = &PutDestinationOutput{} req = c.newRequest(op, input, output) return } -// GetDeliveryDestinationPolicy API operation for Amazon CloudWatch Logs. +// PutDestination API operation for Amazon CloudWatch Logs. +// +// Creates or updates a destination. This operation is used only to create destinations +// for cross-account subscriptions. +// +// A destination encapsulates a physical resource (such as an Amazon Kinesis +// stream). With a destination, you can subscribe to a real-time stream of log +// events for a different account, ingested using PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). +// +// Through an access policy, a destination controls what is written to it. By +// default, PutDestination does not set any access policy with the destination, +// which means a cross-account user cannot call PutSubscriptionFilter (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html) +// against this destination. To enable this, the destination owner must call +// PutDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html) +// after PutDestination. // -// Retrieves the delivery destination policy assigned to the delivery destination -// that you specify. For more information about delivery destinations and their -// policies, see PutDeliveryDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html). +// To perform a PutDestination operation, you must also have the iam:PassRole +// permission. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetDeliveryDestinationPolicy for usage and error information. +// API operation PutDestination for usage and error information. // // Returned Error Types: // -// - ServiceUnavailableException -// The service cannot complete the request. +// - InvalidParameterException +// A parameter is specified incorrectly. // -// - ValidationException -// One of the parameters for the request is not valid. +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. // -// - ResourceNotFoundException -// The specified resource does not exist. +// - ServiceUnavailableException +// The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliveryDestinationPolicy -func (c *CloudWatchLogs) GetDeliveryDestinationPolicy(input *GetDeliveryDestinationPolicyInput) (*GetDeliveryDestinationPolicyOutput, error) { - req, out := c.GetDeliveryDestinationPolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination +func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) { + req, out := c.PutDestinationRequest(input) return out, req.Send() } -// GetDeliveryDestinationPolicyWithContext is the same as GetDeliveryDestinationPolicy with the addition of +// PutDestinationWithContext is the same as PutDestination with the addition of // the ability to pass a context and additional request options. // -// See GetDeliveryDestinationPolicy for details on how to use this API operation. +// See PutDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetDeliveryDestinationPolicyWithContext(ctx aws.Context, input *GetDeliveryDestinationPolicyInput, opts ...request.Option) (*GetDeliveryDestinationPolicyOutput, error) { - req, out := c.GetDeliveryDestinationPolicyRequest(input) +func (c *CloudWatchLogs) PutDestinationWithContext(ctx aws.Context, input *PutDestinationInput, opts ...request.Option) (*PutDestinationOutput, error) { + req, out := c.PutDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDeliverySource = "GetDeliverySource" +const opPutDestinationPolicy = "PutDestinationPolicy" -// GetDeliverySourceRequest generates a "aws/request.Request" representing the -// client's request for the GetDeliverySource operation. The "output" return +// PutDestinationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutDestinationPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetDeliverySource for more information on using the GetDeliverySource +// See PutDestinationPolicy for more information on using the PutDestinationPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetDeliverySourceRequest method. -// req, resp := client.GetDeliverySourceRequest(params) +// // Example sending a request using the PutDestinationPolicyRequest method. +// req, resp := client.PutDestinationPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliverySource -func (c *CloudWatchLogs) GetDeliverySourceRequest(input *GetDeliverySourceInput) (req *request.Request, output *GetDeliverySourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy +func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) { op := &request.Operation{ - Name: opGetDeliverySource, + Name: opPutDestinationPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDeliverySourceInput{} + input = &PutDestinationPolicyInput{} } - output = &GetDeliverySourceOutput{} + output = &PutDestinationPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// GetDeliverySource API operation for Amazon CloudWatch Logs. +// PutDestinationPolicy API operation for Amazon CloudWatch Logs. // -// Retrieves complete information about one delivery source. +// Creates or updates an access policy associated with an existing destination. +// An access policy is an IAM policy document (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html) +// that is used to authorize claims to register a subscription filter against +// a given destination. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetDeliverySource for usage and error information. +// API operation PutDestinationPolicy for usage and error information. // // Returned Error Types: // -// - ResourceNotFoundException -// The specified resource does not exist. +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. // // - ServiceUnavailableException // The service cannot complete the request. // -// - ValidationException -// One of the parameters for the request is not valid. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. -// -// - ThrottlingException -// The request was throttled because of quota limits. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliverySource -func (c *CloudWatchLogs) GetDeliverySource(input *GetDeliverySourceInput) (*GetDeliverySourceOutput, error) { - req, out := c.GetDeliverySourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy +func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) { + req, out := c.PutDestinationPolicyRequest(input) return out, req.Send() } -// GetDeliverySourceWithContext is the same as GetDeliverySource with the addition of +// PutDestinationPolicyWithContext is the same as PutDestinationPolicy with the addition of // the ability to pass a context and additional request options. // -// See GetDeliverySource for details on how to use this API operation. +// See PutDestinationPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetDeliverySourceWithContext(ctx aws.Context, input *GetDeliverySourceInput, opts ...request.Option) (*GetDeliverySourceOutput, error) { - req, out := c.GetDeliverySourceRequest(input) +func (c *CloudWatchLogs) PutDestinationPolicyWithContext(ctx aws.Context, input *PutDestinationPolicyInput, opts ...request.Option) (*PutDestinationPolicyOutput, error) { + req, out := c.PutDestinationPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetLogEvents = "GetLogEvents" +const opPutLogEvents = "PutLogEvents" -// GetLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the GetLogEvents operation. The "output" return +// PutLogEventsRequest generates a "aws/request.Request" representing the +// client's request for the PutLogEvents operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetLogEvents for more information on using the GetLogEvents +// See PutLogEvents for more information on using the PutLogEvents // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetLogEventsRequest method. -// req, resp := client.GetLogEventsRequest(params) +// // Example sending a request using the PutLogEventsRequest method. +// req, resp := client.PutLogEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents -func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents +func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) { op := &request.Operation{ - Name: opGetLogEvents, + Name: opPutLogEvents, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextForwardToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &GetLogEventsInput{} + input = &PutLogEventsInput{} } - output = &GetLogEventsOutput{} + output = &PutLogEventsOutput{} req = c.newRequest(op, input, output) return } -// GetLogEvents API operation for Amazon CloudWatch Logs. +// PutLogEvents API operation for Amazon CloudWatch Logs. // -// Lists log events from the specified log stream. You can list all of the log -// events or filter using a time range. +// Uploads a batch of log events to the specified log stream. // -// 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. +// The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions +// are always accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException +// even if the sequence token is not valid. You can use parallel PutLogEvents +// actions on the same log stream. // -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// The batch of events must satisfy the following constraints: // -// You can specify the log group to search by using either logGroupIdentifier -// or logGroupName. You must include one of these two parameters, but you can't -// include both. +// - The maximum batch size is 1,048,576 bytes. This size is calculated as +// the sum of all event messages in UTF-8, plus 26 bytes for each log event. +// +// - None of the log events in the batch can be more than 2 hours in the +// future. +// +// - None of the log events in the batch can be more than 14 days in the +// past. Also, none of the log events can be from earlier than the retention +// period of the log group. +// +// - The log events in the batch must be in chronological order by their +// timestamp. The timestamp is the time that the event occurred, expressed +// as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In Amazon +// Web Services Tools for PowerShell and the Amazon Web Services SDK for +// .NET, the timestamp is specified in .NET format: yyyy-mm-ddThh:mm:ss. +// For example, 2017-09-15T13:45:30.) +// +// - A batch of log events in a single request cannot span more than 24 hours. +// Otherwise, the operation fails. +// +// - Each log event can be no larger than 256 KB. +// +// - The maximum number of log events in a batch is 10,000. +// +// - The quota of five requests per second per log stream has been removed. +// Instead, PutLogEvents 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. +// +// If a call to PutLogEvents returns "UnrecognizedClientException" the most +// likely cause is a non-valid Amazon Web Services access key ID or secret key. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetLogEvents for usage and error information. +// API operation PutLogEvents for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - InvalidSequenceTokenException +// The sequence token is not valid. You can get the correct sequence token in +// the expectedSequenceToken field in the InvalidSequenceTokenException message. +// +// PutLogEvents actions are now always accepted and never return InvalidSequenceTokenException +// regardless of receiving an invalid sequence token. +// +// - DataAlreadyAcceptedException +// The event was already logged. +// +// PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException +// regardless of whether a given batch of log events has already been accepted. +// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents -func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) { - req, out := c.GetLogEventsRequest(input) +// - UnrecognizedClientException +// The most likely cause is an Amazon Web Services access key ID or secret key +// that's not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents +func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) { + req, out := c.PutLogEventsRequest(input) return out, req.Send() } -// GetLogEventsWithContext is the same as GetLogEvents with the addition of +// PutLogEventsWithContext is the same as PutLogEvents with the addition of // the ability to pass a context and additional request options. // -// See GetLogEvents for details on how to use this API operation. +// See PutLogEvents for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetLogEventsWithContext(ctx aws.Context, input *GetLogEventsInput, opts ...request.Option) (*GetLogEventsOutput, error) { - req, out := c.GetLogEventsRequest(input) +func (c *CloudWatchLogs) PutLogEventsWithContext(ctx aws.Context, input *PutLogEventsInput, opts ...request.Option) (*PutLogEventsOutput, error) { + req, out := c.PutLogEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// GetLogEventsPages iterates over the pages of a GetLogEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetLogEvents method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetLogEvents operation. -// pageNum := 0 -// err := client.GetLogEventsPages(params, -// func(page *cloudwatchlogs.GetLogEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool) error { - return c.GetLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetLogEventsPagesWithContext same as GetLogEventsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *GetLogEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetLogEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetLogGroupFields = "GetLogGroupFields" +const opPutMetricFilter = "PutMetricFilter" -// GetLogGroupFieldsRequest generates a "aws/request.Request" representing the -// client's request for the GetLogGroupFields operation. The "output" return +// PutMetricFilterRequest generates a "aws/request.Request" representing the +// client's request for the PutMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetLogGroupFields for more information on using the GetLogGroupFields +// See PutMetricFilter for more information on using the PutMetricFilter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetLogGroupFieldsRequest method. -// req, resp := client.GetLogGroupFieldsRequest(params) +// // Example sending a request using the PutMetricFilterRequest method. +// req, resp := client.PutMetricFilterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields -func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) (req *request.Request, output *GetLogGroupFieldsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter +func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) { op := &request.Operation{ - Name: opGetLogGroupFields, + Name: opPutMetricFilter, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetLogGroupFieldsInput{} + input = &PutMetricFilterInput{} } - output = &GetLogGroupFieldsOutput{} + output = &PutMetricFilterOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// GetLogGroupFields API operation for Amazon CloudWatch Logs. +// PutMetricFilter API operation for Amazon CloudWatch Logs. // -// Returns a list of the fields that are included in log events in the specified -// log group. Includes the percentage of log events that contain each field. -// The search is limited to a time period that you specify. +// Creates or updates a metric filter and associates it with the specified log +// group. With metric filters, you can configure rules to extract metric data +// from log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). // -// You can specify the log group to search by using either logGroupIdentifier -// or logGroupName. You must specify one of these parameters, but you can't -// specify both. +// The maximum number of metric filters that can be associated with a log group +// is 100. // -// In the results, fields that start with @ are fields generated by CloudWatch -// Logs. For example, @timestamp is the timestamp of each log event. For more -// information about the fields that are generated by CloudWatch logs, see Supported -// Logs and Discovered Fields (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html). +// When you create a metric filter, you can also optionally assign a unit and +// dimensions to the metric that is created. // -// The response results are sorted by the frequency percentage, starting with -// the highest percentage. +// Metrics extracted from log events are charged as custom metrics. To prevent +// unexpected high charges, do not specify high-cardinality fields such as IPAddress +// or requestID as dimensions. Each different value found for a dimension is +// treated as a separate metric and accrues charges as a separate custom metric. // -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// CloudWatch Logs might disable a metric filter if it generates 1,000 different +// name/value pairs for your specified dimensions within one hour. +// +// You can also set up a billing alarm to alert you if your charges are higher +// than expected. For more information, see Creating a Billing Alarm to Monitor +// Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetLogGroupFields for usage and error information. +// API operation PutMetricFilter for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields -func (c *CloudWatchLogs) GetLogGroupFields(input *GetLogGroupFieldsInput) (*GetLogGroupFieldsOutput, error) { - req, out := c.GetLogGroupFieldsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter +func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) { + req, out := c.PutMetricFilterRequest(input) return out, req.Send() } -// GetLogGroupFieldsWithContext is the same as GetLogGroupFields with the addition of +// PutMetricFilterWithContext is the same as PutMetricFilter with the addition of // the ability to pass a context and additional request options. // -// See GetLogGroupFields for details on how to use this API operation. +// See PutMetricFilter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetLogGroupFieldsWithContext(ctx aws.Context, input *GetLogGroupFieldsInput, opts ...request.Option) (*GetLogGroupFieldsOutput, error) { - req, out := c.GetLogGroupFieldsRequest(input) +func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutMetricFilterInput, opts ...request.Option) (*PutMetricFilterOutput, error) { + req, out := c.PutMetricFilterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetLogRecord = "GetLogRecord" +const opPutQueryDefinition = "PutQueryDefinition" -// GetLogRecordRequest generates a "aws/request.Request" representing the -// client's request for the GetLogRecord operation. The "output" return +// PutQueryDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the PutQueryDefinition operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetLogRecord for more information on using the GetLogRecord +// See PutQueryDefinition for more information on using the PutQueryDefinition // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetLogRecordRequest method. -// req, resp := client.GetLogRecordRequest(params) +// // Example sending a request using the PutQueryDefinitionRequest method. +// req, resp := client.PutQueryDefinitionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord -func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *request.Request, output *GetLogRecordOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition +func (c *CloudWatchLogs) PutQueryDefinitionRequest(input *PutQueryDefinitionInput) (req *request.Request, output *PutQueryDefinitionOutput) { op := &request.Operation{ - Name: opGetLogRecord, + Name: opPutQueryDefinition, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetLogRecordInput{} + input = &PutQueryDefinitionInput{} } - output = &GetLogRecordOutput{} + output = &PutQueryDefinitionOutput{} req = c.newRequest(op, input, output) return } -// GetLogRecord API operation for Amazon CloudWatch Logs. +// PutQueryDefinition API operation for Amazon CloudWatch Logs. // -// Retrieves all of the fields and values of a single log event. All fields -// are retrieved, even if the original query that produced the logRecordPointer -// retrieved only a subset of fields. Fields are returned as field name/field -// value pairs. +// Creates or updates a query definition for CloudWatch Logs Insights. For more +// information, see Analyzing Log Data with CloudWatch Logs Insights (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). // -// The full unparsed log event is returned within @message. +// To update a query definition, specify its queryDefinitionId in your request. +// The values of name, queryString, and logGroupNames are changed to the values +// that you specify in your update operation. No current values are retained +// from the current query definition. For example, imagine updating a current +// query definition that includes log groups. If you don't specify the logGroupNames +// parameter in your update operation, the query definition changes to contain +// no log groups. +// +// You must have the logs:PutQueryDefinition permission to be able to perform +// this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetLogRecord for usage and error information. +// API operation PutQueryDefinition for usage and error information. // // Returned Error Types: // @@ -4671,183 +4421,187 @@ func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *req // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord -func (c *CloudWatchLogs) GetLogRecord(input *GetLogRecordInput) (*GetLogRecordOutput, error) { - req, out := c.GetLogRecordRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition +func (c *CloudWatchLogs) PutQueryDefinition(input *PutQueryDefinitionInput) (*PutQueryDefinitionOutput, error) { + req, out := c.PutQueryDefinitionRequest(input) return out, req.Send() } -// GetLogRecordWithContext is the same as GetLogRecord with the addition of +// PutQueryDefinitionWithContext is the same as PutQueryDefinition with the addition of // the ability to pass a context and additional request options. // -// See GetLogRecord for details on how to use this API operation. +// See PutQueryDefinition for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetLogRecordWithContext(ctx aws.Context, input *GetLogRecordInput, opts ...request.Option) (*GetLogRecordOutput, error) { - req, out := c.GetLogRecordRequest(input) +func (c *CloudWatchLogs) PutQueryDefinitionWithContext(ctx aws.Context, input *PutQueryDefinitionInput, opts ...request.Option) (*PutQueryDefinitionOutput, error) { + req, out := c.PutQueryDefinitionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetQueryResults = "GetQueryResults" +const opPutResourcePolicy = "PutResourcePolicy" -// GetQueryResultsRequest generates a "aws/request.Request" representing the -// client's request for the GetQueryResults operation. The "output" return +// PutResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetQueryResults for more information on using the GetQueryResults +// See PutResourcePolicy for more information on using the PutResourcePolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetQueryResultsRequest method. -// req, resp := client.GetQueryResultsRequest(params) +// // Example sending a request using the PutResourcePolicyRequest method. +// req, resp := client.PutResourcePolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults -func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy +func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { op := &request.Operation{ - Name: opGetQueryResults, + Name: opPutResourcePolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetQueryResultsInput{} + input = &PutResourcePolicyInput{} } - output = &GetQueryResultsOutput{} + output = &PutResourcePolicyOutput{} req = c.newRequest(op, input, output) return } -// GetQueryResults API operation for Amazon CloudWatch Logs. -// -// Returns the results from the specified query. -// -// Only the fields requested in the query are returned, along with a @ptr field, -// which is the identifier for the log record. You can use the value of @ptr -// in a GetLogRecord (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html) -// operation to get the full log record. -// -// GetQueryResults does not start running a query. To run a query, use StartQuery -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html). -// For more information about how long results of previous queries are available, -// see CloudWatch Logs quotas (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html). -// -// If the value of the Status field in the output is Running, this operation -// returns only partial results. If you see a value of Scheduled or Running -// for the status, you can retry the operation later to see the final results. +// PutResourcePolicy API operation for Amazon CloudWatch Logs. // -// If you are using CloudWatch cross-account observability, you can use this -// operation in a monitoring account to start queries in linked source accounts. -// For more information, see CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// Creates or updates a resource policy allowing other Amazon Web Services services +// to put log events to this account, such as Amazon Route 53. An account can +// have up to 10 resource policies per Amazon Web Services Region. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetQueryResults for usage and error information. +// API operation PutResourcePolicy for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - ResourceNotFoundException -// The specified resource does not exist. +// - LimitExceededException +// You have reached the maximum number of resources that can be created. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults -func (c *CloudWatchLogs) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { - req, out := c.GetQueryResultsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy +func (c *CloudWatchLogs) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) return out, req.Send() } -// GetQueryResultsWithContext is the same as GetQueryResults with the addition of +// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of // the ability to pass a context and additional request options. // -// See GetQueryResults for details on how to use this API operation. +// See PutResourcePolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { - req, out := c.GetQueryResultsRequest(input) +func (c *CloudWatchLogs) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListTagsForResource = "ListTagsForResource" +const opPutRetentionPolicy = "PutRetentionPolicy" -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return +// PutRetentionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutRetentionPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagsForResource for more information on using the ListTagsForResource +// See PutRetentionPolicy for more information on using the PutRetentionPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the ListTagsForResourceRequest method. -// req, resp := client.ListTagsForResourceRequest(params) +// // Example sending a request using the PutRetentionPolicyRequest method. +// req, resp := client.PutRetentionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResource -func (c *CloudWatchLogs) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy +func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) { op := &request.Operation{ - Name: opListTagsForResource, + Name: opPutRetentionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListTagsForResourceInput{} + input = &PutRetentionPolicyInput{} } - output = &ListTagsForResourceOutput{} + output = &PutRetentionPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// ListTagsForResource API operation for Amazon CloudWatch Logs. +// PutRetentionPolicy API operation for Amazon CloudWatch Logs. // -// Displays the tags associated with a CloudWatch Logs resource. Currently, -// log groups and destinations support tagging. +// Sets the retention of the specified log group. With a retention policy, you +// can configure the number of days for which to retain log events in the specified +// log group. +// +// CloudWatch Logs doesn’t immediately delete log events when they reach their +// retention setting. It typically takes up to 72 hours after that before log +// events are deleted, but in rare situations might take longer. +// +// To illustrate, imagine that you change a log group to have a longer retention +// setting when it contains log events that are past the expiration date, but +// haven’t been deleted. Those log events will take up to 72 hours to be deleted +// after the new retention date is reached. To make sure that log data is deleted +// permanently, keep a log group at its lower retention setting until 72 hours +// after the previous retention period ends. Alternatively, wait to change the +// retention setting until you confirm that the earlier log events are deleted. +// +// When log events reach their retention setting they are marked for deletion. +// After they are marked for deletion, they do not add to your archival storage +// costs anymore, even if they are not actually deleted until later. These log +// events marked for deletion are also not included when you use an API to retrieve +// the storedBytes value to see how many bytes a log group is storing. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation ListTagsForResource for usage and error information. +// API operation PutRetentionPolicy for usage and error information. // // Returned Error Types: // @@ -4857,3664 +4611,1141 @@ func (c *CloudWatchLogs) ListTagsForResourceRequest(input *ListTagsForResourceIn // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResource -func (c *CloudWatchLogs) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy +func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) { + req, out := c.PutRetentionPolicyRequest(input) return out, req.Send() } -// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// PutRetentionPolicyWithContext is the same as PutRetentionPolicy with the addition of // the ability to pass a context and additional request options. // -// See ListTagsForResource for details on how to use this API operation. +// See PutRetentionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +func (c *CloudWatchLogs) PutRetentionPolicyWithContext(ctx aws.Context, input *PutRetentionPolicyInput, opts ...request.Option) (*PutRetentionPolicyOutput, error) { + req, out := c.PutRetentionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListTagsLogGroup = "ListTagsLogGroup" +const opPutSubscriptionFilter = "PutSubscriptionFilter" -// ListTagsLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsLogGroup operation. The "output" return +// PutSubscriptionFilterRequest generates a "aws/request.Request" representing the +// client's request for the PutSubscriptionFilter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagsLogGroup for more information on using the ListTagsLogGroup +// See PutSubscriptionFilter for more information on using the PutSubscriptionFilter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the ListTagsLogGroupRequest method. -// req, resp := client.ListTagsLogGroupRequest(params) +// // Example sending a request using the PutSubscriptionFilterRequest method. +// req, resp := client.PutSubscriptionFilterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup -// -// Deprecated: Please use the generic tagging API ListTagsForResource -func (c *CloudWatchLogs) ListTagsLogGroupRequest(input *ListTagsLogGroupInput) (req *request.Request, output *ListTagsLogGroupOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, ListTagsLogGroup, has been deprecated") - } +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter +func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) { op := &request.Operation{ - Name: opListTagsLogGroup, + Name: opPutSubscriptionFilter, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListTagsLogGroupInput{} + input = &PutSubscriptionFilterInput{} } - output = &ListTagsLogGroupOutput{} + output = &PutSubscriptionFilterOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// ListTagsLogGroup API operation for Amazon CloudWatch Logs. +// PutSubscriptionFilter API operation for Amazon CloudWatch Logs. // -// The ListTagsLogGroup operation is on the path to deprecation. We recommend -// that you use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html) -// instead. +// Creates or updates a subscription filter and associates it with the specified +// log group. With subscription filters, you can subscribe to a real-time stream +// of log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html) +// and have them delivered to a specific destination. When log events are sent +// to the receiving service, they are Base64 encoded and compressed with the +// GZIP format. // -// Lists the tags for the specified log group. +// The following destinations are supported for subscription filters: +// +// - An Amazon Kinesis data stream belonging to the same account as the subscription +// filter, for same-account delivery. +// +// - A logical destination created with PutDestination (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html) +// that belongs to a different account, for cross-account delivery. We currently +// support Kinesis Data Streams and Kinesis Data Firehose as logical destinations. +// +// - An Amazon Kinesis Data Firehose delivery stream that belongs to the +// same account as the subscription filter, for same-account delivery. +// +// - An Lambda function that belongs to the same account as the subscription +// filter, for same-account delivery. +// +// 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 filterName. +// +// To perform a PutSubscriptionFilter operation for any destination except a +// Lambda function, you must also have the iam:PassRole permission. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation ListTagsLogGroup for usage and error information. +// API operation PutSubscriptionFilter for usage and error information. // // Returned Error Types: // +// - InvalidParameterException +// A parameter is specified incorrectly. +// // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup -// -// Deprecated: Please use the generic tagging API ListTagsForResource -func (c *CloudWatchLogs) ListTagsLogGroup(input *ListTagsLogGroupInput) (*ListTagsLogGroupOutput, error) { - req, out := c.ListTagsLogGroupRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter +func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) { + req, out := c.PutSubscriptionFilterRequest(input) return out, req.Send() } -// ListTagsLogGroupWithContext is the same as ListTagsLogGroup with the addition of +// PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of // the ability to pass a context and additional request options. // -// See ListTagsLogGroup for details on how to use this API operation. +// See PutSubscriptionFilter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -// -// Deprecated: Please use the generic tagging API ListTagsForResource -func (c *CloudWatchLogs) ListTagsLogGroupWithContext(ctx aws.Context, input *ListTagsLogGroupInput, opts ...request.Option) (*ListTagsLogGroupOutput, error) { - req, out := c.ListTagsLogGroupRequest(input) +func (c *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) { + req, out := c.PutSubscriptionFilterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutAccountPolicy = "PutAccountPolicy" +const opStartLiveTail = "StartLiveTail" -// PutAccountPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutAccountPolicy operation. The "output" return +// StartLiveTailRequest generates a "aws/request.Request" representing the +// client's request for the StartLiveTail operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutAccountPolicy for more information on using the PutAccountPolicy +// See StartLiveTail for more information on using the StartLiveTail // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutAccountPolicyRequest method. -// req, resp := client.PutAccountPolicyRequest(params) +// // Example sending a request using the StartLiveTailRequest method. +// req, resp := client.StartLiveTailRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutAccountPolicy -func (c *CloudWatchLogs) PutAccountPolicyRequest(input *PutAccountPolicyInput) (req *request.Request, output *PutAccountPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartLiveTail +func (c *CloudWatchLogs) StartLiveTailRequest(input *StartLiveTailInput) (req *request.Request, output *StartLiveTailOutput) { op := &request.Operation{ - Name: opPutAccountPolicy, + Name: opStartLiveTail, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutAccountPolicyInput{} + input = &StartLiveTailInput{} } - output = &PutAccountPolicyOutput{} + output = &StartLiveTailOutput{} req = c.newRequest(op, input, output) + + es := NewStartLiveTailEventStream() + output.eventStream = es + + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, rest.UnmarshalHandler) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + es.output = output + req.Handlers.Unmarshal.PushBack(es.recvInitialEvent) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) + req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("streaming-", nil)) + req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) return } -// PutAccountPolicy API operation for Amazon CloudWatch Logs. -// -// Creates an account-level data protection policy that applies to all log groups -// in the account. A data protection policy can help safeguard sensitive data -// that's ingested by your log groups by auditing and masking the sensitive -// log data. Each account can have only one account-level policy. -// -// Sensitive data is detected and masked when it is ingested into a log group. -// When you set a data protection policy, log events ingested into the log groups -// before that time are not masked. -// -// If you use PutAccountPolicy to create a data protection policy for your whole -// account, it applies to both existing log groups and all log groups that are -// created later in this account. The account policy is applied to existing -// log groups with eventual consistency. It might take up to 5 minutes before -// sensitive data in existing log groups begins to be masked. -// -// By default, when a user views a log event that includes masked data, the -// sensitive data is replaced by asterisks. A user who has the logs:Unmask permission -// can use a GetLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) -// or FilterLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) -// operation with the unmask parameter set to true to view the unmasked log -// events. Users with the logs:Unmask can also view unmasked data in the CloudWatch -// Logs console by running a CloudWatch Logs Insights query with the unmask -// query command. -// -// For more information, including a list of types of data that can be audited -// and masked, see Protect sensitive log data with masking (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). -// -// To use the PutAccountPolicy operation, you must be signed on with the logs:PutDataProtectionPolicy -// and logs:PutAccountPolicy permissions. -// -// The PutAccountPolicy operation applies to all log groups in the account. -// You can also use PutDataProtectionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html) -// to create a data protection policy that applies to just one log group. If -// a log group has its own data protection policy and the account also has an -// account-level data protection policy, then the two policies are cumulative. -// Any sensitive term specified in either policy is masked. +// StartLiveTail API operation for Amazon CloudWatch Logs. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutAccountPolicy for usage and error information. +// API operation StartLiveTail for usage and error information. // // Returned Error Types: // +// - AccessDeniedException +// You don't have sufficient permissions to perform this action. +// // - InvalidParameterException // A parameter is specified incorrectly. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// -// - ServiceUnavailableException -// The service cannot complete the request. +// - ResourceNotFoundException +// The specified resource does not exist. // // - LimitExceededException // You have reached the maximum number of resources that can be created. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutAccountPolicy -func (c *CloudWatchLogs) PutAccountPolicy(input *PutAccountPolicyInput) (*PutAccountPolicyOutput, error) { - req, out := c.PutAccountPolicyRequest(input) +// - InvalidOperationException +// The operation is not valid on the specified resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartLiveTail +func (c *CloudWatchLogs) StartLiveTail(input *StartLiveTailInput) (*StartLiveTailOutput, error) { + req, out := c.StartLiveTailRequest(input) return out, req.Send() } -// PutAccountPolicyWithContext is the same as PutAccountPolicy with the addition of +// StartLiveTailWithContext is the same as StartLiveTail with the addition of // the ability to pass a context and additional request options. // -// See PutAccountPolicy for details on how to use this API operation. +// See StartLiveTail for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutAccountPolicyWithContext(ctx aws.Context, input *PutAccountPolicyInput, opts ...request.Option) (*PutAccountPolicyOutput, error) { - req, out := c.PutAccountPolicyRequest(input) +func (c *CloudWatchLogs) StartLiveTailWithContext(ctx aws.Context, input *StartLiveTailInput, opts ...request.Option) (*StartLiveTailOutput, error) { + req, out := c.StartLiveTailRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutDataProtectionPolicy = "PutDataProtectionPolicy" +var _ awserr.Error +var _ time.Time -// PutDataProtectionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutDataProtectionPolicy operation. The "output" return +// StartLiveTailEventStream provides the event stream handling for the StartLiveTail. +// +// For testing and mocking the event stream this type should be initialized via +// the NewStartLiveTailEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type StartLiveTailEventStream struct { + + // Reader is the EventStream reader for the StartLiveTailResponseStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader StartLiveTailResponseStreamReader + + outputReader io.ReadCloser + output *StartLiveTailOutput + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +// NewStartLiveTailEventStream initializes an StartLiveTailEventStream. +// This function should only be used for testing and mocking the StartLiveTailEventStream +// stream within your application. +// +// The Reader member must be set before reading events from the stream. +// +// es := NewStartLiveTailEventStream(func(o *StartLiveTailEventStream){ +// es.Reader = myMockStreamReader +// }) +func NewStartLiveTailEventStream(opts ...func(*StartLiveTailEventStream)) *StartLiveTailEventStream { + es := &StartLiveTailEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } + + for _, fn := range opts { + fn(es) + } + + return es +} + +func (es *StartLiveTailEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *StartLiveTailEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +type eventTypeForStartLiveTailEventStreamOutputEvent struct { + unmarshalerForEvent func(string) (eventstreamapi.Unmarshaler, error) + output *StartLiveTailOutput +} + +func (e eventTypeForStartLiveTailEventStreamOutputEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) { + if eventType == "initial-response" { + return e.output, nil + } + return e.unmarshalerForEvent(eventType) +} + +// Events returns a channel to read events from. +// +// These events are: +// +// - LiveTailSessionStart +// - LiveTailSessionUpdate +// - StartLiveTailResponseStreamUnknownEvent +func (es *StartLiveTailEventStream) Events() <-chan StartLiveTailResponseStreamEvent { + return es.Reader.Events() +} + +func (es *StartLiveTailEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + unmarshalerForEvent := unmarshalerForStartLiveTailResponseStreamEvent{ + metadata: protocol.ResponseMetadata{ + StatusCode: r.HTTPResponse.StatusCode, + RequestID: r.RequestID, + }, + }.UnmarshalerForEventName + unmarshalerForEvent = eventTypeForStartLiveTailEventStreamOutputEvent{ + unmarshalerForEvent: unmarshalerForEvent, + output: es.output, + }.UnmarshalerForEventName + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + unmarshalerForEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadStartLiveTailResponseStream(eventReader) +} +func (es *StartLiveTailEventStream) recvInitialEvent(r *request.Request) { + // Wait for the initial response event, which must be the first + // event to be received from the API. + select { + case event, ok := <-es.Events(): + if !ok { + return + } + + v, ok := event.(*StartLiveTailOutput) + if !ok || v == nil { + r.Error = awserr.New( + request.ErrCodeSerialization, + fmt.Sprintf("invalid event, %T, expect %T, %v", + event, (*StartLiveTailOutput)(nil), v), + nil, + ) + return + } + + *es.output = *v + es.output.eventStream = es + } +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +func (es *StartLiveTailEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *StartLiveTailEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *StartLiveTailEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +const opStartQuery = "StartQuery" + +// StartQueryRequest generates a "aws/request.Request" representing the +// client's request for the StartQuery operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutDataProtectionPolicy for more information on using the PutDataProtectionPolicy +// See StartQuery for more information on using the StartQuery // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutDataProtectionPolicyRequest method. -// req, resp := client.PutDataProtectionPolicyRequest(params) +// // Example sending a request using the StartQueryRequest method. +// req, resp := client.StartQueryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDataProtectionPolicy -func (c *CloudWatchLogs) PutDataProtectionPolicyRequest(input *PutDataProtectionPolicyInput) (req *request.Request, output *PutDataProtectionPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery +func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) { op := &request.Operation{ - Name: opPutDataProtectionPolicy, + Name: opStartQuery, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutDataProtectionPolicyInput{} + input = &StartQueryInput{} } - output = &PutDataProtectionPolicyOutput{} + output = &StartQueryOutput{} req = c.newRequest(op, input, output) return } -// PutDataProtectionPolicy API operation for Amazon CloudWatch Logs. +// StartQuery API operation for Amazon CloudWatch Logs. // -// Creates a data protection policy for the specified log group. A data protection -// policy can help safeguard sensitive data that's ingested by the log group -// by auditing and masking the sensitive log data. +// 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. // -// Sensitive data is detected and masked when it is ingested into the log group. -// When you set a data protection policy, log events ingested into the log group -// before that time are not masked. +// For more information, see CloudWatch Logs Insights Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). // -// By default, when a user views a log event that includes masked data, the -// sensitive data is replaced by asterisks. A user who has the logs:Unmask permission -// can use a GetLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) -// or FilterLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) -// operation with the unmask parameter set to true to view the unmasked log -// events. Users with the logs:Unmask can also view unmasked data in the CloudWatch -// Logs console by running a CloudWatch Logs Insights query with the unmask -// query command. +// After you run a query using StartQuery, the query results are stored by CloudWatch +// Logs. You can use GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) +// to retrieve the results of a query, using the queryId that StartQuery returns. // -// For more information, including a list of types of data that can be audited -// and masked, see Protect sensitive log data with masking (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). +// If you have associated a KMS key with the query results in this account, +// then StartQuery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) +// uses that key to encrypt the results when it stores them. If no key is associated +// with query results, the query results are encrypted with the default CloudWatch +// Logs encryption method. // -// The PutDataProtectionPolicy operation applies to only the specified log group. -// You can also use PutAccountPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html) -// to create an account-level data protection policy that applies to all log -// groups in the account, including both existing log groups and log groups -// that are created level. If a log group has its own data protection policy -// and the account also has an account-level data protection policy, then the -// two policies are cumulative. Any sensitive term specified in either policy -// is masked. +// Queries time out after 60 minutes of runtime. If your queries are timing +// out, reduce the time range being searched or partition your query into a +// number of queries. +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// For a cross-account StartQuery operation, the query definition must be defined +// in the monitoring account. +// +// You can have up to 30 concurrent CloudWatch Logs insights queries, including +// queries that have been added to dashboards. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDataProtectionPolicy for usage and error information. +// API operation StartQuery for usage and error information. // // Returned Error Types: // +// - MalformedQueryException +// The query string is not valid. Details about this error are displayed in +// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). +// +// For more information about valid query syntax, see CloudWatch Logs Insights +// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). +// // - InvalidParameterException // A parameter is specified incorrectly. // // - LimitExceededException // You have reached the maximum number of resources that can be created. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDataProtectionPolicy -func (c *CloudWatchLogs) PutDataProtectionPolicy(input *PutDataProtectionPolicyInput) (*PutDataProtectionPolicyOutput, error) { - req, out := c.PutDataProtectionPolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery +func (c *CloudWatchLogs) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) { + req, out := c.StartQueryRequest(input) return out, req.Send() } -// PutDataProtectionPolicyWithContext is the same as PutDataProtectionPolicy with the addition of +// StartQueryWithContext is the same as StartQuery with the addition of // the ability to pass a context and additional request options. // -// See PutDataProtectionPolicy for details on how to use this API operation. +// See StartQuery for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutDataProtectionPolicyWithContext(ctx aws.Context, input *PutDataProtectionPolicyInput, opts ...request.Option) (*PutDataProtectionPolicyOutput, error) { - req, out := c.PutDataProtectionPolicyRequest(input) +func (c *CloudWatchLogs) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) { + req, out := c.StartQueryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutDeliveryDestination = "PutDeliveryDestination" +const opStopQuery = "StopQuery" -// PutDeliveryDestinationRequest generates a "aws/request.Request" representing the -// client's request for the PutDeliveryDestination operation. The "output" return +// StopQueryRequest generates a "aws/request.Request" representing the +// client's request for the StopQuery operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutDeliveryDestination for more information on using the PutDeliveryDestination +// See StopQuery for more information on using the StopQuery // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutDeliveryDestinationRequest method. -// req, resp := client.PutDeliveryDestinationRequest(params) +// // Example sending a request using the StopQueryRequest method. +// req, resp := client.StopQueryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliveryDestination -func (c *CloudWatchLogs) PutDeliveryDestinationRequest(input *PutDeliveryDestinationInput) (req *request.Request, output *PutDeliveryDestinationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery +func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.Request, output *StopQueryOutput) { op := &request.Operation{ - Name: opPutDeliveryDestination, + Name: opStopQuery, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutDeliveryDestinationInput{} + input = &StopQueryInput{} } - output = &PutDeliveryDestinationOutput{} + output = &StopQueryOutput{} req = c.newRequest(op, input, output) return } -// PutDeliveryDestination API operation for Amazon CloudWatch Logs. -// -// Creates or updates a logical delivery destination. 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. -// -// To configure logs delivery between a supported Amazon Web Services service -// and a destination, you must do the following: -// -// - Create a delivery source, which is a logical object that represents -// the resource that is actually sending the logs. For more information, -// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). -// -// - Use PutDeliveryDestination to create a delivery destination, which is -// a logical object that represents the actual delivery destination. -// -// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) -// in the destination account to assign an IAM policy to the destination. -// This policy allows delivery to that destination. -// -// - Use CreateDelivery to create a delivery by pairing exactly one delivery -// source and one delivery destination. For more information, see CreateDelivery -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). -// -// You can configure a single delivery source to send logs to multiple destinations -// by creating multiple deliveries. You can also create multiple deliveries -// to configure multiple delivery sources to send logs to the same delivery -// destination. -// -// Only some Amazon Web Services services support being configured as a delivery -// source. These services are listed as Supported [V2 Permissions] in the table -// at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ -// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) +// StopQuery API operation for Amazon CloudWatch Logs. // -// If you use this operation to update an existing delivery destination, all -// the current delivery destination parameters are overwritten with the new -// parameter values that you specify. +// Stops a CloudWatch Logs Insights query that is in progress. If the query +// has already ended, the operation returns an error indicating that the specified +// query is not running. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDeliveryDestination for usage and error information. +// API operation StopQuery for usage and error information. // // Returned Error Types: // -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - ConflictException -// This operation attempted to create a resource that already exists. -// -// - ValidationException -// One of the parameters for the request is not valid. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. -// -// - ThrottlingException -// The request was throttled because of quota limits. +// - InvalidParameterException +// A parameter is specified incorrectly. // // - ResourceNotFoundException // The specified resource does not exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliveryDestination -func (c *CloudWatchLogs) PutDeliveryDestination(input *PutDeliveryDestinationInput) (*PutDeliveryDestinationOutput, error) { - req, out := c.PutDeliveryDestinationRequest(input) +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery +func (c *CloudWatchLogs) StopQuery(input *StopQueryInput) (*StopQueryOutput, error) { + req, out := c.StopQueryRequest(input) return out, req.Send() } -// PutDeliveryDestinationWithContext is the same as PutDeliveryDestination with the addition of +// StopQueryWithContext is the same as StopQuery with the addition of // the ability to pass a context and additional request options. // -// See PutDeliveryDestination for details on how to use this API operation. +// See StopQuery for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutDeliveryDestinationWithContext(ctx aws.Context, input *PutDeliveryDestinationInput, opts ...request.Option) (*PutDeliveryDestinationOutput, error) { - req, out := c.PutDeliveryDestinationRequest(input) +func (c *CloudWatchLogs) StopQueryWithContext(ctx aws.Context, input *StopQueryInput, opts ...request.Option) (*StopQueryOutput, error) { + req, out := c.StopQueryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutDeliveryDestinationPolicy = "PutDeliveryDestinationPolicy" +const opTagLogGroup = "TagLogGroup" -// PutDeliveryDestinationPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutDeliveryDestinationPolicy operation. The "output" return +// TagLogGroupRequest generates a "aws/request.Request" representing the +// client's request for the TagLogGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutDeliveryDestinationPolicy for more information on using the PutDeliveryDestinationPolicy +// See TagLogGroup for more information on using the TagLogGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutDeliveryDestinationPolicyRequest method. -// req, resp := client.PutDeliveryDestinationPolicyRequest(params) +// // Example sending a request using the TagLogGroupRequest method. +// req, resp := client.TagLogGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliveryDestinationPolicy -func (c *CloudWatchLogs) PutDeliveryDestinationPolicyRequest(input *PutDeliveryDestinationPolicyInput) (req *request.Request, output *PutDeliveryDestinationPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup +// +// Deprecated: Please use the generic tagging API TagResource +func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *request.Request, output *TagLogGroupOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, TagLogGroup, has been deprecated") + } op := &request.Operation{ - Name: opPutDeliveryDestinationPolicy, + Name: opTagLogGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutDeliveryDestinationPolicyInput{} + input = &TagLogGroupInput{} } - output = &PutDeliveryDestinationPolicyOutput{} + output = &TagLogGroupOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutDeliveryDestinationPolicy API operation for Amazon CloudWatch Logs. -// -// Creates and assigns an IAM policy that grants permissions to CloudWatch Logs -// to deliver logs cross-account to a specified destination in this account. -// To configure the delivery of logs from an Amazon Web Services service in -// another account to a logs delivery destination in the current account, you -// must do the following: -// -// - Create a delivery source, which is a logical object that represents -// the resource that is actually sending the logs. For more information, -// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). +// TagLogGroup API operation for Amazon CloudWatch Logs. // -// - Create a delivery destination, which is a logical object that represents -// the actual delivery destination. For more information, see PutDeliveryDestination -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). +// The TagLogGroup operation is on the path to deprecation. We recommend that +// you use TagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html) +// instead. // -// - Use this operation in the destination account to assign an IAM policy -// to the destination. This policy allows delivery to that destination. +// Adds or updates the specified tags for the specified log group. // -// - Create a delivery by pairing exactly one delivery source and one delivery -// destination. For more information, see CreateDelivery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). +// To list the tags for a log group, use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). +// To remove tags, use UntagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html). // -// Only some Amazon Web Services services support being configured as a delivery -// source. These services are listed as Supported [V2 Permissions] in the table -// at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ -// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) +// For more information about tags, see Tag Log Groups in Amazon CloudWatch +// Logs (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html#log-group-tagging) +// in the Amazon CloudWatch Logs User Guide. // -// The contents of the policy must include two statements. One statement enables -// general logs delivery, and the other allows delivery to the chosen destination. -// See the examples for the needed policies. +// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning +// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys +// condition keys. For more information about using tags to control access, +// see Controlling access to Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDeliveryDestinationPolicy for usage and error information. +// API operation TagLogGroup for usage and error information. // // Returned Error Types: // -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - ValidationException -// One of the parameters for the request is not valid. -// // - ResourceNotFoundException // The specified resource does not exist. // -// - ConflictException -// This operation attempted to create a resource that already exists. +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliveryDestinationPolicy -func (c *CloudWatchLogs) PutDeliveryDestinationPolicy(input *PutDeliveryDestinationPolicyInput) (*PutDeliveryDestinationPolicyOutput, error) { - req, out := c.PutDeliveryDestinationPolicyRequest(input) +// Deprecated: Please use the generic tagging API TagResource +func (c *CloudWatchLogs) TagLogGroup(input *TagLogGroupInput) (*TagLogGroupOutput, error) { + req, out := c.TagLogGroupRequest(input) return out, req.Send() } -// PutDeliveryDestinationPolicyWithContext is the same as PutDeliveryDestinationPolicy with the addition of +// TagLogGroupWithContext is the same as TagLogGroup with the addition of // the ability to pass a context and additional request options. // -// See PutDeliveryDestinationPolicy for details on how to use this API operation. +// See TagLogGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutDeliveryDestinationPolicyWithContext(ctx aws.Context, input *PutDeliveryDestinationPolicyInput, opts ...request.Option) (*PutDeliveryDestinationPolicyOutput, error) { - req, out := c.PutDeliveryDestinationPolicyRequest(input) +// +// Deprecated: Please use the generic tagging API TagResource +func (c *CloudWatchLogs) TagLogGroupWithContext(ctx aws.Context, input *TagLogGroupInput, opts ...request.Option) (*TagLogGroupOutput, error) { + req, out := c.TagLogGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutDeliverySource = "PutDeliverySource" +const opTagResource = "TagResource" -// PutDeliverySourceRequest generates a "aws/request.Request" representing the -// client's request for the PutDeliverySource operation. The "output" return +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutDeliverySource for more information on using the PutDeliverySource +// See TagResource for more information on using the TagResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutDeliverySourceRequest method. -// req, resp := client.PutDeliverySourceRequest(params) +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliverySource -func (c *CloudWatchLogs) PutDeliverySourceRequest(input *PutDeliverySourceInput) (req *request.Request, output *PutDeliverySourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagResource +func (c *CloudWatchLogs) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ - Name: opPutDeliverySource, + Name: opTagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutDeliverySourceInput{} + input = &TagResourceInput{} } - output = &PutDeliverySourceOutput{} + output = &TagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutDeliverySource API operation for Amazon CloudWatch Logs. -// -// Creates or updates a logical delivery source. 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. -// -// 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: -// -// - Use PutDeliverySource to create a delivery source, which is a logical -// object that represents the resource that is actually sending the logs. -// -// - Use PutDeliveryDestination to create a delivery destination, which is -// a logical object that represents the actual delivery destination. For -// more information, see PutDeliveryDestination (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). +// TagResource API operation for Amazon CloudWatch Logs. // -// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) -// in the destination account to assign an IAM policy to the destination. -// This policy allows delivery to that destination. +// Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs +// resource. Currently, the only CloudWatch Logs resources that can be tagged +// are log groups and destinations. // -// - Use CreateDelivery to create a delivery by pairing exactly one delivery -// source and one delivery destination. For more information, see CreateDelivery -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). +// Tags can help you organize and categorize your resources. You can also use +// them to scope user permissions by granting a user permission to access or +// change only resources with certain tag values. // -// You can configure a single delivery source to send logs to multiple destinations -// by creating multiple deliveries. You can also create multiple deliveries -// to configure multiple delivery sources to send logs to the same delivery -// destination. +// Tags don't have any semantic meaning to Amazon Web Services and are interpreted +// strictly as strings of characters. // -// Only some Amazon Web Services services support being configured as a delivery -// source. These services are listed as Supported [V2 Permissions] in the table -// at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ -// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) +// You can use the TagResource action with a resource that already has tags. +// If you specify a new tag key for the alarm, this tag is appended to the list +// of tags associated with the alarm. If you specify a tag key that is already +// associated with the alarm, the new tag value that you specify replaces the +// previous value for that tag. // -// If you use this operation to update an existing delivery source, all the -// current delivery source parameters are overwritten with the new parameter -// values that you specify. +// You can associate as many as 50 tags with a CloudWatch Logs resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDeliverySource for usage and error information. +// API operation TagResource for usage and error information. // // Returned Error Types: // -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - ConflictException -// This operation attempted to create a resource that already exists. -// -// - ValidationException -// One of the parameters for the request is not valid. -// -// - ServiceQuotaExceededException -// This request exceeds a service quota. +// - InvalidParameterException +// A parameter is specified incorrectly. // // - ResourceNotFoundException // The specified resource does not exist. // -// - ThrottlingException -// The request was throttled because of quota limits. +// - ServiceUnavailableException +// The service cannot complete the request. +// +// - TooManyTagsException +// A resource can have no more than 50 tags. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliverySource -func (c *CloudWatchLogs) PutDeliverySource(input *PutDeliverySourceInput) (*PutDeliverySourceOutput, error) { - req, out := c.PutDeliverySourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagResource +func (c *CloudWatchLogs) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) return out, req.Send() } -// PutDeliverySourceWithContext is the same as PutDeliverySource with the addition of +// TagResourceWithContext is the same as TagResource with the addition of // the ability to pass a context and additional request options. // -// See PutDeliverySource for details on how to use this API operation. +// See TagResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutDeliverySourceWithContext(ctx aws.Context, input *PutDeliverySourceInput, opts ...request.Option) (*PutDeliverySourceOutput, error) { - req, out := c.PutDeliverySourceRequest(input) +func (c *CloudWatchLogs) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutDestination = "PutDestination" +const opTestMetricFilter = "TestMetricFilter" -// PutDestinationRequest generates a "aws/request.Request" representing the -// client's request for the PutDestination operation. The "output" return +// TestMetricFilterRequest generates a "aws/request.Request" representing the +// client's request for the TestMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutDestination for more information on using the PutDestination +// See TestMetricFilter for more information on using the TestMetricFilter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutDestinationRequest method. -// req, resp := client.PutDestinationRequest(params) +// // Example sending a request using the TestMetricFilterRequest method. +// req, resp := client.TestMetricFilterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination -func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter +func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) { op := &request.Operation{ - Name: opPutDestination, + Name: opTestMetricFilter, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutDestinationInput{} + input = &TestMetricFilterInput{} } - output = &PutDestinationOutput{} + output = &TestMetricFilterOutput{} req = c.newRequest(op, input, output) return } -// PutDestination API operation for Amazon CloudWatch Logs. -// -// Creates or updates a destination. This operation is used only to create destinations -// for cross-account subscriptions. -// -// A destination encapsulates a physical resource (such as an Amazon Kinesis -// stream). With a destination, you can subscribe to a real-time stream of log -// events for a different account, ingested using PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). -// -// Through an access policy, a destination controls what is written to it. By -// default, PutDestination does not set any access policy with the destination, -// which means a cross-account user cannot call PutSubscriptionFilter (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html) -// against this destination. To enable this, the destination owner must call -// PutDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html) -// after PutDestination. +// TestMetricFilter API operation for Amazon CloudWatch Logs. // -// To perform a PutDestination operation, you must also have the iam:PassRole -// permission. +// Tests the filter pattern of a metric filter against a sample of log event +// messages. You can use this operation to validate the correctness of a metric +// filter pattern. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDestination for usage and error information. +// API operation TestMetricFilter for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination -func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) { - req, out := c.PutDestinationRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter +func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) { + req, out := c.TestMetricFilterRequest(input) return out, req.Send() } -// PutDestinationWithContext is the same as PutDestination with the addition of +// TestMetricFilterWithContext is the same as TestMetricFilter with the addition of // the ability to pass a context and additional request options. // -// See PutDestination for details on how to use this API operation. +// See TestMetricFilter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutDestinationWithContext(ctx aws.Context, input *PutDestinationInput, opts ...request.Option) (*PutDestinationOutput, error) { - req, out := c.PutDestinationRequest(input) +func (c *CloudWatchLogs) TestMetricFilterWithContext(ctx aws.Context, input *TestMetricFilterInput, opts ...request.Option) (*TestMetricFilterOutput, error) { + req, out := c.TestMetricFilterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutDestinationPolicy = "PutDestinationPolicy" +const opUntagLogGroup = "UntagLogGroup" -// PutDestinationPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutDestinationPolicy operation. The "output" return +// UntagLogGroupRequest generates a "aws/request.Request" representing the +// client's request for the UntagLogGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutDestinationPolicy for more information on using the PutDestinationPolicy +// See UntagLogGroup for more information on using the UntagLogGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutDestinationPolicyRequest method. -// req, resp := client.PutDestinationPolicyRequest(params) +// // Example sending a request using the UntagLogGroupRequest method. +// req, resp := client.UntagLogGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy -func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup +// +// Deprecated: Please use the generic tagging API UntagResource +func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *request.Request, output *UntagLogGroupOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, UntagLogGroup, has been deprecated") + } op := &request.Operation{ - Name: opPutDestinationPolicy, + Name: opUntagLogGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutDestinationPolicyInput{} + input = &UntagLogGroupInput{} } - output = &PutDestinationPolicyOutput{} + output = &UntagLogGroupOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutDestinationPolicy API operation for Amazon CloudWatch Logs. +// UntagLogGroup API operation for Amazon CloudWatch Logs. // -// Creates or updates an access policy associated with an existing destination. -// An access policy is an IAM policy document (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html) -// that is used to authorize claims to register a subscription filter against -// a given destination. +// The UntagLogGroup operation is on the path to deprecation. We recommend that +// you use UntagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html) +// instead. +// +// Removes the specified tags from the specified log group. +// +// To list the tags for a log group, use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). +// To add tags, use TagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html). +// +// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning +// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys +// condition keys. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDestinationPolicy for usage and error information. +// API operation UntagLogGroup for usage and error information. // // Returned Error Types: +// - ResourceNotFoundException +// The specified resource does not exist. // -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// -// - ServiceUnavailableException -// The service cannot complete the request. +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy -func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) { - req, out := c.PutDestinationPolicyRequest(input) +// Deprecated: Please use the generic tagging API UntagResource +func (c *CloudWatchLogs) UntagLogGroup(input *UntagLogGroupInput) (*UntagLogGroupOutput, error) { + req, out := c.UntagLogGroupRequest(input) return out, req.Send() } -// PutDestinationPolicyWithContext is the same as PutDestinationPolicy with the addition of +// UntagLogGroupWithContext is the same as UntagLogGroup with the addition of // the ability to pass a context and additional request options. // -// See PutDestinationPolicy for details on how to use this API operation. +// See UntagLogGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutDestinationPolicyWithContext(ctx aws.Context, input *PutDestinationPolicyInput, opts ...request.Option) (*PutDestinationPolicyOutput, error) { - req, out := c.PutDestinationPolicyRequest(input) +// +// Deprecated: Please use the generic tagging API UntagResource +func (c *CloudWatchLogs) UntagLogGroupWithContext(ctx aws.Context, input *UntagLogGroupInput, opts ...request.Option) (*UntagLogGroupOutput, error) { + req, out := c.UntagLogGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutLogEvents = "PutLogEvents" - -// PutLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the PutLogEvents operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutLogEvents for more information on using the PutLogEvents -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutLogEventsRequest method. -// req, resp := client.PutLogEventsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents -func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) { - op := &request.Operation{ - Name: opPutLogEvents, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutLogEventsInput{} - } - - output = &PutLogEventsOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutLogEvents API operation for Amazon CloudWatch Logs. -// -// Uploads a batch of log events to the specified log stream. -// -// The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions -// are always accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException -// even if the sequence token is not valid. You can use parallel PutLogEvents -// actions on the same log stream. -// -// The batch of events must satisfy the following constraints: -// -// - The maximum batch size is 1,048,576 bytes. This size is calculated as -// the sum of all event messages in UTF-8, plus 26 bytes for each log event. -// -// - None of the log events in the batch can be more than 2 hours in the -// future. -// -// - None of the log events in the batch can be more than 14 days in the -// past. Also, none of the log events can be from earlier than the retention -// period of the log group. -// -// - The log events in the batch must be in chronological order by their -// timestamp. The timestamp is the time that the event occurred, expressed -// as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In Amazon -// Web Services Tools for PowerShell and the Amazon Web Services SDK for -// .NET, the timestamp is specified in .NET format: yyyy-mm-ddThh:mm:ss. -// For example, 2017-09-15T13:45:30.) -// -// - A batch of log events in a single request cannot span more than 24 hours. -// Otherwise, the operation fails. -// -// - Each log event can be no larger than 256 KB. -// -// - The maximum number of log events in a batch is 10,000. -// -// - The quota of five requests per second per log stream has been removed. -// Instead, PutLogEvents 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. -// -// If a call to PutLogEvents returns "UnrecognizedClientException" the most -// likely cause is a non-valid Amazon Web Services access key ID or secret key. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutLogEvents for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - InvalidSequenceTokenException -// The sequence token is not valid. You can get the correct sequence token in -// the expectedSequenceToken field in the InvalidSequenceTokenException message. -// -// PutLogEvents actions are now always accepted and never return InvalidSequenceTokenException -// regardless of receiving an invalid sequence token. -// -// - DataAlreadyAcceptedException -// The event was already logged. -// -// PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException -// regardless of whether a given batch of log events has already been accepted. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - UnrecognizedClientException -// The most likely cause is an Amazon Web Services access key ID or secret key -// that's not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents -func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) { - req, out := c.PutLogEventsRequest(input) - return out, req.Send() -} - -// PutLogEventsWithContext is the same as PutLogEvents with the addition of -// the ability to pass a context and additional request options. -// -// See PutLogEvents for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutLogEventsWithContext(ctx aws.Context, input *PutLogEventsInput, opts ...request.Option) (*PutLogEventsOutput, error) { - req, out := c.PutLogEventsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutMetricFilter = "PutMetricFilter" +const opUntagResource = "UntagResource" -// PutMetricFilterRequest generates a "aws/request.Request" representing the -// client's request for the PutMetricFilter operation. The "output" return +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutMetricFilter for more information on using the PutMetricFilter +// See UntagResource for more information on using the UntagResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutMetricFilterRequest method. -// req, resp := client.PutMetricFilterRequest(params) +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter -func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagResource +func (c *CloudWatchLogs) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ - Name: opPutMetricFilter, + Name: opUntagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutMetricFilterInput{} + input = &UntagResourceInput{} } - output = &PutMetricFilterOutput{} + output = &UntagResourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutMetricFilter API operation for Amazon CloudWatch Logs. -// -// Creates or updates a metric filter and associates it with the specified log -// group. With metric filters, you can configure rules to extract metric data -// from log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). -// -// The maximum number of metric filters that can be associated with a log group -// is 100. -// -// When you create a metric filter, you can also optionally assign a unit and -// dimensions to the metric that is created. -// -// Metrics extracted from log events are charged as custom metrics. To prevent -// unexpected high charges, do not specify high-cardinality fields such as IPAddress -// or requestID as dimensions. Each different value found for a dimension is -// treated as a separate metric and accrues charges as a separate custom metric. -// -// CloudWatch Logs might disable a metric filter if it generates 1,000 different -// name/value pairs for your specified dimensions within one hour. +// UntagResource API operation for Amazon CloudWatch Logs. // -// You can also set up a billing alarm to alert you if your charges are higher -// than expected. For more information, see Creating a Billing Alarm to Monitor -// Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). +// Removes one or more tags from the specified resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutMetricFilter for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter -func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) { - req, out := c.PutMetricFilterRequest(input) - return out, req.Send() -} - -// PutMetricFilterWithContext is the same as PutMetricFilter with the addition of -// the ability to pass a context and additional request options. -// -// See PutMetricFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutMetricFilterInput, opts ...request.Option) (*PutMetricFilterOutput, error) { - req, out := c.PutMetricFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutQueryDefinition = "PutQueryDefinition" - -// PutQueryDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the PutQueryDefinition operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutQueryDefinition for more information on using the PutQueryDefinition -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutQueryDefinitionRequest method. -// req, resp := client.PutQueryDefinitionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition -func (c *CloudWatchLogs) PutQueryDefinitionRequest(input *PutQueryDefinitionInput) (req *request.Request, output *PutQueryDefinitionOutput) { - op := &request.Operation{ - Name: opPutQueryDefinition, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutQueryDefinitionInput{} - } - - output = &PutQueryDefinitionOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutQueryDefinition API operation for Amazon CloudWatch Logs. -// -// Creates or updates a query definition for CloudWatch Logs Insights. For more -// information, see Analyzing Log Data with CloudWatch Logs Insights (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). -// -// To update a query definition, specify its queryDefinitionId in your request. -// The values of name, queryString, and logGroupNames are changed to the values -// that you specify in your update operation. No current values are retained -// from the current query definition. For example, imagine updating a current -// query definition that includes log groups. If you don't specify the logGroupNames -// parameter in your update operation, the query definition changes to contain -// no log groups. -// -// You must have the logs:PutQueryDefinition permission to be able to perform -// this operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutQueryDefinition for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition -func (c *CloudWatchLogs) PutQueryDefinition(input *PutQueryDefinitionInput) (*PutQueryDefinitionOutput, error) { - req, out := c.PutQueryDefinitionRequest(input) - return out, req.Send() -} - -// PutQueryDefinitionWithContext is the same as PutQueryDefinition with the addition of -// the ability to pass a context and additional request options. -// -// See PutQueryDefinition for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutQueryDefinitionWithContext(ctx aws.Context, input *PutQueryDefinitionInput, opts ...request.Option) (*PutQueryDefinitionOutput, error) { - req, out := c.PutQueryDefinitionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutResourcePolicy = "PutResourcePolicy" - -// PutResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutResourcePolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutResourcePolicy for more information on using the PutResourcePolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutResourcePolicyRequest method. -// req, resp := client.PutResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy -func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { - op := &request.Operation{ - Name: opPutResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutResourcePolicyInput{} - } - - output = &PutResourcePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutResourcePolicy API operation for Amazon CloudWatch Logs. -// -// Creates or updates a resource policy allowing other Amazon Web Services services -// to put log events to this account, such as Amazon Route 53. An account can -// have up to 10 resource policies per Amazon Web Services Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutResourcePolicy for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy -func (c *CloudWatchLogs) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) - return out, req.Send() -} - -// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutResourcePolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRetentionPolicy = "PutRetentionPolicy" - -// PutRetentionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutRetentionPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutRetentionPolicy for more information on using the PutRetentionPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutRetentionPolicyRequest method. -// req, resp := client.PutRetentionPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy -func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) { - op := &request.Operation{ - Name: opPutRetentionPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRetentionPolicyInput{} - } - - output = &PutRetentionPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutRetentionPolicy API operation for Amazon CloudWatch Logs. -// -// Sets the retention of the specified log group. With a retention policy, you -// can configure the number of days for which to retain log events in the specified -// log group. -// -// CloudWatch Logs doesn’t immediately delete log events when they reach their -// retention setting. It typically takes up to 72 hours after that before log -// events are deleted, but in rare situations might take longer. -// -// To illustrate, imagine that you change a log group to have a longer retention -// setting when it contains log events that are past the expiration date, but -// haven’t been deleted. Those log events will take up to 72 hours to be deleted -// after the new retention date is reached. To make sure that log data is deleted -// permanently, keep a log group at its lower retention setting until 72 hours -// after the previous retention period ends. Alternatively, wait to change the -// retention setting until you confirm that the earlier log events are deleted. -// -// When log events reach their retention setting they are marked for deletion. -// After they are marked for deletion, they do not add to your archival storage -// costs anymore, even if they are not actually deleted until later. These log -// events marked for deletion are also not included when you use an API to retrieve -// the storedBytes value to see how many bytes a log group is storing. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutRetentionPolicy for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy -func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) { - req, out := c.PutRetentionPolicyRequest(input) - return out, req.Send() -} - -// PutRetentionPolicyWithContext is the same as PutRetentionPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutRetentionPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutRetentionPolicyWithContext(ctx aws.Context, input *PutRetentionPolicyInput, opts ...request.Option) (*PutRetentionPolicyOutput, error) { - req, out := c.PutRetentionPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutSubscriptionFilter = "PutSubscriptionFilter" - -// PutSubscriptionFilterRequest generates a "aws/request.Request" representing the -// client's request for the PutSubscriptionFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutSubscriptionFilter for more information on using the PutSubscriptionFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutSubscriptionFilterRequest method. -// req, resp := client.PutSubscriptionFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter -func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) { - op := &request.Operation{ - Name: opPutSubscriptionFilter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutSubscriptionFilterInput{} - } - - output = &PutSubscriptionFilterOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutSubscriptionFilter API operation for Amazon CloudWatch Logs. -// -// Creates or updates a subscription filter and associates it with the specified -// log group. With subscription filters, you can subscribe to a real-time stream -// of log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html) -// and have them delivered to a specific destination. When log events are sent -// to the receiving service, they are Base64 encoded and compressed with the -// GZIP format. -// -// The following destinations are supported for subscription filters: -// -// - An Amazon Kinesis data stream belonging to the same account as the subscription -// filter, for same-account delivery. -// -// - A logical destination created with PutDestination (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html) -// that belongs to a different account, for cross-account delivery. We currently -// support Kinesis Data Streams and Kinesis Data Firehose as logical destinations. -// -// - An Amazon Kinesis Data Firehose delivery stream that belongs to the -// same account as the subscription filter, for same-account delivery. -// -// - An Lambda function that belongs to the same account as the subscription -// filter, for same-account delivery. -// -// 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 filterName. -// -// To perform a PutSubscriptionFilter operation for any destination except a -// Lambda function, you must also have the iam:PassRole permission. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutSubscriptionFilter for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter -func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) { - req, out := c.PutSubscriptionFilterRequest(input) - return out, req.Send() -} - -// PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of -// the ability to pass a context and additional request options. -// -// See PutSubscriptionFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) { - req, out := c.PutSubscriptionFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStartQuery = "StartQuery" - -// StartQueryRequest generates a "aws/request.Request" representing the -// client's request for the StartQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartQuery for more information on using the StartQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the StartQueryRequest method. -// req, resp := client.StartQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery -func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) { - op := &request.Operation{ - Name: opStartQuery, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartQueryInput{} - } - - output = &StartQueryOutput{} - req = c.newRequest(op, input, output) - return -} - -// StartQuery API operation for Amazon CloudWatch Logs. -// -// 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. -// -// For more information, see CloudWatch Logs Insights Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). -// -// After you run a query using StartQuery, the query results are stored by CloudWatch -// Logs. You can use GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) -// to retrieve the results of a query, using the queryId that StartQuery returns. -// -// If you have associated a KMS key with the query results in this account, -// then StartQuery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) -// uses that key to encrypt the results when it stores them. If no key is associated -// with query results, the query results are encrypted with the default CloudWatch -// Logs encryption method. -// -// Queries time out after 60 minutes of runtime. If your queries are timing -// out, reduce the time range being searched or partition your query into a -// number of queries. -// -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). -// For a cross-account StartQuery operation, the query definition must be defined -// in the monitoring account. -// -// You can have up to 30 concurrent CloudWatch Logs insights queries, including -// queries that have been added to dashboards. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation StartQuery for usage and error information. -// -// Returned Error Types: -// -// - MalformedQueryException -// The query string is not valid. Details about this error are displayed in -// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). -// -// For more information about valid query syntax, see CloudWatch Logs Insights -// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery -func (c *CloudWatchLogs) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) { - req, out := c.StartQueryRequest(input) - return out, req.Send() -} - -// StartQueryWithContext is the same as StartQuery with the addition of -// the ability to pass a context and additional request options. -// -// See StartQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) { - req, out := c.StartQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opStopQuery = "StopQuery" - -// StopQueryRequest generates a "aws/request.Request" representing the -// client's request for the StopQuery operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StopQuery for more information on using the StopQuery -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the StopQueryRequest method. -// req, resp := client.StopQueryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery -func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.Request, output *StopQueryOutput) { - op := &request.Operation{ - Name: opStopQuery, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StopQueryInput{} - } - - output = &StopQueryOutput{} - req = c.newRequest(op, input, output) - return -} - -// StopQuery API operation for Amazon CloudWatch Logs. -// -// Stops a CloudWatch Logs Insights query that is in progress. If the query -// has already ended, the operation returns an error indicating that the specified -// query is not running. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation StopQuery for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery -func (c *CloudWatchLogs) StopQuery(input *StopQueryInput) (*StopQueryOutput, error) { - req, out := c.StopQueryRequest(input) - return out, req.Send() -} - -// StopQueryWithContext is the same as StopQuery with the addition of -// the ability to pass a context and additional request options. -// -// See StopQuery for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) StopQueryWithContext(ctx aws.Context, input *StopQueryInput, opts ...request.Option) (*StopQueryOutput, error) { - req, out := c.StopQueryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagLogGroup = "TagLogGroup" - -// TagLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the TagLogGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagLogGroup for more information on using the TagLogGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagLogGroupRequest method. -// req, resp := client.TagLogGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup -// -// Deprecated: Please use the generic tagging API TagResource -func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *request.Request, output *TagLogGroupOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, TagLogGroup, has been deprecated") - } - op := &request.Operation{ - Name: opTagLogGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagLogGroupInput{} - } - - output = &TagLogGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagLogGroup API operation for Amazon CloudWatch Logs. -// -// The TagLogGroup operation is on the path to deprecation. We recommend that -// you use TagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html) -// instead. -// -// Adds or updates the specified tags for the specified log group. -// -// To list the tags for a log group, use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). -// To remove tags, use UntagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html). -// -// For more information about tags, see Tag Log Groups in Amazon CloudWatch -// Logs (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html#log-group-tagging) -// in the Amazon CloudWatch Logs User Guide. -// -// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning -// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys -// condition keys. For more information about using tags to control access, -// see Controlling access to Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation TagLogGroup for usage and error information. -// -// Returned Error Types: -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup -// -// Deprecated: Please use the generic tagging API TagResource -func (c *CloudWatchLogs) TagLogGroup(input *TagLogGroupInput) (*TagLogGroupOutput, error) { - req, out := c.TagLogGroupRequest(input) - return out, req.Send() -} - -// TagLogGroupWithContext is the same as TagLogGroup with the addition of -// the ability to pass a context and additional request options. -// -// See TagLogGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: Please use the generic tagging API TagResource -func (c *CloudWatchLogs) TagLogGroupWithContext(ctx aws.Context, input *TagLogGroupInput, opts ...request.Option) (*TagLogGroupOutput, error) { - req, out := c.TagLogGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagResource = "TagResource" - -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagResource for more information on using the TagResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagResource -func (c *CloudWatchLogs) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for Amazon CloudWatch Logs. -// -// Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs -// resource. Currently, the only CloudWatch Logs resources that can be tagged -// are log groups and destinations. -// -// Tags can help you organize and categorize your resources. You can also use -// them to scope user permissions by granting a user permission to access or -// change only resources with certain tag values. -// -// Tags don't have any semantic meaning to Amazon Web Services and are interpreted -// strictly as strings of characters. -// -// You can use the TagResource action with a resource that already has tags. -// If you specify a new tag key for the alarm, this tag is appended to the list -// of tags associated with the alarm. If you specify a tag key that is already -// associated with the alarm, the new tag value that you specify replaces the -// previous value for that tag. -// -// You can associate as many as 50 tags with a CloudWatch Logs resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation TagResource for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - TooManyTagsException -// A resource can have no more than 50 tags. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagResource -func (c *CloudWatchLogs) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - return out, req.Send() -} - -// TagResourceWithContext is the same as TagResource with the addition of -// the ability to pass a context and additional request options. -// -// See TagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTestMetricFilter = "TestMetricFilter" - -// TestMetricFilterRequest generates a "aws/request.Request" representing the -// client's request for the TestMetricFilter operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TestMetricFilter for more information on using the TestMetricFilter -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TestMetricFilterRequest method. -// req, resp := client.TestMetricFilterRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter -func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) { - op := &request.Operation{ - Name: opTestMetricFilter, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TestMetricFilterInput{} - } - - output = &TestMetricFilterOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestMetricFilter API operation for Amazon CloudWatch Logs. -// -// Tests the filter pattern of a metric filter against a sample of log event -// messages. You can use this operation to validate the correctness of a metric -// filter pattern. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation TestMetricFilter for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter -func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) { - req, out := c.TestMetricFilterRequest(input) - return out, req.Send() -} - -// TestMetricFilterWithContext is the same as TestMetricFilter with the addition of -// the ability to pass a context and additional request options. -// -// See TestMetricFilter for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) TestMetricFilterWithContext(ctx aws.Context, input *TestMetricFilterInput, opts ...request.Option) (*TestMetricFilterOutput, error) { - req, out := c.TestMetricFilterRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagLogGroup = "UntagLogGroup" - -// UntagLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the UntagLogGroup operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagLogGroup for more information on using the UntagLogGroup -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagLogGroupRequest method. -// req, resp := client.UntagLogGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup -// -// Deprecated: Please use the generic tagging API UntagResource -func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *request.Request, output *UntagLogGroupOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, UntagLogGroup, has been deprecated") - } - op := &request.Operation{ - Name: opUntagLogGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagLogGroupInput{} - } - - output = &UntagLogGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagLogGroup API operation for Amazon CloudWatch Logs. -// -// The UntagLogGroup operation is on the path to deprecation. We recommend that -// you use UntagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html) -// instead. -// -// Removes the specified tags from the specified log group. -// -// To list the tags for a log group, use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). -// To add tags, use TagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html). -// -// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning -// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys -// condition keys. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation UntagLogGroup for usage and error information. -// -// Returned Error Types: -// - ResourceNotFoundException -// The specified resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup -// -// Deprecated: Please use the generic tagging API UntagResource -func (c *CloudWatchLogs) UntagLogGroup(input *UntagLogGroupInput) (*UntagLogGroupOutput, error) { - req, out := c.UntagLogGroupRequest(input) - return out, req.Send() -} - -// UntagLogGroupWithContext is the same as UntagLogGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UntagLogGroup for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: Please use the generic tagging API UntagResource -func (c *CloudWatchLogs) UntagLogGroupWithContext(ctx aws.Context, input *UntagLogGroupInput, opts ...request.Option) (*UntagLogGroupOutput, error) { - req, out := c.UntagLogGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagResource = "UntagResource" - -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagResource for more information on using the UntagResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagResource -func (c *CloudWatchLogs) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for Amazon CloudWatch Logs. -// -// Removes one or more tags from the specified resource. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation UntagResource for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagResource -func (c *CloudWatchLogs) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - return out, req.Send() -} - -// UntagResourceWithContext is the same as UntagResource with the addition of -// the ability to pass a context and additional request options. -// -// See UntagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// You don't have sufficient permissions to perform this action. -type AccessDeniedException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessDeniedException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessDeniedException) GoString() string { - return s.String() -} - -func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { - return &AccessDeniedException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *AccessDeniedException) Code() string { - return "AccessDeniedException" -} - -// Message returns the exception's message. -func (s *AccessDeniedException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *AccessDeniedException) OrigErr() error { - return nil -} - -func (s *AccessDeniedException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *AccessDeniedException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *AccessDeniedException) RequestID() string { - return s.RespMetadata.RequestID -} - -// A structure that contains information about one CloudWatch Logs account policy. -type AccountPolicy struct { - _ struct{} `type:"structure"` - - // The Amazon Web Services account ID that the policy applies to. - AccountId *string `locationName:"accountId" min:"12" type:"string"` - - // The date and time that this policy was most recently updated. - LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` - - // The policy document for this account policy. - // - // The JSON specified in policyDocument can be up to 30,720 characters. - PolicyDocument *string `locationName:"policyDocument" type:"string"` - - // The name of the account policy. - PolicyName *string `locationName:"policyName" type:"string"` - - // The type of policy for this account policy. - PolicyType *string `locationName:"policyType" type:"string" enum:"PolicyType"` - - // The scope of the account policy. - Scope *string `locationName:"scope" type:"string" enum:"Scope"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccountPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccountPolicy) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *AccountPolicy) SetAccountId(v string) *AccountPolicy { - s.AccountId = &v - return s -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *AccountPolicy) SetLastUpdatedTime(v int64) *AccountPolicy { - s.LastUpdatedTime = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *AccountPolicy) SetPolicyDocument(v string) *AccountPolicy { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *AccountPolicy) SetPolicyName(v string) *AccountPolicy { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *AccountPolicy) SetPolicyType(v string) *AccountPolicy { - s.PolicyType = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *AccountPolicy) SetScope(v string) *AccountPolicy { - s.Scope = &v - return s -} - -type AssociateKmsKeyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log - // data. This must be a symmetric KMS key. For more information, see Amazon - // Resource Names (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms) - // and Using Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html). - // - // KmsKeyId is a required field - KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"` - - // The name of the log group. - // - // In your AssociateKmsKey operation, you must specify either the resourceIdentifier - // parameter or the logGroup parameter, but you can't specify both. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // Specifies the target for this operation. You must specify one of the following: - // - // * Specify the following ARN to have future GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) - // operations in this account encrypt the results with the specified KMS - // key. Replace REGION and ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:query-result:* - // - // * Specify the ARN of a log group to have CloudWatch Logs use the KMS key - // to encrypt log events that are ingested and stored by that log group. - // The log group ARN must be in the following format. Replace REGION and - // ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME - // - // In your AssociateKmsKey operation, you must specify either the resourceIdentifier - // parameter or the logGroup parameter, but you can't specify both. - ResourceIdentifier *string `locationName:"resourceIdentifier" min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateKmsKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateKmsKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateKmsKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateKmsKeyInput"} - if s.KmsKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KmsKeyId")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.ResourceIdentifier != nil && len(*s.ResourceIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *AssociateKmsKeyInput) SetKmsKeyId(v string) *AssociateKmsKeyInput { - s.KmsKeyId = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *AssociateKmsKeyInput) SetLogGroupName(v string) *AssociateKmsKeyInput { - s.LogGroupName = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *AssociateKmsKeyInput) SetResourceIdentifier(v string) *AssociateKmsKeyInput { - s.ResourceIdentifier = &v - return s -} - -type AssociateKmsKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateKmsKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateKmsKeyOutput) GoString() string { - return s.String() -} - -type CancelExportTaskInput struct { - _ struct{} `type:"structure"` - - // The ID of the export task. - // - // TaskId is a required field - TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CancelExportTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CancelExportTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CancelExportTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTaskId sets the TaskId field's value. -func (s *CancelExportTaskInput) SetTaskId(v string) *CancelExportTaskInput { - s.TaskId = &v - return s -} - -type CancelExportTaskOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CancelExportTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CancelExportTaskOutput) GoString() string { - return s.String() -} - -// This operation attempted to create a resource that already exists. -type ConflictException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConflictException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConflictException) GoString() string { - return s.String() -} - -func newErrorConflictException(v protocol.ResponseMetadata) error { - return &ConflictException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ConflictException) Code() string { - return "ConflictException" -} - -// Message returns the exception's message. -func (s *ConflictException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ConflictException) OrigErr() error { - return nil -} - -func (s *ConflictException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ConflictException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ConflictException) RequestID() string { - return s.RespMetadata.RequestID -} - -type CreateDeliveryInput struct { - _ struct{} `type:"structure"` - - // The ARN of the delivery destination to use for this delivery. - // - // DeliveryDestinationArn is a required field - DeliveryDestinationArn *string `locationName:"deliveryDestinationArn" type:"string" required:"true"` - - // The name of the delivery source to use for this delivery. - // - // DeliverySourceName is a required field - DeliverySourceName *string `locationName:"deliverySourceName" min:"1" type:"string" required:"true"` - - // An optional list of key-value pairs to associate with the resource. - // - // For more information about tagging, see Tagging Amazon Web Services resources - // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDeliveryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDeliveryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDeliveryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDeliveryInput"} - if s.DeliveryDestinationArn == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationArn")) - } - if s.DeliverySourceName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliverySourceName")) - } - if s.DeliverySourceName != nil && len(*s.DeliverySourceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliverySourceName", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryDestinationArn sets the DeliveryDestinationArn field's value. -func (s *CreateDeliveryInput) SetDeliveryDestinationArn(v string) *CreateDeliveryInput { - s.DeliveryDestinationArn = &v - return s -} - -// SetDeliverySourceName sets the DeliverySourceName field's value. -func (s *CreateDeliveryInput) SetDeliverySourceName(v string) *CreateDeliveryInput { - s.DeliverySourceName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateDeliveryInput) SetTags(v map[string]*string) *CreateDeliveryInput { - s.Tags = v - return s -} - -type CreateDeliveryOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains information about the delivery that you just created. - Delivery *Delivery `locationName:"delivery" type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDeliveryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDeliveryOutput) GoString() string { - return s.String() -} - -// SetDelivery sets the Delivery field's value. -func (s *CreateDeliveryOutput) SetDelivery(v *Delivery) *CreateDeliveryOutput { - s.Delivery = v - return s -} - -type CreateExportTaskInput struct { - _ struct{} `type:"structure"` - - // The name of S3 bucket for the exported log data. The bucket must be in the - // same Amazon Web Services Region. - // - // Destination is a required field - Destination *string `locationName:"destination" min:"1" type:"string" required:"true"` - - // The prefix used as the start of the key for every object exported. If you - // don't specify a value, the default is exportedlogs. - DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` - - // The start time of the range for the request, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this - // time are not exported. - // - // From is a required field - From *int64 `locationName:"from" type:"long" required:"true"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // Export only log streams that match the provided prefix. If you don't specify - // a value, no prefix filter is applied. - LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` - - // The name of the export task. - TaskName *string `locationName:"taskName" min:"1" type:"string"` - - // The end time of the range for the request, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time - // are not exported. - // - // You must specify a time that is not earlier than when this log group was - // created. - // - // To is a required field - To *int64 `locationName:"to" type:"long" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateExportTaskInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateExportTaskInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateExportTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.Destination != nil && len(*s.Destination) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Destination", 1)) - } - if s.From == nil { - invalidParams.Add(request.NewErrParamRequired("From")) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) - } - if s.TaskName != nil && len(*s.TaskName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskName", 1)) - } - if s.To == nil { - invalidParams.Add(request.NewErrParamRequired("To")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination sets the Destination field's value. -func (s *CreateExportTaskInput) SetDestination(v string) *CreateExportTaskInput { - s.Destination = &v - return s -} - -// SetDestinationPrefix sets the DestinationPrefix field's value. -func (s *CreateExportTaskInput) SetDestinationPrefix(v string) *CreateExportTaskInput { - s.DestinationPrefix = &v - return s -} - -// SetFrom sets the From field's value. -func (s *CreateExportTaskInput) SetFrom(v int64) *CreateExportTaskInput { - s.From = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateExportTaskInput) SetLogGroupName(v string) *CreateExportTaskInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. -func (s *CreateExportTaskInput) SetLogStreamNamePrefix(v string) *CreateExportTaskInput { - s.LogStreamNamePrefix = &v - return s -} - -// SetTaskName sets the TaskName field's value. -func (s *CreateExportTaskInput) SetTaskName(v string) *CreateExportTaskInput { - s.TaskName = &v - return s -} - -// SetTo sets the To field's value. -func (s *CreateExportTaskInput) SetTo(v int64) *CreateExportTaskInput { - s.To = &v - return s -} - -type CreateExportTaskOutput struct { - _ struct{} `type:"structure"` - - // The ID of the export task. - TaskId *string `locationName:"taskId" min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateExportTaskOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateExportTaskOutput) GoString() string { - return s.String() -} - -// SetTaskId sets the TaskId field's value. -func (s *CreateExportTaskOutput) SetTaskId(v string) *CreateExportTaskOutput { - s.TaskId = &v - return s -} - -type CreateLogGroupInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log - // data. For more information, see Amazon Resource Names (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms). - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The key-value pairs to use for the tags. - // - // You can grant users access to certain log groups while preventing them from - // accessing other log groups. To do so, tag your groups and use IAM policies - // that refer to those tags. To assign tags when you create a log group, you - // must have either the logs:TagResource or logs:TagLogGroup permission. For - // more information about tagging, see Tagging Amazon Web Services resources - // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). For more - // information about using tags to control access, see Controlling access to - // Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLogGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLogGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLogGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateLogGroupInput) SetKmsKeyId(v string) *CreateLogGroupInput { - s.KmsKeyId = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateLogGroupInput) SetLogGroupName(v string) *CreateLogGroupInput { - s.LogGroupName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLogGroupInput) SetTags(v map[string]*string) *CreateLogGroupInput { - s.Tags = v - return s -} - -type CreateLogGroupOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLogGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLogGroupOutput) GoString() string { - return s.String() -} - -type CreateLogStreamInput struct { - _ struct{} `type:"structure"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The name of the log stream. - // - // LogStreamName is a required field - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLogStreamInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLogStreamInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLogStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamName")) - } - if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateLogStreamInput) SetLogGroupName(v string) *CreateLogStreamInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *CreateLogStreamInput) SetLogStreamName(v string) *CreateLogStreamInput { - s.LogStreamName = &v - return s -} - -type CreateLogStreamOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLogStreamOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLogStreamOutput) GoString() string { - return s.String() -} - -// The event was already logged. -// -// PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException -// regardless of whether a given batch of log events has already been accepted. -type DataAlreadyAcceptedException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - ExpectedSequenceToken *string `locationName:"expectedSequenceToken" min:"1" type:"string"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DataAlreadyAcceptedException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DataAlreadyAcceptedException) GoString() string { - return s.String() -} - -func newErrorDataAlreadyAcceptedException(v protocol.ResponseMetadata) error { - return &DataAlreadyAcceptedException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *DataAlreadyAcceptedException) Code() string { - return "DataAlreadyAcceptedException" -} - -// Message returns the exception's message. -func (s *DataAlreadyAcceptedException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *DataAlreadyAcceptedException) OrigErr() error { - return nil -} - -func (s *DataAlreadyAcceptedException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *DataAlreadyAcceptedException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *DataAlreadyAcceptedException) RequestID() string { - return s.RespMetadata.RequestID -} - -type DeleteAccountPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy to delete. - // - // PolicyName is a required field - PolicyName *string `locationName:"policyName" type:"string" required:"true"` - - // The type of policy to delete. Currently, the only valid value is DATA_PROTECTION_POLICY. - // - // PolicyType is a required field - PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAccountPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAccountPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyType == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteAccountPolicyInput) SetPolicyName(v string) *DeleteAccountPolicyInput { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *DeleteAccountPolicyInput) SetPolicyType(v string) *DeleteAccountPolicyInput { - s.PolicyType = &v - return s -} - -type DeleteAccountPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPolicyOutput) GoString() string { - return s.String() -} - -type DeleteDataProtectionPolicyInput struct { - _ struct{} `type:"structure"` - - // The name or ARN of the log group that you want to delete the data protection - // policy for. - // - // LogGroupIdentifier is a required field - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDataProtectionPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDataProtectionPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDataProtectionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDataProtectionPolicyInput"} - if s.LogGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) - } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *DeleteDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *DeleteDataProtectionPolicyInput { - s.LogGroupIdentifier = &v - return s -} - -type DeleteDataProtectionPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDataProtectionPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDataProtectionPolicyOutput) GoString() string { - return s.String() -} - -type DeleteDeliveryDestinationInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery destination that you want to delete. You can find - // a list of delivery destionation names by using the DescribeDeliveryDestinations - // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveryDestinations.html) - // operation. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryDestinationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryDestinationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeliveryDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryDestinationInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteDeliveryDestinationInput) SetName(v string) *DeleteDeliveryDestinationInput { - s.Name = &v - return s -} - -type DeleteDeliveryDestinationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryDestinationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryDestinationOutput) GoString() string { - return s.String() -} - -type DeleteDeliveryDestinationPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery destination that you want to delete the policy for. - // - // DeliveryDestinationName is a required field - DeliveryDestinationName *string `locationName:"deliveryDestinationName" min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryDestinationPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryDestinationPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeliveryDestinationPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryDestinationPolicyInput"} - if s.DeliveryDestinationName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationName")) - } - if s.DeliveryDestinationName != nil && len(*s.DeliveryDestinationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryDestinationName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeliveryDestinationName sets the DeliveryDestinationName field's value. -func (s *DeleteDeliveryDestinationPolicyInput) SetDeliveryDestinationName(v string) *DeleteDeliveryDestinationPolicyInput { - s.DeliveryDestinationName = &v - return s -} - -type DeleteDeliveryDestinationPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryDestinationPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryDestinationPolicyOutput) GoString() string { - return s.String() -} - -type DeleteDeliveryInput struct { - _ struct{} `type:"structure"` - - // The unique ID of the delivery to delete. You can find the ID of a delivery - // with the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) - // operation. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeliveryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteDeliveryInput) SetId(v string) *DeleteDeliveryInput { - s.Id = &v - return s -} - -type DeleteDeliveryOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliveryOutput) GoString() string { - return s.String() -} - -type DeleteDeliverySourceInput struct { - _ struct{} `type:"structure"` - - // The name of the delivery source that you want to delete. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliverySourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliverySourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDeliverySourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDeliverySourceInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DeleteDeliverySourceInput) SetName(v string) *DeleteDeliverySourceInput { - s.Name = &v - return s -} - -type DeleteDeliverySourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliverySourceOutput) String() string { - return awsutil.Prettify(s) +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagResource +func (c *CloudWatchLogs) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() } -// GoString returns the string representation. +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. // -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDeliverySourceOutput) GoString() string { - return s.String() +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() } -type DeleteDestinationInput struct { - _ struct{} `type:"structure"` +// You don't have sufficient permissions to perform this action. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - // The name of the destination. - // - // DestinationName is a required field - DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` + Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. @@ -8522,7 +5753,7 @@ type DeleteDestinationInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteDestinationInput) String() string { +func (s AccessDeniedException) String() string { return awsutil.Prettify(s) } @@ -8531,61 +5762,71 @@ func (s DeleteDestinationInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteDestinationInput) GoString() string { +func (s AccessDeniedException) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"} - if s.DestinationName == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationName")) - } - if s.DestinationName != nil && len(*s.DestinationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, } +} - if invalidParams.Len() > 0 { - return invalidParams +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ } - return nil + return "" } -// SetDestinationName sets the DestinationName field's value. -func (s *DeleteDestinationInput) SetDestinationName(v string) *DeleteDestinationInput { - s.DestinationName = &v - return s +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil } -type DeleteDestinationOutput struct { - _ struct{} `type:"structure"` +func (s *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDestinationOutput) String() string { - return awsutil.Prettify(s) +// Status code returns the HTTP status code for the request's response error. +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode } -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDestinationOutput) GoString() string { - return s.String() +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID } -type DeleteLogGroupInput struct { +// A structure that contains information about one CloudWatch Logs account policy. +type AccountPolicy struct { _ struct{} `type:"structure"` - // The name of the log group. + // The Amazon Web Services account ID that the policy applies to. + AccountId *string `locationName:"accountId" min:"12" type:"string"` + + // The date and time that this policy was most recently updated. + LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` + + // The policy document for this account policy. // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + // The JSON specified in policyDocument can be up to 30,720 characters. + PolicyDocument *string `locationName:"policyDocument" type:"string"` + + // The name of the account policy. + PolicyName *string `locationName:"policyName" type:"string"` + + // The type of policy for this account policy. + PolicyType *string `locationName:"policyType" type:"string" enum:"PolicyType"` + + // The scope of the account policy. + Scope *string `locationName:"scope" type:"string" enum:"Scope"` } // String returns the string representation. @@ -8593,7 +5834,7 @@ type DeleteLogGroupInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogGroupInput) String() string { +func (s AccountPolicy) String() string { return awsutil.Prettify(s) } @@ -8602,66 +5843,77 @@ func (s DeleteLogGroupInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogGroupInput) GoString() string { +func (s AccountPolicy) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLogGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } +// SetAccountId sets the AccountId field's value. +func (s *AccountPolicy) SetAccountId(v string) *AccountPolicy { + s.AccountId = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *AccountPolicy) SetLastUpdatedTime(v int64) *AccountPolicy { + s.LastUpdatedTime = &v + return s } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteLogGroupInput) SetLogGroupName(v string) *DeleteLogGroupInput { - s.LogGroupName = &v +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *AccountPolicy) SetPolicyDocument(v string) *AccountPolicy { + s.PolicyDocument = &v return s } -type DeleteLogGroupOutput struct { - _ struct{} `type:"structure"` +// SetPolicyName sets the PolicyName field's value. +func (s *AccountPolicy) SetPolicyName(v string) *AccountPolicy { + s.PolicyName = &v + return s } -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteLogGroupOutput) String() string { - return awsutil.Prettify(s) +// SetPolicyType sets the PolicyType field's value. +func (s *AccountPolicy) SetPolicyType(v string) *AccountPolicy { + s.PolicyType = &v + return s } -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteLogGroupOutput) GoString() string { - return s.String() +// SetScope sets the Scope field's value. +func (s *AccountPolicy) SetScope(v string) *AccountPolicy { + s.Scope = &v + return s } -type DeleteLogStreamInput struct { +type AssociateKmsKeyInput struct { _ struct{} `type:"structure"` + // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log + // data. This must be a symmetric KMS key. For more information, see Amazon + // Resource Names (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms) + // and Using Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html). + // + // KmsKeyId is a required field + KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"` + // The name of the log group. // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + // In your AssociateKmsKey operation, you must specify either the resourceIdentifier + // parameter or the logGroup parameter, but you can't specify both. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - // The name of the log stream. + // Specifies the target for this operation. You must specify one of the following: // - // LogStreamName is a required field - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` + // * Specify the following ARN to have future GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) + // operations in this account encrypt the results with the specified KMS + // key. Replace REGION and ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:query-result:* + // + // * Specify the ARN of a log group to have CloudWatch Logs use the KMS key + // to encrypt log events that are ingested and stored by that log group. + // The log group ARN must be in the following format. Replace REGION and + // ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME + // + // In your AssociateKmsKey operation, you must specify either the resourceIdentifier + // parameter or the logGroup parameter, but you can't specify both. + ResourceIdentifier *string `locationName:"resourceIdentifier" min:"1" type:"string"` } // String returns the string representation. @@ -8669,7 +5921,7 @@ type DeleteLogStreamInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogStreamInput) String() string { +func (s AssociateKmsKeyInput) String() string { return awsutil.Prettify(s) } @@ -8678,24 +5930,21 @@ func (s DeleteLogStreamInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogStreamInput) GoString() string { +func (s AssociateKmsKeyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLogStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) +func (s *AssociateKmsKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateKmsKeyInput"} + if s.KmsKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KmsKeyId")) } if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } - if s.LogStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamName")) - } - if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) + if s.ResourceIdentifier != nil && len(*s.ResourceIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifier", 1)) } if invalidParams.Len() > 0 { @@ -8704,19 +5953,25 @@ func (s *DeleteLogStreamInput) Validate() error { return nil } +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *AssociateKmsKeyInput) SetKmsKeyId(v string) *AssociateKmsKeyInput { + s.KmsKeyId = &v + return s +} + // SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteLogStreamInput) SetLogGroupName(v string) *DeleteLogStreamInput { +func (s *AssociateKmsKeyInput) SetLogGroupName(v string) *AssociateKmsKeyInput { s.LogGroupName = &v return s } -// SetLogStreamName sets the LogStreamName field's value. -func (s *DeleteLogStreamInput) SetLogStreamName(v string) *DeleteLogStreamInput { - s.LogStreamName = &v +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *AssociateKmsKeyInput) SetResourceIdentifier(v string) *AssociateKmsKeyInput { + s.ResourceIdentifier = &v return s } -type DeleteLogStreamOutput struct { +type AssociateKmsKeyOutput struct { _ struct{} `type:"structure"` } @@ -8725,7 +5980,7 @@ type DeleteLogStreamOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogStreamOutput) String() string { +func (s AssociateKmsKeyOutput) String() string { return awsutil.Prettify(s) } @@ -8734,22 +5989,17 @@ func (s DeleteLogStreamOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogStreamOutput) GoString() string { +func (s AssociateKmsKeyOutput) GoString() string { return s.String() } -type DeleteMetricFilterInput struct { +type CancelExportTaskInput struct { _ struct{} `type:"structure"` - // The name of the metric filter. - // - // FilterName is a required field - FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` - - // The name of the log group. + // The ID of the export task. // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + // TaskId is a required field + TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -8757,7 +6007,7 @@ type DeleteMetricFilterInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteMetricFilterInput) String() string { +func (s CancelExportTaskInput) String() string { return awsutil.Prettify(s) } @@ -8766,24 +6016,18 @@ func (s DeleteMetricFilterInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteMetricFilterInput) GoString() string { +func (s CancelExportTaskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMetricFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"} - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) +func (s *CancelExportTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"} + if s.TaskId == nil { + invalidParams.Add(request.NewErrParamRequired("TaskId")) } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) } if invalidParams.Len() > 0 { @@ -8792,19 +6036,13 @@ func (s *DeleteMetricFilterInput) Validate() error { return nil } -// SetFilterName sets the FilterName field's value. -func (s *DeleteMetricFilterInput) SetFilterName(v string) *DeleteMetricFilterInput { - s.FilterName = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteMetricFilterInput) SetLogGroupName(v string) *DeleteMetricFilterInput { - s.LogGroupName = &v +// SetTaskId sets the TaskId field's value. +func (s *CancelExportTaskInput) SetTaskId(v string) *CancelExportTaskInput { + s.TaskId = &v return s } -type DeleteMetricFilterOutput struct { +type CancelExportTaskOutput struct { _ struct{} `type:"structure"` } @@ -8813,7 +6051,7 @@ type DeleteMetricFilterOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteMetricFilterOutput) String() string { +func (s CancelExportTaskOutput) String() string { return awsutil.Prettify(s) } @@ -8822,19 +6060,51 @@ func (s DeleteMetricFilterOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteMetricFilterOutput) GoString() string { +func (s CancelExportTaskOutput) GoString() string { return s.String() } -type DeleteQueryDefinitionInput struct { +type CreateExportTaskInput struct { _ struct{} `type:"structure"` - // The ID of the query definition that you want to delete. You can use DescribeQueryDefinitions - // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html) - // to retrieve the IDs of your saved query definitions. + // The name of S3 bucket for the exported log data. The bucket must be in the + // same Amazon Web Services Region. // - // QueryDefinitionId is a required field - QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string" required:"true"` + // Destination is a required field + Destination *string `locationName:"destination" min:"1" type:"string" required:"true"` + + // The prefix used as the start of the key for every object exported. If you + // don't specify a value, the default is exportedlogs. + DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` + + // The start time of the range for the request, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this + // time are not exported. + // + // From is a required field + From *int64 `locationName:"from" type:"long" required:"true"` + + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + + // Export only log streams that match the provided prefix. If you don't specify + // a value, no prefix filter is applied. + LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` + + // The name of the export task. + TaskName *string `locationName:"taskName" min:"1" type:"string"` + + // The end time of the range for the request, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time + // are not exported. + // + // You must specify a time that is not earlier than when this log group was + // created. + // + // To is a required field + To *int64 `locationName:"to" type:"long" required:"true"` } // String returns the string representation. @@ -8842,7 +6112,7 @@ type DeleteQueryDefinitionInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteQueryDefinitionInput) String() string { +func (s CreateExportTaskInput) String() string { return awsutil.Prettify(s) } @@ -8851,15 +6121,36 @@ func (s DeleteQueryDefinitionInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteQueryDefinitionInput) GoString() string { +func (s CreateExportTaskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteQueryDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteQueryDefinitionInput"} - if s.QueryDefinitionId == nil { - invalidParams.Add(request.NewErrParamRequired("QueryDefinitionId")) +func (s *CreateExportTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.Destination != nil && len(*s.Destination) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Destination", 1)) + } + if s.From == nil { + invalidParams.Add(request.NewErrParamRequired("From")) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) + } + if s.TaskName != nil && len(*s.TaskName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskName", 1)) + } + if s.To == nil { + invalidParams.Add(request.NewErrParamRequired("To")) } if invalidParams.Len() > 0 { @@ -8868,18 +6159,53 @@ func (s *DeleteQueryDefinitionInput) Validate() error { return nil } -// SetQueryDefinitionId sets the QueryDefinitionId field's value. -func (s *DeleteQueryDefinitionInput) SetQueryDefinitionId(v string) *DeleteQueryDefinitionInput { - s.QueryDefinitionId = &v +// SetDestination sets the Destination field's value. +func (s *CreateExportTaskInput) SetDestination(v string) *CreateExportTaskInput { + s.Destination = &v return s } -type DeleteQueryDefinitionOutput struct { +// SetDestinationPrefix sets the DestinationPrefix field's value. +func (s *CreateExportTaskInput) SetDestinationPrefix(v string) *CreateExportTaskInput { + s.DestinationPrefix = &v + return s +} + +// SetFrom sets the From field's value. +func (s *CreateExportTaskInput) SetFrom(v int64) *CreateExportTaskInput { + s.From = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *CreateExportTaskInput) SetLogGroupName(v string) *CreateExportTaskInput { + s.LogGroupName = &v + return s +} + +// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. +func (s *CreateExportTaskInput) SetLogStreamNamePrefix(v string) *CreateExportTaskInput { + s.LogStreamNamePrefix = &v + return s +} + +// SetTaskName sets the TaskName field's value. +func (s *CreateExportTaskInput) SetTaskName(v string) *CreateExportTaskInput { + s.TaskName = &v + return s +} + +// SetTo sets the To field's value. +func (s *CreateExportTaskInput) SetTo(v int64) *CreateExportTaskInput { + s.To = &v + return s +} + +type CreateExportTaskOutput struct { _ struct{} `type:"structure"` - // A value of TRUE indicates that the operation succeeded. FALSE indicates that - // the operation failed. - Success *bool `locationName:"success" type:"boolean"` + // The ID of the export task. + TaskId *string `locationName:"taskId" min:"1" type:"string"` } // String returns the string representation. @@ -8887,7 +6213,7 @@ type DeleteQueryDefinitionOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteQueryDefinitionOutput) String() string { +func (s CreateExportTaskOutput) String() string { return awsutil.Prettify(s) } @@ -8896,21 +6222,39 @@ func (s DeleteQueryDefinitionOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteQueryDefinitionOutput) GoString() string { +func (s CreateExportTaskOutput) GoString() string { return s.String() } -// SetSuccess sets the Success field's value. -func (s *DeleteQueryDefinitionOutput) SetSuccess(v bool) *DeleteQueryDefinitionOutput { - s.Success = &v +// SetTaskId sets the TaskId field's value. +func (s *CreateExportTaskOutput) SetTaskId(v string) *CreateExportTaskOutput { + s.TaskId = &v return s } -type DeleteResourcePolicyInput struct { +type CreateLogGroupInput struct { _ struct{} `type:"structure"` - // The name of the policy to be revoked. This parameter is required. - PolicyName *string `locationName:"policyName" type:"string"` + // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log + // data. For more information, see Amazon Resource Names (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms). + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + + // The key-value pairs to use for the tags. + // + // You can grant users access to certain log groups while preventing them from + // accessing other log groups. To do so, tag your groups and use IAM policies + // that refer to those tags. To assign tags when you create a log group, you + // must have either the logs:TagResource or logs:TagLogGroup permission. For + // more information about tagging, see Tagging Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). For more + // information about using tags to control access, see Controlling access to + // Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). + Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } // String returns the string representation. @@ -8918,7 +6262,7 @@ type DeleteResourcePolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteResourcePolicyInput) String() string { +func (s CreateLogGroupInput) String() string { return awsutil.Prettify(s) } @@ -8927,17 +6271,48 @@ func (s DeleteResourcePolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteResourcePolicyInput) GoString() string { +func (s CreateLogGroupInput) GoString() string { return s.String() } -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteResourcePolicyInput) SetPolicyName(v string) *DeleteResourcePolicyInput { - s.PolicyName = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLogGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateLogGroupInput) SetKmsKeyId(v string) *CreateLogGroupInput { + s.KmsKeyId = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *CreateLogGroupInput) SetLogGroupName(v string) *CreateLogGroupInput { + s.LogGroupName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLogGroupInput) SetTags(v map[string]*string) *CreateLogGroupInput { + s.Tags = v return s } -type DeleteResourcePolicyOutput struct { +type CreateLogGroupOutput struct { _ struct{} `type:"structure"` } @@ -8946,7 +6321,7 @@ type DeleteResourcePolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteResourcePolicyOutput) String() string { +func (s CreateLogGroupOutput) String() string { return awsutil.Prettify(s) } @@ -8955,17 +6330,22 @@ func (s DeleteResourcePolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteResourcePolicyOutput) GoString() string { +func (s CreateLogGroupOutput) GoString() string { return s.String() } -type DeleteRetentionPolicyInput struct { +type CreateLogStreamInput struct { _ struct{} `type:"structure"` // The name of the log group. // // LogGroupName is a required field LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + + // The name of the log stream. + // + // LogStreamName is a required field + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -8973,7 +6353,7 @@ type DeleteRetentionPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteRetentionPolicyInput) String() string { +func (s CreateLogStreamInput) String() string { return awsutil.Prettify(s) } @@ -8982,19 +6362,25 @@ func (s DeleteRetentionPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteRetentionPolicyInput) GoString() string { +func (s CreateLogStreamInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRetentionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"} +func (s *CreateLogStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"} if s.LogGroupName == nil { invalidParams.Add(request.NewErrParamRequired("LogGroupName")) } if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9003,12 +6389,18 @@ func (s *DeleteRetentionPolicyInput) Validate() error { } // SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteRetentionPolicyInput) SetLogGroupName(v string) *DeleteRetentionPolicyInput { +func (s *CreateLogStreamInput) SetLogGroupName(v string) *CreateLogStreamInput { s.LogGroupName = &v return s } -type DeleteRetentionPolicyOutput struct { +// SetLogStreamName sets the LogStreamName field's value. +func (s *CreateLogStreamInput) SetLogStreamName(v string) *CreateLogStreamInput { + s.LogStreamName = &v + return s +} + +type CreateLogStreamOutput struct { _ struct{} `type:"structure"` } @@ -9017,7 +6409,7 @@ type DeleteRetentionPolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteRetentionPolicyOutput) String() string { +func (s CreateLogStreamOutput) String() string { return awsutil.Prettify(s) } @@ -9026,22 +6418,21 @@ func (s DeleteRetentionPolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteRetentionPolicyOutput) GoString() string { +func (s CreateLogStreamOutput) GoString() string { return s.String() } -type DeleteSubscriptionFilterInput struct { - _ struct{} `type:"structure"` +// The event was already logged. +// +// PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException +// regardless of whether a given batch of log events has already been accepted. +type DataAlreadyAcceptedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - // The name of the subscription filter. - // - // FilterName is a required field - FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` + ExpectedSequenceToken *string `locationName:"expectedSequenceToken" min:"1" type:"string"` - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. @@ -9049,7 +6440,7 @@ type DeleteSubscriptionFilterInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteSubscriptionFilterInput) String() string { +func (s DataAlreadyAcceptedException) String() string { return awsutil.Prettify(s) } @@ -9058,46 +6449,60 @@ func (s DeleteSubscriptionFilterInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteSubscriptionFilterInput) GoString() string { +func (s DataAlreadyAcceptedException) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSubscriptionFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"} - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) +func newErrorDataAlreadyAcceptedException(v protocol.ResponseMetadata) error { + return &DataAlreadyAcceptedException{ + RespMetadata: v, } +} - if invalidParams.Len() > 0 { - return invalidParams +// Code returns the exception type name. +func (s *DataAlreadyAcceptedException) Code() string { + return "DataAlreadyAcceptedException" +} + +// Message returns the exception's message. +func (s *DataAlreadyAcceptedException) Message() string { + if s.Message_ != nil { + return *s.Message_ } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *DataAlreadyAcceptedException) OrigErr() error { return nil } -// SetFilterName sets the FilterName field's value. -func (s *DeleteSubscriptionFilterInput) SetFilterName(v string) *DeleteSubscriptionFilterInput { - s.FilterName = &v - return s +func (s *DataAlreadyAcceptedException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteSubscriptionFilterInput) SetLogGroupName(v string) *DeleteSubscriptionFilterInput { - s.LogGroupName = &v - return s +// Status code returns the HTTP status code for the request's response error. +func (s *DataAlreadyAcceptedException) StatusCode() int { + return s.RespMetadata.StatusCode } -type DeleteSubscriptionFilterOutput struct { +// RequestID returns the service's response RequestID for request. +func (s *DataAlreadyAcceptedException) RequestID() string { + return s.RespMetadata.RequestID +} + +type DeleteAccountPolicyInput struct { _ struct{} `type:"structure"` + + // The name of the policy to delete. + // + // PolicyName is a required field + PolicyName *string `locationName:"policyName" type:"string" required:"true"` + + // The type of policy to delete. Currently, the only valid value is DATA_PROTECTION_POLICY. + // + // PolicyType is a required field + PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` } // String returns the string representation. @@ -9105,7 +6510,7 @@ type DeleteSubscriptionFilterOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteSubscriptionFilterOutput) String() string { +func (s DeleteAccountPolicyInput) String() string { return awsutil.Prettify(s) } @@ -9114,39 +6519,40 @@ func (s DeleteSubscriptionFilterOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteSubscriptionFilterOutput) GoString() string { +func (s DeleteAccountPolicyInput) GoString() string { return s.String() } -// This structure contains information about one delivery in your account. -// -// A delivery is a connection between a logical delivery source and a logical -// delivery destination. -// -// For more information, see CreateDelivery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). -// -// You can't update an existing delivery. You can only create and delete deliveries. -type Delivery struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that uniquely identifies this delivery. - Arn *string `locationName:"arn" type:"string"` - - // The ARN of the delivery destination that is associated with this delivery. - DeliveryDestinationArn *string `locationName:"deliveryDestinationArn" type:"string"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAccountPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAccountPolicyInput"} + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyType == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyType")) + } - // Displays whether the delivery destination associated with this delivery is - // CloudWatch Logs, Amazon S3, or Kinesis Data Firehose. - DeliveryDestinationType *string `locationName:"deliveryDestinationType" type:"string" enum:"DeliveryDestinationType"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The name of the delivery source that is associated with this delivery. - DeliverySourceName *string `locationName:"deliverySourceName" min:"1" type:"string"` +// SetPolicyName sets the PolicyName field's value. +func (s *DeleteAccountPolicyInput) SetPolicyName(v string) *DeleteAccountPolicyInput { + s.PolicyName = &v + return s +} - // The unique ID that identifies this delivery in your account. - Id *string `locationName:"id" min:"1" type:"string"` +// SetPolicyType sets the PolicyType field's value. +func (s *DeleteAccountPolicyInput) SetPolicyType(v string) *DeleteAccountPolicyInput { + s.PolicyType = &v + return s +} - // The tags that have been assigned to this delivery. - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` +type DeleteAccountPolicyOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation. @@ -9154,7 +6560,7 @@ type Delivery struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s Delivery) String() string { +func (s DeleteAccountPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -9163,95 +6569,18 @@ func (s Delivery) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s Delivery) GoString() string { +func (s DeleteAccountPolicyOutput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *Delivery) SetArn(v string) *Delivery { - s.Arn = &v - return s -} - -// SetDeliveryDestinationArn sets the DeliveryDestinationArn field's value. -func (s *Delivery) SetDeliveryDestinationArn(v string) *Delivery { - s.DeliveryDestinationArn = &v - return s -} - -// SetDeliveryDestinationType sets the DeliveryDestinationType field's value. -func (s *Delivery) SetDeliveryDestinationType(v string) *Delivery { - s.DeliveryDestinationType = &v - return s -} - -// SetDeliverySourceName sets the DeliverySourceName field's value. -func (s *Delivery) SetDeliverySourceName(v string) *Delivery { - s.DeliverySourceName = &v - return s -} - -// SetId sets the Id field's value. -func (s *Delivery) SetId(v string) *Delivery { - s.Id = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Delivery) SetTags(v map[string]*string) *Delivery { - s.Tags = v - return s -} - -// This structure contains information about one delivery destination in your -// account. A delivery destination is an Amazon Web Services resource that represents -// an shared id="AWS"/> service that logs can be sent to. CloudWatch Logs, Amazon -// S3, are supported as Kinesis Data Firehose delivery destinations. -// -// To configure logs delivery between a supported Amazon Web Services service -// and a destination, you must do the following: -// -// - Create a delivery source, which is a logical object that represents -// the resource that is actually sending the logs. For more information, -// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). -// -// - Create a delivery destination, which is a logical object that represents -// the actual delivery destination. -// -// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) -// in the destination account to assign an IAM policy to the destination. -// This policy allows delivery to that destination. -// -// - Create a delivery by pairing exactly one delivery source and one delivery -// destination. For more information, see CreateDelivery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). -// -// You can configure a single delivery source to send logs to multiple destinations -// by creating multiple deliveries. You can also create multiple deliveries -// to configure multiple delivery sources to send logs to the same delivery -// destination. -type DeliveryDestination struct { +type DeleteDataProtectionPolicyInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) that uniquely identifies this delivery destination. - Arn *string `locationName:"arn" type:"string"` - - // A structure that contains the ARN of the Amazon Web Services resource that - // will receive the logs. - DeliveryDestinationConfiguration *DeliveryDestinationConfiguration `locationName:"deliveryDestinationConfiguration" type:"structure"` - - // Displays whether this delivery destination is CloudWatch Logs, Amazon S3, - // or Kinesis Data Firehose. - DeliveryDestinationType *string `locationName:"deliveryDestinationType" type:"string" enum:"DeliveryDestinationType"` - - // The name of this delivery destination. - Name *string `locationName:"name" min:"1" type:"string"` - - // The format of the logs that are sent to this delivery destination. - OutputFormat *string `locationName:"outputFormat" type:"string" enum:"OutputFormat"` - - // The tags that have been assigned to this delivery destination. - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` + // The name or ARN of the log group that you want to delete the data protection + // policy for. + // + // LogGroupIdentifier is a required field + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -9259,7 +6588,7 @@ type DeliveryDestination struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeliveryDestination) String() string { +func (s DeleteDataProtectionPolicyInput) String() string { return awsutil.Prettify(s) } @@ -9268,56 +6597,61 @@ func (s DeliveryDestination) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeliveryDestination) GoString() string { +func (s DeleteDataProtectionPolicyInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *DeliveryDestination) SetArn(v string) *DeliveryDestination { - s.Arn = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDataProtectionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDataProtectionPolicyInput"} + if s.LogGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) + } + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + } -// SetDeliveryDestinationConfiguration sets the DeliveryDestinationConfiguration field's value. -func (s *DeliveryDestination) SetDeliveryDestinationConfiguration(v *DeliveryDestinationConfiguration) *DeliveryDestination { - s.DeliveryDestinationConfiguration = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetDeliveryDestinationType sets the DeliveryDestinationType field's value. -func (s *DeliveryDestination) SetDeliveryDestinationType(v string) *DeliveryDestination { - s.DeliveryDestinationType = &v +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *DeleteDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *DeleteDataProtectionPolicyInput { + s.LogGroupIdentifier = &v return s } -// SetName sets the Name field's value. -func (s *DeliveryDestination) SetName(v string) *DeliveryDestination { - s.Name = &v - return s +type DeleteDataProtectionPolicyOutput struct { + _ struct{} `type:"structure"` } -// SetOutputFormat sets the OutputFormat field's value. -func (s *DeliveryDestination) SetOutputFormat(v string) *DeliveryDestination { - s.OutputFormat = &v - return s +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDataProtectionPolicyOutput) String() string { + return awsutil.Prettify(s) } -// SetTags sets the Tags field's value. -func (s *DeliveryDestination) SetTags(v map[string]*string) *DeliveryDestination { - s.Tags = v - return s +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDataProtectionPolicyOutput) GoString() string { + return s.String() } -// A structure that contains information about one logs delivery destination. -type DeliveryDestinationConfiguration struct { +type DeleteDestinationInput struct { _ struct{} `type:"structure"` - // 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. + // The name of the destination. // - // DestinationResourceArn is a required field - DestinationResourceArn *string `locationName:"destinationResourceArn" type:"string" required:"true"` + // DestinationName is a required field + DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -9325,7 +6659,7 @@ type DeliveryDestinationConfiguration struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeliveryDestinationConfiguration) String() string { +func (s DeleteDestinationInput) String() string { return awsutil.Prettify(s) } @@ -9334,15 +6668,18 @@ func (s DeliveryDestinationConfiguration) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeliveryDestinationConfiguration) GoString() string { +func (s DeleteDestinationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeliveryDestinationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeliveryDestinationConfiguration"} - if s.DestinationResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationResourceArn")) +func (s *DeleteDestinationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"} + if s.DestinationName == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationName")) + } + if s.DestinationName != nil && len(*s.DestinationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) } if invalidParams.Len() > 0 { @@ -9351,68 +6688,14 @@ func (s *DeliveryDestinationConfiguration) Validate() error { return nil } -// SetDestinationResourceArn sets the DestinationResourceArn field's value. -func (s *DeliveryDestinationConfiguration) SetDestinationResourceArn(v string) *DeliveryDestinationConfiguration { - s.DestinationResourceArn = &v +// SetDestinationName sets the DestinationName field's value. +func (s *DeleteDestinationInput) SetDestinationName(v string) *DeleteDestinationInput { + s.DestinationName = &v return s } -// This structure contains information about one delivery source 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. -// -// Only some Amazon Web Services services support being configured as a delivery -// source. These services are listed as Supported [V2 Permissions] in the table -// at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ -// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) -// -// To configure logs delivery between a supported Amazon Web Services service -// and a destination, you must do the following: -// -// - Create a delivery source, which is a logical object that represents -// the resource that is actually sending the logs. For more information, -// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). -// -// - Create a delivery destination, which is a logical object that represents -// the actual delivery destination. For more information, see PutDeliveryDestination -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). -// -// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) -// in the destination account to assign an IAM policy to the destination. -// This policy allows delivery to that destination. -// -// - Create a delivery by pairing exactly one delivery source and one delivery -// destination. For more information, see CreateDelivery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). -// -// You can configure a single delivery source to send logs to multiple destinations -// by creating multiple deliveries. You can also create multiple deliveries -// to configure multiple delivery sources to send logs to the same delivery -// destination. -type DeliverySource struct { +type DeleteDestinationOutput struct { _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that uniquely identifies this delivery source. - Arn *string `locationName:"arn" type:"string"` - - // The type of log that the source is sending. For valid values for this parameter, - // see the documentation for the source service. - LogType *string `locationName:"logType" min:"1" type:"string"` - - // The unique name of the delivery source. - Name *string `locationName:"name" min:"1" type:"string"` - - // This array contains the ARN of the Amazon Web Services resource that sends - // logs and is represented by this delivery source. Currently, only one ARN - // can be in the array. - ResourceArns []*string `locationName:"resourceArns" type:"list"` - - // The Amazon Web Services service that is sending logs. - Service *string `locationName:"service" min:"1" type:"string"` - - // The tags that have been assigned to this delivery source. - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } // String returns the string representation. @@ -9420,7 +6703,7 @@ type DeliverySource struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeliverySource) String() string { +func (s DeleteDestinationOutput) String() string { return awsutil.Prettify(s) } @@ -9429,68 +6712,17 @@ func (s DeliverySource) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeliverySource) GoString() string { +func (s DeleteDestinationOutput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *DeliverySource) SetArn(v string) *DeliverySource { - s.Arn = &v - return s -} - -// SetLogType sets the LogType field's value. -func (s *DeliverySource) SetLogType(v string) *DeliverySource { - s.LogType = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeliverySource) SetName(v string) *DeliverySource { - s.Name = &v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *DeliverySource) SetResourceArns(v []*string) *DeliverySource { - s.ResourceArns = v - return s -} - -// SetService sets the Service field's value. -func (s *DeliverySource) SetService(v string) *DeliverySource { - s.Service = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DeliverySource) SetTags(v map[string]*string) *DeliverySource { - s.Tags = v - return s -} - -type DescribeAccountPoliciesInput struct { +type DeleteLogGroupInput struct { _ struct{} `type:"structure"` - // If you are using an account that is set up as a monitoring account for CloudWatch - // unified cross-account observability, you can use this to specify the account - // ID of a source account. If you do, the operation returns the account policy - // for the specified account. Currently, you can specify only one account ID - // in this parameter. - // - // If you omit this parameter, only the policy in the current account is returned. - AccountIdentifiers []*string `locationName:"accountIdentifiers" type:"list"` - - // Use this parameter to limit the returned policies to only the policy with - // the name that you specify. - PolicyName *string `locationName:"policyName" type:"string"` - - // Use this parameter to limit the returned policies to only the policies that - // match the policy type that you specify. Currently, the only valid value is - // DATA_PROTECTION_POLICY. + // The name of the log group. // - // PolicyType is a required field - PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -9498,7 +6730,7 @@ type DescribeAccountPoliciesInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeAccountPoliciesInput) String() string { +func (s DeleteLogGroupInput) String() string { return awsutil.Prettify(s) } @@ -9507,15 +6739,18 @@ func (s DescribeAccountPoliciesInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeAccountPoliciesInput) GoString() string { +func (s DeleteLogGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountPoliciesInput"} - if s.PolicyType == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyType")) +func (s *DeleteLogGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } if invalidParams.Len() > 0 { @@ -9524,30 +6759,14 @@ func (s *DescribeAccountPoliciesInput) Validate() error { return nil } -// SetAccountIdentifiers sets the AccountIdentifiers field's value. -func (s *DescribeAccountPoliciesInput) SetAccountIdentifiers(v []*string) *DescribeAccountPoliciesInput { - s.AccountIdentifiers = v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DescribeAccountPoliciesInput) SetPolicyName(v string) *DescribeAccountPoliciesInput { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *DescribeAccountPoliciesInput) SetPolicyType(v string) *DescribeAccountPoliciesInput { - s.PolicyType = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *DeleteLogGroupInput) SetLogGroupName(v string) *DeleteLogGroupInput { + s.LogGroupName = &v return s } -type DescribeAccountPoliciesOutput struct { +type DeleteLogGroupOutput struct { _ struct{} `type:"structure"` - - // An array of structures that contain information about the CloudWatch Logs - // account policies that match the specified filters. - AccountPolicies []*AccountPolicy `locationName:"accountPolicies" type:"list"` } // String returns the string representation. @@ -9555,7 +6774,7 @@ type DescribeAccountPoliciesOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeAccountPoliciesOutput) String() string { +func (s DeleteLogGroupOutput) String() string { return awsutil.Prettify(s) } @@ -9564,25 +6783,22 @@ func (s DescribeAccountPoliciesOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeAccountPoliciesOutput) GoString() string { +func (s DeleteLogGroupOutput) GoString() string { return s.String() } -// SetAccountPolicies sets the AccountPolicies field's value. -func (s *DescribeAccountPoliciesOutput) SetAccountPolicies(v []*AccountPolicy) *DescribeAccountPoliciesOutput { - s.AccountPolicies = v - return s -} - -type DescribeDeliveriesInput struct { +type DeleteLogStreamInput struct { _ struct{} `type:"structure"` - // Optionally specify the maximum number of deliveries to return in the response. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The name of the log stream. + // + // LogStreamName is a required field + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -9590,7 +6806,7 @@ type DescribeDeliveriesInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliveriesInput) String() string { +func (s DeleteLogStreamInput) String() string { return awsutil.Prettify(s) } @@ -9599,18 +6815,24 @@ func (s DescribeDeliveriesInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliveriesInput) GoString() string { +func (s DeleteLogStreamInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDeliveriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDeliveriesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) +func (s *DeleteLogStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) } if invalidParams.Len() > 0 { @@ -9619,28 +6841,20 @@ func (s *DescribeDeliveriesInput) Validate() error { return nil } -// SetLimit sets the Limit field's value. -func (s *DescribeDeliveriesInput) SetLimit(v int64) *DescribeDeliveriesInput { - s.Limit = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *DeleteLogStreamInput) SetLogGroupName(v string) *DeleteLogStreamInput { + s.LogGroupName = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeDeliveriesInput) SetNextToken(v string) *DescribeDeliveriesInput { - s.NextToken = &v +// SetLogStreamName sets the LogStreamName field's value. +func (s *DeleteLogStreamInput) SetLogStreamName(v string) *DeleteLogStreamInput { + s.LogStreamName = &v return s } -type DescribeDeliveriesOutput struct { +type DeleteLogStreamOutput struct { _ struct{} `type:"structure"` - - // An array of structures. Each structure contains information about one delivery - // in the account. - Deliveries []*Delivery `locationName:"deliveries" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -9648,7 +6862,7 @@ type DescribeDeliveriesOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliveriesOutput) String() string { +func (s DeleteLogStreamOutput) String() string { return awsutil.Prettify(s) } @@ -9657,32 +6871,22 @@ func (s DescribeDeliveriesOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliveriesOutput) GoString() string { +func (s DeleteLogStreamOutput) GoString() string { return s.String() } -// SetDeliveries sets the Deliveries field's value. -func (s *DescribeDeliveriesOutput) SetDeliveries(v []*Delivery) *DescribeDeliveriesOutput { - s.Deliveries = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDeliveriesOutput) SetNextToken(v string) *DescribeDeliveriesOutput { - s.NextToken = &v - return s -} - -type DescribeDeliveryDestinationsInput struct { +type DeleteMetricFilterInput struct { _ struct{} `type:"structure"` - // Optionally specify the maximum number of delivery destinations to return - // in the response. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` + // The name of the metric filter. + // + // FilterName is a required field + FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -9690,7 +6894,7 @@ type DescribeDeliveryDestinationsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliveryDestinationsInput) String() string { +func (s DeleteMetricFilterInput) String() string { return awsutil.Prettify(s) } @@ -9699,18 +6903,24 @@ func (s DescribeDeliveryDestinationsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliveryDestinationsInput) GoString() string { +func (s DeleteMetricFilterInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDeliveryDestinationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDeliveryDestinationsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) +func (s *DeleteMetricFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"} + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } if invalidParams.Len() > 0 { @@ -9719,28 +6929,20 @@ func (s *DescribeDeliveryDestinationsInput) Validate() error { return nil } -// SetLimit sets the Limit field's value. -func (s *DescribeDeliveryDestinationsInput) SetLimit(v int64) *DescribeDeliveryDestinationsInput { - s.Limit = &v +// SetFilterName sets the FilterName field's value. +func (s *DeleteMetricFilterInput) SetFilterName(v string) *DeleteMetricFilterInput { + s.FilterName = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeDeliveryDestinationsInput) SetNextToken(v string) *DescribeDeliveryDestinationsInput { - s.NextToken = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *DeleteMetricFilterInput) SetLogGroupName(v string) *DeleteMetricFilterInput { + s.LogGroupName = &v return s } -type DescribeDeliveryDestinationsOutput struct { +type DeleteMetricFilterOutput struct { _ struct{} `type:"structure"` - - // An array of structures. Each structure contains information about one delivery - // destination in the account. - DeliveryDestinations []*DeliveryDestination `locationName:"deliveryDestinations" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -9748,7 +6950,7 @@ type DescribeDeliveryDestinationsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliveryDestinationsOutput) String() string { +func (s DeleteMetricFilterOutput) String() string { return awsutil.Prettify(s) } @@ -9757,32 +6959,19 @@ func (s DescribeDeliveryDestinationsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliveryDestinationsOutput) GoString() string { +func (s DeleteMetricFilterOutput) GoString() string { return s.String() } -// SetDeliveryDestinations sets the DeliveryDestinations field's value. -func (s *DescribeDeliveryDestinationsOutput) SetDeliveryDestinations(v []*DeliveryDestination) *DescribeDeliveryDestinationsOutput { - s.DeliveryDestinations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDeliveryDestinationsOutput) SetNextToken(v string) *DescribeDeliveryDestinationsOutput { - s.NextToken = &v - return s -} - -type DescribeDeliverySourcesInput struct { - _ struct{} `type:"structure"` - - // Optionally specify the maximum number of delivery sources to return in the - // response. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` +type DeleteQueryDefinitionInput struct { + _ struct{} `type:"structure"` - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The ID of the query definition that you want to delete. You can use DescribeQueryDefinitions + // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html) + // to retrieve the IDs of your saved query definitions. + // + // QueryDefinitionId is a required field + QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string" required:"true"` } // String returns the string representation. @@ -9790,7 +6979,7 @@ type DescribeDeliverySourcesInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliverySourcesInput) String() string { +func (s DeleteQueryDefinitionInput) String() string { return awsutil.Prettify(s) } @@ -9799,18 +6988,15 @@ func (s DescribeDeliverySourcesInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliverySourcesInput) GoString() string { +func (s DeleteQueryDefinitionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDeliverySourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDeliverySourcesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) +func (s *DeleteQueryDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteQueryDefinitionInput"} + if s.QueryDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("QueryDefinitionId")) } if invalidParams.Len() > 0 { @@ -9819,28 +7005,18 @@ func (s *DescribeDeliverySourcesInput) Validate() error { return nil } -// SetLimit sets the Limit field's value. -func (s *DescribeDeliverySourcesInput) SetLimit(v int64) *DescribeDeliverySourcesInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDeliverySourcesInput) SetNextToken(v string) *DescribeDeliverySourcesInput { - s.NextToken = &v +// SetQueryDefinitionId sets the QueryDefinitionId field's value. +func (s *DeleteQueryDefinitionInput) SetQueryDefinitionId(v string) *DeleteQueryDefinitionInput { + s.QueryDefinitionId = &v return s } -type DescribeDeliverySourcesOutput struct { +type DeleteQueryDefinitionOutput struct { _ struct{} `type:"structure"` - // An array of structures. Each structure contains information about one delivery - // source in the account. - DeliverySources []*DeliverySource `locationName:"deliverySources" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // A value of TRUE indicates that the operation succeeded. FALSE indicates that + // the operation failed. + Success *bool `locationName:"success" type:"boolean"` } // String returns the string representation. @@ -9848,7 +7024,7 @@ type DescribeDeliverySourcesOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliverySourcesOutput) String() string { +func (s DeleteQueryDefinitionOutput) String() string { return awsutil.Prettify(s) } @@ -9857,35 +7033,21 @@ func (s DescribeDeliverySourcesOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDeliverySourcesOutput) GoString() string { +func (s DeleteQueryDefinitionOutput) GoString() string { return s.String() } -// SetDeliverySources sets the DeliverySources field's value. -func (s *DescribeDeliverySourcesOutput) SetDeliverySources(v []*DeliverySource) *DescribeDeliverySourcesOutput { - s.DeliverySources = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDeliverySourcesOutput) SetNextToken(v string) *DescribeDeliverySourcesOutput { - s.NextToken = &v +// SetSuccess sets the Success field's value. +func (s *DeleteQueryDefinitionOutput) SetSuccess(v bool) *DeleteQueryDefinitionOutput { + s.Success = &v return s } -type DescribeDestinationsInput struct { +type DeleteResourcePolicyInput struct { _ struct{} `type:"structure"` - // The prefix to match. If you don't specify a value, no prefix filter is applied. - DestinationNamePrefix *string `min:"1" type:"string"` - - // The maximum number of items returned. If you don't specify a value, the default - // maximum value of 50 items is used. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The name of the policy to be revoked. This parameter is required. + PolicyName *string `locationName:"policyName" type:"string"` } // String returns the string representation. @@ -9893,7 +7055,7 @@ type DescribeDestinationsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDestinationsInput) String() string { +func (s DeleteResourcePolicyInput) String() string { return awsutil.Prettify(s) } @@ -9902,56 +7064,18 @@ func (s DescribeDestinationsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDestinationsInput) GoString() string { +func (s DeleteResourcePolicyInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDestinationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"} - if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1)) - } - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationNamePrefix sets the DestinationNamePrefix field's value. -func (s *DescribeDestinationsInput) SetDestinationNamePrefix(v string) *DescribeDestinationsInput { - s.DestinationNamePrefix = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeDestinationsInput) SetLimit(v int64) *DescribeDestinationsInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDestinationsInput) SetNextToken(v string) *DescribeDestinationsInput { - s.NextToken = &v +// SetPolicyName sets the PolicyName field's value. +func (s *DeleteResourcePolicyInput) SetPolicyName(v string) *DeleteResourcePolicyInput { + s.PolicyName = &v return s } -type DescribeDestinationsOutput struct { +type DeleteResourcePolicyOutput struct { _ struct{} `type:"structure"` - - // The destinations. - Destinations []*Destination `locationName:"destinations" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -9959,7 +7083,7 @@ type DescribeDestinationsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDestinationsOutput) String() string { +func (s DeleteResourcePolicyOutput) String() string { return awsutil.Prettify(s) } @@ -9968,40 +7092,17 @@ func (s DescribeDestinationsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDestinationsOutput) GoString() string { +func (s DeleteResourcePolicyOutput) GoString() string { return s.String() } -// SetDestinations sets the Destinations field's value. -func (s *DescribeDestinationsOutput) SetDestinations(v []*Destination) *DescribeDestinationsOutput { - s.Destinations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeDestinationsOutput) SetNextToken(v string) *DescribeDestinationsOutput { - s.NextToken = &v - return s -} - -type DescribeExportTasksInput struct { +type DeleteRetentionPolicyInput struct { _ struct{} `type:"structure"` - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The status code of the export task. Specifying a status code filters the - // results to zero or more export tasks. - StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"` - - // The ID of the export task. Specifying a task ID filters the results to one - // or zero export tasks. - TaskId *string `locationName:"taskId" min:"1" type:"string"` + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -10009,7 +7110,7 @@ type DescribeExportTasksInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeExportTasksInput) String() string { +func (s DeleteRetentionPolicyInput) String() string { return awsutil.Prettify(s) } @@ -10018,21 +7119,18 @@ func (s DescribeExportTasksInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeExportTasksInput) GoString() string { +func (s DeleteRetentionPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeExportTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) +func (s *DeleteRetentionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } if invalidParams.Len() > 0 { @@ -10041,39 +7139,14 @@ func (s *DescribeExportTasksInput) Validate() error { return nil } -// SetLimit sets the Limit field's value. -func (s *DescribeExportTasksInput) SetLimit(v int64) *DescribeExportTasksInput { - s.Limit = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeExportTasksInput) SetNextToken(v string) *DescribeExportTasksInput { - s.NextToken = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *DescribeExportTasksInput) SetStatusCode(v string) *DescribeExportTasksInput { - s.StatusCode = &v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *DescribeExportTasksInput) SetTaskId(v string) *DescribeExportTasksInput { - s.TaskId = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *DeleteRetentionPolicyInput) SetLogGroupName(v string) *DeleteRetentionPolicyInput { + s.LogGroupName = &v return s } -type DescribeExportTasksOutput struct { +type DeleteRetentionPolicyOutput struct { _ struct{} `type:"structure"` - - // The export tasks. - ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -10081,7 +7154,7 @@ type DescribeExportTasksOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeExportTasksOutput) String() string { +func (s DeleteRetentionPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -10090,63 +7163,22 @@ func (s DescribeExportTasksOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeExportTasksOutput) GoString() string { +func (s DeleteRetentionPolicyOutput) GoString() string { return s.String() } -// SetExportTasks sets the ExportTasks field's value. -func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput { - s.ExportTasks = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeExportTasksOutput) SetNextToken(v string) *DescribeExportTasksOutput { - s.NextToken = &v - return s -} - -type DescribeLogGroupsInput struct { +type DeleteSubscriptionFilterInput struct { _ struct{} `type:"structure"` - // When includeLinkedAccounts is set to True, use this parameter to specify - // the list of accounts to search. You can specify as many as 20 account IDs - // in the array. - AccountIdentifiers []*string `locationName:"accountIdentifiers" type:"list"` - - // If you are using a monitoring account, set this to True to have the operation - // return log groups in the accounts listed in accountIdentifiers. - // - // If this parameter is set to true and accountIdentifiers contains a null value, - // the operation returns all log groups in the monitoring account and all log - // groups in all source accounts that are linked to the monitoring account. - IncludeLinkedAccounts *bool `locationName:"includeLinkedAccounts" type:"boolean"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // If you specify a string for this parameter, the operation returns only log - // groups that have names that match the string based on a case-sensitive substring - // search. For example, if you specify Foo, log groups named FooBar, aws/Foo, - // and GroupFoo would match, but foo, F/o/o and Froo would not match. - // - // If you specify logGroupNamePattern in your request, then only arn, creationTime, - // and logGroupName are included in the response. - // - // logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one - // of these parameters can be passed. - LogGroupNamePattern *string `locationName:"logGroupNamePattern" type:"string"` - - // The prefix to match. + // The name of the subscription filter. // - // logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one - // of these parameters can be passed. - LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"` + // FilterName is a required field + FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -10154,7 +7186,7 @@ type DescribeLogGroupsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogGroupsInput) String() string { +func (s DeleteSubscriptionFilterInput) String() string { return awsutil.Prettify(s) } @@ -10163,21 +7195,24 @@ func (s DescribeLogGroupsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogGroupsInput) GoString() string { +func (s DeleteSubscriptionFilterInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLogGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) +func (s *DeleteSubscriptionFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"} + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) } - if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1)) + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } if invalidParams.Len() > 0 { @@ -10186,54 +7221,20 @@ func (s *DescribeLogGroupsInput) Validate() error { return nil } -// SetAccountIdentifiers sets the AccountIdentifiers field's value. -func (s *DescribeLogGroupsInput) SetAccountIdentifiers(v []*string) *DescribeLogGroupsInput { - s.AccountIdentifiers = v - return s -} - -// SetIncludeLinkedAccounts sets the IncludeLinkedAccounts field's value. -func (s *DescribeLogGroupsInput) SetIncludeLinkedAccounts(v bool) *DescribeLogGroupsInput { - s.IncludeLinkedAccounts = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeLogGroupsInput) SetLimit(v int64) *DescribeLogGroupsInput { - s.Limit = &v - return s -} - -// SetLogGroupNamePattern sets the LogGroupNamePattern field's value. -func (s *DescribeLogGroupsInput) SetLogGroupNamePattern(v string) *DescribeLogGroupsInput { - s.LogGroupNamePattern = &v - return s -} - -// SetLogGroupNamePrefix sets the LogGroupNamePrefix field's value. -func (s *DescribeLogGroupsInput) SetLogGroupNamePrefix(v string) *DescribeLogGroupsInput { - s.LogGroupNamePrefix = &v +// SetFilterName sets the FilterName field's value. +func (s *DeleteSubscriptionFilterInput) SetFilterName(v string) *DeleteSubscriptionFilterInput { + s.FilterName = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogGroupsInput) SetNextToken(v string) *DescribeLogGroupsInput { - s.NextToken = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *DeleteSubscriptionFilterInput) SetLogGroupName(v string) *DeleteSubscriptionFilterInput { + s.LogGroupName = &v return s } -type DescribeLogGroupsOutput struct { +type DeleteSubscriptionFilterOutput struct { _ struct{} `type:"structure"` - - // The log groups. - // - // If the retentionInDays value is not included for a log group, then that log - // group's events do not expire. - LogGroups []*LogGroup `locationName:"logGroups" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -10241,7 +7242,7 @@ type DescribeLogGroupsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogGroupsOutput) String() string { +func (s DeleteSubscriptionFilterOutput) String() string { return awsutil.Prettify(s) } @@ -10250,68 +7251,32 @@ func (s DescribeLogGroupsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogGroupsOutput) GoString() string { +func (s DeleteSubscriptionFilterOutput) GoString() string { return s.String() } -// SetLogGroups sets the LogGroups field's value. -func (s *DescribeLogGroupsOutput) SetLogGroups(v []*LogGroup) *DescribeLogGroupsOutput { - s.LogGroups = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogGroupsOutput) SetNextToken(v string) *DescribeLogGroupsOutput { - s.NextToken = &v - return s -} - -type DescribeLogStreamsInput struct { +type DescribeAccountPoliciesInput struct { _ struct{} `type:"structure"` - // If the value is true, results are returned in descending order. If the value - // is to false, results are returned in ascending order. The default value is - // false. - Descending *bool `locationName:"descending" type:"boolean"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // Specify either the name or ARN of the log group to view. If the log group - // is in a source account and you are using a monitoring account, you must use - // the log group ARN. - // - // You must include either logGroupIdentifier or logGroupName, but not both. - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - - // The name of the log group. - // - // You must include either logGroupIdentifier or logGroupName, but not both. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // The prefix to match. + // If you are using an account that is set up as a monitoring account for CloudWatch + // unified cross-account observability, you can use this to specify the account + // ID of a source account. If you do, the operation returns the account policy + // for the specified account. Currently, you can specify only one account ID + // in this parameter. // - // If orderBy is LastEventTime, you cannot specify this parameter. - LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` + // If you omit this parameter, only the policy in the current account is returned. + AccountIdentifiers []*string `locationName:"accountIdentifiers" type:"list"` - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // Use this parameter to limit the returned policies to only the policy with + // the name that you specify. + PolicyName *string `locationName:"policyName" type:"string"` - // If the value is LogStreamName, the results are ordered by log stream name. - // If the value is LastEventTime, the results are ordered by the event time. - // The default value is LogStreamName. - // - // If you order the results by event time, you cannot specify the logStreamNamePrefix - // parameter. + // Use this parameter to limit the returned policies to only the policies that + // match the policy type that you specify. Currently, the only valid value is + // DATA_PROTECTION_POLICY. // - // lastEventTimestamp represents the time of the most recent log event in the - // log stream in CloudWatch Logs. This number is expressed as the number of - // milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on - // an eventual consistency basis. It typically updates in less than an hour - // from ingestion, but in rare situations might take longer. - OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` + // PolicyType is a required field + PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` } // String returns the string representation. @@ -10319,7 +7284,7 @@ type DescribeLogStreamsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogStreamsInput) String() string { +func (s DescribeAccountPoliciesInput) String() string { return awsutil.Prettify(s) } @@ -10328,27 +7293,15 @@ func (s DescribeLogStreamsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogStreamsInput) GoString() string { +func (s DescribeAccountPoliciesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLogStreamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) +func (s *DescribeAccountPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAccountPoliciesInput"} + if s.PolicyType == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyType")) } if invalidParams.Len() > 0 { @@ -10357,57 +7310,30 @@ func (s *DescribeLogStreamsInput) Validate() error { return nil } -// SetDescending sets the Descending field's value. -func (s *DescribeLogStreamsInput) SetDescending(v bool) *DescribeLogStreamsInput { - s.Descending = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeLogStreamsInput) SetLimit(v int64) *DescribeLogStreamsInput { - s.Limit = &v - return s -} - -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *DescribeLogStreamsInput) SetLogGroupIdentifier(v string) *DescribeLogStreamsInput { - s.LogGroupIdentifier = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeLogStreamsInput) SetLogGroupName(v string) *DescribeLogStreamsInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. -func (s *DescribeLogStreamsInput) SetLogStreamNamePrefix(v string) *DescribeLogStreamsInput { - s.LogStreamNamePrefix = &v +// SetAccountIdentifiers sets the AccountIdentifiers field's value. +func (s *DescribeAccountPoliciesInput) SetAccountIdentifiers(v []*string) *DescribeAccountPoliciesInput { + s.AccountIdentifiers = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogStreamsInput) SetNextToken(v string) *DescribeLogStreamsInput { - s.NextToken = &v +// SetPolicyName sets the PolicyName field's value. +func (s *DescribeAccountPoliciesInput) SetPolicyName(v string) *DescribeAccountPoliciesInput { + s.PolicyName = &v return s } -// SetOrderBy sets the OrderBy field's value. -func (s *DescribeLogStreamsInput) SetOrderBy(v string) *DescribeLogStreamsInput { - s.OrderBy = &v +// SetPolicyType sets the PolicyType field's value. +func (s *DescribeAccountPoliciesInput) SetPolicyType(v string) *DescribeAccountPoliciesInput { + s.PolicyType = &v return s } -type DescribeLogStreamsOutput struct { +type DescribeAccountPoliciesOutput struct { _ struct{} `type:"structure"` - // The log streams. - LogStreams []*LogStream `locationName:"logStreams" type:"list"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // An array of structures that contain information about the CloudWatch Logs + // account policies that match the specified filters. + AccountPolicies []*AccountPolicy `locationName:"accountPolicies" type:"list"` } // String returns the string representation. @@ -10415,7 +7341,7 @@ type DescribeLogStreamsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogStreamsOutput) String() string { +func (s DescribeAccountPoliciesOutput) String() string { return awsutil.Prettify(s) } @@ -10424,45 +7350,25 @@ func (s DescribeLogStreamsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogStreamsOutput) GoString() string { +func (s DescribeAccountPoliciesOutput) GoString() string { return s.String() } -// SetLogStreams sets the LogStreams field's value. -func (s *DescribeLogStreamsOutput) SetLogStreams(v []*LogStream) *DescribeLogStreamsOutput { - s.LogStreams = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogStreamsOutput) SetNextToken(v string) *DescribeLogStreamsOutput { - s.NextToken = &v +// SetAccountPolicies sets the AccountPolicies field's value. +func (s *DescribeAccountPoliciesOutput) SetAccountPolicies(v []*AccountPolicy) *DescribeAccountPoliciesOutput { + s.AccountPolicies = v return s } -type DescribeMetricFiltersInput struct { +type DescribeDestinationsInput struct { _ struct{} `type:"structure"` - // The prefix to match. CloudWatch Logs uses the value that you set here only - // if you also include the logGroupName parameter in your request. - FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // The name of the log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // Filters results to include only those with the specified metric name. If - // you include this parameter in your request, you must also include the metricNamespace - // parameter. - MetricName *string `locationName:"metricName" type:"string"` + // The prefix to match. If you don't specify a value, no prefix filter is applied. + DestinationNamePrefix *string `min:"1" type:"string"` - // Filters results to include only those in the specified namespace. If you - // include this parameter in your request, you must also include the metricName - // parameter. - MetricNamespace *string `locationName:"metricNamespace" type:"string"` + // The maximum number of items returned. If you don't specify a value, the default + // maximum value of 50 items is used. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` // The token for the next set of items to return. (You received this token from // a previous call.) @@ -10474,7 +7380,7 @@ type DescribeMetricFiltersInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeMetricFiltersInput) String() string { +func (s DescribeDestinationsInput) String() string { return awsutil.Prettify(s) } @@ -10483,22 +7389,19 @@ func (s DescribeMetricFiltersInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeMetricFiltersInput) GoString() string { +func (s DescribeDestinationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMetricFiltersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"} - if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) +func (s *DescribeDestinationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"} + if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1)) } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } @@ -10509,47 +7412,29 @@ func (s *DescribeMetricFiltersInput) Validate() error { return nil } -// SetFilterNamePrefix sets the FilterNamePrefix field's value. -func (s *DescribeMetricFiltersInput) SetFilterNamePrefix(v string) *DescribeMetricFiltersInput { - s.FilterNamePrefix = &v +// SetDestinationNamePrefix sets the DestinationNamePrefix field's value. +func (s *DescribeDestinationsInput) SetDestinationNamePrefix(v string) *DescribeDestinationsInput { + s.DestinationNamePrefix = &v return s } // SetLimit sets the Limit field's value. -func (s *DescribeMetricFiltersInput) SetLimit(v int64) *DescribeMetricFiltersInput { +func (s *DescribeDestinationsInput) SetLimit(v int64) *DescribeDestinationsInput { s.Limit = &v return s } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeMetricFiltersInput) SetLogGroupName(v string) *DescribeMetricFiltersInput { - s.LogGroupName = &v - return s -} - -// SetMetricName sets the MetricName field's value. -func (s *DescribeMetricFiltersInput) SetMetricName(v string) *DescribeMetricFiltersInput { - s.MetricName = &v - return s -} - -// SetMetricNamespace sets the MetricNamespace field's value. -func (s *DescribeMetricFiltersInput) SetMetricNamespace(v string) *DescribeMetricFiltersInput { - s.MetricNamespace = &v - return s -} - // SetNextToken sets the NextToken field's value. -func (s *DescribeMetricFiltersInput) SetNextToken(v string) *DescribeMetricFiltersInput { +func (s *DescribeDestinationsInput) SetNextToken(v string) *DescribeDestinationsInput { s.NextToken = &v return s } -type DescribeMetricFiltersOutput struct { +type DescribeDestinationsOutput struct { _ struct{} `type:"structure"` - // The metric filters. - MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"` + // The destinations. + Destinations []*Destination `locationName:"destinations" type:"list"` // The token for the next set of items to return. The token expires after 24 // hours. @@ -10561,7 +7446,7 @@ type DescribeMetricFiltersOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeMetricFiltersOutput) String() string { +func (s DescribeDestinationsOutput) String() string { return awsutil.Prettify(s) } @@ -10570,38 +7455,40 @@ func (s DescribeMetricFiltersOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeMetricFiltersOutput) GoString() string { +func (s DescribeDestinationsOutput) GoString() string { return s.String() } -// SetMetricFilters sets the MetricFilters field's value. -func (s *DescribeMetricFiltersOutput) SetMetricFilters(v []*MetricFilter) *DescribeMetricFiltersOutput { - s.MetricFilters = v +// SetDestinations sets the Destinations field's value. +func (s *DescribeDestinationsOutput) SetDestinations(v []*Destination) *DescribeDestinationsOutput { + s.Destinations = v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFiltersOutput { +func (s *DescribeDestinationsOutput) SetNextToken(v string) *DescribeDestinationsOutput { s.NextToken = &v return s } -type DescribeQueriesInput struct { +type DescribeExportTasksInput struct { _ struct{} `type:"structure"` - // Limits the returned queries to only those for the specified log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // Limits the number of returned queries to the specified number. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` - // The token for the next set of items to return. The token expires after 24 - // hours. + // The token for the next set of items to return. (You received this token from + // a previous call.) NextToken *string `locationName:"nextToken" min:"1" type:"string"` - // Limits the returned queries to only those that have the specified status. - // Valid values are Cancelled, Complete, Failed, Running, and Scheduled. - Status *string `locationName:"status" type:"string" enum:"QueryStatus"` + // The status code of the export task. Specifying a status code filters the + // results to zero or more export tasks. + StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"` + + // The ID of the export task. Specifying a task ID filters the results to one + // or zero export tasks. + TaskId *string `locationName:"taskId" min:"1" type:"string"` } // String returns the string representation. @@ -10609,7 +7496,7 @@ type DescribeQueriesInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueriesInput) String() string { +func (s DescribeExportTasksInput) String() string { return awsutil.Prettify(s) } @@ -10618,22 +7505,22 @@ func (s DescribeQueriesInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueriesInput) GoString() string { +func (s DescribeExportTasksInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeQueriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeQueriesInput"} - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) +func (s *DescribeExportTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10641,39 +7528,39 @@ func (s *DescribeQueriesInput) Validate() error { return nil } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeQueriesInput) SetLogGroupName(v string) *DescribeQueriesInput { - s.LogGroupName = &v +// SetLimit sets the Limit field's value. +func (s *DescribeExportTasksInput) SetLimit(v int64) *DescribeExportTasksInput { + s.Limit = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeQueriesInput) SetMaxResults(v int64) *DescribeQueriesInput { - s.MaxResults = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeExportTasksInput) SetNextToken(v string) *DescribeExportTasksInput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeQueriesInput) SetNextToken(v string) *DescribeQueriesInput { - s.NextToken = &v +// SetStatusCode sets the StatusCode field's value. +func (s *DescribeExportTasksInput) SetStatusCode(v string) *DescribeExportTasksInput { + s.StatusCode = &v return s } -// SetStatus sets the Status field's value. -func (s *DescribeQueriesInput) SetStatus(v string) *DescribeQueriesInput { - s.Status = &v +// SetTaskId sets the TaskId field's value. +func (s *DescribeExportTasksInput) SetTaskId(v string) *DescribeExportTasksInput { + s.TaskId = &v return s } -type DescribeQueriesOutput struct { +type DescribeExportTasksOutput struct { _ struct{} `type:"structure"` + // The export tasks. + ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"` + // The token for the next set of items to return. The token expires after 24 // hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The list of queries that match the request. - Queries []*QueryInfo `locationName:"queries" type:"list"` } // String returns the string representation. @@ -10681,7 +7568,7 @@ type DescribeQueriesOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueriesOutput) String() string { +func (s DescribeExportTasksOutput) String() string { return awsutil.Prettify(s) } @@ -10690,35 +7577,63 @@ func (s DescribeQueriesOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueriesOutput) GoString() string { +func (s DescribeExportTasksOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeQueriesOutput) SetNextToken(v string) *DescribeQueriesOutput { - s.NextToken = &v +// SetExportTasks sets the ExportTasks field's value. +func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput { + s.ExportTasks = v return s } -// SetQueries sets the Queries field's value. -func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutput { - s.Queries = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeExportTasksOutput) SetNextToken(v string) *DescribeExportTasksOutput { + s.NextToken = &v return s } -type DescribeQueryDefinitionsInput struct { +type DescribeLogGroupsInput struct { _ struct{} `type:"structure"` - // Limits the number of returned query definitions to the specified number. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + // When includeLinkedAccounts is set to True, use this parameter to specify + // the list of accounts to search. You can specify as many as 20 account IDs + // in the array. + AccountIdentifiers []*string `locationName:"accountIdentifiers" type:"list"` - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // If you are using a monitoring account, set this to True to have the operation + // return log groups in the accounts listed in accountIdentifiers. + // + // If this parameter is set to true and accountIdentifiers contains a null value, + // the operation returns all log groups in the monitoring account and all log + // groups in all source accounts that are linked to the monitoring account. + IncludeLinkedAccounts *bool `locationName:"includeLinkedAccounts" type:"boolean"` - // Use this parameter to filter your results to only the query definitions that - // have names that start with the prefix you specify. - QueryDefinitionNamePrefix *string `locationName:"queryDefinitionNamePrefix" min:"1" type:"string"` + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` + + // If you specify a string for this parameter, the operation returns only log + // groups that have names that match the string based on a case-sensitive substring + // search. For example, if you specify Foo, log groups named FooBar, aws/Foo, + // and GroupFoo would match, but foo, F/o/o and Froo would not match. + // + // If you specify logGroupNamePattern in your request, then only arn, creationTime, + // and logGroupName are included in the response. + // + // logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one + // of these parameters can be passed. + LogGroupNamePattern *string `locationName:"logGroupNamePattern" type:"string"` + + // The prefix to match. + // + // logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one + // of these parameters can be passed. + LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -10726,7 +7641,7 @@ type DescribeQueryDefinitionsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueryDefinitionsInput) String() string { +func (s DescribeLogGroupsInput) String() string { return awsutil.Prettify(s) } @@ -10735,22 +7650,22 @@ func (s DescribeQueryDefinitionsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueryDefinitionsInput) GoString() string { +func (s DescribeLogGroupsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeQueryDefinitionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeQueryDefinitionsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) +func (s *DescribeLogGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1)) } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } - if s.QueryDefinitionNamePrefix != nil && len(*s.QueryDefinitionNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("QueryDefinitionNamePrefix", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -10758,33 +7673,54 @@ func (s *DescribeQueryDefinitionsInput) Validate() error { return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeQueryDefinitionsInput) SetMaxResults(v int64) *DescribeQueryDefinitionsInput { - s.MaxResults = &v +// SetAccountIdentifiers sets the AccountIdentifiers field's value. +func (s *DescribeLogGroupsInput) SetAccountIdentifiers(v []*string) *DescribeLogGroupsInput { + s.AccountIdentifiers = v + return s +} + +// SetIncludeLinkedAccounts sets the IncludeLinkedAccounts field's value. +func (s *DescribeLogGroupsInput) SetIncludeLinkedAccounts(v bool) *DescribeLogGroupsInput { + s.IncludeLinkedAccounts = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeLogGroupsInput) SetLimit(v int64) *DescribeLogGroupsInput { + s.Limit = &v + return s +} + +// SetLogGroupNamePattern sets the LogGroupNamePattern field's value. +func (s *DescribeLogGroupsInput) SetLogGroupNamePattern(v string) *DescribeLogGroupsInput { + s.LogGroupNamePattern = &v + return s +} + +// SetLogGroupNamePrefix sets the LogGroupNamePrefix field's value. +func (s *DescribeLogGroupsInput) SetLogGroupNamePrefix(v string) *DescribeLogGroupsInput { + s.LogGroupNamePrefix = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeQueryDefinitionsInput) SetNextToken(v string) *DescribeQueryDefinitionsInput { +func (s *DescribeLogGroupsInput) SetNextToken(v string) *DescribeLogGroupsInput { s.NextToken = &v return s } -// SetQueryDefinitionNamePrefix sets the QueryDefinitionNamePrefix field's value. -func (s *DescribeQueryDefinitionsInput) SetQueryDefinitionNamePrefix(v string) *DescribeQueryDefinitionsInput { - s.QueryDefinitionNamePrefix = &v - return s -} - -type DescribeQueryDefinitionsOutput struct { +type DescribeLogGroupsOutput struct { _ struct{} `type:"structure"` + // The log groups. + // + // If the retentionInDays value is not included for a log group, then that log + // group's events do not expire. + LogGroups []*LogGroup `locationName:"logGroups" type:"list"` + // The token for the next set of items to return. The token expires after 24 // hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The list of query definitions that match your request. - QueryDefinitions []*QueryDefinition `locationName:"queryDefinitions" type:"list"` } // String returns the string representation. @@ -10792,7 +7728,7 @@ type DescribeQueryDefinitionsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueryDefinitionsOutput) String() string { +func (s DescribeLogGroupsOutput) String() string { return awsutil.Prettify(s) } @@ -10801,32 +7737,68 @@ func (s DescribeQueryDefinitionsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueryDefinitionsOutput) GoString() string { +func (s DescribeLogGroupsOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeQueryDefinitionsOutput) SetNextToken(v string) *DescribeQueryDefinitionsOutput { - s.NextToken = &v +// SetLogGroups sets the LogGroups field's value. +func (s *DescribeLogGroupsOutput) SetLogGroups(v []*LogGroup) *DescribeLogGroupsOutput { + s.LogGroups = v return s } -// SetQueryDefinitions sets the QueryDefinitions field's value. -func (s *DescribeQueryDefinitionsOutput) SetQueryDefinitions(v []*QueryDefinition) *DescribeQueryDefinitionsOutput { - s.QueryDefinitions = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeLogGroupsOutput) SetNextToken(v string) *DescribeLogGroupsOutput { + s.NextToken = &v return s } -type DescribeResourcePoliciesInput struct { +type DescribeLogStreamsInput struct { _ struct{} `type:"structure"` - // The maximum number of resource policies to be displayed with one call of - // this API. + // If the value is true, results are returned in descending order. If the value + // is to false, results are returned in ascending order. The default value is + // false. + Descending *bool `locationName:"descending" type:"boolean"` + + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. Limit *int64 `locationName:"limit" min:"1" type:"integer"` - // The token for the next set of items to return. The token expires after 24 - // hours. + // Specify either the name or ARN of the log group to view. If the log group + // is in a source account and you are using a monitoring account, you must use + // the log group ARN. + // + // You must include either logGroupIdentifier or logGroupName, but not both. + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` + + // The name of the log group. + // + // You must include either logGroupIdentifier or logGroupName, but not both. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // The prefix to match. + // + // If orderBy is LastEventTime, you cannot specify this parameter. + LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // If the value is LogStreamName, the results are ordered by log stream name. + // If the value is LastEventTime, the results are ordered by the event time. + // The default value is LogStreamName. + // + // If you order the results by event time, you cannot specify the logStreamNamePrefix + // parameter. + // + // lastEventTimestamp represents the time of the most recent log event in the + // log stream in CloudWatch Logs. This number is expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on + // an eventual consistency basis. It typically updates in less than an hour + // from ingestion, but in rare situations might take longer. + OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` } // String returns the string representation. @@ -10834,7 +7806,7 @@ type DescribeResourcePoliciesInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeResourcePoliciesInput) String() string { +func (s DescribeLogStreamsInput) String() string { return awsutil.Prettify(s) } @@ -10843,16 +7815,25 @@ func (s DescribeResourcePoliciesInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeResourcePoliciesInput) GoString() string { +func (s DescribeLogStreamsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeResourcePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePoliciesInput"} +func (s *DescribeLogStreamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"} if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) + } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } @@ -10863,27 +7844,57 @@ func (s *DescribeResourcePoliciesInput) Validate() error { return nil } +// SetDescending sets the Descending field's value. +func (s *DescribeLogStreamsInput) SetDescending(v bool) *DescribeLogStreamsInput { + s.Descending = &v + return s +} + // SetLimit sets the Limit field's value. -func (s *DescribeResourcePoliciesInput) SetLimit(v int64) *DescribeResourcePoliciesInput { +func (s *DescribeLogStreamsInput) SetLimit(v int64) *DescribeLogStreamsInput { s.Limit = &v return s } +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *DescribeLogStreamsInput) SetLogGroupIdentifier(v string) *DescribeLogStreamsInput { + s.LogGroupIdentifier = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *DescribeLogStreamsInput) SetLogGroupName(v string) *DescribeLogStreamsInput { + s.LogGroupName = &v + return s +} + +// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. +func (s *DescribeLogStreamsInput) SetLogStreamNamePrefix(v string) *DescribeLogStreamsInput { + s.LogStreamNamePrefix = &v + return s +} + // SetNextToken sets the NextToken field's value. -func (s *DescribeResourcePoliciesInput) SetNextToken(v string) *DescribeResourcePoliciesInput { +func (s *DescribeLogStreamsInput) SetNextToken(v string) *DescribeLogStreamsInput { s.NextToken = &v return s } -type DescribeResourcePoliciesOutput struct { +// SetOrderBy sets the OrderBy field's value. +func (s *DescribeLogStreamsInput) SetOrderBy(v string) *DescribeLogStreamsInput { + s.OrderBy = &v + return s +} + +type DescribeLogStreamsOutput struct { _ struct{} `type:"structure"` + // The log streams. + LogStreams []*LogStream `locationName:"logStreams" type:"list"` + // The token for the next set of items to return. The token expires after 24 // hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The resource policies that exist in this account. - ResourcePolicies []*ResourcePolicy `locationName:"resourcePolicies" type:"list"` } // String returns the string representation. @@ -10891,7 +7902,7 @@ type DescribeResourcePoliciesOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeResourcePoliciesOutput) String() string { +func (s DescribeLogStreamsOutput) String() string { return awsutil.Prettify(s) } @@ -10900,26 +7911,27 @@ func (s DescribeResourcePoliciesOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeResourcePoliciesOutput) GoString() string { +func (s DescribeLogStreamsOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeResourcePoliciesOutput) SetNextToken(v string) *DescribeResourcePoliciesOutput { - s.NextToken = &v +// SetLogStreams sets the LogStreams field's value. +func (s *DescribeLogStreamsOutput) SetLogStreams(v []*LogStream) *DescribeLogStreamsOutput { + s.LogStreams = v return s } -// SetResourcePolicies sets the ResourcePolicies field's value. -func (s *DescribeResourcePoliciesOutput) SetResourcePolicies(v []*ResourcePolicy) *DescribeResourcePoliciesOutput { - s.ResourcePolicies = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeLogStreamsOutput) SetNextToken(v string) *DescribeLogStreamsOutput { + s.NextToken = &v return s } -type DescribeSubscriptionFiltersInput struct { +type DescribeMetricFiltersInput struct { _ struct{} `type:"structure"` - // The prefix to match. If you don't specify a value, no prefix filter is applied. + // The prefix to match. CloudWatch Logs uses the value that you set here only + // if you also include the logGroupName parameter in your request. FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` // The maximum number of items returned. If you don't specify a value, the default @@ -10927,9 +7939,17 @@ type DescribeSubscriptionFiltersInput struct { Limit *int64 `locationName:"limit" min:"1" type:"integer"` // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // Filters results to include only those with the specified metric name. If + // you include this parameter in your request, you must also include the metricNamespace + // parameter. + MetricName *string `locationName:"metricName" type:"string"` + + // Filters results to include only those in the specified namespace. If you + // include this parameter in your request, you must also include the metricName + // parameter. + MetricNamespace *string `locationName:"metricNamespace" type:"string"` // The token for the next set of items to return. (You received this token from // a previous call.) @@ -10941,7 +7961,7 @@ type DescribeSubscriptionFiltersInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeSubscriptionFiltersInput) String() string { +func (s DescribeMetricFiltersInput) String() string { return awsutil.Prettify(s) } @@ -10950,22 +7970,19 @@ func (s DescribeSubscriptionFiltersInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeSubscriptionFiltersInput) GoString() string { +func (s DescribeMetricFiltersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSubscriptionFiltersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"} +func (s *DescribeMetricFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"} if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } @@ -10980,94 +7997,50 @@ func (s *DescribeSubscriptionFiltersInput) Validate() error { } // SetFilterNamePrefix sets the FilterNamePrefix field's value. -func (s *DescribeSubscriptionFiltersInput) SetFilterNamePrefix(v string) *DescribeSubscriptionFiltersInput { +func (s *DescribeMetricFiltersInput) SetFilterNamePrefix(v string) *DescribeMetricFiltersInput { s.FilterNamePrefix = &v return s } // SetLimit sets the Limit field's value. -func (s *DescribeSubscriptionFiltersInput) SetLimit(v int64) *DescribeSubscriptionFiltersInput { +func (s *DescribeMetricFiltersInput) SetLimit(v int64) *DescribeMetricFiltersInput { s.Limit = &v return s } // SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeSubscriptionFiltersInput) SetLogGroupName(v string) *DescribeSubscriptionFiltersInput { +func (s *DescribeMetricFiltersInput) SetLogGroupName(v string) *DescribeMetricFiltersInput { s.LogGroupName = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSubscriptionFiltersInput) SetNextToken(v string) *DescribeSubscriptionFiltersInput { - s.NextToken = &v +// SetMetricName sets the MetricName field's value. +func (s *DescribeMetricFiltersInput) SetMetricName(v string) *DescribeMetricFiltersInput { + s.MetricName = &v return s } -type DescribeSubscriptionFiltersOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The subscription filters. - SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeSubscriptionFiltersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeSubscriptionFiltersOutput) GoString() string { - return s.String() +// SetMetricNamespace sets the MetricNamespace field's value. +func (s *DescribeMetricFiltersInput) SetMetricNamespace(v string) *DescribeMetricFiltersInput { + s.MetricNamespace = &v + return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeSubscriptionFiltersOutput) SetNextToken(v string) *DescribeSubscriptionFiltersOutput { +func (s *DescribeMetricFiltersInput) SetNextToken(v string) *DescribeMetricFiltersInput { s.NextToken = &v return s } -// SetSubscriptionFilters sets the SubscriptionFilters field's value. -func (s *DescribeSubscriptionFiltersOutput) SetSubscriptionFilters(v []*SubscriptionFilter) *DescribeSubscriptionFiltersOutput { - s.SubscriptionFilters = v - return s -} - -// Represents a cross-account destination that receives subscription log events. -type Destination struct { - _ struct{} `type:"structure"` - - // An IAM policy document that governs which Amazon Web Services accounts can - // create subscription filters against this destination. - AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"` - - // The ARN of this destination. - Arn *string `locationName:"arn" type:"string"` - - // The creation time of the destination, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` - - // The name of the destination. - DestinationName *string `locationName:"destinationName" min:"1" type:"string"` +type DescribeMetricFiltersOutput struct { + _ struct{} `type:"structure"` - // A role for impersonation, used when delivering log events to the target. - RoleArn *string `locationName:"roleArn" min:"1" type:"string"` + // The metric filters. + MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"` - // The Amazon Resource Name (ARN) of the physical target where the log events - // are delivered (for example, a Kinesis stream). - TargetArn *string `locationName:"targetArn" min:"1" type:"string"` + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -11075,7 +8048,7 @@ type Destination struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s Destination) String() string { +func (s DescribeMetricFiltersOutput) String() string { return awsutil.Prettify(s) } @@ -11084,72 +8057,38 @@ func (s Destination) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s Destination) GoString() string { +func (s DescribeMetricFiltersOutput) GoString() string { return s.String() } -// SetAccessPolicy sets the AccessPolicy field's value. -func (s *Destination) SetAccessPolicy(v string) *Destination { - s.AccessPolicy = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *Destination) SetArn(v string) *Destination { - s.Arn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *Destination) SetCreationTime(v int64) *Destination { - s.CreationTime = &v - return s -} - -// SetDestinationName sets the DestinationName field's value. -func (s *Destination) SetDestinationName(v string) *Destination { - s.DestinationName = &v - return s -} - -// SetRoleArn sets the RoleArn field's value. -func (s *Destination) SetRoleArn(v string) *Destination { - s.RoleArn = &v +// SetMetricFilters sets the MetricFilters field's value. +func (s *DescribeMetricFiltersOutput) SetMetricFilters(v []*MetricFilter) *DescribeMetricFiltersOutput { + s.MetricFilters = v return s } -// SetTargetArn sets the TargetArn field's value. -func (s *Destination) SetTargetArn(v string) *Destination { - s.TargetArn = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFiltersOutput { + s.NextToken = &v return s } -type DisassociateKmsKeyInput struct { +type DescribeQueriesInput struct { _ struct{} `type:"structure"` - // The name of the log group. - // - // In your DisassociateKmsKey operation, you must specify either the resourceIdentifier - // parameter or the logGroup parameter, but you can't specify both. + // Limits the returned queries to only those for the specified log group. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - // Specifies the target for this operation. You must specify one of the following: - // - // * Specify the ARN of a log group to stop having CloudWatch Logs use the - // KMS key to encrypt log events that are ingested and stored by that log - // group. After you run this operation, CloudWatch Logs encrypts ingested - // log events with the default CloudWatch Logs method. The log group ARN - // must be in the following format. Replace REGION and ACCOUNT_ID with your - // Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME - // - // * Specify the following ARN to stop using this key to encrypt the results - // of future StartQuery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) - // operations in this account. Replace REGION and ACCOUNT_ID with your Region - // and account ID. arn:aws:logs:REGION:ACCOUNT_ID:query-result:* - // - // In your DisssociateKmsKey operation, you must specify either the resourceIdentifier - // parameter or the logGroup parameter, but you can't specify both. - ResourceIdentifier *string `locationName:"resourceIdentifier" min:"1" type:"string"` + // Limits the number of returned queries to the specified number. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // Limits the returned queries to only those that have the specified status. + // Valid values are Cancelled, Complete, Failed, Running, and Scheduled. + Status *string `locationName:"status" type:"string" enum:"QueryStatus"` } // String returns the string representation. @@ -11157,7 +8096,7 @@ type DisassociateKmsKeyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DisassociateKmsKeyInput) String() string { +func (s DescribeQueriesInput) String() string { return awsutil.Prettify(s) } @@ -11166,18 +8105,21 @@ func (s DisassociateKmsKeyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DisassociateKmsKeyInput) GoString() string { +func (s DescribeQueriesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateKmsKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateKmsKeyInput"} +func (s *DescribeQueriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeQueriesInput"} if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } - if s.ResourceIdentifier != nil && len(*s.ResourceIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifier", 1)) + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -11187,19 +8129,38 @@ func (s *DisassociateKmsKeyInput) Validate() error { } // SetLogGroupName sets the LogGroupName field's value. -func (s *DisassociateKmsKeyInput) SetLogGroupName(v string) *DisassociateKmsKeyInput { +func (s *DescribeQueriesInput) SetLogGroupName(v string) *DescribeQueriesInput { s.LogGroupName = &v return s } -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *DisassociateKmsKeyInput) SetResourceIdentifier(v string) *DisassociateKmsKeyInput { - s.ResourceIdentifier = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeQueriesInput) SetMaxResults(v int64) *DescribeQueriesInput { + s.MaxResults = &v return s } -type DisassociateKmsKeyOutput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueriesInput) SetNextToken(v string) *DescribeQueriesInput { + s.NextToken = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeQueriesInput) SetStatus(v string) *DescribeQueriesInput { + s.Status = &v + return s +} + +type DescribeQueriesOutput struct { _ struct{} `type:"structure"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The list of queries that match the request. + Queries []*QueryInfo `locationName:"queries" type:"list"` } // String returns the string representation. @@ -11207,7 +8168,7 @@ type DisassociateKmsKeyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DisassociateKmsKeyOutput) String() string { +func (s DescribeQueriesOutput) String() string { return awsutil.Prettify(s) } @@ -11216,42 +8177,35 @@ func (s DisassociateKmsKeyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DisassociateKmsKeyOutput) GoString() string { +func (s DescribeQueriesOutput) GoString() string { return s.String() } -// Represents an export task. -type ExportTask struct { - _ struct{} `type:"structure"` - - // The name of the S3 bucket to which the log data was exported. - Destination *string `locationName:"destination" min:"1" type:"string"` - - // The prefix that was used as the start of Amazon S3 key for every object exported. - DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` - - // Execution information about the export task. - ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"` - - // The start time, expressed as the number of milliseconds after Jan 1, 1970 - // 00:00:00 UTC. Events with a timestamp before this time are not exported. - From *int64 `locationName:"from" type:"long"` +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueriesOutput) SetNextToken(v string) *DescribeQueriesOutput { + s.NextToken = &v + return s +} - // The name of the log group from which logs data was exported. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` +// SetQueries sets the Queries field's value. +func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutput { + s.Queries = v + return s +} - // The status of the export task. - Status *ExportTaskStatus `locationName:"status" type:"structure"` +type DescribeQueryDefinitionsInput struct { + _ struct{} `type:"structure"` - // The ID of the export task. - TaskId *string `locationName:"taskId" min:"1" type:"string"` + // Limits the number of returned query definitions to the specified number. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - // The name of the export task. - TaskName *string `locationName:"taskName" min:"1" type:"string"` + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` - // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 - // UTC. Events with a timestamp later than this time are not exported. - To *int64 `locationName:"to" type:"long"` + // Use this parameter to filter your results to only the query definitions that + // have names that start with the prefix you specify. + QueryDefinitionNamePrefix *string `locationName:"queryDefinitionNamePrefix" min:"1" type:"string"` } // String returns the string representation. @@ -11259,7 +8213,7 @@ type ExportTask struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTask) String() string { +func (s DescribeQueryDefinitionsInput) String() string { return awsutil.Prettify(s) } @@ -11268,75 +8222,98 @@ func (s ExportTask) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTask) GoString() string { +func (s DescribeQueryDefinitionsInput) GoString() string { return s.String() } -// SetDestination sets the Destination field's value. -func (s *ExportTask) SetDestination(v string) *ExportTask { - s.Destination = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeQueryDefinitionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeQueryDefinitionsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.QueryDefinitionNamePrefix != nil && len(*s.QueryDefinitionNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryDefinitionNamePrefix", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetDestinationPrefix sets the DestinationPrefix field's value. -func (s *ExportTask) SetDestinationPrefix(v string) *ExportTask { - s.DestinationPrefix = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeQueryDefinitionsInput) SetMaxResults(v int64) *DescribeQueryDefinitionsInput { + s.MaxResults = &v return s } -// SetExecutionInfo sets the ExecutionInfo field's value. -func (s *ExportTask) SetExecutionInfo(v *ExportTaskExecutionInfo) *ExportTask { - s.ExecutionInfo = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueryDefinitionsInput) SetNextToken(v string) *DescribeQueryDefinitionsInput { + s.NextToken = &v return s } -// SetFrom sets the From field's value. -func (s *ExportTask) SetFrom(v int64) *ExportTask { - s.From = &v +// SetQueryDefinitionNamePrefix sets the QueryDefinitionNamePrefix field's value. +func (s *DescribeQueryDefinitionsInput) SetQueryDefinitionNamePrefix(v string) *DescribeQueryDefinitionsInput { + s.QueryDefinitionNamePrefix = &v return s } -// SetLogGroupName sets the LogGroupName field's value. -func (s *ExportTask) SetLogGroupName(v string) *ExportTask { - s.LogGroupName = &v - return s +type DescribeQueryDefinitionsOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The list of query definitions that match your request. + QueryDefinitions []*QueryDefinition `locationName:"queryDefinitions" type:"list"` } -// SetStatus sets the Status field's value. -func (s *ExportTask) SetStatus(v *ExportTaskStatus) *ExportTask { - s.Status = v - return s +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeQueryDefinitionsOutput) String() string { + return awsutil.Prettify(s) } -// SetTaskId sets the TaskId field's value. -func (s *ExportTask) SetTaskId(v string) *ExportTask { - s.TaskId = &v - return s +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeQueryDefinitionsOutput) GoString() string { + return s.String() } -// SetTaskName sets the TaskName field's value. -func (s *ExportTask) SetTaskName(v string) *ExportTask { - s.TaskName = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueryDefinitionsOutput) SetNextToken(v string) *DescribeQueryDefinitionsOutput { + s.NextToken = &v return s } -// SetTo sets the To field's value. -func (s *ExportTask) SetTo(v int64) *ExportTask { - s.To = &v +// SetQueryDefinitions sets the QueryDefinitions field's value. +func (s *DescribeQueryDefinitionsOutput) SetQueryDefinitions(v []*QueryDefinition) *DescribeQueryDefinitionsOutput { + s.QueryDefinitions = v return s } -// Represents the status of an export task. -type ExportTaskExecutionInfo struct { +type DescribeResourcePoliciesInput struct { _ struct{} `type:"structure"` - // The completion time of the export task, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CompletionTime *int64 `locationName:"completionTime" type:"long"` + // The maximum number of resource policies to be displayed with one call of + // this API. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` - // The creation time of the export task, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -11344,7 +8321,7 @@ type ExportTaskExecutionInfo struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTaskExecutionInfo) String() string { +func (s DescribeResourcePoliciesInput) String() string { return awsutil.Prettify(s) } @@ -11353,31 +8330,47 @@ func (s ExportTaskExecutionInfo) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTaskExecutionInfo) GoString() string { +func (s DescribeResourcePoliciesInput) GoString() string { return s.String() } -// SetCompletionTime sets the CompletionTime field's value. -func (s *ExportTaskExecutionInfo) SetCompletionTime(v int64) *ExportTaskExecutionInfo { - s.CompletionTime = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeResourcePoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePoliciesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *DescribeResourcePoliciesInput) SetLimit(v int64) *DescribeResourcePoliciesInput { + s.Limit = &v return s } -// SetCreationTime sets the CreationTime field's value. -func (s *ExportTaskExecutionInfo) SetCreationTime(v int64) *ExportTaskExecutionInfo { - s.CreationTime = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeResourcePoliciesInput) SetNextToken(v string) *DescribeResourcePoliciesInput { + s.NextToken = &v return s } -// Represents the status of an export task. -type ExportTaskStatus struct { +type DescribeResourcePoliciesOutput struct { _ struct{} `type:"structure"` - // The status code of the export task. - Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"` + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` - // The status message related to the status code. - Message *string `locationName:"message" type:"string"` + // The resource policies that exist in this account. + ResourcePolicies []*ResourcePolicy `locationName:"resourcePolicies" type:"list"` } // String returns the string representation. @@ -11385,7 +8378,7 @@ type ExportTaskStatus struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTaskStatus) String() string { +func (s DescribeResourcePoliciesOutput) String() string { return awsutil.Prettify(s) } @@ -11394,93 +8387,40 @@ func (s ExportTaskStatus) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTaskStatus) GoString() string { +func (s DescribeResourcePoliciesOutput) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *ExportTaskStatus) SetCode(v string) *ExportTaskStatus { - s.Code = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeResourcePoliciesOutput) SetNextToken(v string) *DescribeResourcePoliciesOutput { + s.NextToken = &v return s } -// SetMessage sets the Message field's value. -func (s *ExportTaskStatus) SetMessage(v string) *ExportTaskStatus { - s.Message = &v +// SetResourcePolicies sets the ResourcePolicies field's value. +func (s *DescribeResourcePoliciesOutput) SetResourcePolicies(v []*ResourcePolicy) *DescribeResourcePoliciesOutput { + s.ResourcePolicies = v return s } -type FilterLogEventsInput struct { +type DescribeSubscriptionFiltersInput struct { _ struct{} `type:"structure"` - // The end of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are - // not returned. - EndTime *int64 `locationName:"endTime" type:"long"` - - // The filter pattern to use. For more information, see Filter and Pattern Syntax - // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). - // - // If not provided, all the events are matched. - FilterPattern *string `locationName:"filterPattern" type:"string"` - - // If the value is true, the operation attempts to provide responses that contain - // events from multiple log streams within the log group, interleaved in a single - // response. If the value is false, all the matched log events in the first - // log stream are searched first, then those in the next log stream, and so - // on. - // - // Important As of June 17, 2019, this parameter is ignored and the value is - // assumed to be true. The response from this operation always interleaves events - // from multiple log streams within a log group. - // - // Deprecated: Starting on June 17, 2019, this parameter will be ignored and the value will be assumed to be true. The response from this operation will always interleave events from multiple log streams within a log group. - Interleaved *bool `locationName:"interleaved" deprecated:"true" type:"boolean"` + // The prefix to match. If you don't specify a value, no prefix filter is applied. + FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` - // The maximum number of events to return. The default is 10,000 events. + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. Limit *int64 `locationName:"limit" min:"1" type:"integer"` - // Specify either the name or ARN of the log group to view log events from. - // If the log group is in a source account and you are using a monitoring account, - // you must use the log group ARN. - // - // You must include either logGroupIdentifier or logGroupName, but not both. - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - - // The name of the log group to search. - // - // You must include either logGroupIdentifier or logGroupName, but not both. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // Filters the results to include only events from log streams that have names - // starting with this prefix. - // - // If you specify a value for both logStreamNamePrefix and logStreamNames, but - // the value for logStreamNamePrefix does not match any log stream names specified - // in logStreamNames, the action returns an InvalidParameterException error. - LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` - - // Filters the results to only logs from the log streams in this list. + // The name of the log group. // - // If you specify a value for both logStreamNamePrefix and logStreamNames, the - // action returns an InvalidParameterException error. - LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - // The token for the next set of events to return. (You received this token - // from a previous call.) + // The token for the next set of items to return. (You received this token from + // a previous call.) NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The start of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not - // returned. - StartTime *int64 `locationName:"startTime" type:"long"` - - // Specify true to display the log event fields with all sensitive data unmasked - // and visible. The default is false. - // - // To use this operation with this parameter, you must be signed into an account - // with the logs:Unmask permission. - Unmask *bool `locationName:"unmask" type:"boolean"` } // String returns the string representation. @@ -11488,7 +8428,7 @@ type FilterLogEventsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilterLogEventsInput) String() string { +func (s DescribeSubscriptionFiltersInput) String() string { return awsutil.Prettify(s) } @@ -11497,28 +8437,25 @@ func (s FilterLogEventsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilterLogEventsInput) GoString() string { +func (s DescribeSubscriptionFiltersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *FilterLogEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"} +func (s *DescribeSubscriptionFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"} + if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) + } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) } if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } - if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) - } - if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) - } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } @@ -11529,88 +8466,39 @@ func (s *FilterLogEventsInput) Validate() error { return nil } -// SetEndTime sets the EndTime field's value. -func (s *FilterLogEventsInput) SetEndTime(v int64) *FilterLogEventsInput { - s.EndTime = &v - return s -} - -// SetFilterPattern sets the FilterPattern field's value. -func (s *FilterLogEventsInput) SetFilterPattern(v string) *FilterLogEventsInput { - s.FilterPattern = &v - return s -} - -// SetInterleaved sets the Interleaved field's value. -func (s *FilterLogEventsInput) SetInterleaved(v bool) *FilterLogEventsInput { - s.Interleaved = &v +// SetFilterNamePrefix sets the FilterNamePrefix field's value. +func (s *DescribeSubscriptionFiltersInput) SetFilterNamePrefix(v string) *DescribeSubscriptionFiltersInput { + s.FilterNamePrefix = &v return s } // SetLimit sets the Limit field's value. -func (s *FilterLogEventsInput) SetLimit(v int64) *FilterLogEventsInput { +func (s *DescribeSubscriptionFiltersInput) SetLimit(v int64) *DescribeSubscriptionFiltersInput { s.Limit = &v return s } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *FilterLogEventsInput) SetLogGroupIdentifier(v string) *FilterLogEventsInput { - s.LogGroupIdentifier = &v - return s -} - // SetLogGroupName sets the LogGroupName field's value. -func (s *FilterLogEventsInput) SetLogGroupName(v string) *FilterLogEventsInput { +func (s *DescribeSubscriptionFiltersInput) SetLogGroupName(v string) *DescribeSubscriptionFiltersInput { s.LogGroupName = &v return s } -// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. -func (s *FilterLogEventsInput) SetLogStreamNamePrefix(v string) *FilterLogEventsInput { - s.LogStreamNamePrefix = &v - return s -} - -// SetLogStreamNames sets the LogStreamNames field's value. -func (s *FilterLogEventsInput) SetLogStreamNames(v []*string) *FilterLogEventsInput { - s.LogStreamNames = v - return s -} - // SetNextToken sets the NextToken field's value. -func (s *FilterLogEventsInput) SetNextToken(v string) *FilterLogEventsInput { +func (s *DescribeSubscriptionFiltersInput) SetNextToken(v string) *DescribeSubscriptionFiltersInput { s.NextToken = &v return s } -// SetStartTime sets the StartTime field's value. -func (s *FilterLogEventsInput) SetStartTime(v int64) *FilterLogEventsInput { - s.StartTime = &v - return s -} - -// SetUnmask sets the Unmask field's value. -func (s *FilterLogEventsInput) SetUnmask(v bool) *FilterLogEventsInput { - s.Unmask = &v - return s -} - -type FilterLogEventsOutput struct { +type DescribeSubscriptionFiltersOutput struct { _ struct{} `type:"structure"` - // The matched events. - Events []*FilteredLogEvent `locationName:"events" type:"list"` - - // The token to use when requesting the next set of items. The token expires - // after 24 hours. + // The token for the next set of items to return. The token expires after 24 + // hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` - // Important As of May 15, 2020, this parameter is no longer supported. This - // parameter returns an empty list. - // - // Indicates which log streams have been searched and whether each has been - // searched completely. - SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"` + // The subscription filters. + SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"` } // String returns the string representation. @@ -11618,7 +8506,7 @@ type FilterLogEventsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilterLogEventsOutput) String() string { +func (s DescribeSubscriptionFiltersOutput) String() string { return awsutil.Prettify(s) } @@ -11627,48 +8515,46 @@ func (s FilterLogEventsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilterLogEventsOutput) GoString() string { +func (s DescribeSubscriptionFiltersOutput) GoString() string { return s.String() } -// SetEvents sets the Events field's value. -func (s *FilterLogEventsOutput) SetEvents(v []*FilteredLogEvent) *FilterLogEventsOutput { - s.Events = v - return s -} - // SetNextToken sets the NextToken field's value. -func (s *FilterLogEventsOutput) SetNextToken(v string) *FilterLogEventsOutput { +func (s *DescribeSubscriptionFiltersOutput) SetNextToken(v string) *DescribeSubscriptionFiltersOutput { s.NextToken = &v return s } -// SetSearchedLogStreams sets the SearchedLogStreams field's value. -func (s *FilterLogEventsOutput) SetSearchedLogStreams(v []*SearchedLogStream) *FilterLogEventsOutput { - s.SearchedLogStreams = v +// SetSubscriptionFilters sets the SubscriptionFilters field's value. +func (s *DescribeSubscriptionFiltersOutput) SetSubscriptionFilters(v []*SubscriptionFilter) *DescribeSubscriptionFiltersOutput { + s.SubscriptionFilters = v return s } -// Represents a matched event. -type FilteredLogEvent struct { +// Represents a cross-account destination that receives subscription log events. +type Destination struct { _ struct{} `type:"structure"` - // The ID of the event. - EventId *string `locationName:"eventId" type:"string"` + // An IAM policy document that governs which Amazon Web Services accounts can + // create subscription filters against this destination. + AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"` - // The time the event was ingested, expressed as the number of milliseconds + // The ARN of this destination. + Arn *string `locationName:"arn" type:"string"` + + // The creation time of the destination, expressed as the number of milliseconds // after Jan 1, 1970 00:00:00 UTC. - IngestionTime *int64 `locationName:"ingestionTime" type:"long"` + CreationTime *int64 `locationName:"creationTime" type:"long"` - // The name of the log stream to which this event belongs. - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` + // The name of the destination. + DestinationName *string `locationName:"destinationName" min:"1" type:"string"` - // The data contained in the log event. - Message *string `locationName:"message" min:"1" type:"string"` + // A role for impersonation, used when delivering log events to the target. + RoleArn *string `locationName:"roleArn" min:"1" type:"string"` - // The time the event occurred, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - Timestamp *int64 `locationName:"timestamp" type:"long"` + // The Amazon Resource Name (ARN) of the physical target where the log events + // are delivered (for example, a Kinesis stream). + TargetArn *string `locationName:"targetArn" min:"1" type:"string"` } // String returns the string representation. @@ -11676,7 +8562,7 @@ type FilteredLogEvent struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilteredLogEvent) String() string { +func (s Destination) String() string { return awsutil.Prettify(s) } @@ -11685,48 +8571,72 @@ func (s FilteredLogEvent) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilteredLogEvent) GoString() string { +func (s Destination) GoString() string { return s.String() } -// SetEventId sets the EventId field's value. -func (s *FilteredLogEvent) SetEventId(v string) *FilteredLogEvent { - s.EventId = &v +// SetAccessPolicy sets the AccessPolicy field's value. +func (s *Destination) SetAccessPolicy(v string) *Destination { + s.AccessPolicy = &v return s } -// SetIngestionTime sets the IngestionTime field's value. -func (s *FilteredLogEvent) SetIngestionTime(v int64) *FilteredLogEvent { - s.IngestionTime = &v +// SetArn sets the Arn field's value. +func (s *Destination) SetArn(v string) *Destination { + s.Arn = &v return s } -// SetLogStreamName sets the LogStreamName field's value. -func (s *FilteredLogEvent) SetLogStreamName(v string) *FilteredLogEvent { - s.LogStreamName = &v +// SetCreationTime sets the CreationTime field's value. +func (s *Destination) SetCreationTime(v int64) *Destination { + s.CreationTime = &v return s } -// SetMessage sets the Message field's value. -func (s *FilteredLogEvent) SetMessage(v string) *FilteredLogEvent { - s.Message = &v +// SetDestinationName sets the DestinationName field's value. +func (s *Destination) SetDestinationName(v string) *Destination { + s.DestinationName = &v return s } -// SetTimestamp sets the Timestamp field's value. -func (s *FilteredLogEvent) SetTimestamp(v int64) *FilteredLogEvent { - s.Timestamp = &v +// SetRoleArn sets the RoleArn field's value. +func (s *Destination) SetRoleArn(v string) *Destination { + s.RoleArn = &v return s } -type GetDataProtectionPolicyInput struct { +// SetTargetArn sets the TargetArn field's value. +func (s *Destination) SetTargetArn(v string) *Destination { + s.TargetArn = &v + return s +} + +type DisassociateKmsKeyInput struct { _ struct{} `type:"structure"` - // The name or ARN of the log group that contains the data protection policy - // that you want to see. + // The name of the log group. // - // LogGroupIdentifier is a required field - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` + // In your DisassociateKmsKey operation, you must specify either the resourceIdentifier + // parameter or the logGroup parameter, but you can't specify both. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // Specifies the target for this operation. You must specify one of the following: + // + // * Specify the ARN of a log group to stop having CloudWatch Logs use the + // KMS key to encrypt log events that are ingested and stored by that log + // group. After you run this operation, CloudWatch Logs encrypts ingested + // log events with the default CloudWatch Logs method. The log group ARN + // must be in the following format. Replace REGION and ACCOUNT_ID with your + // Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME + // + // * Specify the following ARN to stop using this key to encrypt the results + // of future StartQuery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) + // operations in this account. Replace REGION and ACCOUNT_ID with your Region + // and account ID. arn:aws:logs:REGION:ACCOUNT_ID:query-result:* + // + // In your DisssociateKmsKey operation, you must specify either the resourceIdentifier + // parameter or the logGroup parameter, but you can't specify both. + ResourceIdentifier *string `locationName:"resourceIdentifier" min:"1" type:"string"` } // String returns the string representation. @@ -11734,7 +8644,7 @@ type GetDataProtectionPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDataProtectionPolicyInput) String() string { +func (s DisassociateKmsKeyInput) String() string { return awsutil.Prettify(s) } @@ -11743,18 +8653,18 @@ func (s GetDataProtectionPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDataProtectionPolicyInput) GoString() string { +func (s DisassociateKmsKeyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDataProtectionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDataProtectionPolicyInput"} - if s.LogGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) +func (s *DisassociateKmsKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateKmsKeyInput"} + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + if s.ResourceIdentifier != nil && len(*s.ResourceIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifier", 1)) } if invalidParams.Len() > 0 { @@ -11763,23 +8673,72 @@ func (s *GetDataProtectionPolicyInput) Validate() error { return nil } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *GetDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *GetDataProtectionPolicyInput { - s.LogGroupIdentifier = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *DisassociateKmsKeyInput) SetLogGroupName(v string) *DisassociateKmsKeyInput { + s.LogGroupName = &v return s } -type GetDataProtectionPolicyOutput struct { +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *DisassociateKmsKeyInput) SetResourceIdentifier(v string) *DisassociateKmsKeyInput { + s.ResourceIdentifier = &v + return s +} + +type DisassociateKmsKeyOutput struct { _ struct{} `type:"structure"` +} - // The date and time that this policy was most recently updated. - LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DisassociateKmsKeyOutput) String() string { + return awsutil.Prettify(s) +} - // The log group name or ARN that you specified in your request. - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DisassociateKmsKeyOutput) GoString() string { + return s.String() +} - // The data protection policy document for this log group. - PolicyDocument *string `locationName:"policyDocument" type:"string"` +// Represents an export task. +type ExportTask struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket to which the log data was exported. + Destination *string `locationName:"destination" min:"1" type:"string"` + + // The prefix that was used as the start of Amazon S3 key for every object exported. + DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` + + // Execution information about the export task. + ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"` + + // The start time, expressed as the number of milliseconds after Jan 1, 1970 + // 00:00:00 UTC. Events with a timestamp before this time are not exported. + From *int64 `locationName:"from" type:"long"` + + // The name of the log group from which logs data was exported. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // The status of the export task. + Status *ExportTaskStatus `locationName:"status" type:"structure"` + + // The ID of the export task. + TaskId *string `locationName:"taskId" min:"1" type:"string"` + + // The name of the export task. + TaskName *string `locationName:"taskName" min:"1" type:"string"` + + // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 + // UTC. Events with a timestamp later than this time are not exported. + To *int64 `locationName:"to" type:"long"` } // String returns the string representation. @@ -11787,7 +8746,7 @@ type GetDataProtectionPolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDataProtectionPolicyOutput) String() string { +func (s ExportTask) String() string { return awsutil.Prettify(s) } @@ -11796,35 +8755,75 @@ func (s GetDataProtectionPolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDataProtectionPolicyOutput) GoString() string { +func (s ExportTask) GoString() string { return s.String() } -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *GetDataProtectionPolicyOutput) SetLastUpdatedTime(v int64) *GetDataProtectionPolicyOutput { - s.LastUpdatedTime = &v +// SetDestination sets the Destination field's value. +func (s *ExportTask) SetDestination(v string) *ExportTask { + s.Destination = &v return s } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *GetDataProtectionPolicyOutput) SetLogGroupIdentifier(v string) *GetDataProtectionPolicyOutput { - s.LogGroupIdentifier = &v +// SetDestinationPrefix sets the DestinationPrefix field's value. +func (s *ExportTask) SetDestinationPrefix(v string) *ExportTask { + s.DestinationPrefix = &v return s } -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetDataProtectionPolicyOutput) SetPolicyDocument(v string) *GetDataProtectionPolicyOutput { - s.PolicyDocument = &v +// SetExecutionInfo sets the ExecutionInfo field's value. +func (s *ExportTask) SetExecutionInfo(v *ExportTaskExecutionInfo) *ExportTask { + s.ExecutionInfo = v + return s +} + +// SetFrom sets the From field's value. +func (s *ExportTask) SetFrom(v int64) *ExportTask { + s.From = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *ExportTask) SetLogGroupName(v string) *ExportTask { + s.LogGroupName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ExportTask) SetStatus(v *ExportTaskStatus) *ExportTask { + s.Status = v + return s +} + +// SetTaskId sets the TaskId field's value. +func (s *ExportTask) SetTaskId(v string) *ExportTask { + s.TaskId = &v + return s +} + +// SetTaskName sets the TaskName field's value. +func (s *ExportTask) SetTaskName(v string) *ExportTask { + s.TaskName = &v + return s +} + +// SetTo sets the To field's value. +func (s *ExportTask) SetTo(v int64) *ExportTask { + s.To = &v return s } -type GetDeliveryDestinationInput struct { +// Represents the status of an export task. +type ExportTaskExecutionInfo struct { _ struct{} `type:"structure"` - // The name of the delivery destination that you want to retrieve. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` + // The completion time of the export task, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CompletionTime *int64 `locationName:"completionTime" type:"long"` + + // The creation time of the export task, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 `locationName:"creationTime" type:"long"` } // String returns the string representation. @@ -11832,7 +8831,7 @@ type GetDeliveryDestinationInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryDestinationInput) String() string { +func (s ExportTaskExecutionInfo) String() string { return awsutil.Prettify(s) } @@ -11841,37 +8840,31 @@ func (s GetDeliveryDestinationInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryDestinationInput) GoString() string { +func (s ExportTaskExecutionInfo) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeliveryDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeliveryDestinationInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCompletionTime sets the CompletionTime field's value. +func (s *ExportTaskExecutionInfo) SetCompletionTime(v int64) *ExportTaskExecutionInfo { + s.CompletionTime = &v + return s } -// SetName sets the Name field's value. -func (s *GetDeliveryDestinationInput) SetName(v string) *GetDeliveryDestinationInput { - s.Name = &v +// SetCreationTime sets the CreationTime field's value. +func (s *ExportTaskExecutionInfo) SetCreationTime(v int64) *ExportTaskExecutionInfo { + s.CreationTime = &v return s } -type GetDeliveryDestinationOutput struct { +// Represents the status of an export task. +type ExportTaskStatus struct { _ struct{} `type:"structure"` - // A structure containing information about the delivery destination. - DeliveryDestination *DeliveryDestination `locationName:"deliveryDestination" type:"structure"` + // The status code of the export task. + Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"` + + // The status message related to the status code. + Message *string `locationName:"message" type:"string"` } // String returns the string representation. @@ -11879,7 +8872,7 @@ type GetDeliveryDestinationOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryDestinationOutput) String() string { +func (s ExportTaskStatus) String() string { return awsutil.Prettify(s) } @@ -11888,24 +8881,93 @@ func (s GetDeliveryDestinationOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryDestinationOutput) GoString() string { +func (s ExportTaskStatus) GoString() string { return s.String() } -// SetDeliveryDestination sets the DeliveryDestination field's value. -func (s *GetDeliveryDestinationOutput) SetDeliveryDestination(v *DeliveryDestination) *GetDeliveryDestinationOutput { - s.DeliveryDestination = v +// SetCode sets the Code field's value. +func (s *ExportTaskStatus) SetCode(v string) *ExportTaskStatus { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ExportTaskStatus) SetMessage(v string) *ExportTaskStatus { + s.Message = &v return s } -type GetDeliveryDestinationPolicyInput struct { +type FilterLogEventsInput struct { _ struct{} `type:"structure"` - // The name of the delivery destination that you want to retrieve the policy - // of. + // The end of the time range, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are + // not returned. + EndTime *int64 `locationName:"endTime" type:"long"` + + // The filter pattern to use. For more information, see Filter and Pattern Syntax + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). + // + // If not provided, all the events are matched. + FilterPattern *string `locationName:"filterPattern" type:"string"` + + // If the value is true, the operation attempts to provide responses that contain + // events from multiple log streams within the log group, interleaved in a single + // response. If the value is false, all the matched log events in the first + // log stream are searched first, then those in the next log stream, and so + // on. + // + // Important As of June 17, 2019, this parameter is ignored and the value is + // assumed to be true. The response from this operation always interleaves events + // from multiple log streams within a log group. + // + // Deprecated: Starting on June 17, 2019, this parameter will be ignored and the value will be assumed to be true. The response from this operation will always interleave events from multiple log streams within a log group. + Interleaved *bool `locationName:"interleaved" deprecated:"true" type:"boolean"` + + // The maximum number of events to return. The default is 10,000 events. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` + + // Specify either the name or ARN of the log group to view log events from. + // If the log group is in a source account and you are using a monitoring account, + // you must use the log group ARN. + // + // You must include either logGroupIdentifier or logGroupName, but not both. + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` + + // The name of the log group to search. + // + // You must include either logGroupIdentifier or logGroupName, but not both. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // Filters the results to include only events from log streams that have names + // starting with this prefix. + // + // If you specify a value for both logStreamNamePrefix and logStreamNames, but + // the value for logStreamNamePrefix does not match any log stream names specified + // in logStreamNames, the action returns an InvalidParameterException error. + LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` + + // Filters the results to only logs from the log streams in this list. + // + // If you specify a value for both logStreamNamePrefix and logStreamNames, the + // action returns an InvalidParameterException error. + LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` + + // The token for the next set of events to return. (You received this token + // from a previous call.) + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The start of the time range, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not + // returned. + StartTime *int64 `locationName:"startTime" type:"long"` + + // Specify true to display the log event fields with all sensitive data unmasked + // and visible. The default is false. // - // DeliveryDestinationName is a required field - DeliveryDestinationName *string `locationName:"deliveryDestinationName" min:"1" type:"string" required:"true"` + // To use this operation with this parameter, you must be signed into an account + // with the logs:Unmask permission. + Unmask *bool `locationName:"unmask" type:"boolean"` } // String returns the string representation. @@ -11913,7 +8975,7 @@ type GetDeliveryDestinationPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryDestinationPolicyInput) String() string { +func (s FilterLogEventsInput) String() string { return awsutil.Prettify(s) } @@ -11922,18 +8984,30 @@ func (s GetDeliveryDestinationPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryDestinationPolicyInput) GoString() string { +func (s FilterLogEventsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeliveryDestinationPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeliveryDestinationPolicyInput"} - if s.DeliveryDestinationName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationName")) +func (s *FilterLogEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) + } + if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) } - if s.DeliveryDestinationName != nil && len(*s.DeliveryDestinationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryDestinationName", 1)) + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -11942,17 +9016,88 @@ func (s *GetDeliveryDestinationPolicyInput) Validate() error { return nil } -// SetDeliveryDestinationName sets the DeliveryDestinationName field's value. -func (s *GetDeliveryDestinationPolicyInput) SetDeliveryDestinationName(v string) *GetDeliveryDestinationPolicyInput { - s.DeliveryDestinationName = &v +// SetEndTime sets the EndTime field's value. +func (s *FilterLogEventsInput) SetEndTime(v int64) *FilterLogEventsInput { + s.EndTime = &v + return s +} + +// SetFilterPattern sets the FilterPattern field's value. +func (s *FilterLogEventsInput) SetFilterPattern(v string) *FilterLogEventsInput { + s.FilterPattern = &v + return s +} + +// SetInterleaved sets the Interleaved field's value. +func (s *FilterLogEventsInput) SetInterleaved(v bool) *FilterLogEventsInput { + s.Interleaved = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *FilterLogEventsInput) SetLimit(v int64) *FilterLogEventsInput { + s.Limit = &v + return s +} + +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *FilterLogEventsInput) SetLogGroupIdentifier(v string) *FilterLogEventsInput { + s.LogGroupIdentifier = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *FilterLogEventsInput) SetLogGroupName(v string) *FilterLogEventsInput { + s.LogGroupName = &v + return s +} + +// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. +func (s *FilterLogEventsInput) SetLogStreamNamePrefix(v string) *FilterLogEventsInput { + s.LogStreamNamePrefix = &v + return s +} + +// SetLogStreamNames sets the LogStreamNames field's value. +func (s *FilterLogEventsInput) SetLogStreamNames(v []*string) *FilterLogEventsInput { + s.LogStreamNames = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *FilterLogEventsInput) SetNextToken(v string) *FilterLogEventsInput { + s.NextToken = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *FilterLogEventsInput) SetStartTime(v int64) *FilterLogEventsInput { + s.StartTime = &v + return s +} + +// SetUnmask sets the Unmask field's value. +func (s *FilterLogEventsInput) SetUnmask(v bool) *FilterLogEventsInput { + s.Unmask = &v return s } -type GetDeliveryDestinationPolicyOutput struct { +type FilterLogEventsOutput struct { _ struct{} `type:"structure"` - // The IAM policy for this delivery destination. - Policy *Policy `locationName:"policy" type:"structure"` + // The matched events. + Events []*FilteredLogEvent `locationName:"events" type:"list"` + + // The token to use when requesting the next set of items. The token expires + // after 24 hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // Important As of May 15, 2020, this parameter is no longer supported. This + // parameter returns an empty list. + // + // Indicates which log streams have been searched and whether each has been + // searched completely. + SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"` } // String returns the string representation. @@ -11960,7 +9105,7 @@ type GetDeliveryDestinationPolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryDestinationPolicyOutput) String() string { +func (s FilterLogEventsOutput) String() string { return awsutil.Prettify(s) } @@ -11969,23 +9114,48 @@ func (s GetDeliveryDestinationPolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryDestinationPolicyOutput) GoString() string { +func (s FilterLogEventsOutput) GoString() string { return s.String() } -// SetPolicy sets the Policy field's value. -func (s *GetDeliveryDestinationPolicyOutput) SetPolicy(v *Policy) *GetDeliveryDestinationPolicyOutput { - s.Policy = v +// SetEvents sets the Events field's value. +func (s *FilterLogEventsOutput) SetEvents(v []*FilteredLogEvent) *FilterLogEventsOutput { + s.Events = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *FilterLogEventsOutput) SetNextToken(v string) *FilterLogEventsOutput { + s.NextToken = &v + return s +} + +// SetSearchedLogStreams sets the SearchedLogStreams field's value. +func (s *FilterLogEventsOutput) SetSearchedLogStreams(v []*SearchedLogStream) *FilterLogEventsOutput { + s.SearchedLogStreams = v return s } -type GetDeliveryInput struct { +// Represents a matched event. +type FilteredLogEvent struct { _ struct{} `type:"structure"` - // The ID of the delivery that you want to retrieve. - // - // Id is a required field - Id *string `locationName:"id" min:"1" type:"string" required:"true"` + // The ID of the event. + EventId *string `locationName:"eventId" type:"string"` + + // The time the event was ingested, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + IngestionTime *int64 `locationName:"ingestionTime" type:"long"` + + // The name of the log stream to which this event belongs. + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` + + // The data contained in the log event. + Message *string `locationName:"message" min:"1" type:"string"` + + // The time the event occurred, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. + Timestamp *int64 `locationName:"timestamp" type:"long"` } // String returns the string representation. @@ -11993,7 +9163,7 @@ type GetDeliveryInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryInput) String() string { +func (s FilteredLogEvent) String() string { return awsutil.Prettify(s) } @@ -12002,70 +9172,48 @@ func (s GetDeliveryInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliveryInput) GoString() string { +func (s FilteredLogEvent) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeliveryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeliveryInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetDeliveryInput) SetId(v string) *GetDeliveryInput { - s.Id = &v +// SetEventId sets the EventId field's value. +func (s *FilteredLogEvent) SetEventId(v string) *FilteredLogEvent { + s.EventId = &v return s } -type GetDeliveryOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains information about the delivery. - Delivery *Delivery `locationName:"delivery" type:"structure"` +// SetIngestionTime sets the IngestionTime field's value. +func (s *FilteredLogEvent) SetIngestionTime(v int64) *FilteredLogEvent { + s.IngestionTime = &v + return s } -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetDeliveryOutput) String() string { - return awsutil.Prettify(s) +// SetLogStreamName sets the LogStreamName field's value. +func (s *FilteredLogEvent) SetLogStreamName(v string) *FilteredLogEvent { + s.LogStreamName = &v + return s } -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetDeliveryOutput) GoString() string { - return s.String() +// SetMessage sets the Message field's value. +func (s *FilteredLogEvent) SetMessage(v string) *FilteredLogEvent { + s.Message = &v + return s } -// SetDelivery sets the Delivery field's value. -func (s *GetDeliveryOutput) SetDelivery(v *Delivery) *GetDeliveryOutput { - s.Delivery = v +// SetTimestamp sets the Timestamp field's value. +func (s *FilteredLogEvent) SetTimestamp(v int64) *FilteredLogEvent { + s.Timestamp = &v return s } -type GetDeliverySourceInput struct { +type GetDataProtectionPolicyInput struct { _ struct{} `type:"structure"` - // The name of the delivery source that you want to retrieve. + // The name or ARN of the log group that contains the data protection policy + // that you want to see. // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` + // LogGroupIdentifier is a required field + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -12073,7 +9221,7 @@ type GetDeliverySourceInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliverySourceInput) String() string { +func (s GetDataProtectionPolicyInput) String() string { return awsutil.Prettify(s) } @@ -12082,18 +9230,18 @@ func (s GetDeliverySourceInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliverySourceInput) GoString() string { +func (s GetDataProtectionPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDeliverySourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDeliverySourceInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) +func (s *GetDataProtectionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDataProtectionPolicyInput"} + if s.LogGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) } if invalidParams.Len() > 0 { @@ -12102,17 +9250,23 @@ func (s *GetDeliverySourceInput) Validate() error { return nil } -// SetName sets the Name field's value. -func (s *GetDeliverySourceInput) SetName(v string) *GetDeliverySourceInput { - s.Name = &v +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *GetDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *GetDataProtectionPolicyInput { + s.LogGroupIdentifier = &v return s } -type GetDeliverySourceOutput struct { +type GetDataProtectionPolicyOutput struct { _ struct{} `type:"structure"` - // A structure containing information about the delivery source. - DeliverySource *DeliverySource `locationName:"deliverySource" type:"structure"` + // The date and time that this policy was most recently updated. + LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` + + // The log group name or ARN that you specified in your request. + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` + + // The data protection policy document for this log group. + PolicyDocument *string `locationName:"policyDocument" type:"string"` } // String returns the string representation. @@ -12120,7 +9274,7 @@ type GetDeliverySourceOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliverySourceOutput) String() string { +func (s GetDataProtectionPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -12129,13 +9283,25 @@ func (s GetDeliverySourceOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDeliverySourceOutput) GoString() string { +func (s GetDataProtectionPolicyOutput) GoString() string { return s.String() } -// SetDeliverySource sets the DeliverySource field's value. -func (s *GetDeliverySourceOutput) SetDeliverySource(v *DeliverySource) *GetDeliverySourceOutput { - s.DeliverySource = v +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *GetDataProtectionPolicyOutput) SetLastUpdatedTime(v int64) *GetDataProtectionPolicyOutput { + s.LastUpdatedTime = &v + return s +} + +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *GetDataProtectionPolicyOutput) SetLogGroupIdentifier(v string) *GetDataProtectionPolicyOutput { + s.LogGroupIdentifier = &v + return s +} + +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *GetDataProtectionPolicyOutput) SetPolicyDocument(v string) *GetDataProtectionPolicyOutput { + s.PolicyDocument = &v return s } @@ -13167,45 +10333,18 @@ func (s *ListTagsLogGroupOutput) SetTags(v map[string]*string) *ListTagsLogGroup return s } -// Represents a log group. -type LogGroup struct { +type LiveTailSessionLogEvent struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the log group. - Arn *string `locationName:"arn" type:"string"` - - // The creation time of the log group, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` - - // Displays whether this log group has a protection policy, or whether it had - // one in the past. For more information, see PutDataProtectionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html). - DataProtectionStatus *string `locationName:"dataProtectionStatus" type:"string" enum:"DataProtectionStatus"` - - // Displays all the properties that this log group has inherited from account-level - // settings. - InheritedProperties []*string `locationName:"inheritedProperties" type:"list" enum:"InheritedProperty"` - - // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log - // data. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + IngestionTime *int64 `locationName:"ingestionTime" type:"long"` - // The name of the log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - // The number of metric filters. - MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"` + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` - // The number of days to retain the log events in the specified log group. Possible - // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, - // 1096, 1827, 2192, 2557, 2922, 3288, and 3653. - // - // To set a log group so that its log events do not expire, use DeleteRetentionPolicy - // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html). - RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"` + Message *string `locationName:"message" min:"1" type:"string"` - // The number of bytes stored. - StoredBytes *int64 `locationName:"storedBytes" type:"long"` + Timestamp *int64 `locationName:"timestamp" type:"long"` } // String returns the string representation. @@ -13213,7 +10352,7 @@ type LogGroup struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogGroup) String() string { +func (s LiveTailSessionLogEvent) String() string { return awsutil.Prettify(s) } @@ -13222,74 +10361,44 @@ func (s LogGroup) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogGroup) GoString() string { +func (s LiveTailSessionLogEvent) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *LogGroup) SetArn(v string) *LogGroup { - s.Arn = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *LogGroup) SetCreationTime(v int64) *LogGroup { - s.CreationTime = &v - return s -} - -// SetDataProtectionStatus sets the DataProtectionStatus field's value. -func (s *LogGroup) SetDataProtectionStatus(v string) *LogGroup { - s.DataProtectionStatus = &v - return s -} - -// SetInheritedProperties sets the InheritedProperties field's value. -func (s *LogGroup) SetInheritedProperties(v []*string) *LogGroup { - s.InheritedProperties = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *LogGroup) SetKmsKeyId(v string) *LogGroup { - s.KmsKeyId = &v +// SetIngestionTime sets the IngestionTime field's value. +func (s *LiveTailSessionLogEvent) SetIngestionTime(v int64) *LiveTailSessionLogEvent { + s.IngestionTime = &v return s } -// SetLogGroupName sets the LogGroupName field's value. -func (s *LogGroup) SetLogGroupName(v string) *LogGroup { - s.LogGroupName = &v +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *LiveTailSessionLogEvent) SetLogGroupIdentifier(v string) *LiveTailSessionLogEvent { + s.LogGroupIdentifier = &v return s } -// SetMetricFilterCount sets the MetricFilterCount field's value. -func (s *LogGroup) SetMetricFilterCount(v int64) *LogGroup { - s.MetricFilterCount = &v +// SetLogStreamName sets the LogStreamName field's value. +func (s *LiveTailSessionLogEvent) SetLogStreamName(v string) *LiveTailSessionLogEvent { + s.LogStreamName = &v return s } -// SetRetentionInDays sets the RetentionInDays field's value. -func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup { - s.RetentionInDays = &v +// SetMessage sets the Message field's value. +func (s *LiveTailSessionLogEvent) SetMessage(v string) *LiveTailSessionLogEvent { + s.Message = &v return s } -// SetStoredBytes sets the StoredBytes field's value. -func (s *LogGroup) SetStoredBytes(v int64) *LogGroup { - s.StoredBytes = &v +// SetTimestamp sets the Timestamp field's value. +func (s *LiveTailSessionLogEvent) SetTimestamp(v int64) *LiveTailSessionLogEvent { + s.Timestamp = &v return s } -// The fields contained in log events found by a GetLogGroupFields operation, -// along with the percentage of queried log events in which each field appears. -type LogGroupField struct { +type LiveTailSessionMetadata struct { _ struct{} `type:"structure"` - // The name of a log field. - Name *string `locationName:"name" type:"string"` - - // The percentage of log events queried that contained the field. - Percent *int64 `locationName:"percent" type:"integer"` + Sampled *bool `locationName:"sampled" type:"boolean"` } // String returns the string representation. @@ -13297,7 +10406,7 @@ type LogGroupField struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogGroupField) String() string { +func (s LiveTailSessionMetadata) String() string { return awsutil.Prettify(s) } @@ -13306,69 +10415,34 @@ func (s LogGroupField) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogGroupField) GoString() string { +func (s LiveTailSessionMetadata) GoString() string { return s.String() } -// SetName sets the Name field's value. -func (s *LogGroupField) SetName(v string) *LogGroupField { - s.Name = &v - return s -} - -// SetPercent sets the Percent field's value. -func (s *LogGroupField) SetPercent(v int64) *LogGroupField { - s.Percent = &v +// SetSampled sets the Sampled field's value. +func (s *LiveTailSessionMetadata) SetSampled(v bool) *LiveTailSessionMetadata { + s.Sampled = &v return s } -// Represents a log stream, which is a sequence of log events from a single -// emitter of logs. -type LogStream struct { +type LiveTailSessionStart struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the log stream. - Arn *string `locationName:"arn" type:"string"` - - // The creation time of the stream, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` - - // The time of the first event, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"` + // A symbolic description of how CloudWatch Logs should interpret the data in + // each log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for + // in the log event message. + LogEventFilterPattern *string `locationName:"logEventFilterPattern" type:"string"` - // The time of the most recent log event in the log stream in CloudWatch Logs. - // This number is expressed as the number of milliseconds after Jan 1, 1970 - // 00:00:00 UTC. The lastEventTime value updates on an eventual consistency - // basis. It typically updates in less than an hour from ingestion, but in rare - // situations might take longer. - LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"` + LogGroupIdentifiers []*string `locationName:"logGroupIdentifiers" min:"1" type:"list"` - // The ingestion time, expressed as the number of milliseconds after Jan 1, - // 1970 00:00:00 UTC The lastIngestionTime value updates on an eventual consistency - // basis. It typically updates in less than an hour after ingestion, but in - // rare situations might take longer. - LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"` + LogStreamNamePrefixes []*string `locationName:"logStreamNamePrefixes" min:"1" type:"list"` - // The name of the log stream. - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` + LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` - // The number of bytes stored. - // - // Important: As of June 17, 2019, this parameter is no longer supported for - // log streams, and is always reported as zero. This change applies only to - // log streams. The storedBytes parameter for log groups is not affected. - // - // Deprecated: Starting on June 17, 2019, this parameter will be deprecated for log streams, and will be reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected. - StoredBytes *int64 `locationName:"storedBytes" deprecated:"true" type:"long"` + RequestId *string `locationName:"requestId" type:"string"` - // The sequence token. - // - // The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions - // are always accepted regardless of receiving an invalid sequence token. You - // don't need to obtain uploadSequenceToken to use a PutLogEvents action. - UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"` + SessionId *string `locationName:"sessionId" type:"string"` } // String returns the string representation. @@ -13376,7 +10450,7 @@ type LogStream struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogStream) String() string { +func (s LiveTailSessionStart) String() string { return awsutil.Prettify(s) } @@ -13385,71 +10459,81 @@ func (s LogStream) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogStream) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *LogStream) SetArn(v string) *LogStream { - s.Arn = &v - return s +func (s LiveTailSessionStart) GoString() string { + return s.String() } -// SetCreationTime sets the CreationTime field's value. -func (s *LogStream) SetCreationTime(v int64) *LogStream { - s.CreationTime = &v +// SetLogEventFilterPattern sets the LogEventFilterPattern field's value. +func (s *LiveTailSessionStart) SetLogEventFilterPattern(v string) *LiveTailSessionStart { + s.LogEventFilterPattern = &v return s } -// SetFirstEventTimestamp sets the FirstEventTimestamp field's value. -func (s *LogStream) SetFirstEventTimestamp(v int64) *LogStream { - s.FirstEventTimestamp = &v +// SetLogGroupIdentifiers sets the LogGroupIdentifiers field's value. +func (s *LiveTailSessionStart) SetLogGroupIdentifiers(v []*string) *LiveTailSessionStart { + s.LogGroupIdentifiers = v return s } -// SetLastEventTimestamp sets the LastEventTimestamp field's value. -func (s *LogStream) SetLastEventTimestamp(v int64) *LogStream { - s.LastEventTimestamp = &v +// SetLogStreamNamePrefixes sets the LogStreamNamePrefixes field's value. +func (s *LiveTailSessionStart) SetLogStreamNamePrefixes(v []*string) *LiveTailSessionStart { + s.LogStreamNamePrefixes = v return s } -// SetLastIngestionTime sets the LastIngestionTime field's value. -func (s *LogStream) SetLastIngestionTime(v int64) *LogStream { - s.LastIngestionTime = &v +// SetLogStreamNames sets the LogStreamNames field's value. +func (s *LiveTailSessionStart) SetLogStreamNames(v []*string) *LiveTailSessionStart { + s.LogStreamNames = v return s } -// SetLogStreamName sets the LogStreamName field's value. -func (s *LogStream) SetLogStreamName(v string) *LogStream { - s.LogStreamName = &v +// SetRequestId sets the RequestId field's value. +func (s *LiveTailSessionStart) SetRequestId(v string) *LiveTailSessionStart { + s.RequestId = &v return s } -// SetStoredBytes sets the StoredBytes field's value. -func (s *LogStream) SetStoredBytes(v int64) *LogStream { - s.StoredBytes = &v +// SetSessionId sets the SessionId field's value. +func (s *LiveTailSessionStart) SetSessionId(v string) *LiveTailSessionStart { + s.SessionId = &v return s } -// SetUploadSequenceToken sets the UploadSequenceToken field's value. -func (s *LogStream) SetUploadSequenceToken(v string) *LogStream { - s.UploadSequenceToken = &v - return s +// The LiveTailSessionStart is and event in the StartLiveTailResponseStream group of events. +func (s *LiveTailSessionStart) eventStartLiveTailResponseStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the LiveTailSessionStart value. +// This method is only used internally within the SDK's EventStream handling. +func (s *LiveTailSessionStart) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil } -// The query string is not valid. Details about this error are displayed in -// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). -// -// For more information about valid query syntax, see CloudWatch Logs Insights -// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). -type MalformedQueryException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *LiveTailSessionStart) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} - Message_ *string `locationName:"message" type:"string"` +type LiveTailSessionUpdate struct { + _ struct{} `type:"structure"` - // Reserved. - QueryCompileError *QueryCompileError `locationName:"queryCompileError" type:"structure"` + SessionMetadata *LiveTailSessionMetadata `locationName:"sessionMetadata" type:"structure"` + + SessionResults []*LiveTailSessionLogEvent `locationName:"sessionResults" type:"list"` } // String returns the string representation. @@ -13457,7 +10541,7 @@ type MalformedQueryException struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MalformedQueryException) String() string { +func (s LiveTailSessionUpdate) String() string { return awsutil.Prettify(s) } @@ -13466,72 +10550,90 @@ func (s MalformedQueryException) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MalformedQueryException) GoString() string { +func (s LiveTailSessionUpdate) GoString() string { return s.String() } -func newErrorMalformedQueryException(v protocol.ResponseMetadata) error { - return &MalformedQueryException{ - RespMetadata: v, - } +// SetSessionMetadata sets the SessionMetadata field's value. +func (s *LiveTailSessionUpdate) SetSessionMetadata(v *LiveTailSessionMetadata) *LiveTailSessionUpdate { + s.SessionMetadata = v + return s } -// Code returns the exception type name. -func (s *MalformedQueryException) Code() string { - return "MalformedQueryException" +// SetSessionResults sets the SessionResults field's value. +func (s *LiveTailSessionUpdate) SetSessionResults(v []*LiveTailSessionLogEvent) *LiveTailSessionUpdate { + s.SessionResults = v + return s } -// Message returns the exception's message. -func (s *MalformedQueryException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} +// The LiveTailSessionUpdate is and event in the StartLiveTailResponseStream group of events. +func (s *LiveTailSessionUpdate) eventStartLiveTailResponseStream() {} -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *MalformedQueryException) OrigErr() error { +// UnmarshalEvent unmarshals the EventStream Message into the LiveTailSessionUpdate value. +// This method is only used internally within the SDK's EventStream handling. +func (s *LiveTailSessionUpdate) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } return nil } -func (s *MalformedQueryException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *MalformedQueryException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *MalformedQueryException) RequestID() string { - return s.RespMetadata.RequestID +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *LiveTailSessionUpdate) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err } -// Metric filters express how CloudWatch Logs would extract metric observations -// from ingested log events and transform them into metric data in a CloudWatch -// metric. -type MetricFilter struct { +// Represents a log group. +type LogGroup struct { _ struct{} `type:"structure"` - // The creation time of the metric filter, expressed as the number of milliseconds + // The Amazon Resource Name (ARN) of the log group. + Arn *string `locationName:"arn" type:"string"` + + // The creation time of the log group, expressed as the number of milliseconds // after Jan 1, 1970 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` - // The name of the metric filter. - FilterName *string `locationName:"filterName" min:"1" type:"string"` + // Displays whether this log group has a protection policy, or whether it had + // one in the past. For more information, see PutDataProtectionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html). + DataProtectionStatus *string `locationName:"dataProtectionStatus" type:"string" enum:"DataProtectionStatus"` - // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event can contain timestamps, IP addresses, - // strings, and so on. You use the filter pattern to specify what to look for - // in the log event message. - FilterPattern *string `locationName:"filterPattern" type:"string"` + // Displays all the properties that this log group has inherited from account-level + // settings. + InheritedProperties []*string `locationName:"inheritedProperties" type:"list" enum:"InheritedProperty"` + + // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log + // data. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // The name of the log group. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - // The metric transformations. - MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"` + // The number of metric filters. + MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"` + + // The number of days to retain the log events in the specified log group. Possible + // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, + // 1096, 1827, 2192, 2557, 2922, 3288, and 3653. + // + // To set a log group so that its log events do not expire, use DeleteRetentionPolicy + // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html). + RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"` + + // The number of bytes stored. + StoredBytes *int64 `locationName:"storedBytes" type:"long"` } // String returns the string representation. @@ -13539,7 +10641,7 @@ type MetricFilter struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricFilter) String() string { +func (s LogGroup) String() string { return awsutil.Prettify(s) } @@ -13548,52 +10650,74 @@ func (s MetricFilter) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricFilter) GoString() string { +func (s LogGroup) GoString() string { return s.String() } +// SetArn sets the Arn field's value. +func (s *LogGroup) SetArn(v string) *LogGroup { + s.Arn = &v + return s +} + // SetCreationTime sets the CreationTime field's value. -func (s *MetricFilter) SetCreationTime(v int64) *MetricFilter { +func (s *LogGroup) SetCreationTime(v int64) *LogGroup { s.CreationTime = &v return s } -// SetFilterName sets the FilterName field's value. -func (s *MetricFilter) SetFilterName(v string) *MetricFilter { - s.FilterName = &v +// SetDataProtectionStatus sets the DataProtectionStatus field's value. +func (s *LogGroup) SetDataProtectionStatus(v string) *LogGroup { + s.DataProtectionStatus = &v return s } -// SetFilterPattern sets the FilterPattern field's value. -func (s *MetricFilter) SetFilterPattern(v string) *MetricFilter { - s.FilterPattern = &v +// SetInheritedProperties sets the InheritedProperties field's value. +func (s *LogGroup) SetInheritedProperties(v []*string) *LogGroup { + s.InheritedProperties = v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *LogGroup) SetKmsKeyId(v string) *LogGroup { + s.KmsKeyId = &v return s } // SetLogGroupName sets the LogGroupName field's value. -func (s *MetricFilter) SetLogGroupName(v string) *MetricFilter { +func (s *LogGroup) SetLogGroupName(v string) *LogGroup { s.LogGroupName = &v return s } -// SetMetricTransformations sets the MetricTransformations field's value. -func (s *MetricFilter) SetMetricTransformations(v []*MetricTransformation) *MetricFilter { - s.MetricTransformations = v +// SetMetricFilterCount sets the MetricFilterCount field's value. +func (s *LogGroup) SetMetricFilterCount(v int64) *LogGroup { + s.MetricFilterCount = &v return s } -// Represents a matched event. -type MetricFilterMatchRecord struct { - _ struct{} `type:"structure"` +// SetRetentionInDays sets the RetentionInDays field's value. +func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup { + s.RetentionInDays = &v + return s +} - // The raw event data. - EventMessage *string `locationName:"eventMessage" min:"1" type:"string"` +// SetStoredBytes sets the StoredBytes field's value. +func (s *LogGroup) SetStoredBytes(v int64) *LogGroup { + s.StoredBytes = &v + return s +} - // The event number. - EventNumber *int64 `locationName:"eventNumber" type:"long"` +// The fields contained in log events found by a GetLogGroupFields operation, +// along with the percentage of queried log events in which each field appears. +type LogGroupField struct { + _ struct{} `type:"structure"` - // The values extracted from the event data by the filter. - ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"` + // The name of a log field. + Name *string `locationName:"name" type:"string"` + + // The percentage of log events queried that contained the field. + Percent *int64 `locationName:"percent" type:"integer"` } // String returns the string representation. @@ -13601,7 +10725,7 @@ type MetricFilterMatchRecord struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricFilterMatchRecord) String() string { +func (s LogGroupField) String() string { return awsutil.Prettify(s) } @@ -13610,74 +10734,69 @@ func (s MetricFilterMatchRecord) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricFilterMatchRecord) GoString() string { +func (s LogGroupField) GoString() string { return s.String() } -// SetEventMessage sets the EventMessage field's value. -func (s *MetricFilterMatchRecord) SetEventMessage(v string) *MetricFilterMatchRecord { - s.EventMessage = &v - return s -} - -// SetEventNumber sets the EventNumber field's value. -func (s *MetricFilterMatchRecord) SetEventNumber(v int64) *MetricFilterMatchRecord { - s.EventNumber = &v +// SetName sets the Name field's value. +func (s *LogGroupField) SetName(v string) *LogGroupField { + s.Name = &v return s } -// SetExtractedValues sets the ExtractedValues field's value. -func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *MetricFilterMatchRecord { - s.ExtractedValues = v +// SetPercent sets the Percent field's value. +func (s *LogGroupField) SetPercent(v int64) *LogGroupField { + s.Percent = &v return s } -// Indicates how to transform ingested log events to metric data in a CloudWatch -// metric. -type MetricTransformation struct { +// Represents a log stream, which is a sequence of log events from a single +// emitter of logs. +type LogStream struct { _ struct{} `type:"structure"` - // (Optional) The value to emit when a filter pattern does not match a log event. - // This value can be null. - DefaultValue *float64 `locationName:"defaultValue" type:"double"` + // The Amazon Resource Name (ARN) of the log stream. + Arn *string `locationName:"arn" type:"string"` - // The fields to use as dimensions for the metric. One metric filter can include - // as many as three dimensions. - // - // Metrics extracted from log events are charged as custom metrics. To prevent - // unexpected high charges, do not specify high-cardinality fields such as IPAddress - // or requestID as dimensions. Each different value found for a dimension is - // treated as a separate metric and accrues charges as a separate custom metric. - // - // CloudWatch Logs disables a metric filter if it generates 1000 different name/value - // pairs for your specified dimensions within a certain amount of time. This - // helps to prevent accidental high charges. - // - // You can also set up a billing alarm to alert you if your charges are higher - // than expected. For more information, see Creating a Billing Alarm to Monitor - // Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). - Dimensions map[string]*string `locationName:"dimensions" type:"map"` + // The creation time of the stream, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 `locationName:"creationTime" type:"long"` + + // The time of the first event, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. + FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"` + + // The time of the most recent log event in the log stream in CloudWatch Logs. + // This number is expressed as the number of milliseconds after Jan 1, 1970 + // 00:00:00 UTC. The lastEventTime value updates on an eventual consistency + // basis. It typically updates in less than an hour from ingestion, but in rare + // situations might take longer. + LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"` + + // The ingestion time, expressed as the number of milliseconds after Jan 1, + // 1970 00:00:00 UTC The lastIngestionTime value updates on an eventual consistency + // basis. It typically updates in less than an hour after ingestion, but in + // rare situations might take longer. + LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"` - // The name of the CloudWatch metric. - // - // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true"` + // The name of the log stream. + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` - // A custom namespace to contain your metric in CloudWatch. Use namespaces to - // group together metrics that are similar. For more information, see Namespaces - // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace). + // The number of bytes stored. // - // MetricNamespace is a required field - MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"` - - // The value to publish to the CloudWatch metric when a filter pattern matches - // a log event. + // Important: As of June 17, 2019, this parameter is no longer supported for + // log streams, and is always reported as zero. This change applies only to + // log streams. The storedBytes parameter for log groups is not affected. // - // MetricValue is a required field - MetricValue *string `locationName:"metricValue" type:"string" required:"true"` + // Deprecated: Starting on June 17, 2019, this parameter will be deprecated for log streams, and will be reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected. + StoredBytes *int64 `locationName:"storedBytes" deprecated:"true" type:"long"` - // The unit to assign to the metric. If you omit this, the unit is set as None. - Unit *string `locationName:"unit" type:"string" enum:"StandardUnit"` + // The sequence token. + // + // The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions + // are always accepted regardless of receiving an invalid sequence token. You + // don't need to obtain uploadSequenceToken to use a PutLogEvents action. + UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"` } // String returns the string representation. @@ -13685,7 +10804,7 @@ type MetricTransformation struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricTransformation) String() string { +func (s LogStream) String() string { return awsutil.Prettify(s) } @@ -13694,71 +10813,71 @@ func (s MetricTransformation) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricTransformation) GoString() string { +func (s LogStream) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricTransformation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"} - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.MetricNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("MetricNamespace")) - } - if s.MetricValue == nil { - invalidParams.Add(request.NewErrParamRequired("MetricValue")) - } +// SetArn sets the Arn field's value. +func (s *LogStream) SetArn(v string) *LogStream { + s.Arn = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCreationTime sets the CreationTime field's value. +func (s *LogStream) SetCreationTime(v int64) *LogStream { + s.CreationTime = &v + return s } -// SetDefaultValue sets the DefaultValue field's value. -func (s *MetricTransformation) SetDefaultValue(v float64) *MetricTransformation { - s.DefaultValue = &v +// SetFirstEventTimestamp sets the FirstEventTimestamp field's value. +func (s *LogStream) SetFirstEventTimestamp(v int64) *LogStream { + s.FirstEventTimestamp = &v return s } -// SetDimensions sets the Dimensions field's value. -func (s *MetricTransformation) SetDimensions(v map[string]*string) *MetricTransformation { - s.Dimensions = v +// SetLastEventTimestamp sets the LastEventTimestamp field's value. +func (s *LogStream) SetLastEventTimestamp(v int64) *LogStream { + s.LastEventTimestamp = &v return s } -// SetMetricName sets the MetricName field's value. -func (s *MetricTransformation) SetMetricName(v string) *MetricTransformation { - s.MetricName = &v +// SetLastIngestionTime sets the LastIngestionTime field's value. +func (s *LogStream) SetLastIngestionTime(v int64) *LogStream { + s.LastIngestionTime = &v return s } -// SetMetricNamespace sets the MetricNamespace field's value. -func (s *MetricTransformation) SetMetricNamespace(v string) *MetricTransformation { - s.MetricNamespace = &v +// SetLogStreamName sets the LogStreamName field's value. +func (s *LogStream) SetLogStreamName(v string) *LogStream { + s.LogStreamName = &v return s } -// SetMetricValue sets the MetricValue field's value. -func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation { - s.MetricValue = &v +// SetStoredBytes sets the StoredBytes field's value. +func (s *LogStream) SetStoredBytes(v int64) *LogStream { + s.StoredBytes = &v return s } -// SetUnit sets the Unit field's value. -func (s *MetricTransformation) SetUnit(v string) *MetricTransformation { - s.Unit = &v +// SetUploadSequenceToken sets the UploadSequenceToken field's value. +func (s *LogStream) SetUploadSequenceToken(v string) *LogStream { + s.UploadSequenceToken = &v return s } -// Multiple concurrent requests to update the same resource were in conflict. -type OperationAbortedException struct { +// The query string is not valid. Details about this error are displayed in +// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). +// +// For more information about valid query syntax, see CloudWatch Logs Insights +// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). +type MalformedQueryException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` + + // Reserved. + QueryCompileError *QueryCompileError `locationName:"queryCompileError" type:"structure"` } // String returns the string representation. @@ -13766,7 +10885,7 @@ type OperationAbortedException struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s OperationAbortedException) String() string { +func (s MalformedQueryException) String() string { return awsutil.Prettify(s) } @@ -13775,23 +10894,23 @@ func (s OperationAbortedException) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s OperationAbortedException) GoString() string { +func (s MalformedQueryException) GoString() string { return s.String() } -func newErrorOperationAbortedException(v protocol.ResponseMetadata) error { - return &OperationAbortedException{ +func newErrorMalformedQueryException(v protocol.ResponseMetadata) error { + return &MalformedQueryException{ RespMetadata: v, } } // Code returns the exception type name. -func (s *OperationAbortedException) Code() string { - return "OperationAbortedException" +func (s *MalformedQueryException) Code() string { + return "MalformedQueryException" } // Message returns the exception's message. -func (s *OperationAbortedException) Message() string { +func (s *MalformedQueryException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -13799,161 +10918,48 @@ func (s *OperationAbortedException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s *OperationAbortedException) OrigErr() error { +func (s *MalformedQueryException) OrigErr() error { return nil } -func (s *OperationAbortedException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +func (s *MalformedQueryException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } // Status code returns the HTTP status code for the request's response error. -func (s *OperationAbortedException) StatusCode() int { +func (s *MalformedQueryException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s *OperationAbortedException) RequestID() string { +func (s *MalformedQueryException) RequestID() string { return s.RespMetadata.RequestID } -// Represents a log event. -type OutputLogEvent struct { +// Metric filters express how CloudWatch Logs would extract metric observations +// from ingested log events and transform them into metric data in a CloudWatch +// metric. +type MetricFilter struct { _ struct{} `type:"structure"` - // The time the event was ingested, expressed as the number of milliseconds + // The creation time of the metric filter, expressed as the number of milliseconds // after Jan 1, 1970 00:00:00 UTC. - IngestionTime *int64 `locationName:"ingestionTime" type:"long"` - - // The data contained in the log event. - Message *string `locationName:"message" min:"1" type:"string"` - - // The time the event occurred, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - Timestamp *int64 `locationName:"timestamp" type:"long"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OutputLogEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OutputLogEvent) GoString() string { - return s.String() -} - -// SetIngestionTime sets the IngestionTime field's value. -func (s *OutputLogEvent) SetIngestionTime(v int64) *OutputLogEvent { - s.IngestionTime = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *OutputLogEvent) SetMessage(v string) *OutputLogEvent { - s.Message = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *OutputLogEvent) SetTimestamp(v int64) *OutputLogEvent { - s.Timestamp = &v - return s -} - -// A structure that contains information about one delivery destination policy. -type Policy struct { - _ struct{} `type:"structure"` - - // The contents of the delivery destination policy. - DeliveryDestinationPolicy *string `locationName:"deliveryDestinationPolicy" min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Policy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Policy) GoString() string { - return s.String() -} - -// SetDeliveryDestinationPolicy sets the DeliveryDestinationPolicy field's value. -func (s *Policy) SetDeliveryDestinationPolicy(v string) *Policy { - s.DeliveryDestinationPolicy = &v - return s -} - -type PutAccountPolicyInput struct { - _ struct{} `type:"structure"` + CreationTime *int64 `locationName:"creationTime" type:"long"` - // Specify the data protection policy, in JSON. - // - // This policy must include two JSON blocks: - // - // * The first block must include both a DataIdentifer array and an Operation - // property with an Audit action. The DataIdentifer array lists the types - // of sensitive data that you want to mask. For more information about the - // available options, see Types of data that you can mask (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html). - // The Operation property with an Audit action is required to find the sensitive - // data terms. This Audit action must contain a FindingsDestination object. - // You can optionally use that FindingsDestination 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. - // - // * The second block must include both a DataIdentifer array and an Operation - // property with an Deidentify action. The DataIdentifer array must exactly - // match the DataIdentifer array in the first block of the policy. The Operation - // property with the Deidentify action is what actually masks the data, and - // it must contain the "MaskConfig": {} object. The "MaskConfig": {} object - // must be empty. - // - // For an example data protection policy, see the Examples section on this page. - // - // The contents of the two DataIdentifer arrays must match exactly. - // - // In addition to the two JSON blocks, the policyDocument can also include Name, - // Description, and Version fields. The Name is different than the operation's - // policyName parameter, and is used as a dimension when CloudWatch Logs reports - // audit findings metrics to CloudWatch. - // - // The JSON specified in policyDocument can be up to 30,720 characters. - // - // PolicyDocument is a required field - PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` + // The name of the metric filter. + FilterName *string `locationName:"filterName" min:"1" type:"string"` - // A name for the policy. This must be unique within the account. - // - // PolicyName is a required field - PolicyName *string `locationName:"policyName" type:"string" required:"true"` + // A symbolic description of how CloudWatch Logs should interpret the data in + // each log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for + // in the log event message. + FilterPattern *string `locationName:"filterPattern" type:"string"` - // Currently the only valid value for this parameter is DATA_PROTECTION_POLICY. - // - // PolicyType is a required field - PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` + // The name of the log group. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - // Currently the only valid value for this parameter is ALL, which specifies - // that the data protection policy applies to all log groups in the account. - // If you omit this parameter, the default of ALL is used. - Scope *string `locationName:"scope" type:"string" enum:"Scope"` + // The metric transformations. + MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"` } // String returns the string representation. @@ -13961,7 +10967,7 @@ type PutAccountPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutAccountPolicyInput) String() string { +func (s MetricFilter) String() string { return awsutil.Prettify(s) } @@ -13970,58 +10976,52 @@ func (s PutAccountPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutAccountPolicyInput) GoString() string { +func (s MetricFilter) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutAccountPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutAccountPolicyInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyType == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCreationTime sets the CreationTime field's value. +func (s *MetricFilter) SetCreationTime(v int64) *MetricFilter { + s.CreationTime = &v + return s } -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutAccountPolicyInput) SetPolicyDocument(v string) *PutAccountPolicyInput { - s.PolicyDocument = &v +// SetFilterName sets the FilterName field's value. +func (s *MetricFilter) SetFilterName(v string) *MetricFilter { + s.FilterName = &v return s } -// SetPolicyName sets the PolicyName field's value. -func (s *PutAccountPolicyInput) SetPolicyName(v string) *PutAccountPolicyInput { - s.PolicyName = &v +// SetFilterPattern sets the FilterPattern field's value. +func (s *MetricFilter) SetFilterPattern(v string) *MetricFilter { + s.FilterPattern = &v return s } -// SetPolicyType sets the PolicyType field's value. -func (s *PutAccountPolicyInput) SetPolicyType(v string) *PutAccountPolicyInput { - s.PolicyType = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *MetricFilter) SetLogGroupName(v string) *MetricFilter { + s.LogGroupName = &v return s } -// SetScope sets the Scope field's value. -func (s *PutAccountPolicyInput) SetScope(v string) *PutAccountPolicyInput { - s.Scope = &v +// SetMetricTransformations sets the MetricTransformations field's value. +func (s *MetricFilter) SetMetricTransformations(v []*MetricTransformation) *MetricFilter { + s.MetricTransformations = v return s } -type PutAccountPolicyOutput struct { +// Represents a matched event. +type MetricFilterMatchRecord struct { _ struct{} `type:"structure"` - // The account policy that you created. - AccountPolicy *AccountPolicy `locationName:"accountPolicy" type:"structure"` + // The raw event data. + EventMessage *string `locationName:"eventMessage" min:"1" type:"string"` + + // The event number. + EventNumber *int64 `locationName:"eventNumber" type:"long"` + + // The values extracted from the event data by the filter. + ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"` } // String returns the string representation. @@ -14029,7 +11029,7 @@ type PutAccountPolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutAccountPolicyOutput) String() string { +func (s MetricFilterMatchRecord) String() string { return awsutil.Prettify(s) } @@ -14038,58 +11038,74 @@ func (s PutAccountPolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutAccountPolicyOutput) GoString() string { +func (s MetricFilterMatchRecord) GoString() string { return s.String() } -// SetAccountPolicy sets the AccountPolicy field's value. -func (s *PutAccountPolicyOutput) SetAccountPolicy(v *AccountPolicy) *PutAccountPolicyOutput { - s.AccountPolicy = v +// SetEventMessage sets the EventMessage field's value. +func (s *MetricFilterMatchRecord) SetEventMessage(v string) *MetricFilterMatchRecord { + s.EventMessage = &v return s } -type PutDataProtectionPolicyInput struct { +// SetEventNumber sets the EventNumber field's value. +func (s *MetricFilterMatchRecord) SetEventNumber(v int64) *MetricFilterMatchRecord { + s.EventNumber = &v + return s +} + +// SetExtractedValues sets the ExtractedValues field's value. +func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *MetricFilterMatchRecord { + s.ExtractedValues = v + return s +} + +// Indicates how to transform ingested log events to metric data in a CloudWatch +// metric. +type MetricTransformation struct { _ struct{} `type:"structure"` - // Specify either the log group name or log group ARN. - // - // LogGroupIdentifier is a required field - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` + // (Optional) The value to emit when a filter pattern does not match a log event. + // This value can be null. + DefaultValue *float64 `locationName:"defaultValue" type:"double"` - // Specify the data protection policy, in JSON. - // - // This policy must include two JSON blocks: - // - // * The first block must include both a DataIdentifer array and an Operation - // property with an Audit action. The DataIdentifer array lists the types - // of sensitive data that you want to mask. For more information about the - // available options, see Types of data that you can mask (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html). - // The Operation property with an Audit action is required to find the sensitive - // data terms. This Audit action must contain a FindingsDestination object. - // You can optionally use that FindingsDestination 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. + // The fields to use as dimensions for the metric. One metric filter can include + // as many as three dimensions. // - // * The second block must include both a DataIdentifer array and an Operation - // property with an Deidentify action. The DataIdentifer array must exactly - // match the DataIdentifer array in the first block of the policy. The Operation - // property with the Deidentify action is what actually masks the data, and - // it must contain the "MaskConfig": {} object. The "MaskConfig": {} object - // must be empty. + // Metrics extracted from log events are charged as custom metrics. To prevent + // unexpected high charges, do not specify high-cardinality fields such as IPAddress + // or requestID as dimensions. Each different value found for a dimension is + // treated as a separate metric and accrues charges as a separate custom metric. // - // For an example data protection policy, see the Examples section on this page. + // CloudWatch Logs disables a metric filter if it generates 1000 different name/value + // pairs for your specified dimensions within a certain amount of time. This + // helps to prevent accidental high charges. // - // The contents of the two DataIdentifer arrays must match exactly. + // You can also set up a billing alarm to alert you if your charges are higher + // than expected. For more information, see Creating a Billing Alarm to Monitor + // Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). + Dimensions map[string]*string `locationName:"dimensions" type:"map"` + + // The name of the CloudWatch metric. // - // In addition to the two JSON blocks, the policyDocument can also include Name, - // Description, and Version fields. The Name is used as a dimension when CloudWatch - // Logs reports audit findings metrics to CloudWatch. + // MetricName is a required field + MetricName *string `locationName:"metricName" type:"string" required:"true"` + + // A custom namespace to contain your metric in CloudWatch. Use namespaces to + // group together metrics that are similar. For more information, see Namespaces + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace). // - // The JSON specified in policyDocument can be up to 30,720 characters. + // MetricNamespace is a required field + MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"` + + // The value to publish to the CloudWatch metric when a filter pattern matches + // a log event. // - // PolicyDocument is a required field - PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` + // MetricValue is a required field + MetricValue *string `locationName:"metricValue" type:"string" required:"true"` + + // The unit to assign to the metric. If you omit this, the unit is set as None. + Unit *string `locationName:"unit" type:"string" enum:"StandardUnit"` } // String returns the string representation. @@ -14097,7 +11113,7 @@ type PutDataProtectionPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDataProtectionPolicyInput) String() string { +func (s MetricTransformation) String() string { return awsutil.Prettify(s) } @@ -14106,21 +11122,21 @@ func (s PutDataProtectionPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDataProtectionPolicyInput) GoString() string { +func (s MetricTransformation) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PutDataProtectionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDataProtectionPolicyInput"} - if s.LogGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) +func (s *MetricTransformation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"} + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + if s.MetricNamespace == nil { + invalidParams.Add(request.NewErrParamRequired("MetricNamespace")) } - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) + if s.MetricValue == nil { + invalidParams.Add(request.NewErrParamRequired("MetricValue")) } if invalidParams.Len() > 0 { @@ -14129,90 +11145,48 @@ func (s *PutDataProtectionPolicyInput) Validate() error { return nil } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *PutDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *PutDataProtectionPolicyInput { - s.LogGroupIdentifier = &v +// SetDefaultValue sets the DefaultValue field's value. +func (s *MetricTransformation) SetDefaultValue(v float64) *MetricTransformation { + s.DefaultValue = &v return s } -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutDataProtectionPolicyInput) SetPolicyDocument(v string) *PutDataProtectionPolicyInput { - s.PolicyDocument = &v +// SetDimensions sets the Dimensions field's value. +func (s *MetricTransformation) SetDimensions(v map[string]*string) *MetricTransformation { + s.Dimensions = v return s } -type PutDataProtectionPolicyOutput struct { - _ struct{} `type:"structure"` - - // The date and time that this policy was most recently updated. - LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` - - // The log group name or ARN that you specified in your request. - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - - // The data protection policy used for this log group. - PolicyDocument *string `locationName:"policyDocument" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutDataProtectionPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutDataProtectionPolicyOutput) GoString() string { - return s.String() -} - -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *PutDataProtectionPolicyOutput) SetLastUpdatedTime(v int64) *PutDataProtectionPolicyOutput { - s.LastUpdatedTime = &v +// SetMetricName sets the MetricName field's value. +func (s *MetricTransformation) SetMetricName(v string) *MetricTransformation { + s.MetricName = &v return s } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *PutDataProtectionPolicyOutput) SetLogGroupIdentifier(v string) *PutDataProtectionPolicyOutput { - s.LogGroupIdentifier = &v +// SetMetricNamespace sets the MetricNamespace field's value. +func (s *MetricTransformation) SetMetricNamespace(v string) *MetricTransformation { + s.MetricNamespace = &v return s } -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutDataProtectionPolicyOutput) SetPolicyDocument(v string) *PutDataProtectionPolicyOutput { - s.PolicyDocument = &v +// SetMetricValue sets the MetricValue field's value. +func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation { + s.MetricValue = &v return s } -type PutDeliveryDestinationInput struct { - _ struct{} `type:"structure"` - - // A structure that contains the ARN of the Amazon Web Services resource that - // will receive the logs. - // - // DeliveryDestinationConfiguration is a required field - DeliveryDestinationConfiguration *DeliveryDestinationConfiguration `locationName:"deliveryDestinationConfiguration" type:"structure" required:"true"` - - // A name for this delivery destination. This name must be unique for all delivery - // destinations in your account. - // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The format for the logs that this delivery destination will receive. - OutputFormat *string `locationName:"outputFormat" type:"string" enum:"OutputFormat"` +// SetUnit sets the Unit field's value. +func (s *MetricTransformation) SetUnit(v string) *MetricTransformation { + s.Unit = &v + return s +} - // An optional list of key-value pairs to associate with the resource. - // - // For more information about tagging, see Tagging Amazon Web Services resources - // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` +// Multiple concurrent requests to update the same resource were in conflict. +type OperationAbortedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. @@ -14220,7 +11194,7 @@ type PutDeliveryDestinationInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliveryDestinationInput) String() string { +func (s OperationAbortedException) String() string { return awsutil.Prettify(s) } @@ -14229,67 +11203,62 @@ func (s PutDeliveryDestinationInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliveryDestinationInput) GoString() string { +func (s OperationAbortedException) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutDeliveryDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDeliveryDestinationInput"} - if s.DeliveryDestinationConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationConfiguration")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.DeliveryDestinationConfiguration != nil { - if err := s.DeliveryDestinationConfiguration.Validate(); err != nil { - invalidParams.AddNested("DeliveryDestinationConfiguration", err.(request.ErrInvalidParams)) - } +func newErrorOperationAbortedException(v protocol.ResponseMetadata) error { + return &OperationAbortedException{ + RespMetadata: v, } +} - if invalidParams.Len() > 0 { - return invalidParams +// Code returns the exception type name. +func (s *OperationAbortedException) Code() string { + return "OperationAbortedException" +} + +// Message returns the exception's message. +func (s *OperationAbortedException) Message() string { + if s.Message_ != nil { + return *s.Message_ } - return nil + return "" } -// SetDeliveryDestinationConfiguration sets the DeliveryDestinationConfiguration field's value. -func (s *PutDeliveryDestinationInput) SetDeliveryDestinationConfiguration(v *DeliveryDestinationConfiguration) *PutDeliveryDestinationInput { - s.DeliveryDestinationConfiguration = v - return s +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *OperationAbortedException) OrigErr() error { + return nil } -// SetName sets the Name field's value. -func (s *PutDeliveryDestinationInput) SetName(v string) *PutDeliveryDestinationInput { - s.Name = &v - return s +func (s *OperationAbortedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } -// SetOutputFormat sets the OutputFormat field's value. -func (s *PutDeliveryDestinationInput) SetOutputFormat(v string) *PutDeliveryDestinationInput { - s.OutputFormat = &v - return s +// Status code returns the HTTP status code for the request's response error. +func (s *OperationAbortedException) StatusCode() int { + return s.RespMetadata.StatusCode } -// SetTags sets the Tags field's value. -func (s *PutDeliveryDestinationInput) SetTags(v map[string]*string) *PutDeliveryDestinationInput { - s.Tags = v - return s +// RequestID returns the service's response RequestID for request. +func (s *OperationAbortedException) RequestID() string { + return s.RespMetadata.RequestID } -type PutDeliveryDestinationOutput struct { +// Represents a log event. +type OutputLogEvent struct { _ struct{} `type:"structure"` - // A structure containing information about the delivery destination that you - // just created or updated. - DeliveryDestination *DeliveryDestination `locationName:"deliveryDestination" type:"structure"` + // The time the event was ingested, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + IngestionTime *int64 `locationName:"ingestionTime" type:"long"` + + // The data contained in the log event. + Message *string `locationName:"message" min:"1" type:"string"` + + // The time the event occurred, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. + Timestamp *int64 `locationName:"timestamp" type:"long"` } // String returns the string representation. @@ -14297,7 +11266,7 @@ type PutDeliveryDestinationOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliveryDestinationOutput) String() string { +func (s OutputLogEvent) String() string { return awsutil.Prettify(s) } @@ -14306,28 +11275,81 @@ func (s PutDeliveryDestinationOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliveryDestinationOutput) GoString() string { +func (s OutputLogEvent) GoString() string { return s.String() } -// SetDeliveryDestination sets the DeliveryDestination field's value. -func (s *PutDeliveryDestinationOutput) SetDeliveryDestination(v *DeliveryDestination) *PutDeliveryDestinationOutput { - s.DeliveryDestination = v +// SetIngestionTime sets the IngestionTime field's value. +func (s *OutputLogEvent) SetIngestionTime(v int64) *OutputLogEvent { + s.IngestionTime = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *OutputLogEvent) SetMessage(v string) *OutputLogEvent { + s.Message = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *OutputLogEvent) SetTimestamp(v int64) *OutputLogEvent { + s.Timestamp = &v return s } -type PutDeliveryDestinationPolicyInput struct { +type PutAccountPolicyInput struct { _ struct{} `type:"structure"` - // The name of the delivery destination to assign this policy to. + // Specify the data protection policy, in JSON. + // + // This policy must include two JSON blocks: + // + // * The first block must include both a DataIdentifer array and an Operation + // property with an Audit action. The DataIdentifer array lists the types + // of sensitive data that you want to mask. For more information about the + // available options, see Types of data that you can mask (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html). + // The Operation property with an Audit action is required to find the sensitive + // data terms. This Audit action must contain a FindingsDestination object. + // You can optionally use that FindingsDestination 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. + // + // * The second block must include both a DataIdentifer array and an Operation + // property with an Deidentify action. The DataIdentifer array must exactly + // match the DataIdentifer array in the first block of the policy. The Operation + // property with the Deidentify action is what actually masks the data, and + // it must contain the "MaskConfig": {} object. The "MaskConfig": {} object + // must be empty. + // + // For an example data protection policy, see the Examples section on this page. + // + // The contents of the two DataIdentifer arrays must match exactly. + // + // In addition to the two JSON blocks, the policyDocument can also include Name, + // Description, and Version fields. The Name is different than the operation's + // policyName parameter, and is used as a dimension when CloudWatch Logs reports + // audit findings metrics to CloudWatch. + // + // The JSON specified in policyDocument can be up to 30,720 characters. + // + // PolicyDocument is a required field + PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` + + // A name for the policy. This must be unique within the account. // - // DeliveryDestinationName is a required field - DeliveryDestinationName *string `locationName:"deliveryDestinationName" min:"1" type:"string" required:"true"` + // PolicyName is a required field + PolicyName *string `locationName:"policyName" type:"string" required:"true"` - // The contents of the policy. + // Currently the only valid value for this parameter is DATA_PROTECTION_POLICY. // - // DeliveryDestinationPolicy is a required field - DeliveryDestinationPolicy *string `locationName:"deliveryDestinationPolicy" min:"1" type:"string" required:"true"` + // PolicyType is a required field + PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` + + // Currently the only valid value for this parameter is ALL, which specifies + // that the data protection policy applies to all log groups in the account. + // If you omit this parameter, the default of ALL is used. + Scope *string `locationName:"scope" type:"string" enum:"Scope"` } // String returns the string representation. @@ -14335,7 +11357,7 @@ type PutDeliveryDestinationPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliveryDestinationPolicyInput) String() string { +func (s PutAccountPolicyInput) String() string { return awsutil.Prettify(s) } @@ -14344,24 +11366,21 @@ func (s PutDeliveryDestinationPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliveryDestinationPolicyInput) GoString() string { +func (s PutAccountPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PutDeliveryDestinationPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDeliveryDestinationPolicyInput"} - if s.DeliveryDestinationName == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationName")) - } - if s.DeliveryDestinationName != nil && len(*s.DeliveryDestinationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryDestinationName", 1)) +func (s *PutAccountPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutAccountPolicyInput"} + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) } - if s.DeliveryDestinationPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationPolicy")) + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) } - if s.DeliveryDestinationPolicy != nil && len(*s.DeliveryDestinationPolicy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeliveryDestinationPolicy", 1)) + if s.PolicyType == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyType")) } if invalidParams.Len() > 0 { @@ -14370,23 +11389,35 @@ func (s *PutDeliveryDestinationPolicyInput) Validate() error { return nil } -// SetDeliveryDestinationName sets the DeliveryDestinationName field's value. -func (s *PutDeliveryDestinationPolicyInput) SetDeliveryDestinationName(v string) *PutDeliveryDestinationPolicyInput { - s.DeliveryDestinationName = &v +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *PutAccountPolicyInput) SetPolicyDocument(v string) *PutAccountPolicyInput { + s.PolicyDocument = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *PutAccountPolicyInput) SetPolicyName(v string) *PutAccountPolicyInput { + s.PolicyName = &v + return s +} + +// SetPolicyType sets the PolicyType field's value. +func (s *PutAccountPolicyInput) SetPolicyType(v string) *PutAccountPolicyInput { + s.PolicyType = &v return s } -// SetDeliveryDestinationPolicy sets the DeliveryDestinationPolicy field's value. -func (s *PutDeliveryDestinationPolicyInput) SetDeliveryDestinationPolicy(v string) *PutDeliveryDestinationPolicyInput { - s.DeliveryDestinationPolicy = &v +// SetScope sets the Scope field's value. +func (s *PutAccountPolicyInput) SetScope(v string) *PutAccountPolicyInput { + s.Scope = &v return s } -type PutDeliveryDestinationPolicyOutput struct { +type PutAccountPolicyOutput struct { _ struct{} `type:"structure"` - // The contents of the policy that you just created. - Policy *Policy `locationName:"policy" type:"structure"` + // The account policy that you created. + AccountPolicy *AccountPolicy `locationName:"accountPolicy" type:"structure"` } // String returns the string representation. @@ -14394,7 +11425,7 @@ type PutDeliveryDestinationPolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliveryDestinationPolicyOutput) String() string { +func (s PutAccountPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -14403,42 +11434,58 @@ func (s PutDeliveryDestinationPolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliveryDestinationPolicyOutput) GoString() string { +func (s PutAccountPolicyOutput) GoString() string { return s.String() } -// SetPolicy sets the Policy field's value. -func (s *PutDeliveryDestinationPolicyOutput) SetPolicy(v *Policy) *PutDeliveryDestinationPolicyOutput { - s.Policy = v +// SetAccountPolicy sets the AccountPolicy field's value. +func (s *PutAccountPolicyOutput) SetAccountPolicy(v *AccountPolicy) *PutAccountPolicyOutput { + s.AccountPolicy = v return s } -type PutDeliverySourceInput struct { +type PutDataProtectionPolicyInput struct { _ struct{} `type:"structure"` - // Defines the type of log that the source is sending. For valid values for - // this parameter, see the documentation for the source service. + // Specify either the log group name or log group ARN. // - // LogType is a required field - LogType *string `locationName:"logType" min:"1" type:"string" required:"true"` + // LogGroupIdentifier is a required field + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` - // A name for this delivery source. This name must be unique for all delivery - // sources in your account. + // Specify the data protection policy, in JSON. // - // Name is a required field - Name *string `locationName:"name" min:"1" type:"string" required:"true"` - - // The ARN of the Amazon Web Services resource that is generating and sending - // logs. For example, arn:aws:workmail:us-east-1:123456789012:organization/m-1234EXAMPLEabcd1234abcd1234abcd1234 + // This policy must include two JSON blocks: // - // ResourceArn is a required field - ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - - // An optional list of key-value pairs to associate with the resource. + // * The first block must include both a DataIdentifer array and an Operation + // property with an Audit action. The DataIdentifer array lists the types + // of sensitive data that you want to mask. For more information about the + // available options, see Types of data that you can mask (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html). + // The Operation property with an Audit action is required to find the sensitive + // data terms. This Audit action must contain a FindingsDestination object. + // You can optionally use that FindingsDestination 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. // - // For more information about tagging, see Tagging Amazon Web Services resources - // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` + // * The second block must include both a DataIdentifer array and an Operation + // property with an Deidentify action. The DataIdentifer array must exactly + // match the DataIdentifer array in the first block of the policy. The Operation + // property with the Deidentify action is what actually masks the data, and + // it must contain the "MaskConfig": {} object. The "MaskConfig": {} object + // must be empty. + // + // For an example data protection policy, see the Examples section on this page. + // + // The contents of the two DataIdentifer arrays must match exactly. + // + // In addition to the two JSON blocks, the policyDocument can also include Name, + // Description, and Version fields. The Name is used as a dimension when CloudWatch + // Logs reports audit findings metrics to CloudWatch. + // + // The JSON specified in policyDocument can be up to 30,720 characters. + // + // PolicyDocument is a required field + PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` } // String returns the string representation. @@ -14446,7 +11493,7 @@ type PutDeliverySourceInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliverySourceInput) String() string { +func (s PutDataProtectionPolicyInput) String() string { return awsutil.Prettify(s) } @@ -14455,30 +11502,21 @@ func (s PutDeliverySourceInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliverySourceInput) GoString() string { +func (s PutDataProtectionPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PutDeliverySourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDeliverySourceInput"} - if s.LogType == nil { - invalidParams.Add(request.NewErrParamRequired("LogType")) - } - if s.LogType != nil && len(*s.LogType) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogType", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) +func (s *PutDataProtectionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutDataProtectionPolicyInput"} + if s.LogGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) } - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) } if invalidParams.Len() > 0 { @@ -14486,37 +11524,30 @@ func (s *PutDeliverySourceInput) Validate() error { } return nil } - -// SetLogType sets the LogType field's value. -func (s *PutDeliverySourceInput) SetLogType(v string) *PutDeliverySourceInput { - s.LogType = &v - return s -} - -// SetName sets the Name field's value. -func (s *PutDeliverySourceInput) SetName(v string) *PutDeliverySourceInput { - s.Name = &v - return s -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *PutDeliverySourceInput) SetResourceArn(v string) *PutDeliverySourceInput { - s.ResourceArn = &v + +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *PutDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *PutDataProtectionPolicyInput { + s.LogGroupIdentifier = &v return s } -// SetTags sets the Tags field's value. -func (s *PutDeliverySourceInput) SetTags(v map[string]*string) *PutDeliverySourceInput { - s.Tags = v +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *PutDataProtectionPolicyInput) SetPolicyDocument(v string) *PutDataProtectionPolicyInput { + s.PolicyDocument = &v return s } -type PutDeliverySourceOutput struct { +type PutDataProtectionPolicyOutput struct { _ struct{} `type:"structure"` - // A structure containing information about the delivery source that was just - // created or updated. - DeliverySource *DeliverySource `locationName:"deliverySource" type:"structure"` + // The date and time that this policy was most recently updated. + LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` + + // The log group name or ARN that you specified in your request. + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` + + // The data protection policy used for this log group. + PolicyDocument *string `locationName:"policyDocument" type:"string"` } // String returns the string representation. @@ -14524,7 +11555,7 @@ type PutDeliverySourceOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliverySourceOutput) String() string { +func (s PutDataProtectionPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -14533,13 +11564,25 @@ func (s PutDeliverySourceOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDeliverySourceOutput) GoString() string { +func (s PutDataProtectionPolicyOutput) GoString() string { return s.String() } -// SetDeliverySource sets the DeliverySource field's value. -func (s *PutDeliverySourceOutput) SetDeliverySource(v *DeliverySource) *PutDeliverySourceOutput { - s.DeliverySource = v +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *PutDataProtectionPolicyOutput) SetLastUpdatedTime(v int64) *PutDataProtectionPolicyOutput { + s.LastUpdatedTime = &v + return s +} + +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *PutDataProtectionPolicyOutput) SetLogGroupIdentifier(v string) *PutDataProtectionPolicyOutput { + s.LogGroupIdentifier = &v + return s +} + +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *PutDataProtectionPolicyOutput) SetPolicyDocument(v string) *PutDataProtectionPolicyOutput { + s.PolicyDocument = &v return s } @@ -16119,15 +13162,310 @@ func (s *ResultField) SetValue(v string) *ResultField { return s } -// Represents the search status of a log stream. -type SearchedLogStream struct { +// Represents the search status of a log stream. +type SearchedLogStream struct { + _ struct{} `type:"structure"` + + // The name of the log stream. + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` + + // Indicates whether all the events in this log stream were searched. + SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SearchedLogStream) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SearchedLogStream) GoString() string { + return s.String() +} + +// SetLogStreamName sets the LogStreamName field's value. +func (s *SearchedLogStream) SetLogStreamName(v string) *SearchedLogStream { + s.LogStreamName = &v + return s +} + +// SetSearchedCompletely sets the SearchedCompletely field's value. +func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream { + s.SearchedCompletely = &v + return s +} + +// The service cannot complete the request. +type ServiceUnavailableException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceUnavailableException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceUnavailableException) GoString() string { + return s.String() +} + +func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { + return &ServiceUnavailableException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ServiceUnavailableException) Code() string { + return "ServiceUnavailableException" +} + +// Message returns the exception's message. +func (s *ServiceUnavailableException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ServiceUnavailableException) OrigErr() error { + return nil +} + +func (s *ServiceUnavailableException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID +} + +type SessionStreamingException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SessionStreamingException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SessionStreamingException) GoString() string { + return s.String() +} + +// The SessionStreamingException is and event in the StartLiveTailResponseStream group of events. +func (s *SessionStreamingException) eventStartLiveTailResponseStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the SessionStreamingException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *SessionStreamingException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *SessionStreamingException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +func newErrorSessionStreamingException(v protocol.ResponseMetadata) error { + return &SessionStreamingException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *SessionStreamingException) Code() string { + return "SessionStreamingException" +} + +// Message returns the exception's message. +func (s *SessionStreamingException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *SessionStreamingException) OrigErr() error { + return nil +} + +func (s *SessionStreamingException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *SessionStreamingException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *SessionStreamingException) RequestID() string { + return s.RespMetadata.RequestID +} + +type SessionTimeoutException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SessionTimeoutException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SessionTimeoutException) GoString() string { + return s.String() +} + +// The SessionTimeoutException is and event in the StartLiveTailResponseStream group of events. +func (s *SessionTimeoutException) eventStartLiveTailResponseStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the SessionTimeoutException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *SessionTimeoutException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *SessionTimeoutException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +func newErrorSessionTimeoutException(v protocol.ResponseMetadata) error { + return &SessionTimeoutException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *SessionTimeoutException) Code() string { + return "SessionTimeoutException" +} + +// Message returns the exception's message. +func (s *SessionTimeoutException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *SessionTimeoutException) OrigErr() error { + return nil +} + +func (s *SessionTimeoutException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *SessionTimeoutException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *SessionTimeoutException) RequestID() string { + return s.RespMetadata.RequestID +} + +type StartLiveTailInput struct { _ struct{} `type:"structure"` - // The name of the log stream. - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` + // A symbolic description of how CloudWatch Logs should interpret the data in + // each log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for + // in the log event message. + LogEventFilterPattern *string `locationName:"logEventFilterPattern" type:"string"` - // Indicates whether all the events in this log stream were searched. - SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"` + // LogGroupIdentifiers is a required field + LogGroupIdentifiers []*string `locationName:"logGroupIdentifiers" min:"1" type:"list" required:"true"` + + LogStreamNamePrefixes []*string `locationName:"logStreamNamePrefixes" min:"1" type:"list"` + + LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` } // String returns the string representation. @@ -16135,7 +13473,7 @@ type SearchedLogStream struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s SearchedLogStream) String() string { +func (s StartLiveTailInput) String() string { return awsutil.Prettify(s) } @@ -16144,28 +13482,60 @@ func (s SearchedLogStream) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s SearchedLogStream) GoString() string { +func (s StartLiveTailInput) GoString() string { return s.String() } -// SetLogStreamName sets the LogStreamName field's value. -func (s *SearchedLogStream) SetLogStreamName(v string) *SearchedLogStream { - s.LogStreamName = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartLiveTailInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartLiveTailInput"} + if s.LogGroupIdentifiers == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifiers")) + } + if s.LogGroupIdentifiers != nil && len(s.LogGroupIdentifiers) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifiers", 1)) + } + if s.LogStreamNamePrefixes != nil && len(s.LogStreamNamePrefixes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefixes", 1)) + } + if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogEventFilterPattern sets the LogEventFilterPattern field's value. +func (s *StartLiveTailInput) SetLogEventFilterPattern(v string) *StartLiveTailInput { + s.LogEventFilterPattern = &v return s } -// SetSearchedCompletely sets the SearchedCompletely field's value. -func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream { - s.SearchedCompletely = &v +// SetLogGroupIdentifiers sets the LogGroupIdentifiers field's value. +func (s *StartLiveTailInput) SetLogGroupIdentifiers(v []*string) *StartLiveTailInput { + s.LogGroupIdentifiers = v return s } -// This request exceeds a service quota. -type ServiceQuotaExceededException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` +// SetLogStreamNamePrefixes sets the LogStreamNamePrefixes field's value. +func (s *StartLiveTailInput) SetLogStreamNamePrefixes(v []*string) *StartLiveTailInput { + s.LogStreamNamePrefixes = v + return s +} - Message_ *string `locationName:"message" type:"string"` +// SetLogStreamNames sets the LogStreamNames field's value. +func (s *StartLiveTailInput) SetLogStreamNames(v []*string) *StartLiveTailInput { + s.LogStreamNames = v + return s +} + +type StartLiveTailOutput struct { + _ struct{} `type:"structure"` + + eventStream *StartLiveTailEventStream } // String returns the string representation. @@ -16173,7 +13543,7 @@ type ServiceQuotaExceededException struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ServiceQuotaExceededException) String() string { +func (s StartLiveTailOutput) String() string { return awsutil.Prettify(s) } @@ -16182,110 +13552,202 @@ func (s ServiceQuotaExceededException) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ServiceQuotaExceededException) GoString() string { +func (s StartLiveTailOutput) GoString() string { return s.String() } -func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { - return &ServiceQuotaExceededException{ - RespMetadata: v, - } +// GetStream returns the type to interact with the event stream. +func (s *StartLiveTailOutput) GetStream() *StartLiveTailEventStream { + return s.eventStream } -// Code returns the exception type name. -func (s *ServiceQuotaExceededException) Code() string { - return "ServiceQuotaExceededException" +// The StartLiveTailOutput is and event in the StartLiveTailResponseStream group of events. +func (s *StartLiveTailOutput) eventStartLiveTailResponseStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the StartLiveTailOutput value. +// This method is only used internally within the SDK's EventStream handling. +func (s *StartLiveTailOutput) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil } -// Message returns the exception's message. -func (s *ServiceQuotaExceededException) Message() string { - if s.Message_ != nil { - return *s.Message_ +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *StartLiveTailOutput) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err } - return "" + msg.Payload = buf.Bytes() + return msg, err } -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ServiceQuotaExceededException) OrigErr() error { - return nil +// StartLiveTailResponseStreamEvent groups together all EventStream +// events writes for StartLiveTailResponseStream. +// +// These events are: +// +// - LiveTailSessionStart +// - LiveTailSessionUpdate +type StartLiveTailResponseStreamEvent interface { + eventStartLiveTailResponseStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler } -func (s *ServiceQuotaExceededException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +// StartLiveTailResponseStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be StartLiveTailResponseStream. +// +// The reader's Close method must allow multiple concurrent calls. +// +// These events are: +// +// - LiveTailSessionStart +// - LiveTailSessionUpdate +// - StartLiveTailResponseStreamUnknownEvent +type StartLiveTailResponseStreamReader interface { + // Returns a channel of events as they are read from the event stream. + Events() <-chan StartLiveTailResponseStreamEvent + + // Close will stop the reader reading events from the stream. + Close() error + + // Returns any error that has occurred while reading from the event stream. + Err() error } -// Status code returns the HTTP status code for the request's response error. -func (s *ServiceQuotaExceededException) StatusCode() int { - return s.RespMetadata.StatusCode +type readStartLiveTailResponseStream struct { + eventReader *eventstreamapi.EventReader + stream chan StartLiveTailResponseStreamEvent + err *eventstreamapi.OnceError + + done chan struct{} + closeOnce sync.Once } -// RequestID returns the service's response RequestID for request. -func (s *ServiceQuotaExceededException) RequestID() string { - return s.RespMetadata.RequestID +func newReadStartLiveTailResponseStream(eventReader *eventstreamapi.EventReader) *readStartLiveTailResponseStream { + r := &readStartLiveTailResponseStream{ + eventReader: eventReader, + stream: make(chan StartLiveTailResponseStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } + go r.readEventStream() + + return r } -// The service cannot complete the request. -type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` +// Close will close the underlying event stream reader. +func (r *readStartLiveTailResponseStream) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} - Message_ *string `locationName:"message" type:"string"` +func (r *readStartLiveTailResponseStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() } -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceUnavailableException) String() string { - return awsutil.Prettify(s) +func (r *readStartLiveTailResponseStream) Closed() <-chan struct{} { + return r.done } -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceUnavailableException) GoString() string { - return s.String() +func (r *readStartLiveTailResponseStream) safeClose() { + close(r.done) } -func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { - return &ServiceUnavailableException{ - RespMetadata: v, - } +func (r *readStartLiveTailResponseStream) Err() error { + return r.err.Err() } -// Code returns the exception type name. -func (s *ServiceUnavailableException) Code() string { - return "ServiceUnavailableException" +func (r *readStartLiveTailResponseStream) Events() <-chan StartLiveTailResponseStreamEvent { + return r.stream } -// Message returns the exception's message. -func (s *ServiceUnavailableException) Message() string { - if s.Message_ != nil { - return *s.Message_ +func (r *readStartLiveTailResponseStream) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + event, err := r.eventReader.ReadEvent() + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + // If closed already ignore the error + return + default: + } + if _, ok := err.(*eventstreamapi.UnknownMessageTypeError); ok { + continue + } + r.err.SetError(err) + return + } + + select { + case r.stream <- event.(StartLiveTailResponseStreamEvent): + case <-r.done: + return + } } - return "" } -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ServiceUnavailableException) OrigErr() error { - return nil +type unmarshalerForStartLiveTailResponseStreamEvent struct { + metadata protocol.ResponseMetadata } -func (s *ServiceUnavailableException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +func (u unmarshalerForStartLiveTailResponseStreamEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) { + switch eventType { + case "sessionStart": + return &LiveTailSessionStart{}, nil + case "sessionUpdate": + return &LiveTailSessionUpdate{}, nil + case "SessionStreamingException": + return newErrorSessionStreamingException(u.metadata).(eventstreamapi.Unmarshaler), nil + case "SessionTimeoutException": + return newErrorSessionTimeoutException(u.metadata).(eventstreamapi.Unmarshaler), nil + default: + return &StartLiveTailResponseStreamUnknownEvent{Type: eventType}, nil + } } -// Status code returns the HTTP status code for the request's response error. -func (s *ServiceUnavailableException) StatusCode() int { - return s.RespMetadata.StatusCode +// StartLiveTailResponseStreamUnknownEvent provides a failsafe event for the +// StartLiveTailResponseStream group of events when an unknown event is received. +type StartLiveTailResponseStreamUnknownEvent struct { + Type string + Message eventstream.Message } -// RequestID returns the service's response RequestID for request. -func (s *ServiceUnavailableException) RequestID() string { - return s.RespMetadata.RequestID +// The StartLiveTailResponseStreamUnknownEvent is and event in the StartLiveTailResponseStream +// group of events. +func (s *StartLiveTailResponseStreamUnknownEvent) eventStartLiveTailResponseStream() {} + +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (e *StartLiveTailResponseStreamUnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) ( + msg eventstream.Message, err error, +) { + return e.Message.Clone(), nil +} + +// UnmarshalEvent unmarshals the EventStream Message into the StartLiveTailResponseStream value. +// This method is only used internally within the SDK's EventStream handling. +func (e *StartLiveTailResponseStreamUnknownEvent) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + e.Message = msg.Clone() + return nil } type StartQueryInput struct { @@ -16906,70 +14368,6 @@ func (s *TestMetricFilterOutput) SetMatches(v []*MetricFilterMatchRecord) *TestM return s } -// The request was throttled because of quota limits. -type ThrottlingException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ThrottlingException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ThrottlingException) GoString() string { - return s.String() -} - -func newErrorThrottlingException(v protocol.ResponseMetadata) error { - return &ThrottlingException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ThrottlingException) Code() string { - return "ThrottlingException" -} - -// Message returns the exception's message. -func (s *ThrottlingException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ThrottlingException) OrigErr() error { - return nil -} - -func (s *ThrottlingException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ThrottlingException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ThrottlingException) RequestID() string { - return s.RespMetadata.RequestID -} - // A resource can have no more than 50 tags. type TooManyTagsException struct { _ struct{} `type:"structure"` @@ -17283,70 +14681,6 @@ func (s UntagResourceOutput) GoString() string { return s.String() } -// One of the parameters for the request is not valid. -type ValidationException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ValidationException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ValidationException) GoString() string { - return s.String() -} - -func newErrorValidationException(v protocol.ResponseMetadata) error { - return &ValidationException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ValidationException) Code() string { - return "ValidationException" -} - -// Message returns the exception's message. -func (s *ValidationException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ValidationException) OrigErr() error { - return nil -} - -func (s *ValidationException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ValidationException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ValidationException) RequestID() string { - return s.RespMetadata.RequestID -} - const ( // DataProtectionStatusActivated is a DataProtectionStatus enum value DataProtectionStatusActivated = "ACTIVATED" @@ -17371,26 +14705,6 @@ func DataProtectionStatus_Values() []string { } } -const ( - // DeliveryDestinationTypeS3 is a DeliveryDestinationType enum value - DeliveryDestinationTypeS3 = "S3" - - // DeliveryDestinationTypeCwl is a DeliveryDestinationType enum value - DeliveryDestinationTypeCwl = "CWL" - - // DeliveryDestinationTypeFh is a DeliveryDestinationType enum value - DeliveryDestinationTypeFh = "FH" -) - -// DeliveryDestinationType_Values returns all elements of the DeliveryDestinationType enum -func DeliveryDestinationType_Values() []string { - return []string{ - DeliveryDestinationTypeS3, - DeliveryDestinationTypeCwl, - DeliveryDestinationTypeFh, - } -} - // The method used to distribute log data to the destination, which can be either // random or grouped by log stream. const ( @@ -17469,34 +14783,6 @@ func OrderBy_Values() []string { } } -const ( - // OutputFormatJson is a OutputFormat enum value - OutputFormatJson = "json" - - // OutputFormatPlain is a OutputFormat enum value - OutputFormatPlain = "plain" - - // OutputFormatW3c is a OutputFormat enum value - OutputFormatW3c = "w3c" - - // OutputFormatRaw is a OutputFormat enum value - OutputFormatRaw = "raw" - - // OutputFormatParquet is a OutputFormat enum value - OutputFormatParquet = "parquet" -) - -// OutputFormat_Values returns all elements of the OutputFormat enum -func OutputFormat_Values() []string { - return []string{ - OutputFormatJson, - OutputFormatPlain, - OutputFormatW3c, - OutputFormatRaw, - OutputFormatParquet, - } -} - const ( // PolicyTypeDataProtectionPolicy is a PolicyType enum value PolicyTypeDataProtectionPolicy = "DATA_PROTECTION_POLICY" diff --git a/service/cloudwatchlogs/cloudwatchlogsiface/interface.go b/service/cloudwatchlogs/cloudwatchlogsiface/interface.go index 7cf534b497a..62abf8c9ee6 100644 --- a/service/cloudwatchlogs/cloudwatchlogsiface/interface.go +++ b/service/cloudwatchlogs/cloudwatchlogsiface/interface.go @@ -68,10 +68,6 @@ type CloudWatchLogsAPI interface { CancelExportTaskWithContext(aws.Context, *cloudwatchlogs.CancelExportTaskInput, ...request.Option) (*cloudwatchlogs.CancelExportTaskOutput, error) CancelExportTaskRequest(*cloudwatchlogs.CancelExportTaskInput) (*request.Request, *cloudwatchlogs.CancelExportTaskOutput) - CreateDelivery(*cloudwatchlogs.CreateDeliveryInput) (*cloudwatchlogs.CreateDeliveryOutput, error) - CreateDeliveryWithContext(aws.Context, *cloudwatchlogs.CreateDeliveryInput, ...request.Option) (*cloudwatchlogs.CreateDeliveryOutput, error) - CreateDeliveryRequest(*cloudwatchlogs.CreateDeliveryInput) (*request.Request, *cloudwatchlogs.CreateDeliveryOutput) - CreateExportTask(*cloudwatchlogs.CreateExportTaskInput) (*cloudwatchlogs.CreateExportTaskOutput, error) CreateExportTaskWithContext(aws.Context, *cloudwatchlogs.CreateExportTaskInput, ...request.Option) (*cloudwatchlogs.CreateExportTaskOutput, error) CreateExportTaskRequest(*cloudwatchlogs.CreateExportTaskInput) (*request.Request, *cloudwatchlogs.CreateExportTaskOutput) @@ -92,22 +88,6 @@ type CloudWatchLogsAPI interface { DeleteDataProtectionPolicyWithContext(aws.Context, *cloudwatchlogs.DeleteDataProtectionPolicyInput, ...request.Option) (*cloudwatchlogs.DeleteDataProtectionPolicyOutput, error) DeleteDataProtectionPolicyRequest(*cloudwatchlogs.DeleteDataProtectionPolicyInput) (*request.Request, *cloudwatchlogs.DeleteDataProtectionPolicyOutput) - DeleteDelivery(*cloudwatchlogs.DeleteDeliveryInput) (*cloudwatchlogs.DeleteDeliveryOutput, error) - DeleteDeliveryWithContext(aws.Context, *cloudwatchlogs.DeleteDeliveryInput, ...request.Option) (*cloudwatchlogs.DeleteDeliveryOutput, error) - DeleteDeliveryRequest(*cloudwatchlogs.DeleteDeliveryInput) (*request.Request, *cloudwatchlogs.DeleteDeliveryOutput) - - DeleteDeliveryDestination(*cloudwatchlogs.DeleteDeliveryDestinationInput) (*cloudwatchlogs.DeleteDeliveryDestinationOutput, error) - DeleteDeliveryDestinationWithContext(aws.Context, *cloudwatchlogs.DeleteDeliveryDestinationInput, ...request.Option) (*cloudwatchlogs.DeleteDeliveryDestinationOutput, error) - DeleteDeliveryDestinationRequest(*cloudwatchlogs.DeleteDeliveryDestinationInput) (*request.Request, *cloudwatchlogs.DeleteDeliveryDestinationOutput) - - DeleteDeliveryDestinationPolicy(*cloudwatchlogs.DeleteDeliveryDestinationPolicyInput) (*cloudwatchlogs.DeleteDeliveryDestinationPolicyOutput, error) - DeleteDeliveryDestinationPolicyWithContext(aws.Context, *cloudwatchlogs.DeleteDeliveryDestinationPolicyInput, ...request.Option) (*cloudwatchlogs.DeleteDeliveryDestinationPolicyOutput, error) - DeleteDeliveryDestinationPolicyRequest(*cloudwatchlogs.DeleteDeliveryDestinationPolicyInput) (*request.Request, *cloudwatchlogs.DeleteDeliveryDestinationPolicyOutput) - - DeleteDeliverySource(*cloudwatchlogs.DeleteDeliverySourceInput) (*cloudwatchlogs.DeleteDeliverySourceOutput, error) - DeleteDeliverySourceWithContext(aws.Context, *cloudwatchlogs.DeleteDeliverySourceInput, ...request.Option) (*cloudwatchlogs.DeleteDeliverySourceOutput, error) - DeleteDeliverySourceRequest(*cloudwatchlogs.DeleteDeliverySourceInput) (*request.Request, *cloudwatchlogs.DeleteDeliverySourceOutput) - DeleteDestination(*cloudwatchlogs.DeleteDestinationInput) (*cloudwatchlogs.DeleteDestinationOutput, error) DeleteDestinationWithContext(aws.Context, *cloudwatchlogs.DeleteDestinationInput, ...request.Option) (*cloudwatchlogs.DeleteDestinationOutput, error) DeleteDestinationRequest(*cloudwatchlogs.DeleteDestinationInput) (*request.Request, *cloudwatchlogs.DeleteDestinationOutput) @@ -144,27 +124,6 @@ type CloudWatchLogsAPI interface { DescribeAccountPoliciesWithContext(aws.Context, *cloudwatchlogs.DescribeAccountPoliciesInput, ...request.Option) (*cloudwatchlogs.DescribeAccountPoliciesOutput, error) DescribeAccountPoliciesRequest(*cloudwatchlogs.DescribeAccountPoliciesInput) (*request.Request, *cloudwatchlogs.DescribeAccountPoliciesOutput) - DescribeDeliveries(*cloudwatchlogs.DescribeDeliveriesInput) (*cloudwatchlogs.DescribeDeliveriesOutput, error) - DescribeDeliveriesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliveriesInput, ...request.Option) (*cloudwatchlogs.DescribeDeliveriesOutput, error) - DescribeDeliveriesRequest(*cloudwatchlogs.DescribeDeliveriesInput) (*request.Request, *cloudwatchlogs.DescribeDeliveriesOutput) - - DescribeDeliveriesPages(*cloudwatchlogs.DescribeDeliveriesInput, func(*cloudwatchlogs.DescribeDeliveriesOutput, bool) bool) error - DescribeDeliveriesPagesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliveriesInput, func(*cloudwatchlogs.DescribeDeliveriesOutput, bool) bool, ...request.Option) error - - DescribeDeliveryDestinations(*cloudwatchlogs.DescribeDeliveryDestinationsInput) (*cloudwatchlogs.DescribeDeliveryDestinationsOutput, error) - DescribeDeliveryDestinationsWithContext(aws.Context, *cloudwatchlogs.DescribeDeliveryDestinationsInput, ...request.Option) (*cloudwatchlogs.DescribeDeliveryDestinationsOutput, error) - DescribeDeliveryDestinationsRequest(*cloudwatchlogs.DescribeDeliveryDestinationsInput) (*request.Request, *cloudwatchlogs.DescribeDeliveryDestinationsOutput) - - DescribeDeliveryDestinationsPages(*cloudwatchlogs.DescribeDeliveryDestinationsInput, func(*cloudwatchlogs.DescribeDeliveryDestinationsOutput, bool) bool) error - DescribeDeliveryDestinationsPagesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliveryDestinationsInput, func(*cloudwatchlogs.DescribeDeliveryDestinationsOutput, bool) bool, ...request.Option) error - - DescribeDeliverySources(*cloudwatchlogs.DescribeDeliverySourcesInput) (*cloudwatchlogs.DescribeDeliverySourcesOutput, error) - DescribeDeliverySourcesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliverySourcesInput, ...request.Option) (*cloudwatchlogs.DescribeDeliverySourcesOutput, error) - DescribeDeliverySourcesRequest(*cloudwatchlogs.DescribeDeliverySourcesInput) (*request.Request, *cloudwatchlogs.DescribeDeliverySourcesOutput) - - DescribeDeliverySourcesPages(*cloudwatchlogs.DescribeDeliverySourcesInput, func(*cloudwatchlogs.DescribeDeliverySourcesOutput, bool) bool) error - DescribeDeliverySourcesPagesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliverySourcesInput, func(*cloudwatchlogs.DescribeDeliverySourcesOutput, bool) bool, ...request.Option) error - DescribeDestinations(*cloudwatchlogs.DescribeDestinationsInput) (*cloudwatchlogs.DescribeDestinationsOutput, error) DescribeDestinationsWithContext(aws.Context, *cloudwatchlogs.DescribeDestinationsInput, ...request.Option) (*cloudwatchlogs.DescribeDestinationsOutput, error) DescribeDestinationsRequest(*cloudwatchlogs.DescribeDestinationsInput) (*request.Request, *cloudwatchlogs.DescribeDestinationsOutput) @@ -231,22 +190,6 @@ type CloudWatchLogsAPI interface { GetDataProtectionPolicyWithContext(aws.Context, *cloudwatchlogs.GetDataProtectionPolicyInput, ...request.Option) (*cloudwatchlogs.GetDataProtectionPolicyOutput, error) GetDataProtectionPolicyRequest(*cloudwatchlogs.GetDataProtectionPolicyInput) (*request.Request, *cloudwatchlogs.GetDataProtectionPolicyOutput) - GetDelivery(*cloudwatchlogs.GetDeliveryInput) (*cloudwatchlogs.GetDeliveryOutput, error) - GetDeliveryWithContext(aws.Context, *cloudwatchlogs.GetDeliveryInput, ...request.Option) (*cloudwatchlogs.GetDeliveryOutput, error) - GetDeliveryRequest(*cloudwatchlogs.GetDeliveryInput) (*request.Request, *cloudwatchlogs.GetDeliveryOutput) - - GetDeliveryDestination(*cloudwatchlogs.GetDeliveryDestinationInput) (*cloudwatchlogs.GetDeliveryDestinationOutput, error) - GetDeliveryDestinationWithContext(aws.Context, *cloudwatchlogs.GetDeliveryDestinationInput, ...request.Option) (*cloudwatchlogs.GetDeliveryDestinationOutput, error) - GetDeliveryDestinationRequest(*cloudwatchlogs.GetDeliveryDestinationInput) (*request.Request, *cloudwatchlogs.GetDeliveryDestinationOutput) - - GetDeliveryDestinationPolicy(*cloudwatchlogs.GetDeliveryDestinationPolicyInput) (*cloudwatchlogs.GetDeliveryDestinationPolicyOutput, error) - GetDeliveryDestinationPolicyWithContext(aws.Context, *cloudwatchlogs.GetDeliveryDestinationPolicyInput, ...request.Option) (*cloudwatchlogs.GetDeliveryDestinationPolicyOutput, error) - GetDeliveryDestinationPolicyRequest(*cloudwatchlogs.GetDeliveryDestinationPolicyInput) (*request.Request, *cloudwatchlogs.GetDeliveryDestinationPolicyOutput) - - GetDeliverySource(*cloudwatchlogs.GetDeliverySourceInput) (*cloudwatchlogs.GetDeliverySourceOutput, error) - GetDeliverySourceWithContext(aws.Context, *cloudwatchlogs.GetDeliverySourceInput, ...request.Option) (*cloudwatchlogs.GetDeliverySourceOutput, error) - GetDeliverySourceRequest(*cloudwatchlogs.GetDeliverySourceInput) (*request.Request, *cloudwatchlogs.GetDeliverySourceOutput) - GetLogEvents(*cloudwatchlogs.GetLogEventsInput) (*cloudwatchlogs.GetLogEventsOutput, error) GetLogEventsWithContext(aws.Context, *cloudwatchlogs.GetLogEventsInput, ...request.Option) (*cloudwatchlogs.GetLogEventsOutput, error) GetLogEventsRequest(*cloudwatchlogs.GetLogEventsInput) (*request.Request, *cloudwatchlogs.GetLogEventsOutput) @@ -282,18 +225,6 @@ type CloudWatchLogsAPI interface { PutDataProtectionPolicyWithContext(aws.Context, *cloudwatchlogs.PutDataProtectionPolicyInput, ...request.Option) (*cloudwatchlogs.PutDataProtectionPolicyOutput, error) PutDataProtectionPolicyRequest(*cloudwatchlogs.PutDataProtectionPolicyInput) (*request.Request, *cloudwatchlogs.PutDataProtectionPolicyOutput) - PutDeliveryDestination(*cloudwatchlogs.PutDeliveryDestinationInput) (*cloudwatchlogs.PutDeliveryDestinationOutput, error) - PutDeliveryDestinationWithContext(aws.Context, *cloudwatchlogs.PutDeliveryDestinationInput, ...request.Option) (*cloudwatchlogs.PutDeliveryDestinationOutput, error) - PutDeliveryDestinationRequest(*cloudwatchlogs.PutDeliveryDestinationInput) (*request.Request, *cloudwatchlogs.PutDeliveryDestinationOutput) - - PutDeliveryDestinationPolicy(*cloudwatchlogs.PutDeliveryDestinationPolicyInput) (*cloudwatchlogs.PutDeliveryDestinationPolicyOutput, error) - PutDeliveryDestinationPolicyWithContext(aws.Context, *cloudwatchlogs.PutDeliveryDestinationPolicyInput, ...request.Option) (*cloudwatchlogs.PutDeliveryDestinationPolicyOutput, error) - PutDeliveryDestinationPolicyRequest(*cloudwatchlogs.PutDeliveryDestinationPolicyInput) (*request.Request, *cloudwatchlogs.PutDeliveryDestinationPolicyOutput) - - PutDeliverySource(*cloudwatchlogs.PutDeliverySourceInput) (*cloudwatchlogs.PutDeliverySourceOutput, error) - PutDeliverySourceWithContext(aws.Context, *cloudwatchlogs.PutDeliverySourceInput, ...request.Option) (*cloudwatchlogs.PutDeliverySourceOutput, error) - PutDeliverySourceRequest(*cloudwatchlogs.PutDeliverySourceInput) (*request.Request, *cloudwatchlogs.PutDeliverySourceOutput) - PutDestination(*cloudwatchlogs.PutDestinationInput) (*cloudwatchlogs.PutDestinationOutput, error) PutDestinationWithContext(aws.Context, *cloudwatchlogs.PutDestinationInput, ...request.Option) (*cloudwatchlogs.PutDestinationOutput, error) PutDestinationRequest(*cloudwatchlogs.PutDestinationInput) (*request.Request, *cloudwatchlogs.PutDestinationOutput) @@ -326,6 +257,10 @@ type CloudWatchLogsAPI interface { PutSubscriptionFilterWithContext(aws.Context, *cloudwatchlogs.PutSubscriptionFilterInput, ...request.Option) (*cloudwatchlogs.PutSubscriptionFilterOutput, error) PutSubscriptionFilterRequest(*cloudwatchlogs.PutSubscriptionFilterInput) (*request.Request, *cloudwatchlogs.PutSubscriptionFilterOutput) + StartLiveTail(*cloudwatchlogs.StartLiveTailInput) (*cloudwatchlogs.StartLiveTailOutput, error) + StartLiveTailWithContext(aws.Context, *cloudwatchlogs.StartLiveTailInput, ...request.Option) (*cloudwatchlogs.StartLiveTailOutput, error) + StartLiveTailRequest(*cloudwatchlogs.StartLiveTailInput) (*request.Request, *cloudwatchlogs.StartLiveTailOutput) + StartQuery(*cloudwatchlogs.StartQueryInput) (*cloudwatchlogs.StartQueryOutput, error) StartQueryWithContext(aws.Context, *cloudwatchlogs.StartQueryInput, ...request.Option) (*cloudwatchlogs.StartQueryOutput, error) StartQueryRequest(*cloudwatchlogs.StartQueryInput) (*request.Request, *cloudwatchlogs.StartQueryOutput) diff --git a/service/cloudwatchlogs/errors.go b/service/cloudwatchlogs/errors.go index b9244c6a6c3..202cdb1c3b9 100644 --- a/service/cloudwatchlogs/errors.go +++ b/service/cloudwatchlogs/errors.go @@ -14,12 +14,6 @@ const ( // You don't have sufficient permissions to perform this action. ErrCodeAccessDeniedException = "AccessDeniedException" - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // This operation attempted to create a resource that already exists. - ErrCodeConflictException = "ConflictException" - // ErrCodeDataAlreadyAcceptedException for service response error code // "DataAlreadyAcceptedException". // @@ -85,23 +79,19 @@ const ( // The specified resource does not exist. ErrCodeResourceNotFoundException = "ResourceNotFoundException" - // ErrCodeServiceQuotaExceededException for service response error code - // "ServiceQuotaExceededException". - // - // This request exceeds a service quota. - ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException" - // ErrCodeServiceUnavailableException for service response error code // "ServiceUnavailableException". // // The service cannot complete the request. ErrCodeServiceUnavailableException = "ServiceUnavailableException" - // ErrCodeThrottlingException for service response error code - // "ThrottlingException". - // - // The request was throttled because of quota limits. - ErrCodeThrottlingException = "ThrottlingException" + // ErrCodeSessionStreamingException for service response error code + // "SessionStreamingException". + ErrCodeSessionStreamingException = "SessionStreamingException" + + // ErrCodeSessionTimeoutException for service response error code + // "SessionTimeoutException". + ErrCodeSessionTimeoutException = "SessionTimeoutException" // ErrCodeTooManyTagsException for service response error code // "TooManyTagsException". @@ -115,17 +105,10 @@ const ( // The most likely cause is an Amazon Web Services access key ID or secret key // that's not valid. ErrCodeUnrecognizedClientException = "UnrecognizedClientException" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // One of the parameters for the request is not valid. - ErrCodeValidationException = "ValidationException" ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "AccessDeniedException": newErrorAccessDeniedException, - "ConflictException": newErrorConflictException, "DataAlreadyAcceptedException": newErrorDataAlreadyAcceptedException, "InvalidOperationException": newErrorInvalidOperationException, "InvalidParameterException": newErrorInvalidParameterException, @@ -135,10 +118,9 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "OperationAbortedException": newErrorOperationAbortedException, "ResourceAlreadyExistsException": newErrorResourceAlreadyExistsException, "ResourceNotFoundException": newErrorResourceNotFoundException, - "ServiceQuotaExceededException": newErrorServiceQuotaExceededException, "ServiceUnavailableException": newErrorServiceUnavailableException, - "ThrottlingException": newErrorThrottlingException, + "SessionStreamingException": newErrorSessionStreamingException, + "SessionTimeoutException": newErrorSessionTimeoutException, "TooManyTagsException": newErrorTooManyTagsException, "UnrecognizedClientException": newErrorUnrecognizedClientException, - "ValidationException": newErrorValidationException, } diff --git a/service/cloudwatchlogs/service.go b/service/cloudwatchlogs/service.go index fe5dd28c263..d6d00aeb49c 100644 --- a/service/cloudwatchlogs/service.go +++ b/service/cloudwatchlogs/service.go @@ -87,6 +87,9 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), ) + svc.Handlers.BuildStream.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.UnmarshalStream.PushBackNamed(jsonrpc.UnmarshalHandler) + // Run custom client initialization if present if initClient != nil { initClient(svc.Client) diff --git a/service/macie/api.go b/service/macie/api.go deleted file mode 100644 index 230843dfb16..00000000000 --- a/service/macie/api.go +++ /dev/null @@ -1,2093 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package macie - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opAssociateMemberAccount = "AssociateMemberAccount" - -// AssociateMemberAccountRequest generates a "aws/request.Request" representing the -// client's request for the AssociateMemberAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateMemberAccount for more information on using the AssociateMemberAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the AssociateMemberAccountRequest method. -// req, resp := client.AssociateMemberAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount -func (c *Macie) AssociateMemberAccountRequest(input *AssociateMemberAccountInput) (req *request.Request, output *AssociateMemberAccountOutput) { - op := &request.Operation{ - Name: opAssociateMemberAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateMemberAccountInput{} - } - - output = &AssociateMemberAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateMemberAccount API operation for Amazon Macie. -// -// (Discontinued) Associates a specified Amazon Web Services account with Amazon -// Macie Classic as a member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation AssociateMemberAccount for usage and error information. -// -// Returned Error Types: -// -// - InvalidInputException -// (Discontinued) The request was rejected because an invalid or out-of-range -// value was supplied for an input parameter. -// -// - LimitExceededException -// (Discontinued) The request was rejected because it attempted to create resources -// beyond the current Amazon Web Services account quotas. The error code describes -// the quota exceeded. -// -// - InternalException -// (Discontinued) Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount -func (c *Macie) AssociateMemberAccount(input *AssociateMemberAccountInput) (*AssociateMemberAccountOutput, error) { - req, out := c.AssociateMemberAccountRequest(input) - return out, req.Send() -} - -// AssociateMemberAccountWithContext is the same as AssociateMemberAccount with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateMemberAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) AssociateMemberAccountWithContext(ctx aws.Context, input *AssociateMemberAccountInput, opts ...request.Option) (*AssociateMemberAccountOutput, error) { - req, out := c.AssociateMemberAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAssociateS3Resources = "AssociateS3Resources" - -// AssociateS3ResourcesRequest generates a "aws/request.Request" representing the -// client's request for the AssociateS3Resources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See AssociateS3Resources for more information on using the AssociateS3Resources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the AssociateS3ResourcesRequest method. -// req, resp := client.AssociateS3ResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources -func (c *Macie) AssociateS3ResourcesRequest(input *AssociateS3ResourcesInput) (req *request.Request, output *AssociateS3ResourcesOutput) { - op := &request.Operation{ - Name: opAssociateS3Resources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AssociateS3ResourcesInput{} - } - - output = &AssociateS3ResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// AssociateS3Resources API operation for Amazon Macie. -// -// (Discontinued) Associates specified S3 resources with Amazon Macie Classic -// for monitoring and data classification. If memberAccountId isn't specified, -// the action associates specified S3 resources with Macie Classic for the current -// Macie Classic administrator account. If memberAccountId is specified, the -// action associates specified S3 resources with Macie Classic for the specified -// member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation AssociateS3Resources for usage and error information. -// -// Returned Error Types: -// -// - InvalidInputException -// (Discontinued) The request was rejected because an invalid or out-of-range -// value was supplied for an input parameter. -// -// - AccessDeniedException -// (Discontinued) You do not have required permissions to access the requested -// resource. -// -// - LimitExceededException -// (Discontinued) The request was rejected because it attempted to create resources -// beyond the current Amazon Web Services account quotas. The error code describes -// the quota exceeded. -// -// - InternalException -// (Discontinued) Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources -func (c *Macie) AssociateS3Resources(input *AssociateS3ResourcesInput) (*AssociateS3ResourcesOutput, error) { - req, out := c.AssociateS3ResourcesRequest(input) - return out, req.Send() -} - -// AssociateS3ResourcesWithContext is the same as AssociateS3Resources with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateS3Resources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) AssociateS3ResourcesWithContext(ctx aws.Context, input *AssociateS3ResourcesInput, opts ...request.Option) (*AssociateS3ResourcesOutput, error) { - req, out := c.AssociateS3ResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateMemberAccount = "DisassociateMemberAccount" - -// DisassociateMemberAccountRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateMemberAccount operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateMemberAccount for more information on using the DisassociateMemberAccount -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DisassociateMemberAccountRequest method. -// req, resp := client.DisassociateMemberAccountRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount -func (c *Macie) DisassociateMemberAccountRequest(input *DisassociateMemberAccountInput) (req *request.Request, output *DisassociateMemberAccountOutput) { - op := &request.Operation{ - Name: opDisassociateMemberAccount, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateMemberAccountInput{} - } - - output = &DisassociateMemberAccountOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DisassociateMemberAccount API operation for Amazon Macie. -// -// (Discontinued) Removes the specified member account from Amazon Macie Classic. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation DisassociateMemberAccount for usage and error information. -// -// Returned Error Types: -// -// - InvalidInputException -// (Discontinued) The request was rejected because an invalid or out-of-range -// value was supplied for an input parameter. -// -// - InternalException -// (Discontinued) Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount -func (c *Macie) DisassociateMemberAccount(input *DisassociateMemberAccountInput) (*DisassociateMemberAccountOutput, error) { - req, out := c.DisassociateMemberAccountRequest(input) - return out, req.Send() -} - -// DisassociateMemberAccountWithContext is the same as DisassociateMemberAccount with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateMemberAccount for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) DisassociateMemberAccountWithContext(ctx aws.Context, input *DisassociateMemberAccountInput, opts ...request.Option) (*DisassociateMemberAccountOutput, error) { - req, out := c.DisassociateMemberAccountRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisassociateS3Resources = "DisassociateS3Resources" - -// DisassociateS3ResourcesRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateS3Resources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DisassociateS3Resources for more information on using the DisassociateS3Resources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DisassociateS3ResourcesRequest method. -// req, resp := client.DisassociateS3ResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources -func (c *Macie) DisassociateS3ResourcesRequest(input *DisassociateS3ResourcesInput) (req *request.Request, output *DisassociateS3ResourcesOutput) { - op := &request.Operation{ - Name: opDisassociateS3Resources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisassociateS3ResourcesInput{} - } - - output = &DisassociateS3ResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisassociateS3Resources API operation for Amazon Macie. -// -// (Discontinued) Removes specified S3 resources from being monitored by Amazon -// Macie Classic. If memberAccountId isn't specified, the action removes specified -// S3 resources from Macie Classic for the current Macie Classic administrator -// account. If memberAccountId is specified, the action removes specified S3 -// resources from Macie Classic for the specified member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation DisassociateS3Resources for usage and error information. -// -// Returned Error Types: -// -// - InvalidInputException -// (Discontinued) The request was rejected because an invalid or out-of-range -// value was supplied for an input parameter. -// -// - AccessDeniedException -// (Discontinued) You do not have required permissions to access the requested -// resource. -// -// - InternalException -// (Discontinued) Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources -func (c *Macie) DisassociateS3Resources(input *DisassociateS3ResourcesInput) (*DisassociateS3ResourcesOutput, error) { - req, out := c.DisassociateS3ResourcesRequest(input) - return out, req.Send() -} - -// DisassociateS3ResourcesWithContext is the same as DisassociateS3Resources with the addition of -// the ability to pass a context and additional request options. -// -// See DisassociateS3Resources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) DisassociateS3ResourcesWithContext(ctx aws.Context, input *DisassociateS3ResourcesInput, opts ...request.Option) (*DisassociateS3ResourcesOutput, error) { - req, out := c.DisassociateS3ResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListMemberAccounts = "ListMemberAccounts" - -// ListMemberAccountsRequest generates a "aws/request.Request" representing the -// client's request for the ListMemberAccounts operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListMemberAccounts for more information on using the ListMemberAccounts -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListMemberAccountsRequest method. -// req, resp := client.ListMemberAccountsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts -func (c *Macie) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) { - op := &request.Operation{ - Name: opListMemberAccounts, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListMemberAccountsInput{} - } - - output = &ListMemberAccountsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMemberAccounts API operation for Amazon Macie. -// -// (Discontinued) Lists all Amazon Macie Classic member accounts for the current -// Macie Classic administrator account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation ListMemberAccounts for usage and error information. -// -// Returned Error Types: -// -// - InternalException -// (Discontinued) Internal server error. -// -// - InvalidInputException -// (Discontinued) The request was rejected because an invalid or out-of-range -// value was supplied for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts -func (c *Macie) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) { - req, out := c.ListMemberAccountsRequest(input) - return out, req.Send() -} - -// ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of -// the ability to pass a context and additional request options. -// -// See ListMemberAccounts for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) { - req, out := c.ListMemberAccountsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMemberAccountsPages iterates over the pages of a ListMemberAccounts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMemberAccounts method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListMemberAccounts operation. -// pageNum := 0 -// err := client.ListMemberAccountsPages(params, -// func(page *macie.ListMemberAccountsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *Macie) ListMemberAccountsPages(input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool) error { - return c.ListMemberAccountsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMemberAccountsPagesWithContext same as ListMemberAccountsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) ListMemberAccountsPagesWithContext(ctx aws.Context, input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMemberAccountsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMemberAccountsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListS3Resources = "ListS3Resources" - -// ListS3ResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListS3Resources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListS3Resources for more information on using the ListS3Resources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListS3ResourcesRequest method. -// req, resp := client.ListS3ResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources -func (c *Macie) ListS3ResourcesRequest(input *ListS3ResourcesInput) (req *request.Request, output *ListS3ResourcesOutput) { - op := &request.Operation{ - Name: opListS3Resources, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "maxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListS3ResourcesInput{} - } - - output = &ListS3ResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListS3Resources API operation for Amazon Macie. -// -// (Discontinued) Lists all the S3 resources associated with Amazon Macie Classic. -// If memberAccountId isn't specified, the action lists the S3 resources associated -// with Macie Classic for the current Macie Classic administrator account. If -// memberAccountId is specified, the action lists the S3 resources associated -// with Macie Classic for the specified member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation ListS3Resources for usage and error information. -// -// Returned Error Types: -// -// - InvalidInputException -// (Discontinued) The request was rejected because an invalid or out-of-range -// value was supplied for an input parameter. -// -// - AccessDeniedException -// (Discontinued) You do not have required permissions to access the requested -// resource. -// -// - InternalException -// (Discontinued) Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources -func (c *Macie) ListS3Resources(input *ListS3ResourcesInput) (*ListS3ResourcesOutput, error) { - req, out := c.ListS3ResourcesRequest(input) - return out, req.Send() -} - -// ListS3ResourcesWithContext is the same as ListS3Resources with the addition of -// the ability to pass a context and additional request options. -// -// See ListS3Resources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) ListS3ResourcesWithContext(ctx aws.Context, input *ListS3ResourcesInput, opts ...request.Option) (*ListS3ResourcesOutput, error) { - req, out := c.ListS3ResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListS3ResourcesPages iterates over the pages of a ListS3Resources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListS3Resources method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListS3Resources operation. -// pageNum := 0 -// err := client.ListS3ResourcesPages(params, -// func(page *macie.ListS3ResourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *Macie) ListS3ResourcesPages(input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool) error { - return c.ListS3ResourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListS3ResourcesPagesWithContext same as ListS3ResourcesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) ListS3ResourcesPagesWithContext(ctx aws.Context, input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListS3ResourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListS3ResourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListS3ResourcesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opUpdateS3Resources = "UpdateS3Resources" - -// UpdateS3ResourcesRequest generates a "aws/request.Request" representing the -// client's request for the UpdateS3Resources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateS3Resources for more information on using the UpdateS3Resources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateS3ResourcesRequest method. -// req, resp := client.UpdateS3ResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources -func (c *Macie) UpdateS3ResourcesRequest(input *UpdateS3ResourcesInput) (req *request.Request, output *UpdateS3ResourcesOutput) { - op := &request.Operation{ - Name: opUpdateS3Resources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateS3ResourcesInput{} - } - - output = &UpdateS3ResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateS3Resources API operation for Amazon Macie. -// -// (Discontinued) Updates the classification types for the specified S3 resources. -// If memberAccountId isn't specified, the action updates the classification -// types of the S3 resources associated with Amazon Macie Classic for the current -// Macie Classic administrator account. If memberAccountId is specified, the -// action updates the classification types of the S3 resources associated with -// Macie Classic for the specified member account. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Macie's -// API operation UpdateS3Resources for usage and error information. -// -// Returned Error Types: -// -// - InvalidInputException -// (Discontinued) The request was rejected because an invalid or out-of-range -// value was supplied for an input parameter. -// -// - AccessDeniedException -// (Discontinued) You do not have required permissions to access the requested -// resource. -// -// - InternalException -// (Discontinued) Internal server error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources -func (c *Macie) UpdateS3Resources(input *UpdateS3ResourcesInput) (*UpdateS3ResourcesOutput, error) { - req, out := c.UpdateS3ResourcesRequest(input) - return out, req.Send() -} - -// UpdateS3ResourcesWithContext is the same as UpdateS3Resources with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateS3Resources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *Macie) UpdateS3ResourcesWithContext(ctx aws.Context, input *UpdateS3ResourcesInput, opts ...request.Option) (*UpdateS3ResourcesOutput, error) { - req, out := c.UpdateS3ResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// (Discontinued) You do not have required permissions to access the requested -// resource. -type AccessDeniedException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"message" type:"string"` - - // Resource type that caused the exception - ResourceType *string `locationName:"resourceType" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessDeniedException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessDeniedException) GoString() string { - return s.String() -} - -func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { - return &AccessDeniedException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *AccessDeniedException) Code() string { - return "AccessDeniedException" -} - -// Message returns the exception's message. -func (s *AccessDeniedException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *AccessDeniedException) OrigErr() error { - return nil -} - -func (s *AccessDeniedException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *AccessDeniedException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *AccessDeniedException) RequestID() string { - return s.RespMetadata.RequestID -} - -type AssociateMemberAccountInput struct { - _ struct{} `type:"structure"` - - // (Discontinued) The ID of the Amazon Web Services account that you want to - // associate with Amazon Macie Classic as a member account. - // - // MemberAccountId is a required field - MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateMemberAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateMemberAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateMemberAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateMemberAccountInput"} - if s.MemberAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *AssociateMemberAccountInput) SetMemberAccountId(v string) *AssociateMemberAccountInput { - s.MemberAccountId = &v - return s -} - -type AssociateMemberAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateMemberAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateMemberAccountOutput) GoString() string { - return s.String() -} - -type AssociateS3ResourcesInput struct { - _ struct{} `type:"structure"` - - // (Discontinued) The ID of the Amazon Macie Classic member account whose resources - // you want to associate with Macie Classic. - MemberAccountId *string `locationName:"memberAccountId" type:"string"` - - // (Discontinued) The S3 resources that you want to associate with Amazon Macie - // Classic for monitoring and data classification. - // - // S3Resources is a required field - S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateS3ResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateS3ResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateS3ResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateS3ResourcesInput"} - if s.S3Resources == nil { - invalidParams.Add(request.NewErrParamRequired("S3Resources")) - } - if s.S3Resources != nil { - for i, v := range s.S3Resources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3Resources", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *AssociateS3ResourcesInput) SetMemberAccountId(v string) *AssociateS3ResourcesInput { - s.MemberAccountId = &v - return s -} - -// SetS3Resources sets the S3Resources field's value. -func (s *AssociateS3ResourcesInput) SetS3Resources(v []*S3ResourceClassification) *AssociateS3ResourcesInput { - s.S3Resources = v - return s -} - -type AssociateS3ResourcesOutput struct { - _ struct{} `type:"structure"` - - // (Discontinued) S3 resources that couldn't be associated with Amazon Macie - // Classic. An error code and an error message are provided for each failed - // item. - FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateS3ResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateS3ResourcesOutput) GoString() string { - return s.String() -} - -// SetFailedS3Resources sets the FailedS3Resources field's value. -func (s *AssociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *AssociateS3ResourcesOutput { - s.FailedS3Resources = v - return s -} - -// (Discontinued) The classification type that Amazon Macie Classic applies -// to the associated S3 resources. -type ClassificationType struct { - _ struct{} `type:"structure"` - - // (Discontinued) A continuous classification of the objects that are added - // to a specified S3 bucket. Amazon Macie Classic begins performing continuous - // classification after a bucket is successfully associated with Macie Classic. - // - // Continuous is a required field - Continuous *string `locationName:"continuous" type:"string" required:"true" enum:"S3ContinuousClassificationType"` - - // (Discontinued) A one-time classification of all of the existing objects in - // a specified S3 bucket. - // - // OneTime is a required field - OneTime *string `locationName:"oneTime" type:"string" required:"true" enum:"S3OneTimeClassificationType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ClassificationType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ClassificationType) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ClassificationType) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ClassificationType"} - if s.Continuous == nil { - invalidParams.Add(request.NewErrParamRequired("Continuous")) - } - if s.OneTime == nil { - invalidParams.Add(request.NewErrParamRequired("OneTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContinuous sets the Continuous field's value. -func (s *ClassificationType) SetContinuous(v string) *ClassificationType { - s.Continuous = &v - return s -} - -// SetOneTime sets the OneTime field's value. -func (s *ClassificationType) SetOneTime(v string) *ClassificationType { - s.OneTime = &v - return s -} - -// (Discontinued) The classification type that Amazon Macie Classic applies -// to the associated S3 resources. At least one of the classification types -// (oneTime or continuous) must be specified. -type ClassificationTypeUpdate struct { - _ struct{} `type:"structure"` - - // (Discontinued) A continuous classification of the objects that are added - // to a specified S3 bucket. Amazon Macie Classic begins performing continuous - // classification after a bucket is successfully associated with Macie Classic. - Continuous *string `locationName:"continuous" type:"string" enum:"S3ContinuousClassificationType"` - - // (Discontinued) A one-time classification of all of the existing objects in - // a specified S3 bucket. - OneTime *string `locationName:"oneTime" type:"string" enum:"S3OneTimeClassificationType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ClassificationTypeUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ClassificationTypeUpdate) GoString() string { - return s.String() -} - -// SetContinuous sets the Continuous field's value. -func (s *ClassificationTypeUpdate) SetContinuous(v string) *ClassificationTypeUpdate { - s.Continuous = &v - return s -} - -// SetOneTime sets the OneTime field's value. -func (s *ClassificationTypeUpdate) SetOneTime(v string) *ClassificationTypeUpdate { - s.OneTime = &v - return s -} - -type DisassociateMemberAccountInput struct { - _ struct{} `type:"structure"` - - // (Discontinued) The ID of the member account that you want to remove from - // Amazon Macie Classic. - // - // MemberAccountId is a required field - MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateMemberAccountInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateMemberAccountInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateMemberAccountInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateMemberAccountInput"} - if s.MemberAccountId == nil { - invalidParams.Add(request.NewErrParamRequired("MemberAccountId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *DisassociateMemberAccountInput) SetMemberAccountId(v string) *DisassociateMemberAccountInput { - s.MemberAccountId = &v - return s -} - -type DisassociateMemberAccountOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateMemberAccountOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateMemberAccountOutput) GoString() string { - return s.String() -} - -type DisassociateS3ResourcesInput struct { - _ struct{} `type:"structure"` - - // (Discontinued) The S3 resources (buckets or prefixes) that you want to remove - // from being monitored and classified by Amazon Macie Classic. - // - // AssociatedS3Resources is a required field - AssociatedS3Resources []*S3Resource `locationName:"associatedS3Resources" type:"list" required:"true"` - - // (Discontinued) The ID of the Amazon Macie Classic member account whose resources - // you want to remove from being monitored by Macie Classic. - MemberAccountId *string `locationName:"memberAccountId" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateS3ResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateS3ResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateS3ResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateS3ResourcesInput"} - if s.AssociatedS3Resources == nil { - invalidParams.Add(request.NewErrParamRequired("AssociatedS3Resources")) - } - if s.AssociatedS3Resources != nil { - for i, v := range s.AssociatedS3Resources { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AssociatedS3Resources", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociatedS3Resources sets the AssociatedS3Resources field's value. -func (s *DisassociateS3ResourcesInput) SetAssociatedS3Resources(v []*S3Resource) *DisassociateS3ResourcesInput { - s.AssociatedS3Resources = v - return s -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *DisassociateS3ResourcesInput) SetMemberAccountId(v string) *DisassociateS3ResourcesInput { - s.MemberAccountId = &v - return s -} - -type DisassociateS3ResourcesOutput struct { - _ struct{} `type:"structure"` - - // (Discontinued) S3 resources that couldn't be removed from being monitored - // and classified by Amazon Macie Classic. An error code and an error message - // are provided for each failed item. - FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateS3ResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateS3ResourcesOutput) GoString() string { - return s.String() -} - -// SetFailedS3Resources sets the FailedS3Resources field's value. -func (s *DisassociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *DisassociateS3ResourcesOutput { - s.FailedS3Resources = v - return s -} - -// (Discontinued) Includes details about the failed S3 resources. -type FailedS3Resource struct { - _ struct{} `type:"structure"` - - // (Discontinued) The status code of a failed item. - ErrorCode *string `locationName:"errorCode" type:"string"` - - // (Discontinued) The error message of a failed item. - ErrorMessage *string `locationName:"errorMessage" type:"string"` - - // (Discontinued) The failed S3 resources. - FailedItem *S3Resource `locationName:"failedItem" type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FailedS3Resource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FailedS3Resource) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *FailedS3Resource) SetErrorCode(v string) *FailedS3Resource { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *FailedS3Resource) SetErrorMessage(v string) *FailedS3Resource { - s.ErrorMessage = &v - return s -} - -// SetFailedItem sets the FailedItem field's value. -func (s *FailedS3Resource) SetFailedItem(v *S3Resource) *FailedS3Resource { - s.FailedItem = v - return s -} - -// (Discontinued) Internal server error. -type InternalException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // Error code for the exception - ErrorCode *string `locationName:"errorCode" type:"string"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InternalException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InternalException) GoString() string { - return s.String() -} - -func newErrorInternalException(v protocol.ResponseMetadata) error { - return &InternalException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *InternalException) Code() string { - return "InternalException" -} - -// Message returns the exception's message. -func (s *InternalException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *InternalException) OrigErr() error { - return nil -} - -func (s *InternalException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *InternalException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *InternalException) RequestID() string { - return s.RespMetadata.RequestID -} - -// (Discontinued) The request was rejected because an invalid or out-of-range -// value was supplied for an input parameter. -type InvalidInputException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // Error code for the exception - ErrorCode *string `locationName:"errorCode" type:"string"` - - // Field that has invalid input - FieldName *string `locationName:"fieldName" type:"string"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InvalidInputException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InvalidInputException) GoString() string { - return s.String() -} - -func newErrorInvalidInputException(v protocol.ResponseMetadata) error { - return &InvalidInputException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *InvalidInputException) Code() string { - return "InvalidInputException" -} - -// Message returns the exception's message. -func (s *InvalidInputException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *InvalidInputException) OrigErr() error { - return nil -} - -func (s *InvalidInputException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *InvalidInputException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *InvalidInputException) RequestID() string { - return s.RespMetadata.RequestID -} - -// (Discontinued) The request was rejected because it attempted to create resources -// beyond the current Amazon Web Services account quotas. The error code describes -// the quota exceeded. -type LimitExceededException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // Error code for the exception - ErrorCode *string `locationName:"errorCode" type:"string"` - - Message_ *string `locationName:"message" type:"string"` - - // Resource type that caused the exception - ResourceType *string `locationName:"resourceType" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LimitExceededException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LimitExceededException) GoString() string { - return s.String() -} - -func newErrorLimitExceededException(v protocol.ResponseMetadata) error { - return &LimitExceededException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *LimitExceededException) Code() string { - return "LimitExceededException" -} - -// Message returns the exception's message. -func (s *LimitExceededException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *LimitExceededException) OrigErr() error { - return nil -} - -func (s *LimitExceededException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *LimitExceededException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *LimitExceededException) RequestID() string { - return s.RespMetadata.RequestID -} - -type ListMemberAccountsInput struct { - _ struct{} `type:"structure"` - - // (Discontinued) Use this parameter to indicate the maximum number of items - // that you want in the response. The default value is 250. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // (Discontinued) Use this parameter when paginating results. Set the value - // of this parameter to null on your first call to the ListMemberAccounts action. - // Subsequent calls to the action fill nextToken in the request with the value - // of nextToken from the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMemberAccountsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMemberAccountsInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput { - s.NextToken = &v - return s -} - -type ListMemberAccountsOutput struct { - _ struct{} `type:"structure"` - - // (Discontinued) A list of the Amazon Macie Classic member accounts returned - // by the action. The current Macie Classic administrator account is also included - // in this list. - MemberAccounts []*MemberAccount `locationName:"memberAccounts" type:"list"` - - // (Discontinued) When a response is generated, if there is more data to be - // listed, this parameter is present in the response and contains the value - // to use for the nextToken parameter in a subsequent pagination request. If - // there is no more data to be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMemberAccountsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMemberAccountsOutput) GoString() string { - return s.String() -} - -// SetMemberAccounts sets the MemberAccounts field's value. -func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*MemberAccount) *ListMemberAccountsOutput { - s.MemberAccounts = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput { - s.NextToken = &v - return s -} - -type ListS3ResourcesInput struct { - _ struct{} `type:"structure"` - - // (Discontinued) Use this parameter to indicate the maximum number of items - // that you want in the response. The default value is 250. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // (Discontinued) The Amazon Macie Classic member account ID whose associated - // S3 resources you want to list. - MemberAccountId *string `locationName:"memberAccountId" type:"string"` - - // (Discontinued) Use this parameter when paginating results. Set its value - // to null on your first call to the ListS3Resources action. Subsequent calls - // to the action fill nextToken in the request with the value of nextToken from - // the previous response to continue listing data. - NextToken *string `locationName:"nextToken" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListS3ResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListS3ResourcesInput) GoString() string { - return s.String() -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListS3ResourcesInput) SetMaxResults(v int64) *ListS3ResourcesInput { - s.MaxResults = &v - return s -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *ListS3ResourcesInput) SetMemberAccountId(v string) *ListS3ResourcesInput { - s.MemberAccountId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListS3ResourcesInput) SetNextToken(v string) *ListS3ResourcesInput { - s.NextToken = &v - return s -} - -type ListS3ResourcesOutput struct { - _ struct{} `type:"structure"` - - // (Discontinued) When a response is generated, if there is more data to be - // listed, this parameter is present in the response and contains the value - // to use for the nextToken parameter in a subsequent pagination request. If - // there is no more data to be listed, this parameter is set to null. - NextToken *string `locationName:"nextToken" type:"string"` - - // (Discontinued) A list of the associated S3 resources returned by the action. - S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListS3ResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListS3ResourcesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListS3ResourcesOutput) SetNextToken(v string) *ListS3ResourcesOutput { - s.NextToken = &v - return s -} - -// SetS3Resources sets the S3Resources field's value. -func (s *ListS3ResourcesOutput) SetS3Resources(v []*S3ResourceClassification) *ListS3ResourcesOutput { - s.S3Resources = v - return s -} - -// (Discontinued) Contains information about the Amazon Macie Classic member -// account. -type MemberAccount struct { - _ struct{} `type:"structure"` - - // (Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic - // member account. - AccountId *string `locationName:"accountId" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MemberAccount) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MemberAccount) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *MemberAccount) SetAccountId(v string) *MemberAccount { - s.AccountId = &v - return s -} - -// (Discontinued) Contains information about the S3 resource. This data type -// is used as a request parameter in the DisassociateS3Resources action and -// can be used as a response parameter in the AssociateS3Resources and UpdateS3Resources -// actions. -type S3Resource struct { - _ struct{} `type:"structure"` - - // (Discontinued) The name of the S3 bucket. - // - // BucketName is a required field - BucketName *string `locationName:"bucketName" type:"string" required:"true"` - - // (Discontinued) The prefix of the S3 bucket. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s S3Resource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s S3Resource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Resource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Resource"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketName sets the BucketName field's value. -func (s *S3Resource) SetBucketName(v string) *S3Resource { - s.BucketName = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3Resource) SetPrefix(v string) *S3Resource { - s.Prefix = &v - return s -} - -// (Discontinued) The S3 resources that you want to associate with Amazon Macie -// Classic for monitoring and data classification. This data type is used as -// a request parameter in the AssociateS3Resources action and a response parameter -// in the ListS3Resources action. -type S3ResourceClassification struct { - _ struct{} `type:"structure"` - - // (Discontinued) The name of the S3 bucket that you want to associate with - // Amazon Macie Classic. - // - // BucketName is a required field - BucketName *string `locationName:"bucketName" type:"string" required:"true"` - - // (Discontinued) The classification type that you want to specify for the resource - // associated with Amazon Macie Classic. - // - // ClassificationType is a required field - ClassificationType *ClassificationType `locationName:"classificationType" type:"structure" required:"true"` - - // (Discontinued) The prefix of the S3 bucket that you want to associate with - // Amazon Macie Classic. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s S3ResourceClassification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s S3ResourceClassification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3ResourceClassification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassification"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - if s.ClassificationType == nil { - invalidParams.Add(request.NewErrParamRequired("ClassificationType")) - } - if s.ClassificationType != nil { - if err := s.ClassificationType.Validate(); err != nil { - invalidParams.AddNested("ClassificationType", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketName sets the BucketName field's value. -func (s *S3ResourceClassification) SetBucketName(v string) *S3ResourceClassification { - s.BucketName = &v - return s -} - -// SetClassificationType sets the ClassificationType field's value. -func (s *S3ResourceClassification) SetClassificationType(v *ClassificationType) *S3ResourceClassification { - s.ClassificationType = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3ResourceClassification) SetPrefix(v string) *S3ResourceClassification { - s.Prefix = &v - return s -} - -// (Discontinued) The S3 resources whose classification types you want to update. -// This data type is used as a request parameter in the UpdateS3Resources action. -type S3ResourceClassificationUpdate struct { - _ struct{} `type:"structure"` - - // (Discontinued) The name of the S3 bucket whose classification types you want - // to update. - // - // BucketName is a required field - BucketName *string `locationName:"bucketName" type:"string" required:"true"` - - // (Discontinued) The classification type that you want to update for the resource - // associated with Amazon Macie Classic. - // - // ClassificationTypeUpdate is a required field - ClassificationTypeUpdate *ClassificationTypeUpdate `locationName:"classificationTypeUpdate" type:"structure" required:"true"` - - // (Discontinued) The prefix of the S3 bucket whose classification types you - // want to update. - Prefix *string `locationName:"prefix" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s S3ResourceClassificationUpdate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s S3ResourceClassificationUpdate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3ResourceClassificationUpdate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassificationUpdate"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - if s.ClassificationTypeUpdate == nil { - invalidParams.Add(request.NewErrParamRequired("ClassificationTypeUpdate")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucketName sets the BucketName field's value. -func (s *S3ResourceClassificationUpdate) SetBucketName(v string) *S3ResourceClassificationUpdate { - s.BucketName = &v - return s -} - -// SetClassificationTypeUpdate sets the ClassificationTypeUpdate field's value. -func (s *S3ResourceClassificationUpdate) SetClassificationTypeUpdate(v *ClassificationTypeUpdate) *S3ResourceClassificationUpdate { - s.ClassificationTypeUpdate = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *S3ResourceClassificationUpdate) SetPrefix(v string) *S3ResourceClassificationUpdate { - s.Prefix = &v - return s -} - -type UpdateS3ResourcesInput struct { - _ struct{} `type:"structure"` - - // (Discontinued) The Amazon Web Services account ID of the Amazon Macie Classic - // member account whose S3 resources' classification types you want to update. - MemberAccountId *string `locationName:"memberAccountId" type:"string"` - - // (Discontinued) The S3 resources whose classification types you want to update. - // - // S3ResourcesUpdate is a required field - S3ResourcesUpdate []*S3ResourceClassificationUpdate `locationName:"s3ResourcesUpdate" type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateS3ResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateS3ResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateS3ResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateS3ResourcesInput"} - if s.S3ResourcesUpdate == nil { - invalidParams.Add(request.NewErrParamRequired("S3ResourcesUpdate")) - } - if s.S3ResourcesUpdate != nil { - for i, v := range s.S3ResourcesUpdate { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3ResourcesUpdate", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMemberAccountId sets the MemberAccountId field's value. -func (s *UpdateS3ResourcesInput) SetMemberAccountId(v string) *UpdateS3ResourcesInput { - s.MemberAccountId = &v - return s -} - -// SetS3ResourcesUpdate sets the S3ResourcesUpdate field's value. -func (s *UpdateS3ResourcesInput) SetS3ResourcesUpdate(v []*S3ResourceClassificationUpdate) *UpdateS3ResourcesInput { - s.S3ResourcesUpdate = v - return s -} - -type UpdateS3ResourcesOutput struct { - _ struct{} `type:"structure"` - - // (Discontinued) The S3 resources whose classification types can't be updated. - // An error code and an error message are provided for each failed item. - FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateS3ResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateS3ResourcesOutput) GoString() string { - return s.String() -} - -// SetFailedS3Resources sets the FailedS3Resources field's value. -func (s *UpdateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *UpdateS3ResourcesOutput { - s.FailedS3Resources = v - return s -} - -const ( - // S3ContinuousClassificationTypeFull is a S3ContinuousClassificationType enum value - S3ContinuousClassificationTypeFull = "FULL" -) - -// S3ContinuousClassificationType_Values returns all elements of the S3ContinuousClassificationType enum -func S3ContinuousClassificationType_Values() []string { - return []string{ - S3ContinuousClassificationTypeFull, - } -} - -const ( - // S3OneTimeClassificationTypeFull is a S3OneTimeClassificationType enum value - S3OneTimeClassificationTypeFull = "FULL" - - // S3OneTimeClassificationTypeNone is a S3OneTimeClassificationType enum value - S3OneTimeClassificationTypeNone = "NONE" -) - -// S3OneTimeClassificationType_Values returns all elements of the S3OneTimeClassificationType enum -func S3OneTimeClassificationType_Values() []string { - return []string{ - S3OneTimeClassificationTypeFull, - S3OneTimeClassificationTypeNone, - } -} diff --git a/service/macie/doc.go b/service/macie/doc.go deleted file mode 100644 index 6f2fa88be0b..00000000000 --- a/service/macie/doc.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package macie provides the client and types for making API -// requests to Amazon Macie. -// -// Amazon Macie Classic has been discontinued and is no longer available. -// -// A new Amazon Macie is now available with significant design improvements -// and additional features, at a lower price and in most Amazon Web Services -// Regions. We encourage you to take advantage of the new and improved features, -// and benefit from the reduced cost. To learn about features and pricing for -// the new Macie, see Amazon Macie (http://aws.amazon.com/macie/). To learn -// how to use the new Macie, see the Amazon Macie User Guide (https://docs.aws.amazon.com/macie/latest/user/what-is-macie.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19 for more information on this service. -// -// See macie package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/macie/ -// -// # Using the Client -// -// To contact Amazon Macie with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Macie client Macie for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/macie/#New -package macie diff --git a/service/macie/errors.go b/service/macie/errors.go deleted file mode 100644 index 83b3a30c0b8..00000000000 --- a/service/macie/errors.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package macie - -import ( - "github.com/aws/aws-sdk-go/private/protocol" -) - -const ( - - // ErrCodeAccessDeniedException for service response error code - // "AccessDeniedException". - // - // (Discontinued) You do not have required permissions to access the requested - // resource. - ErrCodeAccessDeniedException = "AccessDeniedException" - - // ErrCodeInternalException for service response error code - // "InternalException". - // - // (Discontinued) Internal server error. - ErrCodeInternalException = "InternalException" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInputException". - // - // (Discontinued) The request was rejected because an invalid or out-of-range - // value was supplied for an input parameter. - ErrCodeInvalidInputException = "InvalidInputException" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceededException". - // - // (Discontinued) The request was rejected because it attempted to create resources - // beyond the current Amazon Web Services account quotas. The error code describes - // the quota exceeded. - ErrCodeLimitExceededException = "LimitExceededException" -) - -var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ - "AccessDeniedException": newErrorAccessDeniedException, - "InternalException": newErrorInternalException, - "InvalidInputException": newErrorInvalidInputException, - "LimitExceededException": newErrorLimitExceededException, -} diff --git a/service/macie/macieiface/interface.go b/service/macie/macieiface/interface.go deleted file mode 100644 index e4feec51c71..00000000000 --- a/service/macie/macieiface/interface.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package macieiface provides an interface to enable mocking the Amazon Macie service client -// for testing your code. -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. -package macieiface - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/macie" -) - -// MacieAPI provides an interface to enable mocking the -// macie.Macie service client's API operation, -// paginators, and waiters. This make unit testing your code that calls out -// to the SDK's service client's calls easier. -// -// The best way to use this interface is so the SDK's service client's calls -// can be stubbed out for unit testing your code with the SDK without needing -// to inject custom request handlers into the SDK's request pipeline. -// -// // myFunc uses an SDK service client to make a request to -// // Amazon Macie. -// func myFunc(svc macieiface.MacieAPI) bool { -// // Make svc.AssociateMemberAccount request -// } -// -// func main() { -// sess := session.New() -// svc := macie.New(sess) -// -// myFunc(svc) -// } -// -// In your _test.go file: -// -// // Define a mock struct to be used in your unit tests of myFunc. -// type mockMacieClient struct { -// macieiface.MacieAPI -// } -// func (m *mockMacieClient) AssociateMemberAccount(input *macie.AssociateMemberAccountInput) (*macie.AssociateMemberAccountOutput, error) { -// // mock response/functionality -// } -// -// func TestMyFunc(t *testing.T) { -// // Setup Test -// mockSvc := &mockMacieClient{} -// -// myfunc(mockSvc) -// -// // Verify myFunc's functionality -// } -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. Its suggested to use the pattern above for testing, or using -// tooling to generate mocks to satisfy the interfaces. -type MacieAPI interface { - AssociateMemberAccount(*macie.AssociateMemberAccountInput) (*macie.AssociateMemberAccountOutput, error) - AssociateMemberAccountWithContext(aws.Context, *macie.AssociateMemberAccountInput, ...request.Option) (*macie.AssociateMemberAccountOutput, error) - AssociateMemberAccountRequest(*macie.AssociateMemberAccountInput) (*request.Request, *macie.AssociateMemberAccountOutput) - - AssociateS3Resources(*macie.AssociateS3ResourcesInput) (*macie.AssociateS3ResourcesOutput, error) - AssociateS3ResourcesWithContext(aws.Context, *macie.AssociateS3ResourcesInput, ...request.Option) (*macie.AssociateS3ResourcesOutput, error) - AssociateS3ResourcesRequest(*macie.AssociateS3ResourcesInput) (*request.Request, *macie.AssociateS3ResourcesOutput) - - DisassociateMemberAccount(*macie.DisassociateMemberAccountInput) (*macie.DisassociateMemberAccountOutput, error) - DisassociateMemberAccountWithContext(aws.Context, *macie.DisassociateMemberAccountInput, ...request.Option) (*macie.DisassociateMemberAccountOutput, error) - DisassociateMemberAccountRequest(*macie.DisassociateMemberAccountInput) (*request.Request, *macie.DisassociateMemberAccountOutput) - - DisassociateS3Resources(*macie.DisassociateS3ResourcesInput) (*macie.DisassociateS3ResourcesOutput, error) - DisassociateS3ResourcesWithContext(aws.Context, *macie.DisassociateS3ResourcesInput, ...request.Option) (*macie.DisassociateS3ResourcesOutput, error) - DisassociateS3ResourcesRequest(*macie.DisassociateS3ResourcesInput) (*request.Request, *macie.DisassociateS3ResourcesOutput) - - ListMemberAccounts(*macie.ListMemberAccountsInput) (*macie.ListMemberAccountsOutput, error) - ListMemberAccountsWithContext(aws.Context, *macie.ListMemberAccountsInput, ...request.Option) (*macie.ListMemberAccountsOutput, error) - ListMemberAccountsRequest(*macie.ListMemberAccountsInput) (*request.Request, *macie.ListMemberAccountsOutput) - - ListMemberAccountsPages(*macie.ListMemberAccountsInput, func(*macie.ListMemberAccountsOutput, bool) bool) error - ListMemberAccountsPagesWithContext(aws.Context, *macie.ListMemberAccountsInput, func(*macie.ListMemberAccountsOutput, bool) bool, ...request.Option) error - - ListS3Resources(*macie.ListS3ResourcesInput) (*macie.ListS3ResourcesOutput, error) - ListS3ResourcesWithContext(aws.Context, *macie.ListS3ResourcesInput, ...request.Option) (*macie.ListS3ResourcesOutput, error) - ListS3ResourcesRequest(*macie.ListS3ResourcesInput) (*request.Request, *macie.ListS3ResourcesOutput) - - ListS3ResourcesPages(*macie.ListS3ResourcesInput, func(*macie.ListS3ResourcesOutput, bool) bool) error - ListS3ResourcesPagesWithContext(aws.Context, *macie.ListS3ResourcesInput, func(*macie.ListS3ResourcesOutput, bool) bool, ...request.Option) error - - UpdateS3Resources(*macie.UpdateS3ResourcesInput) (*macie.UpdateS3ResourcesOutput, error) - UpdateS3ResourcesWithContext(aws.Context, *macie.UpdateS3ResourcesInput, ...request.Option) (*macie.UpdateS3ResourcesOutput, error) - UpdateS3ResourcesRequest(*macie.UpdateS3ResourcesInput) (*request.Request, *macie.UpdateS3ResourcesOutput) -} - -var _ MacieAPI = (*macie.Macie)(nil) diff --git a/service/macie/service.go b/service/macie/service.go deleted file mode 100644 index 76966ef359a..00000000000 --- a/service/macie/service.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package macie - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// Macie provides the API operation methods for making requests to -// Amazon Macie. See this package's package overview docs -// for details on the service. -// -// Macie methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type Macie struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "Macie" // Name of service. - EndpointsID = "macie" // ID to lookup a service endpoint with. - ServiceID = "Macie" // ServiceID is a unique identifier of a specific service. -) - -// New creates a new instance of the Macie client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// -// mySession := session.Must(session.NewSession()) -// -// // Create a Macie client from just a session. -// svc := macie.New(mySession) -// -// // Create a Macie client with additional configuration -// svc := macie.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *Macie { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = EndpointsID - // No Fallback - } - return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *Macie { - svc := &Macie{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - PartitionID: partitionID, - Endpoint: endpoint, - APIVersion: "2017-12-19", - ResolvedRegion: resolvedRegion, - JSONVersion: "1.1", - TargetPrefix: "MacieService", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed( - protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), - ) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a Macie operation and runs any -// custom request initialization. -func (c *Macie) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} From 789ac4709e0a43420faab30631f5284ec7ee368f Mon Sep 17 00:00:00 2001 From: Tianyi Wang Date: Fri, 17 Nov 2023 12:05:03 -0500 Subject: [PATCH 2/3] Add changelog --- CHANGELOG_PENDING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 8a1927a39ca..eb2f099ad97 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -1,5 +1,6 @@ ### SDK Features - +* `service/macie`: Deprecate Macie + * This change removes the macie service, since it is deprecated. ### SDK Enhancements ### SDK Bugs From 8eae51f12e908bfa0b976170e6a699e680677f0d Mon Sep 17 00:00:00 2001 From: Tianyi Wang Date: Fri, 17 Nov 2023 12:17:02 -0500 Subject: [PATCH 3/3] Remove unwanted cloudwatch logs change --- models/apis/logs/2014-03-28/api-2.json | 2451 ++- service/cloudwatchlogs/api.go | 12530 ++++++++++------ .../cloudwatchlogsiface/interface.go | 73 +- service/cloudwatchlogs/errors.go | 36 +- service/cloudwatchlogs/service.go | 3 - 5 files changed, 8653 insertions(+), 6440 deletions(-) diff --git a/models/apis/logs/2014-03-28/api-2.json b/models/apis/logs/2014-03-28/api-2.json index 805743e359e..efb057f957e 100644 --- a/models/apis/logs/2014-03-28/api-2.json +++ b/models/apis/logs/2014-03-28/api-2.json @@ -24,8 +24,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Associates the specified KMS key with either one log group in the account, or with all stored CloudWatch Logs query insights results in the account.

When you use AssociateKmsKey, you specify either the logGroupName parameter or the resourceIdentifier parameter. You can't specify both of those parameters in the same operation.

  • Specify the logGroupName parameter to cause all log events stored in the log group to be encrypted with that key. Only the log events ingested after the key is associated are encrypted with that key.

    Associating a KMS key with a log group overrides any existing associations between the log group and a KMS key. After a KMS key is associated with a log group, all newly ingested data for the log group is encrypted using the KMS key. This association is stored as long as the data encrypted with the KMS key is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested.

    Associating a key with a log group does not cause the results of queries of that log group to be encrypted with that key. To have query results encrypted with a KMS key, you must use an AssociateKmsKey operation with the resourceIdentifier parameter that specifies a query-result resource.

  • Specify the resourceIdentifier parameter with a query-result resource, to use that key to encrypt the stored results of all future StartQuery operations in the account. The response from a GetQueryResults operation will still return the query results in plain text.

    Even if you have not associated a key with your query results, the query results are encrypted when stored, using the default CloudWatch Logs method.

    If you run a query from a monitoring account that queries logs in a source account, the query results key from the monitoring account, if any, is used.

If you delete the key that is used to encrypt log events or log group query results, then all the associated stored log events or query results that were encrypted with that key will be unencryptable and unusable.

CloudWatch Logs supports only symmetric KMS keys. Do not use an associate an asymmetric KMS key with your log group or query results. For more information, see Using Symmetric and Asymmetric Keys.

It can take up to 5 minutes for this operation to take effect.

If you attempt to associate a KMS key with a log group but the KMS key does not exist or the KMS key is disabled, you receive an InvalidParameterException error.

" + ] }, "CancelExportTask":{ "name":"CancelExportTask", @@ -39,8 +38,25 @@ {"shape":"ResourceNotFoundException"}, {"shape":"InvalidOperationException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Cancels the specified export task.

The task must be in the PENDING or RUNNING state.

" + ] + }, + "CreateDelivery":{ + "name":"CreateDelivery", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateDeliveryRequest"}, + "output":{"shape":"CreateDeliveryResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ConflictException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"} + ] }, "CreateExportTask":{ "name":"CreateExportTask", @@ -57,8 +73,7 @@ {"shape":"ServiceUnavailableException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ResourceAlreadyExistsException"} - ], - "documentation":"

Creates an export task so that you can efficiently export data from a log group to an Amazon S3 bucket. When you perform a CreateExportTask operation, you must use credentials that have permission to write to the S3 bucket that you specify as the destination.

Exporting log data to S3 buckets that are encrypted by KMS is supported. Exporting log data to Amazon S3 buckets that have S3 Object Lock enabled with a retention period is also supported.

Exporting to S3 buckets that are encrypted with AES-256 is supported.

This is an asynchronous call. If all the required information is provided, this operation initiates an export task and responds with the ID of the task. After the task has started, you can use DescribeExportTasks to get the status of the export task. Each account can only have one active (RUNNING or PENDING) export task at a time. To cancel an export task, use CancelExportTask.

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.

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.

" + ] }, "CreateLogGroup":{ "name":"CreateLogGroup", @@ -73,8 +88,7 @@ {"shape":"LimitExceededException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Creates a log group with the specified name. You can create up to 1,000,000 log groups per Region per account.

You must use the following guidelines when naming a log group:

  • Log group names must be unique within a Region for an Amazon Web Services account.

  • Log group names can be between 1 and 512 characters long.

  • Log group names consist of the following characters: a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), '.' (period), and '#' (number sign)

When you create a log group, by default the log events in the log group do not expire. To set a retention policy so that events expire and are deleted after a specified time, use PutRetentionPolicy.

If you associate an KMS key with the log group, ingested data is encrypted using the KMS key. This association is stored as long as the data encrypted with the KMS key is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested.

If you attempt to associate a KMS key with the log group but the KMS key does not exist or the KMS key is disabled, you receive an InvalidParameterException error.

CloudWatch Logs supports only symmetric KMS keys. Do not associate an asymmetric KMS key with your log group. For more information, see Using Symmetric and Asymmetric Keys.

" + ] }, "CreateLogStream":{ "name":"CreateLogStream", @@ -88,8 +102,7 @@ {"shape":"ResourceAlreadyExistsException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Creates a log stream for the specified log group. A log stream is a sequence of log events that originate from a single source, such as an application instance or a resource that is being monitored.

There is no limit on the number of log streams that you can create for a log group. There is a limit of 50 TPS on CreateLogStream operations, after which transactions are throttled.

You must use the following guidelines when naming a log stream:

  • Log stream names must be unique within the log group.

  • Log stream names can be between 1 and 512 characters long.

  • Don't use ':' (colon) or '*' (asterisk) characters.

" + ] }, "DeleteAccountPolicy":{ "name":"DeleteAccountPolicy", @@ -103,8 +116,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"}, {"shape":"OperationAbortedException"} - ], - "documentation":"

Deletes a CloudWatch Logs account policy.

To use this operation, you must be signed on with the logs:DeleteDataProtectionPolicy and logs:DeleteAccountPolicy permissions.

" + ] }, "DeleteDataProtectionPolicy":{ "name":"DeleteDataProtectionPolicy", @@ -118,8 +130,69 @@ {"shape":"OperationAbortedException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Deletes the data protection policy from the specified log group.

For more information about data protection policies, see PutDataProtectionPolicy.

" + ] + }, + "DeleteDelivery":{ + "name":"DeleteDelivery", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteDeliveryRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"} + ] + }, + "DeleteDeliveryDestination":{ + "name":"DeleteDeliveryDestination", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteDeliveryDestinationRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"} + ] + }, + "DeleteDeliveryDestinationPolicy":{ + "name":"DeleteDeliveryDestinationPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteDeliveryDestinationPolicyRequest"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ConflictException"} + ] + }, + "DeleteDeliverySource":{ + "name":"DeleteDeliverySource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteDeliverySourceRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"} + ] }, "DeleteDestination":{ "name":"DeleteDestination", @@ -133,8 +206,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Deletes the specified destination, and eventually disables all the subscription filters that publish to it. This operation does not delete the physical resource encapsulated by the destination.

" + ] }, "DeleteLogGroup":{ "name":"DeleteLogGroup", @@ -148,8 +220,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Deletes the specified log group and permanently deletes all the archived log events associated with the log group.

" + ] }, "DeleteLogStream":{ "name":"DeleteLogStream", @@ -163,8 +234,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Deletes the specified log stream and permanently deletes all the archived log events associated with the log stream.

" + ] }, "DeleteMetricFilter":{ "name":"DeleteMetricFilter", @@ -178,8 +248,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Deletes the specified metric filter.

" + ] }, "DeleteQueryDefinition":{ "name":"DeleteQueryDefinition", @@ -193,8 +262,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Deletes a saved CloudWatch Logs Insights query definition. A query definition contains details about a saved CloudWatch Logs Insights query.

Each DeleteQueryDefinition operation can delete one query definition.

You must have the logs:DeleteQueryDefinition permission to be able to perform this operation.

" + ] }, "DeleteResourcePolicy":{ "name":"DeleteResourcePolicy", @@ -207,8 +275,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Deletes a resource policy from this account. This revokes the access of the identities in that policy to put log events to this account.

" + ] }, "DeleteRetentionPolicy":{ "name":"DeleteRetentionPolicy", @@ -222,8 +289,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Deletes the specified retention policy.

Log events do not expire if they belong to log groups without a retention policy.

" + ] }, "DeleteSubscriptionFilter":{ "name":"DeleteSubscriptionFilter", @@ -237,8 +303,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Deletes the specified subscription filter.

" + ] }, "DescribeAccountPolicies":{ "name":"DescribeAccountPolicies", @@ -253,8 +318,52 @@ {"shape":"OperationAbortedException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Returns a list of all CloudWatch Logs account policies in the account.

" + ] + }, + "DescribeDeliveries":{ + "name":"DescribeDeliveries", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeDeliveriesRequest"}, + "output":{"shape":"DescribeDeliveriesResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"} + ] + }, + "DescribeDeliveryDestinations":{ + "name":"DescribeDeliveryDestinations", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeDeliveryDestinationsRequest"}, + "output":{"shape":"DescribeDeliveryDestinationsResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"} + ] + }, + "DescribeDeliverySources":{ + "name":"DescribeDeliverySources", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeDeliverySourcesRequest"}, + "output":{"shape":"DescribeDeliverySourcesResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"} + ] }, "DescribeDestinations":{ "name":"DescribeDestinations", @@ -267,8 +376,7 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Lists all your destinations. The results are ASCII-sorted by destination name.

" + ] }, "DescribeExportTasks":{ "name":"DescribeExportTasks", @@ -281,8 +389,7 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Lists the specified export tasks. You can list all your export tasks or filter the results based on task ID or task status.

" + ] }, "DescribeLogGroups":{ "name":"DescribeLogGroups", @@ -295,8 +402,7 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Lists the specified log groups. You can list all your log groups or filter the results by prefix. The results are ASCII-sorted by log group name.

CloudWatch Logs doesn’t support IAM policies that control access to the DescribeLogGroups action by using the aws:ResourceTag/key-name condition key. Other CloudWatch Logs actions do support the use of the aws:ResourceTag/key-name condition key to control access. For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.

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 CloudWatch cross-account observability.

" + ] }, "DescribeLogStreams":{ "name":"DescribeLogStreams", @@ -310,8 +416,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Lists the log streams for the specified log group. You can list all the log streams or filter the results by prefix. You can also control how the results are ordered.

You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both.

This operation has a limit of five transactions per second, after which transactions are throttled.

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 CloudWatch cross-account observability.

" + ] }, "DescribeMetricFilters":{ "name":"DescribeMetricFilters", @@ -325,8 +430,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Lists the specified metric filters. You can list all of the metric filters or filter the results by log name, prefix, metric name, or metric namespace. The results are ASCII-sorted by filter name.

" + ] }, "DescribeQueries":{ "name":"DescribeQueries", @@ -340,8 +444,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Returns a list of CloudWatch Logs Insights queries that are scheduled, running, or have been run recently in this account. You can request all queries or limit it to queries of a specific log group or queries with a certain status.

" + ] }, "DescribeQueryDefinitions":{ "name":"DescribeQueryDefinitions", @@ -354,8 +457,7 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions. You can retrieve query definitions from the current account or from a source account that is linked to the current account.

You can use the queryDefinitionNamePrefix parameter to limit the results to only the query definitions that have names that start with a certain string.

" + ] }, "DescribeResourcePolicies":{ "name":"DescribeResourcePolicies", @@ -368,8 +470,7 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Lists the resource policies in this account.

" + ] }, "DescribeSubscriptionFilters":{ "name":"DescribeSubscriptionFilters", @@ -383,8 +484,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Lists the subscription filters for the specified log group. You can list all the subscription filters or filter the results by prefix. The results are ASCII-sorted by filter name.

" + ] }, "DisassociateKmsKey":{ "name":"DisassociateKmsKey", @@ -398,8 +498,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Disassociates the specified KMS key from the specified log group or from all CloudWatch Logs Insights query results in the account.

When you use DisassociateKmsKey, you specify either the logGroupName parameter or the resourceIdentifier parameter. You can't specify both of those parameters in the same operation.

  • Specify the logGroupName parameter to stop using the KMS key to encrypt future log events ingested and stored in the log group. Instead, they will be encrypted with the default CloudWatch Logs method. The log events that were ingested while the key was associated with the log group are still encrypted with that key. Therefore, CloudWatch Logs will need permissions for the key whenever that data is accessed.

  • Specify the resourceIdentifier parameter with the query-result resource to stop using the KMS key to encrypt the results of all future StartQuery operations in the account. They will instead be encrypted with the default CloudWatch Logs method. The results from queries that ran while the key was associated with the account are still encrypted with that key. Therefore, CloudWatch Logs will need permissions for the key whenever that data is accessed.

It can take up to 5 minutes for this operation to take effect.

" + ] }, "FilterLogEvents":{ "name":"FilterLogEvents", @@ -413,8 +512,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

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.

You must have the logs:FilterLogEvents permission to perform this operation.

You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both.

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 specifying the token in a subsequent call. This operation can return empty results while there are more log events available through the token.

The returned log events are sorted by event timestamp, the timestamp when the event was ingested by CloudWatch Logs, and the ID of the PutLogEvents request.

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 CloudWatch cross-account observability.

" + ] }, "GetDataProtectionPolicy":{ "name":"GetDataProtectionPolicy", @@ -429,8 +527,69 @@ {"shape":"OperationAbortedException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Returns information about a log group data protection policy.

" + ] + }, + "GetDelivery":{ + "name":"GetDelivery", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetDeliveryRequest"}, + "output":{"shape":"GetDeliveryResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"} + ] + }, + "GetDeliveryDestination":{ + "name":"GetDeliveryDestination", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetDeliveryDestinationRequest"}, + "output":{"shape":"GetDeliveryDestinationResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"} + ] + }, + "GetDeliveryDestinationPolicy":{ + "name":"GetDeliveryDestinationPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetDeliveryDestinationPolicyRequest"}, + "output":{"shape":"GetDeliveryDestinationPolicyResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"} + ] + }, + "GetDeliverySource":{ + "name":"GetDeliverySource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetDeliverySourceRequest"}, + "output":{"shape":"GetDeliverySourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"} + ] }, "GetLogEvents":{ "name":"GetLogEvents", @@ -444,8 +603,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Lists log events from the specified log stream. You can list all of the log events or filter using a time range.

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.

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 CloudWatch cross-account observability.

You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both.

" + ] }, "GetLogGroupFields":{ "name":"GetLogGroupFields", @@ -460,8 +618,7 @@ {"shape":"LimitExceededException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Returns a list of the fields that are included in log events in the specified log group. Includes the percentage of log events that contain each field. The search is limited to a time period that you specify.

You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must specify one of these parameters, but you can't specify both.

In the results, fields that start with @ are fields generated by CloudWatch Logs. For example, @timestamp is the timestamp of each log event. For more information about the fields that are generated by CloudWatch logs, see Supported Logs and Discovered Fields.

The response results are sorted by the frequency percentage, starting with the highest percentage.

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 CloudWatch cross-account observability.

" + ] }, "GetLogRecord":{ "name":"GetLogRecord", @@ -476,8 +633,7 @@ {"shape":"LimitExceededException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Retrieves all of the fields and values of a single log event. All fields are retrieved, even if the original query that produced the logRecordPointer retrieved only a subset of fields. Fields are returned as field name/field value pairs.

The full unparsed log event is returned within @message.

" + ] }, "GetQueryResults":{ "name":"GetQueryResults", @@ -491,8 +647,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Returns the results from the specified query.

Only the fields requested in the query are returned, along with a @ptr field, which is the identifier for the log record. You can use the value of @ptr in a GetLogRecord operation to get the full log record.

GetQueryResults does not start running a query. To run a query, use StartQuery. For more information about how long results of previous queries are available, see CloudWatch Logs quotas.

If the value of the Status field in the output is Running, this operation returns only partial results. If you see a value of Scheduled or Running for the status, you can retry the operation later to see the final results.

If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account to start queries in linked source accounts. For more information, see CloudWatch cross-account observability.

" + ] }, "ListTagsForResource":{ "name":"ListTagsForResource", @@ -506,8 +661,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Displays the tags associated with a CloudWatch Logs resource. Currently, log groups and destinations support tagging.

" + ] }, "ListTagsLogGroup":{ "name":"ListTagsLogGroup", @@ -521,7 +675,6 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} ], - "documentation":"

The ListTagsLogGroup operation is on the path to deprecation. We recommend that you use ListTagsForResource instead.

Lists the tags for the specified log group.

", "deprecated":true, "deprecatedMessage":"Please use the generic tagging API ListTagsForResource" }, @@ -538,8 +691,7 @@ {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"}, {"shape":"LimitExceededException"} - ], - "documentation":"

Creates an account-level data protection policy that applies to all log groups in the account. A data protection policy can help safeguard sensitive data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only one account-level policy.

Sensitive data is detected and masked when it is ingested into a log group. When you set a data protection policy, log events ingested into the log groups before that time are not masked.

If you use PutAccountPolicy to create a data protection policy for your whole account, it applies to both existing log groups and all log groups that are created later in this account. The account policy is applied to existing log groups with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked.

By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a GetLogEvents or FilterLogEvents operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command.

For more information, including a list of types of data that can be audited and masked, see Protect sensitive log data with masking.

To use the PutAccountPolicy operation, you must be signed on with the logs:PutDataProtectionPolicy and logs:PutAccountPolicy permissions.

The PutAccountPolicy operation applies to all log groups in the account. You can also use PutDataProtectionPolicy to create a data protection policy that applies to just one log group. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked.

" + ] }, "PutDataProtectionPolicy":{ "name":"PutDataProtectionPolicy", @@ -555,8 +707,56 @@ {"shape":"OperationAbortedException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Creates a data protection policy for the specified log group. A data protection policy can help safeguard sensitive data that's ingested by the log group by auditing and masking the sensitive log data.

Sensitive data is detected and masked when it is ingested into the log group. When you set a data protection policy, log events ingested into the log group before that time are not masked.

By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks. A user who has the logs:Unmask permission can use a GetLogEvents or FilterLogEvents operation with the unmask parameter set to true to view the unmasked log events. Users with the logs:Unmask can also view unmasked data in the CloudWatch Logs console by running a CloudWatch Logs Insights query with the unmask query command.

For more information, including a list of types of data that can be audited and masked, see Protect sensitive log data with masking.

The PutDataProtectionPolicy operation applies to only the specified log group. You can also use PutAccountPolicy to create an account-level data protection policy that applies to all log groups in the account, including both existing log groups and log groups that are created level. If a log group has its own data protection policy and the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term specified in either policy is masked.

" + ] + }, + "PutDeliveryDestination":{ + "name":"PutDeliveryDestination", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutDeliveryDestinationRequest"}, + "output":{"shape":"PutDeliveryDestinationResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"}, + {"shape":"ResourceNotFoundException"} + ] + }, + "PutDeliveryDestinationPolicy":{ + "name":"PutDeliveryDestinationPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutDeliveryDestinationPolicyRequest"}, + "output":{"shape":"PutDeliveryDestinationPolicyResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ConflictException"} + ] + }, + "PutDeliverySource":{ + "name":"PutDeliverySource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutDeliverySourceRequest"}, + "output":{"shape":"PutDeliverySourceResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"} + ] }, "PutDestination":{ "name":"PutDestination", @@ -570,8 +770,7 @@ {"shape":"InvalidParameterException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Creates or updates a destination. This operation is used only to create destinations for cross-account subscriptions.

A destination encapsulates a physical resource (such as an Amazon Kinesis stream). With a destination, you can subscribe to a real-time stream of log events for a different account, ingested using PutLogEvents.

Through an access policy, a destination controls what is written to it. By default, PutDestination does not set any access policy with the destination, which means a cross-account user cannot call PutSubscriptionFilter against this destination. To enable this, the destination owner must call PutDestinationPolicy after PutDestination.

To perform a PutDestination operation, you must also have the iam:PassRole permission.

" + ] }, "PutDestinationPolicy":{ "name":"PutDestinationPolicy", @@ -584,8 +783,7 @@ {"shape":"InvalidParameterException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Creates or updates an access policy associated with an existing destination. An access policy is an IAM policy document that is used to authorize claims to register a subscription filter against a given destination.

" + ] }, "PutLogEvents":{ "name":"PutLogEvents", @@ -602,8 +800,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"}, {"shape":"UnrecognizedClientException"} - ], - "documentation":"

Uploads a batch of log events to the specified log stream.

The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions are always accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException even if the sequence token is not valid. You can use parallel PutLogEvents actions on the same log stream.

The batch of events must satisfy the following constraints:

  • The maximum batch size is 1,048,576 bytes. This size is calculated as the sum of all event messages in UTF-8, plus 26 bytes for each log event.

  • None of the log events in the batch can be more than 2 hours in the future.

  • None of the log events in the batch can be more than 14 days in the past. Also, none of the log events can be from earlier than the retention period of the log group.

  • The log events in the batch must be in chronological order by their timestamp. The timestamp is the time that the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In Amazon Web Services Tools for PowerShell and the Amazon Web Services SDK for .NET, the timestamp is specified in .NET format: yyyy-mm-ddThh:mm:ss. For example, 2017-09-15T13:45:30.)

  • A batch of log events in a single request cannot span more than 24 hours. Otherwise, the operation fails.

  • Each log event can be no larger than 256 KB.

  • The maximum number of log events in a batch is 10,000.

  • The quota of five requests per second per log stream has been removed. Instead, PutLogEvents 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.

If a call to PutLogEvents returns \"UnrecognizedClientException\" the most likely cause is a non-valid Amazon Web Services access key ID or secret key.

" + ] }, "PutMetricFilter":{ "name":"PutMetricFilter", @@ -618,8 +815,7 @@ {"shape":"OperationAbortedException"}, {"shape":"LimitExceededException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Creates or updates a metric filter and associates it with the specified log group. With metric filters, you can configure rules to extract metric data from log events ingested through PutLogEvents.

The maximum number of metric filters that can be associated with a log group is 100.

When you create a metric filter, you can also optionally assign a unit and dimensions to the metric that is created.

Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric.

CloudWatch Logs might disable a metric filter if it generates 1,000 different name/value pairs for your specified dimensions within one hour.

You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.

" + ] }, "PutQueryDefinition":{ "name":"PutQueryDefinition", @@ -634,8 +830,7 @@ {"shape":"LimitExceededException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Creates or updates a query definition for CloudWatch Logs Insights. For more information, see Analyzing Log Data with CloudWatch Logs Insights.

To update a query definition, specify its queryDefinitionId in your request. The values of name, queryString, and logGroupNames are changed to the values that you specify in your update operation. No current values are retained from the current query definition. For example, imagine updating a current query definition that includes log groups. If you don't specify the logGroupNames parameter in your update operation, the query definition changes to contain no log groups.

You must have the logs:PutQueryDefinition permission to be able to perform this operation.

" + ] }, "PutResourcePolicy":{ "name":"PutResourcePolicy", @@ -649,8 +844,7 @@ {"shape":"InvalidParameterException"}, {"shape":"LimitExceededException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Creates or updates a resource policy allowing other Amazon Web Services services to put log events to this account, such as Amazon Route 53. An account can have up to 10 resource policies per Amazon Web Services Region.

" + ] }, "PutRetentionPolicy":{ "name":"PutRetentionPolicy", @@ -664,8 +858,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"OperationAbortedException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Sets the retention of the specified log group. With a retention policy, you can configure the number of days for which to retain log events in the specified log group.

CloudWatch Logs doesn’t immediately delete log events when they reach their retention setting. It typically takes up to 72 hours after that before log events are deleted, but in rare situations might take longer.

To illustrate, imagine that you change a log group to have a longer retention setting when it contains log events that are past the expiration date, but haven’t been deleted. Those log events will take up to 72 hours to be deleted after the new retention date is reached. To make sure that log data is deleted permanently, keep a log group at its lower retention setting until 72 hours after the previous retention period ends. Alternatively, wait to change the retention setting until you confirm that the earlier log events are deleted.

When log events reach their retention setting they are marked for deletion. After they are marked for deletion, they do not add to your archival storage costs anymore, even if they are not actually deleted until later. These log events marked for deletion are also not included when you use an API to retrieve the storedBytes value to see how many bytes a log group is storing.

" + ] }, "PutSubscriptionFilter":{ "name":"PutSubscriptionFilter", @@ -680,26 +873,7 @@ {"shape":"OperationAbortedException"}, {"shape":"LimitExceededException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Creates or updates a subscription filter and associates it with the specified log group. With subscription filters, you can subscribe to a real-time stream of log events ingested through PutLogEvents and have them delivered to a specific destination. When log events are sent to the receiving service, they are Base64 encoded and compressed with the GZIP format.

The following destinations are supported for subscription filters:

  • An Amazon Kinesis data stream belonging to the same account as the subscription filter, for same-account delivery.

  • A logical destination created with PutDestination that belongs to a different account, for cross-account delivery. We currently support Kinesis Data Streams and Kinesis Data Firehose as logical destinations.

  • An Amazon Kinesis Data Firehose delivery stream that belongs to the same account as the subscription filter, for same-account delivery.

  • An Lambda function that belongs to the same account as the subscription filter, for same-account delivery.

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 filterName.

To perform a PutSubscriptionFilter operation for any destination except a Lambda function, you must also have the iam:PassRole permission.

" - }, - "StartLiveTail":{ - "name":"StartLiveTail", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"StartLiveTailRequest"}, - "output":{"shape":"StartLiveTailResponse"}, - "errors":[ - {"shape":"AccessDeniedException"}, - {"shape":"InvalidParameterException"}, - {"shape":"ResourceNotFoundException"}, - {"shape":"LimitExceededException"}, - {"shape":"InvalidOperationException"} - ], - "documentation":"

To Be Written

", - "endpoint":{"hostPrefix":"streaming-"} + ] }, "StartQuery":{ "name":"StartQuery", @@ -715,8 +889,7 @@ {"shape":"LimitExceededException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

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.

For more information, see CloudWatch Logs Insights Query Syntax.

After you run a query using StartQuery, the query results are stored by CloudWatch Logs. You can use GetQueryResults to retrieve the results of a query, using the queryId that StartQuery returns.

If you have associated a KMS key with the query results in this account, then StartQuery uses that key to encrypt the results when it stores them. If no key is associated with query results, the query results are encrypted with the default CloudWatch Logs encryption method.

Queries time out after 60 minutes of runtime. If your queries are timing out, reduce the time range being searched or partition your query into a number of queries.

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 CloudWatch cross-account observability. For a cross-account StartQuery operation, the query definition must be defined in the monitoring account.

You can have up to 30 concurrent CloudWatch Logs insights queries, including queries that have been added to dashboards.

" + ] }, "StopQuery":{ "name":"StopQuery", @@ -730,8 +903,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Stops a CloudWatch Logs Insights query that is in progress. If the query has already ended, the operation returns an error indicating that the specified query is not running.

" + ] }, "TagLogGroup":{ "name":"TagLogGroup", @@ -744,7 +916,6 @@ {"shape":"ResourceNotFoundException"}, {"shape":"InvalidParameterException"} ], - "documentation":"

The TagLogGroup operation is on the path to deprecation. We recommend that you use TagResource instead.

Adds or updates the specified tags for the specified log group.

To list the tags for a log group, use ListTagsForResource. To remove tags, use UntagResource.

For more information about tags, see Tag Log Groups in Amazon CloudWatch Logs in the Amazon CloudWatch Logs User Guide.

CloudWatch Logs doesn’t support IAM policies that prevent users from assigning specified tags to log groups using the aws:Resource/key-name or aws:TagKeys condition keys. For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.

", "deprecated":true, "deprecatedMessage":"Please use the generic tagging API TagResource" }, @@ -760,8 +931,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"}, {"shape":"TooManyTagsException"} - ], - "documentation":"

Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs resource. Currently, the only CloudWatch Logs resources that can be tagged are log groups and destinations.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.

You can use the TagResource action with a resource that already has tags. If you specify a new tag key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a CloudWatch Logs resource.

" + ] }, "TestMetricFilter":{ "name":"TestMetricFilter", @@ -774,8 +944,7 @@ "errors":[ {"shape":"InvalidParameterException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Tests the filter pattern of a metric filter against a sample of log event messages. You can use this operation to validate the correctness of a metric filter pattern.

" + ] }, "UntagLogGroup":{ "name":"UntagLogGroup", @@ -787,7 +956,6 @@ "errors":[ {"shape":"ResourceNotFoundException"} ], - "documentation":"

The UntagLogGroup operation is on the path to deprecation. We recommend that you use UntagResource instead.

Removes the specified tags from the specified log group.

To list the tags for a log group, use ListTagsForResource. To add tags, use TagResource.

CloudWatch Logs doesn’t support IAM policies that prevent users from assigning specified tags to log groups using the aws:Resource/key-name or aws:TagKeys condition keys.

", "deprecated":true, "deprecatedMessage":"Please use the generic tagging API UntagResource" }, @@ -802,8 +970,7 @@ {"shape":"InvalidParameterException"}, {"shape":"ResourceNotFoundException"}, {"shape":"ServiceUnavailableException"} - ], - "documentation":"

Removes one or more tags from the specified resource.

" + ] } }, "shapes":{ @@ -811,7 +978,6 @@ "type":"structure", "members":{ }, - "documentation":"

To Be Written

", "exception":true }, "AccessPolicy":{ @@ -837,32 +1003,13 @@ "AccountPolicy":{ "type":"structure", "members":{ - "policyName":{ - "shape":"PolicyName", - "documentation":"

The name of the account policy.

" - }, - "policyDocument":{ - "shape":"AccountPolicyDocument", - "documentation":"

The policy document for this account policy.

The JSON specified in policyDocument can be up to 30,720 characters.

" - }, - "lastUpdatedTime":{ - "shape":"Timestamp", - "documentation":"

The date and time that this policy was most recently updated.

" - }, - "policyType":{ - "shape":"PolicyType", - "documentation":"

The type of policy for this account policy.

" - }, - "scope":{ - "shape":"Scope", - "documentation":"

The scope of the account policy.

" - }, - "accountId":{ - "shape":"AccountId", - "documentation":"

The Amazon Web Services account ID that the policy applies to.

" - } - }, - "documentation":"

A structure that contains information about one CloudWatch Logs account policy.

" + "policyName":{"shape":"PolicyName"}, + "policyDocument":{"shape":"AccountPolicyDocument"}, + "lastUpdatedTime":{"shape":"Timestamp"}, + "policyType":{"shape":"PolicyType"}, + "scope":{"shape":"Scope"}, + "accountId":{"shape":"AccountId"} + } }, "AccountPolicyDocument":{"type":"string"}, "AmazonResourceName":{ @@ -876,28 +1023,16 @@ "type":"structure", "required":["kmsKeyId"], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

In your AssociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.

" - }, - "kmsKeyId":{ - "shape":"KmsKeyId", - "documentation":"

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. This must be a symmetric KMS key. For more information, see Amazon Resource Names and Using Symmetric and Asymmetric Keys.

" - }, - "resourceIdentifier":{ - "shape":"ResourceIdentifier", - "documentation":"

Specifies the target for this operation. You must specify one of the following:

  • Specify the following ARN to have future GetQueryResults operations in this account encrypt the results with the specified KMS key. Replace REGION and ACCOUNT_ID with your Region and account ID.

    arn:aws:logs:REGION:ACCOUNT_ID:query-result:*

  • Specify the ARN of a log group to have CloudWatch Logs use the KMS key to encrypt log events that are ingested and stored by that log group. The log group ARN must be in the following format. Replace REGION and ACCOUNT_ID with your Region and account ID.

    arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME

In your AssociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "kmsKeyId":{"shape":"KmsKeyId"}, + "resourceIdentifier":{"shape":"ResourceIdentifier"} } }, "CancelExportTaskRequest":{ "type":"structure", "required":["taskId"], "members":{ - "taskId":{ - "shape":"ExportTaskId", - "documentation":"

The ID of the export task.

" - } + "taskId":{"shape":"ExportTaskId"} } }, "ClientToken":{ @@ -906,70 +1041,61 @@ "min":36, "pattern":"\\S{36,128}" }, - "CreateExportTaskRequest":{ + "ConflictException":{ "type":"structure", - "required":[ - "logGroupName", - "from", + "members":{ + }, + "exception":true + }, + "CreateDeliveryRequest":{ + "type":"structure", + "required":[ + "deliverySourceName", + "deliveryDestinationArn" + ], + "members":{ + "deliverySourceName":{"shape":"DeliverySourceName"}, + "deliveryDestinationArn":{"shape":"Arn"}, + "tags":{"shape":"Tags"} + } + }, + "CreateDeliveryResponse":{ + "type":"structure", + "members":{ + "delivery":{"shape":"Delivery"} + } + }, + "CreateExportTaskRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "from", "to", "destination" ], "members":{ - "taskName":{ - "shape":"ExportTaskName", - "documentation":"

The name of the export task.

" - }, - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "logStreamNamePrefix":{ - "shape":"LogStreamName", - "documentation":"

Export only log streams that match the provided prefix. If you don't specify a value, no prefix filter is applied.

" - }, - "from":{ - "shape":"Timestamp", - "documentation":"

The start time of the range for the request, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this time are not exported.

" - }, - "to":{ - "shape":"Timestamp", - "documentation":"

The end time of the range for the request, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported.

You must specify a time that is not earlier than when this log group was created.

" - }, - "destination":{ - "shape":"ExportDestinationBucket", - "documentation":"

The name of S3 bucket for the exported log data. The bucket must be in the same Amazon Web Services Region.

" - }, - "destinationPrefix":{ - "shape":"ExportDestinationPrefix", - "documentation":"

The prefix used as the start of the key for every object exported. If you don't specify a value, the default is exportedlogs.

" - } + "taskName":{"shape":"ExportTaskName"}, + "logGroupName":{"shape":"LogGroupName"}, + "logStreamNamePrefix":{"shape":"LogStreamName"}, + "from":{"shape":"Timestamp"}, + "to":{"shape":"Timestamp"}, + "destination":{"shape":"ExportDestinationBucket"}, + "destinationPrefix":{"shape":"ExportDestinationPrefix"} } }, "CreateExportTaskResponse":{ "type":"structure", "members":{ - "taskId":{ - "shape":"ExportTaskId", - "documentation":"

The ID of the export task.

" - } + "taskId":{"shape":"ExportTaskId"} } }, "CreateLogGroupRequest":{ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "kmsKeyId":{ - "shape":"KmsKeyId", - "documentation":"

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. For more information, see Amazon Resource Names.

" - }, - "tags":{ - "shape":"Tags", - "documentation":"

The key-value pairs to use for the tags.

You can grant users access to certain log groups while preventing them from accessing other log groups. To do so, tag your groups and use IAM policies that refer to those tags. To assign tags when you create a log group, you must have either the logs:TagResource or logs:TagLogGroup permission. For more information about tagging, see Tagging Amazon Web Services resources. For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "kmsKeyId":{"shape":"KmsKeyId"}, + "tags":{"shape":"Tags"} } }, "CreateLogStreamRequest":{ @@ -979,14 +1105,8 @@ "logStreamName" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "logStreamName":{ - "shape":"LogStreamName", - "documentation":"

The name of the log stream.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "logStreamName":{"shape":"LogStreamName"} } }, "DataAlreadyAcceptedException":{ @@ -994,7 +1114,6 @@ "members":{ "expectedSequenceToken":{"shape":"SequenceToken"} }, - "documentation":"

The event was already logged.

PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException regardless of whether a given batch of log events has already been accepted.

", "exception":true }, "DataProtectionPolicyDocument":{"type":"string"}, @@ -1007,10 +1126,7 @@ "DISABLED" ] }, - "Days":{ - "type":"integer", - "documentation":"

The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1096, 1827, 2192, 2557, 2922, 3288, and 3653.

To set a log group so that its log events do not expire, use DeleteRetentionPolicy.

" - }, + "Days":{"type":"integer"}, "DefaultValue":{"type":"double"}, "DeleteAccountPolicyRequest":{ "type":"structure", @@ -1019,44 +1135,57 @@ "policyType" ], "members":{ - "policyName":{ - "shape":"PolicyName", - "documentation":"

The name of the policy to delete.

" - }, - "policyType":{ - "shape":"PolicyType", - "documentation":"

The type of policy to delete. Currently, the only valid value is DATA_PROTECTION_POLICY.

" - } + "policyName":{"shape":"PolicyName"}, + "policyType":{"shape":"PolicyType"} } }, "DeleteDataProtectionPolicyRequest":{ "type":"structure", "required":["logGroupIdentifier"], "members":{ - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

The name or ARN of the log group that you want to delete the data protection policy for.

" - } + "logGroupIdentifier":{"shape":"LogGroupIdentifier"} + } + }, + "DeleteDeliveryDestinationPolicyRequest":{ + "type":"structure", + "required":["deliveryDestinationName"], + "members":{ + "deliveryDestinationName":{"shape":"DeliveryDestinationName"} + } + }, + "DeleteDeliveryDestinationRequest":{ + "type":"structure", + "required":["name"], + "members":{ + "name":{"shape":"DeliveryDestinationName"} + } + }, + "DeleteDeliveryRequest":{ + "type":"structure", + "required":["id"], + "members":{ + "id":{"shape":"DeliveryId"} + } + }, + "DeleteDeliverySourceRequest":{ + "type":"structure", + "required":["name"], + "members":{ + "name":{"shape":"DeliverySourceName"} } }, "DeleteDestinationRequest":{ "type":"structure", "required":["destinationName"], "members":{ - "destinationName":{ - "shape":"DestinationName", - "documentation":"

The name of the destination.

" - } + "destinationName":{"shape":"DestinationName"} } }, "DeleteLogGroupRequest":{ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - } + "logGroupName":{"shape":"LogGroupName"} } }, "DeleteLogStreamRequest":{ @@ -1066,14 +1195,8 @@ "logStreamName" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "logStreamName":{ - "shape":"LogStreamName", - "documentation":"

The name of the log stream.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "logStreamName":{"shape":"LogStreamName"} } }, "DeleteMetricFilterRequest":{ @@ -1083,52 +1206,34 @@ "filterName" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "filterName":{ - "shape":"FilterName", - "documentation":"

The name of the metric filter.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "filterName":{"shape":"FilterName"} } }, "DeleteQueryDefinitionRequest":{ "type":"structure", "required":["queryDefinitionId"], "members":{ - "queryDefinitionId":{ - "shape":"QueryId", - "documentation":"

The ID of the query definition that you want to delete. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions.

" - } + "queryDefinitionId":{"shape":"QueryId"} } }, "DeleteQueryDefinitionResponse":{ "type":"structure", "members":{ - "success":{ - "shape":"Success", - "documentation":"

A value of TRUE indicates that the operation succeeded. FALSE indicates that the operation failed.

" - } + "success":{"shape":"Success"} } }, "DeleteResourcePolicyRequest":{ "type":"structure", "members":{ - "policyName":{ - "shape":"PolicyName", - "documentation":"

The name of the policy to be revoked. This parameter is required.

" - } + "policyName":{"shape":"PolicyName"} } }, "DeleteRetentionPolicyRequest":{ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - } + "logGroupName":{"shape":"LogGroupName"} } }, "DeleteSubscriptionFilterRequest":{ @@ -1138,99 +1243,179 @@ "filterName" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "filterName":{ - "shape":"FilterName", - "documentation":"

The name of the subscription filter.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "filterName":{"shape":"FilterName"} + } + }, + "Deliveries":{ + "type":"list", + "member":{"shape":"Delivery"} + }, + "Delivery":{ + "type":"structure", + "members":{ + "id":{"shape":"DeliveryId"}, + "arn":{"shape":"Arn"}, + "deliverySourceName":{"shape":"DeliverySourceName"}, + "deliveryDestinationArn":{"shape":"Arn"}, + "deliveryDestinationType":{"shape":"DeliveryDestinationType"}, + "tags":{"shape":"Tags"} + } + }, + "DeliveryDestination":{ + "type":"structure", + "members":{ + "name":{"shape":"DeliveryDestinationName"}, + "arn":{"shape":"Arn"}, + "deliveryDestinationType":{"shape":"DeliveryDestinationType"}, + "outputFormat":{"shape":"OutputFormat"}, + "deliveryDestinationConfiguration":{"shape":"DeliveryDestinationConfiguration"}, + "tags":{"shape":"Tags"} + } + }, + "DeliveryDestinationConfiguration":{ + "type":"structure", + "required":["destinationResourceArn"], + "members":{ + "destinationResourceArn":{"shape":"Arn"} + } + }, + "DeliveryDestinationName":{ + "type":"string", + "max":60, + "min":1, + "pattern":"[\\w-]*" + }, + "DeliveryDestinationPolicy":{ + "type":"string", + "max":51200, + "min":1 + }, + "DeliveryDestinationType":{ + "type":"string", + "enum":[ + "S3", + "CWL", + "FH" + ] + }, + "DeliveryDestinations":{ + "type":"list", + "member":{"shape":"DeliveryDestination"} + }, + "DeliveryId":{ + "type":"string", + "max":64, + "min":1, + "pattern":"^[0-9A-Za-z]+$" + }, + "DeliverySource":{ + "type":"structure", + "members":{ + "name":{"shape":"DeliverySourceName"}, + "arn":{"shape":"Arn"}, + "resourceArns":{"shape":"ResourceArns"}, + "service":{"shape":"Service"}, + "logType":{"shape":"LogType"}, + "tags":{"shape":"Tags"} } }, + "DeliverySourceName":{ + "type":"string", + "max":60, + "min":1, + "pattern":"[\\w-]*" + }, + "DeliverySources":{ + "type":"list", + "member":{"shape":"DeliverySource"} + }, "Descending":{"type":"boolean"}, "DescribeAccountPoliciesRequest":{ "type":"structure", "required":["policyType"], "members":{ - "policyType":{ - "shape":"PolicyType", - "documentation":"

Use this parameter to limit the returned policies to only the policies that match the policy type that you specify. Currently, the only valid value is DATA_PROTECTION_POLICY.

" - }, - "policyName":{ - "shape":"PolicyName", - "documentation":"

Use this parameter to limit the returned policies to only the policy with the name that you specify.

" - }, - "accountIdentifiers":{ - "shape":"AccountIds", - "documentation":"

If you are using an account that is set up as a monitoring account for CloudWatch unified cross-account observability, you can use this to specify the account ID of a source account. If you do, the operation returns the account policy for the specified account. Currently, you can specify only one account ID in this parameter.

If you omit this parameter, only the policy in the current account is returned.

" - } + "policyType":{"shape":"PolicyType"}, + "policyName":{"shape":"PolicyName"}, + "accountIdentifiers":{"shape":"AccountIds"} } }, "DescribeAccountPoliciesResponse":{ "type":"structure", "members":{ - "accountPolicies":{ - "shape":"AccountPolicies", - "documentation":"

An array of structures that contain information about the CloudWatch Logs account policies that match the specified filters.

" - } + "accountPolicies":{"shape":"AccountPolicies"} + } + }, + "DescribeDeliveriesRequest":{ + "type":"structure", + "members":{ + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} + } + }, + "DescribeDeliveriesResponse":{ + "type":"structure", + "members":{ + "deliveries":{"shape":"Deliveries"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeDeliveryDestinationsRequest":{ + "type":"structure", + "members":{ + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} + } + }, + "DescribeDeliveryDestinationsResponse":{ + "type":"structure", + "members":{ + "deliveryDestinations":{"shape":"DeliveryDestinations"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeDeliverySourcesRequest":{ + "type":"structure", + "members":{ + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} + } + }, + "DescribeDeliverySourcesResponse":{ + "type":"structure", + "members":{ + "deliverySources":{"shape":"DeliverySources"}, + "nextToken":{"shape":"NextToken"} } }, "DescribeDestinationsRequest":{ "type":"structure", "members":{ - "DestinationNamePrefix":{ - "shape":"DestinationName", - "documentation":"

The prefix to match. If you don't specify a value, no prefix filter is applied.

" - }, - "nextToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" - }, - "limit":{ - "shape":"DescribeLimit", - "documentation":"

The maximum number of items returned. If you don't specify a value, the default maximum value of 50 items is used.

" - } + "DestinationNamePrefix":{"shape":"DestinationName"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} } }, "DescribeDestinationsResponse":{ "type":"structure", "members":{ - "destinations":{ - "shape":"Destinations", - "documentation":"

The destinations.

" - }, + "destinations":{"shape":"Destinations"}, "nextToken":{"shape":"NextToken"} } }, "DescribeExportTasksRequest":{ "type":"structure", "members":{ - "taskId":{ - "shape":"ExportTaskId", - "documentation":"

The ID of the export task. Specifying a task ID filters the results to one or zero export tasks.

" - }, - "statusCode":{ - "shape":"ExportTaskStatusCode", - "documentation":"

The status code of the export task. Specifying a status code filters the results to zero or more export tasks.

" - }, - "nextToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" - }, - "limit":{ - "shape":"DescribeLimit", - "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" - } + "taskId":{"shape":"ExportTaskId"}, + "statusCode":{"shape":"ExportTaskStatusCode"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} } }, "DescribeExportTasksResponse":{ "type":"structure", "members":{ - "exportTasks":{ - "shape":"ExportTasks", - "documentation":"

The export tasks.

" - }, + "exportTasks":{"shape":"ExportTasks"}, "nextToken":{"shape":"NextToken"} } }, @@ -1242,121 +1427,55 @@ "DescribeLogGroupsRequest":{ "type":"structure", "members":{ - "accountIdentifiers":{ - "shape":"AccountIds", - "documentation":"

When includeLinkedAccounts is set to True, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array.

" - }, - "logGroupNamePrefix":{ - "shape":"LogGroupName", - "documentation":"

The prefix to match.

logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these parameters can be passed.

" - }, - "logGroupNamePattern":{ - "shape":"LogGroupNamePattern", - "documentation":"

If you specify a string for this parameter, the operation returns only log groups that have names that match the string based on a case-sensitive substring search. For example, if you specify Foo, log groups named FooBar, aws/Foo, and GroupFoo would match, but foo, F/o/o and Froo would not match.

If you specify logGroupNamePattern in your request, then only arn, creationTime, and logGroupName are included in the response.

logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these parameters can be passed.

" - }, - "nextToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" - }, - "limit":{ - "shape":"DescribeLimit", - "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" - }, - "includeLinkedAccounts":{ - "shape":"IncludeLinkedAccounts", - "documentation":"

If you are using a monitoring account, set this to True to have the operation return log groups in the accounts listed in accountIdentifiers.

If this parameter is set to true and accountIdentifiers contains a null value, the operation returns all log groups in the monitoring account and all log groups in all source accounts that are linked to the monitoring account.

" - } + "accountIdentifiers":{"shape":"AccountIds"}, + "logGroupNamePrefix":{"shape":"LogGroupName"}, + "logGroupNamePattern":{"shape":"LogGroupNamePattern"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"}, + "includeLinkedAccounts":{"shape":"IncludeLinkedAccounts"} } }, "DescribeLogGroupsResponse":{ "type":"structure", "members":{ - "logGroups":{ - "shape":"LogGroups", - "documentation":"

The log groups.

If the retentionInDays value is not included for a log group, then that log group's events do not expire.

" - }, + "logGroups":{"shape":"LogGroups"}, "nextToken":{"shape":"NextToken"} } }, "DescribeLogStreamsRequest":{ "type":"structure", "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

You must include either logGroupIdentifier or logGroupName, but not both.

" - }, - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.

You must include either logGroupIdentifier or logGroupName, but not both.

" - }, - "logStreamNamePrefix":{ - "shape":"LogStreamName", - "documentation":"

The prefix to match.

If orderBy is LastEventTime, you cannot specify this parameter.

" - }, - "orderBy":{ - "shape":"OrderBy", - "documentation":"

If the value is LogStreamName, the results are ordered by log stream name. If the value is LastEventTime, the results are ordered by the event time. The default value is LogStreamName.

If you order the results by event time, you cannot specify the logStreamNamePrefix parameter.

lastEventTimestamp represents the time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.

" - }, - "descending":{ - "shape":"Descending", - "documentation":"

If the value is true, results are returned in descending order. If the value is to false, results are returned in ascending order. The default value is false.

" - }, - "nextToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" - }, - "limit":{ - "shape":"DescribeLimit", - "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, + "logStreamNamePrefix":{"shape":"LogStreamName"}, + "orderBy":{"shape":"OrderBy"}, + "descending":{"shape":"Descending"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} } }, "DescribeLogStreamsResponse":{ "type":"structure", "members":{ - "logStreams":{ - "shape":"LogStreams", - "documentation":"

The log streams.

" - }, + "logStreams":{"shape":"LogStreams"}, "nextToken":{"shape":"NextToken"} } }, "DescribeMetricFiltersRequest":{ "type":"structure", "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "filterNamePrefix":{ - "shape":"FilterName", - "documentation":"

The prefix to match. CloudWatch Logs uses the value that you set here only if you also include the logGroupName parameter in your request.

" - }, - "nextToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" - }, - "limit":{ - "shape":"DescribeLimit", - "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" - }, - "metricName":{ - "shape":"MetricName", - "documentation":"

Filters results to include only those with the specified metric name. If you include this parameter in your request, you must also include the metricNamespace parameter.

" - }, - "metricNamespace":{ - "shape":"MetricNamespace", - "documentation":"

Filters results to include only those in the specified namespace. If you include this parameter in your request, you must also include the metricName parameter.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "filterNamePrefix":{"shape":"FilterName"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"}, + "metricName":{"shape":"MetricName"}, + "metricNamespace":{"shape":"MetricNamespace"} } }, "DescribeMetricFiltersResponse":{ "type":"structure", "members":{ - "metricFilters":{ - "shape":"MetricFilters", - "documentation":"

The metric filters.

" - }, + "metricFilters":{"shape":"MetricFilters"}, "nextToken":{"shape":"NextToken"} } }, @@ -1368,52 +1487,31 @@ "DescribeQueriesRequest":{ "type":"structure", "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

Limits the returned queries to only those for the specified log group.

" - }, - "status":{ - "shape":"QueryStatus", - "documentation":"

Limits the returned queries to only those that have the specified status. Valid values are Cancelled, Complete, Failed, Running, and Scheduled.

" - }, - "maxResults":{ - "shape":"DescribeQueriesMaxResults", - "documentation":"

Limits the number of returned queries to the specified number.

" - }, + "logGroupName":{"shape":"LogGroupName"}, + "status":{"shape":"QueryStatus"}, + "maxResults":{"shape":"DescribeQueriesMaxResults"}, "nextToken":{"shape":"NextToken"} } }, "DescribeQueriesResponse":{ "type":"structure", "members":{ - "queries":{ - "shape":"QueryInfoList", - "documentation":"

The list of queries that match the request.

" - }, + "queries":{"shape":"QueryInfoList"}, "nextToken":{"shape":"NextToken"} } }, "DescribeQueryDefinitionsRequest":{ "type":"structure", "members":{ - "queryDefinitionNamePrefix":{ - "shape":"QueryDefinitionName", - "documentation":"

Use this parameter to filter your results to only the query definitions that have names that start with the prefix you specify.

" - }, - "maxResults":{ - "shape":"QueryListMaxResults", - "documentation":"

Limits the number of returned query definitions to the specified number.

" - }, + "queryDefinitionNamePrefix":{"shape":"QueryDefinitionName"}, + "maxResults":{"shape":"QueryListMaxResults"}, "nextToken":{"shape":"NextToken"} } }, "DescribeQueryDefinitionsResponse":{ "type":"structure", "members":{ - "queryDefinitions":{ - "shape":"QueryDefinitionList", - "documentation":"

The list of query definitions that match your request.

" - }, + "queryDefinitions":{"shape":"QueryDefinitionList"}, "nextToken":{"shape":"NextToken"} } }, @@ -1421,19 +1519,13 @@ "type":"structure", "members":{ "nextToken":{"shape":"NextToken"}, - "limit":{ - "shape":"DescribeLimit", - "documentation":"

The maximum number of resource policies to be displayed with one call of this API.

" - } + "limit":{"shape":"DescribeLimit"} } }, "DescribeResourcePoliciesResponse":{ "type":"structure", "members":{ - "resourcePolicies":{ - "shape":"ResourcePolicies", - "documentation":"

The resource policies that exist in this account.

" - }, + "resourcePolicies":{"shape":"ResourcePolicies"}, "nextToken":{"shape":"NextToken"} } }, @@ -1441,63 +1533,29 @@ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "filterNamePrefix":{ - "shape":"FilterName", - "documentation":"

The prefix to match. If you don't specify a value, no prefix filter is applied.

" - }, - "nextToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" - }, - "limit":{ - "shape":"DescribeLimit", - "documentation":"

The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "filterNamePrefix":{"shape":"FilterName"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} } }, "DescribeSubscriptionFiltersResponse":{ "type":"structure", "members":{ - "subscriptionFilters":{ - "shape":"SubscriptionFilters", - "documentation":"

The subscription filters.

" - }, + "subscriptionFilters":{"shape":"SubscriptionFilters"}, "nextToken":{"shape":"NextToken"} } }, "Destination":{ "type":"structure", "members":{ - "destinationName":{ - "shape":"DestinationName", - "documentation":"

The name of the destination.

" - }, - "targetArn":{ - "shape":"TargetArn", - "documentation":"

The Amazon Resource Name (ARN) of the physical target where the log events are delivered (for example, a Kinesis stream).

" - }, - "roleArn":{ - "shape":"RoleArn", - "documentation":"

A role for impersonation, used when delivering log events to the target.

" - }, - "accessPolicy":{ - "shape":"AccessPolicy", - "documentation":"

An IAM policy document that governs which Amazon Web Services accounts can create subscription filters against this destination.

" - }, - "arn":{ - "shape":"Arn", - "documentation":"

The ARN of this destination.

" - }, - "creationTime":{ - "shape":"Timestamp", - "documentation":"

The creation time of the destination, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - } - }, - "documentation":"

Represents a cross-account destination that receives subscription log events.

" + "destinationName":{"shape":"DestinationName"}, + "targetArn":{"shape":"TargetArn"}, + "roleArn":{"shape":"RoleArn"}, + "accessPolicy":{"shape":"AccessPolicy"}, + "arn":{"shape":"Arn"}, + "creationTime":{"shape":"Timestamp"} + } }, "DestinationArn":{ "type":"string", @@ -1529,19 +1587,12 @@ "DisassociateKmsKeyRequest":{ "type":"structure", "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

In your DisassociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.

" - }, - "resourceIdentifier":{ - "shape":"ResourceIdentifier", - "documentation":"

Specifies the target for this operation. You must specify one of the following:

  • Specify the ARN of a log group to stop having CloudWatch Logs use the KMS key to encrypt log events that are ingested and stored by that log group. After you run this operation, CloudWatch Logs encrypts ingested log events with the default CloudWatch Logs method. The log group ARN must be in the following format. Replace REGION and ACCOUNT_ID with your Region and account ID.

    arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME

  • Specify the following ARN to stop using this key to encrypt the results of future StartQuery operations in this account. Replace REGION and ACCOUNT_ID with your Region and account ID.

    arn:aws:logs:REGION:ACCOUNT_ID:query-result:*

In your DisssociateKmsKey operation, you must specify either the resourceIdentifier parameter or the logGroup parameter, but you can't specify both.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "resourceIdentifier":{"shape":"ResourceIdentifier"} } }, "Distribution":{ "type":"string", - "documentation":"

The method used to distribute log data to the destination, which can be either random or grouped by log stream.

", "enum":[ "Random", "ByLogStream" @@ -1571,58 +1622,23 @@ "ExportTask":{ "type":"structure", "members":{ - "taskId":{ - "shape":"ExportTaskId", - "documentation":"

The ID of the export task.

" - }, - "taskName":{ - "shape":"ExportTaskName", - "documentation":"

The name of the export task.

" - }, - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group from which logs data was exported.

" - }, - "from":{ - "shape":"Timestamp", - "documentation":"

The start time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not exported.

" - }, - "to":{ - "shape":"Timestamp", - "documentation":"

The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported.

" - }, - "destination":{ - "shape":"ExportDestinationBucket", - "documentation":"

The name of the S3 bucket to which the log data was exported.

" - }, - "destinationPrefix":{ - "shape":"ExportDestinationPrefix", - "documentation":"

The prefix that was used as the start of Amazon S3 key for every object exported.

" - }, - "status":{ - "shape":"ExportTaskStatus", - "documentation":"

The status of the export task.

" - }, - "executionInfo":{ - "shape":"ExportTaskExecutionInfo", - "documentation":"

Execution information about the export task.

" - } - }, - "documentation":"

Represents an export task.

" + "taskId":{"shape":"ExportTaskId"}, + "taskName":{"shape":"ExportTaskName"}, + "logGroupName":{"shape":"LogGroupName"}, + "from":{"shape":"Timestamp"}, + "to":{"shape":"Timestamp"}, + "destination":{"shape":"ExportDestinationBucket"}, + "destinationPrefix":{"shape":"ExportDestinationPrefix"}, + "status":{"shape":"ExportTaskStatus"}, + "executionInfo":{"shape":"ExportTaskExecutionInfo"} + } }, "ExportTaskExecutionInfo":{ "type":"structure", "members":{ - "creationTime":{ - "shape":"Timestamp", - "documentation":"

The creation time of the export task, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - }, - "completionTime":{ - "shape":"Timestamp", - "documentation":"

The completion time of the export task, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - } - }, - "documentation":"

Represents the status of an export task.

" + "creationTime":{"shape":"Timestamp"}, + "completionTime":{"shape":"Timestamp"} + } }, "ExportTaskId":{ "type":"string", @@ -1637,16 +1653,9 @@ "ExportTaskStatus":{ "type":"structure", "members":{ - "code":{ - "shape":"ExportTaskStatusCode", - "documentation":"

The status code of the export task.

" - }, - "message":{ - "shape":"ExportTaskStatusMessage", - "documentation":"

The status message related to the status code.

" - } - }, - "documentation":"

Represents the status of an export task.

" + "code":{"shape":"ExportTaskStatusCode"}, + "message":{"shape":"ExportTaskStatusMessage"} + } }, "ExportTaskStatusCode":{ "type":"string", @@ -1674,69 +1683,29 @@ "FilterLogEventsRequest":{ "type":"structure", "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group to search.

You must include either logGroupIdentifier or logGroupName, but not both.

" - }, - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

Specify either the name or ARN of the log group to view log events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.

You must include either logGroupIdentifier or logGroupName, but not both.

" - }, - "logStreamNames":{ - "shape":"InputLogStreamNames", - "documentation":"

Filters the results to only logs from the log streams in this list.

If you specify a value for both logStreamNamePrefix and logStreamNames, the action returns an InvalidParameterException error.

" - }, - "logStreamNamePrefix":{ - "shape":"LogStreamName", - "documentation":"

Filters the results to include only events from log streams that have names starting with this prefix.

If you specify a value for both logStreamNamePrefix and logStreamNames, but the value for logStreamNamePrefix does not match any log stream names specified in logStreamNames, the action returns an InvalidParameterException error.

" - }, - "startTime":{ - "shape":"Timestamp", - "documentation":"

The start of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not returned.

" - }, - "endTime":{ - "shape":"Timestamp", - "documentation":"

The end of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not returned.

" - }, - "filterPattern":{ - "shape":"FilterPattern", - "documentation":"

The filter pattern to use. For more information, see Filter and Pattern Syntax.

If not provided, all the events are matched.

" - }, - "nextToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of events to return. (You received this token from a previous call.)

" - }, - "limit":{ - "shape":"EventsLimit", - "documentation":"

The maximum number of events to return. The default is 10,000 events.

" - }, + "logGroupName":{"shape":"LogGroupName"}, + "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, + "logStreamNames":{"shape":"InputLogStreamNames"}, + "logStreamNamePrefix":{"shape":"LogStreamName"}, + "startTime":{"shape":"Timestamp"}, + "endTime":{"shape":"Timestamp"}, + "filterPattern":{"shape":"FilterPattern"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"EventsLimit"}, "interleaved":{ "shape":"Interleaved", - "documentation":"

If the value is true, the operation attempts to provide responses that contain events from multiple log streams within the log group, interleaved in a single response. If the value is false, all the matched log events in the first log stream are searched first, then those in the next log stream, and so on.

Important As of June 17, 2019, this parameter is ignored and the value is assumed to be true. The response from this operation always interleaves events from multiple log streams within a log group.

", "deprecated":true, "deprecatedMessage":"Starting on June 17, 2019, this parameter will be ignored and the value will be assumed to be true. The response from this operation will always interleave events from multiple log streams within a log group." }, - "unmask":{ - "shape":"Unmask", - "documentation":"

Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false.

To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.

" - } + "unmask":{"shape":"Unmask"} } }, "FilterLogEventsResponse":{ "type":"structure", "members":{ - "events":{ - "shape":"FilteredLogEvents", - "documentation":"

The matched events.

" - }, - "searchedLogStreams":{ - "shape":"SearchedLogStreams", - "documentation":"

Important As of May 15, 2020, this parameter is no longer supported. This parameter returns an empty list.

Indicates which log streams have been searched and whether each has been searched completely.

" - }, - "nextToken":{ - "shape":"NextToken", - "documentation":"

The token to use when requesting the next set of items. The token expires after 24 hours.

" - } + "events":{"shape":"FilteredLogEvents"}, + "searchedLogStreams":{"shape":"SearchedLogStreams"}, + "nextToken":{"shape":"NextToken"} } }, "FilterName":{ @@ -1747,35 +1716,18 @@ }, "FilterPattern":{ "type":"string", - "documentation":"

A symbolic description of how CloudWatch Logs should interpret the data in each log event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You use the filter pattern to specify what to look for in the log event message.

", "max":1024, "min":0 }, "FilteredLogEvent":{ "type":"structure", "members":{ - "logStreamName":{ - "shape":"LogStreamName", - "documentation":"

The name of the log stream to which this event belongs.

" - }, - "timestamp":{ - "shape":"Timestamp", - "documentation":"

The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - }, - "message":{ - "shape":"EventMessage", - "documentation":"

The data contained in the log event.

" - }, - "ingestionTime":{ - "shape":"Timestamp", - "documentation":"

The time the event was ingested, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - }, - "eventId":{ - "shape":"EventId", - "documentation":"

The ID of the event.

" - } - }, - "documentation":"

Represents a matched event.

" + "logStreamName":{"shape":"LogStreamName"}, + "timestamp":{"shape":"Timestamp"}, + "message":{"shape":"EventMessage"}, + "ingestionTime":{"shape":"Timestamp"}, + "eventId":{"shape":"EventId"} + } }, "FilteredLogEvents":{ "type":"list", @@ -1786,166 +1738,134 @@ "type":"structure", "required":["logGroupIdentifier"], "members":{ - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

The name or ARN of the log group that contains the data protection policy that you want to see.

" - } + "logGroupIdentifier":{"shape":"LogGroupIdentifier"} } }, "GetDataProtectionPolicyResponse":{ "type":"structure", "members":{ - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

The log group name or ARN that you specified in your request.

" - }, - "policyDocument":{ - "shape":"DataProtectionPolicyDocument", - "documentation":"

The data protection policy document for this log group.

" - }, - "lastUpdatedTime":{ - "shape":"Timestamp", - "documentation":"

The date and time that this policy was most recently updated.

" - } + "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, + "policyDocument":{"shape":"DataProtectionPolicyDocument"}, + "lastUpdatedTime":{"shape":"Timestamp"} + } + }, + "GetDeliveryDestinationPolicyRequest":{ + "type":"structure", + "required":["deliveryDestinationName"], + "members":{ + "deliveryDestinationName":{"shape":"DeliveryDestinationName"} + } + }, + "GetDeliveryDestinationPolicyResponse":{ + "type":"structure", + "members":{ + "policy":{"shape":"Policy"} + } + }, + "GetDeliveryDestinationRequest":{ + "type":"structure", + "required":["name"], + "members":{ + "name":{"shape":"DeliveryDestinationName"} + } + }, + "GetDeliveryDestinationResponse":{ + "type":"structure", + "members":{ + "deliveryDestination":{"shape":"DeliveryDestination"} + } + }, + "GetDeliveryRequest":{ + "type":"structure", + "required":["id"], + "members":{ + "id":{"shape":"DeliveryId"} + } + }, + "GetDeliveryResponse":{ + "type":"structure", + "members":{ + "delivery":{"shape":"Delivery"} + } + }, + "GetDeliverySourceRequest":{ + "type":"structure", + "required":["name"], + "members":{ + "name":{"shape":"DeliverySourceName"} + } + }, + "GetDeliverySourceResponse":{ + "type":"structure", + "members":{ + "deliverySource":{"shape":"DeliverySource"} } }, "GetLogEventsRequest":{ "type":"structure", "required":["logStreamName"], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

You must include either logGroupIdentifier or logGroupName, but not both.

" - }, - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

Specify either the name or ARN of the log group to view events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.

You must include either logGroupIdentifier or logGroupName, but not both.

" - }, - "logStreamName":{ - "shape":"LogStreamName", - "documentation":"

The name of the log stream.

" - }, - "startTime":{ - "shape":"Timestamp", - "documentation":"

The start of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this time or later than this time are included. Events with a timestamp earlier than this time are not included.

" - }, - "endTime":{ - "shape":"Timestamp", - "documentation":"

The end of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later than this time are not included.

" - }, - "nextToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of items to return. (You received this token from a previous call.)

" - }, - "limit":{ - "shape":"EventsLimit", - "documentation":"

The maximum number of log events returned. If you don't specify a limit, the default is as many log events as can fit in a response size of 1 MB (up to 10,000 log events).

" - }, - "startFromHead":{ - "shape":"StartFromHead", - "documentation":"

If the value is true, the earliest log events are returned first. If the value is false, the latest log events are returned first. The default value is false.

If you are using a previous nextForwardToken value as the nextToken in this operation, you must specify true for startFromHead.

" - }, - "unmask":{ - "shape":"Unmask", - "documentation":"

Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false.

To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, + "logStreamName":{"shape":"LogStreamName"}, + "startTime":{"shape":"Timestamp"}, + "endTime":{"shape":"Timestamp"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"EventsLimit"}, + "startFromHead":{"shape":"StartFromHead"}, + "unmask":{"shape":"Unmask"} } }, "GetLogEventsResponse":{ "type":"structure", "members":{ - "events":{ - "shape":"OutputLogEvents", - "documentation":"

The events.

" - }, - "nextForwardToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of items in the forward direction. The token expires after 24 hours. If you have reached the end of the stream, it returns the same token you passed in.

" - }, - "nextBackwardToken":{ - "shape":"NextToken", - "documentation":"

The token for the next set of items in the backward direction. The token expires after 24 hours. This token is not null. If you have reached the end of the stream, it returns the same token you passed in.

" - } + "events":{"shape":"OutputLogEvents"}, + "nextForwardToken":{"shape":"NextToken"}, + "nextBackwardToken":{"shape":"NextToken"} } }, "GetLogGroupFieldsRequest":{ "type":"structure", "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group to search.

You must include either logGroupIdentifier or logGroupName, but not both.

" - }, - "time":{ - "shape":"Timestamp", - "documentation":"

The time to set as the center of the query. If you specify time, the 8 minutes before and 8 minutes after this time are searched. If you omit time, the most recent 15 minutes up to the current time are searched.

The time value is specified as epoch time, which is the number of seconds since January 1, 1970, 00:00:00 UTC.

" - }, - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must specify the ARN.

You must include either logGroupIdentifier or logGroupName, but not both.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "time":{"shape":"Timestamp"}, + "logGroupIdentifier":{"shape":"LogGroupIdentifier"} } }, "GetLogGroupFieldsResponse":{ "type":"structure", "members":{ - "logGroupFields":{ - "shape":"LogGroupFieldList", - "documentation":"

The array of fields found in the query. Each object in the array contains the name of the field, along with the percentage of time it appeared in the log events that were queried.

" - } + "logGroupFields":{"shape":"LogGroupFieldList"} } }, "GetLogRecordRequest":{ "type":"structure", "required":["logRecordPointer"], "members":{ - "logRecordPointer":{ - "shape":"LogRecordPointer", - "documentation":"

The pointer corresponding to the log event record you want to retrieve. You get this from the response of a GetQueryResults operation. In that response, the value of the @ptr field for a log event is the value to use as logRecordPointer to retrieve that complete log event record.

" - }, - "unmask":{ - "shape":"Unmask", - "documentation":"

Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false.

To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.

" - } + "logRecordPointer":{"shape":"LogRecordPointer"}, + "unmask":{"shape":"Unmask"} } }, "GetLogRecordResponse":{ "type":"structure", "members":{ - "logRecord":{ - "shape":"LogRecord", - "documentation":"

The requested log event, as a JSON string.

" - } + "logRecord":{"shape":"LogRecord"} } }, "GetQueryResultsRequest":{ "type":"structure", "required":["queryId"], "members":{ - "queryId":{ - "shape":"QueryId", - "documentation":"

The ID number of the query.

" - } + "queryId":{"shape":"QueryId"} } }, "GetQueryResultsResponse":{ "type":"structure", "members":{ - "results":{ - "shape":"QueryResults", - "documentation":"

The log events that matched the query criteria during the most recent time it ran.

The results value is an array of arrays. Each log event is one object in the top-level array. Each of these log event objects is an array of field/value pairs.

" - }, - "statistics":{ - "shape":"QueryStatistics", - "documentation":"

Includes the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the scanned log events. These values reflect the full raw results of the query.

" - }, - "status":{ - "shape":"QueryStatus", - "documentation":"

The status of the most recent running of the query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, Timeout, and Unknown.

Queries time out after 60 minutes of runtime. To avoid having your queries time out, reduce the time range being searched or partition your query into a number of queries.

" - }, - "encryptionKey":{ - "shape":"EncryptionKey", - "documentation":"

If you associated an KMS key with the CloudWatch Logs Insights query results in this account, this field displays the ARN of the key that's used to encrypt the query results when StartQuery stores them.

" - } + "results":{"shape":"QueryResults"}, + "statistics":{"shape":"QueryStatistics"}, + "status":{"shape":"QueryStatus"}, + "encryptionKey":{"shape":"EncryptionKey"} } }, "IncludeLinkedAccounts":{"type":"boolean"}, @@ -1964,16 +1884,9 @@ "message" ], "members":{ - "timestamp":{ - "shape":"Timestamp", - "documentation":"

The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - }, - "message":{ - "shape":"EventMessage", - "documentation":"

The raw event message. Each log event can be no larger than 256 KB.

" - } - }, - "documentation":"

Represents a log event, which is a record of activity that was recorded by the application or resource being monitored.

" + "timestamp":{"shape":"Timestamp"}, + "message":{"shape":"EventMessage"} + } }, "InputLogEvents":{ "type":"list", @@ -1992,14 +1905,12 @@ "type":"structure", "members":{ }, - "documentation":"

The operation is not valid on the specified resource.

", "exception":true }, "InvalidParameterException":{ "type":"structure", "members":{ }, - "documentation":"

A parameter is specified incorrectly.

", "exception":true }, "InvalidSequenceTokenException":{ @@ -2007,10 +1918,8 @@ "members":{ "expectedSequenceToken":{"shape":"SequenceToken"} }, - "documentation":"

The sequence token is not valid. You can get the correct sequence token in the expectedSequenceToken field in the InvalidSequenceTokenException message.

PutLogEvents actions are now always accepted and never return InvalidSequenceTokenException regardless of receiving an invalid sequence token.

", "exception":true }, - "IsSampled":{"type":"boolean"}, "KmsKeyId":{ "type":"string", "max":256 @@ -2019,36 +1928,26 @@ "type":"structure", "members":{ }, - "documentation":"

You have reached the maximum number of resources that can be created.

", "exception":true }, "ListTagsForResourceRequest":{ "type":"structure", "required":["resourceArn"], "members":{ - "resourceArn":{ - "shape":"AmazonResourceName", - "documentation":"

The ARN of the resource that you want to view tags for.

The ARN format of a log group is arn:aws:logs:Region:account-id:log-group:log-group-name

The ARN format of a destination is arn:aws:logs:Region:account-id:destination:destination-name

For more information about ARN format, see CloudWatch Logs resources and operations.

" - } + "resourceArn":{"shape":"AmazonResourceName"} } }, "ListTagsForResourceResponse":{ "type":"structure", "members":{ - "tags":{ - "shape":"Tags", - "documentation":"

The list of tags associated with the requested resource.>

" - } + "tags":{"shape":"Tags"} } }, "ListTagsLogGroupRequest":{ "type":"structure", "required":["logGroupName"], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - } + "logGroupName":{"shape":"LogGroupName"} }, "deprecated":true, "deprecatedMessage":"Please use the generic tagging API model ListTagsForResourceRequest and ListTagsForResourceResponse" @@ -2056,150 +1955,32 @@ "ListTagsLogGroupResponse":{ "type":"structure", "members":{ - "tags":{ - "shape":"Tags", - "documentation":"

The tags for the log group.

" - } + "tags":{"shape":"Tags"} }, "deprecated":true, "deprecatedMessage":"Please use the generic tagging API model ListTagsForResourceRequest and ListTagsForResourceResponse" }, - "LiveTailSessionLogEvent":{ - "type":"structure", - "members":{ - "logStreamName":{ - "shape":"LogStreamName", - "documentation":"

To Be Written

" - }, - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

To Be Written

" - }, - "message":{ - "shape":"EventMessage", - "documentation":"

To Be Written

" - }, - "timestamp":{ - "shape":"Timestamp", - "documentation":"

To Be Written

" - }, - "ingestionTime":{ - "shape":"Timestamp", - "documentation":"

To Be Written

" - } - }, - "documentation":"

To Be Written

" - }, - "LiveTailSessionMetadata":{ - "type":"structure", - "members":{ - "sampled":{ - "shape":"IsSampled", - "documentation":"

To Be Written

" - } - }, - "documentation":"

To Be Written

" - }, - "LiveTailSessionResults":{ - "type":"list", - "member":{"shape":"LiveTailSessionLogEvent"} - }, - "LiveTailSessionStart":{ - "type":"structure", - "members":{ - "requestId":{ - "shape":"RequestId", - "documentation":"

To Be Written

" - }, - "sessionId":{ - "shape":"SessionId", - "documentation":"

To Be Written

" - }, - "logGroupIdentifiers":{ - "shape":"StartLiveTailLogGroupIdentifiers", - "documentation":"

To Be Written

" - }, - "logStreamNames":{ - "shape":"InputLogStreamNames", - "documentation":"

To Be Written

" - }, - "logStreamNamePrefixes":{ - "shape":"InputLogStreamNames", - "documentation":"

To Be Written

" - }, - "logEventFilterPattern":{"shape":"FilterPattern"} - }, - "documentation":"

To Be Written

", - "event":true - }, - "LiveTailSessionUpdate":{ - "type":"structure", - "members":{ - "sessionMetadata":{ - "shape":"LiveTailSessionMetadata", - "documentation":"

To Be Written

" - }, - "sessionResults":{ - "shape":"LiveTailSessionResults", - "documentation":"

To be written

" - } - }, - "documentation":"

To Be Written

", - "event":true - }, "LogEventIndex":{"type":"integer"}, "LogGroup":{ "type":"structure", "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "creationTime":{ - "shape":"Timestamp", - "documentation":"

The creation time of the log group, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - }, + "logGroupName":{"shape":"LogGroupName"}, + "creationTime":{"shape":"Timestamp"}, "retentionInDays":{"shape":"Days"}, - "metricFilterCount":{ - "shape":"FilterCount", - "documentation":"

The number of metric filters.

" - }, - "arn":{ - "shape":"Arn", - "documentation":"

The Amazon Resource Name (ARN) of the log group.

" - }, - "storedBytes":{ - "shape":"StoredBytes", - "documentation":"

The number of bytes stored.

" - }, - "kmsKeyId":{ - "shape":"KmsKeyId", - "documentation":"

The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data.

" - }, - "dataProtectionStatus":{ - "shape":"DataProtectionStatus", - "documentation":"

Displays whether this log group has a protection policy, or whether it had one in the past. For more information, see PutDataProtectionPolicy.

" - }, - "inheritedProperties":{ - "shape":"InheritedProperties", - "documentation":"

Displays all the properties that this log group has inherited from account-level settings.

" - } - }, - "documentation":"

Represents a log group.

" + "metricFilterCount":{"shape":"FilterCount"}, + "arn":{"shape":"Arn"}, + "storedBytes":{"shape":"StoredBytes"}, + "kmsKeyId":{"shape":"KmsKeyId"}, + "dataProtectionStatus":{"shape":"DataProtectionStatus"}, + "inheritedProperties":{"shape":"InheritedProperties"} + } }, "LogGroupField":{ "type":"structure", - "members":{ - "name":{ - "shape":"Field", - "documentation":"

The name of a log field.

" - }, - "percent":{ - "shape":"Percentage", - "documentation":"

The percentage of log events queried that contained the field.

" - } - }, - "documentation":"

The fields contained in log events found by a GetLogGroupFields operation, along with the percentage of queried log events in which each field appears.

" + "members":{ + "name":{"shape":"Field"}, + "percent":{"shape":"Percentage"} + } }, "LogGroupFieldList":{ "type":"list", @@ -2244,42 +2025,19 @@ "LogStream":{ "type":"structure", "members":{ - "logStreamName":{ - "shape":"LogStreamName", - "documentation":"

The name of the log stream.

" - }, - "creationTime":{ - "shape":"Timestamp", - "documentation":"

The creation time of the stream, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - }, - "firstEventTimestamp":{ - "shape":"Timestamp", - "documentation":"

The time of the first event, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - }, - "lastEventTimestamp":{ - "shape":"Timestamp", - "documentation":"

The time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. The lastEventTime value updates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer.

" - }, - "lastIngestionTime":{ - "shape":"Timestamp", - "documentation":"

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

" - }, - "uploadSequenceToken":{ - "shape":"SequenceToken", - "documentation":"

The sequence token.

The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions are always accepted regardless of receiving an invalid sequence token. You don't need to obtain uploadSequenceToken to use a PutLogEvents action.

" - }, - "arn":{ - "shape":"Arn", - "documentation":"

The Amazon Resource Name (ARN) of the log stream.

" - }, + "logStreamName":{"shape":"LogStreamName"}, + "creationTime":{"shape":"Timestamp"}, + "firstEventTimestamp":{"shape":"Timestamp"}, + "lastEventTimestamp":{"shape":"Timestamp"}, + "lastIngestionTime":{"shape":"Timestamp"}, + "uploadSequenceToken":{"shape":"SequenceToken"}, + "arn":{"shape":"Arn"}, "storedBytes":{ "shape":"StoredBytes", - "documentation":"

The number of bytes stored.

Important: As of June 17, 2019, this parameter is no longer supported for log streams, and is always reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected.

", "deprecated":true, "deprecatedMessage":"Starting on June 17, 2019, this parameter will be deprecated for log streams, and will be reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected." } - }, - "documentation":"

Represents a log stream, which is a sequence of log events from a single emitter of logs.

" + } }, "LogStreamName":{ "type":"string", @@ -2292,55 +2050,37 @@ "type":"list", "member":{"shape":"LogStream"} }, + "LogType":{ + "type":"string", + "max":255, + "min":1, + "pattern":"[\\w]*" + }, "MalformedQueryException":{ "type":"structure", "members":{ "queryCompileError":{"shape":"QueryCompileError"} }, - "documentation":"

The query string is not valid. Details about this error are displayed in a QueryCompileError object. For more information, see QueryCompileError.

For more information about valid query syntax, see CloudWatch Logs Insights Query Syntax.

", "exception":true }, "Message":{"type":"string"}, "MetricFilter":{ "type":"structure", "members":{ - "filterName":{ - "shape":"FilterName", - "documentation":"

The name of the metric filter.

" - }, + "filterName":{"shape":"FilterName"}, "filterPattern":{"shape":"FilterPattern"}, - "metricTransformations":{ - "shape":"MetricTransformations", - "documentation":"

The metric transformations.

" - }, - "creationTime":{ - "shape":"Timestamp", - "documentation":"

The creation time of the metric filter, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - }, - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - } - }, - "documentation":"

Metric filters express how CloudWatch Logs would extract metric observations from ingested log events and transform them into metric data in a CloudWatch metric.

" + "metricTransformations":{"shape":"MetricTransformations"}, + "creationTime":{"shape":"Timestamp"}, + "logGroupName":{"shape":"LogGroupName"} + } }, "MetricFilterMatchRecord":{ "type":"structure", "members":{ - "eventNumber":{ - "shape":"EventNumber", - "documentation":"

The event number.

" - }, - "eventMessage":{ - "shape":"EventMessage", - "documentation":"

The raw event data.

" - }, - "extractedValues":{ - "shape":"ExtractedValues", - "documentation":"

The values extracted from the event data by the filter.

" - } - }, - "documentation":"

Represents a matched event.

" + "eventNumber":{"shape":"EventNumber"}, + "eventMessage":{"shape":"EventMessage"}, + "extractedValues":{"shape":"ExtractedValues"} + } }, "MetricFilterMatches":{ "type":"list", @@ -2352,7 +2092,6 @@ }, "MetricName":{ "type":"string", - "documentation":"

The name of the CloudWatch metric to which the monitored log information should be published. For example, you might publish to a metric named ErrorCount.

", "max":255, "pattern":"[^:*$]*" }, @@ -2369,32 +2108,13 @@ "metricValue" ], "members":{ - "metricName":{ - "shape":"MetricName", - "documentation":"

The name of the CloudWatch metric.

" - }, - "metricNamespace":{ - "shape":"MetricNamespace", - "documentation":"

A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.

" - }, - "metricValue":{ - "shape":"MetricValue", - "documentation":"

The value to publish to the CloudWatch metric when a filter pattern matches a log event.

" - }, - "defaultValue":{ - "shape":"DefaultValue", - "documentation":"

(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.

" - }, - "dimensions":{ - "shape":"Dimensions", - "documentation":"

The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.

Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric.

CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.

You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.

" - }, - "unit":{ - "shape":"StandardUnit", - "documentation":"

The unit to assign to the metric. If you omit this, the unit is set as None.

" - } - }, - "documentation":"

Indicates how to transform ingested log events to metric data in a CloudWatch metric.

" + "metricName":{"shape":"MetricName"}, + "metricNamespace":{"shape":"MetricNamespace"}, + "metricValue":{"shape":"MetricValue"}, + "defaultValue":{"shape":"DefaultValue"}, + "dimensions":{"shape":"Dimensions"}, + "unit":{"shape":"StandardUnit"} + } }, "MetricTransformations":{ "type":"list", @@ -2404,19 +2124,16 @@ }, "MetricValue":{ "type":"string", - "documentation":"

The value to publish to the CloudWatch metric. For example, if you're counting the occurrences of a term like Error, the value is 1 for each occurrence. If you're counting the bytes transferred, the value is the value in the log event.

", "max":100 }, "NextToken":{ "type":"string", - "documentation":"

The token for the next set of items to return. The token expires after 24 hours.

", "min":1 }, "OperationAbortedException":{ "type":"structure", "members":{ }, - "documentation":"

Multiple concurrent requests to update the same resource were in conflict.

", "exception":true }, "OrderBy":{ @@ -2426,23 +2143,23 @@ "LastEventTime" ] }, + "OutputFormat":{ + "type":"string", + "enum":[ + "json", + "plain", + "w3c", + "raw", + "parquet" + ] + }, "OutputLogEvent":{ "type":"structure", "members":{ - "timestamp":{ - "shape":"Timestamp", - "documentation":"

The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - }, - "message":{ - "shape":"EventMessage", - "documentation":"

The data contained in the log event.

" - }, - "ingestionTime":{ - "shape":"Timestamp", - "documentation":"

The time the event was ingested, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - } - }, - "documentation":"

Represents a log event.

" + "timestamp":{"shape":"Timestamp"}, + "message":{"shape":"EventMessage"}, + "ingestionTime":{"shape":"Timestamp"} + } }, "OutputLogEvents":{ "type":"list", @@ -2453,6 +2170,12 @@ "max":100, "min":0 }, + "Policy":{ + "type":"structure", + "members":{ + "deliveryDestinationPolicy":{"shape":"DeliveryDestinationPolicy"} + } + }, "PolicyDocument":{ "type":"string", "max":5120, @@ -2471,31 +2194,16 @@ "policyType" ], "members":{ - "policyName":{ - "shape":"PolicyName", - "documentation":"

A name for the policy. This must be unique within the account.

" - }, - "policyDocument":{ - "shape":"AccountPolicyDocument", - "documentation":"

Specify the data protection policy, in JSON.

This policy must include two JSON blocks:

  • The first block must include both a DataIdentifer array and an Operation property with an Audit action. The DataIdentifer array lists the types of sensitive data that you want to mask. For more information about the available options, see Types of data that you can mask.

    The Operation property with an Audit action is required to find the sensitive data terms. This Audit action must contain a FindingsDestination object. You can optionally use that FindingsDestination 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.

  • The second block must include both a DataIdentifer array and an Operation property with an Deidentify action. The DataIdentifer array must exactly match the DataIdentifer array in the first block of the policy.

    The Operation property with the Deidentify action is what actually masks the data, and it must contain the \"MaskConfig\": {} object. The \"MaskConfig\": {} object must be empty.

For an example data protection policy, see the Examples section on this page.

The contents of the two DataIdentifer arrays must match exactly.

In addition to the two JSON blocks, the policyDocument can also include Name, Description, and Version fields. The Name is different than the operation's policyName parameter, and is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch.

The JSON specified in policyDocument can be up to 30,720 characters.

" - }, - "policyType":{ - "shape":"PolicyType", - "documentation":"

Currently the only valid value for this parameter is DATA_PROTECTION_POLICY.

" - }, - "scope":{ - "shape":"Scope", - "documentation":"

Currently the only valid value for this parameter is ALL, which specifies that the data protection policy applies to all log groups in the account. If you omit this parameter, the default of ALL is used.

" - } + "policyName":{"shape":"PolicyName"}, + "policyDocument":{"shape":"AccountPolicyDocument"}, + "policyType":{"shape":"PolicyType"}, + "scope":{"shape":"Scope"} } }, "PutAccountPolicyResponse":{ "type":"structure", "members":{ - "accountPolicy":{ - "shape":"AccountPolicy", - "documentation":"

The account policy that you created.

" - } + "accountPolicy":{"shape":"AccountPolicy"} } }, "PutDataProtectionPolicyRequest":{ @@ -2505,31 +2213,72 @@ "policyDocument" ], "members":{ - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

Specify either the log group name or log group ARN.

" - }, - "policyDocument":{ - "shape":"DataProtectionPolicyDocument", - "documentation":"

Specify the data protection policy, in JSON.

This policy must include two JSON blocks:

  • The first block must include both a DataIdentifer array and an Operation property with an Audit action. The DataIdentifer array lists the types of sensitive data that you want to mask. For more information about the available options, see Types of data that you can mask.

    The Operation property with an Audit action is required to find the sensitive data terms. This Audit action must contain a FindingsDestination object. You can optionally use that FindingsDestination 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.

  • The second block must include both a DataIdentifer array and an Operation property with an Deidentify action. The DataIdentifer array must exactly match the DataIdentifer array in the first block of the policy.

    The Operation property with the Deidentify action is what actually masks the data, and it must contain the \"MaskConfig\": {} object. The \"MaskConfig\": {} object must be empty.

For an example data protection policy, see the Examples section on this page.

The contents of the two DataIdentifer arrays must match exactly.

In addition to the two JSON blocks, the policyDocument can also include Name, Description, and Version fields. The Name is used as a dimension when CloudWatch Logs reports audit findings metrics to CloudWatch.

The JSON specified in policyDocument can be up to 30,720 characters.

" - } + "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, + "policyDocument":{"shape":"DataProtectionPolicyDocument"} } }, "PutDataProtectionPolicyResponse":{ "type":"structure", "members":{ - "logGroupIdentifier":{ - "shape":"LogGroupIdentifier", - "documentation":"

The log group name or ARN that you specified in your request.

" - }, - "policyDocument":{ - "shape":"DataProtectionPolicyDocument", - "documentation":"

The data protection policy used for this log group.

" - }, - "lastUpdatedTime":{ - "shape":"Timestamp", - "documentation":"

The date and time that this policy was most recently updated.

" - } + "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, + "policyDocument":{"shape":"DataProtectionPolicyDocument"}, + "lastUpdatedTime":{"shape":"Timestamp"} + } + }, + "PutDeliveryDestinationPolicyRequest":{ + "type":"structure", + "required":[ + "deliveryDestinationName", + "deliveryDestinationPolicy" + ], + "members":{ + "deliveryDestinationName":{"shape":"DeliveryDestinationName"}, + "deliveryDestinationPolicy":{"shape":"DeliveryDestinationPolicy"} + } + }, + "PutDeliveryDestinationPolicyResponse":{ + "type":"structure", + "members":{ + "policy":{"shape":"Policy"} + } + }, + "PutDeliveryDestinationRequest":{ + "type":"structure", + "required":[ + "name", + "deliveryDestinationConfiguration" + ], + "members":{ + "name":{"shape":"DeliveryDestinationName"}, + "outputFormat":{"shape":"OutputFormat"}, + "deliveryDestinationConfiguration":{"shape":"DeliveryDestinationConfiguration"}, + "tags":{"shape":"Tags"} + } + }, + "PutDeliveryDestinationResponse":{ + "type":"structure", + "members":{ + "deliveryDestination":{"shape":"DeliveryDestination"} + } + }, + "PutDeliverySourceRequest":{ + "type":"structure", + "required":[ + "name", + "resourceArn", + "logType" + ], + "members":{ + "name":{"shape":"DeliverySourceName"}, + "resourceArn":{"shape":"Arn"}, + "logType":{"shape":"LogType"}, + "tags":{"shape":"Tags"} + } + }, + "PutDeliverySourceResponse":{ + "type":"structure", + "members":{ + "deliverySource":{"shape":"DeliverySource"} } }, "PutDestinationPolicyRequest":{ @@ -2539,18 +2288,9 @@ "accessPolicy" ], "members":{ - "destinationName":{ - "shape":"DestinationName", - "documentation":"

A name for an existing destination.

" - }, - "accessPolicy":{ - "shape":"AccessPolicy", - "documentation":"

An IAM policy document that authorizes cross-account users to deliver their log events to the associated destination. This can be up to 5120 bytes.

" - }, - "forceUpdate":{ - "shape":"ForceUpdate", - "documentation":"

Specify true if you are updating an existing destination policy to grant permission to an organization ID instead of granting permission to individual Amazon Web Services accounts. Before you update a destination policy this way, you must first update the subscription filters in the accounts that send logs to this destination. If you do not, the subscription filters might stop working. By specifying true for forceUpdate, you are affirming that you have already updated the subscription filters. For more information, see Updating an existing cross-account subscription

If you omit this parameter, the default of false is used.

" - } + "destinationName":{"shape":"DestinationName"}, + "accessPolicy":{"shape":"AccessPolicy"}, + "forceUpdate":{"shape":"ForceUpdate"} } }, "PutDestinationRequest":{ @@ -2561,31 +2301,16 @@ "roleArn" ], "members":{ - "destinationName":{ - "shape":"DestinationName", - "documentation":"

A name for the destination.

" - }, - "targetArn":{ - "shape":"TargetArn", - "documentation":"

The ARN of an Amazon Kinesis stream to which to deliver matching log events.

" - }, - "roleArn":{ - "shape":"RoleArn", - "documentation":"

The ARN of an IAM role that grants CloudWatch Logs permissions to call the Amazon Kinesis PutRecord operation on the destination stream.

" - }, - "tags":{ - "shape":"Tags", - "documentation":"

An optional list of key-value pairs to associate with the resource.

For more information about tagging, see Tagging Amazon Web Services resources

" - } + "destinationName":{"shape":"DestinationName"}, + "targetArn":{"shape":"TargetArn"}, + "roleArn":{"shape":"RoleArn"}, + "tags":{"shape":"Tags"} } }, "PutDestinationResponse":{ "type":"structure", "members":{ - "destination":{ - "shape":"Destination", - "documentation":"

The destination.

" - } + "destination":{"shape":"Destination"} } }, "PutLogEventsRequest":{ @@ -2596,35 +2321,17 @@ "logEvents" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "logStreamName":{ - "shape":"LogStreamName", - "documentation":"

The name of the log stream.

" - }, - "logEvents":{ - "shape":"InputLogEvents", - "documentation":"

The log events.

" - }, - "sequenceToken":{ - "shape":"SequenceToken", - "documentation":"

The sequence token obtained from the response of the previous PutLogEvents call.

The sequenceToken parameter is now ignored in PutLogEvents actions. PutLogEvents actions are now accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException even if the sequence token is not valid.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "logStreamName":{"shape":"LogStreamName"}, + "logEvents":{"shape":"InputLogEvents"}, + "sequenceToken":{"shape":"SequenceToken"} } }, "PutLogEventsResponse":{ "type":"structure", "members":{ - "nextSequenceToken":{ - "shape":"SequenceToken", - "documentation":"

The next sequence token.

This field has been deprecated.

The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions are always accepted even if the sequence token is not valid. You can use parallel PutLogEvents actions on the same log stream and you do not need to wait for the response of a previous PutLogEvents action to obtain the nextSequenceToken value.

" - }, - "rejectedLogEventsInfo":{ - "shape":"RejectedLogEventsInfo", - "documentation":"

The rejected events.

" - } + "nextSequenceToken":{"shape":"SequenceToken"}, + "rejectedLogEventsInfo":{"shape":"RejectedLogEventsInfo"} } }, "PutMetricFilterRequest":{ @@ -2636,22 +2343,10 @@ "metricTransformations" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "filterName":{ - "shape":"FilterName", - "documentation":"

A name for the metric filter.

" - }, - "filterPattern":{ - "shape":"FilterPattern", - "documentation":"

A filter pattern for extracting metric data out of ingested log events.

" - }, - "metricTransformations":{ - "shape":"MetricTransformations", - "documentation":"

A collection of information that defines how metric data gets emitted.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "filterName":{"shape":"FilterName"}, + "filterPattern":{"shape":"FilterPattern"}, + "metricTransformations":{"shape":"MetricTransformations"} } }, "PutQueryDefinitionRequest":{ @@ -2661,25 +2356,12 @@ "queryString" ], "members":{ - "name":{ - "shape":"QueryDefinitionName", - "documentation":"

A name for the query definition. If you are saving numerous query definitions, we recommend that you name them. This way, you can find the ones you want by using the first part of the name as a filter in the queryDefinitionNamePrefix parameter of DescribeQueryDefinitions.

" - }, - "queryDefinitionId":{ - "shape":"QueryId", - "documentation":"

If you are updating a query definition, use this parameter to specify the ID of the query definition that you want to update. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions.

If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the new query definition and include it in the response to this operation.

" - }, - "logGroupNames":{ - "shape":"LogGroupNames", - "documentation":"

Use this parameter to include specific log groups as part of your query definition.

If you are updating a query definition and you omit this parameter, then the updated definition will contain no log groups.

" - }, - "queryString":{ - "shape":"QueryDefinitionString", - "documentation":"

The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax.

" - }, + "name":{"shape":"QueryDefinitionName"}, + "queryDefinitionId":{"shape":"QueryId"}, + "logGroupNames":{"shape":"LogGroupNames"}, + "queryString":{"shape":"QueryDefinitionString"}, "clientToken":{ "shape":"ClientToken", - "documentation":"

Used as an idempotency token, to avoid returning an exception if the service receives the same request twice because of a network error.

", "idempotencyToken":true } } @@ -2687,32 +2369,20 @@ "PutQueryDefinitionResponse":{ "type":"structure", "members":{ - "queryDefinitionId":{ - "shape":"QueryId", - "documentation":"

The ID of the query definition.

" - } + "queryDefinitionId":{"shape":"QueryId"} } }, "PutResourcePolicyRequest":{ "type":"structure", "members":{ - "policyName":{ - "shape":"PolicyName", - "documentation":"

Name of the new policy. This parameter is required.

" - }, - "policyDocument":{ - "shape":"PolicyDocument", - "documentation":"

Details of the new policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. This parameter is required.

The following example creates a resource policy enabling the Route 53 service to put DNS query logs in to the specified log group. Replace \"logArn\" with the ARN of your CloudWatch Logs resource, such as a log group or log stream.

CloudWatch Logs also supports aws:SourceArn and aws:SourceAccount condition context keys.

In the example resource policy, you would replace the value of SourceArn with the resource making the call from Route 53 to CloudWatch Logs. You would also replace the value of SourceAccount with the Amazon Web Services account ID making that call.

{ \"Version\": \"2012-10-17\", \"Statement\": [ { \"Sid\": \"Route53LogsToCloudWatchLogs\", \"Effect\": \"Allow\", \"Principal\": { \"Service\": [ \"route53.amazonaws.com\" ] }, \"Action\": \"logs:PutLogEvents\", \"Resource\": \"logArn\", \"Condition\": { \"ArnLike\": { \"aws:SourceArn\": \"myRoute53ResourceArn\" }, \"StringEquals\": { \"aws:SourceAccount\": \"myAwsAccountId\" } } } ] }

" - } + "policyName":{"shape":"PolicyName"}, + "policyDocument":{"shape":"PolicyDocument"} } }, "PutResourcePolicyResponse":{ "type":"structure", "members":{ - "resourcePolicy":{ - "shape":"ResourcePolicy", - "documentation":"

The new policy.

" - } + "resourcePolicy":{"shape":"ResourcePolicy"} } }, "PutRetentionPolicyRequest":{ @@ -2722,10 +2392,7 @@ "retentionInDays" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, + "logGroupName":{"shape":"LogGroupName"}, "retentionInDays":{"shape":"Days"} } }, @@ -2738,86 +2405,38 @@ "destinationArn" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "filterName":{ - "shape":"FilterName", - "documentation":"

A name for the subscription filter. If you are updating an existing filter, you must specify the correct name in filterName. To find the name of the filter currently associated with a log group, use DescribeSubscriptionFilters.

" - }, - "filterPattern":{ - "shape":"FilterPattern", - "documentation":"

A filter pattern for subscribing to a filtered stream of log events.

" - }, - "destinationArn":{ - "shape":"DestinationArn", - "documentation":"

The ARN of the destination to deliver matching log events to. Currently, the supported destinations are:

  • An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery.

  • A logical destination (specified using an ARN) belonging to a different account, for cross-account delivery.

    If you're setting up a cross-account subscription, the destination must have an IAM policy associated with it. The IAM policy must allow the sender to send logs to the destination. For more information, see PutDestinationPolicy.

  • A Kinesis Data Firehose delivery stream belonging to the same account as the subscription filter, for same-account delivery.

  • A Lambda function belonging to the same account as the subscription filter, for same-account delivery.

" - }, - "roleArn":{ - "shape":"RoleArn", - "documentation":"

The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log events to the destination stream. You don't need to provide the ARN when you are working with a logical destination for cross-account delivery.

" - }, - "distribution":{ - "shape":"Distribution", - "documentation":"

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 random for a more even distribution. This property is only applicable when the destination is an Amazon Kinesis data stream.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "filterName":{"shape":"FilterName"}, + "filterPattern":{"shape":"FilterPattern"}, + "destinationArn":{"shape":"DestinationArn"}, + "roleArn":{"shape":"RoleArn"}, + "distribution":{"shape":"Distribution"} } }, "QueryCharOffset":{"type":"integer"}, "QueryCompileError":{ "type":"structure", "members":{ - "location":{ - "shape":"QueryCompileErrorLocation", - "documentation":"

Reserved.

" - }, - "message":{ - "shape":"Message", - "documentation":"

Reserved.

" - } - }, - "documentation":"

Reserved.

" + "location":{"shape":"QueryCompileErrorLocation"}, + "message":{"shape":"Message"} + } }, "QueryCompileErrorLocation":{ "type":"structure", "members":{ - "startCharOffset":{ - "shape":"QueryCharOffset", - "documentation":"

Reserved.

" - }, - "endCharOffset":{ - "shape":"QueryCharOffset", - "documentation":"

Reserved.

" - } - }, - "documentation":"

Reserved.

" + "startCharOffset":{"shape":"QueryCharOffset"}, + "endCharOffset":{"shape":"QueryCharOffset"} + } }, "QueryDefinition":{ "type":"structure", "members":{ - "queryDefinitionId":{ - "shape":"QueryId", - "documentation":"

The unique ID of the query definition.

" - }, - "name":{ - "shape":"QueryDefinitionName", - "documentation":"

The name of the query definition.

" - }, - "queryString":{ - "shape":"QueryDefinitionString", - "documentation":"

The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax.

" - }, - "lastModified":{ - "shape":"Timestamp", - "documentation":"

The date that the query definition was most recently modified.

" - }, - "logGroupNames":{ - "shape":"LogGroupNames", - "documentation":"

If this query definition contains a list of log groups that it is limited to, that list appears here.

" - } - }, - "documentation":"

This structure contains details about a saved CloudWatch Logs Insights query definition.

" + "queryDefinitionId":{"shape":"QueryId"}, + "name":{"shape":"QueryDefinitionName"}, + "queryString":{"shape":"QueryDefinitionString"}, + "lastModified":{"shape":"Timestamp"}, + "logGroupNames":{"shape":"LogGroupNames"} + } }, "QueryDefinitionList":{ "type":"list", @@ -2841,28 +2460,12 @@ "QueryInfo":{ "type":"structure", "members":{ - "queryId":{ - "shape":"QueryId", - "documentation":"

The unique ID number of this query.

" - }, - "queryString":{ - "shape":"QueryString", - "documentation":"

The query string used in this query.

" - }, - "status":{ - "shape":"QueryStatus", - "documentation":"

The status of this query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, and Unknown.

" - }, - "createTime":{ - "shape":"Timestamp", - "documentation":"

The date and time that this query was created.

" - }, - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group scanned by this query.

" - } - }, - "documentation":"

Information about one CloudWatch Logs Insights query that matches the request in a DescribeQueries operation.

" + "queryId":{"shape":"QueryId"}, + "queryString":{"shape":"QueryString"}, + "status":{"shape":"QueryStatus"}, + "createTime":{"shape":"Timestamp"}, + "logGroupName":{"shape":"LogGroupName"} + } }, "QueryInfoList":{ "type":"list", @@ -2880,20 +2483,10 @@ "QueryStatistics":{ "type":"structure", "members":{ - "recordsMatched":{ - "shape":"StatsValue", - "documentation":"

The number of log events that matched the query string.

" - }, - "recordsScanned":{ - "shape":"StatsValue", - "documentation":"

The total number of log events scanned during the query.

" - }, - "bytesScanned":{ - "shape":"StatsValue", - "documentation":"

The total number of bytes in the log events scanned during the query.

" - } - }, - "documentation":"

Contains the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the log events that were scanned.

" + "recordsMatched":{"shape":"StatsValue"}, + "recordsScanned":{"shape":"StatsValue"}, + "bytesScanned":{"shape":"StatsValue"} + } }, "QueryStatus":{ "type":"string", @@ -2915,33 +2508,21 @@ "RejectedLogEventsInfo":{ "type":"structure", "members":{ - "tooNewLogEventStartIndex":{ - "shape":"LogEventIndex", - "documentation":"

The log events that are too new.

" - }, - "tooOldLogEventEndIndex":{ - "shape":"LogEventIndex", - "documentation":"

The log events that are dated too far in the past.

" - }, - "expiredLogEventEndIndex":{ - "shape":"LogEventIndex", - "documentation":"

The expired log events.

" - } - }, - "documentation":"

Represents the rejected events.

" - }, - "RequestId":{ - "type":"string", - "max":256, - "min":0 + "tooNewLogEventStartIndex":{"shape":"LogEventIndex"}, + "tooOldLogEventEndIndex":{"shape":"LogEventIndex"}, + "expiredLogEventEndIndex":{"shape":"LogEventIndex"} + } }, "ResourceAlreadyExistsException":{ "type":"structure", "members":{ }, - "documentation":"

The specified resource already exists.

", "exception":true }, + "ResourceArns":{ + "type":"list", + "member":{"shape":"Arn"} + }, "ResourceIdentifier":{ "type":"string", "max":2048, @@ -2952,7 +2533,6 @@ "type":"structure", "members":{ }, - "documentation":"

The specified resource does not exist.

", "exception":true }, "ResourcePolicies":{ @@ -2962,34 +2542,17 @@ "ResourcePolicy":{ "type":"structure", "members":{ - "policyName":{ - "shape":"PolicyName", - "documentation":"

The name of the resource policy.

" - }, - "policyDocument":{ - "shape":"PolicyDocument", - "documentation":"

The details of the policy.

" - }, - "lastUpdatedTime":{ - "shape":"Timestamp", - "documentation":"

Timestamp showing when this policy was last updated, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - } - }, - "documentation":"

A policy enabling one or more entities to put logs to a log group in this account.

" + "policyName":{"shape":"PolicyName"}, + "policyDocument":{"shape":"PolicyDocument"}, + "lastUpdatedTime":{"shape":"Timestamp"} + } }, "ResultField":{ "type":"structure", "members":{ - "field":{ - "shape":"Field", - "documentation":"

The log event field.

" - }, - "value":{ - "shape":"Value", - "documentation":"

The value of this field.

" - } - }, - "documentation":"

Contains one field from one log event returned by a CloudWatch Logs Insights query, along with the value of that field.

For more information about the fields that are generated by CloudWatch logs, see Supported Logs and Discovered Fields.

" + "field":{"shape":"Field"}, + "value":{"shape":"Value"} + } }, "ResultRows":{ "type":"list", @@ -3006,16 +2569,9 @@ "SearchedLogStream":{ "type":"structure", "members":{ - "logStreamName":{ - "shape":"LogStreamName", - "documentation":"

The name of the log stream.

" - }, - "searchedCompletely":{ - "shape":"LogStreamSearchedCompletely", - "documentation":"

Indicates whether all the events in this log stream were searched.

" - } - }, - "documentation":"

Represents the search status of a log stream.

" + "logStreamName":{"shape":"LogStreamName"}, + "searchedCompletely":{"shape":"LogStreamSearchedCompletely"} + } }, "SearchedLogStreams":{ "type":"list", @@ -3025,34 +2581,24 @@ "type":"string", "min":1 }, - "ServiceUnavailableException":{ - "type":"structure", - "members":{ - }, - "documentation":"

The service cannot complete the request.

", - "exception":true, - "fault":true - }, - "SessionId":{ + "Service":{ "type":"string", - "max":256, - "min":0 + "max":255, + "min":1, + "pattern":"[\\w]*" }, - "SessionStreamingException":{ + "ServiceQuotaExceededException":{ "type":"structure", "members":{ - "message":{"shape":"Message"} }, - "documentation":"

To Be Written

", "exception":true }, - "SessionTimeoutException":{ + "ServiceUnavailableException":{ "type":"structure", "members":{ - "message":{"shape":"Message"} }, - "documentation":"

To Be Written

", - "exception":true + "exception":true, + "fault":true }, "StandardUnit":{ "type":"string", @@ -3087,63 +2633,6 @@ ] }, "StartFromHead":{"type":"boolean"}, - "StartLiveTailLogGroupIdentifiers":{ - "type":"list", - "member":{"shape":"LogGroupIdentifier"}, - "max":10, - "min":1 - }, - "StartLiveTailRequest":{ - "type":"structure", - "required":["logGroupIdentifiers"], - "members":{ - "logGroupIdentifiers":{ - "shape":"StartLiveTailLogGroupIdentifiers", - "documentation":"

To Be Written

" - }, - "logStreamNames":{ - "shape":"InputLogStreamNames", - "documentation":"

To Be Written

" - }, - "logStreamNamePrefixes":{ - "shape":"InputLogStreamNames", - "documentation":"

To Be Written

" - }, - "logEventFilterPattern":{"shape":"FilterPattern"} - } - }, - "StartLiveTailResponse":{ - "type":"structure", - "members":{ - "responseStream":{ - "shape":"StartLiveTailResponseStream", - "documentation":"

To Be Written

" - } - } - }, - "StartLiveTailResponseStream":{ - "type":"structure", - "members":{ - "sessionStart":{ - "shape":"LiveTailSessionStart", - "documentation":"

To Be Written

" - }, - "sessionUpdate":{ - "shape":"LiveTailSessionUpdate", - "documentation":"

To Be Written

" - }, - "SessionTimeoutException":{ - "shape":"SessionTimeoutException", - "documentation":"

To Be Written

" - }, - "SessionStreamingException":{ - "shape":"SessionStreamingException", - "documentation":"

To Be Written

" - } - }, - "documentation":"

To Be Written

", - "eventstream":true - }, "StartQueryRequest":{ "type":"structure", "required":[ @@ -3152,43 +2641,19 @@ "queryString" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The log group on which to perform the query.

A StartQuery operation must include exactly one of the following parameters: logGroupName, logGroupNames, or logGroupIdentifiers.

" - }, - "logGroupNames":{ - "shape":"LogGroupNames", - "documentation":"

The list of log groups to be queried. You can include up to 50 log groups.

A StartQuery operation must include exactly one of the following parameters: logGroupName, logGroupNames, or logGroupIdentifiers.

" - }, - "logGroupIdentifiers":{ - "shape":"LogGroupIdentifiers", - "documentation":"

The list of log groups to query. You can include up to 50 log groups.

You can specify them by the log group name or ARN. If a log group that you're querying is in a source account and you're using a monitoring account, you must specify the ARN of the log group here. The query definition must also be defined in the monitoring account.

If you specify an ARN, the ARN can't end with an asterisk (*).

A StartQuery operation must include exactly one of the following parameters: logGroupName, logGroupNames, or logGroupIdentifiers.

" - }, - "startTime":{ - "shape":"Timestamp", - "documentation":"

The beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

" - }, - "endTime":{ - "shape":"Timestamp", - "documentation":"

The end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.

" - }, - "queryString":{ - "shape":"QueryString", - "documentation":"

The query string to use. For more information, see CloudWatch Logs Insights Query Syntax.

" - }, - "limit":{ - "shape":"EventsLimit", - "documentation":"

The maximum number of log events to return in the query. If the query string uses the fields command, only the specified fields and their values are returned. The default is 1000.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "logGroupNames":{"shape":"LogGroupNames"}, + "logGroupIdentifiers":{"shape":"LogGroupIdentifiers"}, + "startTime":{"shape":"Timestamp"}, + "endTime":{"shape":"Timestamp"}, + "queryString":{"shape":"QueryString"}, + "limit":{"shape":"EventsLimit"} } }, "StartQueryResponse":{ "type":"structure", "members":{ - "queryId":{ - "shape":"QueryId", - "documentation":"

The unique ID of the query.

" - } + "queryId":{"shape":"QueryId"} } }, "StatsValue":{"type":"double"}, @@ -3196,19 +2661,13 @@ "type":"structure", "required":["queryId"], "members":{ - "queryId":{ - "shape":"QueryId", - "documentation":"

The ID number of the query to stop. To find this ID number, use DescribeQueries.

" - } + "queryId":{"shape":"QueryId"} } }, "StopQueryResponse":{ "type":"structure", "members":{ - "success":{ - "shape":"Success", - "documentation":"

This is true if the query was stopped by the StopQuery operation.

" - } + "success":{"shape":"Success"} } }, "StoredBytes":{ @@ -3218,30 +2677,14 @@ "SubscriptionFilter":{ "type":"structure", "members":{ - "filterName":{ - "shape":"FilterName", - "documentation":"

The name of the subscription filter.

" - }, - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, + "filterName":{"shape":"FilterName"}, + "logGroupName":{"shape":"LogGroupName"}, "filterPattern":{"shape":"FilterPattern"}, - "destinationArn":{ - "shape":"DestinationArn", - "documentation":"

The Amazon Resource Name (ARN) of the destination.

" - }, - "roleArn":{ - "shape":"RoleArn", - "documentation":"

" - }, + "destinationArn":{"shape":"DestinationArn"}, + "roleArn":{"shape":"RoleArn"}, "distribution":{"shape":"Distribution"}, - "creationTime":{ - "shape":"Timestamp", - "documentation":"

The creation time of the subscription filter, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

" - } - }, - "documentation":"

Represents a subscription filter.

" + "creationTime":{"shape":"Timestamp"} + } }, "SubscriptionFilters":{ "type":"list", @@ -3272,14 +2715,8 @@ "tags" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "tags":{ - "shape":"Tags", - "documentation":"

The key-value pairs to use for the tags.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "tags":{"shape":"Tags"} }, "deprecated":true, "deprecatedMessage":"Please use the generic tagging API model TagResourceRequest" @@ -3291,14 +2728,8 @@ "tags" ], "members":{ - "resourceArn":{ - "shape":"AmazonResourceName", - "documentation":"

The ARN of the resource that you're adding tags to.

The ARN format of a log group is arn:aws:logs:Region:account-id:log-group:log-group-name

The ARN format of a destination is arn:aws:logs:Region:account-id:destination:destination-name

For more information about ARN format, see CloudWatch Logs resources and operations.

" - }, - "tags":{ - "shape":"Tags", - "documentation":"

The list of key-value pairs to associate with the resource.

" - } + "resourceArn":{"shape":"AmazonResourceName"}, + "tags":{"shape":"Tags"} } }, "TagValue":{ @@ -3331,21 +2762,21 @@ ], "members":{ "filterPattern":{"shape":"FilterPattern"}, - "logEventMessages":{ - "shape":"TestEventMessages", - "documentation":"

The log event messages to test.

" - } + "logEventMessages":{"shape":"TestEventMessages"} } }, "TestMetricFilterResponse":{ "type":"structure", "members":{ - "matches":{ - "shape":"MetricFilterMatches", - "documentation":"

The matched events.

" - } + "matches":{"shape":"MetricFilterMatches"} } }, + "ThrottlingException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, "Timestamp":{ "type":"long", "min":0 @@ -3355,12 +2786,8 @@ "type":"structure", "members":{ "message":{"shape":"Message"}, - "resourceName":{ - "shape":"AmazonResourceName", - "documentation":"

The name of the resource.

" - } + "resourceName":{"shape":"AmazonResourceName"} }, - "documentation":"

A resource can have no more than 50 tags.

", "exception":true }, "Unmask":{"type":"boolean"}, @@ -3368,7 +2795,6 @@ "type":"structure", "members":{ }, - "documentation":"

The most likely cause is an Amazon Web Services access key ID or secret key that's not valid.

", "exception":true }, "UntagLogGroupRequest":{ @@ -3378,14 +2804,8 @@ "tags" ], "members":{ - "logGroupName":{ - "shape":"LogGroupName", - "documentation":"

The name of the log group.

" - }, - "tags":{ - "shape":"TagList", - "documentation":"

The tag keys. The corresponding tags are removed from the log group.

" - } + "logGroupName":{"shape":"LogGroupName"}, + "tags":{"shape":"TagList"} }, "deprecated":true, "deprecatedMessage":"Please use the generic tagging API model UntagResourceRequest" @@ -3397,17 +2817,16 @@ "tagKeys" ], "members":{ - "resourceArn":{ - "shape":"AmazonResourceName", - "documentation":"

The ARN of the CloudWatch Logs resource that you're removing tags from.

The ARN format of a log group is arn:aws:logs:Region:account-id:log-group:log-group-name

The ARN format of a destination is arn:aws:logs:Region:account-id:destination:destination-name

For more information about ARN format, see CloudWatch Logs resources and operations.

" - }, - "tagKeys":{ - "shape":"TagKeyList", - "documentation":"

The list of tag keys to remove from the resource.

" - } + "resourceArn":{"shape":"AmazonResourceName"}, + "tagKeys":{"shape":"TagKeyList"} } }, + "ValidationException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, "Value":{"type":"string"} - }, - "documentation":"

You can use Amazon CloudWatch Logs to monitor, store, and access your log files from EC2 instances, CloudTrail, and other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch console. Alternatively, you can use CloudWatch Logs commands in the Amazon Web Services CLI, CloudWatch Logs API, or CloudWatch Logs SDK.

You can use CloudWatch Logs to:

  • Monitor logs from EC2 instances in real time: You can use CloudWatch Logs to monitor applications and systems using log data. For example, CloudWatch Logs can track the number of errors that occur in your application logs. Then, it can send you a notification whenever the rate of errors exceeds a threshold that you specify. CloudWatch Logs uses your log data for monitoring so no code changes are required. For example, you can monitor application logs for specific literal terms (such as \"NullReferenceException\"). You can also count the number of occurrences of a literal term at a particular position in log data (such as \"404\" status codes in an Apache access log). When the term you are searching for is found, CloudWatch Logs reports the data to a CloudWatch metric that you specify.

  • Monitor CloudTrail logged events: You can create alarms in CloudWatch and receive notifications of particular API activity as captured by CloudTrail. You can use the notification to perform troubleshooting.

  • Archive log data: You can use CloudWatch Logs to store your log data in highly durable storage. You can change the log retention setting so that any log events earlier than this setting are automatically deleted. The CloudWatch Logs agent helps to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it.

" + } } diff --git a/service/cloudwatchlogs/api.go b/service/cloudwatchlogs/api.go index aec7a26108b..3016b7fd3b7 100644 --- a/service/cloudwatchlogs/api.go +++ b/service/cloudwatchlogs/api.go @@ -3,22 +3,13 @@ package cloudwatchlogs import ( - "bytes" "fmt" - "io" - "sync" - "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/eventstream" - "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi" "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" - "github.com/aws/aws-sdk-go/private/protocol/rest" ) const opAssociateKmsKey = "AssociateKmsKey" @@ -244,6 +235,138 @@ func (c *CloudWatchLogs) CancelExportTaskWithContext(ctx aws.Context, input *Can return out, req.Send() } +const opCreateDelivery = "CreateDelivery" + +// CreateDeliveryRequest generates a "aws/request.Request" representing the +// client's request for the CreateDelivery operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDelivery for more information on using the CreateDelivery +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the CreateDeliveryRequest method. +// req, resp := client.CreateDeliveryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateDelivery +func (c *CloudWatchLogs) CreateDeliveryRequest(input *CreateDeliveryInput) (req *request.Request, output *CreateDeliveryOutput) { + op := &request.Operation{ + Name: opCreateDelivery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDeliveryInput{} + } + + output = &CreateDeliveryOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDelivery API operation for Amazon CloudWatch Logs. +// +// Creates a delivery. A delivery is a connection between a logical delivery +// source and a logical delivery destination that you have already created. +// +// Only some Amazon Web Services services support being configured as a delivery +// source using this operation. These services are listed as Supported [V2 Permissions] +// in the table at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ +// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) +// +// A delivery destination can represent a log group in CloudWatch Logs, an Amazon +// S3 bucket, or a delivery stream in Kinesis Data Firehose. +// +// To configure logs delivery between a supported Amazon Web Services service +// and a destination, you must do the following: +// +// - Create a delivery source, which is a logical object that represents +// the resource that is actually sending the logs. For more information, +// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). +// +// - Create a delivery destination, which is a logical object that represents +// the actual delivery destination. For more information, see PutDeliveryDestination +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). +// +// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) +// in the destination account to assign an IAM policy to the destination. +// This policy allows delivery to that destination. +// +// - Use CreateDelivery to create a delivery by pairing exactly one delivery +// source and one delivery destination. +// +// You can configure a single delivery source to send logs to multiple destinations +// by creating multiple deliveries. You can also create multiple deliveries +// to configure multiple delivery sources to send logs to the same delivery +// destination. +// +// You can't update an existing delivery. You can only create and delete deliveries. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation CreateDelivery for usage and error information. +// +// Returned Error Types: +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// - ConflictException +// This operation attempted to create a resource that already exists. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - ValidationException +// One of the parameters for the request is not valid. +// +// - AccessDeniedException +// You don't have sufficient permissions to perform this action. +// +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateDelivery +func (c *CloudWatchLogs) CreateDelivery(input *CreateDeliveryInput) (*CreateDeliveryOutput, error) { + req, out := c.CreateDeliveryRequest(input) + return out, req.Send() +} + +// CreateDeliveryWithContext is the same as CreateDelivery with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDelivery for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) CreateDeliveryWithContext(ctx aws.Context, input *CreateDeliveryInput, opts ...request.Option) (*CreateDeliveryOutput, error) { + req, out := c.CreateDeliveryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateExportTask = "CreateExportTask" // CreateExportTaskRequest generates a "aws/request.Request" representing the @@ -769,423 +892,450 @@ func (c *CloudWatchLogs) DeleteDataProtectionPolicyWithContext(ctx aws.Context, return out, req.Send() } -const opDeleteDestination = "DeleteDestination" +const opDeleteDelivery = "DeleteDelivery" -// DeleteDestinationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDestination operation. The "output" return +// DeleteDeliveryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDelivery operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteDestination for more information on using the DeleteDestination +// See DeleteDelivery for more information on using the DeleteDelivery // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteDestinationRequest method. -// req, resp := client.DeleteDestinationRequest(params) +// // Example sending a request using the DeleteDeliveryRequest method. +// req, resp := client.DeleteDeliveryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination -func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDelivery +func (c *CloudWatchLogs) DeleteDeliveryRequest(input *DeleteDeliveryInput) (req *request.Request, output *DeleteDeliveryOutput) { op := &request.Operation{ - Name: opDeleteDestination, + Name: opDeleteDelivery, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDestinationInput{} + input = &DeleteDeliveryInput{} } - output = &DeleteDestinationOutput{} + output = &DeleteDeliveryOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteDestination API operation for Amazon CloudWatch Logs. +// DeleteDelivery API operation for Amazon CloudWatch Logs. // -// Deletes the specified destination, and eventually disables all the subscription -// filters that publish to it. This operation does not delete the physical resource -// encapsulated by the destination. +// Deletes s delivery. A delivery is a connection between a logical delivery +// source and a logical delivery destination. Deleting a delivery only deletes +// the connection between the delivery source and delivery destination. It does +// not delete the delivery destination or the delivery source. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteDestination for usage and error information. +// API operation DeleteDelivery for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination -func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) { - req, out := c.DeleteDestinationRequest(input) +// - ConflictException +// This operation attempted to create a resource that already exists. +// +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDelivery +func (c *CloudWatchLogs) DeleteDelivery(input *DeleteDeliveryInput) (*DeleteDeliveryOutput, error) { + req, out := c.DeleteDeliveryRequest(input) return out, req.Send() } -// DeleteDestinationWithContext is the same as DeleteDestination with the addition of +// DeleteDeliveryWithContext is the same as DeleteDelivery with the addition of // the ability to pass a context and additional request options. // -// See DeleteDestination for details on how to use this API operation. +// See DeleteDelivery for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteDestinationWithContext(ctx aws.Context, input *DeleteDestinationInput, opts ...request.Option) (*DeleteDestinationOutput, error) { - req, out := c.DeleteDestinationRequest(input) +func (c *CloudWatchLogs) DeleteDeliveryWithContext(ctx aws.Context, input *DeleteDeliveryInput, opts ...request.Option) (*DeleteDeliveryOutput, error) { + req, out := c.DeleteDeliveryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteLogGroup = "DeleteLogGroup" +const opDeleteDeliveryDestination = "DeleteDeliveryDestination" -// DeleteLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLogGroup operation. The "output" return +// DeleteDeliveryDestinationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDeliveryDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteLogGroup for more information on using the DeleteLogGroup +// See DeleteDeliveryDestination for more information on using the DeleteDeliveryDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteLogGroupRequest method. -// req, resp := client.DeleteLogGroupRequest(params) +// // Example sending a request using the DeleteDeliveryDestinationRequest method. +// req, resp := client.DeleteDeliveryDestinationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup -func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestination +func (c *CloudWatchLogs) DeleteDeliveryDestinationRequest(input *DeleteDeliveryDestinationInput) (req *request.Request, output *DeleteDeliveryDestinationOutput) { op := &request.Operation{ - Name: opDeleteLogGroup, + Name: opDeleteDeliveryDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteLogGroupInput{} + input = &DeleteDeliveryDestinationInput{} } - output = &DeleteLogGroupOutput{} + output = &DeleteDeliveryDestinationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteLogGroup API operation for Amazon CloudWatch Logs. +// DeleteDeliveryDestination API operation for Amazon CloudWatch Logs. // -// Deletes the specified log group and permanently deletes all the archived -// log events associated with the log group. +// Deletes a delivery destination. A delivery is a connection between a logical +// delivery source and a logical delivery destination. +// +// You can't delete a delivery destination if any current deliveries are associated +// with it. To find whether any deliveries are associated with this delivery +// destination, use the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) +// operation and check the deliveryDestinationArn field in the results. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteLogGroup for usage and error information. +// API operation DeleteDeliveryDestination for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup -func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) { - req, out := c.DeleteLogGroupRequest(input) +// - ConflictException +// This operation attempted to create a resource that already exists. +// +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestination +func (c *CloudWatchLogs) DeleteDeliveryDestination(input *DeleteDeliveryDestinationInput) (*DeleteDeliveryDestinationOutput, error) { + req, out := c.DeleteDeliveryDestinationRequest(input) return out, req.Send() } -// DeleteLogGroupWithContext is the same as DeleteLogGroup with the addition of +// DeleteDeliveryDestinationWithContext is the same as DeleteDeliveryDestination with the addition of // the ability to pass a context and additional request options. // -// See DeleteLogGroup for details on how to use this API operation. +// See DeleteDeliveryDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteLogGroupWithContext(ctx aws.Context, input *DeleteLogGroupInput, opts ...request.Option) (*DeleteLogGroupOutput, error) { - req, out := c.DeleteLogGroupRequest(input) +func (c *CloudWatchLogs) DeleteDeliveryDestinationWithContext(ctx aws.Context, input *DeleteDeliveryDestinationInput, opts ...request.Option) (*DeleteDeliveryDestinationOutput, error) { + req, out := c.DeleteDeliveryDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteLogStream = "DeleteLogStream" +const opDeleteDeliveryDestinationPolicy = "DeleteDeliveryDestinationPolicy" -// DeleteLogStreamRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLogStream operation. The "output" return +// DeleteDeliveryDestinationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDeliveryDestinationPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteLogStream for more information on using the DeleteLogStream +// See DeleteDeliveryDestinationPolicy for more information on using the DeleteDeliveryDestinationPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteLogStreamRequest method. -// req, resp := client.DeleteLogStreamRequest(params) +// // Example sending a request using the DeleteDeliveryDestinationPolicyRequest method. +// req, resp := client.DeleteDeliveryDestinationPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream -func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestinationPolicy +func (c *CloudWatchLogs) DeleteDeliveryDestinationPolicyRequest(input *DeleteDeliveryDestinationPolicyInput) (req *request.Request, output *DeleteDeliveryDestinationPolicyOutput) { op := &request.Operation{ - Name: opDeleteLogStream, + Name: opDeleteDeliveryDestinationPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteLogStreamInput{} + input = &DeleteDeliveryDestinationPolicyInput{} } - output = &DeleteLogStreamOutput{} + output = &DeleteDeliveryDestinationPolicyOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteLogStream API operation for Amazon CloudWatch Logs. +// DeleteDeliveryDestinationPolicy API operation for Amazon CloudWatch Logs. // -// Deletes the specified log stream and permanently deletes all the archived -// log events associated with the log stream. +// Deletes a delivery destination policy. For more information about these policies, +// see PutDeliveryDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteLogStream for usage and error information. +// API operation DeleteDeliveryDestinationPolicy for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. +// - ServiceUnavailableException +// The service cannot complete the request. +// +// - ValidationException +// One of the parameters for the request is not valid. // // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// -// - ServiceUnavailableException -// The service cannot complete the request. +// - ConflictException +// This operation attempted to create a resource that already exists. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream -func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) { - req, out := c.DeleteLogStreamRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestinationPolicy +func (c *CloudWatchLogs) DeleteDeliveryDestinationPolicy(input *DeleteDeliveryDestinationPolicyInput) (*DeleteDeliveryDestinationPolicyOutput, error) { + req, out := c.DeleteDeliveryDestinationPolicyRequest(input) return out, req.Send() } -// DeleteLogStreamWithContext is the same as DeleteLogStream with the addition of +// DeleteDeliveryDestinationPolicyWithContext is the same as DeleteDeliveryDestinationPolicy with the addition of // the ability to pass a context and additional request options. // -// See DeleteLogStream for details on how to use this API operation. +// See DeleteDeliveryDestinationPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteLogStreamWithContext(ctx aws.Context, input *DeleteLogStreamInput, opts ...request.Option) (*DeleteLogStreamOutput, error) { - req, out := c.DeleteLogStreamRequest(input) +func (c *CloudWatchLogs) DeleteDeliveryDestinationPolicyWithContext(ctx aws.Context, input *DeleteDeliveryDestinationPolicyInput, opts ...request.Option) (*DeleteDeliveryDestinationPolicyOutput, error) { + req, out := c.DeleteDeliveryDestinationPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteMetricFilter = "DeleteMetricFilter" +const opDeleteDeliverySource = "DeleteDeliverySource" -// DeleteMetricFilterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMetricFilter operation. The "output" return +// DeleteDeliverySourceRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDeliverySource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteMetricFilter for more information on using the DeleteMetricFilter +// See DeleteDeliverySource for more information on using the DeleteDeliverySource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteMetricFilterRequest method. -// req, resp := client.DeleteMetricFilterRequest(params) +// // Example sending a request using the DeleteDeliverySourceRequest method. +// req, resp := client.DeleteDeliverySourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter -func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliverySource +func (c *CloudWatchLogs) DeleteDeliverySourceRequest(input *DeleteDeliverySourceInput) (req *request.Request, output *DeleteDeliverySourceOutput) { op := &request.Operation{ - Name: opDeleteMetricFilter, + Name: opDeleteDeliverySource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteMetricFilterInput{} + input = &DeleteDeliverySourceInput{} } - output = &DeleteMetricFilterOutput{} + output = &DeleteDeliverySourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteMetricFilter API operation for Amazon CloudWatch Logs. +// DeleteDeliverySource API operation for Amazon CloudWatch Logs. // -// Deletes the specified metric filter. +// Deletes a delivery source. A delivery is a connection between a logical delivery +// source and a logical delivery destination. +// +// You can't delete a delivery source if any current deliveries are associated +// with it. To find whether any deliveries are associated with this delivery +// source, use the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) +// operation and check the deliverySourceName field in the results. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteMetricFilter for usage and error information. +// API operation DeleteDeliverySource for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter -func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) { - req, out := c.DeleteMetricFilterRequest(input) +// - ConflictException +// This operation attempted to create a resource that already exists. +// +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliverySource +func (c *CloudWatchLogs) DeleteDeliverySource(input *DeleteDeliverySourceInput) (*DeleteDeliverySourceOutput, error) { + req, out := c.DeleteDeliverySourceRequest(input) return out, req.Send() } -// DeleteMetricFilterWithContext is the same as DeleteMetricFilter with the addition of +// DeleteDeliverySourceWithContext is the same as DeleteDeliverySource with the addition of // the ability to pass a context and additional request options. // -// See DeleteMetricFilter for details on how to use this API operation. +// See DeleteDeliverySource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *DeleteMetricFilterInput, opts ...request.Option) (*DeleteMetricFilterOutput, error) { - req, out := c.DeleteMetricFilterRequest(input) +func (c *CloudWatchLogs) DeleteDeliverySourceWithContext(ctx aws.Context, input *DeleteDeliverySourceInput, opts ...request.Option) (*DeleteDeliverySourceOutput, error) { + req, out := c.DeleteDeliverySourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteQueryDefinition = "DeleteQueryDefinition" +const opDeleteDestination = "DeleteDestination" -// DeleteQueryDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteQueryDefinition operation. The "output" return +// DeleteDestinationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteQueryDefinition for more information on using the DeleteQueryDefinition +// See DeleteDestination for more information on using the DeleteDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteQueryDefinitionRequest method. -// req, resp := client.DeleteQueryDefinitionRequest(params) +// // Example sending a request using the DeleteDestinationRequest method. +// req, resp := client.DeleteDestinationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition -func (c *CloudWatchLogs) DeleteQueryDefinitionRequest(input *DeleteQueryDefinitionInput) (req *request.Request, output *DeleteQueryDefinitionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination +func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput) { op := &request.Operation{ - Name: opDeleteQueryDefinition, + Name: opDeleteDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteQueryDefinitionInput{} + input = &DeleteDestinationInput{} } - output = &DeleteQueryDefinitionOutput{} + output = &DeleteDestinationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteQueryDefinition API operation for Amazon CloudWatch Logs. -// -// Deletes a saved CloudWatch Logs Insights query definition. A query definition -// contains details about a saved CloudWatch Logs Insights query. -// -// Each DeleteQueryDefinition operation can delete one query definition. +// DeleteDestination API operation for Amazon CloudWatch Logs. // -// You must have the logs:DeleteQueryDefinition permission to be able to perform -// this operation. +// Deletes the specified destination, and eventually disables all the subscription +// filters that publish to it. This operation does not delete the physical resource +// encapsulated by the destination. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteQueryDefinition for usage and error information. +// API operation DeleteDestination for usage and error information. // // Returned Error Types: // @@ -1195,84 +1345,87 @@ func (c *CloudWatchLogs) DeleteQueryDefinitionRequest(input *DeleteQueryDefiniti // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition -func (c *CloudWatchLogs) DeleteQueryDefinition(input *DeleteQueryDefinitionInput) (*DeleteQueryDefinitionOutput, error) { - req, out := c.DeleteQueryDefinitionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination +func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error) { + req, out := c.DeleteDestinationRequest(input) return out, req.Send() } -// DeleteQueryDefinitionWithContext is the same as DeleteQueryDefinition with the addition of +// DeleteDestinationWithContext is the same as DeleteDestination with the addition of // the ability to pass a context and additional request options. // -// See DeleteQueryDefinition for details on how to use this API operation. +// See DeleteDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteQueryDefinitionWithContext(ctx aws.Context, input *DeleteQueryDefinitionInput, opts ...request.Option) (*DeleteQueryDefinitionOutput, error) { - req, out := c.DeleteQueryDefinitionRequest(input) +func (c *CloudWatchLogs) DeleteDestinationWithContext(ctx aws.Context, input *DeleteDestinationInput, opts ...request.Option) (*DeleteDestinationOutput, error) { + req, out := c.DeleteDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteResourcePolicy = "DeleteResourcePolicy" +const opDeleteLogGroup = "DeleteLogGroup" -// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResourcePolicy operation. The "output" return +// DeleteLogGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLogGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy +// See DeleteLogGroup for more information on using the DeleteLogGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteResourcePolicyRequest method. -// req, resp := client.DeleteResourcePolicyRequest(params) +// // Example sending a request using the DeleteLogGroupRequest method. +// req, resp := client.DeleteLogGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy -func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup +func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput) { op := &request.Operation{ - Name: opDeleteResourcePolicy, + Name: opDeleteLogGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteResourcePolicyInput{} + input = &DeleteLogGroupInput{} } - output = &DeleteResourcePolicyOutput{} + output = &DeleteLogGroupOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteResourcePolicy API operation for Amazon CloudWatch Logs. +// DeleteLogGroup API operation for Amazon CloudWatch Logs. // -// Deletes a resource policy from this account. This revokes the access of the -// identities in that policy to put log events to this account. +// Deletes the specified log group and permanently deletes all the archived +// log events associated with the log group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteResourcePolicy for usage and error information. +// API operation DeleteLogGroup for usage and error information. // // Returned Error Types: // @@ -1282,86 +1435,87 @@ func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicy // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy -func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup +func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error) { + req, out := c.DeleteLogGroupRequest(input) return out, req.Send() } -// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of +// DeleteLogGroupWithContext is the same as DeleteLogGroup with the addition of // the ability to pass a context and additional request options. // -// See DeleteResourcePolicy for details on how to use this API operation. +// See DeleteLogGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { - req, out := c.DeleteResourcePolicyRequest(input) +func (c *CloudWatchLogs) DeleteLogGroupWithContext(ctx aws.Context, input *DeleteLogGroupInput, opts ...request.Option) (*DeleteLogGroupOutput, error) { + req, out := c.DeleteLogGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteRetentionPolicy = "DeleteRetentionPolicy" +const opDeleteLogStream = "DeleteLogStream" -// DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRetentionPolicy operation. The "output" return +// DeleteLogStreamRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLogStream operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy +// See DeleteLogStream for more information on using the DeleteLogStream // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteRetentionPolicyRequest method. -// req, resp := client.DeleteRetentionPolicyRequest(params) +// // Example sending a request using the DeleteLogStreamRequest method. +// req, resp := client.DeleteLogStreamRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy -func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream +func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput) { op := &request.Operation{ - Name: opDeleteRetentionPolicy, + Name: opDeleteLogStream, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteRetentionPolicyInput{} + input = &DeleteLogStreamInput{} } - output = &DeleteRetentionPolicyOutput{} + output = &DeleteLogStreamOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteRetentionPolicy API operation for Amazon CloudWatch Logs. -// -// Deletes the specified retention policy. +// DeleteLogStream API operation for Amazon CloudWatch Logs. // -// Log events do not expire if they belong to log groups without a retention -// policy. +// Deletes the specified log stream and permanently deletes all the archived +// log events associated with the log stream. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteRetentionPolicy for usage and error information. +// API operation DeleteLogStream for usage and error information. // // Returned Error Types: // @@ -1377,80 +1531,80 @@ func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPoli // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy -func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) { - req, out := c.DeleteRetentionPolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream +func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error) { + req, out := c.DeleteLogStreamRequest(input) return out, req.Send() } -// DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of +// DeleteLogStreamWithContext is the same as DeleteLogStream with the addition of // the ability to pass a context and additional request options. // -// See DeleteRetentionPolicy for details on how to use this API operation. +// See DeleteLogStream for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error) { - req, out := c.DeleteRetentionPolicyRequest(input) +func (c *CloudWatchLogs) DeleteLogStreamWithContext(ctx aws.Context, input *DeleteLogStreamInput, opts ...request.Option) (*DeleteLogStreamOutput, error) { + req, out := c.DeleteLogStreamRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter" +const opDeleteMetricFilter = "DeleteMetricFilter" -// DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSubscriptionFilter operation. The "output" return +// DeleteMetricFilterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteSubscriptionFilter for more information on using the DeleteSubscriptionFilter +// See DeleteMetricFilter for more information on using the DeleteMetricFilter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DeleteSubscriptionFilterRequest method. -// req, resp := client.DeleteSubscriptionFilterRequest(params) +// // Example sending a request using the DeleteMetricFilterRequest method. +// req, resp := client.DeleteMetricFilterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter -func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter +func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput) { op := &request.Operation{ - Name: opDeleteSubscriptionFilter, + Name: opDeleteMetricFilter, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteSubscriptionFilterInput{} + input = &DeleteMetricFilterInput{} } - output = &DeleteSubscriptionFilterOutput{} + output = &DeleteMetricFilterOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteSubscriptionFilter API operation for Amazon CloudWatch Logs. +// DeleteMetricFilter API operation for Amazon CloudWatch Logs. // -// Deletes the specified subscription filter. +// Deletes the specified metric filter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DeleteSubscriptionFilter for usage and error information. +// API operation DeleteMetricFilter for usage and error information. // // Returned Error Types: // @@ -1466,633 +1620,606 @@ func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscripti // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter -func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) { - req, out := c.DeleteSubscriptionFilterRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter +func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error) { + req, out := c.DeleteMetricFilterRequest(input) return out, req.Send() } -// DeleteSubscriptionFilterWithContext is the same as DeleteSubscriptionFilter with the addition of +// DeleteMetricFilterWithContext is the same as DeleteMetricFilter with the addition of // the ability to pass a context and additional request options. // -// See DeleteSubscriptionFilter for details on how to use this API operation. +// See DeleteMetricFilter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DeleteSubscriptionFilterWithContext(ctx aws.Context, input *DeleteSubscriptionFilterInput, opts ...request.Option) (*DeleteSubscriptionFilterOutput, error) { - req, out := c.DeleteSubscriptionFilterRequest(input) +func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *DeleteMetricFilterInput, opts ...request.Option) (*DeleteMetricFilterOutput, error) { + req, out := c.DeleteMetricFilterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeAccountPolicies = "DescribeAccountPolicies" +const opDeleteQueryDefinition = "DeleteQueryDefinition" -// DescribeAccountPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountPolicies operation. The "output" return +// DeleteQueryDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteQueryDefinition operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeAccountPolicies for more information on using the DescribeAccountPolicies +// See DeleteQueryDefinition for more information on using the DeleteQueryDefinition // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeAccountPoliciesRequest method. -// req, resp := client.DescribeAccountPoliciesRequest(params) +// // Example sending a request using the DeleteQueryDefinitionRequest method. +// req, resp := client.DeleteQueryDefinitionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies -func (c *CloudWatchLogs) DescribeAccountPoliciesRequest(input *DescribeAccountPoliciesInput) (req *request.Request, output *DescribeAccountPoliciesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition +func (c *CloudWatchLogs) DeleteQueryDefinitionRequest(input *DeleteQueryDefinitionInput) (req *request.Request, output *DeleteQueryDefinitionOutput) { op := &request.Operation{ - Name: opDescribeAccountPolicies, + Name: opDeleteQueryDefinition, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeAccountPoliciesInput{} + input = &DeleteQueryDefinitionInput{} } - output = &DescribeAccountPoliciesOutput{} + output = &DeleteQueryDefinitionOutput{} req = c.newRequest(op, input, output) return } -// DescribeAccountPolicies API operation for Amazon CloudWatch Logs. +// DeleteQueryDefinition API operation for Amazon CloudWatch Logs. // -// Returns a list of all CloudWatch Logs account policies in the account. +// Deletes a saved CloudWatch Logs Insights query definition. A query definition +// contains details about a saved CloudWatch Logs Insights query. +// +// Each DeleteQueryDefinition operation can delete one query definition. +// +// You must have the logs:DeleteQueryDefinition permission to be able to perform +// this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeAccountPolicies for usage and error information. +// API operation DeleteQueryDefinition for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies -func (c *CloudWatchLogs) DescribeAccountPolicies(input *DescribeAccountPoliciesInput) (*DescribeAccountPoliciesOutput, error) { - req, out := c.DescribeAccountPoliciesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition +func (c *CloudWatchLogs) DeleteQueryDefinition(input *DeleteQueryDefinitionInput) (*DeleteQueryDefinitionOutput, error) { + req, out := c.DeleteQueryDefinitionRequest(input) return out, req.Send() } -// DescribeAccountPoliciesWithContext is the same as DescribeAccountPolicies with the addition of +// DeleteQueryDefinitionWithContext is the same as DeleteQueryDefinition with the addition of // the ability to pass a context and additional request options. // -// See DescribeAccountPolicies for details on how to use this API operation. +// See DeleteQueryDefinition for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeAccountPoliciesWithContext(ctx aws.Context, input *DescribeAccountPoliciesInput, opts ...request.Option) (*DescribeAccountPoliciesOutput, error) { - req, out := c.DescribeAccountPoliciesRequest(input) +func (c *CloudWatchLogs) DeleteQueryDefinitionWithContext(ctx aws.Context, input *DeleteQueryDefinitionInput, opts ...request.Option) (*DeleteQueryDefinitionOutput, error) { + req, out := c.DeleteQueryDefinitionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeDestinations = "DescribeDestinations" +const opDeleteResourcePolicy = "DeleteResourcePolicy" -// DescribeDestinationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeDestinations operation. The "output" return +// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeDestinations for more information on using the DescribeDestinations +// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeDestinationsRequest method. -// req, resp := client.DescribeDestinationsRequest(params) +// // Example sending a request using the DeleteResourcePolicyRequest method. +// req, resp := client.DeleteResourcePolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations -func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy +func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { op := &request.Operation{ - Name: opDescribeDestinations, + Name: opDeleteResourcePolicy, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &DescribeDestinationsInput{} + input = &DeleteResourcePolicyInput{} } - output = &DescribeDestinationsOutput{} + output = &DeleteResourcePolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DescribeDestinations API operation for Amazon CloudWatch Logs. +// DeleteResourcePolicy API operation for Amazon CloudWatch Logs. // -// Lists all your destinations. The results are ASCII-sorted by destination -// name. +// Deletes a resource policy from this account. This revokes the access of the +// identities in that policy to put log events to this account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeDestinations for usage and error information. +// API operation DeleteResourcePolicy for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - ResourceNotFoundException +// The specified resource does not exist. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations -func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) { - req, out := c.DescribeDestinationsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy +func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) return out, req.Send() } -// DescribeDestinationsWithContext is the same as DescribeDestinations with the addition of +// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of // the ability to pass a context and additional request options. // -// See DescribeDestinations for details on how to use this API operation. +// See DeleteResourcePolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDestinationsWithContext(ctx aws.Context, input *DescribeDestinationsInput, opts ...request.Option) (*DescribeDestinationsOutput, error) { - req, out := c.DescribeDestinationsRequest(input) +func (c *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeDestinationsPages iterates over the pages of a DescribeDestinations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeDestinations method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeDestinations operation. -// pageNum := 0 -// err := client.DescribeDestinationsPages(params, -// func(page *cloudwatchlogs.DescribeDestinationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool) error { - return c.DescribeDestinationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeDestinationsPagesWithContext same as DescribeDestinationsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeDestinationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeDestinationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeExportTasks = "DescribeExportTasks" - -// DescribeExportTasksRequest generates a "aws/request.Request" representing the -// client's request for the DescribeExportTasks operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. +const opDeleteRetentionPolicy = "DeleteRetentionPolicy" + +// DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRetentionPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeExportTasks for more information on using the DescribeExportTasks +// See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeExportTasksRequest method. -// req, resp := client.DescribeExportTasksRequest(params) +// // Example sending a request using the DeleteRetentionPolicyRequest method. +// req, resp := client.DeleteRetentionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks -func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy +func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) { op := &request.Operation{ - Name: opDescribeExportTasks, + Name: opDeleteRetentionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeExportTasksInput{} + input = &DeleteRetentionPolicyInput{} } - output = &DescribeExportTasksOutput{} + output = &DeleteRetentionPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DescribeExportTasks API operation for Amazon CloudWatch Logs. +// DeleteRetentionPolicy API operation for Amazon CloudWatch Logs. // -// Lists the specified export tasks. You can list all your export tasks or filter -// the results based on task ID or task status. +// Deletes the specified retention policy. +// +// Log events do not expire if they belong to log groups without a retention +// policy. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeExportTasks for usage and error information. +// API operation DeleteRetentionPolicy for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks -func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) { - req, out := c.DescribeExportTasksRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy +func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) { + req, out := c.DeleteRetentionPolicyRequest(input) return out, req.Send() } -// DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of +// DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of // the ability to pass a context and additional request options. // -// See DescribeExportTasks for details on how to use this API operation. +// See DeleteRetentionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) { - req, out := c.DescribeExportTasksRequest(input) +func (c *CloudWatchLogs) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error) { + req, out := c.DeleteRetentionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeLogGroups = "DescribeLogGroups" +const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter" -// DescribeLogGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLogGroups operation. The "output" return +// DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSubscriptionFilter operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeLogGroups for more information on using the DescribeLogGroups +// See DeleteSubscriptionFilter for more information on using the DeleteSubscriptionFilter // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeLogGroupsRequest method. -// req, resp := client.DescribeLogGroupsRequest(params) +// // Example sending a request using the DeleteSubscriptionFilterRequest method. +// req, resp := client.DeleteSubscriptionFilterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups -func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter +func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput) { op := &request.Operation{ - Name: opDescribeLogGroups, + Name: opDeleteSubscriptionFilter, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &DescribeLogGroupsInput{} + input = &DeleteSubscriptionFilterInput{} } - output = &DescribeLogGroupsOutput{} + output = &DeleteSubscriptionFilterOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DescribeLogGroups API operation for Amazon CloudWatch Logs. -// -// Lists the specified log groups. You can list all your log groups or filter -// the results by prefix. The results are ASCII-sorted by log group name. -// -// CloudWatch Logs doesn’t support IAM policies that control access to the -// DescribeLogGroups action by using the aws:ResourceTag/key-name condition -// key. Other CloudWatch Logs actions do support the use of the aws:ResourceTag/key-name -// condition key to control access. For more information about using tags to -// control access, see Controlling access to Amazon Web Services resources using -// tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). +// DeleteSubscriptionFilter API operation for Amazon CloudWatch Logs. // -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// Deletes the specified subscription filter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeLogGroups for usage and error information. +// API operation DeleteSubscriptionFilter for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups -func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) { - req, out := c.DescribeLogGroupsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter +func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error) { + req, out := c.DeleteSubscriptionFilterRequest(input) return out, req.Send() } -// DescribeLogGroupsWithContext is the same as DescribeLogGroups with the addition of +// DeleteSubscriptionFilterWithContext is the same as DeleteSubscriptionFilter with the addition of // the ability to pass a context and additional request options. // -// See DescribeLogGroups for details on how to use this API operation. +// See DeleteSubscriptionFilter for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogGroupsWithContext(ctx aws.Context, input *DescribeLogGroupsInput, opts ...request.Option) (*DescribeLogGroupsOutput, error) { - req, out := c.DescribeLogGroupsRequest(input) +func (c *CloudWatchLogs) DeleteSubscriptionFilterWithContext(ctx aws.Context, input *DeleteSubscriptionFilterInput, opts ...request.Option) (*DeleteSubscriptionFilterOutput, error) { + req, out := c.DeleteSubscriptionFilterRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeLogGroupsPages iterates over the pages of a DescribeLogGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeLogGroups method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeLogGroups operation. -// pageNum := 0 -// err := client.DescribeLogGroupsPages(params, -// func(page *cloudwatchlogs.DescribeLogGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool) error { - return c.DescribeLogGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeLogGroupsPagesWithContext same as DescribeLogGroupsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLogGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLogGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeLogStreams = "DescribeLogStreams" +const opDescribeAccountPolicies = "DescribeAccountPolicies" -// DescribeLogStreamsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLogStreams operation. The "output" return +// DescribeAccountPoliciesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAccountPolicies operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeLogStreams for more information on using the DescribeLogStreams +// See DescribeAccountPolicies for more information on using the DescribeAccountPolicies // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeLogStreamsRequest method. -// req, resp := client.DescribeLogStreamsRequest(params) +// // Example sending a request using the DescribeAccountPoliciesRequest method. +// req, resp := client.DescribeAccountPoliciesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams -func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies +func (c *CloudWatchLogs) DescribeAccountPoliciesRequest(input *DescribeAccountPoliciesInput) (req *request.Request, output *DescribeAccountPoliciesOutput) { op := &request.Operation{ - Name: opDescribeLogStreams, + Name: opDescribeAccountPolicies, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &DescribeLogStreamsInput{} + input = &DescribeAccountPoliciesInput{} } - output = &DescribeLogStreamsOutput{} + output = &DescribeAccountPoliciesOutput{} req = c.newRequest(op, input, output) return } -// DescribeLogStreams API operation for Amazon CloudWatch Logs. +// DescribeAccountPolicies API operation for Amazon CloudWatch Logs. // -// Lists the log streams for the specified log group. You can list all the log -// streams or filter the results by prefix. You can also control how the results -// are ordered. -// -// You can specify the log group to search by using either logGroupIdentifier -// or logGroupName. You must include one of these two parameters, but you can't -// include both. -// -// This operation has a limit of five transactions per second, after which transactions -// are throttled. -// -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// Returns a list of all CloudWatch Logs account policies in the account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeLogStreams for usage and error information. +// API operation DescribeAccountPolicies for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams -func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) { - req, out := c.DescribeLogStreamsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies +func (c *CloudWatchLogs) DescribeAccountPolicies(input *DescribeAccountPoliciesInput) (*DescribeAccountPoliciesOutput, error) { + req, out := c.DescribeAccountPoliciesRequest(input) return out, req.Send() } -// DescribeLogStreamsWithContext is the same as DescribeLogStreams with the addition of +// DescribeAccountPoliciesWithContext is the same as DescribeAccountPolicies with the addition of // the ability to pass a context and additional request options. // -// See DescribeLogStreams for details on how to use this API operation. +// See DescribeAccountPolicies for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogStreamsWithContext(ctx aws.Context, input *DescribeLogStreamsInput, opts ...request.Option) (*DescribeLogStreamsOutput, error) { - req, out := c.DescribeLogStreamsRequest(input) +func (c *CloudWatchLogs) DescribeAccountPoliciesWithContext(ctx aws.Context, input *DescribeAccountPoliciesInput, opts ...request.Option) (*DescribeAccountPoliciesOutput, error) { + req, out := c.DescribeAccountPoliciesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeLogStreamsPages iterates over the pages of a DescribeLogStreams operation, +const opDescribeDeliveries = "DescribeDeliveries" + +// DescribeDeliveriesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDeliveries operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDeliveries for more information on using the DescribeDeliveries +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the DescribeDeliveriesRequest method. +// req, resp := client.DescribeDeliveriesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveries +func (c *CloudWatchLogs) DescribeDeliveriesRequest(input *DescribeDeliveriesInput) (req *request.Request, output *DescribeDeliveriesOutput) { + op := &request.Operation{ + Name: opDescribeDeliveries, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDeliveriesInput{} + } + + output = &DescribeDeliveriesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDeliveries API operation for Amazon CloudWatch Logs. +// +// Retrieves a list of the deliveries that have been created in the account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation DescribeDeliveries for usage and error information. +// +// Returned Error Types: +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveries +func (c *CloudWatchLogs) DescribeDeliveries(input *DescribeDeliveriesInput) (*DescribeDeliveriesOutput, error) { + req, out := c.DescribeDeliveriesRequest(input) + return out, req.Send() +} + +// DescribeDeliveriesWithContext is the same as DescribeDeliveries with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDeliveries for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) DescribeDeliveriesWithContext(ctx aws.Context, input *DescribeDeliveriesInput, opts ...request.Option) (*DescribeDeliveriesOutput, error) { + req, out := c.DescribeDeliveriesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDeliveriesPages iterates over the pages of a DescribeDeliveries operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeLogStreams method for more information on how to use this operation. +// See DescribeDeliveries method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a DescribeLogStreams operation. +// // Example iterating over at most 3 pages of a DescribeDeliveries operation. // pageNum := 0 -// err := client.DescribeLogStreamsPages(params, -// func(page *cloudwatchlogs.DescribeLogStreamsOutput, lastPage bool) bool { +// err := client.DescribeDeliveriesPages(params, +// func(page *cloudwatchlogs.DescribeDeliveriesOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) -func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool) error { - return c.DescribeLogStreamsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *CloudWatchLogs) DescribeDeliveriesPages(input *DescribeDeliveriesInput, fn func(*DescribeDeliveriesOutput, bool) bool) error { + return c.DescribeDeliveriesPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeLogStreamsPagesWithContext same as DescribeLogStreamsPages except +// DescribeDeliveriesPagesWithContext same as DescribeDeliveriesPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool, opts ...request.Option) error { +func (c *CloudWatchLogs) DescribeDeliveriesPagesWithContext(ctx aws.Context, input *DescribeDeliveriesInput, fn func(*DescribeDeliveriesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLogStreamsInput + var inCpy *DescribeDeliveriesInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.DescribeLogStreamsRequest(inCpy) + req, _ := c.DescribeDeliveriesRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -2100,7 +2227,7 @@ func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, inp } for p.Next() { - if !fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage()) { + if !fn(p.Page().(*DescribeDeliveriesOutput), !p.HasNextPage()) { break } } @@ -2108,34 +2235,34 @@ func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, inp return p.Err() } -const opDescribeMetricFilters = "DescribeMetricFilters" +const opDescribeDeliveryDestinations = "DescribeDeliveryDestinations" -// DescribeMetricFiltersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMetricFilters operation. The "output" return +// DescribeDeliveryDestinationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDeliveryDestinations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeMetricFilters for more information on using the DescribeMetricFilters +// See DescribeDeliveryDestinations for more information on using the DescribeDeliveryDestinations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeMetricFiltersRequest method. -// req, resp := client.DescribeMetricFiltersRequest(params) +// // Example sending a request using the DescribeDeliveryDestinationsRequest method. +// req, resp := client.DescribeDeliveryDestinationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters -func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveryDestinations +func (c *CloudWatchLogs) DescribeDeliveryDestinationsRequest(input *DescribeDeliveryDestinationsInput) (req *request.Request, output *DescribeDeliveryDestinationsOutput) { op := &request.Operation{ - Name: opDescribeMetricFilters, + Name: opDescribeDeliveryDestinations, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -2147,97 +2274,99 @@ func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFilte } if input == nil { - input = &DescribeMetricFiltersInput{} + input = &DescribeDeliveryDestinationsInput{} } - output = &DescribeMetricFiltersOutput{} + output = &DescribeDeliveryDestinationsOutput{} req = c.newRequest(op, input, output) return } -// DescribeMetricFilters API operation for Amazon CloudWatch Logs. +// DescribeDeliveryDestinations API operation for Amazon CloudWatch Logs. // -// Lists the specified metric filters. You can list all of the metric filters -// or filter the results by log name, prefix, metric name, or metric namespace. -// The results are ASCII-sorted by filter name. +// Retrieves a list of the delivery destinations that have been created in the +// account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeMetricFilters for usage and error information. +// API operation DescribeDeliveryDestinations for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters -func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) { - req, out := c.DescribeMetricFiltersRequest(input) +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveryDestinations +func (c *CloudWatchLogs) DescribeDeliveryDestinations(input *DescribeDeliveryDestinationsInput) (*DescribeDeliveryDestinationsOutput, error) { + req, out := c.DescribeDeliveryDestinationsRequest(input) return out, req.Send() } -// DescribeMetricFiltersWithContext is the same as DescribeMetricFilters with the addition of +// DescribeDeliveryDestinationsWithContext is the same as DescribeDeliveryDestinations with the addition of // the ability to pass a context and additional request options. // -// See DescribeMetricFilters for details on how to use this API operation. +// See DescribeDeliveryDestinations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeMetricFiltersWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, opts ...request.Option) (*DescribeMetricFiltersOutput, error) { - req, out := c.DescribeMetricFiltersRequest(input) +func (c *CloudWatchLogs) DescribeDeliveryDestinationsWithContext(ctx aws.Context, input *DescribeDeliveryDestinationsInput, opts ...request.Option) (*DescribeDeliveryDestinationsOutput, error) { + req, out := c.DescribeDeliveryDestinationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeMetricFiltersPages iterates over the pages of a DescribeMetricFilters operation, +// DescribeDeliveryDestinationsPages iterates over the pages of a DescribeDeliveryDestinations operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeMetricFilters method for more information on how to use this operation. +// See DescribeDeliveryDestinations method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a DescribeMetricFilters operation. +// // Example iterating over at most 3 pages of a DescribeDeliveryDestinations operation. // pageNum := 0 -// err := client.DescribeMetricFiltersPages(params, -// func(page *cloudwatchlogs.DescribeMetricFiltersOutput, lastPage bool) bool { +// err := client.DescribeDeliveryDestinationsPages(params, +// func(page *cloudwatchlogs.DescribeDeliveryDestinationsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) -func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool) error { - return c.DescribeMetricFiltersPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *CloudWatchLogs) DescribeDeliveryDestinationsPages(input *DescribeDeliveryDestinationsInput, fn func(*DescribeDeliveryDestinationsOutput, bool) bool) error { + return c.DescribeDeliveryDestinationsPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeMetricFiltersPagesWithContext same as DescribeMetricFiltersPages except +// DescribeDeliveryDestinationsPagesWithContext same as DescribeDeliveryDestinationsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool, opts ...request.Option) error { +func (c *CloudWatchLogs) DescribeDeliveryDestinationsPagesWithContext(ctx aws.Context, input *DescribeDeliveryDestinationsInput, fn func(*DescribeDeliveryDestinationsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { - var inCpy *DescribeMetricFiltersInput + var inCpy *DescribeDeliveryDestinationsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.DescribeMetricFiltersRequest(inCpy) + req, _ := c.DescribeDeliveryDestinationsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -2245,7 +2374,7 @@ func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, } for p.Next() { - if !fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage()) { + if !fn(p.Page().(*DescribeDeliveryDestinationsOutput), !p.HasNextPage()) { break } } @@ -2253,148 +2382,210 @@ func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, return p.Err() } -const opDescribeQueries = "DescribeQueries" +const opDescribeDeliverySources = "DescribeDeliverySources" -// DescribeQueriesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeQueries operation. The "output" return +// DescribeDeliverySourcesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDeliverySources operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeQueries for more information on using the DescribeQueries +// See DescribeDeliverySources for more information on using the DescribeDeliverySources // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeQueriesRequest method. -// req, resp := client.DescribeQueriesRequest(params) +// // Example sending a request using the DescribeDeliverySourcesRequest method. +// req, resp := client.DescribeDeliverySourcesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries -func (c *CloudWatchLogs) DescribeQueriesRequest(input *DescribeQueriesInput) (req *request.Request, output *DescribeQueriesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliverySources +func (c *CloudWatchLogs) DescribeDeliverySourcesRequest(input *DescribeDeliverySourcesInput) (req *request.Request, output *DescribeDeliverySourcesOutput) { op := &request.Operation{ - Name: opDescribeQueries, + Name: opDescribeDeliverySources, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &DescribeQueriesInput{} + input = &DescribeDeliverySourcesInput{} } - output = &DescribeQueriesOutput{} + output = &DescribeDeliverySourcesOutput{} req = c.newRequest(op, input, output) return } -// DescribeQueries API operation for Amazon CloudWatch Logs. +// DescribeDeliverySources API operation for Amazon CloudWatch Logs. // -// Returns a list of CloudWatch Logs Insights queries that are scheduled, running, -// or have been run recently in this account. You can request all queries or -// limit it to queries of a specific log group or queries with a certain status. +// Retrieves a list of the delivery sources that have been created in the account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeQueries for usage and error information. +// API operation DescribeDeliverySources for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries -func (c *CloudWatchLogs) DescribeQueries(input *DescribeQueriesInput) (*DescribeQueriesOutput, error) { - req, out := c.DescribeQueriesRequest(input) +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliverySources +func (c *CloudWatchLogs) DescribeDeliverySources(input *DescribeDeliverySourcesInput) (*DescribeDeliverySourcesOutput, error) { + req, out := c.DescribeDeliverySourcesRequest(input) return out, req.Send() } -// DescribeQueriesWithContext is the same as DescribeQueries with the addition of +// DescribeDeliverySourcesWithContext is the same as DescribeDeliverySources with the addition of // the ability to pass a context and additional request options. // -// See DescribeQueries for details on how to use this API operation. +// See DescribeDeliverySources for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *DescribeQueriesInput, opts ...request.Option) (*DescribeQueriesOutput, error) { - req, out := c.DescribeQueriesRequest(input) +func (c *CloudWatchLogs) DescribeDeliverySourcesWithContext(ctx aws.Context, input *DescribeDeliverySourcesInput, opts ...request.Option) (*DescribeDeliverySourcesOutput, error) { + req, out := c.DescribeDeliverySourcesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeQueryDefinitions = "DescribeQueryDefinitions" +// DescribeDeliverySourcesPages iterates over the pages of a DescribeDeliverySources operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDeliverySources method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeDeliverySources operation. +// pageNum := 0 +// err := client.DescribeDeliverySourcesPages(params, +// func(page *cloudwatchlogs.DescribeDeliverySourcesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *CloudWatchLogs) DescribeDeliverySourcesPages(input *DescribeDeliverySourcesInput, fn func(*DescribeDeliverySourcesOutput, bool) bool) error { + return c.DescribeDeliverySourcesPagesWithContext(aws.BackgroundContext(), input, fn) +} -// DescribeQueryDefinitionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeQueryDefinitions operation. The "output" return +// DescribeDeliverySourcesPagesWithContext same as DescribeDeliverySourcesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) DescribeDeliverySourcesPagesWithContext(ctx aws.Context, input *DescribeDeliverySourcesInput, fn func(*DescribeDeliverySourcesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + EndPageOnSameToken: true, + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDeliverySourcesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDeliverySourcesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeDeliverySourcesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeDestinations = "DescribeDestinations" + +// DescribeDestinationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDestinations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeQueryDefinitions for more information on using the DescribeQueryDefinitions +// See DescribeDestinations for more information on using the DescribeDestinations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeQueryDefinitionsRequest method. -// req, resp := client.DescribeQueryDefinitionsRequest(params) +// // Example sending a request using the DescribeDestinationsRequest method. +// req, resp := client.DescribeDestinationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions -func (c *CloudWatchLogs) DescribeQueryDefinitionsRequest(input *DescribeQueryDefinitionsInput) (req *request.Request, output *DescribeQueryDefinitionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations +func (c *CloudWatchLogs) DescribeDestinationsRequest(input *DescribeDestinationsInput) (req *request.Request, output *DescribeDestinationsOutput) { op := &request.Operation{ - Name: opDescribeQueryDefinitions, + Name: opDescribeDestinations, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &DescribeQueryDefinitionsInput{} + input = &DescribeDestinationsInput{} } - output = &DescribeQueryDefinitionsOutput{} + output = &DescribeDestinationsOutput{} req = c.newRequest(op, input, output) return } -// DescribeQueryDefinitions API operation for Amazon CloudWatch Logs. -// -// This operation returns a paginated list of your saved CloudWatch Logs Insights -// query definitions. +// DescribeDestinations API operation for Amazon CloudWatch Logs. // -// You can use the queryDefinitionNamePrefix parameter to limit the results -// to only the query definitions that have names that start with a certain string. +// Lists all your destinations. The results are ASCII-sorted by destination +// name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeQueryDefinitions for usage and error information. +// API operation DescribeDestinations for usage and error information. // // Returned Error Types: // @@ -2404,79 +2595,132 @@ func (c *CloudWatchLogs) DescribeQueryDefinitionsRequest(input *DescribeQueryDef // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions -func (c *CloudWatchLogs) DescribeQueryDefinitions(input *DescribeQueryDefinitionsInput) (*DescribeQueryDefinitionsOutput, error) { - req, out := c.DescribeQueryDefinitionsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDestinations +func (c *CloudWatchLogs) DescribeDestinations(input *DescribeDestinationsInput) (*DescribeDestinationsOutput, error) { + req, out := c.DescribeDestinationsRequest(input) return out, req.Send() } -// DescribeQueryDefinitionsWithContext is the same as DescribeQueryDefinitions with the addition of +// DescribeDestinationsWithContext is the same as DescribeDestinations with the addition of // the ability to pass a context and additional request options. // -// See DescribeQueryDefinitions for details on how to use this API operation. +// See DescribeDestinations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeQueryDefinitionsWithContext(ctx aws.Context, input *DescribeQueryDefinitionsInput, opts ...request.Option) (*DescribeQueryDefinitionsOutput, error) { - req, out := c.DescribeQueryDefinitionsRequest(input) +func (c *CloudWatchLogs) DescribeDestinationsWithContext(ctx aws.Context, input *DescribeDestinationsInput, opts ...request.Option) (*DescribeDestinationsOutput, error) { + req, out := c.DescribeDestinationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeResourcePolicies = "DescribeResourcePolicies" +// DescribeDestinationsPages iterates over the pages of a DescribeDestinations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDestinations method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeDestinations operation. +// pageNum := 0 +// err := client.DescribeDestinationsPages(params, +// func(page *cloudwatchlogs.DescribeDestinationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *CloudWatchLogs) DescribeDestinationsPages(input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool) error { + return c.DescribeDestinationsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeResourcePolicies operation. The "output" return +// DescribeDestinationsPagesWithContext same as DescribeDestinationsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) DescribeDestinationsPagesWithContext(ctx aws.Context, input *DescribeDestinationsInput, fn func(*DescribeDestinationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + EndPageOnSameToken: true, + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDestinationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDestinationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeDestinationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeExportTasks = "DescribeExportTasks" + +// DescribeExportTasksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeExportTasks operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeResourcePolicies for more information on using the DescribeResourcePolicies +// See DescribeExportTasks for more information on using the DescribeExportTasks // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeResourcePoliciesRequest method. -// req, resp := client.DescribeResourcePoliciesRequest(params) +// // Example sending a request using the DescribeExportTasksRequest method. +// req, resp := client.DescribeExportTasksRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies -func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResourcePoliciesInput) (req *request.Request, output *DescribeResourcePoliciesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks +func (c *CloudWatchLogs) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) { op := &request.Operation{ - Name: opDescribeResourcePolicies, + Name: opDescribeExportTasks, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeResourcePoliciesInput{} + input = &DescribeExportTasksInput{} } - output = &DescribeResourcePoliciesOutput{} + output = &DescribeExportTasksOutput{} req = c.newRequest(op, input, output) return } -// DescribeResourcePolicies API operation for Amazon CloudWatch Logs. +// DescribeExportTasks API operation for Amazon CloudWatch Logs. // -// Lists the resource policies in this account. +// Lists the specified export tasks. You can list all your export tasks or filter +// the results based on task ID or task status. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeResourcePolicies for usage and error information. +// API operation DescribeExportTasks for usage and error information. // // Returned Error Types: // @@ -2486,56 +2730,56 @@ func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResource // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies -func (c *CloudWatchLogs) DescribeResourcePolicies(input *DescribeResourcePoliciesInput) (*DescribeResourcePoliciesOutput, error) { - req, out := c.DescribeResourcePoliciesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeExportTasks +func (c *CloudWatchLogs) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) { + req, out := c.DescribeExportTasksRequest(input) return out, req.Send() } -// DescribeResourcePoliciesWithContext is the same as DescribeResourcePolicies with the addition of +// DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of // the ability to pass a context and additional request options. // -// See DescribeResourcePolicies for details on how to use this API operation. +// See DescribeExportTasks for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeResourcePoliciesWithContext(ctx aws.Context, input *DescribeResourcePoliciesInput, opts ...request.Option) (*DescribeResourcePoliciesOutput, error) { - req, out := c.DescribeResourcePoliciesRequest(input) +func (c *CloudWatchLogs) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) { + req, out := c.DescribeExportTasksRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" +const opDescribeLogGroups = "DescribeLogGroups" -// DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSubscriptionFilters operation. The "output" return +// DescribeLogGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLogGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeSubscriptionFilters for more information on using the DescribeSubscriptionFilters +// See DescribeLogGroups for more information on using the DescribeLogGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DescribeSubscriptionFiltersRequest method. -// req, resp := client.DescribeSubscriptionFiltersRequest(params) +// // Example sending a request using the DescribeLogGroupsRequest method. +// req, resp := client.DescribeLogGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters -func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups +func (c *CloudWatchLogs) DescribeLogGroupsRequest(input *DescribeLogGroupsInput) (req *request.Request, output *DescribeLogGroupsOutput) { op := &request.Operation{ - Name: opDescribeSubscriptionFilters, + Name: opDescribeLogGroups, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -2547,97 +2791,104 @@ func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubsc } if input == nil { - input = &DescribeSubscriptionFiltersInput{} + input = &DescribeLogGroupsInput{} } - output = &DescribeSubscriptionFiltersOutput{} + output = &DescribeLogGroupsOutput{} req = c.newRequest(op, input, output) return } -// DescribeSubscriptionFilters API operation for Amazon CloudWatch Logs. +// DescribeLogGroups API operation for Amazon CloudWatch Logs. // -// Lists the subscription filters for the specified log group. You can list -// all the subscription filters or filter the results by prefix. The results -// are ASCII-sorted by filter name. +// Lists the specified log groups. You can list all your log groups or filter +// the results by prefix. The results are ASCII-sorted by log group name. +// +// CloudWatch Logs doesn’t support IAM policies that control access to the +// DescribeLogGroups action by using the aws:ResourceTag/key-name condition +// key. Other CloudWatch Logs actions do support the use of the aws:ResourceTag/key-name +// condition key to control access. For more information about using tags to +// control access, see Controlling access to Amazon Web Services resources using +// tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DescribeSubscriptionFilters for usage and error information. +// API operation DescribeLogGroups for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - ResourceNotFoundException -// The specified resource does not exist. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters -func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) { - req, out := c.DescribeSubscriptionFiltersRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogGroups +func (c *CloudWatchLogs) DescribeLogGroups(input *DescribeLogGroupsInput) (*DescribeLogGroupsOutput, error) { + req, out := c.DescribeLogGroupsRequest(input) return out, req.Send() } -// DescribeSubscriptionFiltersWithContext is the same as DescribeSubscriptionFilters with the addition of +// DescribeLogGroupsWithContext is the same as DescribeLogGroups with the addition of // the ability to pass a context and additional request options. // -// See DescribeSubscriptionFilters for details on how to use this API operation. +// See DescribeLogGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeSubscriptionFiltersWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, opts ...request.Option) (*DescribeSubscriptionFiltersOutput, error) { - req, out := c.DescribeSubscriptionFiltersRequest(input) +func (c *CloudWatchLogs) DescribeLogGroupsWithContext(ctx aws.Context, input *DescribeLogGroupsInput, opts ...request.Option) (*DescribeLogGroupsOutput, error) { + req, out := c.DescribeLogGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeSubscriptionFiltersPages iterates over the pages of a DescribeSubscriptionFilters operation, +// DescribeLogGroupsPages iterates over the pages of a DescribeLogGroups operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeSubscriptionFilters method for more information on how to use this operation. +// See DescribeLogGroups method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a DescribeSubscriptionFilters operation. +// // Example iterating over at most 3 pages of a DescribeLogGroups operation. // pageNum := 0 -// err := client.DescribeSubscriptionFiltersPages(params, -// func(page *cloudwatchlogs.DescribeSubscriptionFiltersOutput, lastPage bool) bool { +// err := client.DescribeLogGroupsPages(params, +// func(page *cloudwatchlogs.DescribeLogGroupsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) -func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool) error { - return c.DescribeSubscriptionFiltersPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *CloudWatchLogs) DescribeLogGroupsPages(input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool) error { + return c.DescribeLogGroupsPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeSubscriptionFiltersPagesWithContext same as DescribeSubscriptionFiltersPages except +// DescribeLogGroupsPagesWithContext same as DescribeLogGroupsPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool, opts ...request.Option) error { +func (c *CloudWatchLogs) DescribeLogGroupsPagesWithContext(ctx aws.Context, input *DescribeLogGroupsInput, fn func(*DescribeLogGroupsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { - var inCpy *DescribeSubscriptionFiltersInput + var inCpy *DescribeLogGroupsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.DescribeSubscriptionFiltersRequest(inCpy) + req, _ := c.DescribeLogGroupsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -2645,7 +2896,7 @@ func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Con } for p.Next() { - if !fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage()) { + if !fn(p.Page().(*DescribeLogGroupsOutput), !p.HasNextPage()) { break } } @@ -2653,81 +2904,76 @@ func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Con return p.Err() } -const opDisassociateKmsKey = "DisassociateKmsKey" +const opDescribeLogStreams = "DescribeLogStreams" -// DisassociateKmsKeyRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateKmsKey operation. The "output" return +// DescribeLogStreamsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLogStreams operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DisassociateKmsKey for more information on using the DisassociateKmsKey +// See DescribeLogStreams for more information on using the DescribeLogStreams // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the DisassociateKmsKeyRequest method. -// req, resp := client.DisassociateKmsKeyRequest(params) +// // Example sending a request using the DescribeLogStreamsRequest method. +// req, resp := client.DescribeLogStreamsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey -func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInput) (req *request.Request, output *DisassociateKmsKeyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams +func (c *CloudWatchLogs) DescribeLogStreamsRequest(input *DescribeLogStreamsInput) (req *request.Request, output *DescribeLogStreamsOutput) { op := &request.Operation{ - Name: opDisassociateKmsKey, + Name: opDescribeLogStreams, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &DisassociateKmsKeyInput{} + input = &DescribeLogStreamsInput{} } - output = &DisassociateKmsKeyOutput{} + output = &DescribeLogStreamsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DisassociateKmsKey API operation for Amazon CloudWatch Logs. +// DescribeLogStreams API operation for Amazon CloudWatch Logs. // -// Disassociates the specified KMS key from the specified log group or from -// all CloudWatch Logs Insights query results in the account. +// Lists the log streams for the specified log group. You can list all the log +// streams or filter the results by prefix. You can also control how the results +// are ordered. // -// When you use DisassociateKmsKey, you specify either the logGroupName parameter -// or the resourceIdentifier parameter. You can't specify both of those parameters -// in the same operation. +// You can specify the log group to search by using either logGroupIdentifier +// or logGroupName. You must include one of these two parameters, but you can't +// include both. // -// - Specify the logGroupName parameter to stop using the KMS key to encrypt -// future log events ingested and stored in the log group. Instead, they -// will be encrypted with the default CloudWatch Logs method. The log events -// that were ingested while the key was associated with the log group are -// still encrypted with that key. Therefore, CloudWatch Logs will need permissions -// for the key whenever that data is accessed. +// This operation has a limit of five transactions per second, after which transactions +// are throttled. // -// - Specify the resourceIdentifier parameter with the query-result resource -// to stop using the KMS key to encrypt the results of all future StartQuery -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) -// operations in the account. They will instead be encrypted with the default -// CloudWatch Logs method. The results from queries that ran while the key -// was associated with the account are still encrypted with that key. Therefore, -// CloudWatch Logs will need permissions for the key whenever that data is -// accessed. -// -// It can take up to 5 minutes for this operation to take effect. +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation DisassociateKmsKey for usage and error information. +// API operation DescribeLogStreams for usage and error information. // // Returned Error Types: // @@ -2737,62 +2983,111 @@ func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInpu // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey -func (c *CloudWatchLogs) DisassociateKmsKey(input *DisassociateKmsKeyInput) (*DisassociateKmsKeyOutput, error) { - req, out := c.DisassociateKmsKeyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeLogStreams +func (c *CloudWatchLogs) DescribeLogStreams(input *DescribeLogStreamsInput) (*DescribeLogStreamsOutput, error) { + req, out := c.DescribeLogStreamsRequest(input) return out, req.Send() } -// DisassociateKmsKeyWithContext is the same as DisassociateKmsKey with the addition of +// DescribeLogStreamsWithContext is the same as DescribeLogStreams with the addition of // the ability to pass a context and additional request options. // -// See DisassociateKmsKey for details on how to use this API operation. +// See DescribeLogStreams for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) DisassociateKmsKeyWithContext(ctx aws.Context, input *DisassociateKmsKeyInput, opts ...request.Option) (*DisassociateKmsKeyOutput, error) { - req, out := c.DisassociateKmsKeyRequest(input) +func (c *CloudWatchLogs) DescribeLogStreamsWithContext(ctx aws.Context, input *DescribeLogStreamsInput, opts ...request.Option) (*DescribeLogStreamsOutput, error) { + req, out := c.DescribeLogStreamsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opFilterLogEvents = "FilterLogEvents" +// DescribeLogStreamsPages iterates over the pages of a DescribeLogStreams operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeLogStreams method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeLogStreams operation. +// pageNum := 0 +// err := client.DescribeLogStreamsPages(params, +// func(page *cloudwatchlogs.DescribeLogStreamsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *CloudWatchLogs) DescribeLogStreamsPages(input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool) error { + return c.DescribeLogStreamsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// FilterLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the FilterLogEvents operation. The "output" return +// DescribeLogStreamsPagesWithContext same as DescribeLogStreamsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) DescribeLogStreamsPagesWithContext(ctx aws.Context, input *DescribeLogStreamsInput, fn func(*DescribeLogStreamsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + EndPageOnSameToken: true, + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeLogStreamsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeLogStreamsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeLogStreamsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeMetricFilters = "DescribeMetricFilters" + +// DescribeMetricFiltersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeMetricFilters operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See FilterLogEvents for more information on using the FilterLogEvents +// See DescribeMetricFilters for more information on using the DescribeMetricFilters // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the FilterLogEventsRequest method. -// req, resp := client.FilterLogEventsRequest(params) +// // Example sending a request using the DescribeMetricFiltersRequest method. +// req, resp := client.DescribeMetricFiltersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents -func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters +func (c *CloudWatchLogs) DescribeMetricFiltersRequest(input *DescribeMetricFiltersInput) (req *request.Request, output *DescribeMetricFiltersOutput) { op := &request.Operation{ - Name: opFilterLogEvents, + Name: opDescribeMetricFilters, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -2804,47 +3099,26 @@ func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (re } if input == nil { - input = &FilterLogEventsInput{} + input = &DescribeMetricFiltersInput{} } - output = &FilterLogEventsOutput{} + output = &DescribeMetricFiltersOutput{} req = c.newRequest(op, input, output) return } -// FilterLogEvents API operation for Amazon CloudWatch Logs. -// -// 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. -// -// You must have the logs:FilterLogEvents permission to perform this operation. -// -// You can specify the log group to search by using either logGroupIdentifier -// or logGroupName. You must include one of these two parameters, but you can't -// include both. -// -// 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 specifying the token in a subsequent -// call. This operation can return empty results while there are more log events -// available through the token. -// -// The returned log events are sorted by event timestamp, the timestamp when -// the event was ingested by CloudWatch Logs, and the ID of the PutLogEvents -// request. +// DescribeMetricFilters API operation for Amazon CloudWatch Logs. // -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// Lists the specified metric filters. You can list all of the metric filters +// or filter the results by log name, prefix, metric name, or metric namespace. +// The results are ASCII-sorted by filter name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation FilterLogEvents for usage and error information. +// API operation DescribeMetricFilters for usage and error information. // // Returned Error Types: // @@ -2857,65 +3131,65 @@ func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (re // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents -func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) { - req, out := c.FilterLogEventsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeMetricFilters +func (c *CloudWatchLogs) DescribeMetricFilters(input *DescribeMetricFiltersInput) (*DescribeMetricFiltersOutput, error) { + req, out := c.DescribeMetricFiltersRequest(input) return out, req.Send() } -// FilterLogEventsWithContext is the same as FilterLogEvents with the addition of +// DescribeMetricFiltersWithContext is the same as DescribeMetricFilters with the addition of // the ability to pass a context and additional request options. // -// See FilterLogEvents for details on how to use this API operation. +// See DescribeMetricFilters for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) FilterLogEventsWithContext(ctx aws.Context, input *FilterLogEventsInput, opts ...request.Option) (*FilterLogEventsOutput, error) { - req, out := c.FilterLogEventsRequest(input) +func (c *CloudWatchLogs) DescribeMetricFiltersWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, opts ...request.Option) (*DescribeMetricFiltersOutput, error) { + req, out := c.DescribeMetricFiltersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// FilterLogEventsPages iterates over the pages of a FilterLogEvents operation, +// DescribeMetricFiltersPages iterates over the pages of a DescribeMetricFilters operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See FilterLogEvents method for more information on how to use this operation. +// See DescribeMetricFilters method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // -// // Example iterating over at most 3 pages of a FilterLogEvents operation. +// // Example iterating over at most 3 pages of a DescribeMetricFilters operation. // pageNum := 0 -// err := client.FilterLogEventsPages(params, -// func(page *cloudwatchlogs.FilterLogEventsOutput, lastPage bool) bool { +// err := client.DescribeMetricFiltersPages(params, +// func(page *cloudwatchlogs.DescribeMetricFiltersOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) -func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool) error { - return c.FilterLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *CloudWatchLogs) DescribeMetricFiltersPages(input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool) error { + return c.DescribeMetricFiltersPagesWithContext(aws.BackgroundContext(), input, fn) } -// FilterLogEventsPagesWithContext same as FilterLogEventsPages except +// DescribeMetricFiltersPagesWithContext same as DescribeMetricFiltersPages except // it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool, opts ...request.Option) error { +func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, input *DescribeMetricFiltersInput, fn func(*DescribeMetricFiltersOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ EndPageOnSameToken: true, NewRequest: func() (*request.Request, error) { - var inCpy *FilterLogEventsInput + var inCpy *DescribeMetricFiltersInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.FilterLogEventsRequest(inCpy) + req, _ := c.DescribeMetricFiltersRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -2923,7 +3197,7 @@ func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input } for p.Next() { - if !fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage()) { + if !fn(p.Page().(*DescribeMetricFiltersOutput), !p.HasNextPage()) { break } } @@ -2931,606 +3205,481 @@ func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input return p.Err() } -const opGetDataProtectionPolicy = "GetDataProtectionPolicy" +const opDescribeQueries = "DescribeQueries" -// GetDataProtectionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetDataProtectionPolicy operation. The "output" return +// DescribeQueriesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeQueries operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetDataProtectionPolicy for more information on using the GetDataProtectionPolicy +// See DescribeQueries for more information on using the DescribeQueries // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetDataProtectionPolicyRequest method. -// req, resp := client.GetDataProtectionPolicyRequest(params) +// // Example sending a request using the DescribeQueriesRequest method. +// req, resp := client.DescribeQueriesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDataProtectionPolicy -func (c *CloudWatchLogs) GetDataProtectionPolicyRequest(input *GetDataProtectionPolicyInput) (req *request.Request, output *GetDataProtectionPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries +func (c *CloudWatchLogs) DescribeQueriesRequest(input *DescribeQueriesInput) (req *request.Request, output *DescribeQueriesOutput) { op := &request.Operation{ - Name: opGetDataProtectionPolicy, + Name: opDescribeQueries, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDataProtectionPolicyInput{} + input = &DescribeQueriesInput{} } - output = &GetDataProtectionPolicyOutput{} + output = &DescribeQueriesOutput{} req = c.newRequest(op, input, output) return } -// GetDataProtectionPolicy API operation for Amazon CloudWatch Logs. +// DescribeQueries API operation for Amazon CloudWatch Logs. // -// Returns information about a log group data protection policy. +// Returns a list of CloudWatch Logs Insights queries that are scheduled, running, +// or have been run recently in this account. You can request all queries or +// limit it to queries of a specific log group or queries with a certain status. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetDataProtectionPolicy for usage and error information. +// API operation DescribeQueries for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDataProtectionPolicy -func (c *CloudWatchLogs) GetDataProtectionPolicy(input *GetDataProtectionPolicyInput) (*GetDataProtectionPolicyOutput, error) { - req, out := c.GetDataProtectionPolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries +func (c *CloudWatchLogs) DescribeQueries(input *DescribeQueriesInput) (*DescribeQueriesOutput, error) { + req, out := c.DescribeQueriesRequest(input) return out, req.Send() } -// GetDataProtectionPolicyWithContext is the same as GetDataProtectionPolicy with the addition of +// DescribeQueriesWithContext is the same as DescribeQueries with the addition of // the ability to pass a context and additional request options. // -// See GetDataProtectionPolicy for details on how to use this API operation. +// See DescribeQueries for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetDataProtectionPolicyWithContext(ctx aws.Context, input *GetDataProtectionPolicyInput, opts ...request.Option) (*GetDataProtectionPolicyOutput, error) { - req, out := c.GetDataProtectionPolicyRequest(input) +func (c *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *DescribeQueriesInput, opts ...request.Option) (*DescribeQueriesOutput, error) { + req, out := c.DescribeQueriesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetLogEvents = "GetLogEvents" +const opDescribeQueryDefinitions = "DescribeQueryDefinitions" -// GetLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the GetLogEvents operation. The "output" return +// DescribeQueryDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeQueryDefinitions operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetLogEvents for more information on using the GetLogEvents +// See DescribeQueryDefinitions for more information on using the DescribeQueryDefinitions // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetLogEventsRequest method. -// req, resp := client.GetLogEventsRequest(params) +// // Example sending a request using the DescribeQueryDefinitionsRequest method. +// req, resp := client.DescribeQueryDefinitionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents -func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions +func (c *CloudWatchLogs) DescribeQueryDefinitionsRequest(input *DescribeQueryDefinitionsInput) (req *request.Request, output *DescribeQueryDefinitionsOutput) { op := &request.Operation{ - Name: opGetLogEvents, + Name: opDescribeQueryDefinitions, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextForwardToken"}, - LimitToken: "limit", - TruncationToken: "", - }, } if input == nil { - input = &GetLogEventsInput{} + input = &DescribeQueryDefinitionsInput{} } - output = &GetLogEventsOutput{} + output = &DescribeQueryDefinitionsOutput{} req = c.newRequest(op, input, output) return } -// GetLogEvents API operation for Amazon CloudWatch Logs. +// DescribeQueryDefinitions API operation for Amazon CloudWatch Logs. // -// Lists log events from the specified log stream. You can list all of the log -// events or filter using a time range. +// This operation returns a paginated list of your saved CloudWatch Logs Insights +// query definitions. // -// 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. -// -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). -// -// You can specify the log group to search by using either logGroupIdentifier -// or logGroupName. You must include one of these two parameters, but you can't -// include both. +// You can use the queryDefinitionNamePrefix parameter to limit the results +// to only the query definitions that have names that start with a certain string. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetLogEvents for usage and error information. +// API operation DescribeQueryDefinitions for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - ResourceNotFoundException -// The specified resource does not exist. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents -func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) { - req, out := c.GetLogEventsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueryDefinitions +func (c *CloudWatchLogs) DescribeQueryDefinitions(input *DescribeQueryDefinitionsInput) (*DescribeQueryDefinitionsOutput, error) { + req, out := c.DescribeQueryDefinitionsRequest(input) return out, req.Send() } -// GetLogEventsWithContext is the same as GetLogEvents with the addition of +// DescribeQueryDefinitionsWithContext is the same as DescribeQueryDefinitions with the addition of // the ability to pass a context and additional request options. // -// See GetLogEvents for details on how to use this API operation. +// See DescribeQueryDefinitions for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetLogEventsWithContext(ctx aws.Context, input *GetLogEventsInput, opts ...request.Option) (*GetLogEventsOutput, error) { - req, out := c.GetLogEventsRequest(input) +func (c *CloudWatchLogs) DescribeQueryDefinitionsWithContext(ctx aws.Context, input *DescribeQueryDefinitionsInput, opts ...request.Option) (*DescribeQueryDefinitionsOutput, error) { + req, out := c.DescribeQueryDefinitionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// GetLogEventsPages iterates over the pages of a GetLogEvents operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetLogEvents method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetLogEvents operation. -// pageNum := 0 -// err := client.GetLogEventsPages(params, -// func(page *cloudwatchlogs.GetLogEventsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool) error { - return c.GetLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetLogEventsPagesWithContext same as GetLogEventsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - EndPageOnSameToken: true, - NewRequest: func() (*request.Request, error) { - var inCpy *GetLogEventsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetLogEventsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetLogGroupFields = "GetLogGroupFields" +const opDescribeResourcePolicies = "DescribeResourcePolicies" -// GetLogGroupFieldsRequest generates a "aws/request.Request" representing the -// client's request for the GetLogGroupFields operation. The "output" return +// DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeResourcePolicies operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetLogGroupFields for more information on using the GetLogGroupFields +// See DescribeResourcePolicies for more information on using the DescribeResourcePolicies // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetLogGroupFieldsRequest method. -// req, resp := client.GetLogGroupFieldsRequest(params) +// // Example sending a request using the DescribeResourcePoliciesRequest method. +// req, resp := client.DescribeResourcePoliciesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields -func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) (req *request.Request, output *GetLogGroupFieldsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies +func (c *CloudWatchLogs) DescribeResourcePoliciesRequest(input *DescribeResourcePoliciesInput) (req *request.Request, output *DescribeResourcePoliciesOutput) { op := &request.Operation{ - Name: opGetLogGroupFields, + Name: opDescribeResourcePolicies, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetLogGroupFieldsInput{} + input = &DescribeResourcePoliciesInput{} } - output = &GetLogGroupFieldsOutput{} + output = &DescribeResourcePoliciesOutput{} req = c.newRequest(op, input, output) return } -// GetLogGroupFields API operation for Amazon CloudWatch Logs. -// -// Returns a list of the fields that are included in log events in the specified -// log group. Includes the percentage of log events that contain each field. -// The search is limited to a time period that you specify. -// -// You can specify the log group to search by using either logGroupIdentifier -// or logGroupName. You must specify one of these parameters, but you can't -// specify both. -// -// In the results, fields that start with @ are fields generated by CloudWatch -// Logs. For example, @timestamp is the timestamp of each log event. For more -// information about the fields that are generated by CloudWatch logs, see Supported -// Logs and Discovered Fields (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html). -// -// The response results are sorted by the frequency percentage, starting with -// the highest percentage. +// DescribeResourcePolicies API operation for Amazon CloudWatch Logs. // -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// Lists the resource policies in this account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetLogGroupFields for usage and error information. +// API operation DescribeResourcePolicies for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields -func (c *CloudWatchLogs) GetLogGroupFields(input *GetLogGroupFieldsInput) (*GetLogGroupFieldsOutput, error) { - req, out := c.GetLogGroupFieldsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeResourcePolicies +func (c *CloudWatchLogs) DescribeResourcePolicies(input *DescribeResourcePoliciesInput) (*DescribeResourcePoliciesOutput, error) { + req, out := c.DescribeResourcePoliciesRequest(input) return out, req.Send() } -// GetLogGroupFieldsWithContext is the same as GetLogGroupFields with the addition of +// DescribeResourcePoliciesWithContext is the same as DescribeResourcePolicies with the addition of // the ability to pass a context and additional request options. // -// See GetLogGroupFields for details on how to use this API operation. +// See DescribeResourcePolicies for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetLogGroupFieldsWithContext(ctx aws.Context, input *GetLogGroupFieldsInput, opts ...request.Option) (*GetLogGroupFieldsOutput, error) { - req, out := c.GetLogGroupFieldsRequest(input) +func (c *CloudWatchLogs) DescribeResourcePoliciesWithContext(ctx aws.Context, input *DescribeResourcePoliciesInput, opts ...request.Option) (*DescribeResourcePoliciesOutput, error) { + req, out := c.DescribeResourcePoliciesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetLogRecord = "GetLogRecord" +const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" -// GetLogRecordRequest generates a "aws/request.Request" representing the -// client's request for the GetLogRecord operation. The "output" return +// DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSubscriptionFilters operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetLogRecord for more information on using the GetLogRecord +// See DescribeSubscriptionFilters for more information on using the DescribeSubscriptionFilters // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the GetLogRecordRequest method. -// req, resp := client.GetLogRecordRequest(params) +// // Example sending a request using the DescribeSubscriptionFiltersRequest method. +// req, resp := client.DescribeSubscriptionFiltersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord -func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *request.Request, output *GetLogRecordOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters +func (c *CloudWatchLogs) DescribeSubscriptionFiltersRequest(input *DescribeSubscriptionFiltersInput) (req *request.Request, output *DescribeSubscriptionFiltersOutput) { op := &request.Operation{ - Name: opGetLogRecord, + Name: opDescribeSubscriptionFilters, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &GetLogRecordInput{} + input = &DescribeSubscriptionFiltersInput{} } - output = &GetLogRecordOutput{} + output = &DescribeSubscriptionFiltersOutput{} req = c.newRequest(op, input, output) return } -// GetLogRecord API operation for Amazon CloudWatch Logs. -// -// Retrieves all of the fields and values of a single log event. All fields -// are retrieved, even if the original query that produced the logRecordPointer -// retrieved only a subset of fields. Fields are returned as field name/field -// value pairs. +// DescribeSubscriptionFilters API operation for Amazon CloudWatch Logs. // -// The full unparsed log event is returned within @message. +// Lists the subscription filters for the specified log group. You can list +// all the subscription filters or filter the results by prefix. The results +// are ASCII-sorted by filter name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetLogRecord for usage and error information. +// API operation DescribeSubscriptionFilters for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord -func (c *CloudWatchLogs) GetLogRecord(input *GetLogRecordInput) (*GetLogRecordOutput, error) { - req, out := c.GetLogRecordRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeSubscriptionFilters +func (c *CloudWatchLogs) DescribeSubscriptionFilters(input *DescribeSubscriptionFiltersInput) (*DescribeSubscriptionFiltersOutput, error) { + req, out := c.DescribeSubscriptionFiltersRequest(input) return out, req.Send() } -// GetLogRecordWithContext is the same as GetLogRecord with the addition of +// DescribeSubscriptionFiltersWithContext is the same as DescribeSubscriptionFilters with the addition of // the ability to pass a context and additional request options. // -// See GetLogRecord for details on how to use this API operation. +// See DescribeSubscriptionFilters for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetLogRecordWithContext(ctx aws.Context, input *GetLogRecordInput, opts ...request.Option) (*GetLogRecordOutput, error) { - req, out := c.GetLogRecordRequest(input) +func (c *CloudWatchLogs) DescribeSubscriptionFiltersWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, opts ...request.Option) (*DescribeSubscriptionFiltersOutput, error) { + req, out := c.DescribeSubscriptionFiltersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetQueryResults = "GetQueryResults" - -// GetQueryResultsRequest generates a "aws/request.Request" representing the -// client's request for the GetQueryResults operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetQueryResults for more information on using the GetQueryResults -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// DescribeSubscriptionFiltersPages iterates over the pages of a DescribeSubscriptionFilters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. // -// // Example sending a request using the GetQueryResultsRequest method. -// req, resp := client.GetQueryResultsRequest(params) +// See DescribeSubscriptionFilters method for more information on how to use this operation. // -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } +// Note: This operation can generate multiple requests to a service. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults -func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { - op := &request.Operation{ - Name: opGetQueryResults, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetQueryResultsInput{} - } +// // Example iterating over at most 3 pages of a DescribeSubscriptionFilters operation. +// pageNum := 0 +// err := client.DescribeSubscriptionFiltersPages(params, +// func(page *cloudwatchlogs.DescribeSubscriptionFiltersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *CloudWatchLogs) DescribeSubscriptionFiltersPages(input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool) error { + return c.DescribeSubscriptionFiltersPagesWithContext(aws.BackgroundContext(), input, fn) +} - output = &GetQueryResultsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetQueryResults API operation for Amazon CloudWatch Logs. -// -// Returns the results from the specified query. -// -// Only the fields requested in the query are returned, along with a @ptr field, -// which is the identifier for the log record. You can use the value of @ptr -// in a GetLogRecord (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html) -// operation to get the full log record. -// -// GetQueryResults does not start running a query. To run a query, use StartQuery -// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html). -// For more information about how long results of previous queries are available, -// see CloudWatch Logs quotas (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html). -// -// If the value of the Status field in the output is Running, this operation -// returns only partial results. If you see a value of Scheduled or Running -// for the status, you can retry the operation later to see the final results. -// -// If you are using CloudWatch cross-account observability, you can use this -// operation in a monitoring account to start queries in linked source accounts. -// For more information, see CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation GetQueryResults for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - ResourceNotFoundException -// The specified resource does not exist. -// -// - ServiceUnavailableException -// The service cannot complete the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults -func (c *CloudWatchLogs) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { - req, out := c.GetQueryResultsRequest(input) - return out, req.Send() -} - -// GetQueryResultsWithContext is the same as GetQueryResults with the addition of -// the ability to pass a context and additional request options. -// -// See GetQueryResults for details on how to use this API operation. +// DescribeSubscriptionFiltersPagesWithContext same as DescribeSubscriptionFiltersPages except +// it takes a Context and allows setting request options on the pages. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { - req, out := c.GetQueryResultsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() +func (c *CloudWatchLogs) DescribeSubscriptionFiltersPagesWithContext(ctx aws.Context, input *DescribeSubscriptionFiltersInput, fn func(*DescribeSubscriptionFiltersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + EndPageOnSameToken: true, + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeSubscriptionFiltersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeSubscriptionFiltersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeSubscriptionFiltersOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() } -const opListTagsForResource = "ListTagsForResource" +const opDisassociateKmsKey = "DisassociateKmsKey" -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return +// DisassociateKmsKeyRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateKmsKey operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagsForResource for more information on using the ListTagsForResource +// See DisassociateKmsKey for more information on using the DisassociateKmsKey // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the ListTagsForResourceRequest method. -// req, resp := client.ListTagsForResourceRequest(params) +// // Example sending a request using the DisassociateKmsKeyRequest method. +// req, resp := client.DisassociateKmsKeyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResource -func (c *CloudWatchLogs) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey +func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInput) (req *request.Request, output *DisassociateKmsKeyOutput) { op := &request.Operation{ - Name: opListTagsForResource, + Name: opDisassociateKmsKey, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListTagsForResourceInput{} + input = &DisassociateKmsKeyInput{} } - output = &ListTagsForResourceOutput{} + output = &DisassociateKmsKeyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// ListTagsForResource API operation for Amazon CloudWatch Logs. +// DisassociateKmsKey API operation for Amazon CloudWatch Logs. // -// Displays the tags associated with a CloudWatch Logs resource. Currently, -// log groups and destinations support tagging. +// Disassociates the specified KMS key from the specified log group or from +// all CloudWatch Logs Insights query results in the account. +// +// When you use DisassociateKmsKey, you specify either the logGroupName parameter +// or the resourceIdentifier parameter. You can't specify both of those parameters +// in the same operation. +// +// - Specify the logGroupName parameter to stop using the KMS key to encrypt +// future log events ingested and stored in the log group. Instead, they +// will be encrypted with the default CloudWatch Logs method. The log events +// that were ingested while the key was associated with the log group are +// still encrypted with that key. Therefore, CloudWatch Logs will need permissions +// for the key whenever that data is accessed. +// +// - Specify the resourceIdentifier parameter with the query-result resource +// to stop using the KMS key to encrypt the results of all future StartQuery +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) +// operations in the account. They will instead be encrypted with the default +// CloudWatch Logs method. The results from queries that ran while the key +// was associated with the account are still encrypted with that key. Therefore, +// CloudWatch Logs will need permissions for the key whenever that data is +// accessed. +// +// It can take up to 5 minutes for this operation to take effect. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation ListTagsForResource for usage and error information. +// API operation DisassociateKmsKey for usage and error information. // // Returned Error Types: // @@ -3540,212 +3689,251 @@ func (c *CloudWatchLogs) ListTagsForResourceRequest(input *ListTagsForResourceIn // - ResourceNotFoundException // The specified resource does not exist. // +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResource -func (c *CloudWatchLogs) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DisassociateKmsKey +func (c *CloudWatchLogs) DisassociateKmsKey(input *DisassociateKmsKeyInput) (*DisassociateKmsKeyOutput, error) { + req, out := c.DisassociateKmsKeyRequest(input) return out, req.Send() } -// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// DisassociateKmsKeyWithContext is the same as DisassociateKmsKey with the addition of // the ability to pass a context and additional request options. // -// See ListTagsForResource for details on how to use this API operation. +// See DisassociateKmsKey for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +func (c *CloudWatchLogs) DisassociateKmsKeyWithContext(ctx aws.Context, input *DisassociateKmsKeyInput, opts ...request.Option) (*DisassociateKmsKeyOutput, error) { + req, out := c.DisassociateKmsKeyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListTagsLogGroup = "ListTagsLogGroup" +const opFilterLogEvents = "FilterLogEvents" -// ListTagsLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsLogGroup operation. The "output" return +// FilterLogEventsRequest generates a "aws/request.Request" representing the +// client's request for the FilterLogEvents operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagsLogGroup for more information on using the ListTagsLogGroup +// See FilterLogEvents for more information on using the FilterLogEvents // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the ListTagsLogGroupRequest method. -// req, resp := client.ListTagsLogGroupRequest(params) +// // Example sending a request using the FilterLogEventsRequest method. +// req, resp := client.FilterLogEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup -// -// Deprecated: Please use the generic tagging API ListTagsForResource -func (c *CloudWatchLogs) ListTagsLogGroupRequest(input *ListTagsLogGroupInput) (req *request.Request, output *ListTagsLogGroupOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, ListTagsLogGroup, has been deprecated") - } +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents +func (c *CloudWatchLogs) FilterLogEventsRequest(input *FilterLogEventsInput) (req *request.Request, output *FilterLogEventsOutput) { op := &request.Operation{ - Name: opListTagsLogGroup, + Name: opFilterLogEvents, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &ListTagsLogGroupInput{} + input = &FilterLogEventsInput{} } - output = &ListTagsLogGroupOutput{} + output = &FilterLogEventsOutput{} req = c.newRequest(op, input, output) return } -// ListTagsLogGroup API operation for Amazon CloudWatch Logs. +// FilterLogEvents API operation for Amazon CloudWatch Logs. // -// The ListTagsLogGroup operation is on the path to deprecation. We recommend -// that you use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html) -// instead. +// 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. // -// Lists the tags for the specified log group. +// You must have the logs:FilterLogEvents permission to perform this operation. +// +// You can specify the log group to search by using either logGroupIdentifier +// or logGroupName. You must include one of these two parameters, but you can't +// include both. +// +// 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 specifying the token in a subsequent +// call. This operation can return empty results while there are more log events +// available through the token. +// +// The returned log events are sorted by event timestamp, the timestamp when +// the event was ingested by CloudWatch Logs, and the ID of the PutLogEvents +// request. +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation ListTagsLogGroup for usage and error information. +// API operation FilterLogEvents for usage and error information. // // Returned Error Types: // +// - InvalidParameterException +// A parameter is specified incorrectly. +// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup -// -// Deprecated: Please use the generic tagging API ListTagsForResource -func (c *CloudWatchLogs) ListTagsLogGroup(input *ListTagsLogGroupInput) (*ListTagsLogGroupOutput, error) { - req, out := c.ListTagsLogGroupRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/FilterLogEvents +func (c *CloudWatchLogs) FilterLogEvents(input *FilterLogEventsInput) (*FilterLogEventsOutput, error) { + req, out := c.FilterLogEventsRequest(input) return out, req.Send() } -// ListTagsLogGroupWithContext is the same as ListTagsLogGroup with the addition of +// FilterLogEventsWithContext is the same as FilterLogEvents with the addition of // the ability to pass a context and additional request options. // -// See ListTagsLogGroup for details on how to use this API operation. +// See FilterLogEvents for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -// -// Deprecated: Please use the generic tagging API ListTagsForResource -func (c *CloudWatchLogs) ListTagsLogGroupWithContext(ctx aws.Context, input *ListTagsLogGroupInput, opts ...request.Option) (*ListTagsLogGroupOutput, error) { - req, out := c.ListTagsLogGroupRequest(input) +func (c *CloudWatchLogs) FilterLogEventsWithContext(ctx aws.Context, input *FilterLogEventsInput, opts ...request.Option) (*FilterLogEventsOutput, error) { + req, out := c.FilterLogEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutAccountPolicy = "PutAccountPolicy" - -// PutAccountPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutAccountPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. +// FilterLogEventsPages iterates over the pages of a FilterLogEvents operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. // -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. +// See FilterLogEvents method for more information on how to use this operation. // -// See PutAccountPolicy for more information on using the PutAccountPolicy -// API call, and error handling. +// Note: This operation can generate multiple requests to a service. // -// This method is useful when you want to inject custom logic or configuration +// // Example iterating over at most 3 pages of a FilterLogEvents operation. +// pageNum := 0 +// err := client.FilterLogEventsPages(params, +// func(page *cloudwatchlogs.FilterLogEventsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *CloudWatchLogs) FilterLogEventsPages(input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool) error { + return c.FilterLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// FilterLogEventsPagesWithContext same as FilterLogEventsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) FilterLogEventsPagesWithContext(ctx aws.Context, input *FilterLogEventsInput, fn func(*FilterLogEventsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + EndPageOnSameToken: true, + NewRequest: func() (*request.Request, error) { + var inCpy *FilterLogEventsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.FilterLogEventsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*FilterLogEventsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opGetDataProtectionPolicy = "GetDataProtectionPolicy" + +// GetDataProtectionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetDataProtectionPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDataProtectionPolicy for more information on using the GetDataProtectionPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutAccountPolicyRequest method. -// req, resp := client.PutAccountPolicyRequest(params) +// // Example sending a request using the GetDataProtectionPolicyRequest method. +// req, resp := client.GetDataProtectionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutAccountPolicy -func (c *CloudWatchLogs) PutAccountPolicyRequest(input *PutAccountPolicyInput) (req *request.Request, output *PutAccountPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDataProtectionPolicy +func (c *CloudWatchLogs) GetDataProtectionPolicyRequest(input *GetDataProtectionPolicyInput) (req *request.Request, output *GetDataProtectionPolicyOutput) { op := &request.Operation{ - Name: opPutAccountPolicy, + Name: opGetDataProtectionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutAccountPolicyInput{} + input = &GetDataProtectionPolicyInput{} } - output = &PutAccountPolicyOutput{} + output = &GetDataProtectionPolicyOutput{} req = c.newRequest(op, input, output) return } -// PutAccountPolicy API operation for Amazon CloudWatch Logs. -// -// Creates an account-level data protection policy that applies to all log groups -// in the account. A data protection policy can help safeguard sensitive data -// that's ingested by your log groups by auditing and masking the sensitive -// log data. Each account can have only one account-level policy. -// -// Sensitive data is detected and masked when it is ingested into a log group. -// When you set a data protection policy, log events ingested into the log groups -// before that time are not masked. -// -// If you use PutAccountPolicy to create a data protection policy for your whole -// account, it applies to both existing log groups and all log groups that are -// created later in this account. The account policy is applied to existing -// log groups with eventual consistency. It might take up to 5 minutes before -// sensitive data in existing log groups begins to be masked. -// -// By default, when a user views a log event that includes masked data, the -// sensitive data is replaced by asterisks. A user who has the logs:Unmask permission -// can use a GetLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) -// or FilterLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) -// operation with the unmask parameter set to true to view the unmasked log -// events. Users with the logs:Unmask can also view unmasked data in the CloudWatch -// Logs console by running a CloudWatch Logs Insights query with the unmask -// query command. -// -// For more information, including a list of types of data that can be audited -// and masked, see Protect sensitive log data with masking (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). -// -// To use the PutAccountPolicy operation, you must be signed on with the logs:PutDataProtectionPolicy -// and logs:PutAccountPolicy permissions. +// GetDataProtectionPolicy API operation for Amazon CloudWatch Logs. // -// The PutAccountPolicy operation applies to all log groups in the account. -// You can also use PutDataProtectionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html) -// to create a data protection policy that applies to just one log group. If -// a log group has its own data protection policy and the account also has an -// account-level data protection policy, then the two policies are cumulative. -// Any sensitive term specified in either policy is masked. +// Returns information about a log group data protection policy. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutAccountPolicy for usage and error information. +// API operation GetDataProtectionPolicy for usage and error information. // // Returned Error Types: // @@ -3755,554 +3943,471 @@ func (c *CloudWatchLogs) PutAccountPolicyRequest(input *PutAccountPolicyInput) ( // - OperationAbortedException // Multiple concurrent requests to update the same resource were in conflict. // +// - ResourceNotFoundException +// The specified resource does not exist. +// // - ServiceUnavailableException // The service cannot complete the request. // -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutAccountPolicy -func (c *CloudWatchLogs) PutAccountPolicy(input *PutAccountPolicyInput) (*PutAccountPolicyOutput, error) { - req, out := c.PutAccountPolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDataProtectionPolicy +func (c *CloudWatchLogs) GetDataProtectionPolicy(input *GetDataProtectionPolicyInput) (*GetDataProtectionPolicyOutput, error) { + req, out := c.GetDataProtectionPolicyRequest(input) return out, req.Send() } -// PutAccountPolicyWithContext is the same as PutAccountPolicy with the addition of +// GetDataProtectionPolicyWithContext is the same as GetDataProtectionPolicy with the addition of // the ability to pass a context and additional request options. // -// See PutAccountPolicy for details on how to use this API operation. +// See GetDataProtectionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutAccountPolicyWithContext(ctx aws.Context, input *PutAccountPolicyInput, opts ...request.Option) (*PutAccountPolicyOutput, error) { - req, out := c.PutAccountPolicyRequest(input) +func (c *CloudWatchLogs) GetDataProtectionPolicyWithContext(ctx aws.Context, input *GetDataProtectionPolicyInput, opts ...request.Option) (*GetDataProtectionPolicyOutput, error) { + req, out := c.GetDataProtectionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutDataProtectionPolicy = "PutDataProtectionPolicy" +const opGetDelivery = "GetDelivery" -// PutDataProtectionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutDataProtectionPolicy operation. The "output" return +// GetDeliveryRequest generates a "aws/request.Request" representing the +// client's request for the GetDelivery operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutDataProtectionPolicy for more information on using the PutDataProtectionPolicy +// See GetDelivery for more information on using the GetDelivery // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutDataProtectionPolicyRequest method. -// req, resp := client.PutDataProtectionPolicyRequest(params) +// // Example sending a request using the GetDeliveryRequest method. +// req, resp := client.GetDeliveryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDataProtectionPolicy -func (c *CloudWatchLogs) PutDataProtectionPolicyRequest(input *PutDataProtectionPolicyInput) (req *request.Request, output *PutDataProtectionPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDelivery +func (c *CloudWatchLogs) GetDeliveryRequest(input *GetDeliveryInput) (req *request.Request, output *GetDeliveryOutput) { op := &request.Operation{ - Name: opPutDataProtectionPolicy, + Name: opGetDelivery, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutDataProtectionPolicyInput{} + input = &GetDeliveryInput{} } - output = &PutDataProtectionPolicyOutput{} + output = &GetDeliveryOutput{} req = c.newRequest(op, input, output) return } -// PutDataProtectionPolicy API operation for Amazon CloudWatch Logs. -// -// Creates a data protection policy for the specified log group. A data protection -// policy can help safeguard sensitive data that's ingested by the log group -// by auditing and masking the sensitive log data. -// -// Sensitive data is detected and masked when it is ingested into the log group. -// When you set a data protection policy, log events ingested into the log group -// before that time are not masked. -// -// By default, when a user views a log event that includes masked data, the -// sensitive data is replaced by asterisks. A user who has the logs:Unmask permission -// can use a GetLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) -// or FilterLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) -// operation with the unmask parameter set to true to view the unmasked log -// events. Users with the logs:Unmask can also view unmasked data in the CloudWatch -// Logs console by running a CloudWatch Logs Insights query with the unmask -// query command. +// GetDelivery API operation for Amazon CloudWatch Logs. // -// For more information, including a list of types of data that can be audited -// and masked, see Protect sensitive log data with masking (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). +// Returns complete information about one delivery. A delivery is a connection +// between a logical delivery source and a logical delivery destination // -// The PutDataProtectionPolicy operation applies to only the specified log group. -// You can also use PutAccountPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html) -// to create an account-level data protection policy that applies to all log -// groups in the account, including both existing log groups and log groups -// that are created level. If a log group has its own data protection policy -// and the account also has an account-level data protection policy, then the -// two policies are cumulative. Any sensitive term specified in either policy -// is masked. +// You need to specify the delivery id in this operation. You can find the IDs +// of the deliveries in your account with the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) +// operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDataProtectionPolicy for usage and error information. +// API operation GetDelivery for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDataProtectionPolicy -func (c *CloudWatchLogs) PutDataProtectionPolicy(input *PutDataProtectionPolicyInput) (*PutDataProtectionPolicyOutput, error) { - req, out := c.PutDataProtectionPolicyRequest(input) +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDelivery +func (c *CloudWatchLogs) GetDelivery(input *GetDeliveryInput) (*GetDeliveryOutput, error) { + req, out := c.GetDeliveryRequest(input) return out, req.Send() } -// PutDataProtectionPolicyWithContext is the same as PutDataProtectionPolicy with the addition of +// GetDeliveryWithContext is the same as GetDelivery with the addition of // the ability to pass a context and additional request options. // -// See PutDataProtectionPolicy for details on how to use this API operation. +// See GetDelivery for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutDataProtectionPolicyWithContext(ctx aws.Context, input *PutDataProtectionPolicyInput, opts ...request.Option) (*PutDataProtectionPolicyOutput, error) { - req, out := c.PutDataProtectionPolicyRequest(input) +func (c *CloudWatchLogs) GetDeliveryWithContext(ctx aws.Context, input *GetDeliveryInput, opts ...request.Option) (*GetDeliveryOutput, error) { + req, out := c.GetDeliveryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutDestination = "PutDestination" +const opGetDeliveryDestination = "GetDeliveryDestination" -// PutDestinationRequest generates a "aws/request.Request" representing the -// client's request for the PutDestination operation. The "output" return +// GetDeliveryDestinationRequest generates a "aws/request.Request" representing the +// client's request for the GetDeliveryDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutDestination for more information on using the PutDestination +// See GetDeliveryDestination for more information on using the GetDeliveryDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutDestinationRequest method. -// req, resp := client.PutDestinationRequest(params) +// // Example sending a request using the GetDeliveryDestinationRequest method. +// req, resp := client.GetDeliveryDestinationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination -func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliveryDestination +func (c *CloudWatchLogs) GetDeliveryDestinationRequest(input *GetDeliveryDestinationInput) (req *request.Request, output *GetDeliveryDestinationOutput) { op := &request.Operation{ - Name: opPutDestination, + Name: opGetDeliveryDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutDestinationInput{} + input = &GetDeliveryDestinationInput{} } - output = &PutDestinationOutput{} + output = &GetDeliveryDestinationOutput{} req = c.newRequest(op, input, output) return } -// PutDestination API operation for Amazon CloudWatch Logs. -// -// Creates or updates a destination. This operation is used only to create destinations -// for cross-account subscriptions. -// -// A destination encapsulates a physical resource (such as an Amazon Kinesis -// stream). With a destination, you can subscribe to a real-time stream of log -// events for a different account, ingested using PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). -// -// Through an access policy, a destination controls what is written to it. By -// default, PutDestination does not set any access policy with the destination, -// which means a cross-account user cannot call PutSubscriptionFilter (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html) -// against this destination. To enable this, the destination owner must call -// PutDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html) -// after PutDestination. +// GetDeliveryDestination API operation for Amazon CloudWatch Logs. // -// To perform a PutDestination operation, you must also have the iam:PassRole -// permission. +// Retrieves complete information about one delivery destination. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDestination for usage and error information. +// API operation GetDeliveryDestination for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. +// - ResourceNotFoundException +// The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination -func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) { - req, out := c.PutDestinationRequest(input) +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliveryDestination +func (c *CloudWatchLogs) GetDeliveryDestination(input *GetDeliveryDestinationInput) (*GetDeliveryDestinationOutput, error) { + req, out := c.GetDeliveryDestinationRequest(input) return out, req.Send() } -// PutDestinationWithContext is the same as PutDestination with the addition of +// GetDeliveryDestinationWithContext is the same as GetDeliveryDestination with the addition of // the ability to pass a context and additional request options. // -// See PutDestination for details on how to use this API operation. +// See GetDeliveryDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutDestinationWithContext(ctx aws.Context, input *PutDestinationInput, opts ...request.Option) (*PutDestinationOutput, error) { - req, out := c.PutDestinationRequest(input) +func (c *CloudWatchLogs) GetDeliveryDestinationWithContext(ctx aws.Context, input *GetDeliveryDestinationInput, opts ...request.Option) (*GetDeliveryDestinationOutput, error) { + req, out := c.GetDeliveryDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutDestinationPolicy = "PutDestinationPolicy" +const opGetDeliveryDestinationPolicy = "GetDeliveryDestinationPolicy" -// PutDestinationPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutDestinationPolicy operation. The "output" return +// GetDeliveryDestinationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetDeliveryDestinationPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutDestinationPolicy for more information on using the PutDestinationPolicy +// See GetDeliveryDestinationPolicy for more information on using the GetDeliveryDestinationPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutDestinationPolicyRequest method. -// req, resp := client.PutDestinationPolicyRequest(params) +// // Example sending a request using the GetDeliveryDestinationPolicyRequest method. +// req, resp := client.GetDeliveryDestinationPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy -func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliveryDestinationPolicy +func (c *CloudWatchLogs) GetDeliveryDestinationPolicyRequest(input *GetDeliveryDestinationPolicyInput) (req *request.Request, output *GetDeliveryDestinationPolicyOutput) { op := &request.Operation{ - Name: opPutDestinationPolicy, + Name: opGetDeliveryDestinationPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutDestinationPolicyInput{} + input = &GetDeliveryDestinationPolicyInput{} } - output = &PutDestinationPolicyOutput{} + output = &GetDeliveryDestinationPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutDestinationPolicy API operation for Amazon CloudWatch Logs. +// GetDeliveryDestinationPolicy API operation for Amazon CloudWatch Logs. // -// Creates or updates an access policy associated with an existing destination. -// An access policy is an IAM policy document (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html) -// that is used to authorize claims to register a subscription filter against -// a given destination. +// Retrieves the delivery destination policy assigned to the delivery destination +// that you specify. For more information about delivery destinations and their +// policies, see PutDeliveryDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutDestinationPolicy for usage and error information. +// API operation GetDeliveryDestinationPolicy for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy -func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) { - req, out := c.PutDestinationPolicyRequest(input) +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliveryDestinationPolicy +func (c *CloudWatchLogs) GetDeliveryDestinationPolicy(input *GetDeliveryDestinationPolicyInput) (*GetDeliveryDestinationPolicyOutput, error) { + req, out := c.GetDeliveryDestinationPolicyRequest(input) return out, req.Send() } -// PutDestinationPolicyWithContext is the same as PutDestinationPolicy with the addition of +// GetDeliveryDestinationPolicyWithContext is the same as GetDeliveryDestinationPolicy with the addition of // the ability to pass a context and additional request options. // -// See PutDestinationPolicy for details on how to use this API operation. +// See GetDeliveryDestinationPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutDestinationPolicyWithContext(ctx aws.Context, input *PutDestinationPolicyInput, opts ...request.Option) (*PutDestinationPolicyOutput, error) { - req, out := c.PutDestinationPolicyRequest(input) +func (c *CloudWatchLogs) GetDeliveryDestinationPolicyWithContext(ctx aws.Context, input *GetDeliveryDestinationPolicyInput, opts ...request.Option) (*GetDeliveryDestinationPolicyOutput, error) { + req, out := c.GetDeliveryDestinationPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutLogEvents = "PutLogEvents" +const opGetDeliverySource = "GetDeliverySource" -// PutLogEventsRequest generates a "aws/request.Request" representing the -// client's request for the PutLogEvents operation. The "output" return +// GetDeliverySourceRequest generates a "aws/request.Request" representing the +// client's request for the GetDeliverySource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutLogEvents for more information on using the PutLogEvents +// See GetDeliverySource for more information on using the GetDeliverySource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutLogEventsRequest method. -// req, resp := client.PutLogEventsRequest(params) +// // Example sending a request using the GetDeliverySourceRequest method. +// req, resp := client.GetDeliverySourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents -func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliverySource +func (c *CloudWatchLogs) GetDeliverySourceRequest(input *GetDeliverySourceInput) (req *request.Request, output *GetDeliverySourceOutput) { op := &request.Operation{ - Name: opPutLogEvents, + Name: opGetDeliverySource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutLogEventsInput{} + input = &GetDeliverySourceInput{} } - output = &PutLogEventsOutput{} + output = &GetDeliverySourceOutput{} req = c.newRequest(op, input, output) return } -// PutLogEvents API operation for Amazon CloudWatch Logs. -// -// Uploads a batch of log events to the specified log stream. -// -// The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions -// are always accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException -// even if the sequence token is not valid. You can use parallel PutLogEvents -// actions on the same log stream. -// -// The batch of events must satisfy the following constraints: -// -// - The maximum batch size is 1,048,576 bytes. This size is calculated as -// the sum of all event messages in UTF-8, plus 26 bytes for each log event. -// -// - None of the log events in the batch can be more than 2 hours in the -// future. -// -// - None of the log events in the batch can be more than 14 days in the -// past. Also, none of the log events can be from earlier than the retention -// period of the log group. -// -// - The log events in the batch must be in chronological order by their -// timestamp. The timestamp is the time that the event occurred, expressed -// as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In Amazon -// Web Services Tools for PowerShell and the Amazon Web Services SDK for -// .NET, the timestamp is specified in .NET format: yyyy-mm-ddThh:mm:ss. -// For example, 2017-09-15T13:45:30.) -// -// - A batch of log events in a single request cannot span more than 24 hours. -// Otherwise, the operation fails. -// -// - Each log event can be no larger than 256 KB. -// -// - The maximum number of log events in a batch is 10,000. -// -// - The quota of five requests per second per log stream has been removed. -// Instead, PutLogEvents 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. +// GetDeliverySource API operation for Amazon CloudWatch Logs. // -// If a call to PutLogEvents returns "UnrecognizedClientException" the most -// likely cause is a non-valid Amazon Web Services access key ID or secret key. +// Retrieves complete information about one delivery source. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutLogEvents for usage and error information. +// API operation GetDeliverySource for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// -// - InvalidSequenceTokenException -// The sequence token is not valid. You can get the correct sequence token in -// the expectedSequenceToken field in the InvalidSequenceTokenException message. -// -// PutLogEvents actions are now always accepted and never return InvalidSequenceTokenException -// regardless of receiving an invalid sequence token. -// -// - DataAlreadyAcceptedException -// The event was already logged. -// -// PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException -// regardless of whether a given batch of log events has already been accepted. -// // - ResourceNotFoundException // The specified resource does not exist. // // - ServiceUnavailableException // The service cannot complete the request. // -// - UnrecognizedClientException -// The most likely cause is an Amazon Web Services access key ID or secret key -// that's not valid. +// - ValidationException +// One of the parameters for the request is not valid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents -func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) { - req, out := c.PutLogEventsRequest(input) +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetDeliverySource +func (c *CloudWatchLogs) GetDeliverySource(input *GetDeliverySourceInput) (*GetDeliverySourceOutput, error) { + req, out := c.GetDeliverySourceRequest(input) return out, req.Send() } -// PutLogEventsWithContext is the same as PutLogEvents with the addition of +// GetDeliverySourceWithContext is the same as GetDeliverySource with the addition of // the ability to pass a context and additional request options. // -// See PutLogEvents for details on how to use this API operation. +// See GetDeliverySource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutLogEventsWithContext(ctx aws.Context, input *PutLogEventsInput, opts ...request.Option) (*PutLogEventsOutput, error) { - req, out := c.PutLogEventsRequest(input) +func (c *CloudWatchLogs) GetDeliverySourceWithContext(ctx aws.Context, input *GetDeliverySourceInput, opts ...request.Option) (*GetDeliverySourceOutput, error) { + req, out := c.GetDeliverySourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutMetricFilter = "PutMetricFilter" +const opGetLogEvents = "GetLogEvents" -// PutMetricFilterRequest generates a "aws/request.Request" representing the -// client's request for the PutMetricFilter operation. The "output" return +// GetLogEventsRequest generates a "aws/request.Request" representing the +// client's request for the GetLogEvents operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutMetricFilter for more information on using the PutMetricFilter +// See GetLogEvents for more information on using the GetLogEvents // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutMetricFilterRequest method. -// req, resp := client.PutMetricFilterRequest(params) +// // Example sending a request using the GetLogEventsRequest method. +// req, resp := client.GetLogEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter -func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents +func (c *CloudWatchLogs) GetLogEventsRequest(input *GetLogEventsInput) (req *request.Request, output *GetLogEventsOutput) { op := &request.Operation{ - Name: opPutMetricFilter, + Name: opGetLogEvents, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextForwardToken"}, + LimitToken: "limit", + TruncationToken: "", + }, } if input == nil { - input = &PutMetricFilterInput{} + input = &GetLogEventsInput{} } - output = &PutMetricFilterOutput{} + output = &GetLogEventsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutMetricFilter API operation for Amazon CloudWatch Logs. -// -// Creates or updates a metric filter and associates it with the specified log -// group. With metric filters, you can configure rules to extract metric data -// from log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). -// -// The maximum number of metric filters that can be associated with a log group -// is 100. +// GetLogEvents API operation for Amazon CloudWatch Logs. // -// When you create a metric filter, you can also optionally assign a unit and -// dimensions to the metric that is created. +// Lists log events from the specified log stream. You can list all of the log +// events or filter using a time range. // -// Metrics extracted from log events are charged as custom metrics. To prevent -// unexpected high charges, do not specify high-cardinality fields such as IPAddress -// or requestID as dimensions. Each different value found for a dimension is -// treated as a separate metric and accrues charges as a separate custom metric. +// 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. // -// CloudWatch Logs might disable a metric filter if it generates 1,000 different -// name/value pairs for your specified dimensions within one hour. +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // -// You can also set up a billing alarm to alert you if your charges are higher -// than expected. For more information, see Creating a Billing Alarm to Monitor -// Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). +// You can specify the log group to search by using either logGroupIdentifier +// or logGroupName. You must include one of these two parameters, but you can't +// include both. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutMetricFilter for usage and error information. +// API operation GetLogEvents for usage and error information. // // Returned Error Types: // @@ -4312,100 +4417,152 @@ func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (re // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter -func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) { - req, out := c.PutMetricFilterRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogEvents +func (c *CloudWatchLogs) GetLogEvents(input *GetLogEventsInput) (*GetLogEventsOutput, error) { + req, out := c.GetLogEventsRequest(input) return out, req.Send() } -// PutMetricFilterWithContext is the same as PutMetricFilter with the addition of +// GetLogEventsWithContext is the same as GetLogEvents with the addition of // the ability to pass a context and additional request options. // -// See PutMetricFilter for details on how to use this API operation. +// See GetLogEvents for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutMetricFilterInput, opts ...request.Option) (*PutMetricFilterOutput, error) { - req, out := c.PutMetricFilterRequest(input) +func (c *CloudWatchLogs) GetLogEventsWithContext(ctx aws.Context, input *GetLogEventsInput, opts ...request.Option) (*GetLogEventsOutput, error) { + req, out := c.GetLogEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutQueryDefinition = "PutQueryDefinition" +// GetLogEventsPages iterates over the pages of a GetLogEvents operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetLogEvents method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetLogEvents operation. +// pageNum := 0 +// err := client.GetLogEventsPages(params, +// func(page *cloudwatchlogs.GetLogEventsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *CloudWatchLogs) GetLogEventsPages(input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool) error { + return c.GetLogEventsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// PutQueryDefinitionRequest generates a "aws/request.Request" representing the -// client's request for the PutQueryDefinition operation. The "output" return +// GetLogEventsPagesWithContext same as GetLogEventsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *GetLogEventsInput, fn func(*GetLogEventsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + EndPageOnSameToken: true, + NewRequest: func() (*request.Request, error) { + var inCpy *GetLogEventsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetLogEventsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*GetLogEventsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opGetLogGroupFields = "GetLogGroupFields" + +// GetLogGroupFieldsRequest generates a "aws/request.Request" representing the +// client's request for the GetLogGroupFields operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutQueryDefinition for more information on using the PutQueryDefinition +// See GetLogGroupFields for more information on using the GetLogGroupFields // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutQueryDefinitionRequest method. -// req, resp := client.PutQueryDefinitionRequest(params) +// // Example sending a request using the GetLogGroupFieldsRequest method. +// req, resp := client.GetLogGroupFieldsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition -func (c *CloudWatchLogs) PutQueryDefinitionRequest(input *PutQueryDefinitionInput) (req *request.Request, output *PutQueryDefinitionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields +func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) (req *request.Request, output *GetLogGroupFieldsOutput) { op := &request.Operation{ - Name: opPutQueryDefinition, + Name: opGetLogGroupFields, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutQueryDefinitionInput{} + input = &GetLogGroupFieldsInput{} } - output = &PutQueryDefinitionOutput{} + output = &GetLogGroupFieldsOutput{} req = c.newRequest(op, input, output) return } -// PutQueryDefinition API operation for Amazon CloudWatch Logs. +// GetLogGroupFields API operation for Amazon CloudWatch Logs. // -// Creates or updates a query definition for CloudWatch Logs Insights. For more -// information, see Analyzing Log Data with CloudWatch Logs Insights (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). +// Returns a list of the fields that are included in log events in the specified +// log group. Includes the percentage of log events that contain each field. +// The search is limited to a time period that you specify. // -// To update a query definition, specify its queryDefinitionId in your request. -// The values of name, queryString, and logGroupNames are changed to the values -// that you specify in your update operation. No current values are retained -// from the current query definition. For example, imagine updating a current -// query definition that includes log groups. If you don't specify the logGroupNames -// parameter in your update operation, the query definition changes to contain -// no log groups. +// You can specify the log group to search by using either logGroupIdentifier +// or logGroupName. You must specify one of these parameters, but you can't +// specify both. // -// You must have the logs:PutQueryDefinition permission to be able to perform -// this operation. +// In the results, fields that start with @ are fields generated by CloudWatch +// Logs. For example, @timestamp is the timestamp of each log event. For more +// information about the fields that are generated by CloudWatch logs, see Supported +// Logs and Discovered Fields (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html). +// +// The response results are sorted by the frequency percentage, starting with +// the highest percentage. +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutQueryDefinition for usage and error information. +// API operation GetLogGroupFields for usage and error information. // // Returned Error Types: // @@ -4421,81 +4578,84 @@ func (c *CloudWatchLogs) PutQueryDefinitionRequest(input *PutQueryDefinitionInpu // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition -func (c *CloudWatchLogs) PutQueryDefinition(input *PutQueryDefinitionInput) (*PutQueryDefinitionOutput, error) { - req, out := c.PutQueryDefinitionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields +func (c *CloudWatchLogs) GetLogGroupFields(input *GetLogGroupFieldsInput) (*GetLogGroupFieldsOutput, error) { + req, out := c.GetLogGroupFieldsRequest(input) return out, req.Send() } -// PutQueryDefinitionWithContext is the same as PutQueryDefinition with the addition of +// GetLogGroupFieldsWithContext is the same as GetLogGroupFields with the addition of // the ability to pass a context and additional request options. // -// See PutQueryDefinition for details on how to use this API operation. +// See GetLogGroupFields for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutQueryDefinitionWithContext(ctx aws.Context, input *PutQueryDefinitionInput, opts ...request.Option) (*PutQueryDefinitionOutput, error) { - req, out := c.PutQueryDefinitionRequest(input) +func (c *CloudWatchLogs) GetLogGroupFieldsWithContext(ctx aws.Context, input *GetLogGroupFieldsInput, opts ...request.Option) (*GetLogGroupFieldsOutput, error) { + req, out := c.GetLogGroupFieldsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutResourcePolicy = "PutResourcePolicy" +const opGetLogRecord = "GetLogRecord" -// PutResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutResourcePolicy operation. The "output" return +// GetLogRecordRequest generates a "aws/request.Request" representing the +// client's request for the GetLogRecord operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutResourcePolicy for more information on using the PutResourcePolicy +// See GetLogRecord for more information on using the GetLogRecord // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutResourcePolicyRequest method. -// req, resp := client.PutResourcePolicyRequest(params) +// // Example sending a request using the GetLogRecordRequest method. +// req, resp := client.GetLogRecordRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy -func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord +func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *request.Request, output *GetLogRecordOutput) { op := &request.Operation{ - Name: opPutResourcePolicy, + Name: opGetLogRecord, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutResourcePolicyInput{} + input = &GetLogRecordInput{} } - output = &PutResourcePolicyOutput{} + output = &GetLogRecordOutput{} req = c.newRequest(op, input, output) return } -// PutResourcePolicy API operation for Amazon CloudWatch Logs. +// GetLogRecord API operation for Amazon CloudWatch Logs. // -// Creates or updates a resource policy allowing other Amazon Web Services services -// to put log events to this account, such as Amazon Route 53. An account can -// have up to 10 resource policies per Amazon Web Services Region. +// Retrieves all of the fields and values of a single log event. All fields +// are retrieved, even if the original query that produced the logRecordPointer +// retrieved only a subset of fields. Fields are returned as field name/field +// value pairs. +// +// The full unparsed log event is returned within @message. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutResourcePolicy for usage and error information. +// API operation GetLogRecord for usage and error information. // // Returned Error Types: // @@ -4505,103 +4665,103 @@ func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) // - LimitExceededException // You have reached the maximum number of resources that can be created. // +// - ResourceNotFoundException +// The specified resource does not exist. +// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy -func (c *CloudWatchLogs) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord +func (c *CloudWatchLogs) GetLogRecord(input *GetLogRecordInput) (*GetLogRecordOutput, error) { + req, out := c.GetLogRecordRequest(input) return out, req.Send() } -// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of +// GetLogRecordWithContext is the same as GetLogRecord with the addition of // the ability to pass a context and additional request options. // -// See PutResourcePolicy for details on how to use this API operation. +// See GetLogRecord for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { - req, out := c.PutResourcePolicyRequest(input) +func (c *CloudWatchLogs) GetLogRecordWithContext(ctx aws.Context, input *GetLogRecordInput, opts ...request.Option) (*GetLogRecordOutput, error) { + req, out := c.GetLogRecordRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutRetentionPolicy = "PutRetentionPolicy" +const opGetQueryResults = "GetQueryResults" -// PutRetentionPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutRetentionPolicy operation. The "output" return +// GetQueryResultsRequest generates a "aws/request.Request" representing the +// client's request for the GetQueryResults operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutRetentionPolicy for more information on using the PutRetentionPolicy +// See GetQueryResults for more information on using the GetQueryResults // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutRetentionPolicyRequest method. -// req, resp := client.PutRetentionPolicyRequest(params) +// // Example sending a request using the GetQueryResultsRequest method. +// req, resp := client.GetQueryResultsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy -func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults +func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { op := &request.Operation{ - Name: opPutRetentionPolicy, + Name: opGetQueryResults, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutRetentionPolicyInput{} + input = &GetQueryResultsInput{} } - output = &PutRetentionPolicyOutput{} + output = &GetQueryResultsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutRetentionPolicy API operation for Amazon CloudWatch Logs. +// GetQueryResults API operation for Amazon CloudWatch Logs. // -// Sets the retention of the specified log group. With a retention policy, you -// can configure the number of days for which to retain log events in the specified -// log group. +// Returns the results from the specified query. // -// CloudWatch Logs doesn’t immediately delete log events when they reach their -// retention setting. It typically takes up to 72 hours after that before log -// events are deleted, but in rare situations might take longer. +// Only the fields requested in the query are returned, along with a @ptr field, +// which is the identifier for the log record. You can use the value of @ptr +// in a GetLogRecord (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html) +// operation to get the full log record. // -// To illustrate, imagine that you change a log group to have a longer retention -// setting when it contains log events that are past the expiration date, but -// haven’t been deleted. Those log events will take up to 72 hours to be deleted -// after the new retention date is reached. To make sure that log data is deleted -// permanently, keep a log group at its lower retention setting until 72 hours -// after the previous retention period ends. Alternatively, wait to change the -// retention setting until you confirm that the earlier log events are deleted. +// GetQueryResults does not start running a query. To run a query, use StartQuery +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html). +// For more information about how long results of previous queries are available, +// see CloudWatch Logs quotas (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html). // -// When log events reach their retention setting they are marked for deletion. -// After they are marked for deletion, they do not add to your archival storage -// costs anymore, even if they are not actually deleted until later. These log -// events marked for deletion are also not included when you use an API to retrieve -// the storedBytes value to see how many bytes a log group is storing. +// If the value of the Status field in the output is Running, this operation +// returns only partial results. If you see a value of Scheduled or Running +// for the status, you can retry the operation later to see the final results. +// +// If you are using CloudWatch cross-account observability, you can use this +// operation in a monitoring account to start queries in linked source accounts. +// For more information, see CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutRetentionPolicy for usage and error information. +// API operation GetQueryResults for usage and error information. // // Returned Error Types: // @@ -4611,113 +4771,83 @@ func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInpu // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy -func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) { - req, out := c.PutRetentionPolicyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults +func (c *CloudWatchLogs) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { + req, out := c.GetQueryResultsRequest(input) return out, req.Send() } -// PutRetentionPolicyWithContext is the same as PutRetentionPolicy with the addition of +// GetQueryResultsWithContext is the same as GetQueryResults with the addition of // the ability to pass a context and additional request options. // -// See PutRetentionPolicy for details on how to use this API operation. +// See GetQueryResults for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutRetentionPolicyWithContext(ctx aws.Context, input *PutRetentionPolicyInput, opts ...request.Option) (*PutRetentionPolicyOutput, error) { - req, out := c.PutRetentionPolicyRequest(input) +func (c *CloudWatchLogs) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { + req, out := c.GetQueryResultsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutSubscriptionFilter = "PutSubscriptionFilter" +const opListTagsForResource = "ListTagsForResource" -// PutSubscriptionFilterRequest generates a "aws/request.Request" representing the -// client's request for the PutSubscriptionFilter operation. The "output" return +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutSubscriptionFilter for more information on using the PutSubscriptionFilter +// See ListTagsForResource for more information on using the ListTagsForResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the PutSubscriptionFilterRequest method. -// req, resp := client.PutSubscriptionFilterRequest(params) +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter -func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResource +func (c *CloudWatchLogs) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { op := &request.Operation{ - Name: opPutSubscriptionFilter, + Name: opListTagsForResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutSubscriptionFilterInput{} + input = &ListTagsForResourceInput{} } - output = &PutSubscriptionFilterOutput{} + output = &ListTagsForResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutSubscriptionFilter API operation for Amazon CloudWatch Logs. -// -// Creates or updates a subscription filter and associates it with the specified -// log group. With subscription filters, you can subscribe to a real-time stream -// of log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html) -// and have them delivered to a specific destination. When log events are sent -// to the receiving service, they are Base64 encoded and compressed with the -// GZIP format. -// -// The following destinations are supported for subscription filters: -// -// - An Amazon Kinesis data stream belonging to the same account as the subscription -// filter, for same-account delivery. -// -// - A logical destination created with PutDestination (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html) -// that belongs to a different account, for cross-account delivery. We currently -// support Kinesis Data Streams and Kinesis Data Firehose as logical destinations. -// -// - An Amazon Kinesis Data Firehose delivery stream that belongs to the -// same account as the subscription filter, for same-account delivery. -// -// - An Lambda function that belongs to the same account as the subscription -// filter, for same-account delivery. -// -// 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 filterName. +// ListTagsForResource API operation for Amazon CloudWatch Logs. // -// To perform a PutSubscriptionFilter operation for any destination except a -// Lambda function, you must also have the iam:PassRole permission. +// Displays the tags associated with a CloudWatch Logs resource. Currently, +// log groups and destinations support tagging. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation PutSubscriptionFilter for usage and error information. +// API operation ListTagsForResource for usage and error information. // // Returned Error Types: // @@ -4727,507 +4857,338 @@ func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilt // - ResourceNotFoundException // The specified resource does not exist. // -// - OperationAbortedException -// Multiple concurrent requests to update the same resource were in conflict. -// -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter -func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) { - req, out := c.PutSubscriptionFilterRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsForResource +func (c *CloudWatchLogs) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) return out, req.Send() } -// PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of // the ability to pass a context and additional request options. // -// See PutSubscriptionFilter for details on how to use this API operation. +// See ListTagsForResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) { - req, out := c.PutSubscriptionFilterRequest(input) +func (c *CloudWatchLogs) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStartLiveTail = "StartLiveTail" +const opListTagsLogGroup = "ListTagsLogGroup" -// StartLiveTailRequest generates a "aws/request.Request" representing the -// client's request for the StartLiveTail operation. The "output" return +// ListTagsLogGroupRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsLogGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StartLiveTail for more information on using the StartLiveTail +// See ListTagsLogGroup for more information on using the ListTagsLogGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the StartLiveTailRequest method. -// req, resp := client.StartLiveTailRequest(params) +// // Example sending a request using the ListTagsLogGroupRequest method. +// req, resp := client.ListTagsLogGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartLiveTail -func (c *CloudWatchLogs) StartLiveTailRequest(input *StartLiveTailInput) (req *request.Request, output *StartLiveTailOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup +// +// Deprecated: Please use the generic tagging API ListTagsForResource +func (c *CloudWatchLogs) ListTagsLogGroupRequest(input *ListTagsLogGroupInput) (req *request.Request, output *ListTagsLogGroupOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, ListTagsLogGroup, has been deprecated") + } op := &request.Operation{ - Name: opStartLiveTail, + Name: opListTagsLogGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StartLiveTailInput{} + input = &ListTagsLogGroupInput{} } - output = &StartLiveTailOutput{} + output = &ListTagsLogGroupOutput{} req = c.newRequest(op, input, output) - - es := NewStartLiveTailEventStream() - output.eventStream = es - - req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(es.runOutputStream) - es.output = output - req.Handlers.Unmarshal.PushBack(es.recvInitialEvent) - req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) - req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("streaming-", nil)) - req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) return } -// StartLiveTail API operation for Amazon CloudWatch Logs. +// ListTagsLogGroup API operation for Amazon CloudWatch Logs. +// +// The ListTagsLogGroup operation is on the path to deprecation. We recommend +// that you use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html) +// instead. +// +// Lists the tags for the specified log group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation StartLiveTail for usage and error information. +// API operation ListTagsLogGroup for usage and error information. // // Returned Error Types: // -// - AccessDeniedException -// You don't have sufficient permissions to perform this action. -// -// - InvalidParameterException -// A parameter is specified incorrectly. -// // - ResourceNotFoundException // The specified resource does not exist. // -// - LimitExceededException -// You have reached the maximum number of resources that can be created. +// - ServiceUnavailableException +// The service cannot complete the request. // -// - InvalidOperationException -// The operation is not valid on the specified resource. +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/ListTagsLogGroup // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartLiveTail -func (c *CloudWatchLogs) StartLiveTail(input *StartLiveTailInput) (*StartLiveTailOutput, error) { - req, out := c.StartLiveTailRequest(input) +// Deprecated: Please use the generic tagging API ListTagsForResource +func (c *CloudWatchLogs) ListTagsLogGroup(input *ListTagsLogGroupInput) (*ListTagsLogGroupOutput, error) { + req, out := c.ListTagsLogGroupRequest(input) return out, req.Send() } -// StartLiveTailWithContext is the same as StartLiveTail with the addition of +// ListTagsLogGroupWithContext is the same as ListTagsLogGroup with the addition of // the ability to pass a context and additional request options. // -// See StartLiveTail for details on how to use this API operation. +// See ListTagsLogGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) StartLiveTailWithContext(ctx aws.Context, input *StartLiveTailInput, opts ...request.Option) (*StartLiveTailOutput, error) { - req, out := c.StartLiveTailRequest(input) +// +// Deprecated: Please use the generic tagging API ListTagsForResource +func (c *CloudWatchLogs) ListTagsLogGroupWithContext(ctx aws.Context, input *ListTagsLogGroupInput, opts ...request.Option) (*ListTagsLogGroupOutput, error) { + req, out := c.ListTagsLogGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -var _ awserr.Error -var _ time.Time - -// StartLiveTailEventStream provides the event stream handling for the StartLiveTail. -// -// For testing and mocking the event stream this type should be initialized via -// the NewStartLiveTailEventStream constructor function. Using the functional options -// to pass in nested mock behavior. -type StartLiveTailEventStream struct { - - // Reader is the EventStream reader for the StartLiveTailResponseStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader StartLiveTailResponseStreamReader - - outputReader io.ReadCloser - output *StartLiveTailOutput - - done chan struct{} - closeOnce sync.Once - err *eventstreamapi.OnceError -} - -// NewStartLiveTailEventStream initializes an StartLiveTailEventStream. -// This function should only be used for testing and mocking the StartLiveTailEventStream -// stream within your application. -// -// The Reader member must be set before reading events from the stream. -// -// es := NewStartLiveTailEventStream(func(o *StartLiveTailEventStream){ -// es.Reader = myMockStreamReader -// }) -func NewStartLiveTailEventStream(opts ...func(*StartLiveTailEventStream)) *StartLiveTailEventStream { - es := &StartLiveTailEventStream{ - done: make(chan struct{}), - err: eventstreamapi.NewOnceError(), - } - - for _, fn := range opts { - fn(es) - } - - return es -} - -func (es *StartLiveTailEventStream) runOnStreamPartClose(r *request.Request) { - if es.done == nil { - return - } - go es.waitStreamPartClose() - -} - -func (es *StartLiveTailEventStream) waitStreamPartClose() { - var outputErrCh <-chan struct{} - if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { - outputErrCh = v.ErrorSet() - } - var outputClosedCh <-chan struct{} - if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { - outputClosedCh = v.Closed() - } - - select { - case <-es.done: - case <-outputErrCh: - es.err.SetError(es.Reader.Err()) - es.Close() - case <-outputClosedCh: - if err := es.Reader.Err(); err != nil { - es.err.SetError(es.Reader.Err()) - } - es.Close() - } -} - -type eventTypeForStartLiveTailEventStreamOutputEvent struct { - unmarshalerForEvent func(string) (eventstreamapi.Unmarshaler, error) - output *StartLiveTailOutput -} - -func (e eventTypeForStartLiveTailEventStreamOutputEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) { - if eventType == "initial-response" { - return e.output, nil - } - return e.unmarshalerForEvent(eventType) -} - -// Events returns a channel to read events from. -// -// These events are: -// -// - LiveTailSessionStart -// - LiveTailSessionUpdate -// - StartLiveTailResponseStreamUnknownEvent -func (es *StartLiveTailEventStream) Events() <-chan StartLiveTailResponseStreamEvent { - return es.Reader.Events() -} - -func (es *StartLiveTailEventStream) runOutputStream(r *request.Request) { - var opts []func(*eventstream.Decoder) - if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { - opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) - } - - unmarshalerForEvent := unmarshalerForStartLiveTailResponseStreamEvent{ - metadata: protocol.ResponseMetadata{ - StatusCode: r.HTTPResponse.StatusCode, - RequestID: r.RequestID, - }, - }.UnmarshalerForEventName - unmarshalerForEvent = eventTypeForStartLiveTailEventStreamOutputEvent{ - unmarshalerForEvent: unmarshalerForEvent, - output: es.output, - }.UnmarshalerForEventName - - decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) - eventReader := eventstreamapi.NewEventReader(decoder, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: r.Handlers.UnmarshalStream, - }, - unmarshalerForEvent, - ) - - es.outputReader = r.HTTPResponse.Body - es.Reader = newReadStartLiveTailResponseStream(eventReader) -} -func (es *StartLiveTailEventStream) recvInitialEvent(r *request.Request) { - // Wait for the initial response event, which must be the first - // event to be received from the API. - select { - case event, ok := <-es.Events(): - if !ok { - return - } - - v, ok := event.(*StartLiveTailOutput) - if !ok || v == nil { - r.Error = awserr.New( - request.ErrCodeSerialization, - fmt.Sprintf("invalid event, %T, expect %T, %v", - event, (*StartLiveTailOutput)(nil), v), - nil, - ) - return - } - - *es.output = *v - es.output.eventStream = es - } -} - -// Close closes the stream. This will also cause the stream to be closed. -// Close must be called when done using the stream API. Not calling Close -// may result in resource leaks. -// -// You can use the closing of the Reader's Events channel to terminate your -// application's read from the API's stream. -func (es *StartLiveTailEventStream) Close() (err error) { - es.closeOnce.Do(es.safeClose) - return es.Err() -} - -func (es *StartLiveTailEventStream) safeClose() { - if es.done != nil { - close(es.done) - } - - es.Reader.Close() - if es.outputReader != nil { - es.outputReader.Close() - } -} - -// Err returns any error that occurred while reading or writing EventStream -// Events from the service API's response. Returns nil if there were no errors. -func (es *StartLiveTailEventStream) Err() error { - if err := es.err.Err(); err != nil { - return err - } - if err := es.Reader.Err(); err != nil { - return err - } - - return nil -} - -const opStartQuery = "StartQuery" +const opPutAccountPolicy = "PutAccountPolicy" -// StartQueryRequest generates a "aws/request.Request" representing the -// client's request for the StartQuery operation. The "output" return +// PutAccountPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutAccountPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StartQuery for more information on using the StartQuery +// See PutAccountPolicy for more information on using the PutAccountPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the StartQueryRequest method. -// req, resp := client.StartQueryRequest(params) +// // Example sending a request using the PutAccountPolicyRequest method. +// req, resp := client.PutAccountPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery -func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutAccountPolicy +func (c *CloudWatchLogs) PutAccountPolicyRequest(input *PutAccountPolicyInput) (req *request.Request, output *PutAccountPolicyOutput) { op := &request.Operation{ - Name: opStartQuery, + Name: opPutAccountPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StartQueryInput{} + input = &PutAccountPolicyInput{} } - output = &StartQueryOutput{} + output = &PutAccountPolicyOutput{} req = c.newRequest(op, input, output) return } -// StartQuery API operation for Amazon CloudWatch Logs. +// PutAccountPolicy API operation for Amazon CloudWatch Logs. // -// 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. +// Creates an account-level data protection policy that applies to all log groups +// in the account. A data protection policy can help safeguard sensitive data +// that's ingested by your log groups by auditing and masking the sensitive +// log data. Each account can have only one account-level policy. // -// For more information, see CloudWatch Logs Insights Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). +// Sensitive data is detected and masked when it is ingested into a log group. +// When you set a data protection policy, log events ingested into the log groups +// before that time are not masked. // -// After you run a query using StartQuery, the query results are stored by CloudWatch -// Logs. You can use GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) -// to retrieve the results of a query, using the queryId that StartQuery returns. +// If you use PutAccountPolicy to create a data protection policy for your whole +// account, it applies to both existing log groups and all log groups that are +// created later in this account. The account policy is applied to existing +// log groups with eventual consistency. It might take up to 5 minutes before +// sensitive data in existing log groups begins to be masked. // -// If you have associated a KMS key with the query results in this account, -// then StartQuery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) -// uses that key to encrypt the results when it stores them. If no key is associated -// with query results, the query results are encrypted with the default CloudWatch -// Logs encryption method. +// By default, when a user views a log event that includes masked data, the +// sensitive data is replaced by asterisks. A user who has the logs:Unmask permission +// can use a GetLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) +// or FilterLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) +// operation with the unmask parameter set to true to view the unmasked log +// events. Users with the logs:Unmask can also view unmasked data in the CloudWatch +// Logs console by running a CloudWatch Logs Insights query with the unmask +// query command. // -// Queries time out after 60 minutes of runtime. If your queries are timing -// out, reduce the time range being searched or partition your query into a -// number of queries. +// For more information, including a list of types of data that can be audited +// and masked, see Protect sensitive log data with masking (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). // -// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). -// For a cross-account StartQuery operation, the query definition must be defined -// in the monitoring account. +// To use the PutAccountPolicy operation, you must be signed on with the logs:PutDataProtectionPolicy +// and logs:PutAccountPolicy permissions. // -// You can have up to 30 concurrent CloudWatch Logs insights queries, including -// queries that have been added to dashboards. +// The PutAccountPolicy operation applies to all log groups in the account. +// You can also use PutDataProtectionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html) +// to create a data protection policy that applies to just one log group. If +// a log group has its own data protection policy and the account also has an +// account-level data protection policy, then the two policies are cumulative. +// Any sensitive term specified in either policy is masked. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation StartQuery for usage and error information. +// API operation PutAccountPolicy for usage and error information. // // Returned Error Types: // -// - MalformedQueryException -// The query string is not valid. Details about this error are displayed in -// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). -// -// For more information about valid query syntax, see CloudWatch Logs Insights -// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). -// // - InvalidParameterException // A parameter is specified incorrectly. // -// - LimitExceededException -// You have reached the maximum number of resources that can be created. -// -// - ResourceNotFoundException -// The specified resource does not exist. +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery -func (c *CloudWatchLogs) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) { - req, out := c.StartQueryRequest(input) +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutAccountPolicy +func (c *CloudWatchLogs) PutAccountPolicy(input *PutAccountPolicyInput) (*PutAccountPolicyOutput, error) { + req, out := c.PutAccountPolicyRequest(input) return out, req.Send() } -// StartQueryWithContext is the same as StartQuery with the addition of +// PutAccountPolicyWithContext is the same as PutAccountPolicy with the addition of // the ability to pass a context and additional request options. // -// See StartQuery for details on how to use this API operation. +// See PutAccountPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) { - req, out := c.StartQueryRequest(input) +func (c *CloudWatchLogs) PutAccountPolicyWithContext(ctx aws.Context, input *PutAccountPolicyInput, opts ...request.Option) (*PutAccountPolicyOutput, error) { + req, out := c.PutAccountPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopQuery = "StopQuery" +const opPutDataProtectionPolicy = "PutDataProtectionPolicy" -// StopQueryRequest generates a "aws/request.Request" representing the -// client's request for the StopQuery operation. The "output" return +// PutDataProtectionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutDataProtectionPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StopQuery for more information on using the StopQuery +// See PutDataProtectionPolicy for more information on using the PutDataProtectionPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the StopQueryRequest method. -// req, resp := client.StopQueryRequest(params) +// // Example sending a request using the PutDataProtectionPolicyRequest method. +// req, resp := client.PutDataProtectionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery -func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.Request, output *StopQueryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDataProtectionPolicy +func (c *CloudWatchLogs) PutDataProtectionPolicyRequest(input *PutDataProtectionPolicyInput) (req *request.Request, output *PutDataProtectionPolicyOutput) { op := &request.Operation{ - Name: opStopQuery, + Name: opPutDataProtectionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StopQueryInput{} + input = &PutDataProtectionPolicyInput{} } - output = &StopQueryOutput{} + output = &PutDataProtectionPolicyOutput{} req = c.newRequest(op, input, output) return } -// StopQuery API operation for Amazon CloudWatch Logs. -// -// Stops a CloudWatch Logs Insights query that is in progress. If the query -// has already ended, the operation returns an error indicating that the specified -// query is not running. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. +// PutDataProtectionPolicy API operation for Amazon CloudWatch Logs. // -// See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation StopQuery for usage and error information. +// Creates a data protection policy for the specified log group. A data protection +// policy can help safeguard sensitive data that's ingested by the log group +// by auditing and masking the sensitive log data. // -// Returned Error Types: +// Sensitive data is detected and masked when it is ingested into the log group. +// When you set a data protection policy, log events ingested into the log group +// before that time are not masked. // -// - InvalidParameterException -// A parameter is specified incorrectly. +// By default, when a user views a log event that includes masked data, the +// sensitive data is replaced by asterisks. A user who has the logs:Unmask permission +// can use a GetLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html) +// or FilterLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html) +// operation with the unmask parameter set to true to view the unmasked log +// events. Users with the logs:Unmask can also view unmasked data in the CloudWatch +// Logs console by running a CloudWatch Logs Insights query with the unmask +// query command. +// +// For more information, including a list of types of data that can be audited +// and masked, see Protect sensitive log data with masking (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html). +// +// The PutDataProtectionPolicy operation applies to only the specified log group. +// You can also use PutAccountPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html) +// to create an account-level data protection policy that applies to all log +// groups in the account, including both existing log groups and log groups +// that are created level. If a log group has its own data protection policy +// and the account also has an account-level data protection policy, then the +// two policies are cumulative. Any sensitive term specified in either policy +// is masked. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation PutDataProtectionPolicy for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. // // - ResourceNotFoundException // The specified resource does not exist. @@ -5235,598 +5196,3369 @@ func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.R // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery -func (c *CloudWatchLogs) StopQuery(input *StopQueryInput) (*StopQueryOutput, error) { - req, out := c.StopQueryRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDataProtectionPolicy +func (c *CloudWatchLogs) PutDataProtectionPolicy(input *PutDataProtectionPolicyInput) (*PutDataProtectionPolicyOutput, error) { + req, out := c.PutDataProtectionPolicyRequest(input) return out, req.Send() } -// StopQueryWithContext is the same as StopQuery with the addition of +// PutDataProtectionPolicyWithContext is the same as PutDataProtectionPolicy with the addition of // the ability to pass a context and additional request options. // -// See StopQuery for details on how to use this API operation. +// See PutDataProtectionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) StopQueryWithContext(ctx aws.Context, input *StopQueryInput, opts ...request.Option) (*StopQueryOutput, error) { - req, out := c.StopQueryRequest(input) +func (c *CloudWatchLogs) PutDataProtectionPolicyWithContext(ctx aws.Context, input *PutDataProtectionPolicyInput, opts ...request.Option) (*PutDataProtectionPolicyOutput, error) { + req, out := c.PutDataProtectionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTagLogGroup = "TagLogGroup" +const opPutDeliveryDestination = "PutDeliveryDestination" -// TagLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the TagLogGroup operation. The "output" return +// PutDeliveryDestinationRequest generates a "aws/request.Request" representing the +// client's request for the PutDeliveryDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See TagLogGroup for more information on using the TagLogGroup +// See PutDeliveryDestination for more information on using the PutDeliveryDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the TagLogGroupRequest method. -// req, resp := client.TagLogGroupRequest(params) +// // Example sending a request using the PutDeliveryDestinationRequest method. +// req, resp := client.PutDeliveryDestinationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup -// -// Deprecated: Please use the generic tagging API TagResource -func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *request.Request, output *TagLogGroupOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, TagLogGroup, has been deprecated") - } +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliveryDestination +func (c *CloudWatchLogs) PutDeliveryDestinationRequest(input *PutDeliveryDestinationInput) (req *request.Request, output *PutDeliveryDestinationOutput) { op := &request.Operation{ - Name: opTagLogGroup, + Name: opPutDeliveryDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &TagLogGroupInput{} + input = &PutDeliveryDestinationInput{} } - output = &TagLogGroupOutput{} + output = &PutDeliveryDestinationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// TagLogGroup API operation for Amazon CloudWatch Logs. +// PutDeliveryDestination API operation for Amazon CloudWatch Logs. // -// The TagLogGroup operation is on the path to deprecation. We recommend that -// you use TagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html) -// instead. +// Creates or updates a logical delivery destination. 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. // -// Adds or updates the specified tags for the specified log group. +// To configure logs delivery between a supported Amazon Web Services service +// and a destination, you must do the following: // -// To list the tags for a log group, use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). -// To remove tags, use UntagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html). +// - Create a delivery source, which is a logical object that represents +// the resource that is actually sending the logs. For more information, +// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). // -// For more information about tags, see Tag Log Groups in Amazon CloudWatch -// Logs (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html#log-group-tagging) -// in the Amazon CloudWatch Logs User Guide. +// - Use PutDeliveryDestination to create a delivery destination, which is +// a logical object that represents the actual delivery destination. // -// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning -// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys -// condition keys. For more information about using tags to control access, -// see Controlling access to Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). +// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) +// in the destination account to assign an IAM policy to the destination. +// This policy allows delivery to that destination. +// +// - Use CreateDelivery to create a delivery by pairing exactly one delivery +// source and one delivery destination. For more information, see CreateDelivery +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). +// +// You can configure a single delivery source to send logs to multiple destinations +// by creating multiple deliveries. You can also create multiple deliveries +// to configure multiple delivery sources to send logs to the same delivery +// destination. +// +// Only some Amazon Web Services services support being configured as a delivery +// source. These services are listed as Supported [V2 Permissions] in the table +// at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ +// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) +// +// If you use this operation to update an existing delivery destination, all +// the current delivery destination parameters are overwritten with the new +// parameter values that you specify. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation TagLogGroup for usage and error information. +// API operation PutDeliveryDestination for usage and error information. // // Returned Error Types: // -// - ResourceNotFoundException -// The specified resource does not exist. +// - ServiceUnavailableException +// The service cannot complete the request. // -// - InvalidParameterException -// A parameter is specified incorrectly. +// - ConflictException +// This operation attempted to create a resource that already exists. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup +// - ValidationException +// One of the parameters for the request is not valid. // -// Deprecated: Please use the generic tagging API TagResource -func (c *CloudWatchLogs) TagLogGroup(input *TagLogGroupInput) (*TagLogGroupOutput, error) { - req, out := c.TagLogGroupRequest(input) +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliveryDestination +func (c *CloudWatchLogs) PutDeliveryDestination(input *PutDeliveryDestinationInput) (*PutDeliveryDestinationOutput, error) { + req, out := c.PutDeliveryDestinationRequest(input) return out, req.Send() } -// TagLogGroupWithContext is the same as TagLogGroup with the addition of +// PutDeliveryDestinationWithContext is the same as PutDeliveryDestination with the addition of // the ability to pass a context and additional request options. // -// See TagLogGroup for details on how to use this API operation. +// See PutDeliveryDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -// -// Deprecated: Please use the generic tagging API TagResource -func (c *CloudWatchLogs) TagLogGroupWithContext(ctx aws.Context, input *TagLogGroupInput, opts ...request.Option) (*TagLogGroupOutput, error) { - req, out := c.TagLogGroupRequest(input) +func (c *CloudWatchLogs) PutDeliveryDestinationWithContext(ctx aws.Context, input *PutDeliveryDestinationInput, opts ...request.Option) (*PutDeliveryDestinationOutput, error) { + req, out := c.PutDeliveryDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTagResource = "TagResource" +const opPutDeliveryDestinationPolicy = "PutDeliveryDestinationPolicy" -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return +// PutDeliveryDestinationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutDeliveryDestinationPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See TagResource for more information on using the TagResource +// See PutDeliveryDestinationPolicy for more information on using the PutDeliveryDestinationPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) +// // Example sending a request using the PutDeliveryDestinationPolicyRequest method. +// req, resp := client.PutDeliveryDestinationPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagResource -func (c *CloudWatchLogs) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliveryDestinationPolicy +func (c *CloudWatchLogs) PutDeliveryDestinationPolicyRequest(input *PutDeliveryDestinationPolicyInput) (req *request.Request, output *PutDeliveryDestinationPolicyOutput) { op := &request.Operation{ - Name: opTagResource, + Name: opPutDeliveryDestinationPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &TagResourceInput{} + input = &PutDeliveryDestinationPolicyInput{} } - output = &TagResourceOutput{} + output = &PutDeliveryDestinationPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// TagResource API operation for Amazon CloudWatch Logs. +// PutDeliveryDestinationPolicy API operation for Amazon CloudWatch Logs. // -// Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs -// resource. Currently, the only CloudWatch Logs resources that can be tagged -// are log groups and destinations. +// Creates and assigns an IAM policy that grants permissions to CloudWatch Logs +// to deliver logs cross-account to a specified destination in this account. +// To configure the delivery of logs from an Amazon Web Services service in +// another account to a logs delivery destination in the current account, you +// must do the following: // -// Tags can help you organize and categorize your resources. You can also use -// them to scope user permissions by granting a user permission to access or -// change only resources with certain tag values. +// - Create a delivery source, which is a logical object that represents +// the resource that is actually sending the logs. For more information, +// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). // -// Tags don't have any semantic meaning to Amazon Web Services and are interpreted -// strictly as strings of characters. +// - Create a delivery destination, which is a logical object that represents +// the actual delivery destination. For more information, see PutDeliveryDestination +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). // -// You can use the TagResource action with a resource that already has tags. -// If you specify a new tag key for the alarm, this tag is appended to the list -// of tags associated with the alarm. If you specify a tag key that is already -// associated with the alarm, the new tag value that you specify replaces the -// previous value for that tag. +// - Use this operation in the destination account to assign an IAM policy +// to the destination. This policy allows delivery to that destination. // -// You can associate as many as 50 tags with a CloudWatch Logs resource. +// - Create a delivery by pairing exactly one delivery source and one delivery +// destination. For more information, see CreateDelivery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). +// +// Only some Amazon Web Services services support being configured as a delivery +// source. These services are listed as Supported [V2 Permissions] in the table +// at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ +// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) +// +// The contents of the policy must include two statements. One statement enables +// general logs delivery, and the other allows delivery to the chosen destination. +// See the examples for the needed policies. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation TagResource for usage and error information. +// API operation PutDeliveryDestinationPolicy for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. +// - ServiceUnavailableException +// The service cannot complete the request. +// +// - ValidationException +// One of the parameters for the request is not valid. // // - ResourceNotFoundException // The specified resource does not exist. // -// - ServiceUnavailableException -// The service cannot complete the request. -// -// - TooManyTagsException -// A resource can have no more than 50 tags. +// - ConflictException +// This operation attempted to create a resource that already exists. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagResource -func (c *CloudWatchLogs) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliveryDestinationPolicy +func (c *CloudWatchLogs) PutDeliveryDestinationPolicy(input *PutDeliveryDestinationPolicyInput) (*PutDeliveryDestinationPolicyOutput, error) { + req, out := c.PutDeliveryDestinationPolicyRequest(input) return out, req.Send() } -// TagResourceWithContext is the same as TagResource with the addition of +// PutDeliveryDestinationPolicyWithContext is the same as PutDeliveryDestinationPolicy with the addition of // the ability to pass a context and additional request options. // -// See TagResource for details on how to use this API operation. +// See PutDeliveryDestinationPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +func (c *CloudWatchLogs) PutDeliveryDestinationPolicyWithContext(ctx aws.Context, input *PutDeliveryDestinationPolicyInput, opts ...request.Option) (*PutDeliveryDestinationPolicyOutput, error) { + req, out := c.PutDeliveryDestinationPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTestMetricFilter = "TestMetricFilter" +const opPutDeliverySource = "PutDeliverySource" -// TestMetricFilterRequest generates a "aws/request.Request" representing the -// client's request for the TestMetricFilter operation. The "output" return +// PutDeliverySourceRequest generates a "aws/request.Request" representing the +// client's request for the PutDeliverySource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See TestMetricFilter for more information on using the TestMetricFilter +// See PutDeliverySource for more information on using the PutDeliverySource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the TestMetricFilterRequest method. -// req, resp := client.TestMetricFilterRequest(params) +// // Example sending a request using the PutDeliverySourceRequest method. +// req, resp := client.PutDeliverySourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter -func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliverySource +func (c *CloudWatchLogs) PutDeliverySourceRequest(input *PutDeliverySourceInput) (req *request.Request, output *PutDeliverySourceOutput) { op := &request.Operation{ - Name: opTestMetricFilter, + Name: opPutDeliverySource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &TestMetricFilterInput{} + input = &PutDeliverySourceInput{} } - output = &TestMetricFilterOutput{} + output = &PutDeliverySourceOutput{} req = c.newRequest(op, input, output) return } -// TestMetricFilter API operation for Amazon CloudWatch Logs. +// PutDeliverySource API operation for Amazon CloudWatch Logs. // -// Tests the filter pattern of a metric filter against a sample of log event -// messages. You can use this operation to validate the correctness of a metric -// filter pattern. +// Creates or updates a logical delivery source. 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. +// +// 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: +// +// - Use PutDeliverySource to create a delivery source, which is a logical +// object that represents the resource that is actually sending the logs. +// +// - Use PutDeliveryDestination to create a delivery destination, which is +// a logical object that represents the actual delivery destination. For +// more information, see PutDeliveryDestination (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). +// +// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) +// in the destination account to assign an IAM policy to the destination. +// This policy allows delivery to that destination. +// +// - Use CreateDelivery to create a delivery by pairing exactly one delivery +// source and one delivery destination. For more information, see CreateDelivery +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). +// +// You can configure a single delivery source to send logs to multiple destinations +// by creating multiple deliveries. You can also create multiple deliveries +// to configure multiple delivery sources to send logs to the same delivery +// destination. +// +// Only some Amazon Web Services services support being configured as a delivery +// source. These services are listed as Supported [V2 Permissions] in the table +// at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ +// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) +// +// If you use this operation to update an existing delivery source, all the +// current delivery source parameters are overwritten with the new parameter +// values that you specify. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation TestMetricFilter for usage and error information. +// API operation PutDeliverySource for usage and error information. // // Returned Error Types: // -// - InvalidParameterException -// A parameter is specified incorrectly. -// // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter -func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) { - req, out := c.TestMetricFilterRequest(input) +// - ConflictException +// This operation attempted to create a resource that already exists. +// +// - ValidationException +// One of the parameters for the request is not valid. +// +// - ServiceQuotaExceededException +// This request exceeds a service quota. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - ThrottlingException +// The request was throttled because of quota limits. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDeliverySource +func (c *CloudWatchLogs) PutDeliverySource(input *PutDeliverySourceInput) (*PutDeliverySourceOutput, error) { + req, out := c.PutDeliverySourceRequest(input) return out, req.Send() } -// TestMetricFilterWithContext is the same as TestMetricFilter with the addition of +// PutDeliverySourceWithContext is the same as PutDeliverySource with the addition of // the ability to pass a context and additional request options. // -// See TestMetricFilter for details on how to use this API operation. +// See PutDeliverySource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) TestMetricFilterWithContext(ctx aws.Context, input *TestMetricFilterInput, opts ...request.Option) (*TestMetricFilterOutput, error) { - req, out := c.TestMetricFilterRequest(input) +func (c *CloudWatchLogs) PutDeliverySourceWithContext(ctx aws.Context, input *PutDeliverySourceInput, opts ...request.Option) (*PutDeliverySourceOutput, error) { + req, out := c.PutDeliverySourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUntagLogGroup = "UntagLogGroup" +const opPutDestination = "PutDestination" -// UntagLogGroupRequest generates a "aws/request.Request" representing the -// client's request for the UntagLogGroup operation. The "output" return +// PutDestinationRequest generates a "aws/request.Request" representing the +// client's request for the PutDestination operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UntagLogGroup for more information on using the UntagLogGroup +// See PutDestination for more information on using the PutDestination // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the UntagLogGroupRequest method. -// req, resp := client.UntagLogGroupRequest(params) +// // Example sending a request using the PutDestinationRequest method. +// req, resp := client.PutDestinationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup -// -// Deprecated: Please use the generic tagging API UntagResource -func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *request.Request, output *UntagLogGroupOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, UntagLogGroup, has been deprecated") - } +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination +func (c *CloudWatchLogs) PutDestinationRequest(input *PutDestinationInput) (req *request.Request, output *PutDestinationOutput) { op := &request.Operation{ - Name: opUntagLogGroup, + Name: opPutDestination, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UntagLogGroupInput{} + input = &PutDestinationInput{} } - output = &UntagLogGroupOutput{} + output = &PutDestinationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UntagLogGroup API operation for Amazon CloudWatch Logs. +// PutDestination API operation for Amazon CloudWatch Logs. // -// The UntagLogGroup operation is on the path to deprecation. We recommend that -// you use UntagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html) -// instead. +// Creates or updates a destination. This operation is used only to create destinations +// for cross-account subscriptions. // -// Removes the specified tags from the specified log group. +// A destination encapsulates a physical resource (such as an Amazon Kinesis +// stream). With a destination, you can subscribe to a real-time stream of log +// events for a different account, ingested using PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). // -// To list the tags for a log group, use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). -// To add tags, use TagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html). +// Through an access policy, a destination controls what is written to it. By +// default, PutDestination does not set any access policy with the destination, +// which means a cross-account user cannot call PutSubscriptionFilter (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html) +// against this destination. To enable this, the destination owner must call +// PutDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html) +// after PutDestination. // -// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning -// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys -// condition keys. +// To perform a PutDestination operation, you must also have the iam:PassRole +// permission. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation UntagLogGroup for usage and error information. +// API operation PutDestination for usage and error information. // // Returned Error Types: -// - ResourceNotFoundException -// The specified resource does not exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup +// - InvalidParameterException +// A parameter is specified incorrectly. // -// Deprecated: Please use the generic tagging API UntagResource -func (c *CloudWatchLogs) UntagLogGroup(input *UntagLogGroupInput) (*UntagLogGroupOutput, error) { - req, out := c.UntagLogGroupRequest(input) +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestination +func (c *CloudWatchLogs) PutDestination(input *PutDestinationInput) (*PutDestinationOutput, error) { + req, out := c.PutDestinationRequest(input) return out, req.Send() } -// UntagLogGroupWithContext is the same as UntagLogGroup with the addition of +// PutDestinationWithContext is the same as PutDestination with the addition of // the ability to pass a context and additional request options. // -// See UntagLogGroup for details on how to use this API operation. +// See PutDestination for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -// -// Deprecated: Please use the generic tagging API UntagResource -func (c *CloudWatchLogs) UntagLogGroupWithContext(ctx aws.Context, input *UntagLogGroupInput, opts ...request.Option) (*UntagLogGroupOutput, error) { - req, out := c.UntagLogGroupRequest(input) +func (c *CloudWatchLogs) PutDestinationWithContext(ctx aws.Context, input *PutDestinationInput, opts ...request.Option) (*PutDestinationOutput, error) { + req, out := c.PutDestinationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUntagResource = "UntagResource" +const opPutDestinationPolicy = "PutDestinationPolicy" -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return +// PutDestinationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutDestinationPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UntagResource for more information on using the UntagResource +// See PutDestinationPolicy for more information on using the PutDestinationPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) +// // Example sending a request using the PutDestinationPolicyRequest method. +// req, resp := client.PutDestinationPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagResource -func (c *CloudWatchLogs) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy +func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicyInput) (req *request.Request, output *PutDestinationPolicyOutput) { op := &request.Operation{ - Name: opUntagResource, + Name: opPutDestinationPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UntagResourceInput{} + input = &PutDestinationPolicyInput{} } - output = &UntagResourceOutput{} + output = &PutDestinationPolicyOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UntagResource API operation for Amazon CloudWatch Logs. +// PutDestinationPolicy API operation for Amazon CloudWatch Logs. // -// Removes one or more tags from the specified resource. +// Creates or updates an access policy associated with an existing destination. +// An access policy is an IAM policy document (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html) +// that is used to authorize claims to register a subscription filter against +// a given destination. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Logs's -// API operation UntagResource for usage and error information. +// API operation PutDestinationPolicy for usage and error information. // // Returned Error Types: // // - InvalidParameterException // A parameter is specified incorrectly. // -// - ResourceNotFoundException -// The specified resource does not exist. +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. // // - ServiceUnavailableException // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagResource -func (c *CloudWatchLogs) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutDestinationPolicy +func (c *CloudWatchLogs) PutDestinationPolicy(input *PutDestinationPolicyInput) (*PutDestinationPolicyOutput, error) { + req, out := c.PutDestinationPolicyRequest(input) return out, req.Send() } -// UntagResourceWithContext is the same as UntagResource with the addition of +// PutDestinationPolicyWithContext is the same as PutDestinationPolicy with the addition of // the ability to pass a context and additional request options. // -// See UntagResource for details on how to use this API operation. +// See PutDestinationPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchLogs) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +func (c *CloudWatchLogs) PutDestinationPolicyWithContext(ctx aws.Context, input *PutDestinationPolicyInput, opts ...request.Option) (*PutDestinationPolicyOutput, error) { + req, out := c.PutDestinationPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// You don't have sufficient permissions to perform this action. -type AccessDeniedException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"message" type:"string"` -} +const opPutLogEvents = "PutLogEvents" -// String returns the string representation. +// PutLogEventsRequest generates a "aws/request.Request" representing the +// client's request for the PutLogEvents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. // -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessDeniedException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessDeniedException) GoString() string { - return s.String() -} - -func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { - return &AccessDeniedException{ - RespMetadata: v, +// See PutLogEvents for more information on using the PutLogEvents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the PutLogEventsRequest method. +// req, resp := client.PutLogEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents +func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *request.Request, output *PutLogEventsOutput) { + op := &request.Operation{ + Name: opPutLogEvents, + HTTPMethod: "POST", + HTTPPath: "/", } -} - -// Code returns the exception type name. -func (s *AccessDeniedException) Code() string { - return "AccessDeniedException" -} -// Message returns the exception's message. -func (s *AccessDeniedException) Message() string { - if s.Message_ != nil { - return *s.Message_ + if input == nil { + input = &PutLogEventsInput{} } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *AccessDeniedException) OrigErr() error { - return nil -} -func (s *AccessDeniedException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) + output = &PutLogEventsOutput{} + req = c.newRequest(op, input, output) + return } -// Status code returns the HTTP status code for the request's response error. -func (s *AccessDeniedException) StatusCode() int { - return s.RespMetadata.StatusCode +// PutLogEvents API operation for Amazon CloudWatch Logs. +// +// Uploads a batch of log events to the specified log stream. +// +// The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions +// are always accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException +// even if the sequence token is not valid. You can use parallel PutLogEvents +// actions on the same log stream. +// +// The batch of events must satisfy the following constraints: +// +// - The maximum batch size is 1,048,576 bytes. This size is calculated as +// the sum of all event messages in UTF-8, plus 26 bytes for each log event. +// +// - None of the log events in the batch can be more than 2 hours in the +// future. +// +// - None of the log events in the batch can be more than 14 days in the +// past. Also, none of the log events can be from earlier than the retention +// period of the log group. +// +// - The log events in the batch must be in chronological order by their +// timestamp. The timestamp is the time that the event occurred, expressed +// as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In Amazon +// Web Services Tools for PowerShell and the Amazon Web Services SDK for +// .NET, the timestamp is specified in .NET format: yyyy-mm-ddThh:mm:ss. +// For example, 2017-09-15T13:45:30.) +// +// - A batch of log events in a single request cannot span more than 24 hours. +// Otherwise, the operation fails. +// +// - Each log event can be no larger than 256 KB. +// +// - The maximum number of log events in a batch is 10,000. +// +// - The quota of five requests per second per log stream has been removed. +// Instead, PutLogEvents 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. +// +// If a call to PutLogEvents returns "UnrecognizedClientException" the most +// likely cause is a non-valid Amazon Web Services access key ID or secret key. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation PutLogEvents for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - InvalidSequenceTokenException +// The sequence token is not valid. You can get the correct sequence token in +// the expectedSequenceToken field in the InvalidSequenceTokenException message. +// +// PutLogEvents actions are now always accepted and never return InvalidSequenceTokenException +// regardless of receiving an invalid sequence token. +// +// - DataAlreadyAcceptedException +// The event was already logged. +// +// PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException +// regardless of whether a given batch of log events has already been accepted. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// - UnrecognizedClientException +// The most likely cause is an Amazon Web Services access key ID or secret key +// that's not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutLogEvents +func (c *CloudWatchLogs) PutLogEvents(input *PutLogEventsInput) (*PutLogEventsOutput, error) { + req, out := c.PutLogEventsRequest(input) + return out, req.Send() } -// RequestID returns the service's response RequestID for request. -func (s *AccessDeniedException) RequestID() string { - return s.RespMetadata.RequestID +// PutLogEventsWithContext is the same as PutLogEvents with the addition of +// the ability to pass a context and additional request options. +// +// See PutLogEvents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) PutLogEventsWithContext(ctx aws.Context, input *PutLogEventsInput, opts ...request.Option) (*PutLogEventsOutput, error) { + req, out := c.PutLogEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() } -// A structure that contains information about one CloudWatch Logs account policy. -type AccountPolicy struct { - _ struct{} `type:"structure"` +const opPutMetricFilter = "PutMetricFilter" - // The Amazon Web Services account ID that the policy applies to. - AccountId *string `locationName:"accountId" min:"12" type:"string"` +// PutMetricFilterRequest generates a "aws/request.Request" representing the +// client's request for the PutMetricFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutMetricFilter for more information on using the PutMetricFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the PutMetricFilterRequest method. +// req, resp := client.PutMetricFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter +func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (req *request.Request, output *PutMetricFilterOutput) { + op := &request.Operation{ + Name: opPutMetricFilter, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutMetricFilterInput{} + } + + output = &PutMetricFilterOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutMetricFilter API operation for Amazon CloudWatch Logs. +// +// Creates or updates a metric filter and associates it with the specified log +// group. With metric filters, you can configure rules to extract metric data +// from log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html). +// +// The maximum number of metric filters that can be associated with a log group +// is 100. +// +// When you create a metric filter, you can also optionally assign a unit and +// dimensions to the metric that is created. +// +// Metrics extracted from log events are charged as custom metrics. To prevent +// unexpected high charges, do not specify high-cardinality fields such as IPAddress +// or requestID as dimensions. Each different value found for a dimension is +// treated as a separate metric and accrues charges as a separate custom metric. +// +// CloudWatch Logs might disable a metric filter if it generates 1,000 different +// name/value pairs for your specified dimensions within one hour. +// +// You can also set up a billing alarm to alert you if your charges are higher +// than expected. For more information, see Creating a Billing Alarm to Monitor +// Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation PutMetricFilter for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutMetricFilter +func (c *CloudWatchLogs) PutMetricFilter(input *PutMetricFilterInput) (*PutMetricFilterOutput, error) { + req, out := c.PutMetricFilterRequest(input) + return out, req.Send() +} + +// PutMetricFilterWithContext is the same as PutMetricFilter with the addition of +// the ability to pass a context and additional request options. +// +// See PutMetricFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) PutMetricFilterWithContext(ctx aws.Context, input *PutMetricFilterInput, opts ...request.Option) (*PutMetricFilterOutput, error) { + req, out := c.PutMetricFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutQueryDefinition = "PutQueryDefinition" + +// PutQueryDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the PutQueryDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutQueryDefinition for more information on using the PutQueryDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the PutQueryDefinitionRequest method. +// req, resp := client.PutQueryDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition +func (c *CloudWatchLogs) PutQueryDefinitionRequest(input *PutQueryDefinitionInput) (req *request.Request, output *PutQueryDefinitionOutput) { + op := &request.Operation{ + Name: opPutQueryDefinition, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutQueryDefinitionInput{} + } + + output = &PutQueryDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutQueryDefinition API operation for Amazon CloudWatch Logs. +// +// Creates or updates a query definition for CloudWatch Logs Insights. For more +// information, see Analyzing Log Data with CloudWatch Logs Insights (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html). +// +// To update a query definition, specify its queryDefinitionId in your request. +// The values of name, queryString, and logGroupNames are changed to the values +// that you specify in your update operation. No current values are retained +// from the current query definition. For example, imagine updating a current +// query definition that includes log groups. If you don't specify the logGroupNames +// parameter in your update operation, the query definition changes to contain +// no log groups. +// +// You must have the logs:PutQueryDefinition permission to be able to perform +// this operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation PutQueryDefinition for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutQueryDefinition +func (c *CloudWatchLogs) PutQueryDefinition(input *PutQueryDefinitionInput) (*PutQueryDefinitionOutput, error) { + req, out := c.PutQueryDefinitionRequest(input) + return out, req.Send() +} + +// PutQueryDefinitionWithContext is the same as PutQueryDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See PutQueryDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) PutQueryDefinitionWithContext(ctx aws.Context, input *PutQueryDefinitionInput, opts ...request.Option) (*PutQueryDefinitionOutput, error) { + req, out := c.PutQueryDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutResourcePolicy = "PutResourcePolicy" + +// PutResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutResourcePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutResourcePolicy for more information on using the PutResourcePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the PutResourcePolicyRequest method. +// req, resp := client.PutResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy +func (c *CloudWatchLogs) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { + op := &request.Operation{ + Name: opPutResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutResourcePolicyInput{} + } + + output = &PutResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutResourcePolicy API operation for Amazon CloudWatch Logs. +// +// Creates or updates a resource policy allowing other Amazon Web Services services +// to put log events to this account, such as Amazon Route 53. An account can +// have up to 10 resource policies per Amazon Web Services Region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation PutResourcePolicy for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutResourcePolicy +func (c *CloudWatchLogs) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + return out, req.Send() +} + +// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutResourcePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutRetentionPolicy = "PutRetentionPolicy" + +// PutRetentionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutRetentionPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutRetentionPolicy for more information on using the PutRetentionPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the PutRetentionPolicyRequest method. +// req, resp := client.PutRetentionPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy +func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) { + op := &request.Operation{ + Name: opPutRetentionPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutRetentionPolicyInput{} + } + + output = &PutRetentionPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutRetentionPolicy API operation for Amazon CloudWatch Logs. +// +// Sets the retention of the specified log group. With a retention policy, you +// can configure the number of days for which to retain log events in the specified +// log group. +// +// CloudWatch Logs doesn’t immediately delete log events when they reach their +// retention setting. It typically takes up to 72 hours after that before log +// events are deleted, but in rare situations might take longer. +// +// To illustrate, imagine that you change a log group to have a longer retention +// setting when it contains log events that are past the expiration date, but +// haven’t been deleted. Those log events will take up to 72 hours to be deleted +// after the new retention date is reached. To make sure that log data is deleted +// permanently, keep a log group at its lower retention setting until 72 hours +// after the previous retention period ends. Alternatively, wait to change the +// retention setting until you confirm that the earlier log events are deleted. +// +// When log events reach their retention setting they are marked for deletion. +// After they are marked for deletion, they do not add to your archival storage +// costs anymore, even if they are not actually deleted until later. These log +// events marked for deletion are also not included when you use an API to retrieve +// the storedBytes value to see how many bytes a log group is storing. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation PutRetentionPolicy for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutRetentionPolicy +func (c *CloudWatchLogs) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) { + req, out := c.PutRetentionPolicyRequest(input) + return out, req.Send() +} + +// PutRetentionPolicyWithContext is the same as PutRetentionPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutRetentionPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) PutRetentionPolicyWithContext(ctx aws.Context, input *PutRetentionPolicyInput, opts ...request.Option) (*PutRetentionPolicyOutput, error) { + req, out := c.PutRetentionPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutSubscriptionFilter = "PutSubscriptionFilter" + +// PutSubscriptionFilterRequest generates a "aws/request.Request" representing the +// client's request for the PutSubscriptionFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutSubscriptionFilter for more information on using the PutSubscriptionFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the PutSubscriptionFilterRequest method. +// req, resp := client.PutSubscriptionFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter +func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilterInput) (req *request.Request, output *PutSubscriptionFilterOutput) { + op := &request.Operation{ + Name: opPutSubscriptionFilter, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutSubscriptionFilterInput{} + } + + output = &PutSubscriptionFilterOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutSubscriptionFilter API operation for Amazon CloudWatch Logs. +// +// Creates or updates a subscription filter and associates it with the specified +// log group. With subscription filters, you can subscribe to a real-time stream +// of log events ingested through PutLogEvents (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html) +// and have them delivered to a specific destination. When log events are sent +// to the receiving service, they are Base64 encoded and compressed with the +// GZIP format. +// +// The following destinations are supported for subscription filters: +// +// - An Amazon Kinesis data stream belonging to the same account as the subscription +// filter, for same-account delivery. +// +// - A logical destination created with PutDestination (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html) +// that belongs to a different account, for cross-account delivery. We currently +// support Kinesis Data Streams and Kinesis Data Firehose as logical destinations. +// +// - An Amazon Kinesis Data Firehose delivery stream that belongs to the +// same account as the subscription filter, for same-account delivery. +// +// - An Lambda function that belongs to the same account as the subscription +// filter, for same-account delivery. +// +// 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 filterName. +// +// To perform a PutSubscriptionFilter operation for any destination except a +// Lambda function, you must also have the iam:PassRole permission. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation PutSubscriptionFilter for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - OperationAbortedException +// Multiple concurrent requests to update the same resource were in conflict. +// +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter +func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) { + req, out := c.PutSubscriptionFilterRequest(input) + return out, req.Send() +} + +// PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of +// the ability to pass a context and additional request options. +// +// See PutSubscriptionFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) { + req, out := c.PutSubscriptionFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartQuery = "StartQuery" + +// StartQueryRequest generates a "aws/request.Request" representing the +// client's request for the StartQuery operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartQuery for more information on using the StartQuery +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the StartQueryRequest method. +// req, resp := client.StartQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery +func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) { + op := &request.Operation{ + Name: opStartQuery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartQueryInput{} + } + + output = &StartQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartQuery API operation for Amazon CloudWatch Logs. +// +// 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. +// +// For more information, see CloudWatch Logs Insights Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). +// +// After you run a query using StartQuery, the query results are stored by CloudWatch +// Logs. You can use GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) +// to retrieve the results of a query, using the queryId that StartQuery returns. +// +// If you have associated a KMS key with the query results in this account, +// then StartQuery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) +// uses that key to encrypt the results when it stores them. If no key is associated +// with query results, the query results are encrypted with the default CloudWatch +// Logs encryption method. +// +// Queries time out after 60 minutes of runtime. If your queries are timing +// out, reduce the time range being searched or partition your query into a +// number of queries. +// +// 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 CloudWatch cross-account observability (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html). +// For a cross-account StartQuery operation, the query definition must be defined +// in the monitoring account. +// +// You can have up to 30 concurrent CloudWatch Logs insights queries, including +// queries that have been added to dashboards. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation StartQuery for usage and error information. +// +// Returned Error Types: +// +// - MalformedQueryException +// The query string is not valid. Details about this error are displayed in +// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). +// +// For more information about valid query syntax, see CloudWatch Logs Insights +// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - LimitExceededException +// You have reached the maximum number of resources that can be created. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery +func (c *CloudWatchLogs) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) { + req, out := c.StartQueryRequest(input) + return out, req.Send() +} + +// StartQueryWithContext is the same as StartQuery with the addition of +// the ability to pass a context and additional request options. +// +// See StartQuery for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) { + req, out := c.StartQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopQuery = "StopQuery" + +// StopQueryRequest generates a "aws/request.Request" representing the +// client's request for the StopQuery operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopQuery for more information on using the StopQuery +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the StopQueryRequest method. +// req, resp := client.StopQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery +func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.Request, output *StopQueryOutput) { + op := &request.Operation{ + Name: opStopQuery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopQueryInput{} + } + + output = &StopQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopQuery API operation for Amazon CloudWatch Logs. +// +// Stops a CloudWatch Logs Insights query that is in progress. If the query +// has already ended, the operation returns an error indicating that the specified +// query is not running. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation StopQuery for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery +func (c *CloudWatchLogs) StopQuery(input *StopQueryInput) (*StopQueryOutput, error) { + req, out := c.StopQueryRequest(input) + return out, req.Send() +} + +// StopQueryWithContext is the same as StopQuery with the addition of +// the ability to pass a context and additional request options. +// +// See StopQuery for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) StopQueryWithContext(ctx aws.Context, input *StopQueryInput, opts ...request.Option) (*StopQueryOutput, error) { + req, out := c.StopQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagLogGroup = "TagLogGroup" + +// TagLogGroupRequest generates a "aws/request.Request" representing the +// client's request for the TagLogGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagLogGroup for more information on using the TagLogGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the TagLogGroupRequest method. +// req, resp := client.TagLogGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup +// +// Deprecated: Please use the generic tagging API TagResource +func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *request.Request, output *TagLogGroupOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, TagLogGroup, has been deprecated") + } + op := &request.Operation{ + Name: opTagLogGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagLogGroupInput{} + } + + output = &TagLogGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagLogGroup API operation for Amazon CloudWatch Logs. +// +// The TagLogGroup operation is on the path to deprecation. We recommend that +// you use TagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html) +// instead. +// +// Adds or updates the specified tags for the specified log group. +// +// To list the tags for a log group, use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). +// To remove tags, use UntagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html). +// +// For more information about tags, see Tag Log Groups in Amazon CloudWatch +// Logs (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html#log-group-tagging) +// in the Amazon CloudWatch Logs User Guide. +// +// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning +// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys +// condition keys. For more information about using tags to control access, +// see Controlling access to Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation TagLogGroup for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagLogGroup +// +// Deprecated: Please use the generic tagging API TagResource +func (c *CloudWatchLogs) TagLogGroup(input *TagLogGroupInput) (*TagLogGroupOutput, error) { + req, out := c.TagLogGroupRequest(input) + return out, req.Send() +} + +// TagLogGroupWithContext is the same as TagLogGroup with the addition of +// the ability to pass a context and additional request options. +// +// See TagLogGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +// +// Deprecated: Please use the generic tagging API TagResource +func (c *CloudWatchLogs) TagLogGroupWithContext(ctx aws.Context, input *TagLogGroupInput, opts ...request.Option) (*TagLogGroupOutput, error) { + req, out := c.TagLogGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagResource +func (c *CloudWatchLogs) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon CloudWatch Logs. +// +// Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs +// resource. Currently, the only CloudWatch Logs resources that can be tagged +// are log groups and destinations. +// +// Tags can help you organize and categorize your resources. You can also use +// them to scope user permissions by granting a user permission to access or +// change only resources with certain tag values. +// +// Tags don't have any semantic meaning to Amazon Web Services and are interpreted +// strictly as strings of characters. +// +// You can use the TagResource action with a resource that already has tags. +// If you specify a new tag key for the alarm, this tag is appended to the list +// of tags associated with the alarm. If you specify a tag key that is already +// associated with the alarm, the new tag value that you specify replaces the +// previous value for that tag. +// +// You can associate as many as 50 tags with a CloudWatch Logs resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation TagResource for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// - TooManyTagsException +// A resource can have no more than 50 tags. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TagResource +func (c *CloudWatchLogs) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTestMetricFilter = "TestMetricFilter" + +// TestMetricFilterRequest generates a "aws/request.Request" representing the +// client's request for the TestMetricFilter operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TestMetricFilter for more information on using the TestMetricFilter +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the TestMetricFilterRequest method. +// req, resp := client.TestMetricFilterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter +func (c *CloudWatchLogs) TestMetricFilterRequest(input *TestMetricFilterInput) (req *request.Request, output *TestMetricFilterOutput) { + op := &request.Operation{ + Name: opTestMetricFilter, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TestMetricFilterInput{} + } + + output = &TestMetricFilterOutput{} + req = c.newRequest(op, input, output) + return +} + +// TestMetricFilter API operation for Amazon CloudWatch Logs. +// +// Tests the filter pattern of a metric filter against a sample of log event +// messages. You can use this operation to validate the correctness of a metric +// filter pattern. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation TestMetricFilter for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/TestMetricFilter +func (c *CloudWatchLogs) TestMetricFilter(input *TestMetricFilterInput) (*TestMetricFilterOutput, error) { + req, out := c.TestMetricFilterRequest(input) + return out, req.Send() +} + +// TestMetricFilterWithContext is the same as TestMetricFilter with the addition of +// the ability to pass a context and additional request options. +// +// See TestMetricFilter for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) TestMetricFilterWithContext(ctx aws.Context, input *TestMetricFilterInput, opts ...request.Option) (*TestMetricFilterOutput, error) { + req, out := c.TestMetricFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagLogGroup = "UntagLogGroup" + +// UntagLogGroupRequest generates a "aws/request.Request" representing the +// client's request for the UntagLogGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagLogGroup for more information on using the UntagLogGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the UntagLogGroupRequest method. +// req, resp := client.UntagLogGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup +// +// Deprecated: Please use the generic tagging API UntagResource +func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *request.Request, output *UntagLogGroupOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, UntagLogGroup, has been deprecated") + } + op := &request.Operation{ + Name: opUntagLogGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagLogGroupInput{} + } + + output = &UntagLogGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagLogGroup API operation for Amazon CloudWatch Logs. +// +// The UntagLogGroup operation is on the path to deprecation. We recommend that +// you use UntagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html) +// instead. +// +// Removes the specified tags from the specified log group. +// +// To list the tags for a log group, use ListTagsForResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html). +// To add tags, use TagResource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html). +// +// CloudWatch Logs doesn’t support IAM policies that prevent users from assigning +// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys +// condition keys. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation UntagLogGroup for usage and error information. +// +// Returned Error Types: +// - ResourceNotFoundException +// The specified resource does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagLogGroup +// +// Deprecated: Please use the generic tagging API UntagResource +func (c *CloudWatchLogs) UntagLogGroup(input *UntagLogGroupInput) (*UntagLogGroupOutput, error) { + req, out := c.UntagLogGroupRequest(input) + return out, req.Send() +} + +// UntagLogGroupWithContext is the same as UntagLogGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UntagLogGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +// +// Deprecated: Please use the generic tagging API UntagResource +func (c *CloudWatchLogs) UntagLogGroupWithContext(ctx aws.Context, input *UntagLogGroupInput, opts ...request.Option) (*UntagLogGroupOutput, error) { + req, out := c.UntagLogGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagResource +func (c *CloudWatchLogs) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon CloudWatch Logs. +// +// Removes one or more tags from the specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// +// - InvalidParameterException +// A parameter is specified incorrectly. +// +// - ResourceNotFoundException +// The specified resource does not exist. +// +// - ServiceUnavailableException +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/UntagResource +func (c *CloudWatchLogs) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchLogs) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// You don't have sufficient permissions to perform this action. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + +// A structure that contains information about one CloudWatch Logs account policy. +type AccountPolicy struct { + _ struct{} `type:"structure"` + + // The Amazon Web Services account ID that the policy applies to. + AccountId *string `locationName:"accountId" min:"12" type:"string"` + + // The date and time that this policy was most recently updated. + LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` + + // The policy document for this account policy. + // + // The JSON specified in policyDocument can be up to 30,720 characters. + PolicyDocument *string `locationName:"policyDocument" type:"string"` + + // The name of the account policy. + PolicyName *string `locationName:"policyName" type:"string"` + + // The type of policy for this account policy. + PolicyType *string `locationName:"policyType" type:"string" enum:"PolicyType"` + + // The scope of the account policy. + Scope *string `locationName:"scope" type:"string" enum:"Scope"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccountPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccountPolicy) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *AccountPolicy) SetAccountId(v string) *AccountPolicy { + s.AccountId = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *AccountPolicy) SetLastUpdatedTime(v int64) *AccountPolicy { + s.LastUpdatedTime = &v + return s +} + +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *AccountPolicy) SetPolicyDocument(v string) *AccountPolicy { + s.PolicyDocument = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *AccountPolicy) SetPolicyName(v string) *AccountPolicy { + s.PolicyName = &v + return s +} + +// SetPolicyType sets the PolicyType field's value. +func (s *AccountPolicy) SetPolicyType(v string) *AccountPolicy { + s.PolicyType = &v + return s +} + +// SetScope sets the Scope field's value. +func (s *AccountPolicy) SetScope(v string) *AccountPolicy { + s.Scope = &v + return s +} + +type AssociateKmsKeyInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log + // data. This must be a symmetric KMS key. For more information, see Amazon + // Resource Names (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms) + // and Using Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html). + // + // KmsKeyId is a required field + KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"` + + // The name of the log group. + // + // In your AssociateKmsKey operation, you must specify either the resourceIdentifier + // parameter or the logGroup parameter, but you can't specify both. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // Specifies the target for this operation. You must specify one of the following: + // + // * Specify the following ARN to have future GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) + // operations in this account encrypt the results with the specified KMS + // key. Replace REGION and ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:query-result:* + // + // * Specify the ARN of a log group to have CloudWatch Logs use the KMS key + // to encrypt log events that are ingested and stored by that log group. + // The log group ARN must be in the following format. Replace REGION and + // ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME + // + // In your AssociateKmsKey operation, you must specify either the resourceIdentifier + // parameter or the logGroup parameter, but you can't specify both. + ResourceIdentifier *string `locationName:"resourceIdentifier" min:"1" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateKmsKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateKmsKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateKmsKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateKmsKeyInput"} + if s.KmsKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KmsKeyId")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.ResourceIdentifier != nil && len(*s.ResourceIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *AssociateKmsKeyInput) SetKmsKeyId(v string) *AssociateKmsKeyInput { + s.KmsKeyId = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *AssociateKmsKeyInput) SetLogGroupName(v string) *AssociateKmsKeyInput { + s.LogGroupName = &v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *AssociateKmsKeyInput) SetResourceIdentifier(v string) *AssociateKmsKeyInput { + s.ResourceIdentifier = &v + return s +} + +type AssociateKmsKeyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateKmsKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateKmsKeyOutput) GoString() string { + return s.String() +} + +type CancelExportTaskInput struct { + _ struct{} `type:"structure"` + + // The ID of the export task. + // + // TaskId is a required field + TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CancelExportTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CancelExportTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelExportTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"} + if s.TaskId == nil { + invalidParams.Add(request.NewErrParamRequired("TaskId")) + } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTaskId sets the TaskId field's value. +func (s *CancelExportTaskInput) SetTaskId(v string) *CancelExportTaskInput { + s.TaskId = &v + return s +} + +type CancelExportTaskOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CancelExportTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CancelExportTaskOutput) GoString() string { + return s.String() +} + +// This operation attempted to create a resource that already exists. +type ConflictException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ConflictException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ConflictException) GoString() string { + return s.String() +} + +func newErrorConflictException(v protocol.ResponseMetadata) error { + return &ConflictException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ConflictException) Code() string { + return "ConflictException" +} + +// Message returns the exception's message. +func (s *ConflictException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ConflictException) OrigErr() error { + return nil +} + +func (s *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID +} + +type CreateDeliveryInput struct { + _ struct{} `type:"structure"` + + // The ARN of the delivery destination to use for this delivery. + // + // DeliveryDestinationArn is a required field + DeliveryDestinationArn *string `locationName:"deliveryDestinationArn" type:"string" required:"true"` + + // The name of the delivery source to use for this delivery. + // + // DeliverySourceName is a required field + DeliverySourceName *string `locationName:"deliverySourceName" min:"1" type:"string" required:"true"` + + // An optional list of key-value pairs to associate with the resource. + // + // For more information about tagging, see Tagging Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + Tags map[string]*string `locationName:"tags" min:"1" type:"map"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateDeliveryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateDeliveryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeliveryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeliveryInput"} + if s.DeliveryDestinationArn == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationArn")) + } + if s.DeliverySourceName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliverySourceName")) + } + if s.DeliverySourceName != nil && len(*s.DeliverySourceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliverySourceName", 1)) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryDestinationArn sets the DeliveryDestinationArn field's value. +func (s *CreateDeliveryInput) SetDeliveryDestinationArn(v string) *CreateDeliveryInput { + s.DeliveryDestinationArn = &v + return s +} + +// SetDeliverySourceName sets the DeliverySourceName field's value. +func (s *CreateDeliveryInput) SetDeliverySourceName(v string) *CreateDeliveryInput { + s.DeliverySourceName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDeliveryInput) SetTags(v map[string]*string) *CreateDeliveryInput { + s.Tags = v + return s +} + +type CreateDeliveryOutput struct { + _ struct{} `type:"structure"` + + // A structure that contains information about the delivery that you just created. + Delivery *Delivery `locationName:"delivery" type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateDeliveryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateDeliveryOutput) GoString() string { + return s.String() +} + +// SetDelivery sets the Delivery field's value. +func (s *CreateDeliveryOutput) SetDelivery(v *Delivery) *CreateDeliveryOutput { + s.Delivery = v + return s +} + +type CreateExportTaskInput struct { + _ struct{} `type:"structure"` + + // The name of S3 bucket for the exported log data. The bucket must be in the + // same Amazon Web Services Region. + // + // Destination is a required field + Destination *string `locationName:"destination" min:"1" type:"string" required:"true"` + + // The prefix used as the start of the key for every object exported. If you + // don't specify a value, the default is exportedlogs. + DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` + + // The start time of the range for the request, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this + // time are not exported. + // + // From is a required field + From *int64 `locationName:"from" type:"long" required:"true"` + + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + + // Export only log streams that match the provided prefix. If you don't specify + // a value, no prefix filter is applied. + LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` + + // The name of the export task. + TaskName *string `locationName:"taskName" min:"1" type:"string"` + + // The end time of the range for the request, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time + // are not exported. + // + // You must specify a time that is not earlier than when this log group was + // created. + // + // To is a required field + To *int64 `locationName:"to" type:"long" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateExportTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateExportTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateExportTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.Destination != nil && len(*s.Destination) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Destination", 1)) + } + if s.From == nil { + invalidParams.Add(request.NewErrParamRequired("From")) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) + } + if s.TaskName != nil && len(*s.TaskName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskName", 1)) + } + if s.To == nil { + invalidParams.Add(request.NewErrParamRequired("To")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestination sets the Destination field's value. +func (s *CreateExportTaskInput) SetDestination(v string) *CreateExportTaskInput { + s.Destination = &v + return s +} + +// SetDestinationPrefix sets the DestinationPrefix field's value. +func (s *CreateExportTaskInput) SetDestinationPrefix(v string) *CreateExportTaskInput { + s.DestinationPrefix = &v + return s +} + +// SetFrom sets the From field's value. +func (s *CreateExportTaskInput) SetFrom(v int64) *CreateExportTaskInput { + s.From = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *CreateExportTaskInput) SetLogGroupName(v string) *CreateExportTaskInput { + s.LogGroupName = &v + return s +} + +// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. +func (s *CreateExportTaskInput) SetLogStreamNamePrefix(v string) *CreateExportTaskInput { + s.LogStreamNamePrefix = &v + return s +} + +// SetTaskName sets the TaskName field's value. +func (s *CreateExportTaskInput) SetTaskName(v string) *CreateExportTaskInput { + s.TaskName = &v + return s +} + +// SetTo sets the To field's value. +func (s *CreateExportTaskInput) SetTo(v int64) *CreateExportTaskInput { + s.To = &v + return s +} + +type CreateExportTaskOutput struct { + _ struct{} `type:"structure"` + + // The ID of the export task. + TaskId *string `locationName:"taskId" min:"1" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateExportTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateExportTaskOutput) GoString() string { + return s.String() +} + +// SetTaskId sets the TaskId field's value. +func (s *CreateExportTaskOutput) SetTaskId(v string) *CreateExportTaskOutput { + s.TaskId = &v + return s +} + +type CreateLogGroupInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log + // data. For more information, see Amazon Resource Names (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms). + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + + // The key-value pairs to use for the tags. + // + // You can grant users access to certain log groups while preventing them from + // accessing other log groups. To do so, tag your groups and use IAM policies + // that refer to those tags. To assign tags when you create a log group, you + // must have either the logs:TagResource or logs:TagLogGroup permission. For + // more information about tagging, see Tagging Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). For more + // information about using tags to control access, see Controlling access to + // Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). + Tags map[string]*string `locationName:"tags" min:"1" type:"map"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateLogGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateLogGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLogGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateLogGroupInput) SetKmsKeyId(v string) *CreateLogGroupInput { + s.KmsKeyId = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *CreateLogGroupInput) SetLogGroupName(v string) *CreateLogGroupInput { + s.LogGroupName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLogGroupInput) SetTags(v map[string]*string) *CreateLogGroupInput { + s.Tags = v + return s +} + +type CreateLogGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateLogGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateLogGroupOutput) GoString() string { + return s.String() +} + +type CreateLogStreamInput struct { + _ struct{} `type:"structure"` + + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + + // The name of the log stream. + // + // LogStreamName is a required field + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateLogStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateLogStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLogStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *CreateLogStreamInput) SetLogGroupName(v string) *CreateLogStreamInput { + s.LogGroupName = &v + return s +} + +// SetLogStreamName sets the LogStreamName field's value. +func (s *CreateLogStreamInput) SetLogStreamName(v string) *CreateLogStreamInput { + s.LogStreamName = &v + return s +} + +type CreateLogStreamOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateLogStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateLogStreamOutput) GoString() string { + return s.String() +} + +// The event was already logged. +// +// PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException +// regardless of whether a given batch of log events has already been accepted. +type DataAlreadyAcceptedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + ExpectedSequenceToken *string `locationName:"expectedSequenceToken" min:"1" type:"string"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DataAlreadyAcceptedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DataAlreadyAcceptedException) GoString() string { + return s.String() +} + +func newErrorDataAlreadyAcceptedException(v protocol.ResponseMetadata) error { + return &DataAlreadyAcceptedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *DataAlreadyAcceptedException) Code() string { + return "DataAlreadyAcceptedException" +} + +// Message returns the exception's message. +func (s *DataAlreadyAcceptedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *DataAlreadyAcceptedException) OrigErr() error { + return nil +} + +func (s *DataAlreadyAcceptedException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *DataAlreadyAcceptedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *DataAlreadyAcceptedException) RequestID() string { + return s.RespMetadata.RequestID +} + +type DeleteAccountPolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the policy to delete. + // + // PolicyName is a required field + PolicyName *string `locationName:"policyName" type:"string" required:"true"` + + // The type of policy to delete. Currently, the only valid value is DATA_PROTECTION_POLICY. + // + // PolicyType is a required field + PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteAccountPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteAccountPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAccountPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAccountPolicyInput"} + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyType == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyName sets the PolicyName field's value. +func (s *DeleteAccountPolicyInput) SetPolicyName(v string) *DeleteAccountPolicyInput { + s.PolicyName = &v + return s +} + +// SetPolicyType sets the PolicyType field's value. +func (s *DeleteAccountPolicyInput) SetPolicyType(v string) *DeleteAccountPolicyInput { + s.PolicyType = &v + return s +} + +type DeleteAccountPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteAccountPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteAccountPolicyOutput) GoString() string { + return s.String() +} + +type DeleteDataProtectionPolicyInput struct { + _ struct{} `type:"structure"` + + // The name or ARN of the log group that you want to delete the data protection + // policy for. + // + // LogGroupIdentifier is a required field + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDataProtectionPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDataProtectionPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDataProtectionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDataProtectionPolicyInput"} + if s.LogGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) + } + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *DeleteDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *DeleteDataProtectionPolicyInput { + s.LogGroupIdentifier = &v + return s +} + +type DeleteDataProtectionPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDataProtectionPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDataProtectionPolicyOutput) GoString() string { + return s.String() +} + +type DeleteDeliveryDestinationInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery destination that you want to delete. You can find + // a list of delivery destionation names by using the DescribeDeliveryDestinations + // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveryDestinations.html) + // operation. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryDestinationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryDestinationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeliveryDestinationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryDestinationInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteDeliveryDestinationInput) SetName(v string) *DeleteDeliveryDestinationInput { + s.Name = &v + return s +} + +type DeleteDeliveryDestinationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryDestinationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryDestinationOutput) GoString() string { + return s.String() +} + +type DeleteDeliveryDestinationPolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery destination that you want to delete the policy for. + // + // DeliveryDestinationName is a required field + DeliveryDestinationName *string `locationName:"deliveryDestinationName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryDestinationPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryDestinationPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeliveryDestinationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryDestinationPolicyInput"} + if s.DeliveryDestinationName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationName")) + } + if s.DeliveryDestinationName != nil && len(*s.DeliveryDestinationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryDestinationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryDestinationName sets the DeliveryDestinationName field's value. +func (s *DeleteDeliveryDestinationPolicyInput) SetDeliveryDestinationName(v string) *DeleteDeliveryDestinationPolicyInput { + s.DeliveryDestinationName = &v + return s +} + +type DeleteDeliveryDestinationPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryDestinationPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryDestinationPolicyOutput) GoString() string { + return s.String() +} + +type DeleteDeliveryInput struct { + _ struct{} `type:"structure"` + + // The unique ID of the delivery to delete. You can find the ID of a delivery + // with the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) + // operation. + // + // Id is a required field + Id *string `locationName:"id" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeliveryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeliveryInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DeleteDeliveryInput) SetId(v string) *DeleteDeliveryInput { + s.Id = &v + return s +} + +type DeleteDeliveryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliveryOutput) GoString() string { + return s.String() +} + +type DeleteDeliverySourceInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery source that you want to delete. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliverySourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliverySourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeliverySourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeliverySourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteDeliverySourceInput) SetName(v string) *DeleteDeliverySourceInput { + s.Name = &v + return s +} + +type DeleteDeliverySourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliverySourceOutput) String() string { + return awsutil.Prettify(s) +} - // The date and time that this policy was most recently updated. - LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDeliverySourceOutput) GoString() string { + return s.String() +} - // The policy document for this account policy. +type DeleteDestinationInput struct { + _ struct{} `type:"structure"` + + // The name of the destination. // - // The JSON specified in policyDocument can be up to 30,720 characters. - PolicyDocument *string `locationName:"policyDocument" type:"string"` + // DestinationName is a required field + DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` +} - // The name of the account policy. - PolicyName *string `locationName:"policyName" type:"string"` +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDestinationInput) String() string { + return awsutil.Prettify(s) +} - // The type of policy for this account policy. - PolicyType *string `locationName:"policyType" type:"string" enum:"PolicyType"` +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteDestinationInput) GoString() string { + return s.String() +} - // The scope of the account policy. - Scope *string `locationName:"scope" type:"string" enum:"Scope"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDestinationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"} + if s.DestinationName == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationName")) + } + if s.DestinationName != nil && len(*s.DestinationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestinationName sets the DestinationName field's value. +func (s *DeleteDestinationInput) SetDestinationName(v string) *DeleteDestinationInput { + s.DestinationName = &v + return s +} + +type DeleteDestinationOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation. @@ -5834,7 +8566,7 @@ type AccountPolicy struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s AccountPolicy) String() string { +func (s DeleteDestinationOutput) String() string { return awsutil.Prettify(s) } @@ -5843,77 +8575,181 @@ func (s AccountPolicy) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s AccountPolicy) GoString() string { +func (s DeleteDestinationOutput) GoString() string { return s.String() } -// SetAccountId sets the AccountId field's value. -func (s *AccountPolicy) SetAccountId(v string) *AccountPolicy { - s.AccountId = &v - return s -} +type DeleteLogGroupInput struct { + _ struct{} `type:"structure"` -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *AccountPolicy) SetLastUpdatedTime(v int64) *AccountPolicy { - s.LastUpdatedTime = &v - return s + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` } -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *AccountPolicy) SetPolicyDocument(v string) *AccountPolicy { - s.PolicyDocument = &v - return s +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteLogGroupInput) String() string { + return awsutil.Prettify(s) } -// SetPolicyName sets the PolicyName field's value. -func (s *AccountPolicy) SetPolicyName(v string) *AccountPolicy { - s.PolicyName = &v - return s +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteLogGroupInput) GoString() string { + return s.String() } -// SetPolicyType sets the PolicyType field's value. -func (s *AccountPolicy) SetPolicyType(v string) *AccountPolicy { - s.PolicyType = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLogGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetScope sets the Scope field's value. -func (s *AccountPolicy) SetScope(v string) *AccountPolicy { - s.Scope = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *DeleteLogGroupInput) SetLogGroupName(v string) *DeleteLogGroupInput { + s.LogGroupName = &v return s } -type AssociateKmsKeyInput struct { +type DeleteLogGroupOutput struct { _ struct{} `type:"structure"` +} - // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log - // data. This must be a symmetric KMS key. For more information, see Amazon - // Resource Names (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms) - // and Using Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html). - // - // KmsKeyId is a required field - KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"` +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteLogGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteLogGroupOutput) GoString() string { + return s.String() +} + +type DeleteLogStreamInput struct { + _ struct{} `type:"structure"` // The name of the log group. // - // In your AssociateKmsKey operation, you must specify either the resourceIdentifier - // parameter or the logGroup parameter, but you can't specify both. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - // Specifies the target for this operation. You must specify one of the following: - // - // * Specify the following ARN to have future GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) - // operations in this account encrypt the results with the specified KMS - // key. Replace REGION and ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:query-result:* + // The name of the log stream. // - // * Specify the ARN of a log group to have CloudWatch Logs use the KMS key - // to encrypt log events that are ingested and stored by that log group. - // The log group ARN must be in the following format. Replace REGION and - // ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME + // LogStreamName is a required field + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteLogStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteLogStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLogStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *DeleteLogStreamInput) SetLogGroupName(v string) *DeleteLogStreamInput { + s.LogGroupName = &v + return s +} + +// SetLogStreamName sets the LogStreamName field's value. +func (s *DeleteLogStreamInput) SetLogStreamName(v string) *DeleteLogStreamInput { + s.LogStreamName = &v + return s +} + +type DeleteLogStreamOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteLogStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteLogStreamOutput) GoString() string { + return s.String() +} + +type DeleteMetricFilterInput struct { + _ struct{} `type:"structure"` + + // The name of the metric filter. // - // In your AssociateKmsKey operation, you must specify either the resourceIdentifier - // parameter or the logGroup parameter, but you can't specify both. - ResourceIdentifier *string `locationName:"resourceIdentifier" min:"1" type:"string"` + // FilterName is a required field + FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` + + // The name of the log group. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -5921,7 +8757,7 @@ type AssociateKmsKeyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s AssociateKmsKeyInput) String() string { +func (s DeleteMetricFilterInput) String() string { return awsutil.Prettify(s) } @@ -5930,22 +8766,25 @@ func (s AssociateKmsKeyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s AssociateKmsKeyInput) GoString() string { +func (s DeleteMetricFilterInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateKmsKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateKmsKeyInput"} - if s.KmsKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KmsKeyId")) +func (s *DeleteMetricFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"} + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) } if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } - if s.ResourceIdentifier != nil && len(*s.ResourceIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifier", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -5953,25 +8792,19 @@ func (s *AssociateKmsKeyInput) Validate() error { return nil } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *AssociateKmsKeyInput) SetKmsKeyId(v string) *AssociateKmsKeyInput { - s.KmsKeyId = &v +// SetFilterName sets the FilterName field's value. +func (s *DeleteMetricFilterInput) SetFilterName(v string) *DeleteMetricFilterInput { + s.FilterName = &v return s } // SetLogGroupName sets the LogGroupName field's value. -func (s *AssociateKmsKeyInput) SetLogGroupName(v string) *AssociateKmsKeyInput { +func (s *DeleteMetricFilterInput) SetLogGroupName(v string) *DeleteMetricFilterInput { s.LogGroupName = &v return s } -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *AssociateKmsKeyInput) SetResourceIdentifier(v string) *AssociateKmsKeyInput { - s.ResourceIdentifier = &v - return s -} - -type AssociateKmsKeyOutput struct { +type DeleteMetricFilterOutput struct { _ struct{} `type:"structure"` } @@ -5980,7 +8813,7 @@ type AssociateKmsKeyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s AssociateKmsKeyOutput) String() string { +func (s DeleteMetricFilterOutput) String() string { return awsutil.Prettify(s) } @@ -5989,17 +8822,19 @@ func (s AssociateKmsKeyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s AssociateKmsKeyOutput) GoString() string { +func (s DeleteMetricFilterOutput) GoString() string { return s.String() } -type CancelExportTaskInput struct { +type DeleteQueryDefinitionInput struct { _ struct{} `type:"structure"` - // The ID of the export task. + // The ID of the query definition that you want to delete. You can use DescribeQueryDefinitions + // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html) + // to retrieve the IDs of your saved query definitions. // - // TaskId is a required field - TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` + // QueryDefinitionId is a required field + QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string" required:"true"` } // String returns the string representation. @@ -6007,7 +8842,7 @@ type CancelExportTaskInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CancelExportTaskInput) String() string { +func (s DeleteQueryDefinitionInput) String() string { return awsutil.Prettify(s) } @@ -6016,18 +8851,15 @@ func (s CancelExportTaskInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CancelExportTaskInput) GoString() string { +func (s DeleteQueryDefinitionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CancelExportTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CancelExportTaskInput"} - if s.TaskId == nil { - invalidParams.Add(request.NewErrParamRequired("TaskId")) - } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) +func (s *DeleteQueryDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteQueryDefinitionInput"} + if s.QueryDefinitionId == nil { + invalidParams.Add(request.NewErrParamRequired("QueryDefinitionId")) } if invalidParams.Len() > 0 { @@ -6036,14 +8868,18 @@ func (s *CancelExportTaskInput) Validate() error { return nil } -// SetTaskId sets the TaskId field's value. -func (s *CancelExportTaskInput) SetTaskId(v string) *CancelExportTaskInput { - s.TaskId = &v +// SetQueryDefinitionId sets the QueryDefinitionId field's value. +func (s *DeleteQueryDefinitionInput) SetQueryDefinitionId(v string) *DeleteQueryDefinitionInput { + s.QueryDefinitionId = &v return s } -type CancelExportTaskOutput struct { +type DeleteQueryDefinitionOutput struct { _ struct{} `type:"structure"` + + // A value of TRUE indicates that the operation succeeded. FALSE indicates that + // the operation failed. + Success *bool `locationName:"success" type:"boolean"` } // String returns the string representation. @@ -6051,7 +8887,7 @@ type CancelExportTaskOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CancelExportTaskOutput) String() string { +func (s DeleteQueryDefinitionOutput) String() string { return awsutil.Prettify(s) } @@ -6060,51 +8896,21 @@ func (s CancelExportTaskOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CancelExportTaskOutput) GoString() string { +func (s DeleteQueryDefinitionOutput) GoString() string { return s.String() } -type CreateExportTaskInput struct { - _ struct{} `type:"structure"` - - // The name of S3 bucket for the exported log data. The bucket must be in the - // same Amazon Web Services Region. - // - // Destination is a required field - Destination *string `locationName:"destination" min:"1" type:"string" required:"true"` - - // The prefix used as the start of the key for every object exported. If you - // don't specify a value, the default is exportedlogs. - DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` - - // The start time of the range for the request, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this - // time are not exported. - // - // From is a required field - From *int64 `locationName:"from" type:"long" required:"true"` - - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // Export only log streams that match the provided prefix. If you don't specify - // a value, no prefix filter is applied. - LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` +// SetSuccess sets the Success field's value. +func (s *DeleteQueryDefinitionOutput) SetSuccess(v bool) *DeleteQueryDefinitionOutput { + s.Success = &v + return s +} - // The name of the export task. - TaskName *string `locationName:"taskName" min:"1" type:"string"` +type DeleteResourcePolicyInput struct { + _ struct{} `type:"structure"` - // The end time of the range for the request, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time - // are not exported. - // - // You must specify a time that is not earlier than when this log group was - // created. - // - // To is a required field - To *int64 `locationName:"to" type:"long" required:"true"` + // The name of the policy to be revoked. This parameter is required. + PolicyName *string `locationName:"policyName" type:"string"` } // String returns the string representation. @@ -6112,7 +8918,7 @@ type CreateExportTaskInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateExportTaskInput) String() string { +func (s DeleteResourcePolicyInput) String() string { return awsutil.Prettify(s) } @@ -6121,91 +8927,18 @@ func (s CreateExportTaskInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateExportTaskInput) GoString() string { +func (s DeleteResourcePolicyInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateExportTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateExportTaskInput"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.Destination != nil && len(*s.Destination) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Destination", 1)) - } - if s.From == nil { - invalidParams.Add(request.NewErrParamRequired("From")) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) - } - if s.TaskName != nil && len(*s.TaskName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskName", 1)) - } - if s.To == nil { - invalidParams.Add(request.NewErrParamRequired("To")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination sets the Destination field's value. -func (s *CreateExportTaskInput) SetDestination(v string) *CreateExportTaskInput { - s.Destination = &v - return s -} - -// SetDestinationPrefix sets the DestinationPrefix field's value. -func (s *CreateExportTaskInput) SetDestinationPrefix(v string) *CreateExportTaskInput { - s.DestinationPrefix = &v - return s -} - -// SetFrom sets the From field's value. -func (s *CreateExportTaskInput) SetFrom(v int64) *CreateExportTaskInput { - s.From = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateExportTaskInput) SetLogGroupName(v string) *CreateExportTaskInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. -func (s *CreateExportTaskInput) SetLogStreamNamePrefix(v string) *CreateExportTaskInput { - s.LogStreamNamePrefix = &v - return s -} - -// SetTaskName sets the TaskName field's value. -func (s *CreateExportTaskInput) SetTaskName(v string) *CreateExportTaskInput { - s.TaskName = &v - return s -} - -// SetTo sets the To field's value. -func (s *CreateExportTaskInput) SetTo(v int64) *CreateExportTaskInput { - s.To = &v +// SetPolicyName sets the PolicyName field's value. +func (s *DeleteResourcePolicyInput) SetPolicyName(v string) *DeleteResourcePolicyInput { + s.PolicyName = &v return s } -type CreateExportTaskOutput struct { +type DeleteResourcePolicyOutput struct { _ struct{} `type:"structure"` - - // The ID of the export task. - TaskId *string `locationName:"taskId" min:"1" type:"string"` } // String returns the string representation. @@ -6213,7 +8946,7 @@ type CreateExportTaskOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateExportTaskOutput) String() string { +func (s DeleteResourcePolicyOutput) String() string { return awsutil.Prettify(s) } @@ -6222,39 +8955,17 @@ func (s CreateExportTaskOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateExportTaskOutput) GoString() string { +func (s DeleteResourcePolicyOutput) GoString() string { return s.String() } -// SetTaskId sets the TaskId field's value. -func (s *CreateExportTaskOutput) SetTaskId(v string) *CreateExportTaskOutput { - s.TaskId = &v - return s -} - -type CreateLogGroupInput struct { +type DeleteRetentionPolicyInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log - // data. For more information, see Amazon Resource Names (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms). - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The name of the log group. // // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The key-value pairs to use for the tags. - // - // You can grant users access to certain log groups while preventing them from - // accessing other log groups. To do so, tag your groups and use IAM policies - // that refer to those tags. To assign tags when you create a log group, you - // must have either the logs:TagResource or logs:TagLogGroup permission. For - // more information about tagging, see Tagging Amazon Web Services resources - // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html). For more - // information about using tags to control access, see Controlling access to - // Amazon Web Services resources using tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). - Tags map[string]*string `locationName:"tags" min:"1" type:"map"` + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -6262,7 +8973,7 @@ type CreateLogGroupInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateLogGroupInput) String() string { +func (s DeleteRetentionPolicyInput) String() string { return awsutil.Prettify(s) } @@ -6271,22 +8982,19 @@ func (s CreateLogGroupInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateLogGroupInput) GoString() string { +func (s DeleteRetentionPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLogGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLogGroupInput"} +func (s *DeleteRetentionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"} if s.LogGroupName == nil { invalidParams.Add(request.NewErrParamRequired("LogGroupName")) } if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -6294,25 +9002,13 @@ func (s *CreateLogGroupInput) Validate() error { return nil } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateLogGroupInput) SetKmsKeyId(v string) *CreateLogGroupInput { - s.KmsKeyId = &v - return s -} - // SetLogGroupName sets the LogGroupName field's value. -func (s *CreateLogGroupInput) SetLogGroupName(v string) *CreateLogGroupInput { +func (s *DeleteRetentionPolicyInput) SetLogGroupName(v string) *DeleteRetentionPolicyInput { s.LogGroupName = &v return s } -// SetTags sets the Tags field's value. -func (s *CreateLogGroupInput) SetTags(v map[string]*string) *CreateLogGroupInput { - s.Tags = v - return s -} - -type CreateLogGroupOutput struct { +type DeleteRetentionPolicyOutput struct { _ struct{} `type:"structure"` } @@ -6321,7 +9017,7 @@ type CreateLogGroupOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateLogGroupOutput) String() string { +func (s DeleteRetentionPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -6330,22 +9026,22 @@ func (s CreateLogGroupOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateLogGroupOutput) GoString() string { +func (s DeleteRetentionPolicyOutput) GoString() string { return s.String() } -type CreateLogStreamInput struct { +type DeleteSubscriptionFilterInput struct { _ struct{} `type:"structure"` + // The name of the subscription filter. + // + // FilterName is a required field + FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` + // The name of the log group. // // LogGroupName is a required field LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` - - // The name of the log stream. - // - // LogStreamName is a required field - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -6353,7 +9049,7 @@ type CreateLogStreamInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateLogStreamInput) String() string { +func (s DeleteSubscriptionFilterInput) String() string { return awsutil.Prettify(s) } @@ -6362,25 +9058,25 @@ func (s CreateLogStreamInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateLogStreamInput) GoString() string { +func (s DeleteSubscriptionFilterInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLogStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLogStreamInput"} +func (s *DeleteSubscriptionFilterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"} + if s.FilterName == nil { + invalidParams.Add(request.NewErrParamRequired("FilterName")) + } + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } if s.LogGroupName == nil { invalidParams.Add(request.NewErrParamRequired("LogGroupName")) } if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } - if s.LogStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamName")) - } - if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -6388,19 +9084,19 @@ func (s *CreateLogStreamInput) Validate() error { return nil } -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateLogStreamInput) SetLogGroupName(v string) *CreateLogStreamInput { - s.LogGroupName = &v +// SetFilterName sets the FilterName field's value. +func (s *DeleteSubscriptionFilterInput) SetFilterName(v string) *DeleteSubscriptionFilterInput { + s.FilterName = &v return s } -// SetLogStreamName sets the LogStreamName field's value. -func (s *CreateLogStreamInput) SetLogStreamName(v string) *CreateLogStreamInput { - s.LogStreamName = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *DeleteSubscriptionFilterInput) SetLogGroupName(v string) *DeleteSubscriptionFilterInput { + s.LogGroupName = &v return s } -type CreateLogStreamOutput struct { +type DeleteSubscriptionFilterOutput struct { _ struct{} `type:"structure"` } @@ -6409,7 +9105,7 @@ type CreateLogStreamOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateLogStreamOutput) String() string { +func (s DeleteSubscriptionFilterOutput) String() string { return awsutil.Prettify(s) } @@ -6418,91 +9114,39 @@ func (s CreateLogStreamOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateLogStreamOutput) GoString() string { +func (s DeleteSubscriptionFilterOutput) GoString() string { return s.String() } -// The event was already logged. +// This structure contains information about one delivery in your account. // -// PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException -// regardless of whether a given batch of log events has already been accepted. -type DataAlreadyAcceptedException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - ExpectedSequenceToken *string `locationName:"expectedSequenceToken" min:"1" type:"string"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. +// A delivery is a connection between a logical delivery source and a logical +// delivery destination. // -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DataAlreadyAcceptedException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. +// For more information, see CreateDelivery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). // -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DataAlreadyAcceptedException) GoString() string { - return s.String() -} - -func newErrorDataAlreadyAcceptedException(v protocol.ResponseMetadata) error { - return &DataAlreadyAcceptedException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *DataAlreadyAcceptedException) Code() string { - return "DataAlreadyAcceptedException" -} - -// Message returns the exception's message. -func (s *DataAlreadyAcceptedException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *DataAlreadyAcceptedException) OrigErr() error { - return nil -} +// You can't update an existing delivery. You can only create and delete deliveries. +type Delivery struct { + _ struct{} `type:"structure"` -func (s *DataAlreadyAcceptedException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} + // The Amazon Resource Name (ARN) that uniquely identifies this delivery. + Arn *string `locationName:"arn" type:"string"` -// Status code returns the HTTP status code for the request's response error. -func (s *DataAlreadyAcceptedException) StatusCode() int { - return s.RespMetadata.StatusCode -} + // The ARN of the delivery destination that is associated with this delivery. + DeliveryDestinationArn *string `locationName:"deliveryDestinationArn" type:"string"` -// RequestID returns the service's response RequestID for request. -func (s *DataAlreadyAcceptedException) RequestID() string { - return s.RespMetadata.RequestID -} + // Displays whether the delivery destination associated with this delivery is + // CloudWatch Logs, Amazon S3, or Kinesis Data Firehose. + DeliveryDestinationType *string `locationName:"deliveryDestinationType" type:"string" enum:"DeliveryDestinationType"` -type DeleteAccountPolicyInput struct { - _ struct{} `type:"structure"` + // The name of the delivery source that is associated with this delivery. + DeliverySourceName *string `locationName:"deliverySourceName" min:"1" type:"string"` - // The name of the policy to delete. - // - // PolicyName is a required field - PolicyName *string `locationName:"policyName" type:"string" required:"true"` + // The unique ID that identifies this delivery in your account. + Id *string `locationName:"id" min:"1" type:"string"` - // The type of policy to delete. Currently, the only valid value is DATA_PROTECTION_POLICY. - // - // PolicyType is a required field - PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` + // The tags that have been assigned to this delivery. + Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } // String returns the string representation. @@ -6510,7 +9154,7 @@ type DeleteAccountPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteAccountPolicyInput) String() string { +func (s Delivery) String() string { return awsutil.Prettify(s) } @@ -6519,68 +9163,95 @@ func (s DeleteAccountPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteAccountPolicyInput) GoString() string { +func (s Delivery) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAccountPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAccountPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyType == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetArn sets the Arn field's value. +func (s *Delivery) SetArn(v string) *Delivery { + s.Arn = &v + return s } -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteAccountPolicyInput) SetPolicyName(v string) *DeleteAccountPolicyInput { - s.PolicyName = &v +// SetDeliveryDestinationArn sets the DeliveryDestinationArn field's value. +func (s *Delivery) SetDeliveryDestinationArn(v string) *Delivery { + s.DeliveryDestinationArn = &v return s } -// SetPolicyType sets the PolicyType field's value. -func (s *DeleteAccountPolicyInput) SetPolicyType(v string) *DeleteAccountPolicyInput { - s.PolicyType = &v +// SetDeliveryDestinationType sets the DeliveryDestinationType field's value. +func (s *Delivery) SetDeliveryDestinationType(v string) *Delivery { + s.DeliveryDestinationType = &v return s } -type DeleteAccountPolicyOutput struct { - _ struct{} `type:"structure"` +// SetDeliverySourceName sets the DeliverySourceName field's value. +func (s *Delivery) SetDeliverySourceName(v string) *Delivery { + s.DeliverySourceName = &v + return s } -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPolicyOutput) String() string { - return awsutil.Prettify(s) +// SetId sets the Id field's value. +func (s *Delivery) SetId(v string) *Delivery { + s.Id = &v + return s } -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPolicyOutput) GoString() string { - return s.String() +// SetTags sets the Tags field's value. +func (s *Delivery) SetTags(v map[string]*string) *Delivery { + s.Tags = v + return s } -type DeleteDataProtectionPolicyInput struct { +// This structure contains information about one delivery destination in your +// account. A delivery destination is an Amazon Web Services resource that represents +// an shared id="AWS"/> service that logs can be sent to. CloudWatch Logs, Amazon +// S3, are supported as Kinesis Data Firehose delivery destinations. +// +// To configure logs delivery between a supported Amazon Web Services service +// and a destination, you must do the following: +// +// - Create a delivery source, which is a logical object that represents +// the resource that is actually sending the logs. For more information, +// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). +// +// - Create a delivery destination, which is a logical object that represents +// the actual delivery destination. +// +// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) +// in the destination account to assign an IAM policy to the destination. +// This policy allows delivery to that destination. +// +// - Create a delivery by pairing exactly one delivery source and one delivery +// destination. For more information, see CreateDelivery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). +// +// You can configure a single delivery source to send logs to multiple destinations +// by creating multiple deliveries. You can also create multiple deliveries +// to configure multiple delivery sources to send logs to the same delivery +// destination. +type DeliveryDestination struct { _ struct{} `type:"structure"` - // The name or ARN of the log group that you want to delete the data protection - // policy for. - // - // LogGroupIdentifier is a required field - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` + // The Amazon Resource Name (ARN) that uniquely identifies this delivery destination. + Arn *string `locationName:"arn" type:"string"` + + // A structure that contains the ARN of the Amazon Web Services resource that + // will receive the logs. + DeliveryDestinationConfiguration *DeliveryDestinationConfiguration `locationName:"deliveryDestinationConfiguration" type:"structure"` + + // Displays whether this delivery destination is CloudWatch Logs, Amazon S3, + // or Kinesis Data Firehose. + DeliveryDestinationType *string `locationName:"deliveryDestinationType" type:"string" enum:"DeliveryDestinationType"` + + // The name of this delivery destination. + Name *string `locationName:"name" min:"1" type:"string"` + + // The format of the logs that are sent to this delivery destination. + OutputFormat *string `locationName:"outputFormat" type:"string" enum:"OutputFormat"` + + // The tags that have been assigned to this delivery destination. + Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } // String returns the string representation. @@ -6588,7 +9259,7 @@ type DeleteDataProtectionPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteDataProtectionPolicyInput) String() string { +func (s DeliveryDestination) String() string { return awsutil.Prettify(s) } @@ -6597,61 +9268,56 @@ func (s DeleteDataProtectionPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteDataProtectionPolicyInput) GoString() string { +func (s DeliveryDestination) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDataProtectionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDataProtectionPolicyInput"} - if s.LogGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) - } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetArn sets the Arn field's value. +func (s *DeliveryDestination) SetArn(v string) *DeliveryDestination { + s.Arn = &v + return s } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *DeleteDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *DeleteDataProtectionPolicyInput { - s.LogGroupIdentifier = &v +// SetDeliveryDestinationConfiguration sets the DeliveryDestinationConfiguration field's value. +func (s *DeliveryDestination) SetDeliveryDestinationConfiguration(v *DeliveryDestinationConfiguration) *DeliveryDestination { + s.DeliveryDestinationConfiguration = v return s } -type DeleteDataProtectionPolicyOutput struct { - _ struct{} `type:"structure"` +// SetDeliveryDestinationType sets the DeliveryDestinationType field's value. +func (s *DeliveryDestination) SetDeliveryDestinationType(v string) *DeliveryDestination { + s.DeliveryDestinationType = &v + return s } - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDataProtectionPolicyOutput) String() string { - return awsutil.Prettify(s) + +// SetName sets the Name field's value. +func (s *DeliveryDestination) SetName(v string) *DeliveryDestination { + s.Name = &v + return s } -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDataProtectionPolicyOutput) GoString() string { - return s.String() +// SetOutputFormat sets the OutputFormat field's value. +func (s *DeliveryDestination) SetOutputFormat(v string) *DeliveryDestination { + s.OutputFormat = &v + return s } -type DeleteDestinationInput struct { +// SetTags sets the Tags field's value. +func (s *DeliveryDestination) SetTags(v map[string]*string) *DeliveryDestination { + s.Tags = v + return s +} + +// A structure that contains information about one logs delivery destination. +type DeliveryDestinationConfiguration struct { _ struct{} `type:"structure"` - // The name of the destination. + // 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. // - // DestinationName is a required field - DestinationName *string `locationName:"destinationName" min:"1" type:"string" required:"true"` + // DestinationResourceArn is a required field + DestinationResourceArn *string `locationName:"destinationResourceArn" type:"string" required:"true"` } // String returns the string representation. @@ -6659,7 +9325,7 @@ type DeleteDestinationInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteDestinationInput) String() string { +func (s DeliveryDestinationConfiguration) String() string { return awsutil.Prettify(s) } @@ -6668,18 +9334,15 @@ func (s DeleteDestinationInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteDestinationInput) GoString() string { +func (s DeliveryDestinationConfiguration) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDestinationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDestinationInput"} - if s.DestinationName == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationName")) - } - if s.DestinationName != nil && len(*s.DestinationName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationName", 1)) +func (s *DeliveryDestinationConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeliveryDestinationConfiguration"} + if s.DestinationResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationResourceArn")) } if invalidParams.Len() > 0 { @@ -6688,14 +9351,68 @@ func (s *DeleteDestinationInput) Validate() error { return nil } -// SetDestinationName sets the DestinationName field's value. -func (s *DeleteDestinationInput) SetDestinationName(v string) *DeleteDestinationInput { - s.DestinationName = &v +// SetDestinationResourceArn sets the DestinationResourceArn field's value. +func (s *DeliveryDestinationConfiguration) SetDestinationResourceArn(v string) *DeliveryDestinationConfiguration { + s.DestinationResourceArn = &v return s } -type DeleteDestinationOutput struct { +// This structure contains information about one delivery source 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. +// +// Only some Amazon Web Services services support being configured as a delivery +// source. These services are listed as Supported [V2 Permissions] in the table +// at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/ +// AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions) +// +// To configure logs delivery between a supported Amazon Web Services service +// and a destination, you must do the following: +// +// - Create a delivery source, which is a logical object that represents +// the resource that is actually sending the logs. For more information, +// see PutDeliverySource (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html). +// +// - Create a delivery destination, which is a logical object that represents +// the actual delivery destination. For more information, see PutDeliveryDestination +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html). +// +// - If you are delivering logs cross-account, you must use PutDeliveryDestinationPolicy +// (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html) +// in the destination account to assign an IAM policy to the destination. +// This policy allows delivery to that destination. +// +// - Create a delivery by pairing exactly one delivery source and one delivery +// destination. For more information, see CreateDelivery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html). +// +// You can configure a single delivery source to send logs to multiple destinations +// by creating multiple deliveries. You can also create multiple deliveries +// to configure multiple delivery sources to send logs to the same delivery +// destination. +type DeliverySource struct { _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that uniquely identifies this delivery source. + Arn *string `locationName:"arn" type:"string"` + + // The type of log that the source is sending. For valid values for this parameter, + // see the documentation for the source service. + LogType *string `locationName:"logType" min:"1" type:"string"` + + // The unique name of the delivery source. + Name *string `locationName:"name" min:"1" type:"string"` + + // This array contains the ARN of the Amazon Web Services resource that sends + // logs and is represented by this delivery source. Currently, only one ARN + // can be in the array. + ResourceArns []*string `locationName:"resourceArns" type:"list"` + + // The Amazon Web Services service that is sending logs. + Service *string `locationName:"service" min:"1" type:"string"` + + // The tags that have been assigned to this delivery source. + Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } // String returns the string representation. @@ -6703,7 +9420,7 @@ type DeleteDestinationOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteDestinationOutput) String() string { +func (s DeliverySource) String() string { return awsutil.Prettify(s) } @@ -6712,17 +9429,68 @@ func (s DeleteDestinationOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteDestinationOutput) GoString() string { +func (s DeliverySource) GoString() string { return s.String() } -type DeleteLogGroupInput struct { +// SetArn sets the Arn field's value. +func (s *DeliverySource) SetArn(v string) *DeliverySource { + s.Arn = &v + return s +} + +// SetLogType sets the LogType field's value. +func (s *DeliverySource) SetLogType(v string) *DeliverySource { + s.LogType = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeliverySource) SetName(v string) *DeliverySource { + s.Name = &v + return s +} + +// SetResourceArns sets the ResourceArns field's value. +func (s *DeliverySource) SetResourceArns(v []*string) *DeliverySource { + s.ResourceArns = v + return s +} + +// SetService sets the Service field's value. +func (s *DeliverySource) SetService(v string) *DeliverySource { + s.Service = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *DeliverySource) SetTags(v map[string]*string) *DeliverySource { + s.Tags = v + return s +} + +type DescribeAccountPoliciesInput struct { _ struct{} `type:"structure"` - // The name of the log group. + // If you are using an account that is set up as a monitoring account for CloudWatch + // unified cross-account observability, you can use this to specify the account + // ID of a source account. If you do, the operation returns the account policy + // for the specified account. Currently, you can specify only one account ID + // in this parameter. // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + // If you omit this parameter, only the policy in the current account is returned. + AccountIdentifiers []*string `locationName:"accountIdentifiers" type:"list"` + + // Use this parameter to limit the returned policies to only the policy with + // the name that you specify. + PolicyName *string `locationName:"policyName" type:"string"` + + // Use this parameter to limit the returned policies to only the policies that + // match the policy type that you specify. Currently, the only valid value is + // DATA_PROTECTION_POLICY. + // + // PolicyType is a required field + PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` } // String returns the string representation. @@ -6730,7 +9498,7 @@ type DeleteLogGroupInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogGroupInput) String() string { +func (s DescribeAccountPoliciesInput) String() string { return awsutil.Prettify(s) } @@ -6739,18 +9507,15 @@ func (s DeleteLogGroupInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogGroupInput) GoString() string { +func (s DescribeAccountPoliciesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLogGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLogGroupInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) +func (s *DescribeAccountPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAccountPoliciesInput"} + if s.PolicyType == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyType")) } if invalidParams.Len() > 0 { @@ -6759,14 +9524,30 @@ func (s *DeleteLogGroupInput) Validate() error { return nil } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteLogGroupInput) SetLogGroupName(v string) *DeleteLogGroupInput { - s.LogGroupName = &v +// SetAccountIdentifiers sets the AccountIdentifiers field's value. +func (s *DescribeAccountPoliciesInput) SetAccountIdentifiers(v []*string) *DescribeAccountPoliciesInput { + s.AccountIdentifiers = v return s } -type DeleteLogGroupOutput struct { +// SetPolicyName sets the PolicyName field's value. +func (s *DescribeAccountPoliciesInput) SetPolicyName(v string) *DescribeAccountPoliciesInput { + s.PolicyName = &v + return s +} + +// SetPolicyType sets the PolicyType field's value. +func (s *DescribeAccountPoliciesInput) SetPolicyType(v string) *DescribeAccountPoliciesInput { + s.PolicyType = &v + return s +} + +type DescribeAccountPoliciesOutput struct { _ struct{} `type:"structure"` + + // An array of structures that contain information about the CloudWatch Logs + // account policies that match the specified filters. + AccountPolicies []*AccountPolicy `locationName:"accountPolicies" type:"list"` } // String returns the string representation. @@ -6774,7 +9555,7 @@ type DeleteLogGroupOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogGroupOutput) String() string { +func (s DescribeAccountPoliciesOutput) String() string { return awsutil.Prettify(s) } @@ -6783,22 +9564,25 @@ func (s DeleteLogGroupOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogGroupOutput) GoString() string { +func (s DescribeAccountPoliciesOutput) GoString() string { return s.String() } -type DeleteLogStreamInput struct { +// SetAccountPolicies sets the AccountPolicies field's value. +func (s *DescribeAccountPoliciesOutput) SetAccountPolicies(v []*AccountPolicy) *DescribeAccountPoliciesOutput { + s.AccountPolicies = v + return s +} + +type DescribeDeliveriesInput struct { _ struct{} `type:"structure"` - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + // Optionally specify the maximum number of deliveries to return in the response. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` - // The name of the log stream. - // - // LogStreamName is a required field - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string" required:"true"` + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -6806,7 +9590,7 @@ type DeleteLogStreamInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogStreamInput) String() string { +func (s DescribeDeliveriesInput) String() string { return awsutil.Prettify(s) } @@ -6815,24 +9599,18 @@ func (s DeleteLogStreamInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogStreamInput) GoString() string { +func (s DescribeDeliveriesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLogStreamInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLogStreamInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamName == nil { - invalidParams.Add(request.NewErrParamRequired("LogStreamName")) +func (s *DescribeDeliveriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDeliveriesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.LogStreamName != nil && len(*s.LogStreamName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamName", 1)) + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -6841,20 +9619,28 @@ func (s *DeleteLogStreamInput) Validate() error { return nil } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteLogStreamInput) SetLogGroupName(v string) *DeleteLogStreamInput { - s.LogGroupName = &v +// SetLimit sets the Limit field's value. +func (s *DescribeDeliveriesInput) SetLimit(v int64) *DescribeDeliveriesInput { + s.Limit = &v return s } -// SetLogStreamName sets the LogStreamName field's value. -func (s *DeleteLogStreamInput) SetLogStreamName(v string) *DeleteLogStreamInput { - s.LogStreamName = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeDeliveriesInput) SetNextToken(v string) *DescribeDeliveriesInput { + s.NextToken = &v return s } -type DeleteLogStreamOutput struct { +type DescribeDeliveriesOutput struct { _ struct{} `type:"structure"` + + // An array of structures. Each structure contains information about one delivery + // in the account. + Deliveries []*Delivery `locationName:"deliveries" type:"list"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -6862,7 +9648,7 @@ type DeleteLogStreamOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogStreamOutput) String() string { +func (s DescribeDeliveriesOutput) String() string { return awsutil.Prettify(s) } @@ -6871,22 +9657,32 @@ func (s DeleteLogStreamOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteLogStreamOutput) GoString() string { +func (s DescribeDeliveriesOutput) GoString() string { return s.String() } -type DeleteMetricFilterInput struct { +// SetDeliveries sets the Deliveries field's value. +func (s *DescribeDeliveriesOutput) SetDeliveries(v []*Delivery) *DescribeDeliveriesOutput { + s.Deliveries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDeliveriesOutput) SetNextToken(v string) *DescribeDeliveriesOutput { + s.NextToken = &v + return s +} + +type DescribeDeliveryDestinationsInput struct { _ struct{} `type:"structure"` - // The name of the metric filter. - // - // FilterName is a required field - FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` + // Optionally specify the maximum number of delivery destinations to return + // in the response. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -6894,7 +9690,7 @@ type DeleteMetricFilterInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteMetricFilterInput) String() string { +func (s DescribeDeliveryDestinationsInput) String() string { return awsutil.Prettify(s) } @@ -6903,24 +9699,18 @@ func (s DeleteMetricFilterInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteMetricFilterInput) GoString() string { +func (s DescribeDeliveryDestinationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMetricFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMetricFilterInput"} - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) - } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) +func (s *DescribeDeliveryDestinationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDeliveryDestinationsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -6929,20 +9719,28 @@ func (s *DeleteMetricFilterInput) Validate() error { return nil } -// SetFilterName sets the FilterName field's value. -func (s *DeleteMetricFilterInput) SetFilterName(v string) *DeleteMetricFilterInput { - s.FilterName = &v +// SetLimit sets the Limit field's value. +func (s *DescribeDeliveryDestinationsInput) SetLimit(v int64) *DescribeDeliveryDestinationsInput { + s.Limit = &v return s } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteMetricFilterInput) SetLogGroupName(v string) *DeleteMetricFilterInput { - s.LogGroupName = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeDeliveryDestinationsInput) SetNextToken(v string) *DescribeDeliveryDestinationsInput { + s.NextToken = &v return s } -type DeleteMetricFilterOutput struct { +type DescribeDeliveryDestinationsOutput struct { _ struct{} `type:"structure"` + + // An array of structures. Each structure contains information about one delivery + // destination in the account. + DeliveryDestinations []*DeliveryDestination `locationName:"deliveryDestinations" type:"list"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -6950,7 +9748,7 @@ type DeleteMetricFilterOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteMetricFilterOutput) String() string { +func (s DescribeDeliveryDestinationsOutput) String() string { return awsutil.Prettify(s) } @@ -6959,19 +9757,32 @@ func (s DeleteMetricFilterOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteMetricFilterOutput) GoString() string { +func (s DescribeDeliveryDestinationsOutput) GoString() string { return s.String() } -type DeleteQueryDefinitionInput struct { +// SetDeliveryDestinations sets the DeliveryDestinations field's value. +func (s *DescribeDeliveryDestinationsOutput) SetDeliveryDestinations(v []*DeliveryDestination) *DescribeDeliveryDestinationsOutput { + s.DeliveryDestinations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDeliveryDestinationsOutput) SetNextToken(v string) *DescribeDeliveryDestinationsOutput { + s.NextToken = &v + return s +} + +type DescribeDeliverySourcesInput struct { _ struct{} `type:"structure"` - // The ID of the query definition that you want to delete. You can use DescribeQueryDefinitions - // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html) - // to retrieve the IDs of your saved query definitions. - // - // QueryDefinitionId is a required field - QueryDefinitionId *string `locationName:"queryDefinitionId" type:"string" required:"true"` + // Optionally specify the maximum number of delivery sources to return in the + // response. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -6979,7 +9790,7 @@ type DeleteQueryDefinitionInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteQueryDefinitionInput) String() string { +func (s DescribeDeliverySourcesInput) String() string { return awsutil.Prettify(s) } @@ -6988,15 +9799,18 @@ func (s DeleteQueryDefinitionInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteQueryDefinitionInput) GoString() string { +func (s DescribeDeliverySourcesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteQueryDefinitionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteQueryDefinitionInput"} - if s.QueryDefinitionId == nil { - invalidParams.Add(request.NewErrParamRequired("QueryDefinitionId")) +func (s *DescribeDeliverySourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDeliverySourcesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -7005,18 +9819,28 @@ func (s *DeleteQueryDefinitionInput) Validate() error { return nil } -// SetQueryDefinitionId sets the QueryDefinitionId field's value. -func (s *DeleteQueryDefinitionInput) SetQueryDefinitionId(v string) *DeleteQueryDefinitionInput { - s.QueryDefinitionId = &v +// SetLimit sets the Limit field's value. +func (s *DescribeDeliverySourcesInput) SetLimit(v int64) *DescribeDeliverySourcesInput { + s.Limit = &v return s } -type DeleteQueryDefinitionOutput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeDeliverySourcesInput) SetNextToken(v string) *DescribeDeliverySourcesInput { + s.NextToken = &v + return s +} + +type DescribeDeliverySourcesOutput struct { _ struct{} `type:"structure"` - // A value of TRUE indicates that the operation succeeded. FALSE indicates that - // the operation failed. - Success *bool `locationName:"success" type:"boolean"` + // An array of structures. Each structure contains information about one delivery + // source in the account. + DeliverySources []*DeliverySource `locationName:"deliverySources" type:"list"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -7024,7 +9848,7 @@ type DeleteQueryDefinitionOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteQueryDefinitionOutput) String() string { +func (s DescribeDeliverySourcesOutput) String() string { return awsutil.Prettify(s) } @@ -7033,21 +9857,35 @@ func (s DeleteQueryDefinitionOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteQueryDefinitionOutput) GoString() string { +func (s DescribeDeliverySourcesOutput) GoString() string { return s.String() } -// SetSuccess sets the Success field's value. -func (s *DeleteQueryDefinitionOutput) SetSuccess(v bool) *DeleteQueryDefinitionOutput { - s.Success = &v +// SetDeliverySources sets the DeliverySources field's value. +func (s *DescribeDeliverySourcesOutput) SetDeliverySources(v []*DeliverySource) *DescribeDeliverySourcesOutput { + s.DeliverySources = v return s } -type DeleteResourcePolicyInput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeDeliverySourcesOutput) SetNextToken(v string) *DescribeDeliverySourcesOutput { + s.NextToken = &v + return s +} + +type DescribeDestinationsInput struct { _ struct{} `type:"structure"` - // The name of the policy to be revoked. This parameter is required. - PolicyName *string `locationName:"policyName" type:"string"` + // The prefix to match. If you don't specify a value, no prefix filter is applied. + DestinationNamePrefix *string `min:"1" type:"string"` + + // The maximum number of items returned. If you don't specify a value, the default + // maximum value of 50 items is used. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -7055,7 +9893,7 @@ type DeleteResourcePolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteResourcePolicyInput) String() string { +func (s DescribeDestinationsInput) String() string { return awsutil.Prettify(s) } @@ -7064,18 +9902,56 @@ func (s DeleteResourcePolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteResourcePolicyInput) GoString() string { +func (s DescribeDestinationsInput) GoString() string { return s.String() } -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteResourcePolicyInput) SetPolicyName(v string) *DeleteResourcePolicyInput { - s.PolicyName = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDestinationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"} + if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestinationNamePrefix sets the DestinationNamePrefix field's value. +func (s *DescribeDestinationsInput) SetDestinationNamePrefix(v string) *DescribeDestinationsInput { + s.DestinationNamePrefix = &v return s } -type DeleteResourcePolicyOutput struct { +// SetLimit sets the Limit field's value. +func (s *DescribeDestinationsInput) SetLimit(v int64) *DescribeDestinationsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDestinationsInput) SetNextToken(v string) *DescribeDestinationsInput { + s.NextToken = &v + return s +} + +type DescribeDestinationsOutput struct { _ struct{} `type:"structure"` + + // The destinations. + Destinations []*Destination `locationName:"destinations" type:"list"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -7083,7 +9959,7 @@ type DeleteResourcePolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteResourcePolicyOutput) String() string { +func (s DescribeDestinationsOutput) String() string { return awsutil.Prettify(s) } @@ -7092,17 +9968,40 @@ func (s DeleteResourcePolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteResourcePolicyOutput) GoString() string { +func (s DescribeDestinationsOutput) GoString() string { return s.String() } -type DeleteRetentionPolicyInput struct { +// SetDestinations sets the Destinations field's value. +func (s *DescribeDestinationsOutput) SetDestinations(v []*Destination) *DescribeDestinationsOutput { + s.Destinations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeDestinationsOutput) SetNextToken(v string) *DescribeDestinationsOutput { + s.NextToken = &v + return s +} + +type DescribeExportTasksInput struct { _ struct{} `type:"structure"` - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The status code of the export task. Specifying a status code filters the + // results to zero or more export tasks. + StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"` + + // The ID of the export task. Specifying a task ID filters the results to one + // or zero export tasks. + TaskId *string `locationName:"taskId" min:"1" type:"string"` } // String returns the string representation. @@ -7110,7 +10009,7 @@ type DeleteRetentionPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteRetentionPolicyInput) String() string { +func (s DescribeExportTasksInput) String() string { return awsutil.Prettify(s) } @@ -7119,18 +10018,21 @@ func (s DeleteRetentionPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteRetentionPolicyInput) GoString() string { +func (s DescribeExportTasksInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRetentionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"} - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) +func (s *DescribeExportTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) } if invalidParams.Len() > 0 { @@ -7139,14 +10041,39 @@ func (s *DeleteRetentionPolicyInput) Validate() error { return nil } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteRetentionPolicyInput) SetLogGroupName(v string) *DeleteRetentionPolicyInput { - s.LogGroupName = &v +// SetLimit sets the Limit field's value. +func (s *DescribeExportTasksInput) SetLimit(v int64) *DescribeExportTasksInput { + s.Limit = &v return s } -type DeleteRetentionPolicyOutput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeExportTasksInput) SetNextToken(v string) *DescribeExportTasksInput { + s.NextToken = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *DescribeExportTasksInput) SetStatusCode(v string) *DescribeExportTasksInput { + s.StatusCode = &v + return s +} + +// SetTaskId sets the TaskId field's value. +func (s *DescribeExportTasksInput) SetTaskId(v string) *DescribeExportTasksInput { + s.TaskId = &v + return s +} + +type DescribeExportTasksOutput struct { _ struct{} `type:"structure"` + + // The export tasks. + ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -7154,7 +10081,7 @@ type DeleteRetentionPolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteRetentionPolicyOutput) String() string { +func (s DescribeExportTasksOutput) String() string { return awsutil.Prettify(s) } @@ -7163,22 +10090,63 @@ func (s DeleteRetentionPolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteRetentionPolicyOutput) GoString() string { +func (s DescribeExportTasksOutput) GoString() string { return s.String() } -type DeleteSubscriptionFilterInput struct { +// SetExportTasks sets the ExportTasks field's value. +func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput { + s.ExportTasks = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeExportTasksOutput) SetNextToken(v string) *DescribeExportTasksOutput { + s.NextToken = &v + return s +} + +type DescribeLogGroupsInput struct { _ struct{} `type:"structure"` - // The name of the subscription filter. + // When includeLinkedAccounts is set to True, use this parameter to specify + // the list of accounts to search. You can specify as many as 20 account IDs + // in the array. + AccountIdentifiers []*string `locationName:"accountIdentifiers" type:"list"` + + // If you are using a monitoring account, set this to True to have the operation + // return log groups in the accounts listed in accountIdentifiers. + // + // If this parameter is set to true and accountIdentifiers contains a null value, + // the operation returns all log groups in the monitoring account and all log + // groups in all source accounts that are linked to the monitoring account. + IncludeLinkedAccounts *bool `locationName:"includeLinkedAccounts" type:"boolean"` + + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` + + // If you specify a string for this parameter, the operation returns only log + // groups that have names that match the string based on a case-sensitive substring + // search. For example, if you specify Foo, log groups named FooBar, aws/Foo, + // and GroupFoo would match, but foo, F/o/o and Froo would not match. + // + // If you specify logGroupNamePattern in your request, then only arn, creationTime, + // and logGroupName are included in the response. + // + // logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one + // of these parameters can be passed. + LogGroupNamePattern *string `locationName:"logGroupNamePattern" type:"string"` + + // The prefix to match. // - // FilterName is a required field - FilterName *string `locationName:"filterName" min:"1" type:"string" required:"true"` + // logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one + // of these parameters can be passed. + LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"` - // The name of the log group. - // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -7186,7 +10154,7 @@ type DeleteSubscriptionFilterInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteSubscriptionFilterInput) String() string { +func (s DescribeLogGroupsInput) String() string { return awsutil.Prettify(s) } @@ -7195,24 +10163,21 @@ func (s DeleteSubscriptionFilterInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteSubscriptionFilterInput) GoString() string { +func (s DescribeLogGroupsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSubscriptionFilterInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSubscriptionFilterInput"} - if s.FilterName == nil { - invalidParams.Add(request.NewErrParamRequired("FilterName")) - } - if s.FilterName != nil && len(*s.FilterName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) +func (s *DescribeLogGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1)) } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -7221,20 +10186,54 @@ func (s *DeleteSubscriptionFilterInput) Validate() error { return nil } -// SetFilterName sets the FilterName field's value. -func (s *DeleteSubscriptionFilterInput) SetFilterName(v string) *DeleteSubscriptionFilterInput { - s.FilterName = &v +// SetAccountIdentifiers sets the AccountIdentifiers field's value. +func (s *DescribeLogGroupsInput) SetAccountIdentifiers(v []*string) *DescribeLogGroupsInput { + s.AccountIdentifiers = v return s } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DeleteSubscriptionFilterInput) SetLogGroupName(v string) *DeleteSubscriptionFilterInput { - s.LogGroupName = &v +// SetIncludeLinkedAccounts sets the IncludeLinkedAccounts field's value. +func (s *DescribeLogGroupsInput) SetIncludeLinkedAccounts(v bool) *DescribeLogGroupsInput { + s.IncludeLinkedAccounts = &v return s } -type DeleteSubscriptionFilterOutput struct { +// SetLimit sets the Limit field's value. +func (s *DescribeLogGroupsInput) SetLimit(v int64) *DescribeLogGroupsInput { + s.Limit = &v + return s +} + +// SetLogGroupNamePattern sets the LogGroupNamePattern field's value. +func (s *DescribeLogGroupsInput) SetLogGroupNamePattern(v string) *DescribeLogGroupsInput { + s.LogGroupNamePattern = &v + return s +} + +// SetLogGroupNamePrefix sets the LogGroupNamePrefix field's value. +func (s *DescribeLogGroupsInput) SetLogGroupNamePrefix(v string) *DescribeLogGroupsInput { + s.LogGroupNamePrefix = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeLogGroupsInput) SetNextToken(v string) *DescribeLogGroupsInput { + s.NextToken = &v + return s +} + +type DescribeLogGroupsOutput struct { _ struct{} `type:"structure"` + + // The log groups. + // + // If the retentionInDays value is not included for a log group, then that log + // group's events do not expire. + LogGroups []*LogGroup `locationName:"logGroups" type:"list"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -7242,7 +10241,7 @@ type DeleteSubscriptionFilterOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteSubscriptionFilterOutput) String() string { +func (s DescribeLogGroupsOutput) String() string { return awsutil.Prettify(s) } @@ -7251,32 +10250,68 @@ func (s DeleteSubscriptionFilterOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteSubscriptionFilterOutput) GoString() string { +func (s DescribeLogGroupsOutput) GoString() string { return s.String() } -type DescribeAccountPoliciesInput struct { +// SetLogGroups sets the LogGroups field's value. +func (s *DescribeLogGroupsOutput) SetLogGroups(v []*LogGroup) *DescribeLogGroupsOutput { + s.LogGroups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeLogGroupsOutput) SetNextToken(v string) *DescribeLogGroupsOutput { + s.NextToken = &v + return s +} + +type DescribeLogStreamsInput struct { _ struct{} `type:"structure"` - // If you are using an account that is set up as a monitoring account for CloudWatch - // unified cross-account observability, you can use this to specify the account - // ID of a source account. If you do, the operation returns the account policy - // for the specified account. Currently, you can specify only one account ID - // in this parameter. + // If the value is true, results are returned in descending order. If the value + // is to false, results are returned in ascending order. The default value is + // false. + Descending *bool `locationName:"descending" type:"boolean"` + + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` + + // Specify either the name or ARN of the log group to view. If the log group + // is in a source account and you are using a monitoring account, you must use + // the log group ARN. // - // If you omit this parameter, only the policy in the current account is returned. - AccountIdentifiers []*string `locationName:"accountIdentifiers" type:"list"` + // You must include either logGroupIdentifier or logGroupName, but not both. + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - // Use this parameter to limit the returned policies to only the policy with - // the name that you specify. - PolicyName *string `locationName:"policyName" type:"string"` + // The name of the log group. + // + // You must include either logGroupIdentifier or logGroupName, but not both. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - // Use this parameter to limit the returned policies to only the policies that - // match the policy type that you specify. Currently, the only valid value is - // DATA_PROTECTION_POLICY. + // The prefix to match. // - // PolicyType is a required field - PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` + // If orderBy is LastEventTime, you cannot specify this parameter. + LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // If the value is LogStreamName, the results are ordered by log stream name. + // If the value is LastEventTime, the results are ordered by the event time. + // The default value is LogStreamName. + // + // If you order the results by event time, you cannot specify the logStreamNamePrefix + // parameter. + // + // lastEventTimestamp represents the time of the most recent log event in the + // log stream in CloudWatch Logs. This number is expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on + // an eventual consistency basis. It typically updates in less than an hour + // from ingestion, but in rare situations might take longer. + OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` } // String returns the string representation. @@ -7284,7 +10319,7 @@ type DescribeAccountPoliciesInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeAccountPoliciesInput) String() string { +func (s DescribeLogStreamsInput) String() string { return awsutil.Prettify(s) } @@ -7293,15 +10328,27 @@ func (s DescribeAccountPoliciesInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeAccountPoliciesInput) GoString() string { +func (s DescribeLogStreamsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountPoliciesInput"} - if s.PolicyType == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyType")) +func (s *DescribeLogStreamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -7310,30 +10357,57 @@ func (s *DescribeAccountPoliciesInput) Validate() error { return nil } -// SetAccountIdentifiers sets the AccountIdentifiers field's value. -func (s *DescribeAccountPoliciesInput) SetAccountIdentifiers(v []*string) *DescribeAccountPoliciesInput { - s.AccountIdentifiers = v +// SetDescending sets the Descending field's value. +func (s *DescribeLogStreamsInput) SetDescending(v bool) *DescribeLogStreamsInput { + s.Descending = &v return s } -// SetPolicyName sets the PolicyName field's value. -func (s *DescribeAccountPoliciesInput) SetPolicyName(v string) *DescribeAccountPoliciesInput { - s.PolicyName = &v +// SetLimit sets the Limit field's value. +func (s *DescribeLogStreamsInput) SetLimit(v int64) *DescribeLogStreamsInput { + s.Limit = &v return s } -// SetPolicyType sets the PolicyType field's value. -func (s *DescribeAccountPoliciesInput) SetPolicyType(v string) *DescribeAccountPoliciesInput { - s.PolicyType = &v +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *DescribeLogStreamsInput) SetLogGroupIdentifier(v string) *DescribeLogStreamsInput { + s.LogGroupIdentifier = &v return s } -type DescribeAccountPoliciesOutput struct { +// SetLogGroupName sets the LogGroupName field's value. +func (s *DescribeLogStreamsInput) SetLogGroupName(v string) *DescribeLogStreamsInput { + s.LogGroupName = &v + return s +} + +// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. +func (s *DescribeLogStreamsInput) SetLogStreamNamePrefix(v string) *DescribeLogStreamsInput { + s.LogStreamNamePrefix = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeLogStreamsInput) SetNextToken(v string) *DescribeLogStreamsInput { + s.NextToken = &v + return s +} + +// SetOrderBy sets the OrderBy field's value. +func (s *DescribeLogStreamsInput) SetOrderBy(v string) *DescribeLogStreamsInput { + s.OrderBy = &v + return s +} + +type DescribeLogStreamsOutput struct { _ struct{} `type:"structure"` - // An array of structures that contain information about the CloudWatch Logs - // account policies that match the specified filters. - AccountPolicies []*AccountPolicy `locationName:"accountPolicies" type:"list"` + // The log streams. + LogStreams []*LogStream `locationName:"logStreams" type:"list"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation. @@ -7341,7 +10415,7 @@ type DescribeAccountPoliciesOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeAccountPoliciesOutput) String() string { +func (s DescribeLogStreamsOutput) String() string { return awsutil.Prettify(s) } @@ -7350,26 +10424,46 @@ func (s DescribeAccountPoliciesOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeAccountPoliciesOutput) GoString() string { +func (s DescribeLogStreamsOutput) GoString() string { return s.String() } -// SetAccountPolicies sets the AccountPolicies field's value. -func (s *DescribeAccountPoliciesOutput) SetAccountPolicies(v []*AccountPolicy) *DescribeAccountPoliciesOutput { - s.AccountPolicies = v +// SetLogStreams sets the LogStreams field's value. +func (s *DescribeLogStreamsOutput) SetLogStreams(v []*LogStream) *DescribeLogStreamsOutput { + s.LogStreams = v return s } -type DescribeDestinationsInput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeLogStreamsOutput) SetNextToken(v string) *DescribeLogStreamsOutput { + s.NextToken = &v + return s +} + +type DescribeMetricFiltersInput struct { _ struct{} `type:"structure"` - // The prefix to match. If you don't specify a value, no prefix filter is applied. - DestinationNamePrefix *string `min:"1" type:"string"` + // The prefix to match. CloudWatch Logs uses the value that you set here only + // if you also include the logGroupName parameter in your request. + FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` // The maximum number of items returned. If you don't specify a value, the default - // maximum value of 50 items is used. + // is up to 50 items. Limit *int64 `locationName:"limit" min:"1" type:"integer"` + // The name of the log group. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // Filters results to include only those with the specified metric name. If + // you include this parameter in your request, you must also include the metricNamespace + // parameter. + MetricName *string `locationName:"metricName" type:"string"` + + // Filters results to include only those in the specified namespace. If you + // include this parameter in your request, you must also include the metricName + // parameter. + MetricNamespace *string `locationName:"metricNamespace" type:"string"` + // The token for the next set of items to return. (You received this token from // a previous call.) NextToken *string `locationName:"nextToken" min:"1" type:"string"` @@ -7380,7 +10474,7 @@ type DescribeDestinationsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDestinationsInput) String() string { +func (s DescribeMetricFiltersInput) String() string { return awsutil.Prettify(s) } @@ -7389,19 +10483,22 @@ func (s DescribeDestinationsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDestinationsInput) GoString() string { +func (s DescribeMetricFiltersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeDestinationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeDestinationsInput"} - if s.DestinationNamePrefix != nil && len(*s.DestinationNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DestinationNamePrefix", 1)) +func (s *DescribeMetricFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"} + if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } @@ -7412,29 +10509,47 @@ func (s *DescribeDestinationsInput) Validate() error { return nil } -// SetDestinationNamePrefix sets the DestinationNamePrefix field's value. -func (s *DescribeDestinationsInput) SetDestinationNamePrefix(v string) *DescribeDestinationsInput { - s.DestinationNamePrefix = &v +// SetFilterNamePrefix sets the FilterNamePrefix field's value. +func (s *DescribeMetricFiltersInput) SetFilterNamePrefix(v string) *DescribeMetricFiltersInput { + s.FilterNamePrefix = &v return s } // SetLimit sets the Limit field's value. -func (s *DescribeDestinationsInput) SetLimit(v int64) *DescribeDestinationsInput { +func (s *DescribeMetricFiltersInput) SetLimit(v int64) *DescribeMetricFiltersInput { s.Limit = &v return s } +// SetLogGroupName sets the LogGroupName field's value. +func (s *DescribeMetricFiltersInput) SetLogGroupName(v string) *DescribeMetricFiltersInput { + s.LogGroupName = &v + return s +} + +// SetMetricName sets the MetricName field's value. +func (s *DescribeMetricFiltersInput) SetMetricName(v string) *DescribeMetricFiltersInput { + s.MetricName = &v + return s +} + +// SetMetricNamespace sets the MetricNamespace field's value. +func (s *DescribeMetricFiltersInput) SetMetricNamespace(v string) *DescribeMetricFiltersInput { + s.MetricNamespace = &v + return s +} + // SetNextToken sets the NextToken field's value. -func (s *DescribeDestinationsInput) SetNextToken(v string) *DescribeDestinationsInput { +func (s *DescribeMetricFiltersInput) SetNextToken(v string) *DescribeMetricFiltersInput { s.NextToken = &v return s } -type DescribeDestinationsOutput struct { +type DescribeMetricFiltersOutput struct { _ struct{} `type:"structure"` - // The destinations. - Destinations []*Destination `locationName:"destinations" type:"list"` + // The metric filters. + MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"` // The token for the next set of items to return. The token expires after 24 // hours. @@ -7446,7 +10561,7 @@ type DescribeDestinationsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDestinationsOutput) String() string { +func (s DescribeMetricFiltersOutput) String() string { return awsutil.Prettify(s) } @@ -7455,40 +10570,38 @@ func (s DescribeDestinationsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeDestinationsOutput) GoString() string { +func (s DescribeMetricFiltersOutput) GoString() string { return s.String() } -// SetDestinations sets the Destinations field's value. -func (s *DescribeDestinationsOutput) SetDestinations(v []*Destination) *DescribeDestinationsOutput { - s.Destinations = v +// SetMetricFilters sets the MetricFilters field's value. +func (s *DescribeMetricFiltersOutput) SetMetricFilters(v []*MetricFilter) *DescribeMetricFiltersOutput { + s.MetricFilters = v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeDestinationsOutput) SetNextToken(v string) *DescribeDestinationsOutput { +func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFiltersOutput { s.NextToken = &v return s } -type DescribeExportTasksInput struct { +type DescribeQueriesInput struct { _ struct{} `type:"structure"` - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` + // Limits the returned queries to only those for the specified log group. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - // The token for the next set of items to return. (You received this token from - // a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // Limits the number of returned queries to the specified number. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - // The status code of the export task. Specifying a status code filters the - // results to zero or more export tasks. - StatusCode *string `locationName:"statusCode" type:"string" enum:"ExportTaskStatusCode"` + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` - // The ID of the export task. Specifying a task ID filters the results to one - // or zero export tasks. - TaskId *string `locationName:"taskId" min:"1" type:"string"` + // Limits the returned queries to only those that have the specified status. + // Valid values are Cancelled, Complete, Failed, Running, and Scheduled. + Status *string `locationName:"status" type:"string" enum:"QueryStatus"` } // String returns the string representation. @@ -7496,7 +10609,7 @@ type DescribeExportTasksInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeExportTasksInput) String() string { +func (s DescribeQueriesInput) String() string { return awsutil.Prettify(s) } @@ -7505,22 +10618,22 @@ func (s DescribeExportTasksInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeExportTasksInput) GoString() string { +func (s DescribeQueriesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeExportTasksInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeExportTasksInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) +func (s *DescribeQueriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeQueriesInput"} + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } - if s.TaskId != nil && len(*s.TaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -7528,39 +10641,39 @@ func (s *DescribeExportTasksInput) Validate() error { return nil } -// SetLimit sets the Limit field's value. -func (s *DescribeExportTasksInput) SetLimit(v int64) *DescribeExportTasksInput { - s.Limit = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *DescribeQueriesInput) SetLogGroupName(v string) *DescribeQueriesInput { + s.LogGroupName = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeExportTasksInput) SetNextToken(v string) *DescribeExportTasksInput { - s.NextToken = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeQueriesInput) SetMaxResults(v int64) *DescribeQueriesInput { + s.MaxResults = &v return s } -// SetStatusCode sets the StatusCode field's value. -func (s *DescribeExportTasksInput) SetStatusCode(v string) *DescribeExportTasksInput { - s.StatusCode = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueriesInput) SetNextToken(v string) *DescribeQueriesInput { + s.NextToken = &v return s } -// SetTaskId sets the TaskId field's value. -func (s *DescribeExportTasksInput) SetTaskId(v string) *DescribeExportTasksInput { - s.TaskId = &v +// SetStatus sets the Status field's value. +func (s *DescribeQueriesInput) SetStatus(v string) *DescribeQueriesInput { + s.Status = &v return s } -type DescribeExportTasksOutput struct { +type DescribeQueriesOutput struct { _ struct{} `type:"structure"` - // The export tasks. - ExportTasks []*ExportTask `locationName:"exportTasks" type:"list"` - // The token for the next set of items to return. The token expires after 24 // hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The list of queries that match the request. + Queries []*QueryInfo `locationName:"queries" type:"list"` } // String returns the string representation. @@ -7568,7 +10681,7 @@ type DescribeExportTasksOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeExportTasksOutput) String() string { +func (s DescribeQueriesOutput) String() string { return awsutil.Prettify(s) } @@ -7577,63 +10690,35 @@ func (s DescribeExportTasksOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeExportTasksOutput) GoString() string { +func (s DescribeQueriesOutput) GoString() string { return s.String() } -// SetExportTasks sets the ExportTasks field's value. -func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput { - s.ExportTasks = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueriesOutput) SetNextToken(v string) *DescribeQueriesOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeExportTasksOutput) SetNextToken(v string) *DescribeExportTasksOutput { - s.NextToken = &v +// SetQueries sets the Queries field's value. +func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutput { + s.Queries = v return s } -type DescribeLogGroupsInput struct { +type DescribeQueryDefinitionsInput struct { _ struct{} `type:"structure"` - // When includeLinkedAccounts is set to True, use this parameter to specify - // the list of accounts to search. You can specify as many as 20 account IDs - // in the array. - AccountIdentifiers []*string `locationName:"accountIdentifiers" type:"list"` - - // If you are using a monitoring account, set this to True to have the operation - // return log groups in the accounts listed in accountIdentifiers. - // - // If this parameter is set to true and accountIdentifiers contains a null value, - // the operation returns all log groups in the monitoring account and all log - // groups in all source accounts that are linked to the monitoring account. - IncludeLinkedAccounts *bool `locationName:"includeLinkedAccounts" type:"boolean"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // If you specify a string for this parameter, the operation returns only log - // groups that have names that match the string based on a case-sensitive substring - // search. For example, if you specify Foo, log groups named FooBar, aws/Foo, - // and GroupFoo would match, but foo, F/o/o and Froo would not match. - // - // If you specify logGroupNamePattern in your request, then only arn, creationTime, - // and logGroupName are included in the response. - // - // logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one - // of these parameters can be passed. - LogGroupNamePattern *string `locationName:"logGroupNamePattern" type:"string"` - - // The prefix to match. - // - // logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one - // of these parameters can be passed. - LogGroupNamePrefix *string `locationName:"logGroupNamePrefix" min:"1" type:"string"` + // Limits the number of returned query definitions to the specified number. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` - // The token for the next set of items to return. (You received this token from - // a previous call.) + // The token for the next set of items to return. The token expires after 24 + // hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // Use this parameter to filter your results to only the query definitions that + // have names that start with the prefix you specify. + QueryDefinitionNamePrefix *string `locationName:"queryDefinitionNamePrefix" min:"1" type:"string"` } // String returns the string representation. @@ -7641,7 +10726,7 @@ type DescribeLogGroupsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogGroupsInput) String() string { +func (s DescribeQueryDefinitionsInput) String() string { return awsutil.Prettify(s) } @@ -7650,22 +10735,22 @@ func (s DescribeLogGroupsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogGroupsInput) GoString() string { +func (s DescribeQueryDefinitionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLogGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLogGroupsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupNamePrefix != nil && len(*s.LogGroupNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupNamePrefix", 1)) +func (s *DescribeQueryDefinitionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeQueryDefinitionsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } + if s.QueryDefinitionNamePrefix != nil && len(*s.QueryDefinitionNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryDefinitionNamePrefix", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7673,54 +10758,33 @@ func (s *DescribeLogGroupsInput) Validate() error { return nil } -// SetAccountIdentifiers sets the AccountIdentifiers field's value. -func (s *DescribeLogGroupsInput) SetAccountIdentifiers(v []*string) *DescribeLogGroupsInput { - s.AccountIdentifiers = v - return s -} - -// SetIncludeLinkedAccounts sets the IncludeLinkedAccounts field's value. -func (s *DescribeLogGroupsInput) SetIncludeLinkedAccounts(v bool) *DescribeLogGroupsInput { - s.IncludeLinkedAccounts = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *DescribeLogGroupsInput) SetLimit(v int64) *DescribeLogGroupsInput { - s.Limit = &v - return s -} - -// SetLogGroupNamePattern sets the LogGroupNamePattern field's value. -func (s *DescribeLogGroupsInput) SetLogGroupNamePattern(v string) *DescribeLogGroupsInput { - s.LogGroupNamePattern = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeQueryDefinitionsInput) SetMaxResults(v int64) *DescribeQueryDefinitionsInput { + s.MaxResults = &v return s } -// SetLogGroupNamePrefix sets the LogGroupNamePrefix field's value. -func (s *DescribeLogGroupsInput) SetLogGroupNamePrefix(v string) *DescribeLogGroupsInput { - s.LogGroupNamePrefix = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueryDefinitionsInput) SetNextToken(v string) *DescribeQueryDefinitionsInput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogGroupsInput) SetNextToken(v string) *DescribeLogGroupsInput { - s.NextToken = &v +// SetQueryDefinitionNamePrefix sets the QueryDefinitionNamePrefix field's value. +func (s *DescribeQueryDefinitionsInput) SetQueryDefinitionNamePrefix(v string) *DescribeQueryDefinitionsInput { + s.QueryDefinitionNamePrefix = &v return s } -type DescribeLogGroupsOutput struct { +type DescribeQueryDefinitionsOutput struct { _ struct{} `type:"structure"` - // The log groups. - // - // If the retentionInDays value is not included for a log group, then that log - // group's events do not expire. - LogGroups []*LogGroup `locationName:"logGroups" type:"list"` - // The token for the next set of items to return. The token expires after 24 // hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The list of query definitions that match your request. + QueryDefinitions []*QueryDefinition `locationName:"queryDefinitions" type:"list"` } // String returns the string representation. @@ -7728,7 +10792,7 @@ type DescribeLogGroupsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogGroupsOutput) String() string { +func (s DescribeQueryDefinitionsOutput) String() string { return awsutil.Prettify(s) } @@ -7737,68 +10801,32 @@ func (s DescribeLogGroupsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogGroupsOutput) GoString() string { +func (s DescribeQueryDefinitionsOutput) GoString() string { return s.String() } -// SetLogGroups sets the LogGroups field's value. -func (s *DescribeLogGroupsOutput) SetLogGroups(v []*LogGroup) *DescribeLogGroupsOutput { - s.LogGroups = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueryDefinitionsOutput) SetNextToken(v string) *DescribeQueryDefinitionsOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogGroupsOutput) SetNextToken(v string) *DescribeLogGroupsOutput { - s.NextToken = &v +// SetQueryDefinitions sets the QueryDefinitions field's value. +func (s *DescribeQueryDefinitionsOutput) SetQueryDefinitions(v []*QueryDefinition) *DescribeQueryDefinitionsOutput { + s.QueryDefinitions = v return s } -type DescribeLogStreamsInput struct { +type DescribeResourcePoliciesInput struct { _ struct{} `type:"structure"` - // If the value is true, results are returned in descending order. If the value - // is to false, results are returned in ascending order. The default value is - // false. - Descending *bool `locationName:"descending" type:"boolean"` - - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. + // The maximum number of resource policies to be displayed with one call of + // this API. Limit *int64 `locationName:"limit" min:"1" type:"integer"` - // Specify either the name or ARN of the log group to view. If the log group - // is in a source account and you are using a monitoring account, you must use - // the log group ARN. - // - // You must include either logGroupIdentifier or logGroupName, but not both. - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - - // The name of the log group. - // - // You must include either logGroupIdentifier or logGroupName, but not both. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // The prefix to match. - // - // If orderBy is LastEventTime, you cannot specify this parameter. - LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` - - // The token for the next set of items to return. (You received this token from - // a previous call.) + // The token for the next set of items to return. The token expires after 24 + // hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // If the value is LogStreamName, the results are ordered by log stream name. - // If the value is LastEventTime, the results are ordered by the event time. - // The default value is LogStreamName. - // - // If you order the results by event time, you cannot specify the logStreamNamePrefix - // parameter. - // - // lastEventTimestamp represents the time of the most recent log event in the - // log stream in CloudWatch Logs. This number is expressed as the number of - // milliseconds after Jan 1, 1970 00:00:00 UTC. lastEventTimestamp updates on - // an eventual consistency basis. It typically updates in less than an hour - // from ingestion, but in rare situations might take longer. - OrderBy *string `locationName:"orderBy" type:"string" enum:"OrderBy"` } // String returns the string representation. @@ -7806,7 +10834,7 @@ type DescribeLogStreamsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogStreamsInput) String() string { +func (s DescribeResourcePoliciesInput) String() string { return awsutil.Prettify(s) } @@ -7815,25 +10843,16 @@ func (s DescribeLogStreamsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogStreamsInput) GoString() string { +func (s DescribeResourcePoliciesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLogStreamsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLogStreamsInput"} +func (s *DescribeResourcePoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePoliciesInput"} if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) - } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } @@ -7844,57 +10863,27 @@ func (s *DescribeLogStreamsInput) Validate() error { return nil } -// SetDescending sets the Descending field's value. -func (s *DescribeLogStreamsInput) SetDescending(v bool) *DescribeLogStreamsInput { - s.Descending = &v - return s -} - // SetLimit sets the Limit field's value. -func (s *DescribeLogStreamsInput) SetLimit(v int64) *DescribeLogStreamsInput { +func (s *DescribeResourcePoliciesInput) SetLimit(v int64) *DescribeResourcePoliciesInput { s.Limit = &v return s } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *DescribeLogStreamsInput) SetLogGroupIdentifier(v string) *DescribeLogStreamsInput { - s.LogGroupIdentifier = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeLogStreamsInput) SetLogGroupName(v string) *DescribeLogStreamsInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. -func (s *DescribeLogStreamsInput) SetLogStreamNamePrefix(v string) *DescribeLogStreamsInput { - s.LogStreamNamePrefix = &v - return s -} - // SetNextToken sets the NextToken field's value. -func (s *DescribeLogStreamsInput) SetNextToken(v string) *DescribeLogStreamsInput { +func (s *DescribeResourcePoliciesInput) SetNextToken(v string) *DescribeResourcePoliciesInput { s.NextToken = &v return s } -// SetOrderBy sets the OrderBy field's value. -func (s *DescribeLogStreamsInput) SetOrderBy(v string) *DescribeLogStreamsInput { - s.OrderBy = &v - return s -} - -type DescribeLogStreamsOutput struct { +type DescribeResourcePoliciesOutput struct { _ struct{} `type:"structure"` - // The log streams. - LogStreams []*LogStream `locationName:"logStreams" type:"list"` - // The token for the next set of items to return. The token expires after 24 // hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The resource policies that exist in this account. + ResourcePolicies []*ResourcePolicy `locationName:"resourcePolicies" type:"list"` } // String returns the string representation. @@ -7902,7 +10891,7 @@ type DescribeLogStreamsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogStreamsOutput) String() string { +func (s DescribeResourcePoliciesOutput) String() string { return awsutil.Prettify(s) } @@ -7911,27 +10900,26 @@ func (s DescribeLogStreamsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeLogStreamsOutput) GoString() string { +func (s DescribeResourcePoliciesOutput) GoString() string { return s.String() } -// SetLogStreams sets the LogStreams field's value. -func (s *DescribeLogStreamsOutput) SetLogStreams(v []*LogStream) *DescribeLogStreamsOutput { - s.LogStreams = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeResourcePoliciesOutput) SetNextToken(v string) *DescribeResourcePoliciesOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeLogStreamsOutput) SetNextToken(v string) *DescribeLogStreamsOutput { - s.NextToken = &v +// SetResourcePolicies sets the ResourcePolicies field's value. +func (s *DescribeResourcePoliciesOutput) SetResourcePolicies(v []*ResourcePolicy) *DescribeResourcePoliciesOutput { + s.ResourcePolicies = v return s } -type DescribeMetricFiltersInput struct { +type DescribeSubscriptionFiltersInput struct { _ struct{} `type:"structure"` - // The prefix to match. CloudWatch Logs uses the value that you set here only - // if you also include the logGroupName parameter in your request. + // The prefix to match. If you don't specify a value, no prefix filter is applied. FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` // The maximum number of items returned. If you don't specify a value, the default @@ -7939,17 +10927,9 @@ type DescribeMetricFiltersInput struct { Limit *int64 `locationName:"limit" min:"1" type:"integer"` // The name of the log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // Filters results to include only those with the specified metric name. If - // you include this parameter in your request, you must also include the metricNamespace - // parameter. - MetricName *string `locationName:"metricName" type:"string"` - - // Filters results to include only those in the specified namespace. If you - // include this parameter in your request, you must also include the metricName - // parameter. - MetricNamespace *string `locationName:"metricNamespace" type:"string"` + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` // The token for the next set of items to return. (You received this token from // a previous call.) @@ -7961,7 +10941,7 @@ type DescribeMetricFiltersInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeMetricFiltersInput) String() string { +func (s DescribeSubscriptionFiltersInput) String() string { return awsutil.Prettify(s) } @@ -7970,19 +10950,22 @@ func (s DescribeMetricFiltersInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeMetricFiltersInput) GoString() string { +func (s DescribeSubscriptionFiltersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMetricFiltersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMetricFiltersInput"} +func (s *DescribeSubscriptionFiltersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"} if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } @@ -7997,50 +10980,94 @@ func (s *DescribeMetricFiltersInput) Validate() error { } // SetFilterNamePrefix sets the FilterNamePrefix field's value. -func (s *DescribeMetricFiltersInput) SetFilterNamePrefix(v string) *DescribeMetricFiltersInput { +func (s *DescribeSubscriptionFiltersInput) SetFilterNamePrefix(v string) *DescribeSubscriptionFiltersInput { s.FilterNamePrefix = &v return s } // SetLimit sets the Limit field's value. -func (s *DescribeMetricFiltersInput) SetLimit(v int64) *DescribeMetricFiltersInput { +func (s *DescribeSubscriptionFiltersInput) SetLimit(v int64) *DescribeSubscriptionFiltersInput { s.Limit = &v return s } // SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeMetricFiltersInput) SetLogGroupName(v string) *DescribeMetricFiltersInput { +func (s *DescribeSubscriptionFiltersInput) SetLogGroupName(v string) *DescribeSubscriptionFiltersInput { s.LogGroupName = &v return s } -// SetMetricName sets the MetricName field's value. -func (s *DescribeMetricFiltersInput) SetMetricName(v string) *DescribeMetricFiltersInput { - s.MetricName = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeSubscriptionFiltersInput) SetNextToken(v string) *DescribeSubscriptionFiltersInput { + s.NextToken = &v return s } -// SetMetricNamespace sets the MetricNamespace field's value. -func (s *DescribeMetricFiltersInput) SetMetricNamespace(v string) *DescribeMetricFiltersInput { - s.MetricNamespace = &v - return s +type DescribeSubscriptionFiltersOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The subscription filters. + SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeSubscriptionFiltersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeSubscriptionFiltersOutput) GoString() string { + return s.String() } // SetNextToken sets the NextToken field's value. -func (s *DescribeMetricFiltersInput) SetNextToken(v string) *DescribeMetricFiltersInput { +func (s *DescribeSubscriptionFiltersOutput) SetNextToken(v string) *DescribeSubscriptionFiltersOutput { s.NextToken = &v return s } -type DescribeMetricFiltersOutput struct { +// SetSubscriptionFilters sets the SubscriptionFilters field's value. +func (s *DescribeSubscriptionFiltersOutput) SetSubscriptionFilters(v []*SubscriptionFilter) *DescribeSubscriptionFiltersOutput { + s.SubscriptionFilters = v + return s +} + +// Represents a cross-account destination that receives subscription log events. +type Destination struct { _ struct{} `type:"structure"` - // The metric filters. - MetricFilters []*MetricFilter `locationName:"metricFilters" type:"list"` + // An IAM policy document that governs which Amazon Web Services accounts can + // create subscription filters against this destination. + AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"` + + // The ARN of this destination. + Arn *string `locationName:"arn" type:"string"` + + // The creation time of the destination, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 `locationName:"creationTime" type:"long"` + + // The name of the destination. + DestinationName *string `locationName:"destinationName" min:"1" type:"string"` + + // A role for impersonation, used when delivering log events to the target. + RoleArn *string `locationName:"roleArn" min:"1" type:"string"` - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The Amazon Resource Name (ARN) of the physical target where the log events + // are delivered (for example, a Kinesis stream). + TargetArn *string `locationName:"targetArn" min:"1" type:"string"` } // String returns the string representation. @@ -8048,7 +11075,7 @@ type DescribeMetricFiltersOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeMetricFiltersOutput) String() string { +func (s Destination) String() string { return awsutil.Prettify(s) } @@ -8057,38 +11084,72 @@ func (s DescribeMetricFiltersOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeMetricFiltersOutput) GoString() string { +func (s Destination) GoString() string { return s.String() } -// SetMetricFilters sets the MetricFilters field's value. -func (s *DescribeMetricFiltersOutput) SetMetricFilters(v []*MetricFilter) *DescribeMetricFiltersOutput { - s.MetricFilters = v +// SetAccessPolicy sets the AccessPolicy field's value. +func (s *Destination) SetAccessPolicy(v string) *Destination { + s.AccessPolicy = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFiltersOutput { - s.NextToken = &v +// SetArn sets the Arn field's value. +func (s *Destination) SetArn(v string) *Destination { + s.Arn = &v return s } -type DescribeQueriesInput struct { - _ struct{} `type:"structure"` +// SetCreationTime sets the CreationTime field's value. +func (s *Destination) SetCreationTime(v int64) *Destination { + s.CreationTime = &v + return s +} - // Limits the returned queries to only those for the specified log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` +// SetDestinationName sets the DestinationName field's value. +func (s *Destination) SetDestinationName(v string) *Destination { + s.DestinationName = &v + return s +} - // Limits the number of returned queries to the specified number. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` +// SetRoleArn sets the RoleArn field's value. +func (s *Destination) SetRoleArn(v string) *Destination { + s.RoleArn = &v + return s +} - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` +// SetTargetArn sets the TargetArn field's value. +func (s *Destination) SetTargetArn(v string) *Destination { + s.TargetArn = &v + return s +} - // Limits the returned queries to only those that have the specified status. - // Valid values are Cancelled, Complete, Failed, Running, and Scheduled. - Status *string `locationName:"status" type:"string" enum:"QueryStatus"` +type DisassociateKmsKeyInput struct { + _ struct{} `type:"structure"` + + // The name of the log group. + // + // In your DisassociateKmsKey operation, you must specify either the resourceIdentifier + // parameter or the logGroup parameter, but you can't specify both. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // Specifies the target for this operation. You must specify one of the following: + // + // * Specify the ARN of a log group to stop having CloudWatch Logs use the + // KMS key to encrypt log events that are ingested and stored by that log + // group. After you run this operation, CloudWatch Logs encrypts ingested + // log events with the default CloudWatch Logs method. The log group ARN + // must be in the following format. Replace REGION and ACCOUNT_ID with your + // Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME + // + // * Specify the following ARN to stop using this key to encrypt the results + // of future StartQuery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) + // operations in this account. Replace REGION and ACCOUNT_ID with your Region + // and account ID. arn:aws:logs:REGION:ACCOUNT_ID:query-result:* + // + // In your DisssociateKmsKey operation, you must specify either the resourceIdentifier + // parameter or the logGroup parameter, but you can't specify both. + ResourceIdentifier *string `locationName:"resourceIdentifier" min:"1" type:"string"` } // String returns the string representation. @@ -8096,7 +11157,7 @@ type DescribeQueriesInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueriesInput) String() string { +func (s DisassociateKmsKeyInput) String() string { return awsutil.Prettify(s) } @@ -8105,21 +11166,18 @@ func (s DescribeQueriesInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueriesInput) GoString() string { +func (s DisassociateKmsKeyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeQueriesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeQueriesInput"} +func (s *DisassociateKmsKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateKmsKeyInput"} if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.ResourceIdentifier != nil && len(*s.ResourceIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifier", 1)) } if invalidParams.Len() > 0 { @@ -8129,38 +11187,19 @@ func (s *DescribeQueriesInput) Validate() error { } // SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeQueriesInput) SetLogGroupName(v string) *DescribeQueriesInput { +func (s *DisassociateKmsKeyInput) SetLogGroupName(v string) *DisassociateKmsKeyInput { s.LogGroupName = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeQueriesInput) SetMaxResults(v int64) *DescribeQueriesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeQueriesInput) SetNextToken(v string) *DescribeQueriesInput { - s.NextToken = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeQueriesInput) SetStatus(v string) *DescribeQueriesInput { - s.Status = &v +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *DisassociateKmsKeyInput) SetResourceIdentifier(v string) *DisassociateKmsKeyInput { + s.ResourceIdentifier = &v return s } -type DescribeQueriesOutput struct { +type DisassociateKmsKeyOutput struct { _ struct{} `type:"structure"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The list of queries that match the request. - Queries []*QueryInfo `locationName:"queries" type:"list"` } // String returns the string representation. @@ -8168,7 +11207,7 @@ type DescribeQueriesOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueriesOutput) String() string { +func (s DisassociateKmsKeyOutput) String() string { return awsutil.Prettify(s) } @@ -8177,35 +11216,42 @@ func (s DescribeQueriesOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueriesOutput) GoString() string { +func (s DisassociateKmsKeyOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeQueriesOutput) SetNextToken(v string) *DescribeQueriesOutput { - s.NextToken = &v - return s -} +// Represents an export task. +type ExportTask struct { + _ struct{} `type:"structure"` -// SetQueries sets the Queries field's value. -func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutput { - s.Queries = v - return s -} + // The name of the S3 bucket to which the log data was exported. + Destination *string `locationName:"destination" min:"1" type:"string"` -type DescribeQueryDefinitionsInput struct { - _ struct{} `type:"structure"` + // The prefix that was used as the start of Amazon S3 key for every object exported. + DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` - // Limits the number of returned query definitions to the specified number. - MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + // Execution information about the export task. + ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"` - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The start time, expressed as the number of milliseconds after Jan 1, 1970 + // 00:00:00 UTC. Events with a timestamp before this time are not exported. + From *int64 `locationName:"from" type:"long"` - // Use this parameter to filter your results to only the query definitions that - // have names that start with the prefix you specify. - QueryDefinitionNamePrefix *string `locationName:"queryDefinitionNamePrefix" min:"1" type:"string"` + // The name of the log group from which logs data was exported. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // The status of the export task. + Status *ExportTaskStatus `locationName:"status" type:"structure"` + + // The ID of the export task. + TaskId *string `locationName:"taskId" min:"1" type:"string"` + + // The name of the export task. + TaskName *string `locationName:"taskName" min:"1" type:"string"` + + // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 + // UTC. Events with a timestamp later than this time are not exported. + To *int64 `locationName:"to" type:"long"` } // String returns the string representation. @@ -8213,7 +11259,7 @@ type DescribeQueryDefinitionsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueryDefinitionsInput) String() string { +func (s ExportTask) String() string { return awsutil.Prettify(s) } @@ -8222,98 +11268,75 @@ func (s DescribeQueryDefinitionsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeQueryDefinitionsInput) GoString() string { +func (s ExportTask) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeQueryDefinitionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeQueryDefinitionsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.QueryDefinitionNamePrefix != nil && len(*s.QueryDefinitionNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("QueryDefinitionNamePrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeQueryDefinitionsInput) SetMaxResults(v int64) *DescribeQueryDefinitionsInput { - s.MaxResults = &v +// SetDestination sets the Destination field's value. +func (s *ExportTask) SetDestination(v string) *ExportTask { + s.Destination = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeQueryDefinitionsInput) SetNextToken(v string) *DescribeQueryDefinitionsInput { - s.NextToken = &v +// SetDestinationPrefix sets the DestinationPrefix field's value. +func (s *ExportTask) SetDestinationPrefix(v string) *ExportTask { + s.DestinationPrefix = &v return s } -// SetQueryDefinitionNamePrefix sets the QueryDefinitionNamePrefix field's value. -func (s *DescribeQueryDefinitionsInput) SetQueryDefinitionNamePrefix(v string) *DescribeQueryDefinitionsInput { - s.QueryDefinitionNamePrefix = &v +// SetExecutionInfo sets the ExecutionInfo field's value. +func (s *ExportTask) SetExecutionInfo(v *ExportTaskExecutionInfo) *ExportTask { + s.ExecutionInfo = v return s } -type DescribeQueryDefinitionsOutput struct { - _ struct{} `type:"structure"` - - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The list of query definitions that match your request. - QueryDefinitions []*QueryDefinition `locationName:"queryDefinitions" type:"list"` +// SetFrom sets the From field's value. +func (s *ExportTask) SetFrom(v int64) *ExportTask { + s.From = &v + return s } -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeQueryDefinitionsOutput) String() string { - return awsutil.Prettify(s) +// SetLogGroupName sets the LogGroupName field's value. +func (s *ExportTask) SetLogGroupName(v string) *ExportTask { + s.LogGroupName = &v + return s } -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeQueryDefinitionsOutput) GoString() string { - return s.String() +// SetStatus sets the Status field's value. +func (s *ExportTask) SetStatus(v *ExportTaskStatus) *ExportTask { + s.Status = v + return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeQueryDefinitionsOutput) SetNextToken(v string) *DescribeQueryDefinitionsOutput { - s.NextToken = &v +// SetTaskId sets the TaskId field's value. +func (s *ExportTask) SetTaskId(v string) *ExportTask { + s.TaskId = &v return s } -// SetQueryDefinitions sets the QueryDefinitions field's value. -func (s *DescribeQueryDefinitionsOutput) SetQueryDefinitions(v []*QueryDefinition) *DescribeQueryDefinitionsOutput { - s.QueryDefinitions = v +// SetTaskName sets the TaskName field's value. +func (s *ExportTask) SetTaskName(v string) *ExportTask { + s.TaskName = &v return s } -type DescribeResourcePoliciesInput struct { +// SetTo sets the To field's value. +func (s *ExportTask) SetTo(v int64) *ExportTask { + s.To = &v + return s +} + +// Represents the status of an export task. +type ExportTaskExecutionInfo struct { _ struct{} `type:"structure"` - // The maximum number of resource policies to be displayed with one call of - // this API. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` + // The completion time of the export task, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CompletionTime *int64 `locationName:"completionTime" type:"long"` - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The creation time of the export task, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 `locationName:"creationTime" type:"long"` } // String returns the string representation. @@ -8321,7 +11344,7 @@ type DescribeResourcePoliciesInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeResourcePoliciesInput) String() string { +func (s ExportTaskExecutionInfo) String() string { return awsutil.Prettify(s) } @@ -8330,47 +11353,31 @@ func (s DescribeResourcePoliciesInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeResourcePoliciesInput) GoString() string { +func (s ExportTaskExecutionInfo) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeResourcePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeResourcePoliciesInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLimit sets the Limit field's value. -func (s *DescribeResourcePoliciesInput) SetLimit(v int64) *DescribeResourcePoliciesInput { - s.Limit = &v +// SetCompletionTime sets the CompletionTime field's value. +func (s *ExportTaskExecutionInfo) SetCompletionTime(v int64) *ExportTaskExecutionInfo { + s.CompletionTime = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeResourcePoliciesInput) SetNextToken(v string) *DescribeResourcePoliciesInput { - s.NextToken = &v +// SetCreationTime sets the CreationTime field's value. +func (s *ExportTaskExecutionInfo) SetCreationTime(v int64) *ExportTaskExecutionInfo { + s.CreationTime = &v return s } -type DescribeResourcePoliciesOutput struct { +// Represents the status of an export task. +type ExportTaskStatus struct { _ struct{} `type:"structure"` - // The token for the next set of items to return. The token expires after 24 - // hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The status code of the export task. + Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"` - // The resource policies that exist in this account. - ResourcePolicies []*ResourcePolicy `locationName:"resourcePolicies" type:"list"` + // The status message related to the status code. + Message *string `locationName:"message" type:"string"` } // String returns the string representation. @@ -8378,7 +11385,7 @@ type DescribeResourcePoliciesOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeResourcePoliciesOutput) String() string { +func (s ExportTaskStatus) String() string { return awsutil.Prettify(s) } @@ -8387,40 +11394,93 @@ func (s DescribeResourcePoliciesOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeResourcePoliciesOutput) GoString() string { +func (s ExportTaskStatus) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeResourcePoliciesOutput) SetNextToken(v string) *DescribeResourcePoliciesOutput { - s.NextToken = &v +// SetCode sets the Code field's value. +func (s *ExportTaskStatus) SetCode(v string) *ExportTaskStatus { + s.Code = &v return s } -// SetResourcePolicies sets the ResourcePolicies field's value. -func (s *DescribeResourcePoliciesOutput) SetResourcePolicies(v []*ResourcePolicy) *DescribeResourcePoliciesOutput { - s.ResourcePolicies = v +// SetMessage sets the Message field's value. +func (s *ExportTaskStatus) SetMessage(v string) *ExportTaskStatus { + s.Message = &v return s } -type DescribeSubscriptionFiltersInput struct { +type FilterLogEventsInput struct { _ struct{} `type:"structure"` - // The prefix to match. If you don't specify a value, no prefix filter is applied. - FilterNamePrefix *string `locationName:"filterNamePrefix" min:"1" type:"string"` + // The end of the time range, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are + // not returned. + EndTime *int64 `locationName:"endTime" type:"long"` - // The maximum number of items returned. If you don't specify a value, the default - // is up to 50 items. + // The filter pattern to use. For more information, see Filter and Pattern Syntax + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). + // + // If not provided, all the events are matched. + FilterPattern *string `locationName:"filterPattern" type:"string"` + + // If the value is true, the operation attempts to provide responses that contain + // events from multiple log streams within the log group, interleaved in a single + // response. If the value is false, all the matched log events in the first + // log stream are searched first, then those in the next log stream, and so + // on. + // + // Important As of June 17, 2019, this parameter is ignored and the value is + // assumed to be true. The response from this operation always interleaves events + // from multiple log streams within a log group. + // + // Deprecated: Starting on June 17, 2019, this parameter will be ignored and the value will be assumed to be true. The response from this operation will always interleave events from multiple log streams within a log group. + Interleaved *bool `locationName:"interleaved" deprecated:"true" type:"boolean"` + + // The maximum number of events to return. The default is 10,000 events. Limit *int64 `locationName:"limit" min:"1" type:"integer"` - // The name of the log group. + // Specify either the name or ARN of the log group to view log events from. + // If the log group is in a source account and you are using a monitoring account, + // you must use the log group ARN. // - // LogGroupName is a required field - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + // You must include either logGroupIdentifier or logGroupName, but not both. + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - // The token for the next set of items to return. (You received this token from - // a previous call.) + // The name of the log group to search. + // + // You must include either logGroupIdentifier or logGroupName, but not both. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // Filters the results to include only events from log streams that have names + // starting with this prefix. + // + // If you specify a value for both logStreamNamePrefix and logStreamNames, but + // the value for logStreamNamePrefix does not match any log stream names specified + // in logStreamNames, the action returns an InvalidParameterException error. + LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` + + // Filters the results to only logs from the log streams in this list. + // + // If you specify a value for both logStreamNamePrefix and logStreamNames, the + // action returns an InvalidParameterException error. + LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` + + // The token for the next set of events to return. (You received this token + // from a previous call.) NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The start of the time range, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not + // returned. + StartTime *int64 `locationName:"startTime" type:"long"` + + // Specify true to display the log event fields with all sensitive data unmasked + // and visible. The default is false. + // + // To use this operation with this parameter, you must be signed into an account + // with the logs:Unmask permission. + Unmask *bool `locationName:"unmask" type:"boolean"` } // String returns the string representation. @@ -8428,7 +11488,7 @@ type DescribeSubscriptionFiltersInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeSubscriptionFiltersInput) String() string { +func (s FilterLogEventsInput) String() string { return awsutil.Prettify(s) } @@ -8437,25 +11497,28 @@ func (s DescribeSubscriptionFiltersInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeSubscriptionFiltersInput) GoString() string { +func (s FilterLogEventsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSubscriptionFiltersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSubscriptionFiltersInput"} - if s.FilterNamePrefix != nil && len(*s.FilterNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FilterNamePrefix", 1)) - } +func (s *FilterLogEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"} if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.LogGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) } if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) } + if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) + } + if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) + } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } @@ -8466,39 +11529,88 @@ func (s *DescribeSubscriptionFiltersInput) Validate() error { return nil } -// SetFilterNamePrefix sets the FilterNamePrefix field's value. -func (s *DescribeSubscriptionFiltersInput) SetFilterNamePrefix(v string) *DescribeSubscriptionFiltersInput { - s.FilterNamePrefix = &v +// SetEndTime sets the EndTime field's value. +func (s *FilterLogEventsInput) SetEndTime(v int64) *FilterLogEventsInput { + s.EndTime = &v + return s +} + +// SetFilterPattern sets the FilterPattern field's value. +func (s *FilterLogEventsInput) SetFilterPattern(v string) *FilterLogEventsInput { + s.FilterPattern = &v + return s +} + +// SetInterleaved sets the Interleaved field's value. +func (s *FilterLogEventsInput) SetInterleaved(v bool) *FilterLogEventsInput { + s.Interleaved = &v return s } // SetLimit sets the Limit field's value. -func (s *DescribeSubscriptionFiltersInput) SetLimit(v int64) *DescribeSubscriptionFiltersInput { +func (s *FilterLogEventsInput) SetLimit(v int64) *FilterLogEventsInput { s.Limit = &v return s } +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *FilterLogEventsInput) SetLogGroupIdentifier(v string) *FilterLogEventsInput { + s.LogGroupIdentifier = &v + return s +} + // SetLogGroupName sets the LogGroupName field's value. -func (s *DescribeSubscriptionFiltersInput) SetLogGroupName(v string) *DescribeSubscriptionFiltersInput { +func (s *FilterLogEventsInput) SetLogGroupName(v string) *FilterLogEventsInput { s.LogGroupName = &v return s } +// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. +func (s *FilterLogEventsInput) SetLogStreamNamePrefix(v string) *FilterLogEventsInput { + s.LogStreamNamePrefix = &v + return s +} + +// SetLogStreamNames sets the LogStreamNames field's value. +func (s *FilterLogEventsInput) SetLogStreamNames(v []*string) *FilterLogEventsInput { + s.LogStreamNames = v + return s +} + // SetNextToken sets the NextToken field's value. -func (s *DescribeSubscriptionFiltersInput) SetNextToken(v string) *DescribeSubscriptionFiltersInput { +func (s *FilterLogEventsInput) SetNextToken(v string) *FilterLogEventsInput { s.NextToken = &v return s } -type DescribeSubscriptionFiltersOutput struct { +// SetStartTime sets the StartTime field's value. +func (s *FilterLogEventsInput) SetStartTime(v int64) *FilterLogEventsInput { + s.StartTime = &v + return s +} + +// SetUnmask sets the Unmask field's value. +func (s *FilterLogEventsInput) SetUnmask(v bool) *FilterLogEventsInput { + s.Unmask = &v + return s +} + +type FilterLogEventsOutput struct { _ struct{} `type:"structure"` - // The token for the next set of items to return. The token expires after 24 - // hours. + // The matched events. + Events []*FilteredLogEvent `locationName:"events" type:"list"` + + // The token to use when requesting the next set of items. The token expires + // after 24 hours. NextToken *string `locationName:"nextToken" min:"1" type:"string"` - // The subscription filters. - SubscriptionFilters []*SubscriptionFilter `locationName:"subscriptionFilters" type:"list"` + // Important As of May 15, 2020, this parameter is no longer supported. This + // parameter returns an empty list. + // + // Indicates which log streams have been searched and whether each has been + // searched completely. + SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"` } // String returns the string representation. @@ -8506,7 +11618,7 @@ type DescribeSubscriptionFiltersOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeSubscriptionFiltersOutput) String() string { +func (s FilterLogEventsOutput) String() string { return awsutil.Prettify(s) } @@ -8515,46 +11627,48 @@ func (s DescribeSubscriptionFiltersOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeSubscriptionFiltersOutput) GoString() string { +func (s FilterLogEventsOutput) GoString() string { return s.String() } +// SetEvents sets the Events field's value. +func (s *FilterLogEventsOutput) SetEvents(v []*FilteredLogEvent) *FilterLogEventsOutput { + s.Events = v + return s +} + // SetNextToken sets the NextToken field's value. -func (s *DescribeSubscriptionFiltersOutput) SetNextToken(v string) *DescribeSubscriptionFiltersOutput { +func (s *FilterLogEventsOutput) SetNextToken(v string) *FilterLogEventsOutput { s.NextToken = &v return s } -// SetSubscriptionFilters sets the SubscriptionFilters field's value. -func (s *DescribeSubscriptionFiltersOutput) SetSubscriptionFilters(v []*SubscriptionFilter) *DescribeSubscriptionFiltersOutput { - s.SubscriptionFilters = v +// SetSearchedLogStreams sets the SearchedLogStreams field's value. +func (s *FilterLogEventsOutput) SetSearchedLogStreams(v []*SearchedLogStream) *FilterLogEventsOutput { + s.SearchedLogStreams = v return s } -// Represents a cross-account destination that receives subscription log events. -type Destination struct { +// Represents a matched event. +type FilteredLogEvent struct { _ struct{} `type:"structure"` - // An IAM policy document that governs which Amazon Web Services accounts can - // create subscription filters against this destination. - AccessPolicy *string `locationName:"accessPolicy" min:"1" type:"string"` - - // The ARN of this destination. - Arn *string `locationName:"arn" type:"string"` + // The ID of the event. + EventId *string `locationName:"eventId" type:"string"` - // The creation time of the destination, expressed as the number of milliseconds + // The time the event was ingested, expressed as the number of milliseconds // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` + IngestionTime *int64 `locationName:"ingestionTime" type:"long"` - // The name of the destination. - DestinationName *string `locationName:"destinationName" min:"1" type:"string"` + // The name of the log stream to which this event belongs. + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` - // A role for impersonation, used when delivering log events to the target. - RoleArn *string `locationName:"roleArn" min:"1" type:"string"` + // The data contained in the log event. + Message *string `locationName:"message" min:"1" type:"string"` - // The Amazon Resource Name (ARN) of the physical target where the log events - // are delivered (for example, a Kinesis stream). - TargetArn *string `locationName:"targetArn" min:"1" type:"string"` + // The time the event occurred, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. + Timestamp *int64 `locationName:"timestamp" type:"long"` } // String returns the string representation. @@ -8562,7 +11676,7 @@ type Destination struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s Destination) String() string { +func (s FilteredLogEvent) String() string { return awsutil.Prettify(s) } @@ -8571,72 +11685,48 @@ func (s Destination) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s Destination) GoString() string { +func (s FilteredLogEvent) GoString() string { return s.String() } -// SetAccessPolicy sets the AccessPolicy field's value. -func (s *Destination) SetAccessPolicy(v string) *Destination { - s.AccessPolicy = &v - return s -} - -// SetArn sets the Arn field's value. -func (s *Destination) SetArn(v string) *Destination { - s.Arn = &v +// SetEventId sets the EventId field's value. +func (s *FilteredLogEvent) SetEventId(v string) *FilteredLogEvent { + s.EventId = &v return s } -// SetCreationTime sets the CreationTime field's value. -func (s *Destination) SetCreationTime(v int64) *Destination { - s.CreationTime = &v +// SetIngestionTime sets the IngestionTime field's value. +func (s *FilteredLogEvent) SetIngestionTime(v int64) *FilteredLogEvent { + s.IngestionTime = &v return s } -// SetDestinationName sets the DestinationName field's value. -func (s *Destination) SetDestinationName(v string) *Destination { - s.DestinationName = &v +// SetLogStreamName sets the LogStreamName field's value. +func (s *FilteredLogEvent) SetLogStreamName(v string) *FilteredLogEvent { + s.LogStreamName = &v return s } -// SetRoleArn sets the RoleArn field's value. -func (s *Destination) SetRoleArn(v string) *Destination { - s.RoleArn = &v +// SetMessage sets the Message field's value. +func (s *FilteredLogEvent) SetMessage(v string) *FilteredLogEvent { + s.Message = &v return s } -// SetTargetArn sets the TargetArn field's value. -func (s *Destination) SetTargetArn(v string) *Destination { - s.TargetArn = &v +// SetTimestamp sets the Timestamp field's value. +func (s *FilteredLogEvent) SetTimestamp(v int64) *FilteredLogEvent { + s.Timestamp = &v return s } -type DisassociateKmsKeyInput struct { +type GetDataProtectionPolicyInput struct { _ struct{} `type:"structure"` - // The name of the log group. - // - // In your DisassociateKmsKey operation, you must specify either the resourceIdentifier - // parameter or the logGroup parameter, but you can't specify both. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // Specifies the target for this operation. You must specify one of the following: - // - // * Specify the ARN of a log group to stop having CloudWatch Logs use the - // KMS key to encrypt log events that are ingested and stored by that log - // group. After you run this operation, CloudWatch Logs encrypts ingested - // log events with the default CloudWatch Logs method. The log group ARN - // must be in the following format. Replace REGION and ACCOUNT_ID with your - // Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME - // - // * Specify the following ARN to stop using this key to encrypt the results - // of future StartQuery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) - // operations in this account. Replace REGION and ACCOUNT_ID with your Region - // and account ID. arn:aws:logs:REGION:ACCOUNT_ID:query-result:* + // The name or ARN of the log group that contains the data protection policy + // that you want to see. // - // In your DisssociateKmsKey operation, you must specify either the resourceIdentifier - // parameter or the logGroup parameter, but you can't specify both. - ResourceIdentifier *string `locationName:"resourceIdentifier" min:"1" type:"string"` + // LogGroupIdentifier is a required field + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -8644,7 +11734,7 @@ type DisassociateKmsKeyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DisassociateKmsKeyInput) String() string { +func (s GetDataProtectionPolicyInput) String() string { return awsutil.Prettify(s) } @@ -8653,18 +11743,18 @@ func (s DisassociateKmsKeyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DisassociateKmsKeyInput) GoString() string { +func (s GetDataProtectionPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateKmsKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateKmsKeyInput"} - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) +func (s *GetDataProtectionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDataProtectionPolicyInput"} + if s.LogGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) } - if s.ResourceIdentifier != nil && len(*s.ResourceIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifier", 1)) + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) } if invalidParams.Len() > 0 { @@ -8673,72 +11763,23 @@ func (s *DisassociateKmsKeyInput) Validate() error { return nil } -// SetLogGroupName sets the LogGroupName field's value. -func (s *DisassociateKmsKeyInput) SetLogGroupName(v string) *DisassociateKmsKeyInput { - s.LogGroupName = &v - return s -} - -// SetResourceIdentifier sets the ResourceIdentifier field's value. -func (s *DisassociateKmsKeyInput) SetResourceIdentifier(v string) *DisassociateKmsKeyInput { - s.ResourceIdentifier = &v +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *GetDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *GetDataProtectionPolicyInput { + s.LogGroupIdentifier = &v return s } -type DisassociateKmsKeyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateKmsKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DisassociateKmsKeyOutput) GoString() string { - return s.String() -} - -// Represents an export task. -type ExportTask struct { +type GetDataProtectionPolicyOutput struct { _ struct{} `type:"structure"` - // The name of the S3 bucket to which the log data was exported. - Destination *string `locationName:"destination" min:"1" type:"string"` - - // The prefix that was used as the start of Amazon S3 key for every object exported. - DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` - - // Execution information about the export task. - ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"` - - // The start time, expressed as the number of milliseconds after Jan 1, 1970 - // 00:00:00 UTC. Events with a timestamp before this time are not exported. - From *int64 `locationName:"from" type:"long"` - - // The name of the log group from which logs data was exported. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // The status of the export task. - Status *ExportTaskStatus `locationName:"status" type:"structure"` - - // The ID of the export task. - TaskId *string `locationName:"taskId" min:"1" type:"string"` + // The date and time that this policy was most recently updated. + LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` - // The name of the export task. - TaskName *string `locationName:"taskName" min:"1" type:"string"` + // The log group name or ARN that you specified in your request. + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 - // UTC. Events with a timestamp later than this time are not exported. - To *int64 `locationName:"to" type:"long"` + // The data protection policy document for this log group. + PolicyDocument *string `locationName:"policyDocument" type:"string"` } // String returns the string representation. @@ -8746,7 +11787,7 @@ type ExportTask struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTask) String() string { +func (s GetDataProtectionPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -8755,75 +11796,35 @@ func (s ExportTask) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTask) GoString() string { +func (s GetDataProtectionPolicyOutput) GoString() string { return s.String() } -// SetDestination sets the Destination field's value. -func (s *ExportTask) SetDestination(v string) *ExportTask { - s.Destination = &v - return s -} - -// SetDestinationPrefix sets the DestinationPrefix field's value. -func (s *ExportTask) SetDestinationPrefix(v string) *ExportTask { - s.DestinationPrefix = &v - return s -} - -// SetExecutionInfo sets the ExecutionInfo field's value. -func (s *ExportTask) SetExecutionInfo(v *ExportTaskExecutionInfo) *ExportTask { - s.ExecutionInfo = v - return s -} - -// SetFrom sets the From field's value. -func (s *ExportTask) SetFrom(v int64) *ExportTask { - s.From = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *ExportTask) SetLogGroupName(v string) *ExportTask { - s.LogGroupName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ExportTask) SetStatus(v *ExportTaskStatus) *ExportTask { - s.Status = v - return s -} - -// SetTaskId sets the TaskId field's value. -func (s *ExportTask) SetTaskId(v string) *ExportTask { - s.TaskId = &v +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *GetDataProtectionPolicyOutput) SetLastUpdatedTime(v int64) *GetDataProtectionPolicyOutput { + s.LastUpdatedTime = &v return s } -// SetTaskName sets the TaskName field's value. -func (s *ExportTask) SetTaskName(v string) *ExportTask { - s.TaskName = &v +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *GetDataProtectionPolicyOutput) SetLogGroupIdentifier(v string) *GetDataProtectionPolicyOutput { + s.LogGroupIdentifier = &v return s } -// SetTo sets the To field's value. -func (s *ExportTask) SetTo(v int64) *ExportTask { - s.To = &v +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *GetDataProtectionPolicyOutput) SetPolicyDocument(v string) *GetDataProtectionPolicyOutput { + s.PolicyDocument = &v return s } -// Represents the status of an export task. -type ExportTaskExecutionInfo struct { +type GetDeliveryDestinationInput struct { _ struct{} `type:"structure"` - // The completion time of the export task, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CompletionTime *int64 `locationName:"completionTime" type:"long"` - - // The creation time of the export task, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` + // The name of the delivery destination that you want to retrieve. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -8831,7 +11832,7 @@ type ExportTaskExecutionInfo struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTaskExecutionInfo) String() string { +func (s GetDeliveryDestinationInput) String() string { return awsutil.Prettify(s) } @@ -8840,31 +11841,37 @@ func (s ExportTaskExecutionInfo) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTaskExecutionInfo) GoString() string { +func (s GetDeliveryDestinationInput) GoString() string { return s.String() } -// SetCompletionTime sets the CompletionTime field's value. -func (s *ExportTaskExecutionInfo) SetCompletionTime(v int64) *ExportTaskExecutionInfo { - s.CompletionTime = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeliveryDestinationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeliveryDestinationInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetCreationTime sets the CreationTime field's value. -func (s *ExportTaskExecutionInfo) SetCreationTime(v int64) *ExportTaskExecutionInfo { - s.CreationTime = &v +// SetName sets the Name field's value. +func (s *GetDeliveryDestinationInput) SetName(v string) *GetDeliveryDestinationInput { + s.Name = &v return s } -// Represents the status of an export task. -type ExportTaskStatus struct { +type GetDeliveryDestinationOutput struct { _ struct{} `type:"structure"` - // The status code of the export task. - Code *string `locationName:"code" type:"string" enum:"ExportTaskStatusCode"` - - // The status message related to the status code. - Message *string `locationName:"message" type:"string"` + // A structure containing information about the delivery destination. + DeliveryDestination *DeliveryDestination `locationName:"deliveryDestination" type:"structure"` } // String returns the string representation. @@ -8872,7 +11879,7 @@ type ExportTaskStatus struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTaskStatus) String() string { +func (s GetDeliveryDestinationOutput) String() string { return awsutil.Prettify(s) } @@ -8881,93 +11888,24 @@ func (s ExportTaskStatus) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ExportTaskStatus) GoString() string { +func (s GetDeliveryDestinationOutput) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *ExportTaskStatus) SetCode(v string) *ExportTaskStatus { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ExportTaskStatus) SetMessage(v string) *ExportTaskStatus { - s.Message = &v +// SetDeliveryDestination sets the DeliveryDestination field's value. +func (s *GetDeliveryDestinationOutput) SetDeliveryDestination(v *DeliveryDestination) *GetDeliveryDestinationOutput { + s.DeliveryDestination = v return s } -type FilterLogEventsInput struct { +type GetDeliveryDestinationPolicyInput struct { _ struct{} `type:"structure"` - // The end of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are - // not returned. - EndTime *int64 `locationName:"endTime" type:"long"` - - // The filter pattern to use. For more information, see Filter and Pattern Syntax - // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html). - // - // If not provided, all the events are matched. - FilterPattern *string `locationName:"filterPattern" type:"string"` - - // If the value is true, the operation attempts to provide responses that contain - // events from multiple log streams within the log group, interleaved in a single - // response. If the value is false, all the matched log events in the first - // log stream are searched first, then those in the next log stream, and so - // on. - // - // Important As of June 17, 2019, this parameter is ignored and the value is - // assumed to be true. The response from this operation always interleaves events - // from multiple log streams within a log group. - // - // Deprecated: Starting on June 17, 2019, this parameter will be ignored and the value will be assumed to be true. The response from this operation will always interleave events from multiple log streams within a log group. - Interleaved *bool `locationName:"interleaved" deprecated:"true" type:"boolean"` - - // The maximum number of events to return. The default is 10,000 events. - Limit *int64 `locationName:"limit" min:"1" type:"integer"` - - // Specify either the name or ARN of the log group to view log events from. - // If the log group is in a source account and you are using a monitoring account, - // you must use the log group ARN. - // - // You must include either logGroupIdentifier or logGroupName, but not both. - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - - // The name of the log group to search. - // - // You must include either logGroupIdentifier or logGroupName, but not both. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - - // Filters the results to include only events from log streams that have names - // starting with this prefix. - // - // If you specify a value for both logStreamNamePrefix and logStreamNames, but - // the value for logStreamNamePrefix does not match any log stream names specified - // in logStreamNames, the action returns an InvalidParameterException error. - LogStreamNamePrefix *string `locationName:"logStreamNamePrefix" min:"1" type:"string"` - - // Filters the results to only logs from the log streams in this list. - // - // If you specify a value for both logStreamNamePrefix and logStreamNames, the - // action returns an InvalidParameterException error. - LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` - - // The token for the next set of events to return. (You received this token - // from a previous call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // The start of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not - // returned. - StartTime *int64 `locationName:"startTime" type:"long"` - - // Specify true to display the log event fields with all sensitive data unmasked - // and visible. The default is false. + // The name of the delivery destination that you want to retrieve the policy + // of. // - // To use this operation with this parameter, you must be signed into an account - // with the logs:Unmask permission. - Unmask *bool `locationName:"unmask" type:"boolean"` + // DeliveryDestinationName is a required field + DeliveryDestinationName *string `locationName:"deliveryDestinationName" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -8975,7 +11913,7 @@ type FilterLogEventsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilterLogEventsInput) String() string { +func (s GetDeliveryDestinationPolicyInput) String() string { return awsutil.Prettify(s) } @@ -8984,30 +11922,18 @@ func (s FilterLogEventsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilterLogEventsInput) GoString() string { +func (s GetDeliveryDestinationPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *FilterLogEventsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FilterLogEventsInput"} - if s.Limit != nil && *s.Limit < 1 { - invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) - } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) - } - if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) - } - if s.LogStreamNamePrefix != nil && len(*s.LogStreamNamePrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefix", 1)) - } - if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) +func (s *GetDeliveryDestinationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeliveryDestinationPolicyInput"} + if s.DeliveryDestinationName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationName")) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.DeliveryDestinationName != nil && len(*s.DeliveryDestinationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryDestinationName", 1)) } if invalidParams.Len() > 0 { @@ -9016,88 +11942,17 @@ func (s *FilterLogEventsInput) Validate() error { return nil } -// SetEndTime sets the EndTime field's value. -func (s *FilterLogEventsInput) SetEndTime(v int64) *FilterLogEventsInput { - s.EndTime = &v - return s -} - -// SetFilterPattern sets the FilterPattern field's value. -func (s *FilterLogEventsInput) SetFilterPattern(v string) *FilterLogEventsInput { - s.FilterPattern = &v - return s -} - -// SetInterleaved sets the Interleaved field's value. -func (s *FilterLogEventsInput) SetInterleaved(v bool) *FilterLogEventsInput { - s.Interleaved = &v - return s -} - -// SetLimit sets the Limit field's value. -func (s *FilterLogEventsInput) SetLimit(v int64) *FilterLogEventsInput { - s.Limit = &v - return s -} - -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *FilterLogEventsInput) SetLogGroupIdentifier(v string) *FilterLogEventsInput { - s.LogGroupIdentifier = &v - return s -} - -// SetLogGroupName sets the LogGroupName field's value. -func (s *FilterLogEventsInput) SetLogGroupName(v string) *FilterLogEventsInput { - s.LogGroupName = &v - return s -} - -// SetLogStreamNamePrefix sets the LogStreamNamePrefix field's value. -func (s *FilterLogEventsInput) SetLogStreamNamePrefix(v string) *FilterLogEventsInput { - s.LogStreamNamePrefix = &v - return s -} - -// SetLogStreamNames sets the LogStreamNames field's value. -func (s *FilterLogEventsInput) SetLogStreamNames(v []*string) *FilterLogEventsInput { - s.LogStreamNames = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *FilterLogEventsInput) SetNextToken(v string) *FilterLogEventsInput { - s.NextToken = &v - return s -} - -// SetStartTime sets the StartTime field's value. -func (s *FilterLogEventsInput) SetStartTime(v int64) *FilterLogEventsInput { - s.StartTime = &v - return s -} - -// SetUnmask sets the Unmask field's value. -func (s *FilterLogEventsInput) SetUnmask(v bool) *FilterLogEventsInput { - s.Unmask = &v +// SetDeliveryDestinationName sets the DeliveryDestinationName field's value. +func (s *GetDeliveryDestinationPolicyInput) SetDeliveryDestinationName(v string) *GetDeliveryDestinationPolicyInput { + s.DeliveryDestinationName = &v return s } -type FilterLogEventsOutput struct { +type GetDeliveryDestinationPolicyOutput struct { _ struct{} `type:"structure"` - // The matched events. - Events []*FilteredLogEvent `locationName:"events" type:"list"` - - // The token to use when requesting the next set of items. The token expires - // after 24 hours. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // Important As of May 15, 2020, this parameter is no longer supported. This - // parameter returns an empty list. - // - // Indicates which log streams have been searched and whether each has been - // searched completely. - SearchedLogStreams []*SearchedLogStream `locationName:"searchedLogStreams" type:"list"` + // The IAM policy for this delivery destination. + Policy *Policy `locationName:"policy" type:"structure"` } // String returns the string representation. @@ -9105,7 +11960,7 @@ type FilterLogEventsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilterLogEventsOutput) String() string { +func (s GetDeliveryDestinationPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -9114,48 +11969,23 @@ func (s FilterLogEventsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilterLogEventsOutput) GoString() string { +func (s GetDeliveryDestinationPolicyOutput) GoString() string { return s.String() } -// SetEvents sets the Events field's value. -func (s *FilterLogEventsOutput) SetEvents(v []*FilteredLogEvent) *FilterLogEventsOutput { - s.Events = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *FilterLogEventsOutput) SetNextToken(v string) *FilterLogEventsOutput { - s.NextToken = &v - return s -} - -// SetSearchedLogStreams sets the SearchedLogStreams field's value. -func (s *FilterLogEventsOutput) SetSearchedLogStreams(v []*SearchedLogStream) *FilterLogEventsOutput { - s.SearchedLogStreams = v +// SetPolicy sets the Policy field's value. +func (s *GetDeliveryDestinationPolicyOutput) SetPolicy(v *Policy) *GetDeliveryDestinationPolicyOutput { + s.Policy = v return s -} - -// Represents a matched event. -type FilteredLogEvent struct { - _ struct{} `type:"structure"` - - // The ID of the event. - EventId *string `locationName:"eventId" type:"string"` - - // The time the event was ingested, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - IngestionTime *int64 `locationName:"ingestionTime" type:"long"` - - // The name of the log stream to which this event belongs. - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` +} - // The data contained in the log event. - Message *string `locationName:"message" min:"1" type:"string"` +type GetDeliveryInput struct { + _ struct{} `type:"structure"` - // The time the event occurred, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - Timestamp *int64 `locationName:"timestamp" type:"long"` + // The ID of the delivery that you want to retrieve. + // + // Id is a required field + Id *string `locationName:"id" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -9163,7 +11993,7 @@ type FilteredLogEvent struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilteredLogEvent) String() string { +func (s GetDeliveryInput) String() string { return awsutil.Prettify(s) } @@ -9172,48 +12002,70 @@ func (s FilteredLogEvent) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s FilteredLogEvent) GoString() string { +func (s GetDeliveryInput) GoString() string { return s.String() } -// SetEventId sets the EventId field's value. -func (s *FilteredLogEvent) SetEventId(v string) *FilteredLogEvent { - s.EventId = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeliveryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeliveryInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetIngestionTime sets the IngestionTime field's value. -func (s *FilteredLogEvent) SetIngestionTime(v int64) *FilteredLogEvent { - s.IngestionTime = &v +// SetId sets the Id field's value. +func (s *GetDeliveryInput) SetId(v string) *GetDeliveryInput { + s.Id = &v return s } -// SetLogStreamName sets the LogStreamName field's value. -func (s *FilteredLogEvent) SetLogStreamName(v string) *FilteredLogEvent { - s.LogStreamName = &v - return s +type GetDeliveryOutput struct { + _ struct{} `type:"structure"` + + // A structure that contains information about the delivery. + Delivery *Delivery `locationName:"delivery" type:"structure"` } -// SetMessage sets the Message field's value. -func (s *FilteredLogEvent) SetMessage(v string) *FilteredLogEvent { - s.Message = &v - return s +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetDeliveryOutput) String() string { + return awsutil.Prettify(s) } -// SetTimestamp sets the Timestamp field's value. -func (s *FilteredLogEvent) SetTimestamp(v int64) *FilteredLogEvent { - s.Timestamp = &v +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetDeliveryOutput) GoString() string { + return s.String() +} + +// SetDelivery sets the Delivery field's value. +func (s *GetDeliveryOutput) SetDelivery(v *Delivery) *GetDeliveryOutput { + s.Delivery = v return s } -type GetDataProtectionPolicyInput struct { +type GetDeliverySourceInput struct { _ struct{} `type:"structure"` - // The name or ARN of the log group that contains the data protection policy - // that you want to see. + // The name of the delivery source that you want to retrieve. // - // LogGroupIdentifier is a required field - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -9221,7 +12073,7 @@ type GetDataProtectionPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDataProtectionPolicyInput) String() string { +func (s GetDeliverySourceInput) String() string { return awsutil.Prettify(s) } @@ -9230,18 +12082,18 @@ func (s GetDataProtectionPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDataProtectionPolicyInput) GoString() string { +func (s GetDeliverySourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDataProtectionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDataProtectionPolicyInput"} - if s.LogGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) +func (s *GetDeliverySourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeliverySourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { @@ -9250,23 +12102,17 @@ func (s *GetDataProtectionPolicyInput) Validate() error { return nil } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *GetDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *GetDataProtectionPolicyInput { - s.LogGroupIdentifier = &v +// SetName sets the Name field's value. +func (s *GetDeliverySourceInput) SetName(v string) *GetDeliverySourceInput { + s.Name = &v return s } -type GetDataProtectionPolicyOutput struct { +type GetDeliverySourceOutput struct { _ struct{} `type:"structure"` - // The date and time that this policy was most recently updated. - LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` - - // The log group name or ARN that you specified in your request. - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - - // The data protection policy document for this log group. - PolicyDocument *string `locationName:"policyDocument" type:"string"` + // A structure containing information about the delivery source. + DeliverySource *DeliverySource `locationName:"deliverySource" type:"structure"` } // String returns the string representation. @@ -9274,7 +12120,7 @@ type GetDataProtectionPolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDataProtectionPolicyOutput) String() string { +func (s GetDeliverySourceOutput) String() string { return awsutil.Prettify(s) } @@ -9283,25 +12129,13 @@ func (s GetDataProtectionPolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetDataProtectionPolicyOutput) GoString() string { +func (s GetDeliverySourceOutput) GoString() string { return s.String() } -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *GetDataProtectionPolicyOutput) SetLastUpdatedTime(v int64) *GetDataProtectionPolicyOutput { - s.LastUpdatedTime = &v - return s -} - -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *GetDataProtectionPolicyOutput) SetLogGroupIdentifier(v string) *GetDataProtectionPolicyOutput { - s.LogGroupIdentifier = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetDataProtectionPolicyOutput) SetPolicyDocument(v string) *GetDataProtectionPolicyOutput { - s.PolicyDocument = &v +// SetDeliverySource sets the DeliverySource field's value. +func (s *GetDeliverySourceOutput) SetDeliverySource(v *DeliverySource) *GetDeliverySourceOutput { + s.DeliverySource = v return s } @@ -10333,18 +13167,45 @@ func (s *ListTagsLogGroupOutput) SetTags(v map[string]*string) *ListTagsLogGroup return s } -type LiveTailSessionLogEvent struct { +// Represents a log group. +type LogGroup struct { _ struct{} `type:"structure"` - IngestionTime *int64 `locationName:"ingestionTime" type:"long"` + // The Amazon Resource Name (ARN) of the log group. + Arn *string `locationName:"arn" type:"string"` - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` + // The creation time of the log group, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 `locationName:"creationTime" type:"long"` - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` + // Displays whether this log group has a protection policy, or whether it had + // one in the past. For more information, see PutDataProtectionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html). + DataProtectionStatus *string `locationName:"dataProtectionStatus" type:"string" enum:"DataProtectionStatus"` - Message *string `locationName:"message" min:"1" type:"string"` + // Displays all the properties that this log group has inherited from account-level + // settings. + InheritedProperties []*string `locationName:"inheritedProperties" type:"list" enum:"InheritedProperty"` - Timestamp *int64 `locationName:"timestamp" type:"long"` + // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log + // data. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + + // The name of the log group. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // The number of metric filters. + MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"` + + // The number of days to retain the log events in the specified log group. Possible + // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, + // 1096, 1827, 2192, 2557, 2922, 3288, and 3653. + // + // To set a log group so that its log events do not expire, use DeleteRetentionPolicy + // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html). + RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"` + + // The number of bytes stored. + StoredBytes *int64 `locationName:"storedBytes" type:"long"` } // String returns the string representation. @@ -10352,7 +13213,7 @@ type LiveTailSessionLogEvent struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LiveTailSessionLogEvent) String() string { +func (s LogGroup) String() string { return awsutil.Prettify(s) } @@ -10361,44 +13222,74 @@ func (s LiveTailSessionLogEvent) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LiveTailSessionLogEvent) GoString() string { +func (s LogGroup) GoString() string { return s.String() } -// SetIngestionTime sets the IngestionTime field's value. -func (s *LiveTailSessionLogEvent) SetIngestionTime(v int64) *LiveTailSessionLogEvent { - s.IngestionTime = &v +// SetArn sets the Arn field's value. +func (s *LogGroup) SetArn(v string) *LogGroup { + s.Arn = &v return s } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *LiveTailSessionLogEvent) SetLogGroupIdentifier(v string) *LiveTailSessionLogEvent { - s.LogGroupIdentifier = &v +// SetCreationTime sets the CreationTime field's value. +func (s *LogGroup) SetCreationTime(v int64) *LogGroup { + s.CreationTime = &v return s } -// SetLogStreamName sets the LogStreamName field's value. -func (s *LiveTailSessionLogEvent) SetLogStreamName(v string) *LiveTailSessionLogEvent { - s.LogStreamName = &v +// SetDataProtectionStatus sets the DataProtectionStatus field's value. +func (s *LogGroup) SetDataProtectionStatus(v string) *LogGroup { + s.DataProtectionStatus = &v return s } -// SetMessage sets the Message field's value. -func (s *LiveTailSessionLogEvent) SetMessage(v string) *LiveTailSessionLogEvent { - s.Message = &v +// SetInheritedProperties sets the InheritedProperties field's value. +func (s *LogGroup) SetInheritedProperties(v []*string) *LogGroup { + s.InheritedProperties = v return s } -// SetTimestamp sets the Timestamp field's value. -func (s *LiveTailSessionLogEvent) SetTimestamp(v int64) *LiveTailSessionLogEvent { - s.Timestamp = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *LogGroup) SetKmsKeyId(v string) *LogGroup { + s.KmsKeyId = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *LogGroup) SetLogGroupName(v string) *LogGroup { + s.LogGroupName = &v + return s +} + +// SetMetricFilterCount sets the MetricFilterCount field's value. +func (s *LogGroup) SetMetricFilterCount(v int64) *LogGroup { + s.MetricFilterCount = &v + return s +} + +// SetRetentionInDays sets the RetentionInDays field's value. +func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup { + s.RetentionInDays = &v + return s +} + +// SetStoredBytes sets the StoredBytes field's value. +func (s *LogGroup) SetStoredBytes(v int64) *LogGroup { + s.StoredBytes = &v return s } -type LiveTailSessionMetadata struct { +// The fields contained in log events found by a GetLogGroupFields operation, +// along with the percentage of queried log events in which each field appears. +type LogGroupField struct { _ struct{} `type:"structure"` - Sampled *bool `locationName:"sampled" type:"boolean"` + // The name of a log field. + Name *string `locationName:"name" type:"string"` + + // The percentage of log events queried that contained the field. + Percent *int64 `locationName:"percent" type:"integer"` } // String returns the string representation. @@ -10406,7 +13297,7 @@ type LiveTailSessionMetadata struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LiveTailSessionMetadata) String() string { +func (s LogGroupField) String() string { return awsutil.Prettify(s) } @@ -10415,34 +13306,69 @@ func (s LiveTailSessionMetadata) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LiveTailSessionMetadata) GoString() string { +func (s LogGroupField) GoString() string { return s.String() } -// SetSampled sets the Sampled field's value. -func (s *LiveTailSessionMetadata) SetSampled(v bool) *LiveTailSessionMetadata { - s.Sampled = &v +// SetName sets the Name field's value. +func (s *LogGroupField) SetName(v string) *LogGroupField { + s.Name = &v + return s +} + +// SetPercent sets the Percent field's value. +func (s *LogGroupField) SetPercent(v int64) *LogGroupField { + s.Percent = &v return s } -type LiveTailSessionStart struct { +// Represents a log stream, which is a sequence of log events from a single +// emitter of logs. +type LogStream struct { _ struct{} `type:"structure"` - // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event can contain timestamps, IP addresses, - // strings, and so on. You use the filter pattern to specify what to look for - // in the log event message. - LogEventFilterPattern *string `locationName:"logEventFilterPattern" type:"string"` + // The Amazon Resource Name (ARN) of the log stream. + Arn *string `locationName:"arn" type:"string"` + + // The creation time of the stream, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 `locationName:"creationTime" type:"long"` + + // The time of the first event, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. + FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"` - LogGroupIdentifiers []*string `locationName:"logGroupIdentifiers" min:"1" type:"list"` + // The time of the most recent log event in the log stream in CloudWatch Logs. + // This number is expressed as the number of milliseconds after Jan 1, 1970 + // 00:00:00 UTC. The lastEventTime value updates on an eventual consistency + // basis. It typically updates in less than an hour from ingestion, but in rare + // situations might take longer. + LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"` - LogStreamNamePrefixes []*string `locationName:"logStreamNamePrefixes" min:"1" type:"list"` + // The ingestion time, expressed as the number of milliseconds after Jan 1, + // 1970 00:00:00 UTC The lastIngestionTime value updates on an eventual consistency + // basis. It typically updates in less than an hour after ingestion, but in + // rare situations might take longer. + LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"` - LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` + // The name of the log stream. + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` - RequestId *string `locationName:"requestId" type:"string"` + // The number of bytes stored. + // + // Important: As of June 17, 2019, this parameter is no longer supported for + // log streams, and is always reported as zero. This change applies only to + // log streams. The storedBytes parameter for log groups is not affected. + // + // Deprecated: Starting on June 17, 2019, this parameter will be deprecated for log streams, and will be reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected. + StoredBytes *int64 `locationName:"storedBytes" deprecated:"true" type:"long"` - SessionId *string `locationName:"sessionId" type:"string"` + // The sequence token. + // + // The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions + // are always accepted regardless of receiving an invalid sequence token. You + // don't need to obtain uploadSequenceToken to use a PutLogEvents action. + UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"` } // String returns the string representation. @@ -10450,7 +13376,7 @@ type LiveTailSessionStart struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LiveTailSessionStart) String() string { +func (s LogStream) String() string { return awsutil.Prettify(s) } @@ -10459,81 +13385,71 @@ func (s LiveTailSessionStart) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LiveTailSessionStart) GoString() string { +func (s LogStream) GoString() string { return s.String() } -// SetLogEventFilterPattern sets the LogEventFilterPattern field's value. -func (s *LiveTailSessionStart) SetLogEventFilterPattern(v string) *LiveTailSessionStart { - s.LogEventFilterPattern = &v +// SetArn sets the Arn field's value. +func (s *LogStream) SetArn(v string) *LogStream { + s.Arn = &v return s } -// SetLogGroupIdentifiers sets the LogGroupIdentifiers field's value. -func (s *LiveTailSessionStart) SetLogGroupIdentifiers(v []*string) *LiveTailSessionStart { - s.LogGroupIdentifiers = v +// SetCreationTime sets the CreationTime field's value. +func (s *LogStream) SetCreationTime(v int64) *LogStream { + s.CreationTime = &v return s } -// SetLogStreamNamePrefixes sets the LogStreamNamePrefixes field's value. -func (s *LiveTailSessionStart) SetLogStreamNamePrefixes(v []*string) *LiveTailSessionStart { - s.LogStreamNamePrefixes = v +// SetFirstEventTimestamp sets the FirstEventTimestamp field's value. +func (s *LogStream) SetFirstEventTimestamp(v int64) *LogStream { + s.FirstEventTimestamp = &v return s } -// SetLogStreamNames sets the LogStreamNames field's value. -func (s *LiveTailSessionStart) SetLogStreamNames(v []*string) *LiveTailSessionStart { - s.LogStreamNames = v +// SetLastEventTimestamp sets the LastEventTimestamp field's value. +func (s *LogStream) SetLastEventTimestamp(v int64) *LogStream { + s.LastEventTimestamp = &v return s } -// SetRequestId sets the RequestId field's value. -func (s *LiveTailSessionStart) SetRequestId(v string) *LiveTailSessionStart { - s.RequestId = &v +// SetLastIngestionTime sets the LastIngestionTime field's value. +func (s *LogStream) SetLastIngestionTime(v int64) *LogStream { + s.LastIngestionTime = &v return s } -// SetSessionId sets the SessionId field's value. -func (s *LiveTailSessionStart) SetSessionId(v string) *LiveTailSessionStart { - s.SessionId = &v +// SetLogStreamName sets the LogStreamName field's value. +func (s *LogStream) SetLogStreamName(v string) *LogStream { + s.LogStreamName = &v return s } -// The LiveTailSessionStart is and event in the StartLiveTailResponseStream group of events. -func (s *LiveTailSessionStart) eventStartLiveTailResponseStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the LiveTailSessionStart value. -// This method is only used internally within the SDK's EventStream handling. -func (s *LiveTailSessionStart) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - if err := payloadUnmarshaler.UnmarshalPayload( - bytes.NewReader(msg.Payload), s, - ); err != nil { - return err - } - return nil +// SetStoredBytes sets the StoredBytes field's value. +func (s *LogStream) SetStoredBytes(v int64) *LogStream { + s.StoredBytes = &v + return s } -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *LiveTailSessionStart) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) - var buf bytes.Buffer - if err = pm.MarshalPayload(&buf, s); err != nil { - return eventstream.Message{}, err - } - msg.Payload = buf.Bytes() - return msg, err +// SetUploadSequenceToken sets the UploadSequenceToken field's value. +func (s *LogStream) SetUploadSequenceToken(v string) *LogStream { + s.UploadSequenceToken = &v + return s } -type LiveTailSessionUpdate struct { - _ struct{} `type:"structure"` +// The query string is not valid. Details about this error are displayed in +// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). +// +// For more information about valid query syntax, see CloudWatch Logs Insights +// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). +type MalformedQueryException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - SessionMetadata *LiveTailSessionMetadata `locationName:"sessionMetadata" type:"structure"` + Message_ *string `locationName:"message" type:"string"` - SessionResults []*LiveTailSessionLogEvent `locationName:"sessionResults" type:"list"` + // Reserved. + QueryCompileError *QueryCompileError `locationName:"queryCompileError" type:"structure"` } // String returns the string representation. @@ -10541,7 +13457,7 @@ type LiveTailSessionUpdate struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LiveTailSessionUpdate) String() string { +func (s MalformedQueryException) String() string { return awsutil.Prettify(s) } @@ -10550,90 +13466,72 @@ func (s LiveTailSessionUpdate) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LiveTailSessionUpdate) GoString() string { +func (s MalformedQueryException) GoString() string { return s.String() } -// SetSessionMetadata sets the SessionMetadata field's value. -func (s *LiveTailSessionUpdate) SetSessionMetadata(v *LiveTailSessionMetadata) *LiveTailSessionUpdate { - s.SessionMetadata = v - return s +func newErrorMalformedQueryException(v protocol.ResponseMetadata) error { + return &MalformedQueryException{ + RespMetadata: v, + } } -// SetSessionResults sets the SessionResults field's value. -func (s *LiveTailSessionUpdate) SetSessionResults(v []*LiveTailSessionLogEvent) *LiveTailSessionUpdate { - s.SessionResults = v - return s +// Code returns the exception type name. +func (s *MalformedQueryException) Code() string { + return "MalformedQueryException" } -// The LiveTailSessionUpdate is and event in the StartLiveTailResponseStream group of events. -func (s *LiveTailSessionUpdate) eventStartLiveTailResponseStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the LiveTailSessionUpdate value. -// This method is only used internally within the SDK's EventStream handling. -func (s *LiveTailSessionUpdate) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - if err := payloadUnmarshaler.UnmarshalPayload( - bytes.NewReader(msg.Payload), s, - ); err != nil { - return err +// Message returns the exception's message. +func (s *MalformedQueryException) Message() string { + if s.Message_ != nil { + return *s.Message_ } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *MalformedQueryException) OrigErr() error { return nil } -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *LiveTailSessionUpdate) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) - var buf bytes.Buffer - if err = pm.MarshalPayload(&buf, s); err != nil { - return eventstream.Message{}, err - } - msg.Payload = buf.Bytes() - return msg, err +func (s *MalformedQueryException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) } -// Represents a log group. -type LogGroup struct { - _ struct{} `type:"structure"` +// Status code returns the HTTP status code for the request's response error. +func (s *MalformedQueryException) StatusCode() int { + return s.RespMetadata.StatusCode +} - // The Amazon Resource Name (ARN) of the log group. - Arn *string `locationName:"arn" type:"string"` +// RequestID returns the service's response RequestID for request. +func (s *MalformedQueryException) RequestID() string { + return s.RespMetadata.RequestID +} - // The creation time of the log group, expressed as the number of milliseconds +// Metric filters express how CloudWatch Logs would extract metric observations +// from ingested log events and transform them into metric data in a CloudWatch +// metric. +type MetricFilter struct { + _ struct{} `type:"structure"` + + // The creation time of the metric filter, expressed as the number of milliseconds // after Jan 1, 1970 00:00:00 UTC. CreationTime *int64 `locationName:"creationTime" type:"long"` - // Displays whether this log group has a protection policy, or whether it had - // one in the past. For more information, see PutDataProtectionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html). - DataProtectionStatus *string `locationName:"dataProtectionStatus" type:"string" enum:"DataProtectionStatus"` - - // Displays all the properties that this log group has inherited from account-level - // settings. - InheritedProperties []*string `locationName:"inheritedProperties" type:"list" enum:"InheritedProperty"` + // The name of the metric filter. + FilterName *string `locationName:"filterName" min:"1" type:"string"` - // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log - // data. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + // A symbolic description of how CloudWatch Logs should interpret the data in + // each log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for + // in the log event message. + FilterPattern *string `locationName:"filterPattern" type:"string"` // The name of the log group. LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` - // The number of metric filters. - MetricFilterCount *int64 `locationName:"metricFilterCount" type:"integer"` - - // The number of days to retain the log events in the specified log group. Possible - // values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, - // 1096, 1827, 2192, 2557, 2922, 3288, and 3653. - // - // To set a log group so that its log events do not expire, use DeleteRetentionPolicy - // (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html). - RetentionInDays *int64 `locationName:"retentionInDays" type:"integer"` - - // The number of bytes stored. - StoredBytes *int64 `locationName:"storedBytes" type:"long"` + // The metric transformations. + MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"` } // String returns the string representation. @@ -10641,7 +13539,7 @@ type LogGroup struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogGroup) String() string { +func (s MetricFilter) String() string { return awsutil.Prettify(s) } @@ -10650,74 +13548,52 @@ func (s LogGroup) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogGroup) GoString() string { +func (s MetricFilter) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *LogGroup) SetArn(v string) *LogGroup { - s.Arn = &v - return s -} - // SetCreationTime sets the CreationTime field's value. -func (s *LogGroup) SetCreationTime(v int64) *LogGroup { +func (s *MetricFilter) SetCreationTime(v int64) *MetricFilter { s.CreationTime = &v return s } -// SetDataProtectionStatus sets the DataProtectionStatus field's value. -func (s *LogGroup) SetDataProtectionStatus(v string) *LogGroup { - s.DataProtectionStatus = &v - return s -} - -// SetInheritedProperties sets the InheritedProperties field's value. -func (s *LogGroup) SetInheritedProperties(v []*string) *LogGroup { - s.InheritedProperties = v +// SetFilterName sets the FilterName field's value. +func (s *MetricFilter) SetFilterName(v string) *MetricFilter { + s.FilterName = &v return s } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *LogGroup) SetKmsKeyId(v string) *LogGroup { - s.KmsKeyId = &v +// SetFilterPattern sets the FilterPattern field's value. +func (s *MetricFilter) SetFilterPattern(v string) *MetricFilter { + s.FilterPattern = &v return s } // SetLogGroupName sets the LogGroupName field's value. -func (s *LogGroup) SetLogGroupName(v string) *LogGroup { +func (s *MetricFilter) SetLogGroupName(v string) *MetricFilter { s.LogGroupName = &v return s } -// SetMetricFilterCount sets the MetricFilterCount field's value. -func (s *LogGroup) SetMetricFilterCount(v int64) *LogGroup { - s.MetricFilterCount = &v - return s -} - -// SetRetentionInDays sets the RetentionInDays field's value. -func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup { - s.RetentionInDays = &v - return s -} - -// SetStoredBytes sets the StoredBytes field's value. -func (s *LogGroup) SetStoredBytes(v int64) *LogGroup { - s.StoredBytes = &v +// SetMetricTransformations sets the MetricTransformations field's value. +func (s *MetricFilter) SetMetricTransformations(v []*MetricTransformation) *MetricFilter { + s.MetricTransformations = v return s } -// The fields contained in log events found by a GetLogGroupFields operation, -// along with the percentage of queried log events in which each field appears. -type LogGroupField struct { +// Represents a matched event. +type MetricFilterMatchRecord struct { _ struct{} `type:"structure"` - // The name of a log field. - Name *string `locationName:"name" type:"string"` + // The raw event data. + EventMessage *string `locationName:"eventMessage" min:"1" type:"string"` - // The percentage of log events queried that contained the field. - Percent *int64 `locationName:"percent" type:"integer"` + // The event number. + EventNumber *int64 `locationName:"eventNumber" type:"long"` + + // The values extracted from the event data by the filter. + ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"` } // String returns the string representation. @@ -10725,7 +13601,7 @@ type LogGroupField struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogGroupField) String() string { +func (s MetricFilterMatchRecord) String() string { return awsutil.Prettify(s) } @@ -10734,69 +13610,74 @@ func (s LogGroupField) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogGroupField) GoString() string { +func (s MetricFilterMatchRecord) GoString() string { return s.String() } -// SetName sets the Name field's value. -func (s *LogGroupField) SetName(v string) *LogGroupField { - s.Name = &v +// SetEventMessage sets the EventMessage field's value. +func (s *MetricFilterMatchRecord) SetEventMessage(v string) *MetricFilterMatchRecord { + s.EventMessage = &v return s } -// SetPercent sets the Percent field's value. -func (s *LogGroupField) SetPercent(v int64) *LogGroupField { - s.Percent = &v +// SetEventNumber sets the EventNumber field's value. +func (s *MetricFilterMatchRecord) SetEventNumber(v int64) *MetricFilterMatchRecord { + s.EventNumber = &v return s } -// Represents a log stream, which is a sequence of log events from a single -// emitter of logs. -type LogStream struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the log stream. - Arn *string `locationName:"arn" type:"string"` - - // The creation time of the stream, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` - - // The time of the first event, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"` +// SetExtractedValues sets the ExtractedValues field's value. +func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *MetricFilterMatchRecord { + s.ExtractedValues = v + return s +} - // The time of the most recent log event in the log stream in CloudWatch Logs. - // This number is expressed as the number of milliseconds after Jan 1, 1970 - // 00:00:00 UTC. The lastEventTime value updates on an eventual consistency - // basis. It typically updates in less than an hour from ingestion, but in rare - // situations might take longer. - LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"` +// Indicates how to transform ingested log events to metric data in a CloudWatch +// metric. +type MetricTransformation struct { + _ struct{} `type:"structure"` - // The ingestion time, expressed as the number of milliseconds after Jan 1, - // 1970 00:00:00 UTC The lastIngestionTime value updates on an eventual consistency - // basis. It typically updates in less than an hour after ingestion, but in - // rare situations might take longer. - LastIngestionTime *int64 `locationName:"lastIngestionTime" type:"long"` + // (Optional) The value to emit when a filter pattern does not match a log event. + // This value can be null. + DefaultValue *float64 `locationName:"defaultValue" type:"double"` - // The name of the log stream. - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` + // The fields to use as dimensions for the metric. One metric filter can include + // as many as three dimensions. + // + // Metrics extracted from log events are charged as custom metrics. To prevent + // unexpected high charges, do not specify high-cardinality fields such as IPAddress + // or requestID as dimensions. Each different value found for a dimension is + // treated as a separate metric and accrues charges as a separate custom metric. + // + // CloudWatch Logs disables a metric filter if it generates 1000 different name/value + // pairs for your specified dimensions within a certain amount of time. This + // helps to prevent accidental high charges. + // + // You can also set up a billing alarm to alert you if your charges are higher + // than expected. For more information, see Creating a Billing Alarm to Monitor + // Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). + Dimensions map[string]*string `locationName:"dimensions" type:"map"` - // The number of bytes stored. + // The name of the CloudWatch metric. // - // Important: As of June 17, 2019, this parameter is no longer supported for - // log streams, and is always reported as zero. This change applies only to - // log streams. The storedBytes parameter for log groups is not affected. + // MetricName is a required field + MetricName *string `locationName:"metricName" type:"string" required:"true"` + + // A custom namespace to contain your metric in CloudWatch. Use namespaces to + // group together metrics that are similar. For more information, see Namespaces + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace). // - // Deprecated: Starting on June 17, 2019, this parameter will be deprecated for log streams, and will be reported as zero. This change applies only to log streams. The storedBytes parameter for log groups is not affected. - StoredBytes *int64 `locationName:"storedBytes" deprecated:"true" type:"long"` + // MetricNamespace is a required field + MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"` - // The sequence token. + // The value to publish to the CloudWatch metric when a filter pattern matches + // a log event. // - // The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions - // are always accepted regardless of receiving an invalid sequence token. You - // don't need to obtain uploadSequenceToken to use a PutLogEvents action. - UploadSequenceToken *string `locationName:"uploadSequenceToken" min:"1" type:"string"` + // MetricValue is a required field + MetricValue *string `locationName:"metricValue" type:"string" required:"true"` + + // The unit to assign to the metric. If you omit this, the unit is set as None. + Unit *string `locationName:"unit" type:"string" enum:"StandardUnit"` } // String returns the string representation. @@ -10804,7 +13685,7 @@ type LogStream struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogStream) String() string { +func (s MetricTransformation) String() string { return awsutil.Prettify(s) } @@ -10813,71 +13694,71 @@ func (s LogStream) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s LogStream) GoString() string { +func (s MetricTransformation) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *LogStream) SetArn(v string) *LogStream { - s.Arn = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricTransformation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"} + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.MetricNamespace == nil { + invalidParams.Add(request.NewErrParamRequired("MetricNamespace")) + } + if s.MetricValue == nil { + invalidParams.Add(request.NewErrParamRequired("MetricValue")) + } -// SetCreationTime sets the CreationTime field's value. -func (s *LogStream) SetCreationTime(v int64) *LogStream { - s.CreationTime = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetFirstEventTimestamp sets the FirstEventTimestamp field's value. -func (s *LogStream) SetFirstEventTimestamp(v int64) *LogStream { - s.FirstEventTimestamp = &v +// SetDefaultValue sets the DefaultValue field's value. +func (s *MetricTransformation) SetDefaultValue(v float64) *MetricTransformation { + s.DefaultValue = &v return s } -// SetLastEventTimestamp sets the LastEventTimestamp field's value. -func (s *LogStream) SetLastEventTimestamp(v int64) *LogStream { - s.LastEventTimestamp = &v +// SetDimensions sets the Dimensions field's value. +func (s *MetricTransformation) SetDimensions(v map[string]*string) *MetricTransformation { + s.Dimensions = v return s } -// SetLastIngestionTime sets the LastIngestionTime field's value. -func (s *LogStream) SetLastIngestionTime(v int64) *LogStream { - s.LastIngestionTime = &v +// SetMetricName sets the MetricName field's value. +func (s *MetricTransformation) SetMetricName(v string) *MetricTransformation { + s.MetricName = &v return s } -// SetLogStreamName sets the LogStreamName field's value. -func (s *LogStream) SetLogStreamName(v string) *LogStream { - s.LogStreamName = &v +// SetMetricNamespace sets the MetricNamespace field's value. +func (s *MetricTransformation) SetMetricNamespace(v string) *MetricTransformation { + s.MetricNamespace = &v return s } -// SetStoredBytes sets the StoredBytes field's value. -func (s *LogStream) SetStoredBytes(v int64) *LogStream { - s.StoredBytes = &v +// SetMetricValue sets the MetricValue field's value. +func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation { + s.MetricValue = &v return s } -// SetUploadSequenceToken sets the UploadSequenceToken field's value. -func (s *LogStream) SetUploadSequenceToken(v string) *LogStream { - s.UploadSequenceToken = &v +// SetUnit sets the Unit field's value. +func (s *MetricTransformation) SetUnit(v string) *MetricTransformation { + s.Unit = &v return s } -// The query string is not valid. Details about this error are displayed in -// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html). -// -// For more information about valid query syntax, see CloudWatch Logs Insights -// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). -type MalformedQueryException struct { +// Multiple concurrent requests to update the same resource were in conflict. +type OperationAbortedException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` - - // Reserved. - QueryCompileError *QueryCompileError `locationName:"queryCompileError" type:"structure"` } // String returns the string representation. @@ -10885,7 +13766,7 @@ type MalformedQueryException struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MalformedQueryException) String() string { +func (s OperationAbortedException) String() string { return awsutil.Prettify(s) } @@ -10894,23 +13775,23 @@ func (s MalformedQueryException) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MalformedQueryException) GoString() string { +func (s OperationAbortedException) GoString() string { return s.String() } -func newErrorMalformedQueryException(v protocol.ResponseMetadata) error { - return &MalformedQueryException{ +func newErrorOperationAbortedException(v protocol.ResponseMetadata) error { + return &OperationAbortedException{ RespMetadata: v, } } // Code returns the exception type name. -func (s *MalformedQueryException) Code() string { - return "MalformedQueryException" +func (s *OperationAbortedException) Code() string { + return "OperationAbortedException" } // Message returns the exception's message. -func (s *MalformedQueryException) Message() string { +func (s *OperationAbortedException) Message() string { if s.Message_ != nil { return *s.Message_ } @@ -10918,48 +13799,161 @@ func (s *MalformedQueryException) Message() string { } // OrigErr always returns nil, satisfies awserr.Error interface. -func (s *MalformedQueryException) OrigErr() error { +func (s *OperationAbortedException) OrigErr() error { return nil } -func (s *MalformedQueryException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +func (s *OperationAbortedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } // Status code returns the HTTP status code for the request's response error. -func (s *MalformedQueryException) StatusCode() int { +func (s *OperationAbortedException) StatusCode() int { return s.RespMetadata.StatusCode } // RequestID returns the service's response RequestID for request. -func (s *MalformedQueryException) RequestID() string { +func (s *OperationAbortedException) RequestID() string { return s.RespMetadata.RequestID } -// Metric filters express how CloudWatch Logs would extract metric observations -// from ingested log events and transform them into metric data in a CloudWatch -// metric. -type MetricFilter struct { +// Represents a log event. +type OutputLogEvent struct { _ struct{} `type:"structure"` - // The creation time of the metric filter, expressed as the number of milliseconds + // The time the event was ingested, expressed as the number of milliseconds // after Jan 1, 1970 00:00:00 UTC. - CreationTime *int64 `locationName:"creationTime" type:"long"` + IngestionTime *int64 `locationName:"ingestionTime" type:"long"` - // The name of the metric filter. - FilterName *string `locationName:"filterName" min:"1" type:"string"` + // The data contained in the log event. + Message *string `locationName:"message" min:"1" type:"string"` - // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event can contain timestamps, IP addresses, - // strings, and so on. You use the filter pattern to specify what to look for - // in the log event message. - FilterPattern *string `locationName:"filterPattern" type:"string"` + // The time the event occurred, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC. + Timestamp *int64 `locationName:"timestamp" type:"long"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s OutputLogEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s OutputLogEvent) GoString() string { + return s.String() +} + +// SetIngestionTime sets the IngestionTime field's value. +func (s *OutputLogEvent) SetIngestionTime(v int64) *OutputLogEvent { + s.IngestionTime = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *OutputLogEvent) SetMessage(v string) *OutputLogEvent { + s.Message = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *OutputLogEvent) SetTimestamp(v int64) *OutputLogEvent { + s.Timestamp = &v + return s +} + +// A structure that contains information about one delivery destination policy. +type Policy struct { + _ struct{} `type:"structure"` + + // The contents of the delivery destination policy. + DeliveryDestinationPolicy *string `locationName:"deliveryDestinationPolicy" min:"1" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Policy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Policy) GoString() string { + return s.String() +} + +// SetDeliveryDestinationPolicy sets the DeliveryDestinationPolicy field's value. +func (s *Policy) SetDeliveryDestinationPolicy(v string) *Policy { + s.DeliveryDestinationPolicy = &v + return s +} + +type PutAccountPolicyInput struct { + _ struct{} `type:"structure"` + + // Specify the data protection policy, in JSON. + // + // This policy must include two JSON blocks: + // + // * The first block must include both a DataIdentifer array and an Operation + // property with an Audit action. The DataIdentifer array lists the types + // of sensitive data that you want to mask. For more information about the + // available options, see Types of data that you can mask (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html). + // The Operation property with an Audit action is required to find the sensitive + // data terms. This Audit action must contain a FindingsDestination object. + // You can optionally use that FindingsDestination 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. + // + // * The second block must include both a DataIdentifer array and an Operation + // property with an Deidentify action. The DataIdentifer array must exactly + // match the DataIdentifer array in the first block of the policy. The Operation + // property with the Deidentify action is what actually masks the data, and + // it must contain the "MaskConfig": {} object. The "MaskConfig": {} object + // must be empty. + // + // For an example data protection policy, see the Examples section on this page. + // + // The contents of the two DataIdentifer arrays must match exactly. + // + // In addition to the two JSON blocks, the policyDocument can also include Name, + // Description, and Version fields. The Name is different than the operation's + // policyName parameter, and is used as a dimension when CloudWatch Logs reports + // audit findings metrics to CloudWatch. + // + // The JSON specified in policyDocument can be up to 30,720 characters. + // + // PolicyDocument is a required field + PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` + + // A name for the policy. This must be unique within the account. + // + // PolicyName is a required field + PolicyName *string `locationName:"policyName" type:"string" required:"true"` - // The name of the log group. - LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + // Currently the only valid value for this parameter is DATA_PROTECTION_POLICY. + // + // PolicyType is a required field + PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` - // The metric transformations. - MetricTransformations []*MetricTransformation `locationName:"metricTransformations" min:"1" type:"list"` + // Currently the only valid value for this parameter is ALL, which specifies + // that the data protection policy applies to all log groups in the account. + // If you omit this parameter, the default of ALL is used. + Scope *string `locationName:"scope" type:"string" enum:"Scope"` } // String returns the string representation. @@ -10967,7 +13961,7 @@ type MetricFilter struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricFilter) String() string { +func (s PutAccountPolicyInput) String() string { return awsutil.Prettify(s) } @@ -10976,52 +13970,58 @@ func (s MetricFilter) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricFilter) GoString() string { +func (s PutAccountPolicyInput) GoString() string { return s.String() } -// SetCreationTime sets the CreationTime field's value. -func (s *MetricFilter) SetCreationTime(v int64) *MetricFilter { - s.CreationTime = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutAccountPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutAccountPolicyInput"} + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyType == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetFilterName sets the FilterName field's value. -func (s *MetricFilter) SetFilterName(v string) *MetricFilter { - s.FilterName = &v +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *PutAccountPolicyInput) SetPolicyDocument(v string) *PutAccountPolicyInput { + s.PolicyDocument = &v return s } -// SetFilterPattern sets the FilterPattern field's value. -func (s *MetricFilter) SetFilterPattern(v string) *MetricFilter { - s.FilterPattern = &v +// SetPolicyName sets the PolicyName field's value. +func (s *PutAccountPolicyInput) SetPolicyName(v string) *PutAccountPolicyInput { + s.PolicyName = &v return s } -// SetLogGroupName sets the LogGroupName field's value. -func (s *MetricFilter) SetLogGroupName(v string) *MetricFilter { - s.LogGroupName = &v +// SetPolicyType sets the PolicyType field's value. +func (s *PutAccountPolicyInput) SetPolicyType(v string) *PutAccountPolicyInput { + s.PolicyType = &v return s } -// SetMetricTransformations sets the MetricTransformations field's value. -func (s *MetricFilter) SetMetricTransformations(v []*MetricTransformation) *MetricFilter { - s.MetricTransformations = v +// SetScope sets the Scope field's value. +func (s *PutAccountPolicyInput) SetScope(v string) *PutAccountPolicyInput { + s.Scope = &v return s } -// Represents a matched event. -type MetricFilterMatchRecord struct { +type PutAccountPolicyOutput struct { _ struct{} `type:"structure"` - // The raw event data. - EventMessage *string `locationName:"eventMessage" min:"1" type:"string"` - - // The event number. - EventNumber *int64 `locationName:"eventNumber" type:"long"` - - // The values extracted from the event data by the filter. - ExtractedValues map[string]*string `locationName:"extractedValues" type:"map"` + // The account policy that you created. + AccountPolicy *AccountPolicy `locationName:"accountPolicy" type:"structure"` } // String returns the string representation. @@ -11029,7 +14029,7 @@ type MetricFilterMatchRecord struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricFilterMatchRecord) String() string { +func (s PutAccountPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -11038,74 +14038,58 @@ func (s MetricFilterMatchRecord) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricFilterMatchRecord) GoString() string { +func (s PutAccountPolicyOutput) GoString() string { return s.String() } -// SetEventMessage sets the EventMessage field's value. -func (s *MetricFilterMatchRecord) SetEventMessage(v string) *MetricFilterMatchRecord { - s.EventMessage = &v - return s -} - -// SetEventNumber sets the EventNumber field's value. -func (s *MetricFilterMatchRecord) SetEventNumber(v int64) *MetricFilterMatchRecord { - s.EventNumber = &v - return s -} - -// SetExtractedValues sets the ExtractedValues field's value. -func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *MetricFilterMatchRecord { - s.ExtractedValues = v +// SetAccountPolicy sets the AccountPolicy field's value. +func (s *PutAccountPolicyOutput) SetAccountPolicy(v *AccountPolicy) *PutAccountPolicyOutput { + s.AccountPolicy = v return s } -// Indicates how to transform ingested log events to metric data in a CloudWatch -// metric. -type MetricTransformation struct { +type PutDataProtectionPolicyInput struct { _ struct{} `type:"structure"` - // (Optional) The value to emit when a filter pattern does not match a log event. - // This value can be null. - DefaultValue *float64 `locationName:"defaultValue" type:"double"` + // Specify either the log group name or log group ARN. + // + // LogGroupIdentifier is a required field + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` - // The fields to use as dimensions for the metric. One metric filter can include - // as many as three dimensions. + // Specify the data protection policy, in JSON. // - // Metrics extracted from log events are charged as custom metrics. To prevent - // unexpected high charges, do not specify high-cardinality fields such as IPAddress - // or requestID as dimensions. Each different value found for a dimension is - // treated as a separate metric and accrues charges as a separate custom metric. + // This policy must include two JSON blocks: // - // CloudWatch Logs disables a metric filter if it generates 1000 different name/value - // pairs for your specified dimensions within a certain amount of time. This - // helps to prevent accidental high charges. + // * The first block must include both a DataIdentifer array and an Operation + // property with an Audit action. The DataIdentifer array lists the types + // of sensitive data that you want to mask. For more information about the + // available options, see Types of data that you can mask (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html). + // The Operation property with an Audit action is required to find the sensitive + // data terms. This Audit action must contain a FindingsDestination object. + // You can optionally use that FindingsDestination 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. // - // You can also set up a billing alarm to alert you if your charges are higher - // than expected. For more information, see Creating a Billing Alarm to Monitor - // Your Estimated Amazon Web Services Charges (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html). - Dimensions map[string]*string `locationName:"dimensions" type:"map"` - - // The name of the CloudWatch metric. + // * The second block must include both a DataIdentifer array and an Operation + // property with an Deidentify action. The DataIdentifer array must exactly + // match the DataIdentifer array in the first block of the policy. The Operation + // property with the Deidentify action is what actually masks the data, and + // it must contain the "MaskConfig": {} object. The "MaskConfig": {} object + // must be empty. // - // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true"` - - // A custom namespace to contain your metric in CloudWatch. Use namespaces to - // group together metrics that are similar. For more information, see Namespaces - // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace). + // For an example data protection policy, see the Examples section on this page. // - // MetricNamespace is a required field - MetricNamespace *string `locationName:"metricNamespace" type:"string" required:"true"` - - // The value to publish to the CloudWatch metric when a filter pattern matches - // a log event. + // The contents of the two DataIdentifer arrays must match exactly. // - // MetricValue is a required field - MetricValue *string `locationName:"metricValue" type:"string" required:"true"` - - // The unit to assign to the metric. If you omit this, the unit is set as None. - Unit *string `locationName:"unit" type:"string" enum:"StandardUnit"` + // In addition to the two JSON blocks, the policyDocument can also include Name, + // Description, and Version fields. The Name is used as a dimension when CloudWatch + // Logs reports audit findings metrics to CloudWatch. + // + // The JSON specified in policyDocument can be up to 30,720 characters. + // + // PolicyDocument is a required field + PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` } // String returns the string representation. @@ -11113,7 +14097,7 @@ type MetricTransformation struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricTransformation) String() string { +func (s PutDataProtectionPolicyInput) String() string { return awsutil.Prettify(s) } @@ -11122,21 +14106,21 @@ func (s MetricTransformation) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s MetricTransformation) GoString() string { +func (s PutDataProtectionPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *MetricTransformation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricTransformation"} - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) +func (s *PutDataProtectionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutDataProtectionPolicyInput"} + if s.LogGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) } - if s.MetricNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("MetricNamespace")) + if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) } - if s.MetricValue == nil { - invalidParams.Add(request.NewErrParamRequired("MetricValue")) + if s.PolicyDocument == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) } if invalidParams.Len() > 0 { @@ -11145,48 +14129,90 @@ func (s *MetricTransformation) Validate() error { return nil } -// SetDefaultValue sets the DefaultValue field's value. -func (s *MetricTransformation) SetDefaultValue(v float64) *MetricTransformation { - s.DefaultValue = &v +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *PutDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *PutDataProtectionPolicyInput { + s.LogGroupIdentifier = &v return s } -// SetDimensions sets the Dimensions field's value. -func (s *MetricTransformation) SetDimensions(v map[string]*string) *MetricTransformation { - s.Dimensions = v +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *PutDataProtectionPolicyInput) SetPolicyDocument(v string) *PutDataProtectionPolicyInput { + s.PolicyDocument = &v return s } -// SetMetricName sets the MetricName field's value. -func (s *MetricTransformation) SetMetricName(v string) *MetricTransformation { - s.MetricName = &v - return s +type PutDataProtectionPolicyOutput struct { + _ struct{} `type:"structure"` + + // The date and time that this policy was most recently updated. + LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` + + // The log group name or ARN that you specified in your request. + LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` + + // The data protection policy used for this log group. + PolicyDocument *string `locationName:"policyDocument" type:"string"` } -// SetMetricNamespace sets the MetricNamespace field's value. -func (s *MetricTransformation) SetMetricNamespace(v string) *MetricTransformation { - s.MetricNamespace = &v +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutDataProtectionPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutDataProtectionPolicyOutput) GoString() string { + return s.String() +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *PutDataProtectionPolicyOutput) SetLastUpdatedTime(v int64) *PutDataProtectionPolicyOutput { + s.LastUpdatedTime = &v return s } -// SetMetricValue sets the MetricValue field's value. -func (s *MetricTransformation) SetMetricValue(v string) *MetricTransformation { - s.MetricValue = &v +// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. +func (s *PutDataProtectionPolicyOutput) SetLogGroupIdentifier(v string) *PutDataProtectionPolicyOutput { + s.LogGroupIdentifier = &v return s } -// SetUnit sets the Unit field's value. -func (s *MetricTransformation) SetUnit(v string) *MetricTransformation { - s.Unit = &v +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *PutDataProtectionPolicyOutput) SetPolicyDocument(v string) *PutDataProtectionPolicyOutput { + s.PolicyDocument = &v return s } -// Multiple concurrent requests to update the same resource were in conflict. -type OperationAbortedException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` +type PutDeliveryDestinationInput struct { + _ struct{} `type:"structure"` + + // A structure that contains the ARN of the Amazon Web Services resource that + // will receive the logs. + // + // DeliveryDestinationConfiguration is a required field + DeliveryDestinationConfiguration *DeliveryDestinationConfiguration `locationName:"deliveryDestinationConfiguration" type:"structure" required:"true"` + + // A name for this delivery destination. This name must be unique for all delivery + // destinations in your account. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` - Message_ *string `locationName:"message" type:"string"` + // The format for the logs that this delivery destination will receive. + OutputFormat *string `locationName:"outputFormat" type:"string" enum:"OutputFormat"` + + // An optional list of key-value pairs to associate with the resource. + // + // For more information about tagging, see Tagging Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } // String returns the string representation. @@ -11194,7 +14220,7 @@ type OperationAbortedException struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s OperationAbortedException) String() string { +func (s PutDeliveryDestinationInput) String() string { return awsutil.Prettify(s) } @@ -11203,62 +14229,67 @@ func (s OperationAbortedException) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s OperationAbortedException) GoString() string { +func (s PutDeliveryDestinationInput) GoString() string { return s.String() } -func newErrorOperationAbortedException(v protocol.ResponseMetadata) error { - return &OperationAbortedException{ - RespMetadata: v, +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutDeliveryDestinationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutDeliveryDestinationInput"} + if s.DeliveryDestinationConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationConfiguration")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.DeliveryDestinationConfiguration != nil { + if err := s.DeliveryDestinationConfiguration.Validate(); err != nil { + invalidParams.AddNested("DeliveryDestinationConfiguration", err.(request.ErrInvalidParams)) + } } -} - -// Code returns the exception type name. -func (s *OperationAbortedException) Code() string { - return "OperationAbortedException" -} -// Message returns the exception's message. -func (s *OperationAbortedException) Message() string { - if s.Message_ != nil { - return *s.Message_ + if invalidParams.Len() > 0 { + return invalidParams } - return "" + return nil } -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *OperationAbortedException) OrigErr() error { - return nil +// SetDeliveryDestinationConfiguration sets the DeliveryDestinationConfiguration field's value. +func (s *PutDeliveryDestinationInput) SetDeliveryDestinationConfiguration(v *DeliveryDestinationConfiguration) *PutDeliveryDestinationInput { + s.DeliveryDestinationConfiguration = v + return s } -func (s *OperationAbortedException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +// SetName sets the Name field's value. +func (s *PutDeliveryDestinationInput) SetName(v string) *PutDeliveryDestinationInput { + s.Name = &v + return s } -// Status code returns the HTTP status code for the request's response error. -func (s *OperationAbortedException) StatusCode() int { - return s.RespMetadata.StatusCode +// SetOutputFormat sets the OutputFormat field's value. +func (s *PutDeliveryDestinationInput) SetOutputFormat(v string) *PutDeliveryDestinationInput { + s.OutputFormat = &v + return s } -// RequestID returns the service's response RequestID for request. -func (s *OperationAbortedException) RequestID() string { - return s.RespMetadata.RequestID +// SetTags sets the Tags field's value. +func (s *PutDeliveryDestinationInput) SetTags(v map[string]*string) *PutDeliveryDestinationInput { + s.Tags = v + return s } -// Represents a log event. -type OutputLogEvent struct { +type PutDeliveryDestinationOutput struct { _ struct{} `type:"structure"` - // The time the event was ingested, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. - IngestionTime *int64 `locationName:"ingestionTime" type:"long"` - - // The data contained in the log event. - Message *string `locationName:"message" min:"1" type:"string"` - - // The time the event occurred, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. - Timestamp *int64 `locationName:"timestamp" type:"long"` + // A structure containing information about the delivery destination that you + // just created or updated. + DeliveryDestination *DeliveryDestination `locationName:"deliveryDestination" type:"structure"` } // String returns the string representation. @@ -11266,7 +14297,7 @@ type OutputLogEvent struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s OutputLogEvent) String() string { +func (s PutDeliveryDestinationOutput) String() string { return awsutil.Prettify(s) } @@ -11275,81 +14306,28 @@ func (s OutputLogEvent) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s OutputLogEvent) GoString() string { +func (s PutDeliveryDestinationOutput) GoString() string { return s.String() } -// SetIngestionTime sets the IngestionTime field's value. -func (s *OutputLogEvent) SetIngestionTime(v int64) *OutputLogEvent { - s.IngestionTime = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *OutputLogEvent) SetMessage(v string) *OutputLogEvent { - s.Message = &v - return s -} - -// SetTimestamp sets the Timestamp field's value. -func (s *OutputLogEvent) SetTimestamp(v int64) *OutputLogEvent { - s.Timestamp = &v +// SetDeliveryDestination sets the DeliveryDestination field's value. +func (s *PutDeliveryDestinationOutput) SetDeliveryDestination(v *DeliveryDestination) *PutDeliveryDestinationOutput { + s.DeliveryDestination = v return s } -type PutAccountPolicyInput struct { +type PutDeliveryDestinationPolicyInput struct { _ struct{} `type:"structure"` - // Specify the data protection policy, in JSON. - // - // This policy must include two JSON blocks: - // - // * The first block must include both a DataIdentifer array and an Operation - // property with an Audit action. The DataIdentifer array lists the types - // of sensitive data that you want to mask. For more information about the - // available options, see Types of data that you can mask (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html). - // The Operation property with an Audit action is required to find the sensitive - // data terms. This Audit action must contain a FindingsDestination object. - // You can optionally use that FindingsDestination 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. - // - // * The second block must include both a DataIdentifer array and an Operation - // property with an Deidentify action. The DataIdentifer array must exactly - // match the DataIdentifer array in the first block of the policy. The Operation - // property with the Deidentify action is what actually masks the data, and - // it must contain the "MaskConfig": {} object. The "MaskConfig": {} object - // must be empty. - // - // For an example data protection policy, see the Examples section on this page. - // - // The contents of the two DataIdentifer arrays must match exactly. - // - // In addition to the two JSON blocks, the policyDocument can also include Name, - // Description, and Version fields. The Name is different than the operation's - // policyName parameter, and is used as a dimension when CloudWatch Logs reports - // audit findings metrics to CloudWatch. - // - // The JSON specified in policyDocument can be up to 30,720 characters. - // - // PolicyDocument is a required field - PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` - - // A name for the policy. This must be unique within the account. + // The name of the delivery destination to assign this policy to. // - // PolicyName is a required field - PolicyName *string `locationName:"policyName" type:"string" required:"true"` + // DeliveryDestinationName is a required field + DeliveryDestinationName *string `locationName:"deliveryDestinationName" min:"1" type:"string" required:"true"` - // Currently the only valid value for this parameter is DATA_PROTECTION_POLICY. + // The contents of the policy. // - // PolicyType is a required field - PolicyType *string `locationName:"policyType" type:"string" required:"true" enum:"PolicyType"` - - // Currently the only valid value for this parameter is ALL, which specifies - // that the data protection policy applies to all log groups in the account. - // If you omit this parameter, the default of ALL is used. - Scope *string `locationName:"scope" type:"string" enum:"Scope"` + // DeliveryDestinationPolicy is a required field + DeliveryDestinationPolicy *string `locationName:"deliveryDestinationPolicy" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -11357,7 +14335,7 @@ type PutAccountPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutAccountPolicyInput) String() string { +func (s PutDeliveryDestinationPolicyInput) String() string { return awsutil.Prettify(s) } @@ -11366,21 +14344,24 @@ func (s PutAccountPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutAccountPolicyInput) GoString() string { +func (s PutDeliveryDestinationPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PutAccountPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutAccountPolicyInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) +func (s *PutDeliveryDestinationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutDeliveryDestinationPolicyInput"} + if s.DeliveryDestinationName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationName")) } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) + if s.DeliveryDestinationName != nil && len(*s.DeliveryDestinationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryDestinationName", 1)) } - if s.PolicyType == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyType")) + if s.DeliveryDestinationPolicy == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryDestinationPolicy")) + } + if s.DeliveryDestinationPolicy != nil && len(*s.DeliveryDestinationPolicy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryDestinationPolicy", 1)) } if invalidParams.Len() > 0 { @@ -11389,35 +14370,23 @@ func (s *PutAccountPolicyInput) Validate() error { return nil } -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutAccountPolicyInput) SetPolicyDocument(v string) *PutAccountPolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutAccountPolicyInput) SetPolicyName(v string) *PutAccountPolicyInput { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *PutAccountPolicyInput) SetPolicyType(v string) *PutAccountPolicyInput { - s.PolicyType = &v +// SetDeliveryDestinationName sets the DeliveryDestinationName field's value. +func (s *PutDeliveryDestinationPolicyInput) SetDeliveryDestinationName(v string) *PutDeliveryDestinationPolicyInput { + s.DeliveryDestinationName = &v return s } -// SetScope sets the Scope field's value. -func (s *PutAccountPolicyInput) SetScope(v string) *PutAccountPolicyInput { - s.Scope = &v +// SetDeliveryDestinationPolicy sets the DeliveryDestinationPolicy field's value. +func (s *PutDeliveryDestinationPolicyInput) SetDeliveryDestinationPolicy(v string) *PutDeliveryDestinationPolicyInput { + s.DeliveryDestinationPolicy = &v return s } -type PutAccountPolicyOutput struct { +type PutDeliveryDestinationPolicyOutput struct { _ struct{} `type:"structure"` - // The account policy that you created. - AccountPolicy *AccountPolicy `locationName:"accountPolicy" type:"structure"` + // The contents of the policy that you just created. + Policy *Policy `locationName:"policy" type:"structure"` } // String returns the string representation. @@ -11425,7 +14394,7 @@ type PutAccountPolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutAccountPolicyOutput) String() string { +func (s PutDeliveryDestinationPolicyOutput) String() string { return awsutil.Prettify(s) } @@ -11434,58 +14403,42 @@ func (s PutAccountPolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutAccountPolicyOutput) GoString() string { +func (s PutDeliveryDestinationPolicyOutput) GoString() string { return s.String() } -// SetAccountPolicy sets the AccountPolicy field's value. -func (s *PutAccountPolicyOutput) SetAccountPolicy(v *AccountPolicy) *PutAccountPolicyOutput { - s.AccountPolicy = v +// SetPolicy sets the Policy field's value. +func (s *PutDeliveryDestinationPolicyOutput) SetPolicy(v *Policy) *PutDeliveryDestinationPolicyOutput { + s.Policy = v return s } -type PutDataProtectionPolicyInput struct { +type PutDeliverySourceInput struct { _ struct{} `type:"structure"` - // Specify either the log group name or log group ARN. + // Defines the type of log that the source is sending. For valid values for + // this parameter, see the documentation for the source service. // - // LogGroupIdentifier is a required field - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string" required:"true"` + // LogType is a required field + LogType *string `locationName:"logType" min:"1" type:"string" required:"true"` - // Specify the data protection policy, in JSON. - // - // This policy must include two JSON blocks: - // - // * The first block must include both a DataIdentifer array and an Operation - // property with an Audit action. The DataIdentifer array lists the types - // of sensitive data that you want to mask. For more information about the - // available options, see Types of data that you can mask (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html). - // The Operation property with an Audit action is required to find the sensitive - // data terms. This Audit action must contain a FindingsDestination object. - // You can optionally use that FindingsDestination 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. - // - // * The second block must include both a DataIdentifer array and an Operation - // property with an Deidentify action. The DataIdentifer array must exactly - // match the DataIdentifer array in the first block of the policy. The Operation - // property with the Deidentify action is what actually masks the data, and - // it must contain the "MaskConfig": {} object. The "MaskConfig": {} object - // must be empty. - // - // For an example data protection policy, see the Examples section on this page. - // - // The contents of the two DataIdentifer arrays must match exactly. + // A name for this delivery source. This name must be unique for all delivery + // sources in your account. // - // In addition to the two JSON blocks, the policyDocument can also include Name, - // Description, and Version fields. The Name is used as a dimension when CloudWatch - // Logs reports audit findings metrics to CloudWatch. + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The ARN of the Amazon Web Services resource that is generating and sending + // logs. For example, arn:aws:workmail:us-east-1:123456789012:organization/m-1234EXAMPLEabcd1234abcd1234abcd1234 // - // The JSON specified in policyDocument can be up to 30,720 characters. + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // An optional list of key-value pairs to associate with the resource. // - // PolicyDocument is a required field - PolicyDocument *string `locationName:"policyDocument" type:"string" required:"true"` + // For more information about tagging, see Tagging Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + Tags map[string]*string `locationName:"tags" min:"1" type:"map"` } // String returns the string representation. @@ -11493,7 +14446,7 @@ type PutDataProtectionPolicyInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDataProtectionPolicyInput) String() string { +func (s PutDeliverySourceInput) String() string { return awsutil.Prettify(s) } @@ -11502,21 +14455,30 @@ func (s PutDataProtectionPolicyInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDataProtectionPolicyInput) GoString() string { +func (s PutDeliverySourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PutDataProtectionPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutDataProtectionPolicyInput"} - if s.LogGroupIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifier")) +func (s *PutDeliverySourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutDeliverySourceInput"} + if s.LogType == nil { + invalidParams.Add(request.NewErrParamRequired("LogType")) } - if s.LogGroupIdentifier != nil && len(*s.LogGroupIdentifier) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifier", 1)) + if s.LogType != nil && len(*s.LogType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogType", 1)) } - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } if invalidParams.Len() > 0 { @@ -11525,29 +14487,36 @@ func (s *PutDataProtectionPolicyInput) Validate() error { return nil } -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *PutDataProtectionPolicyInput) SetLogGroupIdentifier(v string) *PutDataProtectionPolicyInput { - s.LogGroupIdentifier = &v +// SetLogType sets the LogType field's value. +func (s *PutDeliverySourceInput) SetLogType(v string) *PutDeliverySourceInput { + s.LogType = &v + return s +} + +// SetName sets the Name field's value. +func (s *PutDeliverySourceInput) SetName(v string) *PutDeliverySourceInput { + s.Name = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *PutDeliverySourceInput) SetResourceArn(v string) *PutDeliverySourceInput { + s.ResourceArn = &v return s } -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutDataProtectionPolicyInput) SetPolicyDocument(v string) *PutDataProtectionPolicyInput { - s.PolicyDocument = &v +// SetTags sets the Tags field's value. +func (s *PutDeliverySourceInput) SetTags(v map[string]*string) *PutDeliverySourceInput { + s.Tags = v return s } -type PutDataProtectionPolicyOutput struct { +type PutDeliverySourceOutput struct { _ struct{} `type:"structure"` - // The date and time that this policy was most recently updated. - LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` - - // The log group name or ARN that you specified in your request. - LogGroupIdentifier *string `locationName:"logGroupIdentifier" min:"1" type:"string"` - - // The data protection policy used for this log group. - PolicyDocument *string `locationName:"policyDocument" type:"string"` + // A structure containing information about the delivery source that was just + // created or updated. + DeliverySource *DeliverySource `locationName:"deliverySource" type:"structure"` } // String returns the string representation. @@ -11555,7 +14524,7 @@ type PutDataProtectionPolicyOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDataProtectionPolicyOutput) String() string { +func (s PutDeliverySourceOutput) String() string { return awsutil.Prettify(s) } @@ -11564,25 +14533,13 @@ func (s PutDataProtectionPolicyOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s PutDataProtectionPolicyOutput) GoString() string { +func (s PutDeliverySourceOutput) GoString() string { return s.String() } -// SetLastUpdatedTime sets the LastUpdatedTime field's value. -func (s *PutDataProtectionPolicyOutput) SetLastUpdatedTime(v int64) *PutDataProtectionPolicyOutput { - s.LastUpdatedTime = &v - return s -} - -// SetLogGroupIdentifier sets the LogGroupIdentifier field's value. -func (s *PutDataProtectionPolicyOutput) SetLogGroupIdentifier(v string) *PutDataProtectionPolicyOutput { - s.LogGroupIdentifier = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutDataProtectionPolicyOutput) SetPolicyDocument(v string) *PutDataProtectionPolicyOutput { - s.PolicyDocument = &v +// SetDeliverySource sets the DeliverySource field's value. +func (s *PutDeliverySourceOutput) SetDeliverySource(v *DeliverySource) *PutDeliverySourceOutput { + s.DeliverySource = v return s } @@ -13158,314 +16115,19 @@ func (s *ResultField) SetField(v string) *ResultField { // SetValue sets the Value field's value. func (s *ResultField) SetValue(v string) *ResultField { - s.Value = &v - return s -} - -// Represents the search status of a log stream. -type SearchedLogStream struct { - _ struct{} `type:"structure"` - - // The name of the log stream. - LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` - - // Indicates whether all the events in this log stream were searched. - SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SearchedLogStream) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SearchedLogStream) GoString() string { - return s.String() -} - -// SetLogStreamName sets the LogStreamName field's value. -func (s *SearchedLogStream) SetLogStreamName(v string) *SearchedLogStream { - s.LogStreamName = &v - return s -} - -// SetSearchedCompletely sets the SearchedCompletely field's value. -func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream { - s.SearchedCompletely = &v - return s -} - -// The service cannot complete the request. -type ServiceUnavailableException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceUnavailableException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceUnavailableException) GoString() string { - return s.String() -} - -func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { - return &ServiceUnavailableException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ServiceUnavailableException) Code() string { - return "ServiceUnavailableException" -} - -// Message returns the exception's message. -func (s *ServiceUnavailableException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ServiceUnavailableException) OrigErr() error { - return nil -} - -func (s *ServiceUnavailableException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ServiceUnavailableException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ServiceUnavailableException) RequestID() string { - return s.RespMetadata.RequestID -} - -type SessionStreamingException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SessionStreamingException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SessionStreamingException) GoString() string { - return s.String() -} - -// The SessionStreamingException is and event in the StartLiveTailResponseStream group of events. -func (s *SessionStreamingException) eventStartLiveTailResponseStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the SessionStreamingException value. -// This method is only used internally within the SDK's EventStream handling. -func (s *SessionStreamingException) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - if err := payloadUnmarshaler.UnmarshalPayload( - bytes.NewReader(msg.Payload), s, - ); err != nil { - return err - } - return nil -} - -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *SessionStreamingException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) - var buf bytes.Buffer - if err = pm.MarshalPayload(&buf, s); err != nil { - return eventstream.Message{}, err - } - msg.Payload = buf.Bytes() - return msg, err -} - -func newErrorSessionStreamingException(v protocol.ResponseMetadata) error { - return &SessionStreamingException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *SessionStreamingException) Code() string { - return "SessionStreamingException" -} - -// Message returns the exception's message. -func (s *SessionStreamingException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *SessionStreamingException) OrigErr() error { - return nil -} - -func (s *SessionStreamingException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *SessionStreamingException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *SessionStreamingException) RequestID() string { - return s.RespMetadata.RequestID -} - -type SessionTimeoutException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SessionTimeoutException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SessionTimeoutException) GoString() string { - return s.String() -} - -// The SessionTimeoutException is and event in the StartLiveTailResponseStream group of events. -func (s *SessionTimeoutException) eventStartLiveTailResponseStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the SessionTimeoutException value. -// This method is only used internally within the SDK's EventStream handling. -func (s *SessionTimeoutException) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - if err := payloadUnmarshaler.UnmarshalPayload( - bytes.NewReader(msg.Payload), s, - ); err != nil { - return err - } - return nil -} - -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *SessionTimeoutException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) - var buf bytes.Buffer - if err = pm.MarshalPayload(&buf, s); err != nil { - return eventstream.Message{}, err - } - msg.Payload = buf.Bytes() - return msg, err -} - -func newErrorSessionTimeoutException(v protocol.ResponseMetadata) error { - return &SessionTimeoutException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *SessionTimeoutException) Code() string { - return "SessionTimeoutException" -} - -// Message returns the exception's message. -func (s *SessionTimeoutException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *SessionTimeoutException) OrigErr() error { - return nil -} - -func (s *SessionTimeoutException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *SessionTimeoutException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *SessionTimeoutException) RequestID() string { - return s.RespMetadata.RequestID + s.Value = &v + return s } -type StartLiveTailInput struct { +// Represents the search status of a log stream. +type SearchedLogStream struct { _ struct{} `type:"structure"` - // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event can contain timestamps, IP addresses, - // strings, and so on. You use the filter pattern to specify what to look for - // in the log event message. - LogEventFilterPattern *string `locationName:"logEventFilterPattern" type:"string"` - - // LogGroupIdentifiers is a required field - LogGroupIdentifiers []*string `locationName:"logGroupIdentifiers" min:"1" type:"list" required:"true"` - - LogStreamNamePrefixes []*string `locationName:"logStreamNamePrefixes" min:"1" type:"list"` + // The name of the log stream. + LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` - LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` + // Indicates whether all the events in this log stream were searched. + SearchedCompletely *bool `locationName:"searchedCompletely" type:"boolean"` } // String returns the string representation. @@ -13473,7 +16135,7 @@ type StartLiveTailInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s StartLiveTailInput) String() string { +func (s SearchedLogStream) String() string { return awsutil.Prettify(s) } @@ -13482,60 +16144,28 @@ func (s StartLiveTailInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s StartLiveTailInput) GoString() string { +func (s SearchedLogStream) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartLiveTailInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartLiveTailInput"} - if s.LogGroupIdentifiers == nil { - invalidParams.Add(request.NewErrParamRequired("LogGroupIdentifiers")) - } - if s.LogGroupIdentifiers != nil && len(s.LogGroupIdentifiers) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogGroupIdentifiers", 1)) - } - if s.LogStreamNamePrefixes != nil && len(s.LogStreamNamePrefixes) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNamePrefixes", 1)) - } - if s.LogStreamNames != nil && len(s.LogStreamNames) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LogStreamNames", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLogEventFilterPattern sets the LogEventFilterPattern field's value. -func (s *StartLiveTailInput) SetLogEventFilterPattern(v string) *StartLiveTailInput { - s.LogEventFilterPattern = &v - return s -} - -// SetLogGroupIdentifiers sets the LogGroupIdentifiers field's value. -func (s *StartLiveTailInput) SetLogGroupIdentifiers(v []*string) *StartLiveTailInput { - s.LogGroupIdentifiers = v - return s -} - -// SetLogStreamNamePrefixes sets the LogStreamNamePrefixes field's value. -func (s *StartLiveTailInput) SetLogStreamNamePrefixes(v []*string) *StartLiveTailInput { - s.LogStreamNamePrefixes = v +// SetLogStreamName sets the LogStreamName field's value. +func (s *SearchedLogStream) SetLogStreamName(v string) *SearchedLogStream { + s.LogStreamName = &v return s } -// SetLogStreamNames sets the LogStreamNames field's value. -func (s *StartLiveTailInput) SetLogStreamNames(v []*string) *StartLiveTailInput { - s.LogStreamNames = v +// SetSearchedCompletely sets the SearchedCompletely field's value. +func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream { + s.SearchedCompletely = &v return s } -type StartLiveTailOutput struct { - _ struct{} `type:"structure"` +// This request exceeds a service quota. +type ServiceQuotaExceededException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - eventStream *StartLiveTailEventStream + Message_ *string `locationName:"message" type:"string"` } // String returns the string representation. @@ -13543,7 +16173,7 @@ type StartLiveTailOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s StartLiveTailOutput) String() string { +func (s ServiceQuotaExceededException) String() string { return awsutil.Prettify(s) } @@ -13552,202 +16182,110 @@ func (s StartLiveTailOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s StartLiveTailOutput) GoString() string { +func (s ServiceQuotaExceededException) GoString() string { return s.String() } -// GetStream returns the type to interact with the event stream. -func (s *StartLiveTailOutput) GetStream() *StartLiveTailEventStream { - return s.eventStream -} - -// The StartLiveTailOutput is and event in the StartLiveTailResponseStream group of events. -func (s *StartLiveTailOutput) eventStartLiveTailResponseStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the StartLiveTailOutput value. -// This method is only used internally within the SDK's EventStream handling. -func (s *StartLiveTailOutput) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - if err := payloadUnmarshaler.UnmarshalPayload( - bytes.NewReader(msg.Payload), s, - ); err != nil { - return err - } - return nil -} - -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *StartLiveTailOutput) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) - var buf bytes.Buffer - if err = pm.MarshalPayload(&buf, s); err != nil { - return eventstream.Message{}, err +func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { + return &ServiceQuotaExceededException{ + RespMetadata: v, } - msg.Payload = buf.Bytes() - return msg, err } -// StartLiveTailResponseStreamEvent groups together all EventStream -// events writes for StartLiveTailResponseStream. -// -// These events are: -// -// - LiveTailSessionStart -// - LiveTailSessionUpdate -type StartLiveTailResponseStreamEvent interface { - eventStartLiveTailResponseStream() - eventstreamapi.Marshaler - eventstreamapi.Unmarshaler +// Code returns the exception type name. +func (s *ServiceQuotaExceededException) Code() string { + return "ServiceQuotaExceededException" } -// StartLiveTailResponseStreamReader provides the interface for reading to the stream. The -// default implementation for this interface will be StartLiveTailResponseStream. -// -// The reader's Close method must allow multiple concurrent calls. -// -// These events are: -// -// - LiveTailSessionStart -// - LiveTailSessionUpdate -// - StartLiveTailResponseStreamUnknownEvent -type StartLiveTailResponseStreamReader interface { - // Returns a channel of events as they are read from the event stream. - Events() <-chan StartLiveTailResponseStreamEvent - - // Close will stop the reader reading events from the stream. - Close() error - - // Returns any error that has occurred while reading from the event stream. - Err() error +// Message returns the exception's message. +func (s *ServiceQuotaExceededException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" } -type readStartLiveTailResponseStream struct { - eventReader *eventstreamapi.EventReader - stream chan StartLiveTailResponseStreamEvent - err *eventstreamapi.OnceError - - done chan struct{} - closeOnce sync.Once +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ServiceQuotaExceededException) OrigErr() error { + return nil } -func newReadStartLiveTailResponseStream(eventReader *eventstreamapi.EventReader) *readStartLiveTailResponseStream { - r := &readStartLiveTailResponseStream{ - eventReader: eventReader, - stream: make(chan StartLiveTailResponseStreamEvent), - done: make(chan struct{}), - err: eventstreamapi.NewOnceError(), - } - go r.readEventStream() - - return r +func (s *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } -// Close will close the underlying event stream reader. -func (r *readStartLiveTailResponseStream) Close() error { - r.closeOnce.Do(r.safeClose) - return r.Err() +// Status code returns the HTTP status code for the request's response error. +func (s *ServiceQuotaExceededException) StatusCode() int { + return s.RespMetadata.StatusCode } -func (r *readStartLiveTailResponseStream) ErrorSet() <-chan struct{} { - return r.err.ErrorSet() +// RequestID returns the service's response RequestID for request. +func (s *ServiceQuotaExceededException) RequestID() string { + return s.RespMetadata.RequestID } -func (r *readStartLiveTailResponseStream) Closed() <-chan struct{} { - return r.done -} +// The service cannot complete the request. +type ServiceUnavailableException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` -func (r *readStartLiveTailResponseStream) safeClose() { - close(r.done) + Message_ *string `locationName:"message" type:"string"` } -func (r *readStartLiveTailResponseStream) Err() error { - return r.err.Err() +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceUnavailableException) String() string { + return awsutil.Prettify(s) } -func (r *readStartLiveTailResponseStream) Events() <-chan StartLiveTailResponseStreamEvent { - return r.stream +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceUnavailableException) GoString() string { + return s.String() } -func (r *readStartLiveTailResponseStream) readEventStream() { - defer r.Close() - defer close(r.stream) - - for { - event, err := r.eventReader.ReadEvent() - if err != nil { - if err == io.EOF { - return - } - select { - case <-r.done: - // If closed already ignore the error - return - default: - } - if _, ok := err.(*eventstreamapi.UnknownMessageTypeError); ok { - continue - } - r.err.SetError(err) - return - } - - select { - case r.stream <- event.(StartLiveTailResponseStreamEvent): - case <-r.done: - return - } +func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { + return &ServiceUnavailableException{ + RespMetadata: v, } } -type unmarshalerForStartLiveTailResponseStreamEvent struct { - metadata protocol.ResponseMetadata +// Code returns the exception type name. +func (s *ServiceUnavailableException) Code() string { + return "ServiceUnavailableException" } -func (u unmarshalerForStartLiveTailResponseStreamEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) { - switch eventType { - case "sessionStart": - return &LiveTailSessionStart{}, nil - case "sessionUpdate": - return &LiveTailSessionUpdate{}, nil - case "SessionStreamingException": - return newErrorSessionStreamingException(u.metadata).(eventstreamapi.Unmarshaler), nil - case "SessionTimeoutException": - return newErrorSessionTimeoutException(u.metadata).(eventstreamapi.Unmarshaler), nil - default: - return &StartLiveTailResponseStreamUnknownEvent{Type: eventType}, nil +// Message returns the exception's message. +func (s *ServiceUnavailableException) Message() string { + if s.Message_ != nil { + return *s.Message_ } + return "" } -// StartLiveTailResponseStreamUnknownEvent provides a failsafe event for the -// StartLiveTailResponseStream group of events when an unknown event is received. -type StartLiveTailResponseStreamUnknownEvent struct { - Type string - Message eventstream.Message +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ServiceUnavailableException) OrigErr() error { + return nil } -// The StartLiveTailResponseStreamUnknownEvent is and event in the StartLiveTailResponseStream -// group of events. -func (s *StartLiveTailResponseStreamUnknownEvent) eventStartLiveTailResponseStream() {} +func (s *ServiceUnavailableException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (e *StartLiveTailResponseStreamUnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) ( - msg eventstream.Message, err error, -) { - return e.Message.Clone(), nil +// Status code returns the HTTP status code for the request's response error. +func (s *ServiceUnavailableException) StatusCode() int { + return s.RespMetadata.StatusCode } -// UnmarshalEvent unmarshals the EventStream Message into the StartLiveTailResponseStream value. -// This method is only used internally within the SDK's EventStream handling. -func (e *StartLiveTailResponseStreamUnknownEvent) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - e.Message = msg.Clone() - return nil +// RequestID returns the service's response RequestID for request. +func (s *ServiceUnavailableException) RequestID() string { + return s.RespMetadata.RequestID } type StartQueryInput struct { @@ -14368,6 +16906,70 @@ func (s *TestMetricFilterOutput) SetMatches(v []*MetricFilterMatchRecord) *TestM return s } +// The request was throttled because of quota limits. +type ThrottlingException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ThrottlingException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ThrottlingException) GoString() string { + return s.String() +} + +func newErrorThrottlingException(v protocol.ResponseMetadata) error { + return &ThrottlingException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ThrottlingException) Code() string { + return "ThrottlingException" +} + +// Message returns the exception's message. +func (s *ThrottlingException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ThrottlingException) OrigErr() error { + return nil +} + +func (s *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID +} + // A resource can have no more than 50 tags. type TooManyTagsException struct { _ struct{} `type:"structure"` @@ -14681,6 +17283,70 @@ func (s UntagResourceOutput) GoString() string { return s.String() } +// One of the parameters for the request is not valid. +type ValidationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationException) GoString() string { + return s.String() +} + +func newErrorValidationException(v protocol.ResponseMetadata) error { + return &ValidationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ValidationException) Code() string { + return "ValidationException" +} + +// Message returns the exception's message. +func (s *ValidationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ValidationException) OrigErr() error { + return nil +} + +func (s *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID +} + const ( // DataProtectionStatusActivated is a DataProtectionStatus enum value DataProtectionStatusActivated = "ACTIVATED" @@ -14705,6 +17371,26 @@ func DataProtectionStatus_Values() []string { } } +const ( + // DeliveryDestinationTypeS3 is a DeliveryDestinationType enum value + DeliveryDestinationTypeS3 = "S3" + + // DeliveryDestinationTypeCwl is a DeliveryDestinationType enum value + DeliveryDestinationTypeCwl = "CWL" + + // DeliveryDestinationTypeFh is a DeliveryDestinationType enum value + DeliveryDestinationTypeFh = "FH" +) + +// DeliveryDestinationType_Values returns all elements of the DeliveryDestinationType enum +func DeliveryDestinationType_Values() []string { + return []string{ + DeliveryDestinationTypeS3, + DeliveryDestinationTypeCwl, + DeliveryDestinationTypeFh, + } +} + // The method used to distribute log data to the destination, which can be either // random or grouped by log stream. const ( @@ -14783,6 +17469,34 @@ func OrderBy_Values() []string { } } +const ( + // OutputFormatJson is a OutputFormat enum value + OutputFormatJson = "json" + + // OutputFormatPlain is a OutputFormat enum value + OutputFormatPlain = "plain" + + // OutputFormatW3c is a OutputFormat enum value + OutputFormatW3c = "w3c" + + // OutputFormatRaw is a OutputFormat enum value + OutputFormatRaw = "raw" + + // OutputFormatParquet is a OutputFormat enum value + OutputFormatParquet = "parquet" +) + +// OutputFormat_Values returns all elements of the OutputFormat enum +func OutputFormat_Values() []string { + return []string{ + OutputFormatJson, + OutputFormatPlain, + OutputFormatW3c, + OutputFormatRaw, + OutputFormatParquet, + } +} + const ( // PolicyTypeDataProtectionPolicy is a PolicyType enum value PolicyTypeDataProtectionPolicy = "DATA_PROTECTION_POLICY" diff --git a/service/cloudwatchlogs/cloudwatchlogsiface/interface.go b/service/cloudwatchlogs/cloudwatchlogsiface/interface.go index 62abf8c9ee6..7cf534b497a 100644 --- a/service/cloudwatchlogs/cloudwatchlogsiface/interface.go +++ b/service/cloudwatchlogs/cloudwatchlogsiface/interface.go @@ -68,6 +68,10 @@ type CloudWatchLogsAPI interface { CancelExportTaskWithContext(aws.Context, *cloudwatchlogs.CancelExportTaskInput, ...request.Option) (*cloudwatchlogs.CancelExportTaskOutput, error) CancelExportTaskRequest(*cloudwatchlogs.CancelExportTaskInput) (*request.Request, *cloudwatchlogs.CancelExportTaskOutput) + CreateDelivery(*cloudwatchlogs.CreateDeliveryInput) (*cloudwatchlogs.CreateDeliveryOutput, error) + CreateDeliveryWithContext(aws.Context, *cloudwatchlogs.CreateDeliveryInput, ...request.Option) (*cloudwatchlogs.CreateDeliveryOutput, error) + CreateDeliveryRequest(*cloudwatchlogs.CreateDeliveryInput) (*request.Request, *cloudwatchlogs.CreateDeliveryOutput) + CreateExportTask(*cloudwatchlogs.CreateExportTaskInput) (*cloudwatchlogs.CreateExportTaskOutput, error) CreateExportTaskWithContext(aws.Context, *cloudwatchlogs.CreateExportTaskInput, ...request.Option) (*cloudwatchlogs.CreateExportTaskOutput, error) CreateExportTaskRequest(*cloudwatchlogs.CreateExportTaskInput) (*request.Request, *cloudwatchlogs.CreateExportTaskOutput) @@ -88,6 +92,22 @@ type CloudWatchLogsAPI interface { DeleteDataProtectionPolicyWithContext(aws.Context, *cloudwatchlogs.DeleteDataProtectionPolicyInput, ...request.Option) (*cloudwatchlogs.DeleteDataProtectionPolicyOutput, error) DeleteDataProtectionPolicyRequest(*cloudwatchlogs.DeleteDataProtectionPolicyInput) (*request.Request, *cloudwatchlogs.DeleteDataProtectionPolicyOutput) + DeleteDelivery(*cloudwatchlogs.DeleteDeliveryInput) (*cloudwatchlogs.DeleteDeliveryOutput, error) + DeleteDeliveryWithContext(aws.Context, *cloudwatchlogs.DeleteDeliveryInput, ...request.Option) (*cloudwatchlogs.DeleteDeliveryOutput, error) + DeleteDeliveryRequest(*cloudwatchlogs.DeleteDeliveryInput) (*request.Request, *cloudwatchlogs.DeleteDeliveryOutput) + + DeleteDeliveryDestination(*cloudwatchlogs.DeleteDeliveryDestinationInput) (*cloudwatchlogs.DeleteDeliveryDestinationOutput, error) + DeleteDeliveryDestinationWithContext(aws.Context, *cloudwatchlogs.DeleteDeliveryDestinationInput, ...request.Option) (*cloudwatchlogs.DeleteDeliveryDestinationOutput, error) + DeleteDeliveryDestinationRequest(*cloudwatchlogs.DeleteDeliveryDestinationInput) (*request.Request, *cloudwatchlogs.DeleteDeliveryDestinationOutput) + + DeleteDeliveryDestinationPolicy(*cloudwatchlogs.DeleteDeliveryDestinationPolicyInput) (*cloudwatchlogs.DeleteDeliveryDestinationPolicyOutput, error) + DeleteDeliveryDestinationPolicyWithContext(aws.Context, *cloudwatchlogs.DeleteDeliveryDestinationPolicyInput, ...request.Option) (*cloudwatchlogs.DeleteDeliveryDestinationPolicyOutput, error) + DeleteDeliveryDestinationPolicyRequest(*cloudwatchlogs.DeleteDeliveryDestinationPolicyInput) (*request.Request, *cloudwatchlogs.DeleteDeliveryDestinationPolicyOutput) + + DeleteDeliverySource(*cloudwatchlogs.DeleteDeliverySourceInput) (*cloudwatchlogs.DeleteDeliverySourceOutput, error) + DeleteDeliverySourceWithContext(aws.Context, *cloudwatchlogs.DeleteDeliverySourceInput, ...request.Option) (*cloudwatchlogs.DeleteDeliverySourceOutput, error) + DeleteDeliverySourceRequest(*cloudwatchlogs.DeleteDeliverySourceInput) (*request.Request, *cloudwatchlogs.DeleteDeliverySourceOutput) + DeleteDestination(*cloudwatchlogs.DeleteDestinationInput) (*cloudwatchlogs.DeleteDestinationOutput, error) DeleteDestinationWithContext(aws.Context, *cloudwatchlogs.DeleteDestinationInput, ...request.Option) (*cloudwatchlogs.DeleteDestinationOutput, error) DeleteDestinationRequest(*cloudwatchlogs.DeleteDestinationInput) (*request.Request, *cloudwatchlogs.DeleteDestinationOutput) @@ -124,6 +144,27 @@ type CloudWatchLogsAPI interface { DescribeAccountPoliciesWithContext(aws.Context, *cloudwatchlogs.DescribeAccountPoliciesInput, ...request.Option) (*cloudwatchlogs.DescribeAccountPoliciesOutput, error) DescribeAccountPoliciesRequest(*cloudwatchlogs.DescribeAccountPoliciesInput) (*request.Request, *cloudwatchlogs.DescribeAccountPoliciesOutput) + DescribeDeliveries(*cloudwatchlogs.DescribeDeliveriesInput) (*cloudwatchlogs.DescribeDeliveriesOutput, error) + DescribeDeliveriesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliveriesInput, ...request.Option) (*cloudwatchlogs.DescribeDeliveriesOutput, error) + DescribeDeliveriesRequest(*cloudwatchlogs.DescribeDeliveriesInput) (*request.Request, *cloudwatchlogs.DescribeDeliveriesOutput) + + DescribeDeliveriesPages(*cloudwatchlogs.DescribeDeliveriesInput, func(*cloudwatchlogs.DescribeDeliveriesOutput, bool) bool) error + DescribeDeliveriesPagesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliveriesInput, func(*cloudwatchlogs.DescribeDeliveriesOutput, bool) bool, ...request.Option) error + + DescribeDeliveryDestinations(*cloudwatchlogs.DescribeDeliveryDestinationsInput) (*cloudwatchlogs.DescribeDeliveryDestinationsOutput, error) + DescribeDeliveryDestinationsWithContext(aws.Context, *cloudwatchlogs.DescribeDeliveryDestinationsInput, ...request.Option) (*cloudwatchlogs.DescribeDeliveryDestinationsOutput, error) + DescribeDeliveryDestinationsRequest(*cloudwatchlogs.DescribeDeliveryDestinationsInput) (*request.Request, *cloudwatchlogs.DescribeDeliveryDestinationsOutput) + + DescribeDeliveryDestinationsPages(*cloudwatchlogs.DescribeDeliveryDestinationsInput, func(*cloudwatchlogs.DescribeDeliveryDestinationsOutput, bool) bool) error + DescribeDeliveryDestinationsPagesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliveryDestinationsInput, func(*cloudwatchlogs.DescribeDeliveryDestinationsOutput, bool) bool, ...request.Option) error + + DescribeDeliverySources(*cloudwatchlogs.DescribeDeliverySourcesInput) (*cloudwatchlogs.DescribeDeliverySourcesOutput, error) + DescribeDeliverySourcesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliverySourcesInput, ...request.Option) (*cloudwatchlogs.DescribeDeliverySourcesOutput, error) + DescribeDeliverySourcesRequest(*cloudwatchlogs.DescribeDeliverySourcesInput) (*request.Request, *cloudwatchlogs.DescribeDeliverySourcesOutput) + + DescribeDeliverySourcesPages(*cloudwatchlogs.DescribeDeliverySourcesInput, func(*cloudwatchlogs.DescribeDeliverySourcesOutput, bool) bool) error + DescribeDeliverySourcesPagesWithContext(aws.Context, *cloudwatchlogs.DescribeDeliverySourcesInput, func(*cloudwatchlogs.DescribeDeliverySourcesOutput, bool) bool, ...request.Option) error + DescribeDestinations(*cloudwatchlogs.DescribeDestinationsInput) (*cloudwatchlogs.DescribeDestinationsOutput, error) DescribeDestinationsWithContext(aws.Context, *cloudwatchlogs.DescribeDestinationsInput, ...request.Option) (*cloudwatchlogs.DescribeDestinationsOutput, error) DescribeDestinationsRequest(*cloudwatchlogs.DescribeDestinationsInput) (*request.Request, *cloudwatchlogs.DescribeDestinationsOutput) @@ -190,6 +231,22 @@ type CloudWatchLogsAPI interface { GetDataProtectionPolicyWithContext(aws.Context, *cloudwatchlogs.GetDataProtectionPolicyInput, ...request.Option) (*cloudwatchlogs.GetDataProtectionPolicyOutput, error) GetDataProtectionPolicyRequest(*cloudwatchlogs.GetDataProtectionPolicyInput) (*request.Request, *cloudwatchlogs.GetDataProtectionPolicyOutput) + GetDelivery(*cloudwatchlogs.GetDeliveryInput) (*cloudwatchlogs.GetDeliveryOutput, error) + GetDeliveryWithContext(aws.Context, *cloudwatchlogs.GetDeliveryInput, ...request.Option) (*cloudwatchlogs.GetDeliveryOutput, error) + GetDeliveryRequest(*cloudwatchlogs.GetDeliveryInput) (*request.Request, *cloudwatchlogs.GetDeliveryOutput) + + GetDeliveryDestination(*cloudwatchlogs.GetDeliveryDestinationInput) (*cloudwatchlogs.GetDeliveryDestinationOutput, error) + GetDeliveryDestinationWithContext(aws.Context, *cloudwatchlogs.GetDeliveryDestinationInput, ...request.Option) (*cloudwatchlogs.GetDeliveryDestinationOutput, error) + GetDeliveryDestinationRequest(*cloudwatchlogs.GetDeliveryDestinationInput) (*request.Request, *cloudwatchlogs.GetDeliveryDestinationOutput) + + GetDeliveryDestinationPolicy(*cloudwatchlogs.GetDeliveryDestinationPolicyInput) (*cloudwatchlogs.GetDeliveryDestinationPolicyOutput, error) + GetDeliveryDestinationPolicyWithContext(aws.Context, *cloudwatchlogs.GetDeliveryDestinationPolicyInput, ...request.Option) (*cloudwatchlogs.GetDeliveryDestinationPolicyOutput, error) + GetDeliveryDestinationPolicyRequest(*cloudwatchlogs.GetDeliveryDestinationPolicyInput) (*request.Request, *cloudwatchlogs.GetDeliveryDestinationPolicyOutput) + + GetDeliverySource(*cloudwatchlogs.GetDeliverySourceInput) (*cloudwatchlogs.GetDeliverySourceOutput, error) + GetDeliverySourceWithContext(aws.Context, *cloudwatchlogs.GetDeliverySourceInput, ...request.Option) (*cloudwatchlogs.GetDeliverySourceOutput, error) + GetDeliverySourceRequest(*cloudwatchlogs.GetDeliverySourceInput) (*request.Request, *cloudwatchlogs.GetDeliverySourceOutput) + GetLogEvents(*cloudwatchlogs.GetLogEventsInput) (*cloudwatchlogs.GetLogEventsOutput, error) GetLogEventsWithContext(aws.Context, *cloudwatchlogs.GetLogEventsInput, ...request.Option) (*cloudwatchlogs.GetLogEventsOutput, error) GetLogEventsRequest(*cloudwatchlogs.GetLogEventsInput) (*request.Request, *cloudwatchlogs.GetLogEventsOutput) @@ -225,6 +282,18 @@ type CloudWatchLogsAPI interface { PutDataProtectionPolicyWithContext(aws.Context, *cloudwatchlogs.PutDataProtectionPolicyInput, ...request.Option) (*cloudwatchlogs.PutDataProtectionPolicyOutput, error) PutDataProtectionPolicyRequest(*cloudwatchlogs.PutDataProtectionPolicyInput) (*request.Request, *cloudwatchlogs.PutDataProtectionPolicyOutput) + PutDeliveryDestination(*cloudwatchlogs.PutDeliveryDestinationInput) (*cloudwatchlogs.PutDeliveryDestinationOutput, error) + PutDeliveryDestinationWithContext(aws.Context, *cloudwatchlogs.PutDeliveryDestinationInput, ...request.Option) (*cloudwatchlogs.PutDeliveryDestinationOutput, error) + PutDeliveryDestinationRequest(*cloudwatchlogs.PutDeliveryDestinationInput) (*request.Request, *cloudwatchlogs.PutDeliveryDestinationOutput) + + PutDeliveryDestinationPolicy(*cloudwatchlogs.PutDeliveryDestinationPolicyInput) (*cloudwatchlogs.PutDeliveryDestinationPolicyOutput, error) + PutDeliveryDestinationPolicyWithContext(aws.Context, *cloudwatchlogs.PutDeliveryDestinationPolicyInput, ...request.Option) (*cloudwatchlogs.PutDeliveryDestinationPolicyOutput, error) + PutDeliveryDestinationPolicyRequest(*cloudwatchlogs.PutDeliveryDestinationPolicyInput) (*request.Request, *cloudwatchlogs.PutDeliveryDestinationPolicyOutput) + + PutDeliverySource(*cloudwatchlogs.PutDeliverySourceInput) (*cloudwatchlogs.PutDeliverySourceOutput, error) + PutDeliverySourceWithContext(aws.Context, *cloudwatchlogs.PutDeliverySourceInput, ...request.Option) (*cloudwatchlogs.PutDeliverySourceOutput, error) + PutDeliverySourceRequest(*cloudwatchlogs.PutDeliverySourceInput) (*request.Request, *cloudwatchlogs.PutDeliverySourceOutput) + PutDestination(*cloudwatchlogs.PutDestinationInput) (*cloudwatchlogs.PutDestinationOutput, error) PutDestinationWithContext(aws.Context, *cloudwatchlogs.PutDestinationInput, ...request.Option) (*cloudwatchlogs.PutDestinationOutput, error) PutDestinationRequest(*cloudwatchlogs.PutDestinationInput) (*request.Request, *cloudwatchlogs.PutDestinationOutput) @@ -257,10 +326,6 @@ type CloudWatchLogsAPI interface { PutSubscriptionFilterWithContext(aws.Context, *cloudwatchlogs.PutSubscriptionFilterInput, ...request.Option) (*cloudwatchlogs.PutSubscriptionFilterOutput, error) PutSubscriptionFilterRequest(*cloudwatchlogs.PutSubscriptionFilterInput) (*request.Request, *cloudwatchlogs.PutSubscriptionFilterOutput) - StartLiveTail(*cloudwatchlogs.StartLiveTailInput) (*cloudwatchlogs.StartLiveTailOutput, error) - StartLiveTailWithContext(aws.Context, *cloudwatchlogs.StartLiveTailInput, ...request.Option) (*cloudwatchlogs.StartLiveTailOutput, error) - StartLiveTailRequest(*cloudwatchlogs.StartLiveTailInput) (*request.Request, *cloudwatchlogs.StartLiveTailOutput) - StartQuery(*cloudwatchlogs.StartQueryInput) (*cloudwatchlogs.StartQueryOutput, error) StartQueryWithContext(aws.Context, *cloudwatchlogs.StartQueryInput, ...request.Option) (*cloudwatchlogs.StartQueryOutput, error) StartQueryRequest(*cloudwatchlogs.StartQueryInput) (*request.Request, *cloudwatchlogs.StartQueryOutput) diff --git a/service/cloudwatchlogs/errors.go b/service/cloudwatchlogs/errors.go index 202cdb1c3b9..b9244c6a6c3 100644 --- a/service/cloudwatchlogs/errors.go +++ b/service/cloudwatchlogs/errors.go @@ -14,6 +14,12 @@ const ( // You don't have sufficient permissions to perform this action. ErrCodeAccessDeniedException = "AccessDeniedException" + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // This operation attempted to create a resource that already exists. + ErrCodeConflictException = "ConflictException" + // ErrCodeDataAlreadyAcceptedException for service response error code // "DataAlreadyAcceptedException". // @@ -79,19 +85,23 @@ const ( // The specified resource does not exist. ErrCodeResourceNotFoundException = "ResourceNotFoundException" + // ErrCodeServiceQuotaExceededException for service response error code + // "ServiceQuotaExceededException". + // + // This request exceeds a service quota. + ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException" + // ErrCodeServiceUnavailableException for service response error code // "ServiceUnavailableException". // // The service cannot complete the request. ErrCodeServiceUnavailableException = "ServiceUnavailableException" - // ErrCodeSessionStreamingException for service response error code - // "SessionStreamingException". - ErrCodeSessionStreamingException = "SessionStreamingException" - - // ErrCodeSessionTimeoutException for service response error code - // "SessionTimeoutException". - ErrCodeSessionTimeoutException = "SessionTimeoutException" + // ErrCodeThrottlingException for service response error code + // "ThrottlingException". + // + // The request was throttled because of quota limits. + ErrCodeThrottlingException = "ThrottlingException" // ErrCodeTooManyTagsException for service response error code // "TooManyTagsException". @@ -105,10 +115,17 @@ const ( // The most likely cause is an Amazon Web Services access key ID or secret key // that's not valid. ErrCodeUnrecognizedClientException = "UnrecognizedClientException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // One of the parameters for the request is not valid. + ErrCodeValidationException = "ValidationException" ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "AccessDeniedException": newErrorAccessDeniedException, + "ConflictException": newErrorConflictException, "DataAlreadyAcceptedException": newErrorDataAlreadyAcceptedException, "InvalidOperationException": newErrorInvalidOperationException, "InvalidParameterException": newErrorInvalidParameterException, @@ -118,9 +135,10 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "OperationAbortedException": newErrorOperationAbortedException, "ResourceAlreadyExistsException": newErrorResourceAlreadyExistsException, "ResourceNotFoundException": newErrorResourceNotFoundException, + "ServiceQuotaExceededException": newErrorServiceQuotaExceededException, "ServiceUnavailableException": newErrorServiceUnavailableException, - "SessionStreamingException": newErrorSessionStreamingException, - "SessionTimeoutException": newErrorSessionTimeoutException, + "ThrottlingException": newErrorThrottlingException, "TooManyTagsException": newErrorTooManyTagsException, "UnrecognizedClientException": newErrorUnrecognizedClientException, + "ValidationException": newErrorValidationException, } diff --git a/service/cloudwatchlogs/service.go b/service/cloudwatchlogs/service.go index d6d00aeb49c..fe5dd28c263 100644 --- a/service/cloudwatchlogs/service.go +++ b/service/cloudwatchlogs/service.go @@ -87,9 +87,6 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), ) - svc.Handlers.BuildStream.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.UnmarshalStream.PushBackNamed(jsonrpc.UnmarshalHandler) - // Run custom client initialization if present if initClient != nil { initClient(svc.Client)