154154 get_log_events /3 ,
155155 get_log_group_fields /2 ,
156156 get_log_group_fields /3 ,
157+ get_log_object /2 ,
158+ get_log_object /3 ,
157159 get_log_record /2 ,
158160 get_log_record /3 ,
159161 get_query_results /2 ,
603605% % }
604606-type create_log_group_request () :: #{binary () => any ()}.
605607
608+ % % Example:
609+ % % fields_data() :: #{
610+ % % <<"data">> => binary()
611+ % % }
612+ -type fields_data () :: #{binary () => any ()}.
613+
606614% % Example:
607615% % open_search_encryption_policy() :: #{
608616% % <<"policyName">> => string(),
16701678% % }
16711679-type start_query_response () :: #{binary () => any ()}.
16721680
1681+ % % Example:
1682+ % % get_log_object_response() :: #{
1683+ % % <<"fieldStream">> => list()
1684+ % % }
1685+ -type get_log_object_response () :: #{binary () => any ()}.
1686+
16731687% % Example:
16741688% % start_live_tail_request() :: #{
16751689% % <<"logEventFilterPattern">> => string(),
20232037% % }
20242038-type delete_resource_policy_request () :: #{binary () => any ()}.
20252039
2040+ % % Example:
2041+ % % get_log_object_request() :: #{
2042+ % % <<"logObjectPointer">> := string(),
2043+ % % <<"unmask">> => boolean()
2044+ % % }
2045+ -type get_log_object_request () :: #{binary () => any ()}.
2046+
20262047% % Example:
20272048% % anomaly_detector() :: #{
20282049% % <<"anomalyDetectorArn">> => string(),
20642085% % }
20652086-type delete_delivery_destination_request () :: #{binary () => any ()}.
20662087
2088+ % % Example:
2089+ % % internal_streaming_exception() :: #{
2090+ % % <<"message">> => string()
2091+ % % }
2092+ -type internal_streaming_exception () :: #{binary () => any ()}.
2093+
20672094% % Example:
20682095% % cancel_export_task_request() :: #{
20692096% % <<"taskId">> := string()
26042631 service_unavailable_exception () |
26052632 resource_not_found_exception ().
26062633
2634+ -type get_log_object_errors () ::
2635+ limit_exceeded_exception () |
2636+ invalid_parameter_exception () |
2637+ access_denied_exception () |
2638+ resource_not_found_exception () |
2639+ invalid_operation_exception ().
2640+
26072641-type get_log_record_errors () ::
26082642 limit_exceeded_exception () |
26092643 invalid_parameter_exception () |
@@ -4473,6 +4507,40 @@ get_log_group_fields(Client, Input, Options)
44734507 when is_map (Client ), is_map (Input ), is_list (Options ) ->
44744508 request (Client , <<" GetLogGroupFields" >>, Input , Options ).
44754509
4510+ % % @doc Retrieves a large logging object (LLO) and streams it back.
4511+ % %
4512+ % % This API is used to fetch the content of large portions of log events that
4513+ % % have been ingested through the PutOpenTelemetryLogs API.
4514+ % % When log events contain fields that would cause the total event size to
4515+ % % exceed 1MB, CloudWatch Logs automatically processes up to 10 fields,
4516+ % % starting with the largest fields. Each field is truncated as needed to
4517+ % % keep
4518+ % % the total event size as close to 1MB as possible. The excess portions are
4519+ % % stored as Large Log Objects (LLOs) and these fields are processed
4520+ % % separately and LLO reference system fields (in the format
4521+ % % `@ptr.$[path.to.field]') are
4522+ % % added. The path in the reference field reflects the original JSON
4523+ % % structure where the large field was located. For example, this could be
4524+ % % `@ptr.$['input']['message']',
4525+ % % `@ptr.$['AAA']['BBB']['CCC']['DDD']',
4526+ % % `@ptr.$['AAA']', or any other path matching your log
4527+ % % structure.
4528+ -spec get_log_object (aws_client :aws_client (), get_log_object_request ()) ->
4529+ {ok , get_log_object_response (), tuple ()} |
4530+ {error , any ()} |
4531+ {error , get_log_object_errors (), tuple ()}.
4532+ get_log_object (Client , Input )
4533+ when is_map (Client ), is_map (Input ) ->
4534+ get_log_object (Client , Input , []).
4535+
4536+ -spec get_log_object (aws_client :aws_client (), get_log_object_request (), proplists :proplist ()) ->
4537+ {ok , get_log_object_response (), tuple ()} |
4538+ {error , any ()} |
4539+ {error , get_log_object_errors (), tuple ()}.
4540+ get_log_object (Client , Input , Options )
4541+ when is_map (Client ), is_map (Input ), is_list (Options ) ->
4542+ request (Client , <<" GetLogObject" >>, Input , Options ).
4543+
44764544% % @doc Retrieves all of the fields and values of a single log event.
44774545% %
44784546% % All fields are retrieved,
@@ -4739,9 +4807,10 @@ list_tags_log_group(Client, Input, Options)
47394807 request (Client , <<" ListTagsLogGroup" >>, Input , Options ).
47404808
47414809% % @doc Creates an account-level data protection policy, subscription filter
4742- % % policy, or field
4743- % % index policy that applies to all log groups or a subset of log groups in
4744- % % the account.
4810+ % % policy, field index
4811+ % % policy, transformer policy, or metric extraction policy that applies to
4812+ % % all log groups or a
4813+ % % subset of log groups in the account.
47454814% %
47464815% % To use this operation, you must be signed on with the correct permissions
47474816% % depending on the
@@ -4763,6 +4832,10 @@ list_tags_log_group(Client, Input, Options)
47634832% % `logs:PutIndexPolicy' and
47644833% % `logs:PutAccountPolicy' permissions.
47654834% %
4835+ % % To create a metric extraction policy, you must have the
4836+ % % `logs:PutMetricExtractionPolicy' and
4837+ % % `logs:PutAccountPolicy' permissions.
4838+ % %
47664839% % Data protection policy
47674840% %
47684841% % A data protection policy can help safeguard sensitive data that's
@@ -4995,6 +5068,86 @@ list_tags_log_group(Client, Input, Options)
49955068% % account-level policy that
49965069% % you create with PutAccountPolicy:
49975070% % https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html.
5071+ % %
5072+ % % Metric extraction policy
5073+ % %
5074+ % % A metric extraction policy controls whether CloudWatch Metrics can be
5075+ % % created through the
5076+ % % Embedded Metrics Format (EMF) for log groups in your account. By default,
5077+ % % EMF metric creation
5078+ % % is enabled for all log groups. You can use metric extraction policies to
5079+ % % disable EMF metric
5080+ % % creation for your entire account or specific log groups.
5081+ % %
5082+ % % When a policy disables EMF metric creation for a log group, log events in
5083+ % % the EMF format
5084+ % % are still ingested, but no CloudWatch Metrics are created from them.
5085+ % %
5086+ % % Creating a policy disables metrics for AWS features that use EMF to create
5087+ % % metrics, such
5088+ % % as CloudWatch Container Insights and CloudWatch Application Signals. To
5089+ % % prevent turning off
5090+ % % those features by accident, we recommend that you exclude the underlying
5091+ % % log-groups through a
5092+ % % selection-criteria such as
5093+ % % ```
5094+ % % LogGroupNamePrefix NOT IN ["/aws/containerinsights",
5095+ % % "/aws/ecs/containerinsights",
5096+ % % "/aws/application-signals/data"]'''.
5097+ % %
5098+ % % Each account can have either one account-level metric extraction policy
5099+ % % that applies to
5100+ % % all log groups, or up to 5 policies that are each scoped to a subset of
5101+ % % log groups with the
5102+ % % `selectionCriteria' parameter. The selection criteria supports
5103+ % % filtering by `LogGroupName' and
5104+ % % `LogGroupNamePrefix' using the operators `IN' and `NOT IN'.
5105+ % % You can specify up to 50 values in each
5106+ % % `IN' or `NOT IN' list.
5107+ % %
5108+ % % The selection criteria can be specified in these formats:
5109+ % %
5110+ % % `LogGroupName IN ["log-group-1", "log-group-2"]'
5111+ % %
5112+ % % `LogGroupNamePrefix NOT IN ["/aws/prefix1",
5113+ % % "/aws/prefix2"]'
5114+ % %
5115+ % % If you have multiple account-level metric extraction policies with
5116+ % % selection criteria, no
5117+ % % two of them can have overlapping criteria. For example, if you have one
5118+ % % policy with selection
5119+ % % criteria `LogGroupNamePrefix IN ["my-log"]', you can't
5120+ % % have another metric extraction policy
5121+ % % with selection criteria `LogGroupNamePrefix IN
5122+ % % ["/my-log-prod"]' or
5123+ % % ```
5124+ % % LogGroupNamePrefix IN ["/my-logging"]''', as the set
5125+ % % of log groups matching these prefixes would be a subset of the log
5126+ % % groups matching the first policy's prefix, creating an overlap.
5127+ % %
5128+ % % When using `NOT IN', only one policy with this operator is allowed per
5129+ % % account.
5130+ % %
5131+ % % When combining policies with `IN' and `NOT IN' operators, the
5132+ % % overlap check ensures that
5133+ % % policies don't have conflicting effects. Two policies with `IN'
5134+ % % and `NOT IN' operators do not
5135+ % % overlap if and only if every value in the `IN 'policy is completely
5136+ % % contained within some value
5137+ % % in the `NOT IN' policy. For example:
5138+ % %
5139+ % % If you have a `NOT IN' policy for prefix
5140+ % % `"/aws/lambda"', you can create an `IN' policy for
5141+ % % the exact log group name `"/aws/lambda/function1"' because
5142+ % % the set of log groups matching
5143+ % % `"/aws/lambda/function1"' is a subset of the log groups
5144+ % % matching `"/aws/lambda"'.
5145+ % %
5146+ % % If you have a `NOT IN' policy for prefix
5147+ % % `"/aws/lambda"', you cannot create an `IN' policy
5148+ % % for prefix `"/aws"' because the set of log groups matching
5149+ % % `"/aws"' is not a subset of the log
5150+ % % groups matching `"/aws/lambda"'.
49985151-spec put_account_policy (aws_client :aws_client (), put_account_policy_request ()) ->
49995152 {ok , put_account_policy_response (), tuple ()} |
50005153 {error , any ()} |
@@ -6139,12 +6292,11 @@ test_transformer(Client, Input, Options)
61396292% % To add tags, use TagResource:
61406293% % https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html.
61416294% %
6142- % % CloudWatch Logs doesn't support IAM policies that prevent users from
6143- % % assigning specified
6144- % % tags to log groups using the
6145- % % ```
6146- % % aws:Resource/key-name ''' or
6147- % % `aws:TagKeys' condition keys.
6295+ % % When using IAM policies to control tag management for CloudWatch Logs log
6296+ % % groups, the
6297+ % % condition keys `aws:Resource/key-name' and `aws:TagKeys' cannot be
6298+ % % used to restrict which tags
6299+ % % users can assign.
61486300-spec untag_log_group (aws_client :aws_client (), untag_log_group_request ()) ->
61496301 {ok , undefined , tuple ()} |
61506302 {error , any ()} |
0 commit comments