activitylogs

package
v63.4.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package activitylogs implements the Azure ARM Activitylogs service API version .

Monitor Management Client

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Activitylogs
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type ActionGroup

type ActionGroup 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"`
}

ActionGroup a pointer to an Azure Action Group.

func (ActionGroup) MarshalJSON

func (ag ActionGroup) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ActionGroup.

type ActionList

type ActionList struct {
	// ActionGroups - The list of the Action Groups.
	ActionGroups *[]ActionGroup `json:"actionGroups,omitempty"`
}

ActionList a list of Activity Log Alert rule actions.

type AlertResource

type AlertResource struct {
	autorest.Response `json:"-"`
	// AlertRuleProperties - The Activity Log Alert rule properties of the resource.
	*AlertRuleProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; The resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; The name of the resource.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; The type of the resource.
	Type *string `json:"type,omitempty"`
	// Location - The location of the resource. Since Azure Activity Log Alerts is a global service, the location of the rules should always be 'global'.
	Location *string `json:"location,omitempty"`
	// Tags - The tags of the resource.
	Tags map[string]*string `json:"tags"`
}

AlertResource an Activity Log Alert rule resource.

func (AlertResource) MarshalJSON

func (ar AlertResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertResource.

func (*AlertResource) UnmarshalJSON

func (ar *AlertResource) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertResource struct.

type AlertRuleAllOfCondition

type AlertRuleAllOfCondition struct {
	// AllOf - The list of Activity Log Alert rule conditions.
	AllOf *[]AlertRuleAnyOfOrLeafCondition `json:"allOf,omitempty"`
}

AlertRuleAllOfCondition an Activity Log Alert rule condition that is met when all its member conditions are met.

type AlertRuleAnyOfOrLeafCondition

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"`
}

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 AlertRuleLeafCondition

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"`
}

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 AlertRuleList

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"`
}

AlertRuleList a list of Activity Log Alert rules.

func (AlertRuleList) IsEmpty

func (arl AlertRuleList) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type AlertRuleListIterator

type AlertRuleListIterator struct {
	// contains filtered or unexported fields
}

AlertRuleListIterator provides access to a complete listing of AlertResource values.

func NewAlertRuleListIterator

func NewAlertRuleListIterator(page AlertRuleListPage) AlertRuleListIterator

Creates a new instance of the AlertRuleListIterator type.

func (*AlertRuleListIterator) Next

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 (*AlertRuleListIterator) NextWithContext

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 (AlertRuleListIterator) NotDone

func (iter AlertRuleListIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (AlertRuleListIterator) Response

func (iter AlertRuleListIterator) Response() AlertRuleList

Response returns the raw server response from the last page request.

func (AlertRuleListIterator) Value

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.

type AlertRuleListPage

type AlertRuleListPage struct {
	// contains filtered or unexported fields
}

AlertRuleListPage contains a page of AlertResource values.

func NewAlertRuleListPage

func NewAlertRuleListPage(cur AlertRuleList, getNextPage func(context.Context, AlertRuleList) (AlertRuleList, error)) AlertRuleListPage

Creates a new instance of the AlertRuleListPage type.

func (*AlertRuleListPage) Next

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 (*AlertRuleListPage) NextWithContext

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 (AlertRuleListPage) NotDone

func (page AlertRuleListPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (AlertRuleListPage) Response

func (page AlertRuleListPage) Response() AlertRuleList

Response returns the raw server response from the last page request.

func (AlertRuleListPage) Values

func (page AlertRuleListPage) Values() []AlertResource

Values returns the slice of values for the current page or nil if there are no values.

type AlertRulePatchObject

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"`
}

AlertRulePatchObject an Activity Log Alert rule object for the body of patch operations.

func (AlertRulePatchObject) MarshalJSON

func (arpo AlertRulePatchObject) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertRulePatchObject.

func (*AlertRulePatchObject) UnmarshalJSON

func (arpo *AlertRulePatchObject) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertRulePatchObject struct.

type AlertRulePatchProperties

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"`
}

AlertRulePatchProperties an Activity Log Alert rule properties for patch operations.

type AlertRuleProperties

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"`
}

AlertRuleProperties an Azure Activity Log Alert rule.

type AlertsClient

type AlertsClient struct {
	BaseClient
}

AlertsClient is the monitor Management Client

func NewAlertsClient

func NewAlertsClient(subscriptionID string) AlertsClient

NewAlertsClient creates an instance of the AlertsClient client.

func NewAlertsClientWithBaseURI

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 (AlertsClient) CreateOrUpdate

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 (AlertsClient) CreateOrUpdatePreparer

func (client AlertsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRule AlertResource) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (AlertsClient) CreateOrUpdateResponder

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 (AlertsClient) CreateOrUpdateSender

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 (AlertsClient) Delete

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 (AlertsClient) DeletePreparer

func (client AlertsClient) DeletePreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (AlertsClient) DeleteResponder

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 (AlertsClient) DeleteSender

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 (AlertsClient) Get

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 (AlertsClient) GetPreparer

func (client AlertsClient) GetPreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (AlertsClient) GetResponder

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 (AlertsClient) GetSender

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 (AlertsClient) ListByResourceGroup

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 (AlertsClient) ListByResourceGroupComplete

func (client AlertsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result AlertRuleListIterator, err error)

ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.

func (AlertsClient) ListByResourceGroupPreparer

func (client AlertsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)

ListByResourceGroupPreparer prepares the ListByResourceGroup request.

func (AlertsClient) ListByResourceGroupResponder

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 (AlertsClient) ListByResourceGroupSender

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 (AlertsClient) ListBySubscriptionID

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 (AlertsClient) ListBySubscriptionIDComplete

