monitoredsubscriptions

package
v0.20240320.1144505 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/monitoredsubscriptions Documentation

The monitoredsubscriptions SDK allows for interaction with the Azure Resource Manager Service newrelic (API Version 2024-03-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/newrelic/2024-03-01/monitoredsubscriptions"

Client Initialization

client := monitoredsubscriptions.NewMonitoredSubscriptionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MonitoredSubscriptionsClient.CreateOrUpdate

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

payload := monitoredsubscriptions.MonitoredSubscriptionProperties{
	// ...
}


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

Example Usage: MonitoredSubscriptionsClient.Delete

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

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

Example Usage: MonitoredSubscriptionsClient.Get

ctx := context.TODO()
id := monitoredsubscriptions.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: MonitoredSubscriptionsClient.List

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

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

Example Usage: MonitoredSubscriptionsClient.Update

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

payload := monitoredsubscriptions.MonitoredSubscriptionProperties{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForPatchOperation

func PossibleValuesForPatchOperation() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForSendAadLogsStatus

func PossibleValuesForSendAadLogsStatus() []string

func PossibleValuesForSendActivityLogsStatus

func PossibleValuesForSendActivityLogsStatus() []string

func PossibleValuesForSendMetricsStatus

func PossibleValuesForSendMetricsStatus() []string

func PossibleValuesForSendSubscriptionLogsStatus

func PossibleValuesForSendSubscriptionLogsStatus() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func PossibleValuesForTagAction

func PossibleValuesForTagAction() []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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MonitoredSubscriptionProperties
}

type DeleteOperationResponse

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

type FilteringTag

type FilteringTag struct {
	Action *TagAction `json:"action,omitempty"`
	Name   *string    `json:"name,omitempty"`
	Value  *string    `json:"value,omitempty"`
}

type GetOperationResponse

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

type ListCompleteResult

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

type ListOperationResponse

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

type LogRules

type LogRules struct {
	FilteringTags        *[]FilteringTag             `json:"filteringTags,omitempty"`
	SendAadLogs          *SendAadLogsStatus          `json:"sendAadLogs,omitempty"`
	SendActivityLogs     *SendActivityLogsStatus     `json:"sendActivityLogs,omitempty"`
	SendSubscriptionLogs *SendSubscriptionLogsStatus `json:"sendSubscriptionLogs,omitempty"`
}

type MetricRules

type MetricRules struct {
	FilteringTags *[]FilteringTag    `json:"filteringTags,omitempty"`
	SendMetrics   *SendMetricsStatus `json:"sendMetrics,omitempty"`
	UserEmail     *string            `json:"userEmail,omitempty"`
}

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

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

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 MonitoredSubscription

type MonitoredSubscription struct {
	Error          *string                       `json:"error,omitempty"`
	Status         *Status                       `json:"status,omitempty"`
	SubscriptionId *string                       `json:"subscriptionId,omitempty"`
	TagRules       *MonitoringTagRulesProperties `json:"tagRules,omitempty"`
}

type MonitoredSubscriptionProperties

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

type MonitoredSubscriptionPropertiesOperationPredicate

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

func (MonitoredSubscriptionPropertiesOperationPredicate) Matches

type MonitoredSubscriptionsClient

type MonitoredSubscriptionsClient struct {
	Client *resourcemanager.Client
}

func NewMonitoredSubscriptionsClientWithBaseURI

func NewMonitoredSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitoredSubscriptionsClient, error)

func (MonitoredSubscriptionsClient) CreateOrUpdate

CreateOrUpdate ...

func (MonitoredSubscriptionsClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (MonitoredSubscriptionsClient) Delete

Delete ...

func (MonitoredSubscriptionsClient) DeleteThenPoll

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

DeleteThenPoll performs Delete then polls until it's completed

func (MonitoredSubscriptionsClient) Get

Get ...

func (MonitoredSubscriptionsClient) List

List ...

func (MonitoredSubscriptionsClient) ListComplete

ListComplete retrieves all the results into a single object

func (MonitoredSubscriptionsClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MonitoredSubscriptionsClient) Update

Update ...

func (MonitoredSubscriptionsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type MonitoringTagRulesProperties

type MonitoringTagRulesProperties struct {
	LogRules          *LogRules          `json:"logRules,omitempty"`
	MetricRules       *MetricRules       `json:"metricRules,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

type PatchOperation

type PatchOperation string
const (
	PatchOperationActive         PatchOperation = "Active"
	PatchOperationAddBegin       PatchOperation = "AddBegin"
	PatchOperationAddComplete    PatchOperation = "AddComplete"
	PatchOperationDeleteBegin    PatchOperation = "DeleteBegin"
	PatchOperationDeleteComplete PatchOperation = "DeleteComplete"
)

func (*PatchOperation) UnmarshalJSON

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

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

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

type SendAadLogsStatus

type SendAadLogsStatus string
const (
	SendAadLogsStatusDisabled SendAadLogsStatus = "Disabled"
	SendAadLogsStatusEnabled  SendAadLogsStatus = "Enabled"
)

func (*SendAadLogsStatus) UnmarshalJSON

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

type SendActivityLogsStatus

type SendActivityLogsStatus string
const (
	SendActivityLogsStatusDisabled SendActivityLogsStatus = "Disabled"
	SendActivityLogsStatusEnabled  SendActivityLogsStatus = "Enabled"
)

func (*SendActivityLogsStatus) UnmarshalJSON

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

type SendMetricsStatus

type SendMetricsStatus string
const (
	SendMetricsStatusDisabled SendMetricsStatus = "Disabled"
	SendMetricsStatusEnabled  SendMetricsStatus = "Enabled"
)

func (*SendMetricsStatus) UnmarshalJSON

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

type SendSubscriptionLogsStatus

type SendSubscriptionLogsStatus string
const (
	SendSubscriptionLogsStatusDisabled SendSubscriptionLogsStatus = "Disabled"
	SendSubscriptionLogsStatusEnabled  SendSubscriptionLogsStatus = "Enabled"
)

func (*SendSubscriptionLogsStatus) UnmarshalJSON

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

type Status

type Status string
const (
	StatusActive     Status = "Active"
	StatusDeleting   Status = "Deleting"
	StatusFailed     Status = "Failed"
	StatusInProgress Status = "InProgress"
)

func (*Status) UnmarshalJSON

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

type SubscriptionList

type SubscriptionList struct {
	MonitoredSubscriptionList *[]MonitoredSubscription `json:"monitoredSubscriptionList,omitempty"`
	PatchOperation            *PatchOperation          `json:"patchOperation,omitempty"`
	ProvisioningState         *ProvisioningState       `json:"provisioningState,omitempty"`
}

type TagAction

type TagAction string
const (
	TagActionExclude TagAction = "Exclude"
	TagActionInclude TagAction = "Include"
)

func (*TagAction) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MonitoredSubscriptionProperties
}

Jump to

Keyboard shortcuts

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