monitors

package
v0.20231002.1065327 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/logz/2020-10-01/monitors Documentation

The monitors SDK allows for interaction with the Azure Resource Manager Service logz (API Version 2020-10-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/logz/2020-10-01/monitors"

Client Initialization

client := monitors.NewMonitorsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MonitorsClient.Create

ctx := context.TODO()
id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

payload := monitors.LogzMonitorResource{
	// ...
}


if err := client.CreateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: MonitorsClient.Delete

ctx := context.TODO()
id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: MonitorsClient.Get

ctx := context.TODO()
id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

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: MonitorsClient.ListByResourceGroup

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

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

Example Usage: MonitorsClient.ListBySubscription

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

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

Example Usage: MonitorsClient.ListMonitoredResources

ctx := context.TODO()
id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

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

Example Usage: MonitorsClient.ListUserRoles

ctx := context.TODO()
id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

payload := monitors.UserRoleRequest{
	// ...
}


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

Example Usage: MonitorsClient.Update

ctx := context.TODO()
id := monitors.NewMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "monitorValue")

payload := monitors.LogzMonitorResourceUpdateParameters{
	// ...
}


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

func PossibleValuesForLiftrResourceCategories() []string

func PossibleValuesForManagedIdentityTypes

func PossibleValuesForManagedIdentityTypes() []string

func PossibleValuesForMarketplaceSubscriptionStatus

func PossibleValuesForMarketplaceSubscriptionStatus() []string

func PossibleValuesForMonitoringStatus

func PossibleValuesForMonitoringStatus() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForUserRole

func PossibleValuesForUserRole() []string

func ValidateMonitorID

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

ValidateMonitorID checks that 'input' can be parsed as a Monitor ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type IdentityProperties

type IdentityProperties struct {
	PrincipalId *string               `json:"principalId,omitempty"`
	TenantId    *string               `json:"tenantId,omitempty"`
	Type        *ManagedIdentityTypes `json:"type,omitempty"`
}

type LiftrResourceCategories

type LiftrResourceCategories string
const (
	LiftrResourceCategoriesMonitorLogs LiftrResourceCategories = "MonitorLogs"
	LiftrResourceCategoriesUnknown     LiftrResourceCategories = "Unknown"
)

func (*LiftrResourceCategories) UnmarshalJSON added in v0.20230712.1163130

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []LogzMonitorResource
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LogzMonitorResource
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []LogzMonitorResource
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LogzMonitorResource
}

type ListMonitoredResourcesCompleteResult

type ListMonitoredResourcesCompleteResult struct {
	Items []MonitoredResource
}

type ListMonitoredResourcesOperationResponse

type ListMonitoredResourcesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]MonitoredResource
}

type ListUserRolesCompleteResult

type ListUserRolesCompleteResult struct {
	Items []UserRoleResponse
}

type ListUserRolesOperationResponse

type ListUserRolesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]UserRoleResponse
}

type LogzMonitorResource