func (client AlertsClient) ListBySubscriptionIDComplete(ctx context.Context) (result AlertRuleListIterator, err error)

ListBySubscriptionIDComplete enumerates all values, automatically crossing page boundaries as required.

func (AlertsClient) ListBySubscriptionIDPreparer

func (client AlertsClient) ListBySubscriptionIDPreparer(ctx context.Context) (*http.Request, error)

ListBySubscriptionIDPreparer prepares the ListBySubscriptionID request.

func (AlertsClient) ListBySubscriptionIDResponder

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 (AlertsClient) ListBySubscriptionIDSender

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 (AlertsClient) Update

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 (AlertsClient) UpdatePreparer

func (client AlertsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRulePatch AlertRulePatchObject) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (AlertsClient) UpdateResponder

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 (AlertsClient) UpdateSender

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.

type AzureResource

type AzureResource struct {
	// ID - READ-ONLY; The resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; The name of the resource.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; The type of the resource.
	Type *string `json:"type,omitempty"`
	// Location - The location of the resource. Since Azure Activity Log Alerts is a global service, the location of the rules should always be 'global'.
	Location *string `json:"location,omitempty"`
	// Tags - The tags of the resource.
	Tags map[string]*string `json:"tags"`
}

AzureResource an Azure resource object.

func (AzureResource) MarshalJSON

func (ar AzureResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AzureResource.

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

BaseClient is the base client for Activitylogs.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

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).

type Client

type Client struct {
	BaseClient
}

Client is the monitor Management Client

func NewClient

func NewClient(subscriptionID string) Client

NewClient creates an instance of the Client client.

func NewClientWithBaseURI

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) List

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) ListComplete

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) ListPreparer

func (client Client) ListPreparer(ctx context.Context, filter string, selectParameter string) (*http.Request, error)

ListPreparer prepares the List request.

func (Client) ListResponder

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) ListSender

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.

type ErrorResponse

type ErrorResponse struct {
	// Code - Error code
	Code *string `json:"code,omitempty"`
	// Message - Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
}

ErrorResponse describes the format of Error response.

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"`
}

EventData the Azure event log entries are of type EventData

func (EventData) MarshalJSON

func (ed EventData) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for EventData.

type EventDataCollection

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"`
}

EventDataCollection represents collection of events.

func (EventDataCollection) IsEmpty

func (edc EventDataCollection) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type EventDataCollectionIterator

type EventDataCollectionIterator struct {
	// contains filtered or unexported fields
}

EventDataCollectionIterator provides access to a complete listing of EventData values.

func NewEventDataCollectionIterator

func NewEventDataCollectionIterator(page EventDataCollectionPage) EventDataCollectionIterator

Creates a new instance of the EventDataCollectionIterator type.

func (*EventDataCollectionIterator) Next

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 (*EventDataCollectionIterator) NextWithContext

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 (EventDataCollectionIterator) NotDone

func (iter EventDataCollectionIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (EventDataCollectionIterator) Response

Response returns the raw server response from the last page request.

func (EventDataCollectionIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type EventDataCollectionPage

type EventDataCollectionPage struct {
	// contains filtered or unexported fields
}

EventDataCollectionPage contains a page of EventData values.

func NewEventDataCollectionPage

func NewEventDataCollectionPage(cur EventDataCollection, getNextPage func(context.Context, EventDataCollection) (EventDataCollection, error)) EventDataCollectionPage

Creates a new instance of the EventDataCollectionPage type.

func (*EventDataCollectionPage) Next

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 (*EventDataCollectionPage) NextWithContext

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 (EventDataCollectionPage) NotDone

func (page EventDataCollectionPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (EventDataCollectionPage) Response

Response returns the raw server response from the last page request.

func (EventDataCollectionPage) Values

func (page EventDataCollectionPage) Values() []EventData

Values returns the slice of values for the current page or nil if there are no values.

type EventLevel

type EventLevel string

EventLevel enumerates the values for event level.

const (
	// EventLevelCritical ...
	EventLevelCritical EventLevel = "Critical"
	// EventLevelError ...
	EventLevelError EventLevel = "Error"
	// EventLevelInformational ...
	EventLevelInformational EventLevel = "Informational"
	// EventLevelVerbose ...
	EventLevelVerbose EventLevel = "Verbose"
	// EventLevelWarning ...
	EventLevelWarning EventLevel = "Warning"
)

func PossibleEventLevelValues

func PossibleEventLevelValues() []EventLevel

PossibleEventLevelValues returns an array of possible values for the EventLevel const type.

type HTTPRequestInfo

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"`
}

HTTPRequestInfo the Http request info.

type LocalizableString

type LocalizableString struct {
	// Value - the invariant value.
	Value *string `json:"value,omitempty"`
	// LocalizedValue - the locale specific value.
	LocalizedValue *string `json:"localizedValue,omitempty"`
}

LocalizableString the localizable string class.

type SenderAuthorization

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"`
}

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 TenantActivityLogsClient

type TenantActivityLogsClient struct {
	BaseClient
}

TenantActivityLogsClient is the monitor Management Client

func NewTenantActivityLogsClient

func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient

NewTenantActivityLogsClient creates an instance of the TenantActivityLogsClient client.

func NewTenantActivityLogsClientWithBaseURI

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 (TenantActivityLogsClient) List

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 (TenantActivityLogsClient) ListComplete

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 (TenantActivityLogsClient) ListPreparer

func (client TenantActivityLogsClient) ListPreparer(ctx context.Context, filter string, selectParameter string) (*http.Request, error)

ListPreparer prepares the List request.

func (TenantActivityLogsClient) ListResponder

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 (TenantActivityLogsClient) ListSender

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL