insights

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package insights implements the Azure ARM Insights service API version 2020-10-01.

Monitor Management Client

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Insights
	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 ActivityLogAlertResource

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

ActivityLogAlertResource an Activity Log Alert rule resource.

func (ActivityLogAlertResource) MarshalJSON

func (alar ActivityLogAlertResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ActivityLogAlertResource.

func (*ActivityLogAlertResource) UnmarshalJSON

func (alar *ActivityLogAlertResource) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ActivityLogAlertResource struct.

type ActivityLogAlertsClient

type ActivityLogAlertsClient struct {
	BaseClient
}

ActivityLogAlertsClient is the monitor Management Client

func NewActivityLogAlertsClient

func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient

NewActivityLogAlertsClient creates an instance of the ActivityLogAlertsClient client.

func NewActivityLogAlertsClientWithBaseURI

func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient

NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient 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 (ActivityLogAlertsClient) CreateOrUpdate

func (client ActivityLogAlertsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRule ActivityLogAlertResource) (result ActivityLogAlertResource, 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 (ActivityLogAlertsClient) CreateOrUpdatePreparer

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

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (ActivityLogAlertsClient) CreateOrUpdateResponder

func (client ActivityLogAlertsClient) CreateOrUpdateResponder(resp *http.Response) (result ActivityLogAlertResource, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (ActivityLogAlertsClient) CreateOrUpdateSender

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) Delete

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) DeletePreparer

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

DeletePreparer prepares the Delete request.

func (ActivityLogAlertsClient) DeleteResponder

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) DeleteSender

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) Get

func (client ActivityLogAlertsClient) Get(ctx context.Context, resourceGroupName string, activityLogAlertName string) (result ActivityLogAlertResource, 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 (ActivityLogAlertsClient) GetPreparer

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

GetPreparer prepares the Get request.

func (ActivityLogAlertsClient) GetResponder

func (client ActivityLogAlertsClient) GetResponder(resp *http.Response) (result ActivityLogAlertResource, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (ActivityLogAlertsClient) GetSender

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) ListByResourceGroup

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) ListByResourceGroupComplete

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

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

func (ActivityLogAlertsClient) ListByResourceGroupPreparer

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

ListByResourceGroupPreparer prepares the ListByResourceGroup request.

func (ActivityLogAlertsClient) ListByResourceGroupResponder

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) ListByResourceGroupSender

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) ListBySubscriptionID

func (client ActivityLogAlertsClient) ListBySubscriptionID(ctx context.Context) (result AlertRuleListPage, err error)

ListBySubscriptionID get a list of all Activity Log Alert rules in a subscription.

func (ActivityLogAlertsClient) ListBySubscriptionIDComplete

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

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

func (ActivityLogAlertsClient) ListBySubscriptionIDPreparer

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

ListBySubscriptionIDPreparer prepares the ListBySubscriptionID request.

func (ActivityLogAlertsClient) ListBySubscriptionIDResponder

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) ListBySubscriptionIDSender

func (client ActivityLogAlertsClient) 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 (ActivityLogAlertsClient) Update

func (client ActivityLogAlertsClient) Update(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRulePatch AlertRulePatchObject) (result ActivityLogAlertResource, 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 (ActivityLogAlertsClient) UpdatePreparer

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

UpdatePreparer prepares the Update request.

func (ActivityLogAlertsClient) UpdateResponder

func (client ActivityLogAlertsClient) UpdateResponder(resp *http.Response) (result ActivityLogAlertResource, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (ActivityLogAlertsClient) UpdateSender

func (client ActivityLogAlertsClient) 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 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 *[]ActivityLogAlertResource `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 ActivityLogAlertResource 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

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 ActivityLogAlertResource 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

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

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 ErrorResponse

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

ErrorResponse the error response.

func (ErrorResponse) MarshalJSON

func (er ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ErrorResponse.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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