type LogzMonitorResource struct {
	Id         *string                `json:"id,omitempty"`
	Identity   *IdentityProperties    `json:"identity,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *MonitorProperties     `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type LogzMonitorResourceOperationPredicate

type LogzMonitorResourceOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (LogzMonitorResourceOperationPredicate) Matches

type LogzMonitorResourceUpdateParameters

type LogzMonitorResourceUpdateParameters struct {
	Properties *MonitorUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
}

type LogzOrganizationProperties

type LogzOrganizationProperties struct {
	CompanyName     *string `json:"companyName,omitempty"`
	EnterpriseAppId *string `json:"enterpriseAppId,omitempty"`
	Id              *string `json:"id,omitempty"`
	SingleSignOnUrl *string `json:"singleSignOnUrl,omitempty"`
}

type ManagedIdentityTypes

type ManagedIdentityTypes string
const (
	ManagedIdentityTypesSystemAssigned ManagedIdentityTypes = "SystemAssigned"
	ManagedIdentityTypesUserAssigned   ManagedIdentityTypes = "UserAssigned"
)

func (*ManagedIdentityTypes) UnmarshalJSON added in v0.20230712.1163130

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

type MarketplaceSubscriptionStatus

type MarketplaceSubscriptionStatus string
const (
	MarketplaceSubscriptionStatusActive    MarketplaceSubscriptionStatus = "Active"
	MarketplaceSubscriptionStatusSuspended MarketplaceSubscriptionStatus = "Suspended"
)

func (*MarketplaceSubscriptionStatus) UnmarshalJSON added in v0.20230712.1163130

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

type MonitorId

type MonitorId struct {
	SubscriptionId    string
	ResourceGroupName string
	MonitorName       string
}

MonitorId is a struct representing the Resource ID for a Monitor

func NewMonitorID

func NewMonitorID(subscriptionId string, resourceGroupName string, monitorName string) MonitorId

NewMonitorID returns a new MonitorId struct

func ParseMonitorID

func ParseMonitorID(input string) (*MonitorId, error)

ParseMonitorID parses 'input' into a MonitorId

func ParseMonitorIDInsensitively

func ParseMonitorIDInsensitively(input string) (*MonitorId, error)

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

func (MonitorId) ID

func (id MonitorId) ID() string

ID returns the formatted Monitor ID

func (MonitorId) Segments

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

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

func (MonitorId) String

func (id MonitorId) String() string

String returns a human-readable description of this Monitor ID

type MonitorProperties

type MonitorProperties struct {
	LiftrResourceCategory         *LiftrResourceCategories       `json:"liftrResourceCategory,omitempty"`
	LiftrResourcePreference       *int64                         `json:"liftrResourcePreference,omitempty"`
	LogzOrganizationProperties    *LogzOrganizationProperties    `json:"logzOrganizationProperties,omitempty"`
	MarketplaceSubscriptionStatus *MarketplaceSubscriptionStatus `json:"marketplaceSubscriptionStatus,omitempty"`
	MonitoringStatus              *MonitoringStatus              `json:"monitoringStatus,omitempty"`
	PlanData                      *PlanData                      `json:"planData,omitempty"`
	ProvisioningState             *ProvisioningState             `json:"provisioningState,omitempty"`
	UserInfo                      *UserInfo                      `json:"userInfo,omitempty"`
}

type MonitorUpdateProperties

type MonitorUpdateProperties struct {
	MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty"`
}

type MonitoredResource

type MonitoredResource struct {
	Id                     *string                `json:"id,omitempty"`
	ReasonForLogsStatus    *string                `json:"reasonForLogsStatus,omitempty"`
	ReasonForMetricsStatus *string                `json:"reasonForMetricsStatus,omitempty"`
	SendingLogs            *bool                  `json:"sendingLogs,omitempty"`
	SendingMetrics         *bool                  `json:"sendingMetrics,omitempty"`
	SystemData             *systemdata.SystemData `json:"systemData,omitempty"`
}

type MonitoredResourceOperationPredicate

type MonitoredResourceOperationPredicate struct {
	Id                     *string
	ReasonForLogsStatus    *string
	ReasonForMetricsStatus *string
	SendingLogs            *bool
	SendingMetrics         *bool
}

func (MonitoredResourceOperationPredicate) Matches

type MonitoringStatus

type MonitoringStatus string
const (
	MonitoringStatusDisabled MonitoringStatus = "Disabled"
	MonitoringStatusEnabled  MonitoringStatus = "Enabled"
)

func (*MonitoringStatus) UnmarshalJSON added in v0.20230712.1163130

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

type MonitorsClient

type MonitorsClient struct {
	Client *resourcemanager.Client
}

func NewMonitorsClientWithBaseURI

func NewMonitorsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsClient, error)

func (MonitorsClient) Create

Create ...

func (MonitorsClient) CreateThenPoll

func (c MonitorsClient) CreateThenPoll(ctx context.Context, id MonitorId, input LogzMonitorResource) error

CreateThenPoll performs Create then polls until it's completed

func (MonitorsClient) Delete

func (c MonitorsClient) Delete(ctx context.Context, id MonitorId) (result DeleteOperationResponse, err error)

Delete ...

func (MonitorsClient) DeleteThenPoll

func (c MonitorsClient) DeleteThenPoll(ctx context.Context, id MonitorId) error

