diagnostic

package
v0.20231101.1154023 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/diagnostic Documentation

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

Client Initialization

client := diagnostic.NewDiagnosticClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DiagnosticClient.CreateOrUpdate

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

payload := diagnostic.DiagnosticContract{
	// ...
}


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

Example Usage: DiagnosticClient.Delete

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

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

Example Usage: DiagnosticClient.Get

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

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

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

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: DiagnosticClient.ListByService

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

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

Example Usage: DiagnosticClient.Update

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

payload := diagnostic.DiagnosticContract{
	// ...
}


read, err := client.Update(ctx, id, payload, diagnostic.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 PossibleValuesForAlwaysLog

func PossibleValuesForAlwaysLog() []string

func PossibleValuesForDataMaskingMode

func PossibleValuesForDataMaskingMode() []string

func PossibleValuesForHTTPCorrelationProtocol

func PossibleValuesForHTTPCorrelationProtocol() []string

func PossibleValuesForOperationNameFormat

func PossibleValuesForOperationNameFormat() []string

func PossibleValuesForSamplingType

func PossibleValuesForSamplingType() []string

func PossibleValuesForVerbosity

func PossibleValuesForVerbosity() []string

func ValidateDiagnosticID

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

ValidateDiagnosticID checks that 'input' can be parsed as a Diagnostic 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 AlwaysLog

type AlwaysLog string
const (
	AlwaysLogAllErrors AlwaysLog = "allErrors"
)

func (*AlwaysLog) UnmarshalJSON added in v0.20230801.1071415

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

type BodyDiagnosticSettings

type BodyDiagnosticSettings struct {
	Bytes *int64 `json:"bytes,omitempty"`
}

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToOData added in v0.20230801.1071415

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20230801.1071415

type CreateOrUpdateOperationResponse

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

type DataMasking

type DataMasking struct {
	Headers     *[]DataMaskingEntity `json:"headers,omitempty"`
	QueryParams *[]DataMaskingEntity `json:"queryParams,omitempty"`
}

type DataMaskingEntity

type DataMaskingEntity struct {
	Mode  *DataMaskingMode `json:"mode,omitempty"`
	Value *string          `json:"value,omitempty"`
}

type DataMaskingMode

type DataMaskingMode string
const (
	DataMaskingModeHide DataMaskingMode = "Hide"
	DataMaskingModeMask DataMaskingMode = "Mask"
)

func (*DataMaskingMode) UnmarshalJSON added in v0.20230801.1071415

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders added in v0.20230801.1071415

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

func (DeleteOperationOptions) ToOData added in v0.20230801.1071415

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

func (DeleteOperationOptions) ToQuery added in v0.20230801.1071415

type DeleteOperationResponse

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

type DiagnosticClient

type DiagnosticClient struct {
	Client *resourcemanager.Client
}

func NewDiagnosticClientWithBaseURI

func NewDiagnosticClientWithBaseURI(sdkApi sdkEnv.Api) (*DiagnosticClient, error)

func (DiagnosticClient) CreateOrUpdate

CreateOrUpdate ...

func (DiagnosticClient) Delete

Delete ...

func (DiagnosticClient) Get

Get ...

func (DiagnosticClient) GetEntityTag

func (c DiagnosticClient) GetEntityTag(ctx context.Context, id DiagnosticId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (DiagnosticClient) ListByService

ListByService ...

func (DiagnosticClient) ListByServiceComplete

ListByServiceComplete retrieves all the results into a single object

func (DiagnosticClient) ListByServiceCompleteMatchingPredicate

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

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DiagnosticClient) Update

Update ...

type DiagnosticContract

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

type DiagnosticContractOperationPredicate

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

func (DiagnosticContractOperationPredicate) Matches

type DiagnosticContractProperties

type DiagnosticContractProperties struct {
	AlwaysLog               *AlwaysLog                  `json:"alwaysLog,omitempty"`
	Backend                 *PipelineDiagnosticSettings `json:"backend,omitempty"`
	Frontend                *PipelineDiagnosticSettings `json:"frontend,omitempty"`
	HTTPCorrelationProtocol *HTTPCorrelationProtocol    `json:"httpCorrelationProtocol,omitempty"`
	LogClientIP             *bool                       `json:"logClientIp,omitempty"`
	LoggerId                string                      `json:"loggerId"`
	Metrics                 *bool                       `json:"metrics,omitempty"`
	OperationNameFormat     *OperationNameFormat        `json:"operationNameFormat,omitempty"`
	Sampling                *SamplingSettings           `json:"sampling,omitempty"`
	Verbosity               *Verbosity                  `json:"verbosity,omitempty"`
}

type DiagnosticId

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

DiagnosticId is a struct representing the Resource ID for a Diagnostic

func NewDiagnosticID

func NewDiagnosticID(subscriptionId string, resourceGroupName string, serviceName string, diagnosticId string) DiagnosticId

NewDiagnosticID returns a new DiagnosticId struct

func ParseDiagnosticID

func ParseDiagnosticID(input string) (*DiagnosticId, error)

ParseDiagnosticID parses 'input' into a DiagnosticId

func ParseDiagnosticIDInsensitively

func ParseDiagnosticIDInsensitively(input string) (*DiagnosticId, error)

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

func (DiagnosticId) ID

func (id DiagnosticId) ID() string

ID returns the formatted Diagnostic ID

func (DiagnosticId) Segments

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

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

func (DiagnosticId) String

func (id DiagnosticId) String() string

String returns a human-readable description of this Diagnostic ID

type GetEntityTagOperationResponse

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

type GetOperationResponse

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

type HTTPCorrelationProtocol

type HTTPCorrelationProtocol string
const (
	HTTPCorrelationProtocolLegacy  HTTPCorrelationProtocol = "Legacy"
	HTTPCorrelationProtocolNone    HTTPCorrelationProtocol = "None"
	HTTPCorrelationProtocolWThreeC HTTPCorrelationProtocol = "W3C"
)

func (*HTTPCorrelationProtocol) UnmarshalJSON added in v0.20230801.1071415

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

type HTTPMessageDiagnostic

type HTTPMessageDiagnostic struct {
	Body        *BodyDiagnosticSettings `json:"body,omitempty"`
	DataMasking *DataMasking            `json:"dataMasking,omitempty"`
	Headers     *[]string               `json:"headers,omitempty"`
}

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []DiagnosticContract
}

