logger

package
v0.20241126.1723 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2024-05-01/logger Documentation

The logger SDK allows for interaction with Azure Resource Manager apimanagement (API Version 2024-05-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/2024-05-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", "serviceName", "loggerId")

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", "serviceName", "loggerId")

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", "serviceName", "loggerId")

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", "serviceName", "loggerId")

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

// 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", "serviceName", "loggerId")

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
}

Example Usage: LoggerClient.WorkspaceLoggerCreateOrUpdate

ctx := context.TODO()
id := logger.NewWorkspaceLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "loggerId")

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


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

Example Usage: LoggerClient.WorkspaceLoggerDelete

ctx := context.TODO()
id := logger.NewWorkspaceLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "loggerId")

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

Example Usage: LoggerClient.WorkspaceLoggerGet

ctx := context.TODO()
id := logger.NewWorkspaceLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "loggerId")

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

Example Usage: LoggerClient.WorkspaceLoggerGetEntityTag

ctx := context.TODO()
id := logger.NewWorkspaceLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "loggerId")

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

Example Usage: LoggerClient.WorkspaceLoggerListByWorkspace

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

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

Example Usage: LoggerClient.WorkspaceLoggerUpdate

ctx := context.TODO()
id := logger.NewWorkspaceLoggerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceId", "loggerId")

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


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

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

func ValidateWorkspaceLoggerID

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

ValidateWorkspaceLoggerID checks that 'input' can be parsed as a Workspace Logger 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 ListByServiceCustomPager

type ListByServiceCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByServiceCustomPager) NextPageLink() *odata.Link

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 ...

func (LoggerClient) WorkspaceLoggerCreateOrUpdate

WorkspaceLoggerCreateOrUpdate ...

func (LoggerClient) WorkspaceLoggerDelete

WorkspaceLoggerDelete ...

func (LoggerClient) WorkspaceLoggerGet

func (c LoggerClient) WorkspaceLoggerGet(ctx context.Context, id WorkspaceLoggerId) (result WorkspaceLoggerGetOperationResponse, err error)

WorkspaceLoggerGet ...

func (LoggerClient) WorkspaceLoggerGetEntityTag

func (c LoggerClient) WorkspaceLoggerGetEntityTag(ctx context.Context, id WorkspaceLoggerId) (result WorkspaceLoggerGetEntityTagOperationResponse, err error)

WorkspaceLoggerGetEntityTag ...

func (LoggerClient) WorkspaceLoggerListByWorkspace

WorkspaceLoggerListByWorkspace ...

func (LoggerClient) WorkspaceLoggerListByWorkspaceComplete

WorkspaceLoggerListByWorkspaceComplete retrieves all the results into a single object

func (LoggerClient) WorkspaceLoggerListByWorkspaceCompleteMatchingPredicate

func (c LoggerClient) WorkspaceLoggerListByWorkspaceCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options WorkspaceLoggerListByWorkspaceOperationOptions, predicate LoggerContractOperationPredicate) (result WorkspaceLoggerListByWorkspaceCompleteResult, err error)

WorkspaceLoggerListByWorkspaceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LoggerClient) WorkspaceLoggerUpdate

WorkspaceLoggerUpdate ...

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

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

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
}

type WorkspaceId

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

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

type WorkspaceLoggerCreateOrUpdateOperationOptions

type WorkspaceLoggerCreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceLoggerCreateOrUpdateOperationOptions

func DefaultWorkspaceLoggerCreateOrUpdateOperationOptions() WorkspaceLoggerCreateOrUpdateOperationOptions

func (WorkspaceLoggerCreateOrUpdateOperationOptions) ToHeaders

func (WorkspaceLoggerCreateOrUpdateOperationOptions) ToOData

func (WorkspaceLoggerCreateOrUpdateOperationOptions) ToQuery

type WorkspaceLoggerCreateOrUpdateOperationResponse

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

type WorkspaceLoggerDeleteOperationOptions

type WorkspaceLoggerDeleteOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceLoggerDeleteOperationOptions

func DefaultWorkspaceLoggerDeleteOperationOptions() WorkspaceLoggerDeleteOperationOptions

func (WorkspaceLoggerDeleteOperationOptions) ToHeaders

func (WorkspaceLoggerDeleteOperationOptions) ToOData

func (WorkspaceLoggerDeleteOperationOptions) ToQuery

type WorkspaceLoggerDeleteOperationResponse

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

type WorkspaceLoggerGetEntityTagOperationResponse

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

type WorkspaceLoggerGetOperationResponse

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

type WorkspaceLoggerId

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

WorkspaceLoggerId is a struct representing the Resource ID for a Workspace Logger

func NewWorkspaceLoggerID

func NewWorkspaceLoggerID(subscriptionId string, resourceGroupName string, serviceName string, workspaceId string, loggerId string) WorkspaceLoggerId

NewWorkspaceLoggerID returns a new WorkspaceLoggerId struct

func ParseWorkspaceLoggerID

func ParseWorkspaceLoggerID(input string) (*WorkspaceLoggerId, error)

ParseWorkspaceLoggerID parses 'input' into a WorkspaceLoggerId

func ParseWorkspaceLoggerIDInsensitively

func ParseWorkspaceLoggerIDInsensitively(input string) (*WorkspaceLoggerId, error)

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

func (*WorkspaceLoggerId) FromParseResult

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

func (WorkspaceLoggerId) ID

func (id WorkspaceLoggerId) ID() string

ID returns the formatted Workspace Logger ID

func (WorkspaceLoggerId) Segments

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

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

func (WorkspaceLoggerId) String

func (id WorkspaceLoggerId) String() string

String returns a human-readable description of this Workspace Logger ID

type WorkspaceLoggerListByWorkspaceCompleteResult

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

type WorkspaceLoggerListByWorkspaceCustomPager

type WorkspaceLoggerListByWorkspaceCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type WorkspaceLoggerListByWorkspaceOperationOptions

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

func DefaultWorkspaceLoggerListByWorkspaceOperationOptions

func DefaultWorkspaceLoggerListByWorkspaceOperationOptions() WorkspaceLoggerListByWorkspaceOperationOptions

func (WorkspaceLoggerListByWorkspaceOperationOptions) ToHeaders

func (WorkspaceLoggerListByWorkspaceOperationOptions) ToOData

func (WorkspaceLoggerListByWorkspaceOperationOptions) ToQuery

type WorkspaceLoggerListByWorkspaceOperationResponse

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

type WorkspaceLoggerUpdateOperationOptions

type WorkspaceLoggerUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultWorkspaceLoggerUpdateOperationOptions

func DefaultWorkspaceLoggerUpdateOperationOptions() WorkspaceLoggerUpdateOperationOptions

func (WorkspaceLoggerUpdateOperationOptions) ToHeaders

func (WorkspaceLoggerUpdateOperationOptions) ToOData

func (WorkspaceLoggerUpdateOperationOptions) ToQuery

type WorkspaceLoggerUpdateOperationResponse

type WorkspaceLoggerUpdateOperationResponse 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