diagnosticsettings

package
v0.20231213.1165453 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MPL-2.0 Imports: 9 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings Documentation

The diagnosticsettings SDK allows for interaction with the Azure Resource Manager Service insights (API Version 2021-05-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-sdk/resource-manager/insights/2021-05-01-preview/diagnosticsettings"

Client Initialization

client := diagnosticsettings.NewDiagnosticSettingsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DiagnosticSettingsClient.CreateOrUpdate

ctx := context.TODO()
id := diagnosticsettings.NewScopedDiagnosticSettingID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "diagnosticSettingValue")

payload := diagnosticsettings.DiagnosticSettingsResource{
	// ...
}


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

Example Usage: DiagnosticSettingsClient.Delete

ctx := context.TODO()
id := diagnosticsettings.NewScopedDiagnosticSettingID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "diagnosticSettingValue")

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

ctx := context.TODO()
id := diagnosticsettings.NewScopedDiagnosticSettingID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "diagnosticSettingValue")

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: DiagnosticSettingsClient.List

ctx := context.TODO()
id := diagnosticsettings.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

read, err := client.List(ctx, id)
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 ValidateScopedDiagnosticSettingID

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

ValidateScopedDiagnosticSettingID checks that 'input' can be parsed as a Scoped Diagnostic Setting ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *DiagnosticSettingsResource
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type DiagnosticSettings

type DiagnosticSettings struct {
	EventHubAuthorizationRuleId *string           `json:"eventHubAuthorizationRuleId,omitempty"`
	EventHubName                *string           `json:"eventHubName,omitempty"`
	LogAnalyticsDestinationType *string           `json:"logAnalyticsDestinationType,omitempty"`
	Logs                        *[]LogSettings    `json:"logs,omitempty"`
	MarketplacePartnerId        *string           `json:"marketplacePartnerId,omitempty"`
	Metrics                     *[]MetricSettings `json:"metrics,omitempty"`
	ServiceBusRuleId            *string           `json:"serviceBusRuleId,omitempty"`
	StorageAccountId            *string           `json:"storageAccountId,omitempty"`
	WorkspaceId                 *string           `json:"workspaceId,omitempty"`
}

type DiagnosticSettingsClient

type DiagnosticSettingsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewDiagnosticSettingsClientWithBaseURI

func NewDiagnosticSettingsClientWithBaseURI(endpoint string) DiagnosticSettingsClient

func (DiagnosticSettingsClient) CreateOrUpdate

CreateOrUpdate ...

func (DiagnosticSettingsClient) Delete

Delete ...

func (DiagnosticSettingsClient) Get

Get ...

func (DiagnosticSettingsClient) List

List ...

type DiagnosticSettingsResource

type DiagnosticSettingsResource struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *DiagnosticSettings    `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type DiagnosticSettingsResourceCollection

type DiagnosticSettingsResourceCollection struct {
	Value *[]DiagnosticSettingsResource `json:"value,omitempty"`
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *DiagnosticSettingsResource
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *DiagnosticSettingsResourceCollection
}

type LogSettings

type LogSettings struct {
	Category        *string          `json:"category,omitempty"`
	CategoryGroup   *string          `json:"categoryGroup,omitempty"`
	Enabled         bool             `json:"enabled"`
	RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`
}

type MetricSettings

type MetricSettings struct {
	Category        *string          `json:"category,omitempty"`
	Enabled         bool             `json:"enabled"`
	RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`
	TimeGrain       *string          `json:"timeGrain,omitempty"`
}

type RetentionPolicy

type RetentionPolicy struct {
	Days    int64 `json:"days"`
	Enabled bool  `json:"enabled"`
}

type ScopedDiagnosticSettingId

type ScopedDiagnosticSettingId struct {
	ResourceUri           string
	DiagnosticSettingName string
}

ScopedDiagnosticSettingId is a struct representing the Resource ID for a Scoped Diagnostic Setting

func NewScopedDiagnosticSettingID

func NewScopedDiagnosticSettingID(resourceUri string, diagnosticSettingName string) ScopedDiagnosticSettingId

NewScopedDiagnosticSettingID returns a new ScopedDiagnosticSettingId struct

func ParseScopedDiagnosticSettingID

func ParseScopedDiagnosticSettingID(input string) (*ScopedDiagnosticSettingId, error)

ParseScopedDiagnosticSettingID parses 'input' into a ScopedDiagnosticSettingId

func ParseScopedDiagnosticSettingIDInsensitively

func ParseScopedDiagnosticSettingIDInsensitively(input string) (*ScopedDiagnosticSettingId, error)

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

func (*ScopedDiagnosticSettingId) FromParseResult added in v0.20231127.1171502

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

func (ScopedDiagnosticSettingId) ID

ID returns the formatted Scoped Diagnostic Setting ID

func (ScopedDiagnosticSettingId) Segments

Segments returns a slice of Resource ID Segments which comprise this Scoped Diagnostic Setting ID

func (ScopedDiagnosticSettingId) String

func (id ScopedDiagnosticSettingId) String() string

String returns a human-readable description of this Scoped Diagnostic Setting ID

Jump to

Keyboard shortcuts

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