activitylogs

package
v0.20240610.1112704 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/insights/2015-04-01/activitylogs Documentation

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

Client Initialization

client := activitylogs.NewActivityLogsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ActivityLogsClient.List

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForEventLevel

func PossibleValuesForEventLevel() []string

Types

type ActivityLogsClient

type ActivityLogsClient struct {
	Client *resourcemanager.Client
}

func NewActivityLogsClientWithBaseURI

func NewActivityLogsClientWithBaseURI(sdkApi sdkEnv.Api) (*ActivityLogsClient, error)

func (ActivityLogsClient) List

List ...

func (ActivityLogsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ActivityLogsClient) ListCompleteMatchingPredicate

func (c ActivityLogsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate EventDataOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type EventData

type EventData struct {
	Authorization        *SenderAuthorization `json:"authorization,omitempty"`
	Caller               *string              `json:"caller,omitempty"`
	Category             *LocalizableString   `json:"category,omitempty"`
	Claims               *map[string]string   `json:"claims,omitempty"`
	CorrelationId        *string              `json:"correlationId,omitempty"`
	Description          *string              `json:"description,omitempty"`
	EventDataId          *string              `json:"eventDataId,omitempty"`
	EventName            *LocalizableString   `json:"eventName,omitempty"`
	EventTimestamp       *string              `json:"eventTimestamp,omitempty"`
	HTTPRequest          *HTTPRequestInfo     `json:"httpRequest,omitempty"`
	Id                   *string              `json:"id,omitempty"`
	Level                *EventLevel          `json:"level,omitempty"`
	OperationId          *string              `json:"operationId,omitempty"`
	OperationName        *LocalizableString   `json:"operationName,omitempty"`
	Properties           *map[string]string   `json:"properties,omitempty"`
	ResourceGroupName    *string              `json:"resourceGroupName,omitempty"`
	ResourceId           *string              `json:"resourceId,omitempty"`
	ResourceProviderName *LocalizableString   `json:"resourceProviderName,omitempty"`
	ResourceType         *LocalizableString   `json:"resourceType,omitempty"`
	Status               *LocalizableString   `json:"status,omitempty"`
	SubStatus            *LocalizableString   `json:"subStatus,omitempty"`
	SubmissionTimestamp  *string              `json:"submissionTimestamp,omitempty"`
	SubscriptionId       *string              `json:"subscriptionId,omitempty"`
	TenantId             *string              `json:"tenantId,omitempty"`
}

func (*EventData) GetEventTimestampAsTime

func (o *EventData) GetEventTimestampAsTime() (*time.Time, error)

func (*EventData) GetSubmissionTimestampAsTime

func (o *EventData) GetSubmissionTimestampAsTime() (*time.Time, error)

func (*EventData) SetEventTimestampAsTime

func (o *EventData) SetEventTimestampAsTime(input time.Time)

func (*EventData) SetSubmissionTimestampAsTime

func (o *EventData) SetSubmissionTimestampAsTime(input time.Time)

type EventDataOperationPredicate

type EventDataOperationPredicate struct {
	Caller              *string
	CorrelationId       *string
	Description         *string
	EventDataId         *string
	EventTimestamp      *string
	Id                  *string
	OperationId         *string
	ResourceGroupName   *string
	ResourceId          *string
	SubmissionTimestamp *string
	SubscriptionId      *string
	TenantId            *string
}

func (EventDataOperationPredicate) Matches

func (p EventDataOperationPredicate) Matches(input EventData) bool

type EventLevel

type EventLevel string
const (
	EventLevelCritical      EventLevel = "Critical"
	EventLevelError         EventLevel = "Error"
	EventLevelInformational EventLevel = "Informational"
	EventLevelVerbose       EventLevel = "Verbose"
	EventLevelWarning       EventLevel = "Warning"
)

func (*EventLevel) UnmarshalJSON added in v0.20240229.1102109

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

type HTTPRequestInfo

type HTTPRequestInfo struct {
	ClientIPAddress *string `json:"clientIpAddress,omitempty"`
	ClientRequestId *string `json:"clientRequestId,omitempty"`
	Method          *string `json:"method,omitempty"`
	Uri             *string `json:"uri,omitempty"`
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []EventData
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
	Select *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20240229.1102109

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

func (ListOperationOptions) ToOData added in v0.20240229.1102109

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

func (ListOperationOptions) ToQuery added in v0.20240229.1102109

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]EventData
}

type LocalizableString

type LocalizableString struct {
	LocalizedValue *string `json:"localizedValue,omitempty"`
	Value          string  `json:"value"`
}

type SenderAuthorization

type SenderAuthorization struct {
	Action *string `json:"action,omitempty"`
	Role   *string `json:"role,omitempty"`
	Scope  *string `json:"scope,omitempty"`
}

Jump to

Keyboard shortcuts

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