Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the EventData class.
 /// </summary>
 /// <param name="channels">the event channels. The regular event logs,
 /// that you see in the Azure Management Portals, flow through the
 /// 'Operation' channel. Possible values include: 'Admin', 'Operation',
 /// 'Debug', 'Analytics'</param>
 /// <param name="level">the event level. Possible values include:
 /// 'Critical', 'Error', 'Warning', 'Informational', 'Verbose'</param>
 /// <param name="eventTimestamp">the timestamp of when the event was
 /// generated by the Azure service processing the request corresponding
 /// the event. It in ISO 8601 format.</param>
 /// <param name="submissionTimestamp">the timestamp of when the event
 /// became available for querying via this API. It is in ISO 8601
 /// format. This value should not be confused eventTimestamp. As there
 /// might be a delay between the occurence time of the event, and the
 /// time that the event is submitted to the Azure logging
 /// infrastructure.</param>
 /// <param name="authorization">the authorization used by the user who
 /// has performed the operation that led to this event. This captures
 /// the RBAC properties of the event. These usually include the
 /// 'action', 'role' and the 'scope'</param>
 /// <param name="claims">key value pairs to identify ARM
 /// permissions.</param>
 /// <param name="caller">the email address of the user who has
 /// performed the operation, the UPN claim or SPN claim based on
 /// availability.</param>
 /// <param name="description">the description of the event.</param>
 /// <param name="id">the Id of this event as required by ARM for RBAC.
 /// It contains the EventDataID and a timestamp information.</param>
 /// <param name="eventDataId">the event data Id. This is a unique
 /// identifier for an event.</param>
 /// <param name="correlationId">the correlation Id, usually a GUID in
 /// the string format. The correlation Id is shared among the events
 /// that belong to the same uber operation.</param>
 /// <param name="eventName">the event name. This value should not be
 /// confused with OperationName. For practical purposes, OperationName
 /// might be more appealing to end users.</param>
 /// <param name="category">the event category.</param>
 /// <param name="httpRequest">the HTTP request info. Usually includes
 /// the 'clientRequestId', 'clientIpAddress' (IP address of the user
 /// who initiated the event) and 'method' (HTTP method e.g.
 /// PUT).</param>
 /// <param name="resourceGroupName">the resource group name of the
 /// impacted resource.</param>
 /// <param name="resourceProviderName">the resource provider name of
 /// the impacted resource.</param>
 /// <param name="resourceId">the resource uri that uniquely identifies
 /// the resource that caused this event.</param>
 /// <param name="resourceType">the resource type</param>
 /// <param name="operationId">It is usually a GUID shared among the
 /// events corresponding to single operation. This value should not be
 /// confused with EventName.</param>
 /// <param name="operationName">the operation name.</param>
 /// <param name="properties">the set of &lt;Key, Value&gt; pairs
 /// (usually a Dictionary&lt;String, String&gt;) that includes details
 /// about the event.</param>
 /// <param name="status">a string describing the status of the
 /// operation. Some typical values are: Started, In progress,
 /// Succeeded, Failed, Resolved.</param>
 /// <param name="subStatus">the event sub status. Most of the time,
 /// when included, this captures the HTTP status code of the REST call.
 /// Common values are: OK (HTTP Status Code: 200), Created (HTTP Status
 /// Code: 201), Accepted (HTTP Status Code: 202), No Content (HTTP
 /// Status Code: 204), Bad Request(HTTP Status Code: 400), Not Found
 /// (HTTP Status Code: 404), Conflict (HTTP Status Code: 409), Internal
 /// Server Error (HTTP Status Code: 500), Service Unavailable (HTTP
 /// Status Code:503), Gateway Timeout (HTTP Status Code: 504)</param>
 /// <param name="subscriptionId">the Azure subscription Id usually a
 /// GUID.</param>
 /// <param name="tenantId">the Azure tenant Id</param>
 public EventData(EventChannels channels, EventLevel level, System.DateTime eventTimestamp, System.DateTime submissionTimestamp, SenderAuthorization authorization = default(SenderAuthorization), System.Collections.Generic.IDictionary <string, string> claims = default(System.Collections.Generic.IDictionary <string, string>), string caller = default(string), string description = default(string), string id = default(string), string eventDataId = default(string), string correlationId = default(string), LocalizableString eventName = default(LocalizableString), LocalizableString category = default(LocalizableString), HttpRequestInfo httpRequest = default(HttpRequestInfo), string resourceGroupName = default(string), LocalizableString resourceProviderName = default(LocalizableString), string resourceId = default(string), LocalizableString resourceType = default(LocalizableString), string operationId = default(string), LocalizableString operationName = default(LocalizableString), System.Collections.Generic.IDictionary <string, string> properties = default(System.Collections.Generic.IDictionary <string, string>), LocalizableString status = default(LocalizableString), LocalizableString subStatus = default(LocalizableString), string subscriptionId = default(string), string tenantId = default(string))
 {
     Authorization        = authorization;
     Channels             = channels;
     Claims               = claims;
     Caller               = caller;
     Description          = description;
     Id                   = id;
     EventDataId          = eventDataId;
     CorrelationId        = correlationId;
     EventName            = eventName;
     Category             = category;
     HttpRequest          = httpRequest;
     Level                = level;
     ResourceGroupName    = resourceGroupName;
     ResourceProviderName = resourceProviderName;
     ResourceId           = resourceId;
     ResourceType         = resourceType;
     OperationId          = operationId;
     OperationName        = operationName;
     Properties           = properties;
     Status               = status;
     SubStatus            = subStatus;
     EventTimestamp       = eventTimestamp;
     SubmissionTimestamp  = submissionTimestamp;
     SubscriptionId       = subscriptionId;
     TenantId             = tenantId;
 }
 private static void AreEqual(SenderAuthorization exp, SenderAuthorization act)
 {
     if (exp != null)
     {
         Assert.Equal(exp.Action, act.Action);
         Assert.Equal(exp.Condition, act.Condition);
         Assert.Equal(exp.Role, act.Role);
         Assert.Equal(exp.Scope, act.Scope);
     }
 }