/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
namespace Amazon.Runtime.Internal
{
///
/// Class that captures the CSM Api Call Attempt Monitoring Events
/// for each http request and its subsequent response.
///
public class MonitoringAPICallAttempt : MonitoringAPICall
{
public MonitoringAPICallAttempt(IRequestContext requestContext)
:base(requestContext)
{
Type = CSMType.ApiCallAttempt.ToString();
}
///
/// Contains the fully-qualified domain name of the endpoint that
/// the request attempt was submitted to.
///
public string Fqdn { get; internal set; }
///
/// Contains the session token passed
/// in the x-amz-security-token header.
///
public string SessionToken { get; internal set; }
///
/// Contains the aws_access_key value that
/// was used to sign the http request.
///
public string AccessKey { get; internal set; }
///
/// Contains the attempt's response status code,
/// as returned by the http client.
///
public int? HttpStatusCode { get; internal set; } = null;
///
/// Contains the full text (exception object converted to String,
/// for example) for any attempt-level failure that is due to
/// something other than an Aws exception. The value of this entry
/// has a maximum length of 512.
///
public string SdkExceptionMessage { get; internal set; }
///
/// Contains the short error name (exception class name, for example)
/// for any attempt-level failure that is due to something other
/// than an Aws exception.The value of this entry has a maximum length of 128.
///
public string SdkException { get; internal set; }
///
/// Contains the Aws exception code returned in the response.
///
public string AWSException { get; internal set; }
///
/// Contains the full text of the Aws exception message.
///
public string AWSExceptionMessage { get; internal set; }
///
/// Contains the value of the response's x-amzn-RequestId header.
///
public string XAmznRequestId { get; internal set; }
///
/// Contains the value of the response's x-amz-request-id header.
///
public string XAmzRequestId { get; internal set; }
///
/// Contains the value of the response's x-amz-id-2 header.
///
public string XAmzId2 { get; internal set; }
///
/// Contains the elapsed time, in milliseconds,
/// between the construction of the http request and the
/// point in time where the http response has been parsed
/// or the attempt has definitively failed.
///
public long AttemptLatency { get; internal set; }
}
}