logger

package
v0.20230728.1130002 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2021-08-01/logger Documentation

The logger SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2021-08-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/apimanagement/2021-08-01/logger"

Client Initialization

client := logger.NewLoggerClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LoggerClient.CreateOrUpdate

ctx := context.TODO()
id := logger.NewLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "loggerIdValue")

payload := logger.LoggerContract{
	// ...
}


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

Example Usage: LoggerClient.Delete

ctx := context.TODO()
id := logger.NewLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "loggerIdValue")

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

Example Usage: LoggerClient.Get

ctx := context.TODO()
id := logger.NewLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "loggerIdValue")

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: LoggerClient.GetEntityTag

ctx := context.TODO()
id := logger.NewLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "loggerIdValue")

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

Example Usage: LoggerClient.ListByService

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

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

Example Usage: LoggerClient.Update

ctx := context.TODO()
id := logger.NewLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "loggerIdValue")

payload := logger.LoggerUpdateContract{
	// ...
}


read, err := client.Update(ctx, id, payload, logger.DefaultUpdateOperationOptions())
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 PossibleValuesForLoggerType

func PossibleValuesForLoggerType() []string

func ValidateLoggerID

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

ValidateLoggerID checks that 'input' can be parsed as a Logger ID

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

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

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []LoggerContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter *string
	Skip   *int64
	Top    *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]LoggerContract
	// contains filtered or unexported fields
}

func (ListByServiceOperationResponse) HasMore

func (ListByServiceOperationResponse) LoadMore

type LoggerClient

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

func NewLoggerClientWithBaseURI

func NewLoggerClientWithBaseURI(endpoint string) LoggerClient

func (LoggerClient) CreateOrUpdate

CreateOrUpdate ...

func (LoggerClient) Delete

func (c LoggerClient) Delete(ctx context.Context, id LoggerId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)

Delete ...

func (LoggerClient) Get

func (c LoggerClient) Get(ctx context.Context, id LoggerId) (result GetOperationResponse, err error)

Get ...

func (LoggerClient) GetEntityTag

func (c LoggerClient) GetEntityTag(ctx context.Context, id LoggerId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (LoggerClient) ListByService

ListByService ...

func (LoggerClient) ListByServiceComplete

ListByServiceComplete retrieves all of the results into a single object

func (LoggerClient) ListByServiceCompleteMatchingPredicate

func (c LoggerClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate LoggerContractOperationPredicate) (resp ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (LoggerClient) Update

Update ...

type LoggerContract

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

type LoggerContractOperationPredicate

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

func (LoggerContractOperationPredicate) Matches

type LoggerContractProperties

type LoggerContractProperties struct {
	Credentials *map[string]string `json:"credentials,omitempty"`
	Description *string            `json:"description,omitempty"`
	IsBuffered  *bool              `json:"isBuffered,omitempty"`
	LoggerType  LoggerType         `json:"loggerType"`
	ResourceId  *string            `json:"resourceId,omitempty"`
}

type LoggerId

type LoggerId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	LoggerId          string
}

LoggerId is a struct representing the Resource ID for a Logger

func NewLoggerID

func NewLoggerID(subscriptionId string, resourceGroupName string, serviceName string, loggerId string) LoggerId

NewLoggerID returns a new LoggerId struct

func ParseLoggerID

func ParseLoggerID(input string) (*LoggerId, error)

ParseLoggerID parses 'input' into a LoggerId

func ParseLoggerIDInsensitively

func ParseLoggerIDInsensitively(input string) (*LoggerId, error)

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

func (LoggerId) ID

func (id LoggerId) ID() string

ID returns the formatted Logger ID

func (LoggerId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Logger ID

func (LoggerId) String

func (id LoggerId) String() string

String returns a human-readable description of this Logger ID

type LoggerType

type LoggerType string
const (
	LoggerTypeApplicationInsights LoggerType = "applicationInsights"
	LoggerTypeAzureEventHub       LoggerType = "azureEventHub"
	LoggerTypeAzureMonitor        LoggerType = "azureMonitor"
)

type LoggerUpdateContract

type LoggerUpdateContract struct {
	Properties *LoggerUpdateParameters `json:"properties,omitempty"`
}

type LoggerUpdateParameters

type LoggerUpdateParameters struct {
	Credentials *map[string]string `json:"credentials,omitempty"`
	Description *string            `json:"description,omitempty"`
	IsBuffered  *bool              `json:"isBuffered,omitempty"`
	LoggerType  *LoggerType        `json:"loggerType,omitempty"`
}

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Service ID

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *LoggerContract
}

Jump to

Keyboard shortcuts

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