datacollectionrules

package
v0.20240404.1145457 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-04-01/datacollectionrules Documentation

The datacollectionrules SDK allows for interaction with the Azure Resource Manager Service insights (API Version 2021-04-01).

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/insights/2021-04-01/datacollectionrules"

Client Initialization

client := datacollectionrules.NewDataCollectionRulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DataCollectionRulesClient.Create

ctx := context.TODO()
id := datacollectionrules.NewDataCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataCollectionRuleValue")

payload := datacollectionrules.DataCollectionRuleResource{
	// ...
}


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

Example Usage: DataCollectionRulesClient.Delete

ctx := context.TODO()
id := datacollectionrules.NewDataCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataCollectionRuleValue")

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: DataCollectionRulesClient.Get

ctx := context.TODO()
id := datacollectionrules.NewDataCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataCollectionRuleValue")

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: DataCollectionRulesClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

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

Example Usage: DataCollectionRulesClient.ListBySubscription

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

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

Example Usage: DataCollectionRulesClient.Update

ctx := context.TODO()
id := datacollectionrules.NewDataCollectionRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dataCollectionRuleValue")

payload := datacollectionrules.ResourceForUpdate{
	// ...
}


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 PossibleValuesForKnownDataCollectionRuleProvisioningState

func PossibleValuesForKnownDataCollectionRuleProvisioningState() []string

func PossibleValuesForKnownDataCollectionRuleResourceKind

func PossibleValuesForKnownDataCollectionRuleResourceKind() []string

func PossibleValuesForKnownDataFlowStreams

func PossibleValuesForKnownDataFlowStreams() []string

func PossibleValuesForKnownExtensionDataSourceStreams

func PossibleValuesForKnownExtensionDataSourceStreams() []string

func PossibleValuesForKnownPerfCounterDataSourceStreams

func PossibleValuesForKnownPerfCounterDataSourceStreams() []string

func PossibleValuesForKnownSyslogDataSourceFacilityNames

func PossibleValuesForKnownSyslogDataSourceFacilityNames() []string

func PossibleValuesForKnownSyslogDataSourceLogLevels

func PossibleValuesForKnownSyslogDataSourceLogLevels() []string

func PossibleValuesForKnownSyslogDataSourceStreams

func PossibleValuesForKnownSyslogDataSourceStreams() []string

func PossibleValuesForKnownWindowsEventLogDataSourceStreams

func PossibleValuesForKnownWindowsEventLogDataSourceStreams() []string

func ValidateDataCollectionRuleID

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

ValidateDataCollectionRuleID checks that 'input' can be parsed as a Data Collection Rule ID

Types

type AzureMonitorMetricsDestination

type AzureMonitorMetricsDestination struct {
	Name *string `json:"name,omitempty"`
}

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DataCollectionRuleResource
}

type DataCollectionRule

type DataCollectionRule struct {
	DataFlows         *[]DataFlow                               `json:"dataFlows,omitempty"`
	DataSources       *DataSourcesSpec                          `json:"dataSources,omitempty"`
	Description       *string                                   `json:"description,omitempty"`
	Destinations      *DestinationsSpec                         `json:"destinations,omitempty"`
	ImmutableId       *string                                   `json:"immutableId,omitempty"`
	ProvisioningState *KnownDataCollectionRuleProvisioningState `json:"provisioningState,omitempty"`
}

type DataCollectionRuleId

type DataCollectionRuleId struct {
	SubscriptionId         string
	ResourceGroupName      string
	DataCollectionRuleName string
}

DataCollectionRuleId is a struct representing the Resource ID for a Data Collection Rule

func NewDataCollectionRuleID

func NewDataCollectionRuleID(subscriptionId string, resourceGroupName string, dataCollectionRuleName string) DataCollectionRuleId

NewDataCollectionRuleID returns a new DataCollectionRuleId struct

func ParseDataCollectionRuleID

func ParseDataCollectionRuleID(input string) (*DataCollectionRuleId, error)

ParseDataCollectionRuleID parses 'input' into a DataCollectionRuleId

func ParseDataCollectionRuleIDInsensitively

func ParseDataCollectionRuleIDInsensitively(input string) (*DataCollectionRuleId, error)

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

func (*DataCollectionRuleId) FromParseResult

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

func (DataCollectionRuleId) ID

func (id DataCollectionRuleId) ID() string

ID returns the formatted Data Collection Rule ID

func (DataCollectionRuleId) Segments

