alertssuppressionrules

package
v0.20240903.1131440 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/alertssuppressionrules Documentation

The alertssuppressionrules SDK allows for interaction with the Azure Resource Manager Service security (API Version 2019-01-01-preview).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/security/2019-01-01-preview/alertssuppressionrules"

Client Initialization

client := alertssuppressionrules.NewAlertsSuppressionRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AlertsSuppressionRulesClient.Delete

ctx := context.TODO()
id := alertssuppressionrules.NewAlertsSuppressionRuleID("12345678-1234-9876-4563-123456789012", "alertsSuppressionRuleValue")

read, err := client.Delete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AlertsSuppressionRulesClient.Get

ctx := context.TODO()
id := alertssuppressionrules.NewAlertsSuppressionRuleID("12345678-1234-9876-4563-123456789012", "alertsSuppressionRuleValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: AlertsSuppressionRulesClient.List

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.List(ctx, id, alertssuppressionrules.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, alertssuppressionrules.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: AlertsSuppressionRulesClient.Update

ctx := context.TODO()
id := alertssuppressionrules.NewAlertsSuppressionRuleID("12345678-1234-9876-4563-123456789012", "alertsSuppressionRuleValue")

payload := alertssuppressionrules.AlertsSuppressionRule{
	// ...
}


read, err := client.Update(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForRuleState

func PossibleValuesForRuleState() []string

func ValidateAlertsSuppressionRuleID

func ValidateAlertsSuppressionRuleID(input interface{}, key string) (warnings []string, errors []error)

ValidateAlertsSuppressionRuleID checks that 'input' can be parsed as a Alerts Suppression Rule ID

Types

type AlertsSuppressionRule

type AlertsSuppressionRule struct {
	Id         *string                          `json:"id,omitempty"`
	Name       *string                          `json:"name,omitempty"`
	Properties *AlertsSuppressionRuleProperties `json:"properties,omitempty"`
	Type       *string                          `json:"type,omitempty"`
}

type AlertsSuppressionRuleId

type AlertsSuppressionRuleId struct {
	SubscriptionId            string
	AlertsSuppressionRuleName string
}

AlertsSuppressionRuleId is a struct representing the Resource ID for a Alerts Suppression Rule

func NewAlertsSuppressionRuleID

func NewAlertsSuppressionRuleID(subscriptionId string, alertsSuppressionRuleName string) AlertsSuppressionRuleId

NewAlertsSuppressionRuleID returns a new AlertsSuppressionRuleId struct

func ParseAlertsSuppressionRuleID

func ParseAlertsSuppressionRuleID(input string) (*AlertsSuppressionRuleId, error)

ParseAlertsSuppressionRuleID parses 'input' into a AlertsSuppressionRuleId

func ParseAlertsSuppressionRuleIDInsensitively

func ParseAlertsSuppressionRuleIDInsensitively(input string) (*AlertsSuppressionRuleId, error)

ParseAlertsSuppressionRuleIDInsensitively parses 'input' case-insensitively into a AlertsSuppressionRuleId note: this method should only be used for API response data and not user input

func (*AlertsSuppressionRuleId) FromParseResult

func (id *AlertsSuppressionRuleId) FromParseResult(input resourceids.ParseResult) error

func (AlertsSuppressionRuleId) ID

ID returns the formatted Alerts Suppression Rule ID

func (AlertsSuppressionRuleId) Segments

Segments returns a slice of Resource ID Segments which comprise this Alerts Suppression Rule ID

func (AlertsSuppressionRuleId) String

func (id AlertsSuppressionRuleId) String() string

String returns a human-readable description of this Alerts Suppression Rule ID

type AlertsSuppressionRuleOperationPredicate

type AlertsSuppressionRuleOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (AlertsSuppressionRuleOperationPredicate) Matches

type AlertsSuppressionRuleProperties

type AlertsSuppressionRuleProperties struct {
	AlertType              string                  `json:"alertType"`
	Comment                *string                 `json:"comment,omitempty"`
	ExpirationDateUtc      *string                 `json:"expirationDateUtc,omitempty"`
	LastModifiedUtc        *string                 `json:"lastModifiedUtc,omitempty"`
	Reason                 string                  `json:"reason"`
	State                  RuleState               `json:"state"`
	SuppressionAlertsScope *SuppressionAlertsScope `json:"suppressionAlertsScope,omitempty"`
}

func (*AlertsSuppressionRuleProperties) GetExpirationDateUtcAsTime

func (o *AlertsSuppressionRuleProperties) GetExpirationDateUtcAsTime() (*time.Time, error)

func (*AlertsSuppressionRuleProperties) GetLastModifiedUtcAsTime

func (o *AlertsSuppressionRuleProperties) GetLastModifiedUtcAsTime() (*time.Time, error)

func (*AlertsSuppressionRuleProperties) SetExpirationDateUtcAsTime

func (o *AlertsSuppressionRuleProperties) SetExpirationDateUtcAsTime(input time.Time)

func (*AlertsSuppressionRuleProperties) SetLastModifiedUtcAsTime

func (o *AlertsSuppressionRuleProperties) SetLastModifiedUtcAsTime(input time.Time)

type AlertsSuppressionRulesClient

type AlertsSuppressionRulesClient struct {
	Client *resourcemanager.Client
}

func NewAlertsSuppressionRulesClientWithBaseURI

func NewAlertsSuppressionRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*AlertsSuppressionRulesClient, error)

func (AlertsSuppressionRulesClient) Delete

Delete ...

func (AlertsSuppressionRulesClient) Get

Get ...

func (AlertsSuppressionRulesClient) List

List ...

func (AlertsSuppressionRulesClient) ListComplete

ListComplete retrieves all the results into a single object

func (AlertsSuppressionRulesClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AlertsSuppressionRulesClient) Update

Update ...

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AlertsSuppressionRule
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AlertsSuppressionRule
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	AlertType *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20240228.1142829

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData added in v0.20240228.1142829

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery added in v0.20240228.1142829

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AlertsSuppressionRule
}

type RuleState

type RuleState string
const (
	RuleStateDisabled RuleState = "Disabled"
	RuleStateEnabled  RuleState = "Enabled"
	RuleStateExpired  RuleState = "Expired"
)

func (*RuleState) UnmarshalJSON added in v0.20240228.1142829

func (s *RuleState) UnmarshalJSON(bytes []byte) error

type ScopeElement

type ScopeElement struct {
	Field *string `json:"field,omitempty"`
}

type SuppressionAlertsScope

type SuppressionAlertsScope struct {
	AllOf []ScopeElement `json:"allOf"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AlertsSuppressionRule
}

Jump to

Keyboard shortcuts

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