type ListByServiceOperationOptions

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

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

func (ListByServiceOperationOptions) ToHeaders added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToOData added in v0.20230801.1071415

func (ListByServiceOperationOptions) ToQuery added in v0.20230801.1071415

type ListByServiceOperationResponse

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

type OperationNameFormat

type OperationNameFormat string
const (
	OperationNameFormatName OperationNameFormat = "Name"
	OperationNameFormatUrl  OperationNameFormat = "Url"
)

func (*OperationNameFormat) UnmarshalJSON added in v0.20230801.1071415

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

type PipelineDiagnosticSettings

type PipelineDiagnosticSettings struct {
	Request  *HTTPMessageDiagnostic `json:"request,omitempty"`
	Response *HTTPMessageDiagnostic `json:"response,omitempty"`
}

type SamplingSettings

type SamplingSettings struct {
	Percentage   *float64      `json:"percentage,omitempty"`
	SamplingType *SamplingType `json:"samplingType,omitempty"`
}

type SamplingType

type SamplingType string
const (
	SamplingTypeFixed SamplingType = "fixed"
)

func (*SamplingType) UnmarshalJSON added in v0.20230801.1071415

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

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

func (UpdateOperationOptions) ToHeaders added in v0.20230801.1071415

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

func (UpdateOperationOptions) ToOData added in v0.20230801.1071415

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

func (UpdateOperationOptions) ToQuery added in v0.20230801.1071415

type UpdateOperationResponse

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

type Verbosity

type Verbosity string
const (
	VerbosityError       Verbosity = "error"
	VerbosityInformation Verbosity = "information"
	VerbosityVerbose     Verbosity = "verbose"
)

func (*Verbosity) UnmarshalJSON added in v0.20230801.1071415

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

Jump to

Keyboard shortcuts

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