logprofiles

package
v0.20240731.1212841 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2016-03-01/logprofiles Documentation

The logprofiles SDK allows for interaction with the Azure Resource Manager Service insights (API Version 2016-03-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/2016-03-01/logprofiles"

Client Initialization

client := logprofiles.NewLogProfilesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LogProfilesClient.CreateOrUpdate

ctx := context.TODO()
id := logprofiles.NewLogProfileID("12345678-1234-9876-4563-123456789012", "logProfileValue")

payload := logprofiles.LogProfileResource{
	// ...
}


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: LogProfilesClient.Delete

ctx := context.TODO()
id := logprofiles.NewLogProfileID("12345678-1234-9876-4563-123456789012", "logProfileValue")

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

ctx := context.TODO()
id := logprofiles.NewLogProfileID("12345678-1234-9876-4563-123456789012", "logProfileValue")

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

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

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 ValidateLogProfileID

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

ValidateLogProfileID checks that 'input' can be parsed as a Log Profile ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListOperationResponse

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

type LogProfileCollection

type LogProfileCollection struct {
	Value []LogProfileResource `json:"value"`
}

type LogProfileId

type LogProfileId struct {
	SubscriptionId string
	LogProfileName string
}

LogProfileId is a struct representing the Resource ID for a Log Profile

func NewLogProfileID

func NewLogProfileID(subscriptionId string, logProfileName string) LogProfileId

NewLogProfileID returns a new LogProfileId struct

func ParseLogProfileID

func ParseLogProfileID(input string) (*LogProfileId, error)

ParseLogProfileID parses 'input' into a LogProfileId

func ParseLogProfileIDInsensitively

func ParseLogProfileIDInsensitively(input string) (*LogProfileId, error)

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

func (*LogProfileId) FromParseResult

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

func (LogProfileId) ID

func (id LogProfileId) ID() string

ID returns the formatted Log Profile ID

func (LogProfileId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Log Profile ID

func (LogProfileId) String

func (id LogProfileId) String() string

String returns a human-readable description of this Log Profile ID

type LogProfileProperties

type LogProfileProperties struct {
	Categories       []string        `json:"categories"`
	Locations        []string        `json:"locations"`
	RetentionPolicy  RetentionPolicy `json:"retentionPolicy"`
	ServiceBusRuleId *string         `json:"serviceBusRuleId,omitempty"`
	StorageAccountId *string         `json:"storageAccountId,omitempty"`
}

type LogProfileResource

type LogProfileResource struct {
	Id         *string              `json:"id,omitempty"`
	Location   string               `json:"location"`
	Name       *string              `json:"name,omitempty"`
	Properties LogProfileProperties `json:"properties"`
	Tags       *map[string]string   `json:"tags,omitempty"`
	Type       *string              `json:"type,omitempty"`
}

type LogProfilesClient

type LogProfilesClient struct {
	Client *resourcemanager.Client
}

func NewLogProfilesClientWithBaseURI

func NewLogProfilesClientWithBaseURI(sdkApi sdkEnv.Api) (*LogProfilesClient, error)

func (LogProfilesClient) CreateOrUpdate

CreateOrUpdate ...

func (LogProfilesClient) Delete

Delete ...

func (LogProfilesClient) Get

Get ...

func (LogProfilesClient) List

List ...

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