const ( // DefaultBaseURI is the default URI used for the service Insights DefaultBaseURI = "https://management.azure.com" )
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
ActionGroup a pointer to an Azure Action Group.
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"` }
func (ag ActionGroup) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ActionGroup.
ActionList a list of Activity Log Alert rule actions.
type ActionList struct { // ActionGroups - The list of the Action Groups. ActionGroups *[]ActionGroup `json:"actionGroups,omitempty"` }
ActivityLogAlertResource an Activity Log Alert rule resource.
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"` }
func (alar ActivityLogAlertResource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ActivityLogAlertResource.
func (alar *ActivityLogAlertResource) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ActivityLogAlertResource struct.
ActivityLogAlertsClient is the monitor Management Client
type ActivityLogAlertsClient struct { BaseClient }
func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient
NewActivityLogAlertsClient creates an instance of the ActivityLogAlertsClient client.
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 (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 (client ActivityLogAlertsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRule ActivityLogAlertResource) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
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 (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 (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 (client ActivityLogAlertsClient) DeletePreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
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 (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 (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 (client ActivityLogAlertsClient) GetPreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string) (*http.Request, error)
GetPreparer prepares the Get request.
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 (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 (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 (client ActivityLogAlertsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result AlertRuleListIterator, err error)
ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ActivityLogAlertsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)
ListByResourceGroupPreparer prepares the ListByResourceGroup request.
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 (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 (client ActivityLogAlertsClient) ListBySubscriptionID(ctx context.Context) (result AlertRuleListPage, err error)
ListBySubscriptionID get a list of all Activity Log Alert rules in a subscription.
func (client ActivityLogAlertsClient) ListBySubscriptionIDComplete(ctx context.Context) (result AlertRuleListIterator, err error)
ListBySubscriptionIDComplete enumerates all values, automatically crossing page boundaries as required.
func (client ActivityLogAlertsClient) ListBySubscriptionIDPreparer(ctx context.Context) (*http.Request, error)
ListBySubscriptionIDPreparer prepares the ListBySubscriptionID request.
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 (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 (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 (client ActivityLogAlertsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertRulePatch AlertRulePatchObject) (*http.Request, error)
UpdatePreparer prepares the Update request.
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 (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.
AlertRuleAllOfCondition an Activity Log Alert rule condition that is met when all its member conditions are met.
type AlertRuleAllOfCondition struct { // AllOf - The list of Activity Log Alert rule conditions. AllOf *[]AlertRuleAnyOfOrLeafCondition `json:"allOf,omitempty"` }
AlertRuleAnyOfOrLeafCondition an Activity Log Alert rule condition that is met when all its member conditions are met. Each condition can be of one of the following types: __Important__: Each type has its unique subset of properties. Properties from different types CANNOT exist in one condition. * __Leaf Condition -__ must contain 'field' and either 'equals' or 'containsAny'. _Please note, 'anyOf' should __not__ be set in a Leaf Condition._ * __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array of Leaf Conditions). _Please note, 'field', 'equals' and 'containsAny' should __not__ be set in an AnyOf Condition._
type AlertRuleAnyOfOrLeafCondition struct { // AnyOf - An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met. AnyOf *[]AlertRuleLeafCondition `json:"anyOf,omitempty"` // Field - The name of the Activity Log event's field that this condition will examine. // The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'. Field *string `json:"field,omitempty"` // Equals - The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. Equals *string `json:"equals,omitempty"` // ContainsAny - The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met. ContainsAny *[]string `json:"containsAny,omitempty"` }
AlertRuleLeafCondition an Activity Log Alert rule condition that is met by comparing the field and value of an Activity Log event. This condition must contain 'field' and either 'equals' or 'containsAny'.
type AlertRuleLeafCondition struct { // Field - The name of the Activity Log event's field that this condition will examine. // The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'. Field *string `json:"field,omitempty"` // Equals - The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. Equals *string `json:"equals,omitempty"` // ContainsAny - The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met. ContainsAny *[]string `json:"containsAny,omitempty"` }
AlertRuleList a list of Activity Log Alert rules.
type AlertRuleList struct { autorest.Response `json:"-"` // Value - The list of Activity Log Alert rules. Value *[]ActivityLogAlertResource `json:"value,omitempty"` // NextLink - Provides the link to retrieve the next set of elements. NextLink *string `json:"nextLink,omitempty"` }
func (arl AlertRuleList) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
AlertRuleListIterator provides access to a complete listing of ActivityLogAlertResource values.
type AlertRuleListIterator struct {
// contains filtered or unexported fields
}
func NewAlertRuleListIterator(page AlertRuleListPage) AlertRuleListIterator
Creates a new instance of the AlertRuleListIterator type.
func (iter *AlertRuleListIterator) Next() error
Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.
func (iter *AlertRuleListIterator) NextWithContext(ctx context.Context) (err error)
NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.
func (iter AlertRuleListIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AlertRuleListIterator) Response() AlertRuleList
Response returns the raw server response from the last page request.
func (iter AlertRuleListIterator) Value() ActivityLogAlertResource
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
AlertRuleListPage contains a page of ActivityLogAlertResource values.
type AlertRuleListPage struct {
// contains filtered or unexported fields
}
func NewAlertRuleListPage(cur AlertRuleList, getNextPage func(context.Context, AlertRuleList) (AlertRuleList, error)) AlertRuleListPage
Creates a new instance of the AlertRuleListPage type.
func (page *AlertRuleListPage) Next() error
Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.
func (page *AlertRuleListPage) NextWithContext(ctx context.Context) (err error)
NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.
func (page AlertRuleListPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AlertRuleListPage) Response() AlertRuleList
Response returns the raw server response from the last page request.
func (page AlertRuleListPage) Values() []ActivityLogAlertResource
Values returns the slice of values for the current page or nil if there are no values.
AlertRulePatchObject an Activity Log Alert rule object for the body of patch operations.
type AlertRulePatchObject struct { // Tags - The resource tags Tags map[string]*string `json:"tags"` // AlertRulePatchProperties - The activity log alert settings for an update operation. *AlertRulePatchProperties `json:"properties,omitempty"` }
func (arpo AlertRulePatchObject) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AlertRulePatchObject.
func (arpo *AlertRulePatchObject) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for AlertRulePatchObject struct.
AlertRulePatchProperties an Activity Log Alert rule properties for patch operations.
type AlertRulePatchProperties struct { // Enabled - Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated. Enabled *bool `json:"enabled,omitempty"` }
AlertRuleProperties an Azure Activity Log Alert rule.
type AlertRuleProperties struct { // Scopes - A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item. Scopes *[]string `json:"scopes,omitempty"` // Condition - The condition that will cause this alert to activate. Condition *AlertRuleAllOfCondition `json:"condition,omitempty"` // Actions - The actions that will activate when the condition is met. Actions *ActionList `json:"actions,omitempty"` // Enabled - Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated. Enabled *bool `json:"enabled,omitempty"` // Description - A description of this Activity Log Alert rule. Description *string `json:"description,omitempty"` }
AzureResource an Azure resource object.
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"` }
func (ar AzureResource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AzureResource.
BaseClient is the base client for Insights.
type BaseClient struct { autorest.Client BaseURI string SubscriptionID string }
func New(subscriptionID string) BaseClient
New creates an instance of the BaseClient client.
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient
NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
ErrorResponse the error response.
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"` }
func (er ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ErrorResponse.
Name | Synopsis |
---|---|
.. | |
insightsapi | Deprecated: Please note, this package has been deprecated. |