monitorlegacy

package
v68.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 9 Imported by: 31

Documentation

Overview

Deprecated: Please note, this package has been deprecated. A replacement package is available github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor(https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details.

Package monitorlegacy implements the Azure ARM Monitorlegacy service API version .

Monitor Management Client

Index

Constants

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

type AlertRule struct {
	// Name - the name of the alert rule.
	Name *string `json:"name,omitempty"`
	// Description - the description of the alert rule that will be included in the alert email.
	Description *string `json:"description,omitempty"`
	// ProvisioningState - the provisioning state.
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// IsEnabled - the flag that indicates whether the alert rule is enabled.
	IsEnabled *bool `json:"isEnabled,omitempty"`
	// Condition - the condition that results in the alert rule being activated.
	Condition BasicRuleCondition `json:"condition,omitempty"`
	// Action - action that is performed when the alert rule becomes active, and when an alert condition is resolved.
	Action BasicRuleAction `json:"action,omitempty"`
	// Actions - the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
	Actions *[]BasicRuleAction `json:"actions,omitempty"`
	// LastUpdatedTime - READ-ONLY; Last time the rule was updated in ISO8601 format.
	LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
}

AlertRule an alert rule.

func (AlertRule) MarshalJSON

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

MarshalJSON is the custom marshaler for AlertRule.

func (*AlertRule) UnmarshalJSON

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

UnmarshalJSON is the custom unmarshaler for AlertRule struct.

type AlertRuleIncidentsClient

type AlertRuleIncidentsClient struct {
	BaseClient
}

AlertRuleIncidentsClient is the monitor Management Client

func NewAlertRuleIncidentsClient

func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient

NewAlertRuleIncidentsClient creates an instance of the AlertRuleIncidentsClient client.

func NewAlertRuleIncidentsClientWithBaseURI

func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient

NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient 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 (AlertRuleIncidentsClient) Get

func (client AlertRuleIncidentsClient) Get(ctx context.Context, resourceGroupName string, ruleName string, incidentName string) (result Incident, err error)

Get gets an incident associated to an alert rule Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule. incidentName - the name of the incident to retrieve.

func (AlertRuleIncidentsClient) GetPreparer

func (client AlertRuleIncidentsClient) GetPreparer(ctx context.Context, resourceGroupName string, ruleName string, incidentName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (AlertRuleIncidentsClient) GetResponder

func (client AlertRuleIncidentsClient) GetResponder(resp *http.Response) (result Incident, err error)

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

func (AlertRuleIncidentsClient) GetSender

func (client AlertRuleIncidentsClient) 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 (AlertRuleIncidentsClient) ListByAlertRule

func (client AlertRuleIncidentsClient) ListByAlertRule(ctx context.Context, resourceGroupName string, ruleName string) (result IncidentListResult, err error)

ListByAlertRule gets a list of incidents associated to an alert rule Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule.

func (AlertRuleIncidentsClient) ListByAlertRulePreparer

func (client AlertRuleIncidentsClient) ListByAlertRulePreparer(ctx context.Context, resourceGroupName string, ruleName string) (*http.Request, error)

ListByAlertRulePreparer prepares the ListByAlertRule request.

func (AlertRuleIncidentsClient) ListByAlertRuleResponder

func (client AlertRuleIncidentsClient) ListByAlertRuleResponder(resp *http.Response) (result IncidentListResult, err error)

ListByAlertRuleResponder handles the response to the ListByAlertRule request. The method always closes the http.Response Body.

func (AlertRuleIncidentsClient) ListByAlertRuleSender

func (client AlertRuleIncidentsClient) ListByAlertRuleSender(req *http.Request) (*http.Response, error)

ListByAlertRuleSender sends the ListByAlertRule request. The method will close the http.Response Body if it receives an error.

type AlertRuleResource

type AlertRuleResource struct {
	autorest.Response `json:"-"`
	// AlertRule - The alert rule properties of the resource.
	*AlertRule `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"`
}

AlertRuleResource the alert rule resource.

func (AlertRuleResource) MarshalJSON

func (arr AlertRuleResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertRuleResource.

func (*AlertRuleResource) UnmarshalJSON

func (arr *AlertRuleResource) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertRuleResource struct.

type AlertRuleResourceCollection

type AlertRuleResourceCollection struct {
	autorest.Response `json:"-"`
	// Value - the values for the alert rule resources.
	Value *[]AlertRuleResource `json:"value,omitempty"`
}

AlertRuleResourceCollection represents a collection of alert rule resources.

type AlertRuleResourcePatch

type AlertRuleResourcePatch struct {
	// Tags - Resource tags
	Tags map[string]*string `json:"tags"`
	// AlertRule - The properties of an alert rule.
	*AlertRule `json:"properties,omitempty"`
}

AlertRuleResourcePatch the alert rule object for patch operations.

func (AlertRuleResourcePatch) MarshalJSON

func (arrp AlertRuleResourcePatch) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AlertRuleResourcePatch.

func (*AlertRuleResourcePatch) UnmarshalJSON

func (arrp *AlertRuleResourcePatch) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for AlertRuleResourcePatch struct.

type AlertRulesClient

type AlertRulesClient struct {
	BaseClient
}

AlertRulesClient is the monitor Management Client

func NewAlertRulesClient

func NewAlertRulesClient(subscriptionID string) AlertRulesClient

NewAlertRulesClient creates an instance of the AlertRulesClient client.

func NewAlertRulesClientWithBaseURI

func NewAlertRulesClientWithBaseURI(baseURI string, subscriptionID string) AlertRulesClient

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

func (client AlertRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertRuleResource) (result AlertRuleResource, err error)

CreateOrUpdate creates or updates a classic metric alert rule. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule. parameters - the parameters of the rule to create or update.

func (AlertRulesClient) CreateOrUpdatePreparer

func (client AlertRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertRuleResource) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (AlertRulesClient) CreateOrUpdateResponder

func (client AlertRulesClient) CreateOrUpdateResponder(resp *http.Response) (result AlertRuleResource, err error)

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

func (AlertRulesClient) CreateOrUpdateSender

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

func (client AlertRulesClient) Delete(ctx context.Context, resourceGroupName string, ruleName string) (result autorest.Response, err error)

Delete deletes a classic metric alert rule Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule.

func (AlertRulesClient) DeletePreparer

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

DeletePreparer prepares the Delete request.

func (AlertRulesClient) DeleteResponder

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

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

func (client AlertRulesClient) Get(ctx context.Context, resourceGroupName string, ruleName string) (result AlertRuleResource, err error)

Get gets a classic metric alert rule Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule.

func (AlertRulesClient) GetPreparer

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

GetPreparer prepares the Get request.

func (AlertRulesClient) GetResponder

func (client AlertRulesClient) GetResponder(resp *http.Response) (result AlertRuleResource, err error)

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

func (AlertRulesClient) GetSender

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

func (client AlertRulesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AlertRuleResourceCollection, err error)

ListByResourceGroup list the classic metric alert rules within a resource group. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive.

func (AlertRulesClient) ListByResourceGroupPreparer

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

ListByResourceGroupPreparer prepares the ListByResourceGroup request.

func (AlertRulesClient) ListByResourceGroupResponder

func (client AlertRulesClient) ListByResourceGroupResponder(resp *http.Response) (result AlertRuleResourceCollection, err error)

ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always closes the http.Response Body.

func (AlertRulesClient) ListByResourceGroupSender

func (client AlertRulesClient) 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 (AlertRulesClient) ListBySubscription

func (client AlertRulesClient) ListBySubscription(ctx context.Context) (result AlertRuleResourceCollection, err error)

ListBySubscription list the classic metric alert rules within a subscription.

func (AlertRulesClient) ListBySubscriptionPreparer

func (client AlertRulesClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error)

ListBySubscriptionPreparer prepares the ListBySubscription request.

func (AlertRulesClient) ListBySubscriptionResponder

func (client AlertRulesClient) ListBySubscriptionResponder(resp *http.Response) (result AlertRuleResourceCollection, err error)

ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always closes the http.Response Body.

func (AlertRulesClient) ListBySubscriptionSender

func (client AlertRulesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error)

ListBySubscriptionSender sends the ListBySubscription request. The method will close the http.Response Body if it receives an error.

func (AlertRulesClient) Update

func (client AlertRulesClient) Update(ctx context.Context, resourceGroupName string, ruleName string, alertRulesResource AlertRuleResourcePatch) (result AlertRuleResource, err error)

Update updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. Parameters: resourceGroupName - the name of the resource group. The name is case insensitive. ruleName - the name of the rule. alertRulesResource - parameters supplied to the operation.

func (AlertRulesClient) UpdatePreparer

func (client AlertRulesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, ruleName string, alertRulesResource AlertRuleResourcePatch) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (AlertRulesClient) UpdateResponder

func (client AlertRulesClient) UpdateResponder(resp *http.Response) (result AlertRuleResource, err error)

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

func (AlertRulesClient) UpdateSender

func (client AlertRulesClient) 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 BaseClient

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

BaseClient is the base client for Monitorlegacy.

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 BasicRuleAction

type BasicRuleAction interface {
	AsRuleEmailAction() (*RuleEmailAction, bool)
	AsRuleWebhookAction() (*RuleWebhookAction, bool)
	AsRuleAction() (*RuleAction, bool)
}

BasicRuleAction the action that is performed when the alert rule becomes active, and when an alert condition is resolved.

type BasicRuleCondition

type BasicRuleCondition interface {
	AsThresholdRuleCondition() (*ThresholdRuleCondition, bool)
	AsLocationThresholdRuleCondition() (*LocationThresholdRuleCondition, bool)
	AsManagementEventRuleCondition() (*ManagementEventRuleCondition, bool)
	AsRuleCondition() (*RuleCondition, bool)
}

BasicRuleCondition the condition that results in the alert rule being activated.

type BasicRuleDataSource

type BasicRuleDataSource interface {
	AsRuleMetricDataSource() (*RuleMetricDataSource, bool)
	AsRuleManagementEventDataSource() (*RuleManagementEventDataSource, bool)
	AsRuleDataSource() (*RuleDataSource, bool)
}

BasicRuleDataSource the resource from which the rule collects its data.

type ConditionOperator

type ConditionOperator string

ConditionOperator enumerates the values for condition operator.

const (
	// GreaterThan ...
	GreaterThan ConditionOperator = "GreaterThan"
	// GreaterThanOrEqual ...
	GreaterThanOrEqual ConditionOperator = "GreaterThanOrEqual"
	// LessThan ...
	LessThan ConditionOperator = "LessThan"
	// LessThanOrEqual ...
	LessThanOrEqual ConditionOperator = "LessThanOrEqual"
)

func PossibleConditionOperatorValues

func PossibleConditionOperatorValues() []ConditionOperator

PossibleConditionOperatorValues returns an array of possible values for the ConditionOperator const type.

type DataContainer

type DataContainer struct {
	// Workspace - Log Analytics workspace information.
	Workspace *WorkspaceInfo `json:"workspace,omitempty"`
}

DataContainer information about a container with data for a given resource.

type DataStatus

type DataStatus string

DataStatus enumerates the values for data status.

const (
	// NotPresent ...
	NotPresent DataStatus = "notPresent"
	// Present ...
	Present DataStatus = "present"
)

func PossibleDataStatusValues

func PossibleDataStatusValues() []DataStatus

PossibleDataStatusValues returns an array of possible values for the DataStatus const type.

type Error

type Error struct {
	// Code - Error code identifying the specific error.
	Code *string `json:"code,omitempty"`
	// Message - Error message in the caller's locale.
	Message *string `json:"message,omitempty"`
}

Error error details.

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 EventCategoriesClient

type EventCategoriesClient struct {
	BaseClient
}

EventCategoriesClient is the monitor Management Client

func NewEventCategoriesClient

func NewEventCategoriesClient(subscriptionID string) EventCategoriesClient

NewEventCategoriesClient creates an instance of the EventCategoriesClient client.

func NewEventCategoriesClientWithBaseURI

func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string) EventCategoriesClient

NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient 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 (EventCategoriesClient) List

func (client EventCategoriesClient) List(ctx context.Context) (result EventCategoryCollection, err error)

List get the list of available event categories supported in the Activity Logs Service.<br>The current list includes the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy.

func (EventCategoriesClient) ListPreparer

func (client EventCategoriesClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (EventCategoriesClient) ListResponder

func (client EventCategoriesClient) ListResponder(resp *http.Response) (result EventCategoryCollection, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (EventCategoriesClient) ListSender

func (client EventCategoriesClient) 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 EventCategoryCollection

type EventCategoryCollection struct {
	autorest.Response `json:"-"`
	// Value - the list that includes the Azure event categories.
	Value *[]LocalizableString `json:"value,omitempty"`
}

EventCategoryCollection a collection of event categories. Currently possible values are: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy.

type Incident

type Incident struct {
	autorest.Response `json:"-"`
	// Name - READ-ONLY; Incident name.
	Name *string `json:"name,omitempty"`
	// RuleName - READ-ONLY; Rule name that is associated with the incident.
	RuleName *string `json:"ruleName,omitempty"`
	// IsActive - READ-ONLY; A boolean to indicate whether the incident is active or resolved.
	IsActive *bool `json:"isActive,omitempty"`
	// ActivatedTime - READ-ONLY; The time at which the incident was activated in ISO8601 format.
	ActivatedTime *date.Time `json:"activatedTime,omitempty"`
	// ResolvedTime - READ-ONLY; The time at which the incident was resolved in ISO8601 format. If null, it means the incident is still active.
	ResolvedTime *date.Time `json:"resolvedTime,omitempty"`
}

Incident an alert incident indicates the activation status of an alert rule.

func (Incident) MarshalJSON

func (i Incident) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Incident.

type IncidentListResult

type IncidentListResult struct {
	autorest.Response `json:"-"`
	// Value - the incident collection.
	Value *[]Incident `json:"value,omitempty"`
}

IncidentListResult the List incidents operation response.

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 LocationThresholdRuleCondition

type LocationThresholdRuleCondition struct {
	// WindowSize - the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
	WindowSize *string `json:"windowSize,omitempty"`
	// FailedLocationCount - the number of locations that must fail to activate the alert.
	FailedLocationCount *int32 `json:"failedLocationCount,omitempty"`
	// DataSource - the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
	DataSource BasicRuleDataSource `json:"dataSource,omitempty"`
	// OdataType - Possible values include: 'OdataTypeRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition'
	OdataType OdataTypeBasicRuleCondition `json:"odata.type,omitempty"`
}

LocationThresholdRuleCondition a rule condition based on a certain number of locations failing.

func (LocationThresholdRuleCondition) AsBasicRuleCondition

func (ltrc LocationThresholdRuleCondition) AsBasicRuleCondition() (BasicRuleCondition, bool)

AsBasicRuleCondition is the BasicRuleCondition implementation for LocationThresholdRuleCondition.

func (LocationThresholdRuleCondition) AsLocationThresholdRuleCondition

func (ltrc LocationThresholdRuleCondition) AsLocationThresholdRuleCondition() (*LocationThresholdRuleCondition, bool)

AsLocationThresholdRuleCondition is the BasicRuleCondition implementation for LocationThresholdRuleCondition.

func (LocationThresholdRuleCondition) AsManagementEventRuleCondition

func (ltrc LocationThresholdRuleCondition) AsManagementEventRuleCondition() (*ManagementEventRuleCondition, bool)

AsManagementEventRuleCondition is the BasicRuleCondition implementation for LocationThresholdRuleCondition.

func (LocationThresholdRuleCondition) AsRuleCondition

func (ltrc LocationThresholdRuleCondition) AsRuleCondition() (*RuleCondition, bool)

AsRuleCondition is the BasicRuleCondition implementation for LocationThresholdRuleCondition.

func (LocationThresholdRuleCondition) AsThresholdRuleCondition

func (ltrc LocationThresholdRuleCondition) AsThresholdRuleCondition() (*ThresholdRuleCondition, bool)

AsThresholdRuleCondition is the BasicRuleCondition implementation for LocationThresholdRuleCondition.

func (LocationThresholdRuleCondition) MarshalJSON

func (ltrc LocationThresholdRuleCondition) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LocationThresholdRuleCondition.

func (*LocationThresholdRuleCondition) UnmarshalJSON

func (ltrc *LocationThresholdRuleCondition) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for LocationThresholdRuleCondition struct.

type LogProfileCollection

type LogProfileCollection struct {
	autorest.Response `json:"-"`
	// Value - the values of the log profiles.
	Value *[]LogProfileResource `json:"value,omitempty"`
}

LogProfileCollection represents a collection of log profiles.

type LogProfileProperties

type LogProfileProperties struct {
	// StorageAccountID - the resource id of the storage account to which you would like to send the Activity Log.
	StorageAccountID *string `json:"storageAccountId,omitempty"`
	// ServiceBusRuleID - The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'.
	ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"`
	// Locations - List of regions for which Activity Log events should be stored or streamed. It is a comma separated list of valid ARM locations including the 'global' location.
	Locations *[]string `json:"locations,omitempty"`
	// Categories - the categories of the logs. These categories are created as is convenient to the user. Some values are: 'Write', 'Delete', and/or 'Action.'
	Categories *[]string `json:"categories,omitempty"`
	// RetentionPolicy - the retention policy for the events in the log.
	RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`
}

LogProfileProperties the log profile properties.

type LogProfileResource

type LogProfileResource struct {
	autorest.Response `json:"-"`
	// LogProfileProperties - The log profile properties of the resource.
	*LogProfileProperties `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"`
}

LogProfileResource the log profile resource.

func (LogProfileResource) MarshalJSON

func (lpr LogProfileResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LogProfileResource.

func (*LogProfileResource) UnmarshalJSON

func (lpr *LogProfileResource) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for LogProfileResource struct.

type LogProfileResourcePatch

type LogProfileResourcePatch struct {
	// Tags - Resource tags
	Tags map[string]*string `json:"tags"`
	// LogProfileProperties - The log profile properties for an update operation.
	*LogProfileProperties `json:"properties,omitempty"`
}

LogProfileResourcePatch the log profile resource for patch operations.

func (LogProfileResourcePatch) MarshalJSON

func (lprp LogProfileResourcePatch) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LogProfileResourcePatch.

func (*LogProfileResourcePatch) UnmarshalJSON

func (lprp *LogProfileResourcePatch) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for LogProfileResourcePatch struct.

type LogProfilesClient

type LogProfilesClient struct {
	BaseClient
}

LogProfilesClient is the monitor Management Client

func NewLogProfilesClient

func NewLogProfilesClient(subscriptionID string) LogProfilesClient

NewLogProfilesClient creates an instance of the LogProfilesClient client.

func NewLogProfilesClientWithBaseURI

func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient

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

func (client LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileName string, parameters LogProfileResource) (result LogProfileResource, err error)

CreateOrUpdate create or update a log profile in Azure Monitoring REST API. Parameters: logProfileName - the name of the log profile. parameters - parameters supplied to the operation.

func (LogProfilesClient) CreateOrUpdatePreparer

func (client LogProfilesClient) CreateOrUpdatePreparer(ctx context.Context, logProfileName string, parameters LogProfileResource) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (LogProfilesClient) CreateOrUpdateResponder

func (client LogProfilesClient) CreateOrUpdateResponder(resp *http.Response) (result LogProfileResource, err error)

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

func (LogProfilesClient) CreateOrUpdateSender

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

func (client LogProfilesClient) Delete(ctx context.Context, logProfileName string) (result autorest.Response, err error)

Delete deletes the log profile. Parameters: logProfileName - the name of the log profile.

func (LogProfilesClient) DeletePreparer

func (client LogProfilesClient) DeletePreparer(ctx context.Context, logProfileName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (LogProfilesClient) DeleteResponder

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

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

func (client LogProfilesClient) Get(ctx context.Context, logProfileName string) (result LogProfileResource, err error)

Get gets the log profile. Parameters: logProfileName - the name of the log profile.

func (LogProfilesClient) GetPreparer

func (client LogProfilesClient) GetPreparer(ctx context.Context, logProfileName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (LogProfilesClient) GetResponder

func (client LogProfilesClient) GetResponder(resp *http.Response) (result LogProfileResource, err error)

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

func (LogProfilesClient) GetSender

func (client LogProfilesClient) 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 (LogProfilesClient) List

func (client LogProfilesClient) List(ctx context.Context) (result LogProfileCollection, err error)

List list the log profiles.

func (LogProfilesClient) ListPreparer

func (client LogProfilesClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (LogProfilesClient) ListResponder

func (client LogProfilesClient) ListResponder(resp *http.Response) (result LogProfileCollection, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (LogProfilesClient) ListSender

func (client LogProfilesClient) 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.

func (LogProfilesClient) Update

func (client LogProfilesClient) Update(ctx context.Context, logProfileName string, logProfilesResource LogProfileResourcePatch) (result LogProfileResource, err error)

Update updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. Parameters: logProfileName - the name of the log profile. logProfilesResource - parameters supplied to the operation.

func (LogProfilesClient) UpdatePreparer

func (client LogProfilesClient) UpdatePreparer(ctx context.Context, logProfileName string, logProfilesResource LogProfileResourcePatch) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (LogProfilesClient) UpdateResponder

func (client LogProfilesClient) UpdateResponder(resp *http.Response) (result LogProfileResource, err error)

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

func (LogProfilesClient) UpdateSender

func (client LogProfilesClient) 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 ManagementEventAggregationCondition

type ManagementEventAggregationCondition struct {
	// Operator - the condition operator. Possible values include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'
	Operator ConditionOperator `json:"operator,omitempty"`
	// Threshold - The threshold value that activates the alert.
	Threshold *float64 `json:"threshold,omitempty"`
	// WindowSize - the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
	WindowSize *string `json:"windowSize,omitempty"`
}

ManagementEventAggregationCondition how the data that is collected should be combined over time.

type ManagementEventRuleCondition

type ManagementEventRuleCondition struct {
	// Aggregation - How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
	Aggregation *ManagementEventAggregationCondition `json:"aggregation,omitempty"`
	// DataSource - the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
	DataSource BasicRuleDataSource `json:"dataSource,omitempty"`
	// OdataType - Possible values include: 'OdataTypeRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition'
	OdataType OdataTypeBasicRuleCondition `json:"odata.type,omitempty"`
}

ManagementEventRuleCondition a management event rule condition.

func (ManagementEventRuleCondition) AsBasicRuleCondition

func (merc ManagementEventRuleCondition) AsBasicRuleCondition() (BasicRuleCondition, bool)

AsBasicRuleCondition is the BasicRuleCondition implementation for ManagementEventRuleCondition.

func (ManagementEventRuleCondition) AsLocationThresholdRuleCondition

func (merc ManagementEventRuleCondition) AsLocationThresholdRuleCondition() (*LocationThresholdRuleCondition, bool)

AsLocationThresholdRuleCondition is the BasicRuleCondition implementation for ManagementEventRuleCondition.

func (ManagementEventRuleCondition) AsManagementEventRuleCondition

func (merc ManagementEventRuleCondition) AsManagementEventRuleCondition() (*ManagementEventRuleCondition, bool)

AsManagementEventRuleCondition is the BasicRuleCondition implementation for ManagementEventRuleCondition.

func (ManagementEventRuleCondition) AsRuleCondition

func (merc ManagementEventRuleCondition) AsRuleCondition() (*RuleCondition, bool)

AsRuleCondition is the BasicRuleCondition implementation for ManagementEventRuleCondition.

func (ManagementEventRuleCondition) AsThresholdRuleCondition

func (merc ManagementEventRuleCondition) AsThresholdRuleCondition() (*ThresholdRuleCondition, bool)

AsThresholdRuleCondition is the BasicRuleCondition implementation for ManagementEventRuleCondition.

func (ManagementEventRuleCondition) MarshalJSON

func (merc ManagementEventRuleCondition) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ManagementEventRuleCondition.

func (*ManagementEventRuleCondition) UnmarshalJSON

func (merc *ManagementEventRuleCondition) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ManagementEventRuleCondition struct.

type OdataType

type OdataType string

OdataType enumerates the values for odata type.

const (
	// OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource ...
	OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource OdataType = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"
	// OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource ...
	OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource OdataType = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"
	// OdataTypeRuleDataSource ...
	OdataTypeRuleDataSource OdataType = "RuleDataSource"
)

func PossibleOdataTypeValues

func PossibleOdataTypeValues() []OdataType

PossibleOdataTypeValues returns an array of possible values for the OdataType const type.

type OdataTypeBasicRuleAction

type OdataTypeBasicRuleAction string

OdataTypeBasicRuleAction enumerates the values for odata type basic rule action.

const (
	// OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction ...
	OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction OdataTypeBasicRuleAction = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction"
	// OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction ...
	OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction OdataTypeBasicRuleAction = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction"
	// OdataTypeRuleAction ...
	OdataTypeRuleAction OdataTypeBasicRuleAction = "RuleAction"
)

func PossibleOdataTypeBasicRuleActionValues

func PossibleOdataTypeBasicRuleActionValues() []OdataTypeBasicRuleAction

PossibleOdataTypeBasicRuleActionValues returns an array of possible values for the OdataTypeBasicRuleAction const type.

type OdataTypeBasicRuleCondition

type OdataTypeBasicRuleCondition string

OdataTypeBasicRuleCondition enumerates the values for odata type basic rule condition.

const (
	// OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition ...
	OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition OdataTypeBasicRuleCondition = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition"
	// OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition ...
	OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition OdataTypeBasicRuleCondition = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition"
	// OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition ...
	OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition OdataTypeBasicRuleCondition = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"
	// OdataTypeRuleCondition ...
	OdataTypeRuleCondition OdataTypeBasicRuleCondition = "RuleCondition"
)

func PossibleOdataTypeBasicRuleConditionValues

func PossibleOdataTypeBasicRuleConditionValues() []OdataTypeBasicRuleCondition

PossibleOdataTypeBasicRuleConditionValues returns an array of possible values for the OdataTypeBasicRuleCondition const type.

type OnboardingStatus

type OnboardingStatus string

OnboardingStatus enumerates the values for onboarding status.

const (
	// NotOnboarded ...
	NotOnboarded OnboardingStatus = "notOnboarded"
	// Onboarded ...
	Onboarded OnboardingStatus = "onboarded"
	// Unknown ...
	Unknown OnboardingStatus = "unknown"
)

func PossibleOnboardingStatusValues

func PossibleOnboardingStatusValues() []OnboardingStatus

PossibleOnboardingStatusValues returns an array of possible values for the OnboardingStatus const type.

type ProxyResource

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

ProxyResource an azure resource object

func (ProxyResource) MarshalJSON

func (pr ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ProxyResource.

type Resource

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

Resource an azure resource object

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Resource.

type ResponseWithError

type ResponseWithError struct {
	// Error - Error information.
	Error *Error `json:"error,omitempty"`
}

ResponseWithError an error response from the API.

type RetentionPolicy

type RetentionPolicy struct {
	// Enabled - a value indicating whether the retention policy is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// Days - the number of days for the retention in days. A value of 0 will retain the events indefinitely.
	Days *int32 `json:"days,omitempty"`
}

RetentionPolicy specifies the retention policy for the log.

type RuleAction

type RuleAction struct {
	// OdataType - Possible values include: 'OdataTypeRuleAction', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction'
	OdataType OdataTypeBasicRuleAction `json:"odata.type,omitempty"`
}

RuleAction the action that is performed when the alert rule becomes active, and when an alert condition is resolved.

func (RuleAction) AsBasicRuleAction

func (ra RuleAction) AsBasicRuleAction() (BasicRuleAction, bool)

AsBasicRuleAction is the BasicRuleAction implementation for RuleAction.

func (RuleAction) AsRuleAction

func (ra RuleAction) AsRuleAction() (*RuleAction, bool)

AsRuleAction is the BasicRuleAction implementation for RuleAction.

func (RuleAction) AsRuleEmailAction

func (ra RuleAction) AsRuleEmailAction() (*RuleEmailAction, bool)

AsRuleEmailAction is the BasicRuleAction implementation for RuleAction.

func (RuleAction) AsRuleWebhookAction

func (ra RuleAction) AsRuleWebhookAction() (*RuleWebhookAction, bool)

AsRuleWebhookAction is the BasicRuleAction implementation for RuleAction.

func (RuleAction) MarshalJSON

func (ra RuleAction) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for RuleAction.

type RuleCondition

type RuleCondition struct {
	// DataSource - the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
	DataSource BasicRuleDataSource `json:"dataSource,omitempty"`
	// OdataType - Possible values include: 'OdataTypeRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition'
	OdataType OdataTypeBasicRuleCondition `json:"odata.type,omitempty"`
}

RuleCondition the condition that results in the alert rule being activated.

func (RuleCondition) AsBasicRuleCondition

func (rc RuleCondition) AsBasicRuleCondition() (BasicRuleCondition, bool)

AsBasicRuleCondition is the BasicRuleCondition implementation for RuleCondition.

func (RuleCondition) AsLocationThresholdRuleCondition

func (rc RuleCondition) AsLocationThresholdRuleCondition() (*LocationThresholdRuleCondition, bool)

AsLocationThresholdRuleCondition is the BasicRuleCondition implementation for RuleCondition.

func (RuleCondition) AsManagementEventRuleCondition

func (rc RuleCondition) AsManagementEventRuleCondition() (*ManagementEventRuleCondition, bool)

AsManagementEventRuleCondition is the BasicRuleCondition implementation for RuleCondition.

func (RuleCondition) AsRuleCondition

func (rc RuleCondition) AsRuleCondition() (*RuleCondition, bool)

AsRuleCondition is the BasicRuleCondition implementation for RuleCondition.

func (RuleCondition) AsThresholdRuleCondition

func (rc RuleCondition) AsThresholdRuleCondition() (*ThresholdRuleCondition, bool)

AsThresholdRuleCondition is the BasicRuleCondition implementation for RuleCondition.

func (RuleCondition) MarshalJSON

func (rc RuleCondition) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for RuleCondition.

func (*RuleCondition) UnmarshalJSON

func (rc *RuleCondition) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for RuleCondition struct.

type RuleDataSource

type RuleDataSource struct {
	// ResourceURI - the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// LegacyResourceID - the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
	LegacyResourceID *string `json:"legacyResourceId,omitempty"`
	// ResourceLocation - the location of the resource.
	ResourceLocation *string `json:"resourceLocation,omitempty"`
	// MetricNamespace - the namespace of the metric.
	MetricNamespace *string `json:"metricNamespace,omitempty"`
	// OdataType - Possible values include: 'OdataTypeRuleDataSource', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource'
	OdataType OdataType `json:"odata.type,omitempty"`
}

RuleDataSource the resource from which the rule collects its data.

func (RuleDataSource) AsBasicRuleDataSource

func (rds RuleDataSource) AsBasicRuleDataSource() (BasicRuleDataSource, bool)

AsBasicRuleDataSource is the BasicRuleDataSource implementation for RuleDataSource.

func (RuleDataSource) AsRuleDataSource

func (rds RuleDataSource) AsRuleDataSource() (*RuleDataSource, bool)

AsRuleDataSource is the BasicRuleDataSource implementation for RuleDataSource.

func (RuleDataSource) AsRuleManagementEventDataSource

func (rds RuleDataSource) AsRuleManagementEventDataSource() (*RuleManagementEventDataSource, bool)

AsRuleManagementEventDataSource is the BasicRuleDataSource implementation for RuleDataSource.

func (RuleDataSource) AsRuleMetricDataSource

func (rds RuleDataSource) AsRuleMetricDataSource() (*RuleMetricDataSource, bool)

AsRuleMetricDataSource is the BasicRuleDataSource implementation for RuleDataSource.

func (RuleDataSource) MarshalJSON

func (rds RuleDataSource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for RuleDataSource.

type RuleEmailAction

type RuleEmailAction struct {
	// SendToServiceOwners - Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
	SendToServiceOwners *bool `json:"sendToServiceOwners,omitempty"`
	// CustomEmails - the list of administrator's custom email addresses to notify of the activation of the alert.
	CustomEmails *[]string `json:"customEmails,omitempty"`
	// OdataType - Possible values include: 'OdataTypeRuleAction', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction'
	OdataType OdataTypeBasicRuleAction `json:"odata.type,omitempty"`
}

RuleEmailAction specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case.

func (RuleEmailAction) AsBasicRuleAction

func (rea RuleEmailAction) AsBasicRuleAction() (BasicRuleAction, bool)

AsBasicRuleAction is the BasicRuleAction implementation for RuleEmailAction.

func (RuleEmailAction) AsRuleAction

func (rea RuleEmailAction) AsRuleAction() (*RuleAction, bool)

AsRuleAction is the BasicRuleAction implementation for RuleEmailAction.

func (RuleEmailAction) AsRuleEmailAction

func (rea RuleEmailAction) AsRuleEmailAction() (*RuleEmailAction, bool)

AsRuleEmailAction is the BasicRuleAction implementation for RuleEmailAction.

func (RuleEmailAction) AsRuleWebhookAction

func (rea RuleEmailAction) AsRuleWebhookAction() (*RuleWebhookAction, bool)

AsRuleWebhookAction is the BasicRuleAction implementation for RuleEmailAction.

func (RuleEmailAction) MarshalJSON

func (rea RuleEmailAction) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for RuleEmailAction.

type RuleManagementEventClaimsDataSource

type RuleManagementEventClaimsDataSource struct {
	// EmailAddress - the email address.
	EmailAddress *string `json:"emailAddress,omitempty"`
}

RuleManagementEventClaimsDataSource the claims for a rule management event data source.

type RuleManagementEventDataSource

type RuleManagementEventDataSource struct {
	// EventName - the event name.
	EventName *string `json:"eventName,omitempty"`
	// EventSource - the event source.
	EventSource *string `json:"eventSource,omitempty"`
	// Level - the level.
	Level *string `json:"level,omitempty"`
	// OperationName - The name of the operation that should be checked for. If no name is provided, any operation will match.
	OperationName *string `json:"operationName,omitempty"`
	// ResourceGroupName - the resource group name.
	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
	// ResourceProviderName - the resource provider name.
	ResourceProviderName *string `json:"resourceProviderName,omitempty"`
	// Status - The status of the operation that should be checked for. If no status is provided, any status will match.
	Status *string `json:"status,omitempty"`
	// SubStatus - the substatus.
	SubStatus *string `json:"subStatus,omitempty"`
	// Claims - the claims.
	Claims *RuleManagementEventClaimsDataSource `json:"claims,omitempty"`
	// ResourceURI - the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// LegacyResourceID - the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
	LegacyResourceID *string `json:"legacyResourceId,omitempty"`
	// ResourceLocation - the location of the resource.
	ResourceLocation *string `json:"resourceLocation,omitempty"`
	// MetricNamespace - the namespace of the metric.
	MetricNamespace *string `json:"metricNamespace,omitempty"`
	// OdataType - Possible values include: 'OdataTypeRuleDataSource', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource'
	OdataType OdataType `json:"odata.type,omitempty"`
}

RuleManagementEventDataSource a rule management event data source. The discriminator fields is always RuleManagementEventDataSource in this case.

func (RuleManagementEventDataSource) AsBasicRuleDataSource

func (rmeds RuleManagementEventDataSource) AsBasicRuleDataSource() (BasicRuleDataSource, bool)

AsBasicRuleDataSource is the BasicRuleDataSource implementation for RuleManagementEventDataSource.

func (RuleManagementEventDataSource) AsRuleDataSource

func (rmeds RuleManagementEventDataSource) AsRuleDataSource() (*RuleDataSource, bool)

AsRuleDataSource is the BasicRuleDataSource implementation for RuleManagementEventDataSource.

func (RuleManagementEventDataSource) AsRuleManagementEventDataSource

func (rmeds RuleManagementEventDataSource) AsRuleManagementEventDataSource() (*RuleManagementEventDataSource, bool)

AsRuleManagementEventDataSource is the BasicRuleDataSource implementation for RuleManagementEventDataSource.

func (RuleManagementEventDataSource) AsRuleMetricDataSource

func (rmeds RuleManagementEventDataSource) AsRuleMetricDataSource() (*RuleMetricDataSource, bool)

AsRuleMetricDataSource is the BasicRuleDataSource implementation for RuleManagementEventDataSource.

func (RuleManagementEventDataSource) MarshalJSON

func (rmeds RuleManagementEventDataSource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for RuleManagementEventDataSource.

type RuleMetricDataSource

type RuleMetricDataSource struct {
	// MetricName - the name of the metric that defines what the rule monitors.
	MetricName *string `json:"metricName,omitempty"`
	// ResourceURI - the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
	ResourceURI *string `json:"resourceUri,omitempty"`
	// LegacyResourceID - the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.
	LegacyResourceID *string `json:"legacyResourceId,omitempty"`
	// ResourceLocation - the location of the resource.
	ResourceLocation *string `json:"resourceLocation,omitempty"`
	// MetricNamespace - the namespace of the metric.
	MetricNamespace *string `json:"metricNamespace,omitempty"`
	// OdataType - Possible values include: 'OdataTypeRuleDataSource', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource'
	OdataType OdataType `json:"odata.type,omitempty"`
}

RuleMetricDataSource a rule metric data source. The discriminator value is always RuleMetricDataSource in this case.

func (RuleMetricDataSource) AsBasicRuleDataSource

func (rmds RuleMetricDataSource) AsBasicRuleDataSource() (BasicRuleDataSource, bool)

AsBasicRuleDataSource is the BasicRuleDataSource implementation for RuleMetricDataSource.

func (RuleMetricDataSource) AsRuleDataSource

func (rmds RuleMetricDataSource) AsRuleDataSource() (*RuleDataSource, bool)

AsRuleDataSource is the BasicRuleDataSource implementation for RuleMetricDataSource.

func (RuleMetricDataSource) AsRuleManagementEventDataSource

func (rmds RuleMetricDataSource) AsRuleManagementEventDataSource() (*RuleManagementEventDataSource, bool)

AsRuleManagementEventDataSource is the BasicRuleDataSource implementation for RuleMetricDataSource.

func (RuleMetricDataSource) AsRuleMetricDataSource

func (rmds RuleMetricDataSource) AsRuleMetricDataSource() (*RuleMetricDataSource, bool)

AsRuleMetricDataSource is the BasicRuleDataSource implementation for RuleMetricDataSource.

func (RuleMetricDataSource) MarshalJSON

func (rmds RuleMetricDataSource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for RuleMetricDataSource.

type RuleWebhookAction

type RuleWebhookAction struct {
	// ServiceURI - the service uri to Post the notification when the alert activates or resolves.
	ServiceURI *string `json:"serviceUri,omitempty"`
	// Properties - the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
	Properties map[string]*string `json:"properties"`
	// OdataType - Possible values include: 'OdataTypeRuleAction', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction', 'OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction'
	OdataType OdataTypeBasicRuleAction `json:"odata.type,omitempty"`
}

RuleWebhookAction specifies the action to post to service when the rule condition is evaluated. The discriminator is always RuleWebhookAction in this case.

func (RuleWebhookAction) AsBasicRuleAction

func (rwa RuleWebhookAction) AsBasicRuleAction() (BasicRuleAction, bool)

AsBasicRuleAction is the BasicRuleAction implementation for RuleWebhookAction.

func (RuleWebhookAction) AsRuleAction

func (rwa RuleWebhookAction) AsRuleAction() (*RuleAction, bool)

AsRuleAction is the BasicRuleAction implementation for RuleWebhookAction.

func (RuleWebhookAction) AsRuleEmailAction

func (rwa RuleWebhookAction) AsRuleEmailAction() (*RuleEmailAction, bool)

AsRuleEmailAction is the BasicRuleAction implementation for RuleWebhookAction.

func (RuleWebhookAction) AsRuleWebhookAction

func (rwa RuleWebhookAction) AsRuleWebhookAction() (*RuleWebhookAction, bool)

AsRuleWebhookAction is the BasicRuleAction implementation for RuleWebhookAction.

func (RuleWebhookAction) MarshalJSON

func (rwa RuleWebhookAction) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for RuleWebhookAction.

type ThresholdRuleCondition

type ThresholdRuleCondition struct {
	// Operator - the operator used to compare the data and the threshold. Possible values include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'
	Operator ConditionOperator `json:"operator,omitempty"`
	// Threshold - the threshold value that activates the alert.
	Threshold *float64 `json:"threshold,omitempty"`
	// WindowSize - the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
	WindowSize *string `json:"windowSize,omitempty"`
	// TimeAggregation - the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Last'
	TimeAggregation TimeAggregationOperator `json:"timeAggregation,omitempty"`
	// DataSource - the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
	DataSource BasicRuleDataSource `json:"dataSource,omitempty"`
	// OdataType - Possible values include: 'OdataTypeRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition', 'OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition'
	OdataType OdataTypeBasicRuleCondition `json:"odata.type,omitempty"`
}

ThresholdRuleCondition a rule condition based on a metric crossing a threshold.

func (ThresholdRuleCondition) AsBasicRuleCondition

func (trc ThresholdRuleCondition) AsBasicRuleCondition() (BasicRuleCondition, bool)

AsBasicRuleCondition is the BasicRuleCondition implementation for ThresholdRuleCondition.

func (ThresholdRuleCondition) AsLocationThresholdRuleCondition

func (trc ThresholdRuleCondition) AsLocationThresholdRuleCondition() (*LocationThresholdRuleCondition, bool)

AsLocationThresholdRuleCondition is the BasicRuleCondition implementation for ThresholdRuleCondition.

func (ThresholdRuleCondition) AsManagementEventRuleCondition

func (trc ThresholdRuleCondition) AsManagementEventRuleCondition() (*ManagementEventRuleCondition, bool)

AsManagementEventRuleCondition is the BasicRuleCondition implementation for ThresholdRuleCondition.

func (ThresholdRuleCondition) AsRuleCondition

func (trc ThresholdRuleCondition) AsRuleCondition() (*RuleCondition, bool)

AsRuleCondition is the BasicRuleCondition implementation for ThresholdRuleCondition.

func (ThresholdRuleCondition) AsThresholdRuleCondition

func (trc ThresholdRuleCondition) AsThresholdRuleCondition() (*ThresholdRuleCondition, bool)

AsThresholdRuleCondition is the BasicRuleCondition implementation for ThresholdRuleCondition.

func (ThresholdRuleCondition) MarshalJSON

func (trc ThresholdRuleCondition) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ThresholdRuleCondition.

func (*ThresholdRuleCondition) UnmarshalJSON

func (trc *ThresholdRuleCondition) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ThresholdRuleCondition struct.

type TimeAggregationOperator

type TimeAggregationOperator string

TimeAggregationOperator enumerates the values for time aggregation operator.

const (
	// Average ...
	Average TimeAggregationOperator = "Average"
	// Last ...
	Last TimeAggregationOperator = "Last"
	// Maximum ...
	Maximum TimeAggregationOperator = "Maximum"
	// Minimum ...
	Minimum TimeAggregationOperator = "Minimum"
	// Total ...
	Total TimeAggregationOperator = "Total"
)

func PossibleTimeAggregationOperatorValues

func PossibleTimeAggregationOperatorValues() []TimeAggregationOperator

PossibleTimeAggregationOperatorValues returns an array of possible values for the TimeAggregationOperator const type.

type VMInsightsClient

type VMInsightsClient struct {
	BaseClient
}

VMInsightsClient is the monitor Management Client

func NewVMInsightsClient

func NewVMInsightsClient(subscriptionID string) VMInsightsClient

NewVMInsightsClient creates an instance of the VMInsightsClient client.

func NewVMInsightsClientWithBaseURI

func NewVMInsightsClientWithBaseURI(baseURI string, subscriptionID string) VMInsightsClient

NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient 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 (VMInsightsClient) GetOnboardingStatus

func (client VMInsightsClient) GetOnboardingStatus(ctx context.Context, resourceURI string) (result VMInsightsOnboardingStatus, err error)

GetOnboardingStatus retrieves the VM Insights onboarding status for the specified resource or resource scope. Parameters: resourceURI - the fully qualified Azure Resource manager identifier of the resource, or scope, whose status to retrieve.

func (VMInsightsClient) GetOnboardingStatusPreparer

func (client VMInsightsClient) GetOnboardingStatusPreparer(ctx context.Context, resourceURI string) (*http.Request, error)

GetOnboardingStatusPreparer prepares the GetOnboardingStatus request.

func (VMInsightsClient) GetOnboardingStatusResponder

func (client VMInsightsClient) GetOnboardingStatusResponder(resp *http.Response) (result VMInsightsOnboardingStatus, err error)

GetOnboardingStatusResponder handles the response to the GetOnboardingStatus request. The method always closes the http.Response Body.

func (VMInsightsClient) GetOnboardingStatusSender

func (client VMInsightsClient) GetOnboardingStatusSender(req *http.Request) (*http.Response, error)

GetOnboardingStatusSender sends the GetOnboardingStatus request. The method will close the http.Response Body if it receives an error.

type VMInsightsOnboardingStatus

type VMInsightsOnboardingStatus struct {
	autorest.Response `json:"-"`
	// VMInsightsOnboardingStatusProperties - Resource properties.
	*VMInsightsOnboardingStatusProperties `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"`
}

VMInsightsOnboardingStatus VM Insights onboarding status for a resource.

func (VMInsightsOnboardingStatus) MarshalJSON

func (vios VMInsightsOnboardingStatus) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for VMInsightsOnboardingStatus.

func (*VMInsightsOnboardingStatus) UnmarshalJSON

func (vios *VMInsightsOnboardingStatus) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for VMInsightsOnboardingStatus struct.

type VMInsightsOnboardingStatusProperties

type VMInsightsOnboardingStatusProperties struct {
	// ResourceID - Azure Resource Manager identifier of the resource whose onboarding status is being represented.
	ResourceID *string `json:"resourceId,omitempty"`
	// OnboardingStatus - The onboarding status for the resource. Note that, a higher level scope, e.g., resource group or subscription, is considered onboarded if at least one resource under it is onboarded. Possible values include: 'Onboarded', 'NotOnboarded', 'Unknown'
	OnboardingStatus OnboardingStatus `json:"onboardingStatus,omitempty"`
	// DataStatus - The status of VM Insights data from the resource. When reported as `present` the data array will contain information about the data containers to which data for the specified resource is being routed. Possible values include: 'Present', 'NotPresent'
	DataStatus DataStatus `json:"dataStatus,omitempty"`
	// Data - Containers that currently store VM Insights data for the specified resource.
	Data *[]DataContainer `json:"data,omitempty"`
}

VMInsightsOnboardingStatusProperties resource properties.

type WorkspaceInfo

type WorkspaceInfo struct {
	// ID - Azure Resource Manager identifier of the Log Analytics Workspace.
	ID *string `json:"id,omitempty"`
	// Location - Location of the Log Analytics workspace.
	Location *string `json:"location,omitempty"`
	// WorkspaceInfoProperties - Resource properties.
	*WorkspaceInfoProperties `json:"properties,omitempty"`
}

WorkspaceInfo information about a Log Analytics Workspace.

func (WorkspaceInfo) MarshalJSON

func (wi WorkspaceInfo) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for WorkspaceInfo.

func (*WorkspaceInfo) UnmarshalJSON

func (wi *WorkspaceInfo) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for WorkspaceInfo struct.

type WorkspaceInfoProperties

type WorkspaceInfoProperties struct {
	// CustomerID - Log Analytics workspace identifier.
	CustomerID *string `json:"customerId,omitempty"`
}

WorkspaceInfoProperties resource properties.

Directories

Path Synopsis
Deprecated: Please note, this package has been deprecated.
Deprecated: Please note, this package has been deprecated.

Jump to

Keyboard shortcuts

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