monitorsresource

package
v0.20240522.1080424 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/monitorsresource Documentation

The monitorsresource SDK allows for interaction with the Azure Resource Manager Service elastic (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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/elastic/2024-03-01/monitorsresource"

Client Initialization

client := monitorsresource.NewMonitorsResourceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MonitorsResourceClient.MonitorsCreate

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

payload := monitorsresource.ElasticMonitorResource{
	// ...
}


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

Example Usage: MonitorsResourceClient.MonitorsDelete

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

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

Example Usage: MonitorsResourceClient.MonitorsGet

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

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

Example Usage: MonitorsResourceClient.MonitorsList

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

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

Example Usage: MonitorsResourceClient.MonitorsListByResourceGroup

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

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

Example Usage: MonitorsResourceClient.MonitorsUpdate

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

payload := monitorsresource.ElasticMonitorResourceUpdateParameters{
	// ...
}


read, err := client.MonitorsUpdate(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 PossibleValuesForMonitoringStatus

func PossibleValuesForMonitoringStatus() []string

func PossibleValuesForProvisioningState

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

type CompanyInfo struct {
	Business        *string `json:"business,omitempty"`
	Country         *string `json:"country,omitempty"`
	Domain          *string `json:"domain,omitempty"`
	EmployeesNumber *string `json:"employeesNumber,omitempty"`
	State           *string `json:"state,omitempty"`
}

type ElasticCloudDeployment

type ElasticCloudDeployment struct {
	AzureSubscriptionId     *string `json:"azureSubscriptionId,omitempty"`
	DeploymentId            *string `json:"deploymentId,omitempty"`
	ElasticsearchRegion     *string `json:"elasticsearchRegion,omitempty"`
	ElasticsearchServiceUrl *string `json:"elasticsearchServiceUrl,omitempty"`
	KibanaServiceUrl        *string `json:"kibanaServiceUrl,omitempty"`
	KibanaSsoUrl            *string `json:"kibanaSsoUrl,omitempty"`
	Name                    *string `json:"name,omitempty"`
}

type ElasticCloudUser

type ElasticCloudUser struct {
	ElasticCloudSsoDefaultUrl *string `json:"elasticCloudSsoDefaultUrl,omitempty"`
	EmailAddress              *string `json:"emailAddress,omitempty"`
	Id                        *string `json:"id,omitempty"`
}

type ElasticMonitorResource

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

type ElasticMonitorResourceOperationPredicate

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

func (ElasticMonitorResourceOperationPredicate) Matches

type ElasticMonitorResourceUpdateParameters

type ElasticMonitorResourceUpdateParameters struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type ElasticProperties

type ElasticProperties struct {
	ElasticCloudDeployment *ElasticCloudDeployment `json:"elasticCloudDeployment,omitempty"`
	ElasticCloudUser       *ElasticCloudUser       `json:"elasticCloudUser,omitempty"`
}

type LiftrResourceCategories

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

func (*LiftrResourceCategories) UnmarshalJSON

func (s *LiftrResourceCategories) 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) 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 MonitorProperties

type MonitorProperties struct {
	ElasticProperties           *ElasticProperties       `json:"elasticProperties,omitempty"`
	GenerateApiKey              *bool                    `json:"generateApiKey,omitempty"`
	LiftrResourceCategory       *LiftrResourceCategories `json:"liftrResourceCategory,omitempty"`
	LiftrResourcePreference     *int64                   `json:"liftrResourcePreference,omitempty"`
	MonitoringStatus            *MonitoringStatus        `json:"monitoringStatus,omitempty"`
	PlanDetails                 *PlanDetails             `json:"planDetails,omitempty"`
	ProvisioningState           *ProvisioningState       `json:"provisioningState,omitempty"`
	SaaSAzureSubscriptionStatus *string                  `json:"saaSAzureSubscriptionStatus,omitempty"`
	SourceCampaignId            *string                  `json:"sourceCampaignId,omitempty"`
	SourceCampaignName          *string                  `json:"sourceCampaignName,omitempty"`
	SubscriptionState           *string                  `json:"subscriptionState,omitempty"`
	UserInfo                    *UserInfo                `json:"userInfo,omitempty"`
	Version                     *string                  `json:"version,omitempty"`
}

type MonitoringStatus

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

func (*MonitoringStatus) UnmarshalJSON

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

type MonitorsCreateOperationResponse

type MonitorsCreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ElasticMonitorResource
}