DeleteThenPoll performs Delete then polls until it's completed

func (MonitorsClient) Get

func (c MonitorsClient) Get(ctx context.Context, id MonitorId) (result GetOperationResponse, err error)

Get ...

func (MonitorsClient) ListByResourceGroup

ListByResourceGroup ...

func (MonitorsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (MonitorsClient) ListByResourceGroupCompleteMatchingPredicate

func (c MonitorsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LogzMonitorResourceOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MonitorsClient) ListBySubscription

ListBySubscription ...

func (MonitorsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (MonitorsClient) ListBySubscriptionCompleteMatchingPredicate

func (c MonitorsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LogzMonitorResourceOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MonitorsClient) ListMonitoredResources

func (c MonitorsClient) ListMonitoredResources(ctx context.Context, id MonitorId) (result ListMonitoredResourcesOperationResponse, err error)

ListMonitoredResources ...

func (MonitorsClient) ListMonitoredResourcesComplete

func (c MonitorsClient) ListMonitoredResourcesComplete(ctx context.Context, id MonitorId) (ListMonitoredResourcesCompleteResult, error)

ListMonitoredResourcesComplete retrieves all the results into a single object

func (MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate

func (c MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate(ctx context.Context, id MonitorId, predicate MonitoredResourceOperationPredicate) (result ListMonitoredResourcesCompleteResult, err error)

ListMonitoredResourcesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MonitorsClient) ListUserRoles

func (c MonitorsClient) ListUserRoles(ctx context.Context, id MonitorId, input UserRoleRequest) (result ListUserRolesOperationResponse, err error)

ListUserRoles ...

func (MonitorsClient) ListUserRolesComplete

func (c MonitorsClient) ListUserRolesComplete(ctx context.Context, id MonitorId, input UserRoleRequest) (ListUserRolesCompleteResult, error)

ListUserRolesComplete retrieves all the results into a single object

func (MonitorsClient) ListUserRolesCompleteMatchingPredicate

func (c MonitorsClient) ListUserRolesCompleteMatchingPredicate(ctx context.Context, id MonitorId, input UserRoleRequest, predicate UserRoleResponseOperationPredicate) (result ListUserRolesCompleteResult, err error)

ListUserRolesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MonitorsClient) Update

Update ...

type PlanData

type PlanData struct {
	BillingCycle  *string `json:"billingCycle,omitempty"`
	EffectiveDate *string `json:"effectiveDate,omitempty"`
	PlanDetails   *string `json:"planDetails,omitempty"`
	UsageType     *string `json:"usageType,omitempty"`
}

func (*PlanData) GetEffectiveDateAsTime

func (o *PlanData) GetEffectiveDateAsTime() (*time.Time, error)

func (*PlanData) SetEffectiveDateAsTime

func (o *PlanData) SetEffectiveDateAsTime(input time.Time)

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreating     ProvisioningState = "Creating"
	ProvisioningStateDeleted      ProvisioningState = "Deleted"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateNotSpecified ProvisioningState = "NotSpecified"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON added in v0.20230712.1163130

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

type UpdateOperationResponse

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

type UserInfo

type UserInfo struct {
	EmailAddress *string `json:"emailAddress,omitempty"`
	FirstName    *string `json:"firstName,omitempty"`
	LastName     *string `json:"lastName,omitempty"`
	PhoneNumber  *string `json:"phoneNumber,omitempty"`
}

type UserRole

type UserRole string
const (
	UserRoleAdmin UserRole = "Admin"
	UserRoleNone  UserRole = "None"
	UserRoleUser  UserRole = "User"
)

func (*UserRole) UnmarshalJSON added in v0.20230712.1163130

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

type UserRoleRequest

type UserRoleRequest struct {
	EmailAddress *string `json:"emailAddress,omitempty"`
}

type UserRoleResponse

type UserRoleResponse struct {
	Role *UserRole `json:"role,omitempty"`
}

type UserRoleResponseOperationPredicate

type UserRoleResponseOperationPredicate struct {
}

func (UserRoleResponseOperationPredicate) Matches

Jump to

Keyboard shortcuts

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