diagnosticsettings

package
v0.20240327.1081628 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/azureactivedirectory/2017-04-01/diagnosticsettings Documentation

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

Client Initialization

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

Example Usage: DiagnosticSettingsClient.CreateOrUpdate

ctx := context.TODO()
id := diagnosticsettings.NewDiagnosticSettingID("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.NewDiagnosticSettingID("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.NewDiagnosticSettingID("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()


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

func PossibleValuesForCategory() []string

func ValidateDiagnosticSettingID

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

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

Types

type Category

type Category string
const (
	CategoryAuditLogs  Category = "AuditLogs"
	CategorySignInLogs Category = "SignInLogs"
)

func (*Category) UnmarshalJSON

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

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type DiagnosticSettingId

type DiagnosticSettingId struct {
	DiagnosticSettingName string
}

DiagnosticSettingId is a struct representing the Resource ID for a Diagnostic Setting

func NewDiagnosticSettingID

func NewDiagnosticSettingID(diagnosticSettingName string) DiagnosticSettingId

NewDiagnosticSettingID returns a new DiagnosticSettingId struct

func ParseDiagnosticSettingID

func ParseDiagnosticSettingID(input string) (*DiagnosticSettingId, error)

ParseDiagnosticSettingID parses 'input' into a DiagnosticSettingId

func ParseDiagnosticSettingIDInsensitively

func ParseDiagnosticSettingIDInsensitively(input string) (*DiagnosticSettingId, error)

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

func (*DiagnosticSettingId) FromParseResult

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

func (DiagnosticSettingId) ID

func (id DiagnosticSettingId) ID() string

ID returns the formatted Diagnostic Setting ID

func (DiagnosticSettingId) Segments

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

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

func (DiagnosticSettingId) String

func (id DiagnosticSettingId) String() string

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

type DiagnosticSettings

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

type DiagnosticSettingsClient

type DiagnosticSettingsClient struct {
	Client *resourcemanager.Client
}

func NewDiagnosticSettingsClientWithBaseURI

func NewDiagnosticSettingsClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticSettingsClient, error)

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"`
	Type       *string             `json:"type,omitempty"`
}

type DiagnosticSettingsResourceCollection

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

type GetOperationResponse

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

type ListOperationResponse

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

type LogSettings

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

type RetentionPolicy

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

Jump to

Keyboard shortcuts

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