monitoredsubscriptions

package
v0.20241126.2320 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/datadog/2023-01-01/monitoredsubscriptions Documentation

The monitoredsubscriptions SDK allows for interaction with Azure Resource Manager datadog (API Version 2023-01-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/datadog/2023-01-01/monitoredsubscriptions"

Client Initialization

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

Example Usage: MonitoredSubscriptionsClient.CreateorUpdate

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

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


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

Example Usage: MonitoredSubscriptionsClient.Delete

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

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

Example Usage: MonitoredSubscriptionsClient.Get

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

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

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

Example Usage: MonitoredSubscriptionsClient.Update

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

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 PossibleValuesForOperation

func PossibleValuesForOperation() []string

func PossibleValuesForProvisioningState

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

func ValidateMonitoredSubscriptionID

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

ValidateMonitoredSubscriptionID checks that 'input' can be parsed as a Monitored Subscription 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 ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MonitoredSubscriptionPropertiesList
}

type LogRules

type LogRules struct {
	FilteringTags        *[]FilteringTag `json:"filteringTags,omitempty"`
	SendAadLogs          *bool           `json:"sendAadLogs,omitempty"`
	SendResourceLogs     *bool           `json:"sendResourceLogs,omitempty"`
	SendSubscriptionLogs *bool           `json:"sendSubscriptionLogs,omitempty"`
}

type MetricRules

type MetricRules struct {
	FilteringTags *[]FilteringTag `json:"filteringTags,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 MonitoredSubscriptionId

type MonitoredSubscriptionId struct {
	SubscriptionId            string
	ResourceGroupName         string
	MonitorName               string
	MonitoredSubscriptionName string
}

MonitoredSubscriptionId is a struct representing the Resource ID for a Monitored Subscription

func NewMonitoredSubscriptionID

func NewMonitoredSubscriptionID(subscriptionId string, resourceGroupName string, monitorName string, monitoredSubscriptionName string) MonitoredSubscriptionId

NewMonitoredSubscriptionID returns a new MonitoredSubscriptionId struct

func ParseMonitoredSubscriptionID

func ParseMonitoredSubscriptionID(input string) (*MonitoredSubscriptionId, error)

ParseMonitoredSubscriptionID parses 'input' into a MonitoredSubscriptionId

func ParseMonitoredSubscriptionIDInsensitively

func ParseMonitoredSubscriptionIDInsensitively(input string) (*MonitoredSubscriptionId, error)

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

func (*MonitoredSubscriptionId) FromParseResult

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

func (MonitoredSubscriptionId) ID

ID returns the formatted Monitored Subscription ID

func (MonitoredSubscriptionId) Segments

Segments returns a slice of Resource ID Segments which comprise this Monitored Subscription ID

func (MonitoredSubscriptionId) String

func (id MonitoredSubscriptionId) String() string

String returns a human-readable description of this Monitored Subscription ID

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 MonitoredSubscriptionPropertiesList

type MonitoredSubscriptionPropertiesList struct {
	Value *[]MonitoredSubscriptionProperties `json:"value,omitempty"`
}

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

DeleteThenPoll performs Delete then polls until it's completed

func (MonitoredSubscriptionsClient) Get

Get ...

func (MonitoredSubscriptionsClient) List

List ...

func (MonitoredSubscriptionsClient) Update

Update ...

func (MonitoredSubscriptionsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type MonitoringTagRulesProperties

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

type Operation

type Operation string
const (
	OperationActive         Operation = "Active"
	OperationAddBegin       Operation = "AddBegin"
	OperationAddComplete    Operation = "AddComplete"
	OperationDeleteBegin    Operation = "DeleteBegin"
	OperationDeleteComplete Operation = "DeleteComplete"
)

func (*Operation) UnmarshalJSON

func (s *Operation) 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 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"`
	Operation                 *Operation               `json:"operation,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