func (id DataCollectionRuleId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Data Collection Rule ID

func (DataCollectionRuleId) String

func (id DataCollectionRuleId) String() string

String returns a human-readable description of this Data Collection Rule ID

type DataCollectionRuleResource

type DataCollectionRuleResource struct {
	Etag       *string                              `json:"etag,omitempty"`
	Id         *string                              `json:"id,omitempty"`
	Kind       *KnownDataCollectionRuleResourceKind `json:"kind,omitempty"`
	Location   string                               `json:"location"`
	Name       *string                              `json:"name,omitempty"`
	Properties *DataCollectionRule                  `json:"properties,omitempty"`
	SystemData *systemdata.SystemData               `json:"systemData,omitempty"`
	Tags       *map[string]string                   `json:"tags,omitempty"`
	Type       *string                              `json:"type,omitempty"`
}

type DataCollectionRuleResourceOperationPredicate

type DataCollectionRuleResourceOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (DataCollectionRuleResourceOperationPredicate) Matches

type DataCollectionRulesClient

type DataCollectionRulesClient struct {
	Client *resourcemanager.Client
}

func NewDataCollectionRulesClientWithBaseURI

func NewDataCollectionRulesClientWithBaseURI(sdkApi sdkEnv.Api) (*DataCollectionRulesClient, error)

func (DataCollectionRulesClient) Create

Create ...

func (DataCollectionRulesClient) Delete

Delete ...

func (DataCollectionRulesClient) Get

Get ...

func (DataCollectionRulesClient) ListByResourceGroup

ListByResourceGroup ...

func (DataCollectionRulesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (DataCollectionRulesClient) ListByResourceGroupCompleteMatchingPredicate

func (c DataCollectionRulesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DataCollectionRuleResourceOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DataCollectionRulesClient) ListBySubscription

ListBySubscription ...

func (DataCollectionRulesClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (DataCollectionRulesClient) ListBySubscriptionCompleteMatchingPredicate

func (c DataCollectionRulesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DataCollectionRuleResourceOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DataCollectionRulesClient) Update

Update ...

type DataFlow

type DataFlow struct {
	Destinations *[]string               `json:"destinations,omitempty"`
	Streams      *[]KnownDataFlowStreams `json:"streams,omitempty"`
}

type DataSourcesSpec

type DataSourcesSpec struct {
	Extensions          *[]ExtensionDataSource       `json:"extensions,omitempty"`
	PerformanceCounters *[]PerfCounterDataSource     `json:"performanceCounters,omitempty"`
	Syslog              *[]SyslogDataSource          `json:"syslog,omitempty"`
	WindowsEventLogs    *[]WindowsEventLogDataSource `json:"windowsEventLogs,omitempty"`
}

type DeleteOperationResponse

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

type DestinationsSpec

type DestinationsSpec struct {
	AzureMonitorMetrics *AzureMonitorMetricsDestination `json:"azureMonitorMetrics,omitempty"`
	LogAnalytics        *[]LogAnalyticsDestination      `json:"logAnalytics,omitempty"`
}

type ExtensionDataSource

type ExtensionDataSource struct {
	ExtensionName     string                             `json:"extensionName"`
	ExtensionSettings *interface{}                       `json:"extensionSettings,omitempty"`
	InputDataSources  *[]string                          `json:"inputDataSources,omitempty"`
	Name              *string                            `json:"name,omitempty"`
	Streams           *[]KnownExtensionDataSourceStreams `json:"streams,omitempty"`
}

type GetOperationResponse

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

type KnownDataCollectionRuleProvisioningState

type KnownDataCollectionRuleProvisioningState string
const (
	KnownDataCollectionRuleProvisioningStateCreating  KnownDataCollectionRuleProvisioningState = "Creating"
	KnownDataCollectionRuleProvisioningStateDeleting  KnownDataCollectionRuleProvisioningState = "Deleting"
	KnownDataCollectionRuleProvisioningStateFailed    KnownDataCollectionRuleProvisioningState = "Failed"
	KnownDataCollectionRuleProvisioningStateSucceeded KnownDataCollectionRuleProvisioningState = "Succeeded"
	KnownDataCollectionRuleProvisioningStateUpdating  KnownDataCollectionRuleProvisioningState = "Updating"
)

func (*KnownDataCollectionRuleProvisioningState) UnmarshalJSON added in v0.20240229.1102109

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

type KnownDataCollectionRuleResourceKind

type KnownDataCollectionRuleResourceKind string
const (
	KnownDataCollectionRuleResourceKindLinux   KnownDataCollectionRuleResourceKind = "Linux"
	KnownDataCollectionRuleResourceKindWindows KnownDataCollectionRuleResourceKind = "Windows"
)

func (*KnownDataCollectionRuleResourceKind) UnmarshalJSON added in v0.20240229.1102109

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

type KnownDataFlowStreams

type KnownDataFlowStreams string
const (
	KnownDataFlowStreamsMicrosoftNegativeEvent           KnownDataFlowStreams = "Microsoft-Event"
	KnownDataFlowStreamsMicrosoftNegativeInsightsMetrics KnownDataFlowStreams = "Microsoft-InsightsMetrics"
	KnownDataFlowStreamsMicrosoftNegativePerf            KnownDataFlowStreams = "Microsoft-Perf"
	KnownDataFlowStreamsMicrosoftNegativeSyslog          KnownDataFlowStreams = "Microsoft-Syslog"
	KnownDataFlowStreamsMicrosoftNegativeWindowsEvent    KnownDataFlowStreams = "Microsoft-WindowsEvent"
)

func (*KnownDataFlowStreams) UnmarshalJSON added in v0.20240229.1102109

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

type KnownExtensionDataSourceStreams

type KnownExtensionDataSourceStreams string
const (
	KnownExtensionDataSourceStreamsMicrosoftNegativeEvent           KnownExtensionDataSourceStreams = "Microsoft-Event"
	KnownExtensionDataSourceStreamsMicrosoftNegativeInsightsMetrics KnownExtensionDataSourceStreams = "Microsoft-InsightsMetrics"
	KnownExtensionDataSourceStreamsMicrosoftNegativePerf            KnownExtensionDataSourceStreams = "Microsoft-Perf"
	KnownExtensionDataSourceStreamsMicrosoftNegativeSyslog          KnownExtensionDataSourceStreams = "Microsoft-Syslog"
	KnownExtensionDataSourceStreamsMicrosoftNegativeWindowsEvent    KnownExtensionDataSourceStreams = "Microsoft-WindowsEvent"
)

func (*KnownExtensionDataSourceStreams) UnmarshalJSON added in v0.20240229.1102109

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

type KnownPerfCounterDataSourceStreams

type KnownPerfCounterDataSourceStreams string
const (
	KnownPerfCounterDataSourceStreamsMicrosoftNegativeInsightsMetrics KnownPerfCounterDataSourceStreams = "Microsoft-InsightsMetrics"
	KnownPerfCounterDataSourceStreamsMicrosoftNegativePerf            KnownPerfCounterDataSourceStreams = "Microsoft-Perf"
)

func (*KnownPerfCounterDataSourceStreams) UnmarshalJSON added in v0.20240229.1102109

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

type KnownSyslogDataSourceFacilityNames

type KnownSyslogDataSourceFacilityNames string
const (
	KnownSyslogDataSourceFacilityNamesAlert      KnownSyslogDataSourceFacilityNames = "alert"
	KnownSyslogDataSourceFacilityNamesAny        KnownSyslogDataSourceFacilityNames = "*"
	KnownSyslogDataSourceFacilityNamesAudit      KnownSyslogDataSourceFacilityNames = "audit"
	KnownSyslogDataSourceFacilityNamesAuth       KnownSyslogDataSourceFacilityNames = "auth"
	KnownSyslogDataSourceFacilityNamesAuthpriv   KnownSyslogDataSourceFacilityNames = "authpriv"
	KnownSyslogDataSourceFacilityNamesClock      KnownSyslogDataSourceFacilityNames = "clock"
	KnownSyslogDataSourceFacilityNamesCron       KnownSyslogDataSourceFacilityNames = "cron"
	KnownSyslogDataSourceFacilityNamesDaemon     KnownSyslogDataSourceFacilityNames = "daemon"
	KnownSyslogDataSourceFacilityNamesFtp        KnownSyslogDataSourceFacilityNames = "ftp"
	KnownSyslogDataSourceFacilityNamesKern       KnownSyslogDataSourceFacilityNames = "kern"
	KnownSyslogDataSourceFacilityNamesLocalFive  KnownSyslogDataSourceFacilityNames = "local5"
	KnownSyslogDataSourceFacilityNamesLocalFour  KnownSyslogDataSourceFacilityNames = "local4"
	KnownSyslogDataSourceFacilityNamesLocalOne   KnownSyslogDataSourceFacilityNames = "local1"
	KnownSyslogDataSourceFacilityNamesLocalSeven KnownSyslogDataSourceFacilityNames = "local7"
	KnownSyslogDataSourceFacilityNamesLocalSix   KnownSyslogDataSourceFacilityNames = "local6"
	KnownSyslogDataSourceFacilityNamesLocalThree KnownSyslogDataSourceFacilityNames = "local3"
	KnownSyslogDataSourceFacilityNamesLocalTwo   KnownSyslogDataSourceFacilityNames = "local2"
	KnownSyslogDataSourceFacilityNamesLocalZero  KnownSyslogDataSourceFacilityNames = "local0"
	KnownSyslogDataSourceFacilityNamesLpr        KnownSyslogDataSourceFacilityNames = "lpr"
	KnownSyslogDataSourceFacilityNamesMail       KnownSyslogDataSourceFacilityNames = "mail"
	KnownSyslogDataSourceFacilityNamesMark       KnownSyslogDataSourceFacilityNames = "mark"
	KnownSyslogDataSourceFacilityNamesNews       KnownSyslogDataSourceFacilityNames = "news"
	KnownSyslogDataSourceFacilityNamesNopri      KnownSyslogDataSourceFacilityNames = "nopri"
	KnownSyslogDataSourceFacilityNamesNtp        KnownSyslogDataSourceFacilityNames = "ntp"
	KnownSyslogDataSourceFacilityNamesSyslog     KnownSyslogDataSourceFacilityNames = "syslog"
	KnownSyslogDataSourceFacilityNamesUser       KnownSyslogDataSourceFacilityNames = "user"
	KnownSyslogDataSourceFacilityNamesUucp       KnownSyslogDataSourceFacilityNames = "uucp"
)

func (*KnownSyslogDataSourceFacilityNames) UnmarshalJSON added in v0.20240229.1102109

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

type KnownSyslogDataSourceLogLevels

type KnownSyslogDataSourceLogLevels string
const (
	KnownSyslogDataSourceLogLevelsAlert     KnownSyslogDataSourceLogLevels = "Alert"
	KnownSyslogDataSourceLogLevelsAny       KnownSyslogDataSourceLogLevels = "*"
	KnownSyslogDataSourceLogLevelsCritical  KnownSyslogDataSourceLogLevels = "Critical"
	KnownSyslogDataSourceLogLevelsDebug     KnownSyslogDataSourceLogLevels = "Debug"
	KnownSyslogDataSourceLogLevelsEmergency KnownSyslogDataSourceLogLevels = "Emergency"
	KnownSyslogDataSourceLogLevelsError     KnownSyslogDataSourceLogLevels = "Error"
	KnownSyslogDataSourceLogLevelsInfo      KnownSyslogDataSourceLogLevels = "Info"
	KnownSyslogDataSourceLogLevelsNotice    KnownSyslogDataSourceLogLevels = "Notice"
	KnownSyslogDataSourceLogLevelsWarning   KnownSyslogDataSourceLogLevels = "Warning"
)

func (*KnownSyslogDataSourceLogLevels) UnmarshalJSON added in v0.20240229.1102109

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

type KnownSyslogDataSourceStreams

type KnownSyslogDataSourceStreams string
const (
	KnownSyslogDataSourceStreamsMicrosoftNegativeSyslog KnownSyslogDataSourceStreams = "Microsoft-Syslog"
)

func (*KnownSyslogDataSourceStreams) UnmarshalJSON added in v0.20240229.1102109

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

type KnownWindowsEventLogDataSourceStreams

type KnownWindowsEventLogDataSourceStreams string
const (
	KnownWindowsEventLogDataSourceStreamsMicrosoftNegativeEvent        KnownWindowsEventLogDataSourceStreams = "Microsoft-Event"
	KnownWindowsEventLogDataSourceStreamsMicrosoftNegativeWindowsEvent KnownWindowsEventLogDataSourceStreams = "Microsoft-WindowsEvent"
)

func (*KnownWindowsEventLogDataSourceStreams) UnmarshalJSON added in v0.20240229.1102109

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DataCollectionRuleResource
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DataCollectionRuleResource
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DataCollectionRuleResource
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DataCollectionRuleResource
}

type LogAnalyticsDestination

type LogAnalyticsDestination struct {
	Name                *string `json:"name,omitempty"`
	WorkspaceId         *string `json:"workspaceId,omitempty"`
	WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"`
}

type PerfCounterDataSource

type PerfCounterDataSource struct {
	CounterSpecifiers          *[]string                            `json:"counterSpecifiers,omitempty"`
	Name                       *string                              `json:"name,omitempty"`
	SamplingFrequencyInSeconds *int64                               `json:"samplingFrequencyInSeconds,omitempty"`
	Streams                    *[]KnownPerfCounterDataSourceStreams `json:"streams,omitempty"`
}

type ResourceForUpdate

type ResourceForUpdate struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type SyslogDataSource

type SyslogDataSource struct {
	FacilityNames *[]KnownSyslogDataSourceFacilityNames `json:"facilityNames,omitempty"`
	LogLevels     *[]KnownSyslogDataSourceLogLevels     `json:"logLevels,omitempty"`
	Name          *string                               `json:"name,omitempty"`
	Streams       *[]KnownSyslogDataSourceStreams       `json:"streams,omitempty"`
}

type UpdateOperationResponse

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

type WindowsEventLogDataSource

type WindowsEventLogDataSource struct {
	Name         *string                                  `json:"name,omitempty"`
	Streams      *[]KnownWindowsEventLogDataSourceStreams `json:"streams,omitempty"`
	XPathQueries *[]string                                `json:"xPathQueries,omitempty"`
}

Jump to

Keyboard shortcuts

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