monitors

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

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       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	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"
)

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []LogzMonitorResource
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]LogzMonitorResource
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []LogzMonitorResource
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]LogzMonitorResource
	// contains filtered or unexported fields
}

func (ListBySubscriptionOperationResponse) HasMore

func (ListBySubscriptionOperationResponse) LoadMore

type ListMonitoredResourcesCompleteResult

type ListMonitoredResourcesCompleteResult struct {
	Items []MonitoredResource
}

type ListMonitoredResourcesOperationResponse

type ListMonitoredResourcesOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]MonitoredResource
	// contains filtered or unexported fields
}

func (ListMonitoredResourcesOperationResponse) HasMore

func (ListMonitoredResourcesOperationResponse) LoadMore

type ListUserRolesCompleteResult

type ListUserRolesCompleteResult struct {
	Items []UserRoleResponse
}

type ListUserRolesOperationResponse

type ListUserRolesOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]UserRoleResponse
	// contains filtered or unexported fields
}

func (ListUserRolesOperationResponse) HasMore

func (ListUserRolesOperationResponse) LoadMore

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

type MarketplaceSubscriptionStatus

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

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

type MonitorsClient

type MonitorsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewMonitorsClientWithBaseURI

func NewMonitorsClientWithBaseURI(endpoint string) MonitorsClient

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

func (MonitorsClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (MonitorsClient) ListBySubscription

ListBySubscription ...

func (MonitorsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all of the results into a single object

func (MonitorsClient) ListBySubscriptionCompleteMatchingPredicate

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

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (MonitorsClient) ListMonitoredResources

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

ListMonitoredResources ...

func (MonitorsClient) ListMonitoredResourcesComplete

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

ListMonitoredResourcesComplete retrieves all of the results into a single object

func (MonitorsClient) ListMonitoredResourcesCompleteMatchingPredicate

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

ListMonitoredResourcesCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (MonitorsClient) ListUserRoles

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

ListUserRoles ...

func (MonitorsClient) ListUserRolesComplete

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

ListUserRolesComplete retrieves all of the results into a single object

func (MonitorsClient) ListUserRolesCompleteMatchingPredicate

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

ListUserRolesCompleteMatchingPredicate retrieves all of the results and then applied 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"
)

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	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"
)

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