type MonitorsDeleteOperationResponse

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

type MonitorsGetOperationResponse

type MonitorsGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ElasticMonitorResource
}

type MonitorsListByResourceGroupCompleteResult

type MonitorsListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ElasticMonitorResource
}

type MonitorsListByResourceGroupOperationResponse

type MonitorsListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ElasticMonitorResource
}

type MonitorsListCompleteResult

type MonitorsListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ElasticMonitorResource
}

type MonitorsListOperationResponse

type MonitorsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ElasticMonitorResource
}

type MonitorsResourceClient

type MonitorsResourceClient struct {
	Client *resourcemanager.Client
}

func NewMonitorsResourceClientWithBaseURI

func NewMonitorsResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*MonitorsResourceClient, error)

func (MonitorsResourceClient) MonitorsCreate

MonitorsCreate ...

func (MonitorsResourceClient) MonitorsCreateThenPoll

func (c MonitorsResourceClient) MonitorsCreateThenPoll(ctx context.Context, id MonitorId, input ElasticMonitorResource) error

MonitorsCreateThenPoll performs MonitorsCreate then polls until it's completed

func (MonitorsResourceClient) MonitorsDelete

func (c MonitorsResourceClient) MonitorsDelete(ctx context.Context, id MonitorId) (result MonitorsDeleteOperationResponse, err error)

MonitorsDelete ...

func (MonitorsResourceClient) MonitorsDeleteThenPoll

func (c MonitorsResourceClient) MonitorsDeleteThenPoll(ctx context.Context, id MonitorId) error

MonitorsDeleteThenPoll performs MonitorsDelete then polls until it's completed

func (MonitorsResourceClient) MonitorsGet

MonitorsGet ...

func (MonitorsResourceClient) MonitorsList

MonitorsList ...

func (MonitorsResourceClient) MonitorsListByResourceGroup

MonitorsListByResourceGroup ...

func (MonitorsResourceClient) MonitorsListByResourceGroupComplete

MonitorsListByResourceGroupComplete retrieves all the results into a single object

func (MonitorsResourceClient) MonitorsListByResourceGroupCompleteMatchingPredicate

func (c MonitorsResourceClient) MonitorsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ElasticMonitorResourceOperationPredicate) (result MonitorsListByResourceGroupCompleteResult, err error)

MonitorsListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MonitorsResourceClient) MonitorsListComplete

MonitorsListComplete retrieves all the results into a single object

func (MonitorsResourceClient) MonitorsListCompleteMatchingPredicate

func (c MonitorsResourceClient) MonitorsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ElasticMonitorResourceOperationPredicate) (result MonitorsListCompleteResult, err error)

MonitorsListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MonitorsResourceClient) MonitorsUpdate

MonitorsUpdate ...

type MonitorsUpdateOperationResponse

type MonitorsUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ElasticMonitorResource
}

type PlanDetails

type PlanDetails struct {
	OfferID     *string `json:"offerID,omitempty"`
	PlanID      *string `json:"planID,omitempty"`
	PlanName    *string `json:"planName,omitempty"`
	PublisherID *string `json:"publisherID,omitempty"`
	TermID      *string `json:"termID,omitempty"`
}

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 ResourceSku

type ResourceSku struct {
	Name string `json:"name"`
}

type UserInfo

type UserInfo struct {
	CompanyInfo  *CompanyInfo `json:"companyInfo,omitempty"`
	CompanyName  *string      `json:"companyName,omitempty"`
	EmailAddress *string      `json:"emailAddress,omitempty"`
	FirstName    *string      `json:"firstName,omitempty"`
	LastName     *string      `json:"lastName,omitempty"`
}

Jump to

Keyboard shortcuts

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