const ( // DefaultBaseURI is the default URI used for the service Activitylogs DefaultBaseURI = "https://management.azure.com" )
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
ActionGroupForActivityLogAlerts a pointer to an Azure Action Group.
type ActionGroupForActivityLogAlerts struct { // ActionGroupID - The resource ID of the Action Group. This cannot be null or empty. ActionGroupID *string `json:"actionGroupId,omitempty"` // WebhookProperties - the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload. WebhookProperties map[string]*string `json:"webhookProperties"` }
func (agfala ActionGroupForActivityLogAlerts) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ActionGroupForActivityLogAlerts.
ActionList a list of Activity Log Alert rule actions.
type ActionList struct { // ActionGroups - The list of the Action Groups. ActionGroups *[]ActionGroupForActivityLogAlerts `json:"actionGroups,omitempty"` }
AlertResource an Activity Log Alert rule resource.
type AlertResource struct { autorest.Response `json:"-"` // AlertRuleProperties - The Activity Log Alert rule properties of the resource. *AlertRuleProperties `json:"properties,omitempty"` // ID - READ-ONLY; Azure resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Azure resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` }
func (ar AlertResource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertResource.
func (ar *AlertResource) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertResource struct.
AlertRuleAllOfCondition an Activity Log Alert rule condition that is met when all its member conditions are met.
type AlertRuleAllOfCondition struct { // AllOf - The list of Activity Log Alert rule conditions. AllOf *[]AlertRuleAnyOfOrLeafCondition `json:"allOf,omitempty"` }
AlertRuleAnyOfOrLeafCondition an Activity Log Alert rule condition that is met when all its member conditions are met. Each condition can be of one of the following types: __Important__: Each type has its unique subset of properties. Properties from different types CANNOT exist in one condition. * __Leaf Condition -__ must contain 'field' and either 'equals' or 'containsAny'. _Please note, 'anyOf' should __not__ be set in a Leaf Condition._ * __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array of Leaf Conditions). _Please note, 'field', 'equals' and 'containsAny' should __not__ be set in an AnyOf Condition._
type AlertRuleAnyOfOrLeafCondition struct { // AnyOf - An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met. AnyOf *[]AlertRuleLeafCondition `json:"anyOf,omitempty"` // Field - The name of the Activity Log event's field that this condition will examine. // The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'. Field *string `json:"field,omitempty"` // Equals - The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. Equals *string `json:"equals,omitempty"` // ContainsAny - The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met. ContainsAny *[]string `json:"containsAny,omitempty"` }
AlertRuleLeafCondition an Activity Log Alert rule condition that is met by comparing the field and value of an Activity Log event. This condition must contain 'field' and either 'equals' or 'containsAny'.
type AlertRuleLeafCondition struct { // Field - The name of the Activity Log event's field that this condition will examine. // The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'. Field *string `json:"field,omitempty"` // Equals - The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. Equals *string `json:"equals,omitempty"` // ContainsAny - The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met. ContainsAny *[]string `json:"containsAny,omitempty"` }
AlertRuleList a list of Activity Log Alert rules.
type AlertRuleList struct { autorest.Response `json:"-"` // Value - The list of Activity Log Alert rules. Value *[]AlertResource `json:"value,omitempty"` // NextLink - Provides the link to retrieve the next set of elements. NextLink *string `json:"nextLink,omitempty"` }
func (arl AlertRuleList) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
AlertRuleListIterator provides access to a complete listing of AlertResource values.
type AlertRuleListIterator struct {
// contains filtered or unexported fields
}
func NewAlertRuleListIterator(page AlertRuleListPage) AlertRuleListIterator
Creates a new instance of the AlertRuleListIterator type.
func (iter *AlertRuleListIterator) Next() error
Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.
func (iter *AlertRuleListIterator) NextWithContext(ctx context.Context) (err error)
NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.
func (iter AlertRuleListIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AlertRuleListIterator) Response() AlertRuleList
Response returns the raw server response from the last page request.
func (iter AlertRuleListIterator) Value() AlertResource
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
AlertRuleListPage contains a page of AlertResource values.
type AlertRuleListPage struct {
// contains filtered or unexported fields
}
func NewAlertRuleListPage(cur AlertRuleList, getNextPage func(context.Context, AlertRuleList) (AlertRuleList, error)) AlertRuleListPage
Creates a new instance of the AlertRuleListPage type.
func (page *AlertRuleListPage) Next() error
Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.
func (page *AlertRuleListPage) NextWithContext(ctx context.Context) (err error)
NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.
func (page AlertRuleListPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AlertRuleListPage) Response() AlertRuleList
Response returns the raw server response from the last page request.
func (page AlertRuleListPage) Values() []AlertResource
Values returns the slice of values for the current page or nil if there are no values.
AlertRulePatchObject an Activity Log Alert rule object for the body of patch operations.
type AlertRulePatchObject struct { // Tags - The resource tags Tags map[string]*string `json:"tags"` // AlertRulePatchProperties - The activity log alert settings for an update operation. *AlertRulePatchProperties `json:"properties,omitempty"` }
func (arpo AlertRulePatchObject) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertRulePatchObject.
func (arpo *AlertRulePatchObject) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertRulePatchObject struct.
AlertRulePatchProperties an Activity Log Alert rule properties for patch operations.
type AlertRulePatchProperties struct { // Enabled - Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated. Enabled *bool `json:"enabled,omitempty"` }
AlertRuleProperties an Azure Activity Log Alert rule.
type AlertRuleProperties struct { // Scopes - A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item. Scopes *[]string `json:"scopes,omitempty"` // Condition - The condition that will cause this alert to activate. Condition *AlertRuleAllOfCondition `json:"condition,omitempty"` // Actions - The actions that will activate when the condition is met. Actions *ActionList `json:"actions,omitempty"` // Enabled - Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated. Enabled *bool `json:"enabled,omitempty"` // Description - A description of this Activity Log Alert rule. Description *string `json:"description,omitempty"` }
AlertsClient is the monitor Management Client
type AlertsClient struct { BaseClient }
func NewAlertsClient(subscriptionID string) AlertsClient
NewAlertsClient creates an instance of the AlertsClient client.
func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsClient
NewAlertsClientWithBaseURI creates an instance of the AlertsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func (client AlertsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRule AlertResource) (result AlertResource, err error)
CreateOrUpdate create a new Activity Log Alert rule or update an existing one. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. activityLogAlertName - the name of the Activity Log Alert rule. activityLogAlertRule - the Activity Log Alert rule to create or use for the update.
func (client AlertsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRule AlertResource) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client AlertsClient) CreateOrUpdateResponder(resp *http.Response) (result AlertResource, err error)
CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.
func (client AlertsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)
CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.
func (client AlertsClient) Delete(ctx context.Context, resourceGroupName string, activityLogAlertName string) (result autorest.Response, err error)
Delete delete an Activity Log Alert rule. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. activityLogAlertName - the name of the Activity Log Alert rule.
func (client AlertsClient) DeletePreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
func (client AlertsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.
func (client AlertsClient) DeleteSender(req *http.Request) (*http.Response, error)
DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.
func (client AlertsClient) Get(ctx context.Context, resourceGroupName string, activityLogAlertName string) (result AlertResource, err error)
Get get an Activity Log Alert rule. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. activityLogAlertName - the name of the Activity Log Alert rule.
func (client AlertsClient) GetPreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client AlertsClient) GetResponder(resp *http.Response) (result AlertResource, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client AlertsClient) GetSender(req *http.Request) (*http.Response, error)
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (client AlertsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AlertRuleListPage, err error)
ListByResourceGroup get a list of all Activity Log Alert rules in a resource group. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive.
func (client AlertsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result AlertRuleListIterator, err error)
ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client AlertsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)
ListByResourceGroupPreparer prepares the ListByResourceGroup request.
func (client AlertsClient) ListByResourceGroupResponder(resp *http.Response) (result AlertRuleList, err error)
ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.
func (client AlertsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error)
ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the http.Response Body if it receives an error.
func (client AlertsClient) ListBySubscriptionID(ctx context.Context) (result AlertRuleListPage, err error)
ListBySubscriptionID get a list of all Activity Log Alert rules in a subscription.
func (client AlertsClient) ListBySubscriptionIDComplete(ctx context.Context) (result AlertRuleListIterator, err error)
ListBySubscriptionIDComplete enumerates all values, automatically crossing page boundaries as required.
func (client AlertsClient) ListBySubscriptionIDPreparer(ctx context.Context) (*http.Request, error)
ListBySubscriptionIDPreparer prepares the ListBySubscriptionID request.
func (client AlertsClient) ListBySubscriptionIDResponder(resp *http.Response) (result AlertRuleList, err error)
ListBySubscriptionIDResponder handles the response to the ListBySubscriptionID request. The method always closes the http.Response Body.
func (client AlertsClient) ListBySubscriptionIDSender(req *http.Request) (*http.Response, error)
ListBySubscriptionIDSender sends the ListBySubscriptionID request. The method will close the http.Response Body if it receives an error.
func (client AlertsClient) Update(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRulePatch AlertRulePatchObject) (result AlertResource, err error)
Update updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. activityLogAlertName - the name of the Activity Log Alert rule. activityLogAlertRulePatch - parameters supplied to the operation.
func (client AlertsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRulePatch AlertRulePatchObject) (*http.Request, error)
UpdatePreparer prepares the Update request.
func (client AlertsClient) UpdateResponder(resp *http.Response) (result AlertResource, err error)
UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.
func (client AlertsClient) UpdateSender(req *http.Request) (*http.Response, error)
UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.
AzureResource an azure resource object
type AzureResource struct { // ID - READ-ONLY; Azure resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Azure resource name Name *string `json:"name,omitempty"` // Type - READ-ONLY; Azure resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` // Tags - Resource tags Tags map[string]*string `json:"tags"` }
func (ar AzureResource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AzureResource.
BaseClient is the base client for Activitylogs.
type BaseClient struct { autorest.Client BaseURI string SubscriptionID string }
func New(subscriptionID string) BaseClient
New creates an instance of the BaseClient client.
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient
NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
Client is the monitor Management Client
type Client struct { BaseClient }
func NewClient(subscriptionID string) Client
NewClient creates an instance of the Client client.
func NewClientWithBaseURI(baseURI string, subscriptionID string) Client
NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func (client Client) List(ctx context.Context, filter string, selectParameter string) (result EventDataCollectionPage, err error)
List provides the list of records from the activity logs. Parameters: filter - reduces the set of data collected.<br>This argument is required and it also requires at least the start date/time.<br>The **$filter** argument is very restricted and allows only the following patterns.<br>- *List events for a resource group*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq 'resourceGroupName'.<br>- *List events for resource*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.<br>- *List events for a subscription in a time range*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.<br>- *List events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq 'resourceProviderName'.<br>- *List events for a correlation Id*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and correlationId eq 'correlationID'.<br><br>**NOTE**: No other syntax is allowed. selectParameter - used to fetch events with only the given properties.<br>The **$select** argument is a comma separated list of property names to be returned. Possible values are: *authorization*, *claims*, *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, *subStatus*, *subscriptionId*
func (client Client) ListComplete(ctx context.Context, filter string, selectParameter string) (result EventDataCollectionIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client Client) ListPreparer(ctx context.Context, filter string, selectParameter string) (*http.Request, error)
ListPreparer prepares the List request.
func (client Client) ListResponder(resp *http.Response) (result EventDataCollection, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (client Client) ListSender(req *http.Request) (*http.Response, error)
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
ErrorResponse describes the format of Error response.
type ErrorResponse struct { // Code - Error code Code *string `json:"code,omitempty"` // Message - Error message indicating why the operation failed. Message *string `json:"message,omitempty"` }
EventData the Azure event log entries are of type EventData
type EventData struct { // Authorization - READ-ONLY; The sender authorization information. Authorization *SenderAuthorization `json:"authorization,omitempty"` // Claims - READ-ONLY; key value pairs to identify ARM permissions. Claims map[string]*string `json:"claims"` // Caller - READ-ONLY; the email address of the user who has performed the operation, the UPN claim or SPN claim based on availability. Caller *string `json:"caller,omitempty"` // Description - READ-ONLY; the description of the event. Description *string `json:"description,omitempty"` // ID - READ-ONLY; the Id of this event as required by ARM for RBAC. It contains the EventDataID and a timestamp information. ID *string `json:"id,omitempty"` // EventDataID - READ-ONLY; the event data Id. This is a unique identifier for an event. EventDataID *string `json:"eventDataId,omitempty"` // CorrelationID - READ-ONLY; 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. CorrelationID *string `json:"correlationId,omitempty"` // EventName - READ-ONLY; the event name. This value should not be confused with OperationName. For practical purposes, OperationName might be more appealing to end users. EventName *LocalizableString `json:"eventName,omitempty"` // Category - READ-ONLY; the event category. Category *LocalizableString `json:"category,omitempty"` // HTTPRequest - READ-ONLY; 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). HTTPRequest *HTTPRequestInfo `json:"httpRequest,omitempty"` // Level - READ-ONLY; the event level. Possible values include: 'EventLevelCritical', 'EventLevelError', 'EventLevelWarning', 'EventLevelInformational', 'EventLevelVerbose' Level EventLevel `json:"level,omitempty"` // ResourceGroupName - READ-ONLY; the resource group name of the impacted resource. ResourceGroupName *string `json:"resourceGroupName,omitempty"` // ResourceProviderName - READ-ONLY; the resource provider name of the impacted resource. ResourceProviderName *LocalizableString `json:"resourceProviderName,omitempty"` // ResourceID - READ-ONLY; the resource uri that uniquely identifies the resource that caused this event. ResourceID *string `json:"resourceId,omitempty"` // ResourceType - READ-ONLY; the resource type ResourceType *LocalizableString `json:"resourceType,omitempty"` // OperationID - READ-ONLY; It is usually a GUID shared among the events corresponding to single operation. This value should not be confused with EventName. OperationID *string `json:"operationId,omitempty"` // OperationName - READ-ONLY; the operation name. OperationName *LocalizableString `json:"operationName,omitempty"` // Properties - READ-ONLY; the set of <Key, Value> pairs (usually a Dictionary<String, String>) that includes details about the event. Properties map[string]*string `json:"properties"` // Status - READ-ONLY; a string describing the status of the operation. Some typical values are: Started, In progress, Succeeded, Failed, Resolved. Status *LocalizableString `json:"status,omitempty"` // SubStatus - READ-ONLY; 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) SubStatus *LocalizableString `json:"subStatus,omitempty"` // EventTimestamp - READ-ONLY; the timestamp of when the event was generated by the Azure service processing the request corresponding the event. It in ISO 8601 format. EventTimestamp *date.Time `json:"eventTimestamp,omitempty"` // SubmissionTimestamp - READ-ONLY; 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 occurrence time of the event, and the time that the event is submitted to the Azure logging infrastructure. SubmissionTimestamp *date.Time `json:"submissionTimestamp,omitempty"` // SubscriptionID - READ-ONLY; the Azure subscription Id usually a GUID. SubscriptionID *string `json:"subscriptionId,omitempty"` // TenantID - READ-ONLY; the Azure tenant Id TenantID *string `json:"tenantId,omitempty"` }
func (ed EventData) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for EventData.
EventDataCollection represents collection of events.
type EventDataCollection struct { autorest.Response `json:"-"` // Value - this list that includes the Azure audit logs. Value *[]EventData `json:"value,omitempty"` // NextLink - Provides the link to retrieve the next set of events. NextLink *string `json:"nextLink,omitempty"` }
func (edc EventDataCollection) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
EventDataCollectionIterator provides access to a complete listing of EventData values.
type EventDataCollectionIterator struct {
// contains filtered or unexported fields
}
func NewEventDataCollectionIterator(page EventDataCollectionPage) EventDataCollectionIterator
Creates a new instance of the EventDataCollectionIterator type.
func (iter *EventDataCollectionIterator) Next() error
Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.
func (iter *EventDataCollectionIterator) NextWithContext(ctx context.Context) (err error)
NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.
func (iter EventDataCollectionIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EventDataCollectionIterator) Response() EventDataCollection
Response returns the raw server response from the last page request.
func (iter EventDataCollectionIterator) Value() EventData
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
EventDataCollectionPage contains a page of EventData values.
type EventDataCollectionPage struct {
// contains filtered or unexported fields
}
func NewEventDataCollectionPage(cur EventDataCollection, getNextPage func(context.Context, EventDataCollection) (EventDataCollection, error)) EventDataCollectionPage
Creates a new instance of the EventDataCollectionPage type.
func (page *EventDataCollectionPage) Next() error
Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.
func (page *EventDataCollectionPage) NextWithContext(ctx context.Context) (err error)
NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.
func (page EventDataCollectionPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EventDataCollectionPage) Response() EventDataCollection
Response returns the raw server response from the last page request.
func (page EventDataCollectionPage) Values() []EventData
Values returns the slice of values for the current page or nil if there are no values.
EventLevel enumerates the values for event level.
type EventLevel string
const ( // EventLevelCritical ... EventLevelCritical EventLevel = "Critical" // EventLevelError ... EventLevelError EventLevel = "Error" // EventLevelInformational ... EventLevelInformational EventLevel = "Informational" // EventLevelVerbose ... EventLevelVerbose EventLevel = "Verbose" // EventLevelWarning ... EventLevelWarning EventLevel = "Warning" )
func PossibleEventLevelValues() []EventLevel
PossibleEventLevelValues returns an array of possible values for the EventLevel const type.
HTTPRequestInfo the Http request info.
type HTTPRequestInfo struct { // ClientRequestID - the client request id. ClientRequestID *string `json:"clientRequestId,omitempty"` // ClientIPAddress - the client Ip Address ClientIPAddress *string `json:"clientIpAddress,omitempty"` // Method - the Http request method. Method *string `json:"method,omitempty"` // URI - the Uri. URI *string `json:"uri,omitempty"` }
LocalizableString the localizable string class.
type LocalizableString struct { // Value - the invariant value. Value *string `json:"value,omitempty"` // LocalizedValue - the locale specific value. LocalizedValue *string `json:"localizedValue,omitempty"` }
SenderAuthorization 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'
type SenderAuthorization struct { // Action - the permissible actions. For instance: microsoft.support/supporttickets/write Action *string `json:"action,omitempty"` // Role - the role of the user. For instance: Subscription Admin Role *string `json:"role,omitempty"` // Scope - the scope. Scope *string `json:"scope,omitempty"` }
TenantActivityLogsClient is the monitor Management Client
type TenantActivityLogsClient struct { BaseClient }
func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient
NewTenantActivityLogsClient creates an instance of the TenantActivityLogsClient client.
func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) TenantActivityLogsClient
NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func (client TenantActivityLogsClient) List(ctx context.Context, filter string, selectParameter string) (result EventDataCollectionPage, err error)
List gets the Activity Logs for the Tenant.<br>Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).<br>One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. Parameters: filter - reduces the set of data collected. <br>The **$filter** is very restricted and allows only the following patterns.<br>- List events for a resource group: $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, Operation' and resourceGroupName eq '<ResourceGroupName>'.<br>- List events for resource: $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, Operation' and resourceUri eq '<ResourceURI>'.<br>- List events for a subscription: $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, Operation'.<br>- List events for a resource provider: $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, Operation' and resourceProvider eq '<ResourceProviderName>'.<br>- List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq '<CorrelationID>'.<br>**NOTE**: No other syntax is allowed. selectParameter - used to fetch events with only the given properties.<br>The **$select** argument is a comma separated list of property names to be returned. Possible values are: *authorization*, *claims*, *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, *subStatus*, *subscriptionId*
func (client TenantActivityLogsClient) ListComplete(ctx context.Context, filter string, selectParameter string) (result EventDataCollectionIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client TenantActivityLogsClient) ListPreparer(ctx context.Context, filter string, selectParameter string) (*http.Request, error)
ListPreparer prepares the List request.
func (client TenantActivityLogsClient) ListResponder(resp *http.Response) (result EventDataCollection, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (client TenantActivityLogsClient) ListSender(req *http.Request) (*http.Response, error)
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
Name | Synopsis |
---|---|
.. | |
activitylogsapi | Deprecated: Please note, this package has been deprecated. |