logger

package
v0.20240123.1101251 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/logger Documentation

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

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type GetEntityTagOperationResponse

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

type GetOperationResponse

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

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LoggerContract
}

type ListByServiceOperationOptions

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

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders

func (ListByServiceOperationOptions) ToOData

func (ListByServiceOperationOptions) ToQuery

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LoggerContract
}

type LoggerClient

type LoggerClient struct {
	Client *resourcemanager.Client
}

func NewLoggerClientWithBaseURI

func NewLoggerClientWithBaseURI(sdkApi sdkEnv.Api) (*LoggerClient, error)

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 the results into a single object

func (LoggerClient) ListByServiceCompleteMatchingPredicate

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

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies 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) FromParseResult added in v0.20231127.1171502

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

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"
)

func (*LoggerType) UnmarshalJSON

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

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) FromParseResult added in v0.20231127.1171502

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

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

func (UpdateOperationOptions) ToHeaders

func (o UpdateOperationOptions) ToHeaders() *client.Headers

func (UpdateOperationOptions) ToOData

func (o UpdateOperationOptions) ToOData() *odata.Query

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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