Class: Aws::ClientSideMonitoring::RequestMetrics::ApiCall Private
- Inherits:
-
Object
- Object
- Aws::ClientSideMonitoring::RequestMetrics::ApiCall
- Defined in:
- lib/aws-sdk-core/client_side_monitoring/request_metrics.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #api ⇒ Object readonly private
- #attempt_count ⇒ Object readonly private
- #client_id ⇒ Object readonly private
- #final_aws_exception ⇒ Object readonly private
- #final_aws_exception_message ⇒ Object readonly private
- #final_http_status_code ⇒ Object readonly private
- #final_sdk_exception ⇒ Object readonly private
- #final_sdk_exception_message ⇒ Object readonly private
- #latency ⇒ Object readonly private
- #max_retries_exceeded ⇒ Object readonly private
- #region ⇒ Object readonly private
- #service ⇒ Object readonly private
- #timestamp ⇒ Object readonly private
- #user_agent ⇒ Object readonly private
- #version ⇒ Object readonly private
Instance Method Summary collapse
- #complete(opts = {}) ⇒ Object private
-
#initialize(service, api, client_id, version, timestamp, region) ⇒ ApiCall
constructor
private
A new instance of ApiCall.
- #to_json(*a) ⇒ Object private
Constructor Details
#initialize(service, api, client_id, version, timestamp, region) ⇒ ApiCall
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ApiCall.
65 66 67 68 69 70 71 72 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 65 def initialize(service, api, client_id, version, , region) @service = service @api = api @client_id = client_id @version = version @timestamp = @region = region end |
Instance Attribute Details
#api ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def api @api end |
#attempt_count ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def attempt_count @attempt_count end |
#client_id ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def client_id @client_id end |
#final_aws_exception ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def final_aws_exception @final_aws_exception end |
#final_aws_exception_message ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def @final_aws_exception_message end |
#final_http_status_code ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def final_http_status_code @final_http_status_code end |
#final_sdk_exception ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def final_sdk_exception @final_sdk_exception end |
#final_sdk_exception_message ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def @final_sdk_exception_message end |
#latency ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def latency @latency end |
#max_retries_exceeded ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def max_retries_exceeded @max_retries_exceeded end |
#region ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def region @region end |
#service ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def service @service end |
#timestamp ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def @timestamp end |
#user_agent ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def user_agent @user_agent end |
#version ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
59 60 61 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 59 def version @version end |
Instance Method Details
#complete(opts = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 74 def complete(opts = {}) @latency = opts[:latency] @attempt_count = opts[:attempt_count] @user_agent = opts[:user_agent] if opts[:final_error_retryable] @max_retries_exceeded = 1 else @max_retries_exceeded = 0 end @final_http_status_code = opts[:final_http_status_code] @final_aws_exception = opts[:final_aws_exception] @final_aws_exception_message = opts[:final_aws_exception_message] @final_sdk_exception = opts[:final_sdk_exception] @final_sdk_exception_message = opts[:final_sdk_exception_message] @region = opts[:region] if opts[:region] # in case region changes end |
#to_json(*a) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/aws-sdk-core/client_side_monitoring/request_metrics.rb', line 91 def to_json(*a) document = { "Type" => "ApiCall", "Service" => @service, "Api" => @api, "ClientId" => @client_id, "Timestamp" => @timestamp, "Version" => @version, "AttemptCount" => @attempt_count, "Latency" => @latency, "Region" => @region, "MaxRetriesExceeded" => @max_retries_exceeded, "UserAgent" => @user_agent, "FinalHttpStatusCode" => @final_http_status_code, } document["FinalSdkException"] = @final_sdk_exception if @final_sdk_exception document["FinalSdkExceptionMessage"] = @final_sdk_exception_message if @final_sdk_exception_message document["FinalAwsException"] = @final_aws_exception if @final_aws_exception document["FinalAwsExceptionMessage"] = @final_aws_exception_message if @final_aws_exception_message document = _truncate(document) document.to_json end |