diff --git a/gems/aws-sdk-core/CHANGELOG.md b/gems/aws-sdk-core/CHANGELOG.md index 4b461fc80a8..f8f908691ad 100644 --- a/gems/aws-sdk-core/CHANGELOG.md +++ b/gems/aws-sdk-core/CHANGELOG.md @@ -1,6 +1,8 @@ Unreleased Changes ------------------ +* Feature - Support functionality for services that migrate from AWS Query to AWS JSON or CBOR. + * Issue - Fix RPCv2 protocol to always send an Accept header for CBOR. 3.210.0 (2024-10-18) diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/client_stubs.rb b/gems/aws-sdk-core/lib/aws-sdk-core/client_stubs.rb index 20be7b5a259..f770f700e80 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/client_stubs.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/client_stubs.rb @@ -307,14 +307,14 @@ def data_to_http_resp(operation_name, data) def protocol_helper case config.api.metadata['protocol'] - when 'json' then Stubbing::Protocols::Json - when 'rest-json' then Stubbing::Protocols::RestJson - when 'rest-xml' then Stubbing::Protocols::RestXml - when 'query' then Stubbing::Protocols::Query - when 'ec2' then Stubbing::Protocols::EC2 + when 'json' then Stubbing::Protocols::Json + when 'rest-json' then Stubbing::Protocols::RestJson + when 'rest-xml' then Stubbing::Protocols::RestXml + when 'query' then Stubbing::Protocols::Query + when 'ec2' then Stubbing::Protocols::EC2 when 'smithy-rpc-v2-cbor' then Stubbing::Protocols::RpcV2 - when 'api-gateway' then Stubbing::Protocols::ApiGateway - else raise "unsupported protocol" + when 'api-gateway' then Stubbing::Protocols::ApiGateway + else raise 'unsupported protocol' end.new end end diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/json/error_handler.rb b/gems/aws-sdk-core/lib/aws-sdk-core/json/error_handler.rb index 7c5b1c29977..ef338b95584 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/json/error_handler.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/json/error_handler.rb @@ -26,7 +26,8 @@ def extract_error(body, context) def error_code(json, context) code = if aws_query_error?(context) - error = context.http_response.headers['x-amzn-query-error'].split(';')[0] + query_header = context.http_response.headers['x-amzn-query-error'] + error, _type = query_header.split(';') # type not supported remove_prefix(error, context) else json['__type'] diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/json/handler.rb b/gems/aws-sdk-core/lib/aws-sdk-core/json/handler.rb index 3899bfbd82c..ed8d288a62a 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/json/handler.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/json/handler.rb @@ -21,6 +21,7 @@ def build_request(context) context.http_request.http_method = 'POST' context.http_request.headers['Content-Type'] = content_type(context) context.http_request.headers['X-Amz-Target'] = target(context) + context.http_request.headers['X-Amzn-Query-Mode'] = 'true' if query_compatible?(context) context.http_request.body = build_body(context) end diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/error_handler.rb b/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/error_handler.rb index 1c0bae56d70..3e2a5cc4d01 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/error_handler.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/error_handler.rb @@ -39,7 +39,8 @@ def extract_error(body, context) def error_code(data, context) code = if aws_query_error?(context) - error = context.http_response.headers['x-amzn-query-error'].split(';')[0] + query_header = context.http_response.headers['x-amzn-query-error'] + error, _type = query_header.split(';') # type not supported remove_prefix(error, context) else data['__type'] diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/handler.rb b/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/handler.rb index 0e0d4049184..377be7c5239 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/handler.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/rpc_v2/handler.rb @@ -20,7 +20,8 @@ def with_metric(&block) end def build_request(context) - context.http_request.headers['smithy-protocol'] = 'rpc-v2-cbor' + context.http_request.headers['Smithy-Protocol'] = 'rpc-v2-cbor' + context.http_request.headers['X-Amzn-Query-Mode'] = 'true' if query_compatible?(context) context.http_request.http_method = 'POST' context.http_request.body = build_body(context) build_url(context) diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing.rb b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing.rb index 29f67cf05dd..9cad8f503d2 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Aws - # setup autoloading for Stubbing module + # @api private module Stubbing autoload :EmptyStub, 'aws-sdk-core/stubbing/empty_stub' autoload :DataApplicator, 'aws-sdk-core/stubbing/data_applicator' @@ -19,4 +19,4 @@ module Protocols autoload :ApiGateway, 'aws-sdk-core/stubbing/protocols/api_gateway' end end -end \ No newline at end of file +end diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/ec2.rb b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/ec2.rb index 67bd663be43..4f33b0d4b4f 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/ec2.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/ec2.rb @@ -3,6 +3,7 @@ module Aws module Stubbing module Protocols + # @api private class EC2 def stub_data(api, operation, data) @@ -16,17 +17,17 @@ def stub_data(api, operation, data) end def stub_error(error_code) - http_resp = Seahorse::Client::Http::Response.new - http_resp.status_code = 400 - http_resp.body = <<-XML.strip - - - #{error_code} - stubbed-response-error-message - - + resp = Seahorse::Client::Http::Response.new + resp.status_code = 400 + resp.body = <<~XML.strip + + + #{error_code} + stubbed-response-error-message + + XML - http_resp + resp end private @@ -37,7 +38,7 @@ def build_body(api, operation, data) xml.shift xml.pop xmlns = "http://ec2.amazonaws.com/doc/#{api.version}/".inspect - xml.unshift(" stubbed-request-id") + xml.unshift(' stubbed-request-id') xml.unshift("<#{operation.name}Response xmlns=#{xmlns}>\n") xml.push("\n") xml.join diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/json.rb b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/json.rb index e32017fd94f..ae99157f669 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/json.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/json.rb @@ -3,27 +3,28 @@ module Aws module Stubbing module Protocols + # @api private class Json def stub_data(api, operation, data) resp = Seahorse::Client::Http::Response.new resp.status_code = 200 - resp.headers["Content-Type"] = content_type(api) - resp.headers["x-amzn-RequestId"] = "stubbed-request-id" + resp.headers['Content-Type'] = content_type(api) + resp.headers['x-amzn-RequestId'] = 'stubbed-request-id' resp.body = build_body(operation, data) resp end def stub_error(error_code) - http_resp = Seahorse::Client::Http::Response.new - http_resp.status_code = 400 - http_resp.body = <<-JSON.strip -{ - "code": #{error_code.inspect}, - "message": "stubbed-response-error-message" -} + resp = Seahorse::Client::Http::Response.new + resp.status_code = 400 + resp.body = <<~JSON.strip + { + "code": #{error_code.inspect}, + "message": "stubbed-response-error-message" + } JSON - http_resp + resp end private diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/query.rb b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/query.rb index 3af866a847d..5e2f07b6e0a 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/query.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/query.rb @@ -3,6 +3,7 @@ module Aws module Stubbing module Protocols + # @api private class Query def stub_data(api, operation, data) @@ -13,10 +14,10 @@ def stub_data(api, operation, data) end def stub_error(error_code) - http_resp = Seahorse::Client::Http::Response.new - http_resp.status_code = 400 - http_resp.body = XmlError.new(error_code).to_xml - http_resp + resp = Seahorse::Client::Http::Response.new + resp.status_code = 400 + resp.body = XmlError.new(error_code).to_xml + resp end private @@ -24,9 +25,9 @@ def stub_error(error_code) def build_body(api, operation, data) xml = [] builder = Aws::Xml::DocBuilder.new(target: xml, indent: ' ') - builder.node(operation.name + 'Response', xmlns: xmlns(api)) do + builder.node("#{operation.name}Response", xmlns: xmlns(api)) do if (rules = operation.output) - rules.location_name = operation.name + 'Result' + rules.location_name = "#{operation.name}Result" Xml::Builder.new(rules, target: xml, pad:' ').to_xml(data) end builder.node('ResponseMetadata') do diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest.rb b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest.rb index c3ef688a99f..c8916d06f50 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest.rb @@ -5,6 +5,7 @@ module Aws module Stubbing module Protocols + # @api private class Rest include Seahorse::Model::Shapes @@ -22,7 +23,7 @@ def stub_data(api, operation, data) def new_http_response resp = Seahorse::Client::Http::Response.new resp.status_code = 200 - resp.headers["x-amzn-RequestId"] = "stubbed-request-id" + resp.headers['x-amzn-RequestId'] = 'stubbed-request-id' resp end diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_json.rb b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_json.rb index b4b19ecdd78..8b9d8565057 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_json.rb @@ -3,6 +3,7 @@ module Aws module Stubbing module Protocols + # @api private class RestJson < Rest def body_for(_a, _b, rules, data) @@ -14,15 +15,15 @@ def body_for(_a, _b, rules, data) end def stub_error(error_code) - http_resp = Seahorse::Client::Http::Response.new - http_resp.status_code = 400 - http_resp.body = <<-JSON.strip -{ - "code": #{error_code.inspect}, - "message": "stubbed-response-error-message" -} + resp = Seahorse::Client::Http::Response.new + resp.status_code = 400 + resp.body = <<~JSON.strip + { + "code": #{error_code.inspect}, + "message": "stubbed-response-error-message" + } JSON - http_resp + resp end end diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb index c8d9d733f68..e1af647ff46 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb @@ -3,6 +3,7 @@ module Aws module Stubbing module Protocols + # @api private class RestXml < Rest def body_for(api, operation, rules, data) @@ -10,7 +11,7 @@ def body_for(api, operation, rules, data) encode_eventstream_response(rules, data, Xml::Builder) else xml = [] - rules.location_name = operation.name + 'Result' + rules.location_name = "#{operation.name}Result" rules['xmlNamespace'] = { 'uri' => api.metadata['xmlNamespace'] } Xml::Builder.new(rules, target:xml).to_xml(data) xml.join @@ -18,10 +19,10 @@ def body_for(api, operation, rules, data) end def stub_error(error_code) - http_resp = Seahorse::Client::Http::Response.new - http_resp.status_code = 400 - http_resp.body = XmlError.new(error_code).to_xml - http_resp + resp = Seahorse::Client::Http::Response.new + resp.status_code = 400 + resp.body = XmlError.new(error_code).to_xml + resp end def xmlns(api) diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb index de1de3fc018..6f88672c43d 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb @@ -3,35 +3,33 @@ module Aws module Stubbing module Protocols + # @api private class RpcV2 - def stub_data(api, operation, data) + def stub_data(_api, operation, data) resp = Seahorse::Client::Http::Response.new resp.status_code = 200 - resp.headers['Content-Type'] = content_type(api) + resp.headers['Smithy-Protocol'] = 'rpc-v2-cbor' + resp.headers['Content-Type'] = 'application/cbor' resp.headers['x-amzn-RequestId'] = 'stubbed-request-id' resp.body = build_body(operation, data) resp end def stub_error(error_code) - http_resp = Seahorse::Client::Http::Response.new - http_resp.status_code = 400 - http_resp.body = <<-JSON.strip -{ - "code": #{error_code.inspect}, - "message": "stubbed-response-error-message" -} - JSON - http_resp + resp = Seahorse::Client::Http::Response.new + resp.status_code = 400 + resp.body = Aws::RpcV2.encode( + { + 'code' => error_code, + 'message' => 'stubbed-response-error-message' + } + ) + resp end private - def content_type(api) - 'application/cbor' - end - def build_body(operation, data) Aws::RpcV2::Builder.new(operation.output).serialize(data) end diff --git a/gems/aws-sdk-core/spec/api_helper.rb b/gems/aws-sdk-core/spec/api_helper.rb index a22ccc04822..61bc53601fd 100644 --- a/gems/aws-sdk-core/spec/api_helper.rb +++ b/gems/aws-sdk-core/spec/api_helper.rb @@ -45,6 +45,14 @@ def sample_ec2 # ec2 has its own protocol end end + def sample_rpcv2_cbor # cloudwatch logs changed to cbor + @sample_rpcv2_cbor ||= begin + api = File.expand_path('../fixtures/apis/logs.json', __FILE__) + api = JSON.load(File.read(api)) + sample_service(api: api) + end + end + def sample_shapes { 'StructureShape' => { diff --git a/gems/aws-sdk-core/spec/aws/json/error_handler_spec.rb b/gems/aws-sdk-core/spec/aws/json/error_handler_spec.rb index c99d3721fad..1204333707f 100644 --- a/gems/aws-sdk-core/spec/aws/json/error_handler_spec.rb +++ b/gems/aws-sdk-core/spec/aws/json/error_handler_spec.rb @@ -5,159 +5,91 @@ module Aws module Json describe ErrorHandler do + let(:client) { ApiHelper.sample_json::Client.new(stub_responses: true) } - let(:client) do - ApiHelper.sample_json::Client.new( - region: 'us-west-2', - retry_limit: 0, - credentials: Aws::Credentials.new('akid', 'secret') - ) - end - - let(:error_resp) { <<-JSON.strip } -{ - "__type":"ProvisionedThroughputExceededException", - "message":"foo", - "foo": "bar" -} + let(:error_resp) { <<~JSON.strip } + { + "__type":"ProvisionedThroughputExceededException", + "message":"foo", + "foo": "bar" + } JSON - let(:invalid_error_resp) { <<-JSON.strip } -{ - "__type":"ProvisionedThroughputExceededException:", - "message":"foo", - "foo": "bar" -} - + let(:invalid_error_resp) { <<~JSON.strip } + { + "__type":"ProvisionedThroughputExceededException:", + "message":"foo", + "foo": "bar" + } + JSON - let(:unmodeled_resp) { <<-JSON.strip } -{ - "__type":"UnModeledException", - "message":"foo" -} + + let(:un_modeled_error_resp) { <<~JSON.strip } + { + "__type":"UnModeledException", + "message":"foo" + } JSON - let(:empty_struct_error) { <<-JSON.strip } -{ - "__type":"EmptyStructError", - "message":"foo" -} + let(:empty_struct_error_resp) { <<~JSON.strip } + { + "__type":"EmptyStructError", + "message":"foo" + } JSON it 'extracts error data' do - stub_request(:post, "https://dynamodb.us-west-2.amazonaws.com/"). - to_return(:status => 400, :body => error_resp) - expect { - client.batch_get_item( - request_items: {} - ) - }.to raise_error do |e| - expect(e.code).to eq('ProvisionedThroughputExceededException') - expect(e.message).to eq('foo') - expect(e.foo).to eq('bar') - end - end + client.stub_responses( + :batch_get_item, + { status_code: 400, body: error_resp, headers: {} } + ) - it 'ignore invalid characters when matching' do - stub_request(:post, "https://dynamodb.us-west-2.amazonaws.com/"). - to_return(:status => 400, :body => invalid_error_resp) - expect { - client.batch_get_item( - request_items: {} - ) - }.to raise_error do |e| - expect(e.code).to eq('ProvisionedThroughputExceededException') - expect(e.message).to eq('foo') - expect(e.foo).to eq('bar') - end + expect { client.batch_get_item(request_items: {}) } + .to raise_error do |e| + expect(e.code).to eq('ProvisionedThroughputExceededException') + expect(e.message).to eq('foo') + expect(e.foo).to eq('bar') + end end - it 'extracts code and message for unmodeled errors' do - stub_request(:post, "https://dynamodb.us-west-2.amazonaws.com/"). - to_return(:status => 400, :body => unmodeled_resp) - expect { - client.batch_get_item( - request_items: {} - ) - }.to raise_error do |e| - expect(e.code).to eq('UnModeledException') - expect(e.message).to eq('foo') - end - end + it 'ignore invalid characters when matching' do + client.stub_responses( + :batch_get_item, + { status_code: 400, body: invalid_error_resp, headers: {} } + ) - it 'extracts code and message for modeled empty struct errors' do - stub_request(:post, "https://dynamodb.us-west-2.amazonaws.com/"). - to_return(:status => 400, :body => empty_struct_error) - expect { - client.batch_get_item( - request_items: {} - ) - }.to raise_error do |e| - expect(e.code).to eq('EmptyStructError') - expect(e.message).to eq('foo') - end + expect { client.batch_get_item(request_items: {}) } + .to raise_error do |e| + expect(e.code).to eq('ProvisionedThroughputExceededException') + expect(e.message).to eq('foo') + expect(e.foo).to eq('bar') + end end - describe 'AwsQueryCompatible' do - AwsQueryCompatibleErrorClient = ApiHelper.sample_service( - api: { - 'metadata' => { - 'apiVersion' => '2018-11-07', - 'awsQueryCompatible' => {}, - 'protocol' => 'json', - 'jsonVersion' => '1.1', - 'endpointPrefix' => 'svc', - 'signatureVersion' => 'v4', - 'errorPrefix' => 'Prefix' # service customization needs to set this - }, - 'operations' => { - 'Foo' => { - 'name' => 'Foo', - 'http' => { 'method' => 'POST', 'requestUri' => '/' }, - 'input' => { 'shape' => 'FooInput'} - } - }, - 'shapes' => { - 'FooInput' => { - 'type' => 'structure', - 'members' => {} - }, - 'String' => { 'type' => 'string' } - } - } - ).const_get(:Client) - - let(:client_aws_query_compatible) do - AwsQueryCompatibleErrorClient.new( - region: 'us-west-2', - retry_limit: 0, - credentials: Aws::Credentials.new('akid', 'secret') - ) - end + it 'extracts code and message for unmodeled errors' do + client.stub_responses( + :batch_get_item, + { status_code: 400, body: un_modeled_error_resp, headers: {} } + ) - it 'extracts code and message from x-amzn-query-error' do - stub_request(:post, "https://svc.us-west-2.amazonaws.com/"). - to_return(:status => 400, headers: { - 'x-amzn-query-error': 'Prefix.AwsQueryError;Sender' - }, :body => error_resp) - expect { - client_aws_query_compatible.foo() - }.to raise_error do |e| - expect(e.code).to eq('AwsQueryError') + expect { client.batch_get_item(request_items: {}) } + .to raise_error do |e| + expect(e.code).to eq('UnModeledException') expect(e.message).to eq('foo') end - end + end - it 'fallback to default if missing x-amzn-query-error' do - stub_request(:post, "https://svc.us-west-2.amazonaws.com/"). - to_return(:status => 400, headers: {}, :body => error_resp) - expect { - client_aws_query_compatible.foo() - }.to raise_error do |e| - expect(e.code).to eq('ProvisionedThroughputExceededException') + it 'extracts code and message for modeled empty struct errors' do + client.stub_responses( + :batch_get_item, + { status_code: 400, body: empty_struct_error_resp, headers: {} } + ) + + expect { client.batch_get_item(request_items: {}) } + .to raise_error do |e| + expect(e.code).to eq('EmptyStructError') expect(e.message).to eq('foo') end - end end end end diff --git a/gems/aws-sdk-core/spec/aws/json/query_compatible_spec.rb b/gems/aws-sdk-core/spec/aws/json/query_compatible_spec.rb new file mode 100644 index 00000000000..7cac236d278 --- /dev/null +++ b/gems/aws-sdk-core/spec/aws/json/query_compatible_spec.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +require_relative '../../spec_helper' + +module Aws + module Json + context 'AwsQueryCompatible' do + let(:query_compatible_client) do + ApiHelper.sample_service( + api: { + 'metadata' => { + 'awsQueryCompatible' => {}, + 'protocol' => 'json', + 'jsonVersion' => '1.1', + 'endpointPrefix' => 'svc', + 'signatureVersion' => 'v4', + 'errorPrefix' => 'Prefix.' # set by customization + }, + 'operations' => { + 'Foo' => { + 'name' => 'Foo', + 'http' => { 'method' => 'POST', 'requestUri' => '/' }, + 'input' => { 'shape' => 'FooInput' } + } + }, + 'shapes' => { + 'FooInput' => { + 'type' => 'structure', + 'members' => {} + }, + 'String' => { 'type' => 'string' } + } + } + ).const_get(:Client) + end + + let(:client) { query_compatible_client.new(stub_responses: true) } + + it 'extracts code and message from x-amzn-query-error' do + client.stub_responses( + :foo, + { + status_code: 400, + headers: { + 'x-amzn-query-error' => 'Prefix.NonExistentQueue;Sender' + }, + body: <<~JSON + { + "__type": "com.amazonaws.sqs#QueueDoesNotExist", + "message": "Some user-visible message" + } + JSON + } + ) + + expect { client.foo } + .to raise_error do |e| + expect(e.code).to eq('NonExistentQueue') + expect(e.message).to eq('Some user-visible message') + end + end + + it 'fallback to default if missing x-amzn-query-error' do + client.stub_responses( + :foo, + { + status_code: 400, + headers: {}, + body: <<~JSON + { + "__type": "com.amazonaws.sqs#QueueDoesNotExist", + "message": "Some user-visible message" + } + JSON + } + ) + + expect { client.foo } + .to raise_error do |e| + expect(e.code).to eq('QueueDoesNotExist') + expect(e.message).to eq('Some user-visible message') + end + end + + it 'sends x-amzn-query-mode' do + resp = client.foo + header = resp.context.http_request.headers['x-amzn-query-mode'] + expect(header).to eq('true') + end + end + end +end diff --git a/gems/aws-sdk-core/spec/aws/cbor/cbor_engine_spec.rb b/gems/aws-sdk-core/spec/aws/rpc_v2/cbor_engine_spec.rb similarity index 84% rename from gems/aws-sdk-core/spec/aws/cbor/cbor_engine_spec.rb rename to gems/aws-sdk-core/spec/aws/rpc_v2/cbor_engine_spec.rb index 1a6c8f13138..532ced1e4ac 100644 --- a/gems/aws-sdk-core/spec/aws/cbor/cbor_engine_spec.rb +++ b/gems/aws-sdk-core/spec/aws/rpc_v2/cbor_engine_spec.rb @@ -1,11 +1,10 @@ require_relative '../../spec_helper' -require 'aws-sdk-core/cbor/cbor_engine' module Aws - module Cbor + module RpcV2 describe CborEngine do context 'decode success tests' do - file = File.expand_path('decode-success-tests.json', __dir__) + file = File.expand_path('rpcv2-decode-success-tests.json', __dir__) test_cases = JSON.load_file(file) def expected_value(expect) @@ -24,7 +23,7 @@ def expected_value(expect) end when 'tag' value = expected_value(expect['tag']['value']) - Tagged.new(expect['tag']['id'], value) + Cbor::Tagged.new(expect['tag']['id'], value) when 'bool' then expect['bool'] when 'null' then nil when 'undefined' then :undefined @@ -54,7 +53,7 @@ def assert(actual, expected) test_cases.each do |test_case| it "passes #{test_case['description']}" do input = [test_case['input']].pack('H*') - actual = Aws::Cbor::CborEngine.decode(input) + actual = Aws::RpcV2::CborEngine.decode(input) expected = expected_value(test_case['expect']) assert(actual, expected) end @@ -62,15 +61,15 @@ def assert(actual, expected) end context 'decode error tests' do - file = File.expand_path('decode-error-tests.json', __dir__) + file = File.expand_path('rpcv2-decode-error-tests.json', __dir__) test_cases = JSON.load_file(file) test_cases.each do |test_case| it "passes #{test_case['description']}" do input = [test_case['input']].pack('H*') - expect { Aws::Cbor::CborEngine.decode(input) } - .to raise_error(Error) + expect { Aws::RpcV2::CborEngine.decode(input) } + .to raise_error(Cbor::Error) end end end diff --git a/gems/aws-sdk-core/spec/aws/rpc_v2/error_handler_spec.rb b/gems/aws-sdk-core/spec/aws/rpc_v2/error_handler_spec.rb new file mode 100644 index 00000000000..d91f9fcf1bb --- /dev/null +++ b/gems/aws-sdk-core/spec/aws/rpc_v2/error_handler_spec.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +require_relative '../../spec_helper' + +module Aws + module RpcV2 + describe ErrorHandler do + let(:client) do + ApiHelper.sample_rpcv2_cbor::Client.new(stub_responses: true) + end + + let(:error_resp) do + RpcV2.encode( + { + "__type": 'ServiceUnavailableException', + "message": 'foo', + "foo": 'bar' + } + ) + end + + let(:invalid_error_resp) do + RpcV2.encode( + { + "__type": 'ServiceUnavailableException:', + "message": 'foo', + "foo": 'bar' + } + ) + end + + let(:un_modeled_error_resp) do + RpcV2.encode( + { + "__type": 'UnModeledException', + "message": 'foo' + } + ) + end + + let(:empty_struct_error_resp) do + RpcV2.encode( + { + "__type": 'EmptyStructError', + "message": 'foo' + } + ) + end + + it 'extracts error data' do + client.stub_responses( + :describe_log_groups, + { + status_code: 400, + headers: { + 'smithy-protocol' => 'rpc-v2-cbor' + }, + body: error_resp + } + ) + + expect { client.describe_log_groups } + .to raise_error do |e| + expect(e.code).to eq('ServiceUnavailableException') + expect(e.message).to eq('foo') + expect(e.foo).to eq('bar') + end + end + + it 'ignore invalid characters when matching' do + client.stub_responses( + :describe_log_groups, + { + status_code: 400, + headers: { + 'smithy-protocol' => 'rpc-v2-cbor' + }, + body: invalid_error_resp + } + ) + + expect { client.describe_log_groups } + .to raise_error do |e| + expect(e.code).to eq('ServiceUnavailableException') + expect(e.message).to eq('foo') + expect(e.foo).to eq('bar') + end + end + + it 'extracts code and message for unmodeled errors' do + client.stub_responses( + :describe_log_groups, + { + status_code: 400, + headers: { + 'smithy-protocol' => 'rpc-v2-cbor' + }, + body: un_modeled_error_resp + } + ) + + expect { client.describe_log_groups } + .to raise_error do |e| + expect(e.code).to eq('UnModeledException') + expect(e.message).to eq('foo') + end + end + + it 'extracts code and message for modeled empty struct errors' do + client.stub_responses( + :describe_log_groups, + { + status_code: 400, + headers: { + 'smithy-protocol' => 'rpc-v2-cbor' + }, + body: empty_struct_error_resp + } + ) + + expect { client.describe_log_groups } + .to raise_error do |e| + expect(e.code).to eq('EmptyStructError') + expect(e.message).to eq('foo') + end + end + end + end +end diff --git a/gems/aws-sdk-core/spec/aws/rpc_v2/query_compatible_spec.rb b/gems/aws-sdk-core/spec/aws/rpc_v2/query_compatible_spec.rb new file mode 100644 index 00000000000..3782c0bd84d --- /dev/null +++ b/gems/aws-sdk-core/spec/aws/rpc_v2/query_compatible_spec.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +require_relative '../../spec_helper' + +module Aws + module RpcV2 + context 'AwsQueryCompatible' do + let(:query_compatible_client) do + ApiHelper.sample_service( + api: { + 'metadata' => { + 'awsQueryCompatible' => {}, + 'protocol' => 'smithy-rpc-v2-cbor', + 'endpointPrefix' => 'svc', + 'signatureVersion' => 'v4', + 'errorPrefix' => 'Prefix.' # set by customization + }, + 'operations' => { + 'Foo' => { + 'name' => 'Foo', + 'http' => { 'method' => 'POST', 'requestUri' => '/' }, + 'input' => { 'shape' => 'FooInput' } + } + }, + 'shapes' => { + 'FooInput' => { + 'type' => 'structure', + 'members' => {} + }, + 'String' => { 'type' => 'string' } + } + } + ).const_get(:Client) + end + + let(:client) { query_compatible_client.new(stub_responses: true) } + + it 'extracts code and message from x-amzn-query-error' do + client.stub_responses( + :foo, + { + status_code: 400, + headers: { + 'smithy-protocol' => 'rpc-v2-cbor', + 'x-amzn-query-error' => 'Prefix.NonExistentQueue;Sender' + }, + body: RpcV2.encode( + { + "__type": 'com.amazonaws.sqs#QueueDoesNotExist', + "message": 'Some user-visible message' + } + ) + } + ) + + expect { client.foo } + .to raise_error do |e| + expect(e.code).to eq('NonExistentQueue') + expect(e.message).to eq('Some user-visible message') + end + end + + it 'fallback to default if missing x-amzn-query-error' do + client.stub_responses( + :foo, + { + status_code: 400, + headers: { 'smithy-protocol' => 'rpc-v2-cbor' }, + body: RpcV2.encode( + { + "__type": "com.amazonaws.sqs#QueueDoesNotExist", + "message": "Some user-visible message" + } + ) + } + ) + + expect { client.foo } + .to raise_error do |e| + expect(e.code).to eq('QueueDoesNotExist') + expect(e.message).to eq('Some user-visible message') + end + end + + it 'sends x-amzn-query-mode' do + resp = client.foo + header = resp.context.http_request.headers['x-amzn-query-mode'] + expect(header).to eq('true') + end + end + end +end diff --git a/gems/aws-sdk-core/spec/aws/cbor/decode-error-tests.json b/gems/aws-sdk-core/spec/aws/rpc_v2/rpcv2-decode-error-tests.json similarity index 100% rename from gems/aws-sdk-core/spec/aws/cbor/decode-error-tests.json rename to gems/aws-sdk-core/spec/aws/rpc_v2/rpcv2-decode-error-tests.json diff --git a/gems/aws-sdk-core/spec/aws/cbor/decode-success-tests.json b/gems/aws-sdk-core/spec/aws/rpc_v2/rpcv2-decode-success-tests.json similarity index 100% rename from gems/aws-sdk-core/spec/aws/cbor/decode-success-tests.json rename to gems/aws-sdk-core/spec/aws/rpc_v2/rpcv2-decode-success-tests.json diff --git a/gems/aws-sdk-core/spec/aws/stubbing/protocols/ec2_spec.rb b/gems/aws-sdk-core/spec/aws/stubbing/protocols/ec2_spec.rb index fa6639dea5b..f648870d8b2 100644 --- a/gems/aws-sdk-core/spec/aws/stubbing/protocols/ec2_spec.rb +++ b/gems/aws-sdk-core/spec/aws/stubbing/protocols/ec2_spec.rb @@ -100,6 +100,19 @@ def normalize(xml) XML end + it 'can stub errors' do + resp = EC2.new.stub_error('error-code') + expect(resp.status_code).to eq(400) + expect(normalize(resp.body.string)).to eq(normalize(<<-XML)) + + + error-code + stubbed-response-error-message + + + XML + end + end end end diff --git a/gems/aws-sdk-core/spec/aws/stubbing/protocols/json_spec.rb b/gems/aws-sdk-core/spec/aws/stubbing/protocols/json_spec.rb index a7fa6244f77..5dc874f4b4e 100644 --- a/gems/aws-sdk-core/spec/aws/stubbing/protocols/json_spec.rb +++ b/gems/aws-sdk-core/spec/aws/stubbing/protocols/json_spec.rb @@ -10,7 +10,7 @@ module Protocols describe '#stub_data' do def normalize(json) - JSON.pretty_generate(JSON.load(json), indent: ' ') + JSON.pretty_generate(JSON.parse(json), indent: ' ') end let(:api) { ApiHelper.sample_json::Client.api } @@ -25,37 +25,37 @@ def normalize(json) it 'populates the expected headers' do resp = Json.new.stub_data(api, operation, {}) - expect(resp.headers.to_h).to eq({ - "content-type" => "application/x-amz-json-1.0", - "x-amzn-requestid" => "stubbed-request-id", - }) + expect(resp.headers.to_h).to eq( + 'content-type' => 'application/x-amz-json-1.0', + 'x-amzn-requestid' => 'stubbed-request-id' + ) end it 'populates the body with the stub data' do now = Time.now data = { table: { - table_name: "my-table-name", + table_name: 'my-table-name', table_size_bytes: 0, - table_status: "ACTIVE", + table_status: 'ACTIVE', attribute_definitions: [ { - attribute_name: "Id", - attribute_type: "S" + attribute_name: 'Id', + attribute_type: 'S' } ], creation_date_time: now, item_count: 0, key_schema: [ - attribute_name: "Id", - key_type: "HASH" + attribute_name: 'Id', + key_type: 'HASH' ], provisioned_throughput: { last_increase_date_time: now, last_decrease_date_time: now, number_of_decreases_today: 0, read_capacity_units: 50, - write_capacity_units: 50, + write_capacity_units: 50 } } } @@ -92,6 +92,17 @@ def normalize(json) JSON end + it 'can stub errors' do + resp = Json.new.stub_error('error-code') + expect(resp.status_code).to eq(400) + expect(normalize(resp.body.string)).to eq(normalize(<<-JSON)) + { + "code": "error-code", + "message": "stubbed-response-error-message" + } + JSON + end + end end end diff --git a/gems/aws-sdk-core/spec/aws/stubbing/protocols/query_spec.rb b/gems/aws-sdk-core/spec/aws/stubbing/protocols/query_spec.rb index 2d4d83d8067..7320bd3b41e 100644 --- a/gems/aws-sdk-core/spec/aws/stubbing/protocols/query_spec.rb +++ b/gems/aws-sdk-core/spec/aws/stubbing/protocols/query_spec.rb @@ -63,6 +63,7 @@ def normalize(xml) it 'can stub errors' do resp = Query.new.stub_error('error-code') + expect(resp.status_code).to eq(400) expect(normalize(resp.body.string)).to eq(normalize(<<-XML)) diff --git a/gems/aws-sdk-core/spec/aws/stubbing/protocols/rest_json_spec.rb b/gems/aws-sdk-core/spec/aws/stubbing/protocols/rest_json_spec.rb index e9b477cf51f..9c0f9d7a0e9 100644 --- a/gems/aws-sdk-core/spec/aws/stubbing/protocols/rest_json_spec.rb +++ b/gems/aws-sdk-core/spec/aws/stubbing/protocols/rest_json_spec.rb @@ -112,6 +112,17 @@ def normalize(json) JSON end + it 'can stub errors' do + resp = RestJson.new.stub_error('error-code') + expect(resp.status_code).to eq(400) + expect(normalize(resp.body.string)).to eq(normalize(<<-JSON)) + { + "code": "error-code", + "message": "stubbed-response-error-message" + } + JSON + end + end end end diff --git a/gems/aws-sdk-core/spec/aws/stubbing/protocols/rest_xml_spec.rb b/gems/aws-sdk-core/spec/aws/stubbing/protocols/rest_xml_spec.rb index f70727190c2..28e4b30ebb2 100644 --- a/gems/aws-sdk-core/spec/aws/stubbing/protocols/rest_xml_spec.rb +++ b/gems/aws-sdk-core/spec/aws/stubbing/protocols/rest_xml_spec.rb @@ -93,6 +93,7 @@ def normalize(xml) it 'can stub errors' do resp = RestXml.new.stub_error('error-code') + expect(resp.status_code).to eq(400) expect(normalize(resp.body.string)).to eq(normalize(<<-XML)) diff --git a/gems/aws-sdk-core/spec/aws/stubbing/protocols/rpc_v2_spec.rb b/gems/aws-sdk-core/spec/aws/stubbing/protocols/rpc_v2_spec.rb new file mode 100644 index 00000000000..97b266b8cd7 --- /dev/null +++ b/gems/aws-sdk-core/spec/aws/stubbing/protocols/rpc_v2_spec.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +require_relative '../../../spec_helper' +require 'json' + +module Aws + module Stubbing + module Protocols + describe RpcV2 do + describe '#stub_data' do + + def normalize(data) + JSON.pretty_generate(data) + end + + let(:api) { ApiHelper.sample_rpcv2_cbor::Client.api } + + let(:operation) { api.operation(:describe_log_groups) } + + it 'returns a stubbed http response' do + resp = RpcV2.new.stub_data(api, operation, {}) + expect(resp).to be_kind_of(Seahorse::Client::Http::Response) + expect(resp.status_code).to eq(200) + end + + it 'populates the expected headers' do + resp = RpcV2.new.stub_data(api, operation, {}) + expect(resp.headers.to_h).to eq( + 'smithy-protocol' => 'rpc-v2-cbor', + 'content-type' => 'application/cbor', + 'x-amzn-requestid' => 'stubbed-request-id' + ) + end + + it 'populates the body with the stub data' do + now = Time.now + data = { + log_groups: [ + { + log_group_name: 'my-log-group', + creation_time: now.to_i, + retention_in_days: 1, + metric_filter_count: 0, + arn: 'arn:aws:logs:us-west-2:012345678910:log-group:my-log-group:*', + stored_bytes: 0, + kms_key_id: 'arn:aws:kms:us-west-2:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab', + data_protection_status: 'ENABLED', + inherited_properties: [ 'ACCOUNT_DATA_PROTECTION' ], + log_group_class: 'STANDARD', + log_group_arn: 'arn:aws:logs:us-west-2:012345678910:log-group:my-log-group:*' + } + ] + } + + resp = RpcV2.new.stub_data(api, operation, data) + actual = normalize(Aws::RpcV2.decode(resp.body.string)) + expect(actual).to eq(normalize(JSON.parse(<<-JSON))) + { + "logGroups": [ + { + "logGroupName": "my-log-group", + "creationTime": #{now.to_i}, + "retentionInDays": 1, + "metricFilterCount": 0, + "arn": "arn:aws:logs:us-west-2:012345678910:log-group:my-log-group:*", + "storedBytes": 0, + "kmsKeyId": "arn:aws:kms:us-west-2:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "dataProtectionStatus": "ENABLED", + "inheritedProperties": [ + "ACCOUNT_DATA_PROTECTION" + ], + "logGroupClass": "STANDARD", + "logGroupArn": "arn:aws:logs:us-west-2:012345678910:log-group:my-log-group:*" + } + ] + } + JSON + end + + it 'can stub errors' do + resp = RpcV2.new.stub_error('error-code') + actual = normalize(Aws::RpcV2.decode(resp.body.string)) + expect(actual).to eq(normalize(JSON.parse(<<-JSON))) + { + "code": "error-code", + "message": "stubbed-response-error-message" + } + JSON + end + + end + end + end + end +end diff --git a/gems/aws-sdk-core/spec/fixtures/api/swf.json b/gems/aws-sdk-core/spec/fixtures/api/swf.json deleted file mode 100644 index d8f1eb63606..00000000000 --- a/gems/aws-sdk-core/spec/fixtures/api/swf.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "api_version": "2012-01-25", - "type": "json", - "json_version": 1.0, - "target_prefix": "SimpleWorkflowService", - "timestamp_format": "unixTimestamp", - "service_full_name": "Amazon Simple Workflow Service", - "service_abbreviation": "Amazon SWF", - "endpoint_prefix": "swf", - "operations": { - "ListDomains": { - "name": "ListDomains", - "input": { - "shape_name": "ListDomainsInput", - "type": "structure", - "members": { - "nextPageToken": { - "shape_name": "PageToken", - "type": "string", - "max_length": 2048 - }, - "registrationStatus": { - "shape_name": "RegistrationStatus", - "type": "string", - "enum": [ - "REGISTERED", - "DEPRECATED" - ], - "required": true - }, - "maximumPageSize": { - "shape_name": "PageSize", - "type": "integer", - "min_length": 0, - "max_length": 1000 - }, - "reverseOrder": { - "shape_name": "ReverseOrder", - "type": "boolean" - } - } - }, - "output": { - "shape_name": "DomainInfos", - "type": "structure", - "members": { - "domainInfos": { - "shape_name": "DomainInfoList", - "type": "list", - "members": { - "shape_name": "DomainInfo", - "type": "structure", - "members": { - "name": { - "shape_name": "DomainName", - "type": "string", - "min_length": 1, - "max_length": 256, - "required": true - }, - "status": { - "shape_name": "RegistrationStatus", - "type": "string", - "enum": [ - "REGISTERED", - "DEPRECATED" - ], - "required": true - }, - "description": { - "shape_name": "Description", - "type": "string", - "max_length": 1024 - } - } - }, - "required": true - }, - "nextPageToken": { - "shape_name": "PageToken", - "type": "string", - "max_length": 2048 - } - } - }, - "errors": [ - { - "shape_name": "OperationNotPermittedFault", - "type": "structure", - "members": { - "message": { - "shape_name": "ErrorMessage", - "type": "string" - } - } - } - ] - } - } -} diff --git a/gems/aws-sdk-core/spec/fixtures/apis/logs.json b/gems/aws-sdk-core/spec/fixtures/apis/logs.json new file mode 100644 index 00000000000..64c06efc0b3 --- /dev/null +++ b/gems/aws-sdk-core/spec/fixtures/apis/logs.json @@ -0,0 +1,3639 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2014-03-28", + "endpointPrefix":"logs", + "jsonVersion":"1.1", + "protocol":"smithy-rpc-v2-cbor", + "protocols":["smithy-rpc-v2-cbor"], + "serviceFullName":"Amazon CloudWatch Logs", + "serviceId":"CloudWatch Logs", + "signatureVersion":"v4", + "targetPrefix":"Logs_20140328", + "uid":"logs-2014-03-28", + "auth":["aws.auth#sigv4"] + }, + "operations":{ + "AssociateKmsKey":{ + "name":"AssociateKmsKey", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"AssociateKmsKeyRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "CancelExportTask":{ + "name":"CancelExportTask", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CancelExportTaskRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"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"} + ] + }, + "CreateExportTask":{ + "name":"CreateExportTask", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateExportTaskRequest"}, + "output":{"shape":"CreateExportTaskResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"LimitExceededException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ResourceAlreadyExistsException"} + ] + }, + "CreateLogAnomalyDetector":{ + "name":"CreateLogAnomalyDetector", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateLogAnomalyDetectorRequest"}, + "output":{"shape":"CreateLogAnomalyDetectorResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"OperationAbortedException"}, + {"shape":"LimitExceededException"} + ] + }, + "CreateLogGroup":{ + "name":"CreateLogGroup", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateLogGroupRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceAlreadyExistsException"}, + {"shape":"LimitExceededException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "CreateLogStream":{ + "name":"CreateLogStream", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateLogStreamRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceAlreadyExistsException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DeleteAccountPolicy":{ + "name":"DeleteAccountPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteAccountPolicyRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"OperationAbortedException"} + ] + }, + "DeleteDataProtectionPolicy":{ + "name":"DeleteDataProtectionPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteDataProtectionPolicyRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"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"} + ] + }, + "DeleteDestination":{ + "name":"DeleteDestination", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteDestinationRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DeleteLogAnomalyDetector":{ + "name":"DeleteLogAnomalyDetector", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteLogAnomalyDetectorRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"OperationAbortedException"} + ] + }, + "DeleteLogGroup":{ + "name":"DeleteLogGroup", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteLogGroupRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DeleteLogStream":{ + "name":"DeleteLogStream", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteLogStreamRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DeleteMetricFilter":{ + "name":"DeleteMetricFilter", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteMetricFilterRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DeleteQueryDefinition":{ + "name":"DeleteQueryDefinition", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteQueryDefinitionRequest"}, + "output":{"shape":"DeleteQueryDefinitionResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DeleteResourcePolicy":{ + "name":"DeleteResourcePolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteResourcePolicyRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DeleteRetentionPolicy":{ + "name":"DeleteRetentionPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteRetentionPolicyRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DeleteSubscriptionFilter":{ + "name":"DeleteSubscriptionFilter", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteSubscriptionFilterRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeAccountPolicies":{ + "name":"DescribeAccountPolicies", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeAccountPoliciesRequest"}, + "output":{"shape":"DescribeAccountPoliciesResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeConfigurationTemplates":{ + "name":"DescribeConfigurationTemplates", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeConfigurationTemplatesRequest"}, + "output":{"shape":"DescribeConfigurationTemplatesResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"} + ] + }, + "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", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeDestinationsRequest"}, + "output":{"shape":"DescribeDestinationsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeExportTasks":{ + "name":"DescribeExportTasks", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeExportTasksRequest"}, + "output":{"shape":"DescribeExportTasksResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeLogGroups":{ + "name":"DescribeLogGroups", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeLogGroupsRequest"}, + "output":{"shape":"DescribeLogGroupsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeLogStreams":{ + "name":"DescribeLogStreams", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeLogStreamsRequest"}, + "output":{"shape":"DescribeLogStreamsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeMetricFilters":{ + "name":"DescribeMetricFilters", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeMetricFiltersRequest"}, + "output":{"shape":"DescribeMetricFiltersResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeQueries":{ + "name":"DescribeQueries", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeQueriesRequest"}, + "output":{"shape":"DescribeQueriesResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeQueryDefinitions":{ + "name":"DescribeQueryDefinitions", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeQueryDefinitionsRequest"}, + "output":{"shape":"DescribeQueryDefinitionsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeResourcePolicies":{ + "name":"DescribeResourcePolicies", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeResourcePoliciesRequest"}, + "output":{"shape":"DescribeResourcePoliciesResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DescribeSubscriptionFilters":{ + "name":"DescribeSubscriptionFilters", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeSubscriptionFiltersRequest"}, + "output":{"shape":"DescribeSubscriptionFiltersResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "DisassociateKmsKey":{ + "name":"DisassociateKmsKey", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DisassociateKmsKeyRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "FilterLogEvents":{ + "name":"FilterLogEvents", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"FilterLogEventsRequest"}, + "output":{"shape":"FilterLogEventsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "GetDataProtectionPolicy":{ + "name":"GetDataProtectionPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetDataProtectionPolicyRequest"}, + "output":{"shape":"GetDataProtectionPolicyResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"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"} + ] + }, + "GetLogAnomalyDetector":{ + "name":"GetLogAnomalyDetector", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetLogAnomalyDetectorRequest"}, + "output":{"shape":"GetLogAnomalyDetectorResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"OperationAbortedException"} + ] + }, + "GetLogEvents":{ + "name":"GetLogEvents", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetLogEventsRequest"}, + "output":{"shape":"GetLogEventsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "GetLogGroupFields":{ + "name":"GetLogGroupFields", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetLogGroupFieldsRequest"}, + "output":{"shape":"GetLogGroupFieldsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"LimitExceededException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "GetLogRecord":{ + "name":"GetLogRecord", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetLogRecordRequest"}, + "output":{"shape":"GetLogRecordResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"LimitExceededException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "GetQueryResults":{ + "name":"GetQueryResults", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetQueryResultsRequest"}, + "output":{"shape":"GetQueryResultsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "ListAnomalies":{ + "name":"ListAnomalies", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListAnomaliesRequest"}, + "output":{"shape":"ListAnomaliesResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"OperationAbortedException"} + ] + }, + "ListLogAnomalyDetectors":{ + "name":"ListLogAnomalyDetectors", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListLogAnomalyDetectorsRequest"}, + "output":{"shape":"ListLogAnomalyDetectorsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"OperationAbortedException"} + ] + }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "ListTagsLogGroup":{ + "name":"ListTagsLogGroup", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTagsLogGroupRequest"}, + "output":{"shape":"ListTagsLogGroupResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ], + "deprecated":true, + "deprecatedMessage":"Please use the generic tagging API ListTagsForResource" + }, + "PutAccountPolicy":{ + "name":"PutAccountPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutAccountPolicyRequest"}, + "output":{"shape":"PutAccountPolicyResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"LimitExceededException"} + ] + }, + "PutDataProtectionPolicy":{ + "name":"PutDataProtectionPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutDataProtectionPolicyRequest"}, + "output":{"shape":"PutDataProtectionPolicyResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"LimitExceededException"}, + {"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"} + ] + }, + "PutDestination":{ + "name":"PutDestination", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutDestinationRequest"}, + "output":{"shape":"PutDestinationResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "PutDestinationPolicy":{ + "name":"PutDestinationPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutDestinationPolicyRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "PutLogEvents":{ + "name":"PutLogEvents", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutLogEventsRequest"}, + "output":{"shape":"PutLogEventsResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"InvalidSequenceTokenException"}, + {"shape":"DataAlreadyAcceptedException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"UnrecognizedClientException"} + ] + }, + "PutMetricFilter":{ + "name":"PutMetricFilter", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutMetricFilterRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"LimitExceededException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "PutQueryDefinition":{ + "name":"PutQueryDefinition", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutQueryDefinitionRequest"}, + "output":{"shape":"PutQueryDefinitionResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"LimitExceededException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "PutResourcePolicy":{ + "name":"PutResourcePolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutResourcePolicyRequest"}, + "output":{"shape":"PutResourcePolicyResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"LimitExceededException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "PutRetentionPolicy":{ + "name":"PutRetentionPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutRetentionPolicyRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "PutSubscriptionFilter":{ + "name":"PutSubscriptionFilter", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutSubscriptionFilterRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OperationAbortedException"}, + {"shape":"LimitExceededException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "StartLiveTail":{ + "name":"StartLiveTail", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"StartLiveTailRequest"}, + "output":{"shape":"StartLiveTailResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"LimitExceededException"}, + {"shape":"InvalidOperationException"} + ], + "endpoint":{"hostPrefix":"streaming-"} + }, + "StartQuery":{ + "name":"StartQuery", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"StartQueryRequest"}, + "output":{"shape":"StartQueryResponse"}, + "errors":[ + {"shape":"MalformedQueryException"}, + {"shape":"InvalidParameterException"}, + {"shape":"LimitExceededException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "StopQuery":{ + "name":"StopQuery", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"StopQueryRequest"}, + "output":{"shape":"StopQueryResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "TagLogGroup":{ + "name":"TagLogGroup", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TagLogGroupRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidParameterException"} + ], + "deprecated":true, + "deprecatedMessage":"Please use the generic tagging API TagResource" + }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TagResourceRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"TooManyTagsException"} + ] + }, + "TestMetricFilter":{ + "name":"TestMetricFilter", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TestMetricFilterRequest"}, + "output":{"shape":"TestMetricFilterResponse"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "UntagLogGroup":{ + "name":"UntagLogGroup", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UntagLogGroupRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"} + ], + "deprecated":true, + "deprecatedMessage":"Please use the generic tagging API UntagResource" + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UntagResourceRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"} + ] + }, + "UpdateAnomaly":{ + "name":"UpdateAnomaly", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UpdateAnomalyRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"OperationAbortedException"} + ] + }, + "UpdateDeliveryConfiguration":{ + "name":"UpdateDeliveryConfiguration", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UpdateDeliveryConfigurationRequest"}, + "output":{"shape":"UpdateDeliveryConfigurationResponse"}, + "errors":[ + {"shape":"ServiceUnavailableException"}, + {"shape":"ConflictException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ThrottlingException"} + ] + }, + "UpdateLogAnomalyDetector":{ + "name":"UpdateLogAnomalyDetector", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UpdateLogAnomalyDetectorRequest"}, + "errors":[ + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceUnavailableException"}, + {"shape":"OperationAbortedException"} + ] + } + }, + "shapes":{ + "AccessDeniedException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "AccessPolicy":{ + "type":"string", + "min":1 + }, + "AccountId":{ + "type":"string", + "max":12, + "min":12, + "pattern":"^\\d{12}$" + }, + "AccountIds":{ + "type":"list", + "member":{"shape":"AccountId"}, + "max":20, + "min":0 + }, + "AccountPolicies":{ + "type":"list", + "member":{"shape":"AccountPolicy"} + }, + "AccountPolicy":{ + "type":"structure", + "members":{ + "policyName":{"shape":"PolicyName"}, + "policyDocument":{"shape":"AccountPolicyDocument"}, + "lastUpdatedTime":{"shape":"Timestamp"}, + "policyType":{"shape":"PolicyType"}, + "scope":{"shape":"Scope"}, + "selectionCriteria":{"shape":"SelectionCriteria"}, + "accountId":{"shape":"AccountId"} + } + }, + "AccountPolicyDocument":{"type":"string"}, + "AllowedActionForAllowVendedLogsDeliveryForResource":{"type":"string"}, + "AllowedFieldDelimiters":{ + "type":"list", + "member":{"shape":"FieldDelimiter"} + }, + "AllowedFields":{ + "type":"list", + "member":{"shape":"RecordField"} + }, + "AmazonResourceName":{ + "type":"string", + "max":1011, + "min":1, + "pattern":"[\\w+=/:,.@-]*" + }, + "Anomalies":{ + "type":"list", + "member":{"shape":"Anomaly"} + }, + "Anomaly":{ + "type":"structure", + "required":[ + "anomalyId", + "patternId", + "anomalyDetectorArn", + "patternString", + "firstSeen", + "lastSeen", + "description", + "active", + "state", + "histogram", + "logSamples", + "patternTokens", + "logGroupArnList" + ], + "members":{ + "anomalyId":{"shape":"AnomalyId"}, + "patternId":{"shape":"PatternId"}, + "anomalyDetectorArn":{"shape":"AnomalyDetectorArn"}, + "patternString":{"shape":"PatternString"}, + "patternRegex":{"shape":"PatternRegex"}, + "priority":{"shape":"Priority"}, + "firstSeen":{"shape":"EpochMillis"}, + "lastSeen":{"shape":"EpochMillis"}, + "description":{"shape":"Description"}, + "active":{"shape":"Boolean"}, + "state":{"shape":"State"}, + "histogram":{"shape":"Histogram"}, + "logSamples":{"shape":"LogSamples"}, + "patternTokens":{"shape":"PatternTokens"}, + "logGroupArnList":{"shape":"LogGroupArnList"}, + "suppressed":{"shape":"Boolean"}, + "suppressedDate":{"shape":"EpochMillis"}, + "suppressedUntil":{"shape":"EpochMillis"}, + "isPatternLevelSuppression":{"shape":"Boolean"} + } + }, + "AnomalyDetector":{ + "type":"structure", + "members":{ + "anomalyDetectorArn":{"shape":"AnomalyDetectorArn"}, + "detectorName":{"shape":"DetectorName"}, + "logGroupArnList":{"shape":"LogGroupArnList"}, + "evaluationFrequency":{"shape":"EvaluationFrequency"}, + "filterPattern":{"shape":"FilterPattern"}, + "anomalyDetectorStatus":{"shape":"AnomalyDetectorStatus"}, + "kmsKeyId":{"shape":"KmsKeyId"}, + "creationTimeStamp":{"shape":"EpochMillis"}, + "lastModifiedTimeStamp":{"shape":"EpochMillis"}, + "anomalyVisibilityTime":{"shape":"AnomalyVisibilityTime"} + } + }, + "AnomalyDetectorArn":{ + "type":"string", + "min":1, + "pattern":"[\\w#+=/:,.@-]*" + }, + "AnomalyDetectorStatus":{ + "type":"string", + "enum":[ + "INITIALIZING", + "TRAINING", + "ANALYZING", + "FAILED", + "DELETED", + "PAUSED" + ] + }, + "AnomalyDetectors":{ + "type":"list", + "member":{"shape":"AnomalyDetector"} + }, + "AnomalyId":{ + "type":"string", + "max":36, + "min":36 + }, + "AnomalyVisibilityTime":{ + "type":"long", + "max":90, + "min":7 + }, + "Arn":{"type":"string"}, + "AssociateKmsKeyRequest":{ + "type":"structure", + "required":["kmsKeyId"], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "kmsKeyId":{"shape":"KmsKeyId"}, + "resourceIdentifier":{"shape":"ResourceIdentifier"} + } + }, + "Boolean":{"type":"boolean"}, + "CancelExportTaskRequest":{ + "type":"structure", + "required":["taskId"], + "members":{ + "taskId":{"shape":"ExportTaskId"} + } + }, + "ClientToken":{ + "type":"string", + "max":128, + "min":36, + "pattern":"\\S{36,128}" + }, + "ConfigurationTemplate":{ + "type":"structure", + "members":{ + "service":{"shape":"Service"}, + "logType":{"shape":"LogType"}, + "resourceType":{"shape":"ResourceType"}, + "deliveryDestinationType":{"shape":"DeliveryDestinationType"}, + "defaultDeliveryConfigValues":{"shape":"ConfigurationTemplateDeliveryConfigValues"}, + "allowedFields":{"shape":"AllowedFields"}, + "allowedOutputFormats":{"shape":"OutputFormats"}, + "allowedActionForAllowVendedLogsDeliveryForResource":{"shape":"AllowedActionForAllowVendedLogsDeliveryForResource"}, + "allowedFieldDelimiters":{"shape":"AllowedFieldDelimiters"}, + "allowedSuffixPathFields":{"shape":"RecordFields"} + } + }, + "ConfigurationTemplateDeliveryConfigValues":{ + "type":"structure", + "members":{ + "recordFields":{"shape":"RecordFields"}, + "fieldDelimiter":{"shape":"FieldDelimiter"}, + "s3DeliveryConfiguration":{"shape":"S3DeliveryConfiguration"} + } + }, + "ConfigurationTemplates":{ + "type":"list", + "member":{"shape":"ConfigurationTemplate"} + }, + "ConflictException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "Count":{"type":"long"}, + "CreateDeliveryRequest":{ + "type":"structure", + "required":[ + "deliverySourceName", + "deliveryDestinationArn" + ], + "members":{ + "deliverySourceName":{"shape":"DeliverySourceName"}, + "deliveryDestinationArn":{"shape":"Arn"}, + "recordFields":{"shape":"RecordFields"}, + "fieldDelimiter":{"shape":"FieldDelimiter"}, + "s3DeliveryConfiguration":{"shape":"S3DeliveryConfiguration"}, + "tags":{"shape":"Tags"} + } + }, + "CreateDeliveryResponse":{ + "type":"structure", + "members":{ + "delivery":{"shape":"Delivery"} + } + }, + "CreateExportTaskRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "from", + "to", + "destination" + ], + "members":{ + "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"} + } + }, + "CreateLogAnomalyDetectorRequest":{ + "type":"structure", + "required":["logGroupArnList"], + "members":{ + "logGroupArnList":{"shape":"LogGroupArnList"}, + "detectorName":{"shape":"DetectorName"}, + "evaluationFrequency":{"shape":"EvaluationFrequency"}, + "filterPattern":{"shape":"FilterPattern"}, + "kmsKeyId":{"shape":"KmsKeyId"}, + "anomalyVisibilityTime":{"shape":"AnomalyVisibilityTime"}, + "tags":{"shape":"Tags"} + } + }, + "CreateLogAnomalyDetectorResponse":{ + "type":"structure", + "members":{ + "anomalyDetectorArn":{"shape":"AnomalyDetectorArn"} + } + }, + "CreateLogGroupRequest":{ + "type":"structure", + "required":["logGroupName"], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "kmsKeyId":{"shape":"KmsKeyId"}, + "tags":{"shape":"Tags"}, + "logGroupClass":{"shape":"LogGroupClass"} + } + }, + "CreateLogStreamRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "logStreamName" + ], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "logStreamName":{"shape":"LogStreamName"} + } + }, + "DataAlreadyAcceptedException":{ + "type":"structure", + "members":{ + "expectedSequenceToken":{"shape":"SequenceToken"} + }, + "exception":true + }, + "DataProtectionPolicyDocument":{"type":"string"}, + "DataProtectionStatus":{ + "type":"string", + "enum":[ + "ACTIVATED", + "DELETED", + "ARCHIVED", + "DISABLED" + ] + }, + "Days":{"type":"integer"}, + "DefaultValue":{"type":"double"}, + "DeleteAccountPolicyRequest":{ + "type":"structure", + "required":[ + "policyName", + "policyType" + ], + "members":{ + "policyName":{"shape":"PolicyName"}, + "policyType":{"shape":"PolicyType"} + } + }, + "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"} + } + }, + "DeleteDestinationRequest":{ + "type":"structure", + "required":["destinationName"], + "members":{ + "destinationName":{"shape":"DestinationName"} + } + }, + "DeleteLogAnomalyDetectorRequest":{ + "type":"structure", + "required":["anomalyDetectorArn"], + "members":{ + "anomalyDetectorArn":{"shape":"AnomalyDetectorArn"} + } + }, + "DeleteLogGroupRequest":{ + "type":"structure", + "required":["logGroupName"], + "members":{ + "logGroupName":{"shape":"LogGroupName"} + } + }, + "DeleteLogStreamRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "logStreamName" + ], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "logStreamName":{"shape":"LogStreamName"} + } + }, + "DeleteMetricFilterRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "filterName" + ], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "filterName":{"shape":"FilterName"} + } + }, + "DeleteQueryDefinitionRequest":{ + "type":"structure", + "required":["queryDefinitionId"], + "members":{ + "queryDefinitionId":{"shape":"QueryId"} + } + }, + "DeleteQueryDefinitionResponse":{ + "type":"structure", + "members":{ + "success":{"shape":"Success"} + } + }, + "DeleteResourcePolicyRequest":{ + "type":"structure", + "members":{ + "policyName":{"shape":"PolicyName"} + } + }, + "DeleteRetentionPolicyRequest":{ + "type":"structure", + "required":["logGroupName"], + "members":{ + "logGroupName":{"shape":"LogGroupName"} + } + }, + "DeleteSubscriptionFilterRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "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"}, + "recordFields":{"shape":"RecordFields"}, + "fieldDelimiter":{"shape":"FieldDelimiter"}, + "s3DeliveryConfiguration":{"shape":"S3DeliveryConfiguration"}, + "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" + ] + }, + "DeliveryDestinationTypes":{ + "type":"list", + "member":{"shape":"DeliveryDestinationType"}, + "max":3, + "min":1 + }, + "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"} + }, + "DeliverySuffixPath":{ + "type":"string", + "max":256, + "min":1 + }, + "Descending":{"type":"boolean"}, + "DescribeAccountPoliciesRequest":{ + "type":"structure", + "required":["policyType"], + "members":{ + "policyType":{"shape":"PolicyType"}, + "policyName":{"shape":"PolicyName"}, + "accountIdentifiers":{"shape":"AccountIds"} + } + }, + "DescribeAccountPoliciesResponse":{ + "type":"structure", + "members":{ + "accountPolicies":{"shape":"AccountPolicies"} + } + }, + "DescribeConfigurationTemplatesRequest":{ + "type":"structure", + "members":{ + "service":{"shape":"Service"}, + "logTypes":{"shape":"LogTypes"}, + "resourceTypes":{"shape":"ResourceTypes"}, + "deliveryDestinationTypes":{"shape":"DeliveryDestinationTypes"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} + } + }, + "DescribeConfigurationTemplatesResponse":{ + "type":"structure", + "members":{ + "configurationTemplates":{"shape":"ConfigurationTemplates"}, + "nextToken":{"shape":"NextToken"} + } + }, + "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"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} + } + }, + "DescribeDestinationsResponse":{ + "type":"structure", + "members":{ + "destinations":{"shape":"Destinations"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeExportTasksRequest":{ + "type":"structure", + "members":{ + "taskId":{"shape":"ExportTaskId"}, + "statusCode":{"shape":"ExportTaskStatusCode"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} + } + }, + "DescribeExportTasksResponse":{ + "type":"structure", + "members":{ + "exportTasks":{"shape":"ExportTasks"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeLimit":{ + "type":"integer", + "max":50, + "min":1 + }, + "DescribeLogGroupsRequest":{ + "type":"structure", + "members":{ + "accountIdentifiers":{"shape":"AccountIds"}, + "logGroupNamePrefix":{"shape":"LogGroupName"}, + "logGroupNamePattern":{"shape":"LogGroupNamePattern"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"}, + "includeLinkedAccounts":{"shape":"IncludeLinkedAccounts"}, + "logGroupClass":{"shape":"LogGroupClass"} + } + }, + "DescribeLogGroupsResponse":{ + "type":"structure", + "members":{ + "logGroups":{"shape":"LogGroups"}, + "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"} + } + }, + "DescribeLogStreamsResponse":{ + "type":"structure", + "members":{ + "logStreams":{"shape":"LogStreams"}, + "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"} + } + }, + "DescribeMetricFiltersResponse":{ + "type":"structure", + "members":{ + "metricFilters":{"shape":"MetricFilters"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeQueriesMaxResults":{ + "type":"integer", + "max":1000, + "min":1 + }, + "DescribeQueriesRequest":{ + "type":"structure", + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "status":{"shape":"QueryStatus"}, + "maxResults":{"shape":"DescribeQueriesMaxResults"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeQueriesResponse":{ + "type":"structure", + "members":{ + "queries":{"shape":"QueryInfoList"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeQueryDefinitionsRequest":{ + "type":"structure", + "members":{ + "queryDefinitionNamePrefix":{"shape":"QueryDefinitionName"}, + "maxResults":{"shape":"QueryListMaxResults"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeQueryDefinitionsResponse":{ + "type":"structure", + "members":{ + "queryDefinitions":{"shape":"QueryDefinitionList"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeResourcePoliciesRequest":{ + "type":"structure", + "members":{ + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} + } + }, + "DescribeResourcePoliciesResponse":{ + "type":"structure", + "members":{ + "resourcePolicies":{"shape":"ResourcePolicies"}, + "nextToken":{"shape":"NextToken"} + } + }, + "DescribeSubscriptionFiltersRequest":{ + "type":"structure", + "required":["logGroupName"], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "filterNamePrefix":{"shape":"FilterName"}, + "nextToken":{"shape":"NextToken"}, + "limit":{"shape":"DescribeLimit"} + } + }, + "DescribeSubscriptionFiltersResponse":{ + "type":"structure", + "members":{ + "subscriptionFilters":{"shape":"SubscriptionFilters"}, + "nextToken":{"shape":"NextToken"} + } + }, + "Description":{ + "type":"string", + "min":1 + }, + "Destination":{ + "type":"structure", + "members":{ + "destinationName":{"shape":"DestinationName"}, + "targetArn":{"shape":"TargetArn"}, + "roleArn":{"shape":"RoleArn"}, + "accessPolicy":{"shape":"AccessPolicy"}, + "arn":{"shape":"Arn"}, + "creationTime":{"shape":"Timestamp"} + } + }, + "DestinationArn":{ + "type":"string", + "min":1 + }, + "DestinationName":{ + "type":"string", + "max":512, + "min":1, + "pattern":"[^:*]*" + }, + "Destinations":{ + "type":"list", + "member":{"shape":"Destination"} + }, + "DetectorName":{ + "type":"string", + "min":1 + }, + "Dimensions":{ + "type":"map", + "key":{"shape":"DimensionsKey"}, + "value":{"shape":"DimensionsValue"} + }, + "DimensionsKey":{ + "type":"string", + "max":255 + }, + "DimensionsValue":{ + "type":"string", + "max":255 + }, + "DisassociateKmsKeyRequest":{ + "type":"structure", + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "resourceIdentifier":{"shape":"ResourceIdentifier"} + } + }, + "Distribution":{ + "type":"string", + "enum":[ + "Random", + "ByLogStream" + ] + }, + "DynamicTokenPosition":{"type":"integer"}, + "EncryptionKey":{ + "type":"string", + "max":256 + }, + "Entity":{ + "type":"structure", + "members":{ + "keyAttributes":{"shape":"EntityKeyAttributes"}, + "attributes":{"shape":"EntityAttributes"} + } + }, + "EntityAttributes":{ + "type":"map", + "key":{"shape":"EntityAttributesKey"}, + "value":{"shape":"EntityAttributesValue"}, + "max":10, + "min":0 + }, + "EntityAttributesKey":{ + "type":"string", + "max":256, + "min":1 + }, + "EntityAttributesValue":{ + "type":"string", + "max":512, + "min":1 + }, + "EntityKeyAttributes":{ + "type":"map", + "key":{"shape":"EntityKeyAttributesKey"}, + "value":{"shape":"EntityKeyAttributesValue"}, + "max":3, + "min":2 + }, + "EntityKeyAttributesKey":{ + "type":"string", + "max":32, + "min":1 + }, + "EntityKeyAttributesValue":{ + "type":"string", + "max":512, + "min":1 + }, + "EntityRejectionErrorType":{ + "type":"string", + "enum":[ + "InvalidEntity", + "InvalidTypeValue", + "InvalidKeyAttributes", + "InvalidAttributes", + "EntitySizeTooLarge", + "UnsupportedLogGroupType", + "MissingRequiredFields" + ] + }, + "Enumerations":{ + "type":"map", + "key":{"shape":"TokenString"}, + "value":{"shape":"TokenValue"} + }, + "EpochMillis":{ + "type":"long", + "min":0 + }, + "EvaluationFrequency":{ + "type":"string", + "enum":[ + "ONE_MIN", + "FIVE_MIN", + "TEN_MIN", + "FIFTEEN_MIN", + "THIRTY_MIN", + "ONE_HOUR" + ] + }, + "EventId":{"type":"string"}, + "EventMessage":{ + "type":"string", + "min":1 + }, + "EventNumber":{"type":"long"}, + "EventsLimit":{ + "type":"integer", + "max":10000, + "min":1 + }, + "ExportDestinationBucket":{ + "type":"string", + "max":512, + "min":1 + }, + "ExportDestinationPrefix":{"type":"string"}, + "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"} + } + }, + "ExportTaskExecutionInfo":{ + "type":"structure", + "members":{ + "creationTime":{"shape":"Timestamp"}, + "completionTime":{"shape":"Timestamp"} + } + }, + "ExportTaskId":{ + "type":"string", + "max":512, + "min":1 + }, + "ExportTaskName":{ + "type":"string", + "max":512, + "min":1 + }, + "ExportTaskStatus":{ + "type":"structure", + "members":{ + "code":{"shape":"ExportTaskStatusCode"}, + "message":{"shape":"ExportTaskStatusMessage"} + } + }, + "ExportTaskStatusCode":{ + "type":"string", + "enum":[ + "CANCELLED", + "COMPLETED", + "FAILED", + "PENDING", + "PENDING_CANCEL", + "RUNNING" + ] + }, + "ExportTaskStatusMessage":{"type":"string"}, + "ExportTasks":{ + "type":"list", + "member":{"shape":"ExportTask"} + }, + "ExtractedValues":{ + "type":"map", + "key":{"shape":"Token"}, + "value":{"shape":"Value"} + }, + "Field":{"type":"string"}, + "FieldDelimiter":{ + "type":"string", + "max":5, + "min":0 + }, + "FieldHeader":{ + "type":"string", + "max":64, + "min":1 + }, + "FilterCount":{"type":"integer"}, + "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"}, + "interleaved":{ + "shape":"Interleaved", + "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"} + } + }, + "FilterLogEventsResponse":{ + "type":"structure", + "members":{ + "events":{"shape":"FilteredLogEvents"}, + "searchedLogStreams":{"shape":"SearchedLogStreams"}, + "nextToken":{"shape":"NextToken"} + } + }, + "FilterName":{ + "type":"string", + "max":512, + "min":1, + "pattern":"[^:*]*" + }, + "FilterPattern":{ + "type":"string", + "max":1024, + "min":0 + }, + "FilteredLogEvent":{ + "type":"structure", + "members":{ + "logStreamName":{"shape":"LogStreamName"}, + "timestamp":{"shape":"Timestamp"}, + "message":{"shape":"EventMessage"}, + "ingestionTime":{"shape":"Timestamp"}, + "eventId":{"shape":"EventId"} + } + }, + "FilteredLogEvents":{ + "type":"list", + "member":{"shape":"FilteredLogEvent"} + }, + "ForceUpdate":{"type":"boolean"}, + "GetDataProtectionPolicyRequest":{ + "type":"structure", + "required":["logGroupIdentifier"], + "members":{ + "logGroupIdentifier":{"shape":"LogGroupIdentifier"} + } + }, + "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"} + } + }, + "GetLogAnomalyDetectorRequest":{ + "type":"structure", + "required":["anomalyDetectorArn"], + "members":{ + "anomalyDetectorArn":{"shape":"AnomalyDetectorArn"} + } + }, + "GetLogAnomalyDetectorResponse":{ + "type":"structure", + "members":{ + "detectorName":{"shape":"DetectorName"}, + "logGroupArnList":{"shape":"LogGroupArnList"}, + "evaluationFrequency":{"shape":"EvaluationFrequency"}, + "filterPattern":{"shape":"FilterPattern"}, + "anomalyDetectorStatus":{"shape":"AnomalyDetectorStatus"}, + "kmsKeyId":{"shape":"KmsKeyId"}, + "creationTimeStamp":{"shape":"EpochMillis"}, + "lastModifiedTimeStamp":{"shape":"EpochMillis"}, + "anomalyVisibilityTime":{"shape":"AnomalyVisibilityTime"} + } + }, + "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"} + } + }, + "GetLogEventsResponse":{ + "type":"structure", + "members":{ + "events":{"shape":"OutputLogEvents"}, + "nextForwardToken":{"shape":"NextToken"}, + "nextBackwardToken":{"shape":"NextToken"} + } + }, + "GetLogGroupFieldsRequest":{ + "type":"structure", + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "time":{"shape":"Timestamp"}, + "logGroupIdentifier":{"shape":"LogGroupIdentifier"} + } + }, + "GetLogGroupFieldsResponse":{ + "type":"structure", + "members":{ + "logGroupFields":{"shape":"LogGroupFieldList"} + } + }, + "GetLogRecordRequest":{ + "type":"structure", + "required":["logRecordPointer"], + "members":{ + "logRecordPointer":{"shape":"LogRecordPointer"}, + "unmask":{"shape":"Unmask"} + } + }, + "GetLogRecordResponse":{ + "type":"structure", + "members":{ + "logRecord":{"shape":"LogRecord"} + } + }, + "GetQueryResultsRequest":{ + "type":"structure", + "required":["queryId"], + "members":{ + "queryId":{"shape":"QueryId"} + } + }, + "GetQueryResultsResponse":{ + "type":"structure", + "members":{ + "results":{"shape":"QueryResults"}, + "statistics":{"shape":"QueryStatistics"}, + "status":{"shape":"QueryStatus"}, + "encryptionKey":{"shape":"EncryptionKey"} + } + }, + "Histogram":{ + "type":"map", + "key":{"shape":"Time"}, + "value":{"shape":"Count"} + }, + "IncludeLinkedAccounts":{"type":"boolean"}, + "InheritedProperties":{ + "type":"list", + "member":{"shape":"InheritedProperty"} + }, + "InheritedProperty":{ + "type":"string", + "enum":["ACCOUNT_DATA_PROTECTION"] + }, + "InputLogEvent":{ + "type":"structure", + "required":[ + "timestamp", + "message" + ], + "members":{ + "timestamp":{"shape":"Timestamp"}, + "message":{"shape":"EventMessage"} + } + }, + "InputLogEvents":{ + "type":"list", + "member":{"shape":"InputLogEvent"}, + "max":10000, + "min":1 + }, + "InputLogStreamNames":{ + "type":"list", + "member":{"shape":"LogStreamName"}, + "max":100, + "min":1 + }, + "Integer":{"type":"integer"}, + "Interleaved":{"type":"boolean"}, + "InvalidOperationException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "InvalidParameterException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "InvalidSequenceTokenException":{ + "type":"structure", + "members":{ + "expectedSequenceToken":{"shape":"SequenceToken"} + }, + "exception":true + }, + "IsSampled":{"type":"boolean"}, + "KmsKeyId":{ + "type":"string", + "max":256 + }, + "LimitExceededException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "ListAnomaliesLimit":{ + "type":"integer", + "max":50, + "min":1 + }, + "ListAnomaliesRequest":{ + "type":"structure", + "members":{ + "anomalyDetectorArn":{"shape":"AnomalyDetectorArn"}, + "suppressionState":{"shape":"SuppressionState"}, + "limit":{"shape":"ListAnomaliesLimit"}, + "nextToken":{"shape":"NextToken"} + } + }, + "ListAnomaliesResponse":{ + "type":"structure", + "members":{ + "anomalies":{"shape":"Anomalies"}, + "nextToken":{"shape":"NextToken"} + } + }, + "ListLogAnomalyDetectorsLimit":{ + "type":"integer", + "max":50, + "min":1 + }, + "ListLogAnomalyDetectorsRequest":{ + "type":"structure", + "members":{ + "filterLogGroupArn":{"shape":"LogGroupArn"}, + "limit":{"shape":"ListLogAnomalyDetectorsLimit"}, + "nextToken":{"shape":"NextToken"} + } + }, + "ListLogAnomalyDetectorsResponse":{ + "type":"structure", + "members":{ + "anomalyDetectors":{"shape":"AnomalyDetectors"}, + "nextToken":{"shape":"NextToken"} + } + }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["resourceArn"], + "members":{ + "resourceArn":{"shape":"AmazonResourceName"} + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "members":{ + "tags":{"shape":"Tags"} + } + }, + "ListTagsLogGroupRequest":{ + "type":"structure", + "required":["logGroupName"], + "members":{ + "logGroupName":{"shape":"LogGroupName"} + }, + "deprecated":true, + "deprecatedMessage":"Please use the generic tagging API model ListTagsForResourceRequest and ListTagsForResourceResponse" + }, + "ListTagsLogGroupResponse":{ + "type":"structure", + "members":{ + "tags":{"shape":"Tags"} + }, + "deprecated":true, + "deprecatedMessage":"Please use the generic tagging API model ListTagsForResourceRequest and ListTagsForResourceResponse" + }, + "LiveTailSessionLogEvent":{ + "type":"structure", + "members":{ + "logStreamName":{"shape":"LogStreamName"}, + "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, + "message":{"shape":"EventMessage"}, + "timestamp":{"shape":"Timestamp"}, + "ingestionTime":{"shape":"Timestamp"} + } + }, + "LiveTailSessionMetadata":{ + "type":"structure", + "members":{ + "sampled":{"shape":"IsSampled"} + } + }, + "LiveTailSessionResults":{ + "type":"list", + "member":{"shape":"LiveTailSessionLogEvent"} + }, + "LiveTailSessionStart":{ + "type":"structure", + "members":{ + "requestId":{"shape":"RequestId"}, + "sessionId":{"shape":"SessionId"}, + "logGroupIdentifiers":{"shape":"StartLiveTailLogGroupIdentifiers"}, + "logStreamNames":{"shape":"InputLogStreamNames"}, + "logStreamNamePrefixes":{"shape":"InputLogStreamNames"}, + "logEventFilterPattern":{"shape":"FilterPattern"} + }, + "event":true + }, + "LiveTailSessionUpdate":{ + "type":"structure", + "members":{ + "sessionMetadata":{"shape":"LiveTailSessionMetadata"}, + "sessionResults":{"shape":"LiveTailSessionResults"} + }, + "event":true + }, + "LogEvent":{ + "type":"structure", + "members":{ + "timestamp":{"shape":"Timestamp"}, + "message":{"shape":"EventMessage"} + } + }, + "LogEventIndex":{"type":"integer"}, + "LogGroup":{ + "type":"structure", + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "creationTime":{"shape":"Timestamp"}, + "retentionInDays":{"shape":"Days"}, + "metricFilterCount":{"shape":"FilterCount"}, + "arn":{"shape":"Arn"}, + "storedBytes":{"shape":"StoredBytes"}, + "kmsKeyId":{"shape":"KmsKeyId"}, + "dataProtectionStatus":{"shape":"DataProtectionStatus"}, + "inheritedProperties":{"shape":"InheritedProperties"}, + "logGroupClass":{"shape":"LogGroupClass"}, + "logGroupArn":{"shape":"Arn"} + } + }, + "LogGroupArn":{ + "type":"string", + "max":2048, + "min":1, + "pattern":"[\\w#+=/:,.@-]*" + }, + "LogGroupArnList":{ + "type":"list", + "member":{"shape":"LogGroupArn"} + }, + "LogGroupClass":{ + "type":"string", + "enum":[ + "STANDARD", + "INFREQUENT_ACCESS" + ] + }, + "LogGroupField":{ + "type":"structure", + "members":{ + "name":{"shape":"Field"}, + "percent":{"shape":"Percentage"} + } + }, + "LogGroupFieldList":{ + "type":"list", + "member":{"shape":"LogGroupField"} + }, + "LogGroupIdentifier":{ + "type":"string", + "max":2048, + "min":1, + "pattern":"[\\w#+=/:,.@-]*" + }, + "LogGroupIdentifiers":{ + "type":"list", + "member":{"shape":"LogGroupIdentifier"} + }, + "LogGroupName":{ + "type":"string", + "max":512, + "min":1, + "pattern":"[\\.\\-_/#A-Za-z0-9]+" + }, + "LogGroupNamePattern":{ + "type":"string", + "max":512, + "min":0, + "pattern":"[\\.\\-_/#A-Za-z0-9]*" + }, + "LogGroupNames":{ + "type":"list", + "member":{"shape":"LogGroupName"} + }, + "LogGroups":{ + "type":"list", + "member":{"shape":"LogGroup"} + }, + "LogRecord":{ + "type":"map", + "key":{"shape":"Field"}, + "value":{"shape":"Value"} + }, + "LogRecordPointer":{"type":"string"}, + "LogSamples":{ + "type":"list", + "member":{"shape":"LogEvent"} + }, + "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"}, + "storedBytes":{ + "shape":"StoredBytes", + "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." + } + } + }, + "LogStreamName":{ + "type":"string", + "max":512, + "min":1, + "pattern":"[^:*]*" + }, + "LogStreamSearchedCompletely":{"type":"boolean"}, + "LogStreams":{ + "type":"list", + "member":{"shape":"LogStream"} + }, + "LogType":{ + "type":"string", + "max":255, + "min":1, + "pattern":"[\\w]*" + }, + "LogTypes":{ + "type":"list", + "member":{"shape":"LogType"}, + "max":10, + "min":1 + }, + "MalformedQueryException":{ + "type":"structure", + "members":{ + "queryCompileError":{"shape":"QueryCompileError"} + }, + "exception":true + }, + "Message":{"type":"string"}, + "MetricFilter":{ + "type":"structure", + "members":{ + "filterName":{"shape":"FilterName"}, + "filterPattern":{"shape":"FilterPattern"}, + "metricTransformations":{"shape":"MetricTransformations"}, + "creationTime":{"shape":"Timestamp"}, + "logGroupName":{"shape":"LogGroupName"} + } + }, + "MetricFilterMatchRecord":{ + "type":"structure", + "members":{ + "eventNumber":{"shape":"EventNumber"}, + "eventMessage":{"shape":"EventMessage"}, + "extractedValues":{"shape":"ExtractedValues"} + } + }, + "MetricFilterMatches":{ + "type":"list", + "member":{"shape":"MetricFilterMatchRecord"} + }, + "MetricFilters":{ + "type":"list", + "member":{"shape":"MetricFilter"} + }, + "MetricName":{ + "type":"string", + "max":255, + "pattern":"[^:*$]*" + }, + "MetricNamespace":{ + "type":"string", + "max":255, + "pattern":"[^:*$]*" + }, + "MetricTransformation":{ + "type":"structure", + "required":[ + "metricName", + "metricNamespace", + "metricValue" + ], + "members":{ + "metricName":{"shape":"MetricName"}, + "metricNamespace":{"shape":"MetricNamespace"}, + "metricValue":{"shape":"MetricValue"}, + "defaultValue":{"shape":"DefaultValue"}, + "dimensions":{"shape":"Dimensions"}, + "unit":{"shape":"StandardUnit"} + } + }, + "MetricTransformations":{ + "type":"list", + "member":{"shape":"MetricTransformation"}, + "max":1, + "min":1 + }, + "MetricValue":{ + "type":"string", + "max":100 + }, + "NextToken":{ + "type":"string", + "min":1 + }, + "OperationAbortedException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "OrderBy":{ + "type":"string", + "enum":[ + "LogStreamName", + "LastEventTime" + ] + }, + "OutputFormat":{ + "type":"string", + "enum":[ + "json", + "plain", + "w3c", + "raw", + "parquet" + ] + }, + "OutputFormats":{ + "type":"list", + "member":{"shape":"OutputFormat"} + }, + "OutputLogEvent":{ + "type":"structure", + "members":{ + "timestamp":{"shape":"Timestamp"}, + "message":{"shape":"EventMessage"}, + "ingestionTime":{"shape":"Timestamp"} + } + }, + "OutputLogEvents":{ + "type":"list", + "member":{"shape":"OutputLogEvent"} + }, + "PatternId":{ + "type":"string", + "max":32, + "min":32 + }, + "PatternRegex":{ + "type":"string", + "min":1 + }, + "PatternString":{ + "type":"string", + "min":1 + }, + "PatternToken":{ + "type":"structure", + "members":{ + "dynamicTokenPosition":{"shape":"DynamicTokenPosition"}, + "isDynamic":{"shape":"Boolean"}, + "tokenString":{"shape":"TokenString"}, + "enumerations":{"shape":"Enumerations"} + } + }, + "PatternTokens":{ + "type":"list", + "member":{"shape":"PatternToken"} + }, + "Percentage":{ + "type":"integer", + "max":100, + "min":0 + }, + "Policy":{ + "type":"structure", + "members":{ + "deliveryDestinationPolicy":{"shape":"DeliveryDestinationPolicy"} + } + }, + "PolicyDocument":{ + "type":"string", + "max":5120, + "min":1 + }, + "PolicyName":{"type":"string"}, + "PolicyType":{ + "type":"string", + "enum":[ + "DATA_PROTECTION_POLICY", + "SUBSCRIPTION_FILTER_POLICY" + ] + }, + "Priority":{ + "type":"string", + "min":1 + }, + "PutAccountPolicyRequest":{ + "type":"structure", + "required":[ + "policyName", + "policyDocument", + "policyType" + ], + "members":{ + "policyName":{"shape":"PolicyName"}, + "policyDocument":{"shape":"AccountPolicyDocument"}, + "policyType":{"shape":"PolicyType"}, + "scope":{"shape":"Scope"}, + "selectionCriteria":{"shape":"SelectionCriteria"} + } + }, + "PutAccountPolicyResponse":{ + "type":"structure", + "members":{ + "accountPolicy":{"shape":"AccountPolicy"} + } + }, + "PutDataProtectionPolicyRequest":{ + "type":"structure", + "required":[ + "logGroupIdentifier", + "policyDocument" + ], + "members":{ + "logGroupIdentifier":{"shape":"LogGroupIdentifier"}, + "policyDocument":{"shape":"DataProtectionPolicyDocument"} + } + }, + "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"} + } + }, + "PutDestinationPolicyRequest":{ + "type":"structure", + "required":[ + "destinationName", + "accessPolicy" + ], + "members":{ + "destinationName":{"shape":"DestinationName"}, + "accessPolicy":{"shape":"AccessPolicy"}, + "forceUpdate":{"shape":"ForceUpdate"} + } + }, + "PutDestinationRequest":{ + "type":"structure", + "required":[ + "destinationName", + "targetArn", + "roleArn" + ], + "members":{ + "destinationName":{"shape":"DestinationName"}, + "targetArn":{"shape":"TargetArn"}, + "roleArn":{"shape":"RoleArn"}, + "tags":{"shape":"Tags"} + } + }, + "PutDestinationResponse":{ + "type":"structure", + "members":{ + "destination":{"shape":"Destination"} + } + }, + "PutLogEventsRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "logStreamName", + "logEvents" + ], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "logStreamName":{"shape":"LogStreamName"}, + "logEvents":{"shape":"InputLogEvents"}, + "sequenceToken":{"shape":"SequenceToken"}, + "entity":{"shape":"Entity"} + } + }, + "PutLogEventsResponse":{ + "type":"structure", + "members":{ + "nextSequenceToken":{"shape":"SequenceToken"}, + "rejectedLogEventsInfo":{"shape":"RejectedLogEventsInfo"}, + "rejectedEntityInfo":{"shape":"RejectedEntityInfo"} + } + }, + "PutMetricFilterRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "filterName", + "filterPattern", + "metricTransformations" + ], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "filterName":{"shape":"FilterName"}, + "filterPattern":{"shape":"FilterPattern"}, + "metricTransformations":{"shape":"MetricTransformations"} + } + }, + "PutQueryDefinitionRequest":{ + "type":"structure", + "required":[ + "name", + "queryString" + ], + "members":{ + "name":{"shape":"QueryDefinitionName"}, + "queryDefinitionId":{"shape":"QueryId"}, + "logGroupNames":{"shape":"LogGroupNames"}, + "queryString":{"shape":"QueryDefinitionString"}, + "clientToken":{ + "shape":"ClientToken", + "idempotencyToken":true + } + } + }, + "PutQueryDefinitionResponse":{ + "type":"structure", + "members":{ + "queryDefinitionId":{"shape":"QueryId"} + } + }, + "PutResourcePolicyRequest":{ + "type":"structure", + "members":{ + "policyName":{"shape":"PolicyName"}, + "policyDocument":{"shape":"PolicyDocument"} + } + }, + "PutResourcePolicyResponse":{ + "type":"structure", + "members":{ + "resourcePolicy":{"shape":"ResourcePolicy"} + } + }, + "PutRetentionPolicyRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "retentionInDays" + ], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "retentionInDays":{"shape":"Days"} + } + }, + "PutSubscriptionFilterRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "filterName", + "filterPattern", + "destinationArn" + ], + "members":{ + "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"}, + "message":{"shape":"Message"} + } + }, + "QueryCompileErrorLocation":{ + "type":"structure", + "members":{ + "startCharOffset":{"shape":"QueryCharOffset"}, + "endCharOffset":{"shape":"QueryCharOffset"} + } + }, + "QueryDefinition":{ + "type":"structure", + "members":{ + "queryDefinitionId":{"shape":"QueryId"}, + "name":{"shape":"QueryDefinitionName"}, + "queryString":{"shape":"QueryDefinitionString"}, + "lastModified":{"shape":"Timestamp"}, + "logGroupNames":{"shape":"LogGroupNames"} + } + }, + "QueryDefinitionList":{ + "type":"list", + "member":{"shape":"QueryDefinition"} + }, + "QueryDefinitionName":{ + "type":"string", + "max":255, + "min":1 + }, + "QueryDefinitionString":{ + "type":"string", + "max":10000, + "min":1 + }, + "QueryId":{ + "type":"string", + "max":256, + "min":0 + }, + "QueryInfo":{ + "type":"structure", + "members":{ + "queryId":{"shape":"QueryId"}, + "queryString":{"shape":"QueryString"}, + "status":{"shape":"QueryStatus"}, + "createTime":{"shape":"Timestamp"}, + "logGroupName":{"shape":"LogGroupName"} + } + }, + "QueryInfoList":{ + "type":"list", + "member":{"shape":"QueryInfo"} + }, + "QueryListMaxResults":{ + "type":"integer", + "max":1000, + "min":1 + }, + "QueryResults":{ + "type":"list", + "member":{"shape":"ResultRows"} + }, + "QueryStatistics":{ + "type":"structure", + "members":{ + "recordsMatched":{"shape":"StatsValue"}, + "recordsScanned":{"shape":"StatsValue"}, + "bytesScanned":{"shape":"StatsValue"} + } + }, + "QueryStatus":{ + "type":"string", + "enum":[ + "Scheduled", + "Running", + "Complete", + "Failed", + "Cancelled", + "Timeout", + "Unknown" + ] + }, + "QueryString":{ + "type":"string", + "max":10000, + "min":0 + }, + "RecordField":{ + "type":"structure", + "members":{ + "name":{"shape":"FieldHeader"}, + "mandatory":{"shape":"Boolean"} + } + }, + "RecordFields":{ + "type":"list", + "member":{"shape":"FieldHeader"}, + "max":128, + "min":0 + }, + "RejectedEntityInfo":{ + "type":"structure", + "required":["errorType"], + "members":{ + "errorType":{"shape":"EntityRejectionErrorType"} + } + }, + "RejectedLogEventsInfo":{ + "type":"structure", + "members":{ + "tooNewLogEventStartIndex":{"shape":"LogEventIndex"}, + "tooOldLogEventEndIndex":{"shape":"LogEventIndex"}, + "expiredLogEventEndIndex":{"shape":"LogEventIndex"} + } + }, + "RequestId":{ + "type":"string", + "max":256, + "min":0 + }, + "ResourceAlreadyExistsException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "ResourceArns":{ + "type":"list", + "member":{"shape":"Arn"} + }, + "ResourceIdentifier":{ + "type":"string", + "max":2048, + "min":1, + "pattern":"[\\w+=/:,.@\\-\\*]*" + }, + "ResourceNotFoundException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "ResourcePolicies":{ + "type":"list", + "member":{"shape":"ResourcePolicy"} + }, + "ResourcePolicy":{ + "type":"structure", + "members":{ + "policyName":{"shape":"PolicyName"}, + "policyDocument":{"shape":"PolicyDocument"}, + "lastUpdatedTime":{"shape":"Timestamp"} + } + }, + "ResourceType":{ + "type":"string", + "max":255, + "min":1, + "pattern":"[\\w-_]*" + }, + "ResourceTypes":{ + "type":"list", + "member":{"shape":"ResourceType"}, + "max":10, + "min":1 + }, + "ResultField":{ + "type":"structure", + "members":{ + "field":{"shape":"Field"}, + "value":{"shape":"Value"} + } + }, + "ResultRows":{ + "type":"list", + "member":{"shape":"ResultField"} + }, + "RoleArn":{ + "type":"string", + "min":1 + }, + "S3DeliveryConfiguration":{ + "type":"structure", + "members":{ + "suffixPath":{"shape":"DeliverySuffixPath"}, + "enableHiveCompatiblePath":{ + "shape":"Boolean", + "box":true + } + } + }, + "Scope":{ + "type":"string", + "enum":["ALL"] + }, + "SearchedLogStream":{ + "type":"structure", + "members":{ + "logStreamName":{"shape":"LogStreamName"}, + "searchedCompletely":{"shape":"LogStreamSearchedCompletely"} + } + }, + "SearchedLogStreams":{ + "type":"list", + "member":{"shape":"SearchedLogStream"} + }, + "SelectionCriteria":{"type":"string"}, + "SequenceToken":{ + "type":"string", + "min":1 + }, + "Service":{ + "type":"string", + "max":255, + "min":1, + "pattern":"[\\w_-]*" + }, + "ServiceQuotaExceededException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "ServiceUnavailableException":{ + "type":"structure", + "members":{ + "foo":{"shape":"Value"} // custom + }, + "exception":true, + "fault":true + }, + "SessionId":{ + "type":"string", + "max":256, + "min":0 + }, + "SessionStreamingException":{ + "type":"structure", + "members":{ + "message":{"shape":"Message"} + }, + "exception":true + }, + "SessionTimeoutException":{ + "type":"structure", + "members":{ + "message":{"shape":"Message"} + }, + "exception":true + }, + "StandardUnit":{ + "type":"string", + "enum":[ + "Seconds", + "Microseconds", + "Milliseconds", + "Bytes", + "Kilobytes", + "Megabytes", + "Gigabytes", + "Terabytes", + "Bits", + "Kilobits", + "Megabits", + "Gigabits", + "Terabits", + "Percent", + "Count", + "Bytes/Second", + "Kilobytes/Second", + "Megabytes/Second", + "Gigabytes/Second", + "Terabytes/Second", + "Bits/Second", + "Kilobits/Second", + "Megabits/Second", + "Gigabits/Second", + "Terabits/Second", + "Count/Second", + "None" + ] + }, + "StartFromHead":{"type":"boolean"}, + "StartLiveTailLogGroupIdentifiers":{ + "type":"list", + "member":{"shape":"LogGroupIdentifier"}, + "max":10, + "min":1 + }, + "StartLiveTailRequest":{ + "type":"structure", + "required":["logGroupIdentifiers"], + "members":{ + "logGroupIdentifiers":{"shape":"StartLiveTailLogGroupIdentifiers"}, + "logStreamNames":{"shape":"InputLogStreamNames"}, + "logStreamNamePrefixes":{"shape":"InputLogStreamNames"}, + "logEventFilterPattern":{"shape":"FilterPattern"} + } + }, + "StartLiveTailResponse":{ + "type":"structure", + "members":{ + "responseStream":{"shape":"StartLiveTailResponseStream"} + } + }, + "StartLiveTailResponseStream":{ + "type":"structure", + "members":{ + "sessionStart":{"shape":"LiveTailSessionStart"}, + "sessionUpdate":{"shape":"LiveTailSessionUpdate"}, + "SessionTimeoutException":{"shape":"SessionTimeoutException"}, + "SessionStreamingException":{"shape":"SessionStreamingException"} + }, + "eventstream":true + }, + "StartQueryRequest":{ + "type":"structure", + "required":[ + "startTime", + "endTime", + "queryString" + ], + "members":{ + "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"} + } + }, + "State":{ + "type":"string", + "enum":[ + "Active", + "Suppressed", + "Baseline" + ] + }, + "StatsValue":{"type":"double"}, + "StopQueryRequest":{ + "type":"structure", + "required":["queryId"], + "members":{ + "queryId":{"shape":"QueryId"} + } + }, + "StopQueryResponse":{ + "type":"structure", + "members":{ + "success":{"shape":"Success"} + } + }, + "StoredBytes":{ + "type":"long", + "min":0 + }, + "SubscriptionFilter":{ + "type":"structure", + "members":{ + "filterName":{"shape":"FilterName"}, + "logGroupName":{"shape":"LogGroupName"}, + "filterPattern":{"shape":"FilterPattern"}, + "destinationArn":{"shape":"DestinationArn"}, + "roleArn":{"shape":"RoleArn"}, + "distribution":{"shape":"Distribution"}, + "creationTime":{"shape":"Timestamp"} + } + }, + "SubscriptionFilters":{ + "type":"list", + "member":{"shape":"SubscriptionFilter"} + }, + "Success":{"type":"boolean"}, + "SuppressionPeriod":{ + "type":"structure", + "members":{ + "value":{"shape":"Integer"}, + "suppressionUnit":{"shape":"SuppressionUnit"} + } + }, + "SuppressionState":{ + "type":"string", + "enum":[ + "SUPPRESSED", + "UNSUPPRESSED" + ] + }, + "SuppressionType":{ + "type":"string", + "enum":[ + "LIMITED", + "INFINITE" + ] + }, + "SuppressionUnit":{ + "type":"string", + "enum":[ + "SECONDS", + "MINUTES", + "HOURS" + ] + }, + "TagKey":{ + "type":"string", + "max":128, + "min":1, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]+)$" + }, + "TagKeyList":{ + "type":"list", + "member":{"shape":"TagKey"}, + "max":50, + "min":0 + }, + "TagList":{ + "type":"list", + "member":{"shape":"TagKey"}, + "min":1 + }, + "TagLogGroupRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "tags" + ], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "tags":{"shape":"Tags"} + }, + "deprecated":true, + "deprecatedMessage":"Please use the generic tagging API model TagResourceRequest" + }, + "TagResourceRequest":{ + "type":"structure", + "required":[ + "resourceArn", + "tags" + ], + "members":{ + "resourceArn":{"shape":"AmazonResourceName"}, + "tags":{"shape":"Tags"} + } + }, + "TagValue":{ + "type":"string", + "max":256, + "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + }, + "Tags":{ + "type":"map", + "key":{"shape":"TagKey"}, + "value":{"shape":"TagValue"}, + "max":50, + "min":1 + }, + "TargetArn":{ + "type":"string", + "min":1 + }, + "TestEventMessages":{ + "type":"list", + "member":{"shape":"EventMessage"}, + "max":50, + "min":1 + }, + "TestMetricFilterRequest":{ + "type":"structure", + "required":[ + "filterPattern", + "logEventMessages" + ], + "members":{ + "filterPattern":{"shape":"FilterPattern"}, + "logEventMessages":{"shape":"TestEventMessages"} + } + }, + "TestMetricFilterResponse":{ + "type":"structure", + "members":{ + "matches":{"shape":"MetricFilterMatches"} + } + }, + "ThrottlingException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "Time":{ + "type":"string", + "min":1 + }, + "Timestamp":{ + "type":"long", + "min":0 + }, + "Token":{"type":"string"}, + "TokenString":{ + "type":"string", + "min":1 + }, + "TokenValue":{"type":"long"}, + "TooManyTagsException":{ + "type":"structure", + "members":{ + "message":{"shape":"Message"}, + "resourceName":{"shape":"AmazonResourceName"} + }, + "exception":true + }, + "Unmask":{"type":"boolean"}, + "UnrecognizedClientException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "UntagLogGroupRequest":{ + "type":"structure", + "required":[ + "logGroupName", + "tags" + ], + "members":{ + "logGroupName":{"shape":"LogGroupName"}, + "tags":{"shape":"TagList"} + }, + "deprecated":true, + "deprecatedMessage":"Please use the generic tagging API model UntagResourceRequest" + }, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "resourceArn", + "tagKeys" + ], + "members":{ + "resourceArn":{"shape":"AmazonResourceName"}, + "tagKeys":{"shape":"TagKeyList"} + } + }, + "UpdateAnomalyRequest":{ + "type":"structure", + "required":["anomalyDetectorArn"], + "members":{ + "anomalyId":{"shape":"AnomalyId"}, + "patternId":{"shape":"PatternId"}, + "anomalyDetectorArn":{"shape":"AnomalyDetectorArn"}, + "suppressionType":{"shape":"SuppressionType"}, + "suppressionPeriod":{"shape":"SuppressionPeriod"} + } + }, + "UpdateDeliveryConfigurationRequest":{ + "type":"structure", + "required":["id"], + "members":{ + "id":{"shape":"DeliveryId"}, + "recordFields":{"shape":"RecordFields"}, + "fieldDelimiter":{"shape":"FieldDelimiter"}, + "s3DeliveryConfiguration":{"shape":"S3DeliveryConfiguration"} + } + }, + "UpdateDeliveryConfigurationResponse":{ + "type":"structure", + "members":{ + } + }, + "UpdateLogAnomalyDetectorRequest":{ + "type":"structure", + "required":[ + "anomalyDetectorArn", + "enabled" + ], + "members":{ + "anomalyDetectorArn":{"shape":"AnomalyDetectorArn"}, + "evaluationFrequency":{"shape":"EvaluationFrequency"}, + "filterPattern":{"shape":"FilterPattern"}, + "anomalyVisibilityTime":{"shape":"AnomalyVisibilityTime"}, + "enabled":{"shape":"Boolean"} + } + }, + "ValidationException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "Value":{"type":"string"} + } +}