armnewrelicobservability

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 15 Imported by: 1

README

Azure Newrelic Module for Go

PkgGoDev

The armnewrelicobservability module provides operations for working with Azure Newrelic.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Newrelic module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Newrelic. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Newrelic module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armnewrelicobservability.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armnewrelicobservability.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewAccountsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Newrelic label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountCreationSource

type AccountCreationSource string

AccountCreationSource - Source of Account creation

const (
	// AccountCreationSourceLIFTR - Account is created from LIFTR
	AccountCreationSourceLIFTR AccountCreationSource = "LIFTR"
	// AccountCreationSourceNEWRELIC - Account is created from NEWRELIC
	AccountCreationSourceNEWRELIC AccountCreationSource = "NEWRELIC"
)

func PossibleAccountCreationSourceValues

func PossibleAccountCreationSourceValues() []AccountCreationSource

PossibleAccountCreationSourceValues returns the possible values for the AccountCreationSource const type.

type AccountInfo

type AccountInfo struct {
	// Account id
	AccountID *string

	// ingestion key of account
	IngestionKey *string

	// Region where New Relic account is present
	Region *string
}

AccountInfo - Account Info of the NewRelic account

func (AccountInfo) MarshalJSON

func (a AccountInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountInfo.

func (*AccountInfo) UnmarshalJSON

func (a *AccountInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountInfo.

type AccountProperties

type AccountProperties struct {
	// account id
	AccountID *string

	// account name
	AccountName *string

	// organization id
	OrganizationID *string

	// Region where New Relic account is present
	Region *string
}

AccountProperties - List of all the New relic accounts for the given user

func (AccountProperties) MarshalJSON

func (a AccountProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountProperties.

func (*AccountProperties) UnmarshalJSON

func (a *AccountProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountProperties.

type AccountPropertiesForNewRelic

type AccountPropertiesForNewRelic struct {
	// NewRelic Account Information
	AccountInfo *AccountInfo

	// NewRelic Organization Information
	OrganizationInfo *OrganizationInfo

	// date when plan was applied
	SingleSignOnProperties *NewRelicSingleSignOnProperties

	// User id
	UserID *string
}

AccountPropertiesForNewRelic - Properties of the NewRelic account

func (AccountPropertiesForNewRelic) MarshalJSON

func (a AccountPropertiesForNewRelic) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountPropertiesForNewRelic.

func (*AccountPropertiesForNewRelic) UnmarshalJSON

func (a *AccountPropertiesForNewRelic) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountPropertiesForNewRelic.

type AccountResource

type AccountResource struct {
	// The resource-specific properties for this resource.
	Properties *AccountProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AccountResource - The details of a account resource.

func (AccountResource) MarshalJSON

func (a AccountResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountResource.

func (*AccountResource) UnmarshalJSON

func (a *AccountResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountResource.

type AccountsClient

type AccountsClient struct {
	// contains filtered or unexported fields
}

AccountsClient contains the methods for the Accounts group. Don't use this type directly, use NewAccountsClient() instead.

func NewAccountsClient

func NewAccountsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AccountsClient, error)

NewAccountsClient creates a new instance of AccountsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AccountsClient) NewListPager

func (client *AccountsClient) NewListPager(userEmail string, location string, options *AccountsClientListOptions) *runtime.Pager[AccountsClientListResponse]

NewListPager - List all the existing accounts

Generated from API version 2024-01-01

  • userEmail - User Email.
  • location - Location for NewRelic.
  • options - AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method.
Example (AccountsListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Accounts_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAccountsClient().NewListPager("ruxvg@xqkmdhrnoo.hlmbpm", "egh", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AccountsListResponse = armnewrelicobservability.AccountsListResponse{
		// 	Value: []*armnewrelicobservability.AccountResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 			Properties: &armnewrelicobservability.AccountProperties{
		// 				AccountID: to.Ptr("igmdjq"),
		// 				AccountName: to.Ptr("accname"),
		// 				OrganizationID: to.Ptr("wvdclwi"),
		// 				Region: to.Ptr("xnsylopqwcggudcln"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (AccountsListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Accounts_List_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAccountsClient().NewListPager("ruxvg@xqkmdhrnoo.hlmbpm", "egh", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AccountsListResponse = armnewrelicobservability.AccountsListResponse{
		// 	Value: []*armnewrelicobservability.AccountResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 	}},
		// }
	}
}
Output:

type AccountsClientListOptions

type AccountsClientListOptions struct {
}

AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method.

type AccountsClientListResponse

type AccountsClientListResponse struct {
	// Response of get all accounts Operation.
	AccountsListResponse
}

AccountsClientListResponse contains the response from method AccountsClient.NewListPager.

type AccountsListResponse

type AccountsListResponse struct {
	// REQUIRED; The AccountResource items on this page
	Value []*AccountResource

	// The link to the next page of items
	NextLink *string
}

AccountsListResponse - Response of get all accounts Operation.

func (AccountsListResponse) MarshalJSON

func (a AccountsListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AccountsListResponse.

func (*AccountsListResponse) UnmarshalJSON

func (a *AccountsListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AccountsListResponse.

type ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AppServiceInfo

type AppServiceInfo struct {
	// Status of the NewRelic agent installed on the App service.
	AgentStatus *string

	// Version of the NewRelic agent installed on the App service.
	AgentVersion *string

	// Azure App service resource ID
	AzureResourceID *string
}

AppServiceInfo - Details of VM Resource having NewRelic OneAgent installed

func (AppServiceInfo) MarshalJSON

func (a AppServiceInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AppServiceInfo.

func (*AppServiceInfo) UnmarshalJSON

func (a *AppServiceInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AppServiceInfo.

type AppServicesGetRequest

type AppServicesGetRequest struct {
	// REQUIRED; User Email
	UserEmail *string

	// Azure resource IDs
	AzureResourceIDs []*string
}

AppServicesGetRequest - Request of a app services get Operation.

func (AppServicesGetRequest) MarshalJSON

func (a AppServicesGetRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AppServicesGetRequest.

func (*AppServicesGetRequest) UnmarshalJSON

func (a *AppServicesGetRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AppServicesGetRequest.

type AppServicesListResponse

type AppServicesListResponse struct {
	// REQUIRED; The AppServiceInfo items on this page
	Value []*AppServiceInfo

	// The link to the next page of items
	NextLink *string
}

AppServicesListResponse - Response of a list app services Operation.

func (AppServicesListResponse) MarshalJSON

func (a AppServicesListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AppServicesListResponse.

func (*AppServicesListResponse) UnmarshalJSON

func (a *AppServicesListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AppServicesListResponse.

type BillingCycle

type BillingCycle string

BillingCycle - Different usage type like YEARLY/MONTHLY

const (
	// BillingCycleMONTHLY - Billing cycle is MONTHLY
	BillingCycleMONTHLY BillingCycle = "MONTHLY"
	// BillingCycleWEEKLY - Billing cycle is WEEKLY
	BillingCycleWEEKLY BillingCycle = "WEEKLY"
	// BillingCycleYEARLY - Billing cycle is YEARLY
	BillingCycleYEARLY BillingCycle = "YEARLY"
)

func PossibleBillingCycleValues

func PossibleBillingCycleValues() []BillingCycle

PossibleBillingCycleValues returns the possible values for the BillingCycle const type.

type BillingInfoClient added in v1.2.0

type BillingInfoClient struct {
	// contains filtered or unexported fields
}

BillingInfoClient contains the methods for the BillingInfo group. Don't use this type directly, use NewBillingInfoClient() instead.

func NewBillingInfoClient added in v1.2.0

func NewBillingInfoClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BillingInfoClient, error)

NewBillingInfoClient creates a new instance of BillingInfoClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*BillingInfoClient) Get added in v1.2.0

func (client *BillingInfoClient) Get(ctx context.Context, resourceGroupName string, monitorName string, options *BillingInfoClientGetOptions) (BillingInfoClientGetResponse, error)

Get - Get marketplace info mapped to the given monitor. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • options - BillingInfoClientGetOptions contains the optional parameters for the BillingInfoClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/BillingInfo_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBillingInfoClient().Get(ctx, "myResourceGroup", "myMonitor", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.BillingInfoResponse = armnewrelicobservability.BillingInfoResponse{
	// 	MarketplaceSaasInfo: &armnewrelicobservability.MarketplaceSaaSInfo{
	// 		BilledAzureSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		MarketplaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SaaS/resources/AzNewRelic_b1190c8f"),
	// 		MarketplaceStatus: to.Ptr("Active"),
	// 		MarketplaceSubscriptionID: to.Ptr("12345678-1234-1234-1234-123456789012"),
	// 		MarketplaceSubscriptionName: to.Ptr("AzNewRelic_b1190c8f"),
	// 	},
	// 	PartnerBillingEntity: &armnewrelicobservability.PartnerBillingEntity{
	// 		OrganizationID: to.Ptr("1234567890"),
	// 		OrganizationName: to.Ptr("NROrganizationName"),
	// 	},
	// }
}
Output:

type BillingInfoClientGetOptions added in v1.2.0

type BillingInfoClientGetOptions struct {
}

BillingInfoClientGetOptions contains the optional parameters for the BillingInfoClient.Get method.

type BillingInfoClientGetResponse added in v1.2.0

type BillingInfoClientGetResponse struct {
	// Marketplace Subscription and Organization details to which resource gets billed into.
	BillingInfoResponse
}

BillingInfoClientGetResponse contains the response from method BillingInfoClient.Get.

type BillingInfoResponse added in v1.2.0

type BillingInfoResponse struct {
	// Marketplace Subscription details
	MarketplaceSaasInfo *MarketplaceSaaSInfo

	// Partner Billing Entity details: Organization Info
	PartnerBillingEntity *PartnerBillingEntity
}

BillingInfoResponse - Marketplace Subscription and Organization details to which resource gets billed into.

func (BillingInfoResponse) MarshalJSON added in v1.2.0

func (b BillingInfoResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BillingInfoResponse.

func (*BillingInfoResponse) UnmarshalJSON added in v1.2.0

func (b *BillingInfoResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BillingInfoResponse.

type BillingSource

type BillingSource string

BillingSource - Billing source

const (
	// BillingSourceAZURE - Billing source is Azure
	BillingSourceAZURE    BillingSource = "AZURE"
	BillingSourceNEWRELIC BillingSource = "NEWRELIC"
)

func PossibleBillingSourceValues

func PossibleBillingSourceValues() []BillingSource

PossibleBillingSourceValues returns the possible values for the BillingSource const type.

type ClientFactory

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAccountsClient

func (c *ClientFactory) NewAccountsClient() *AccountsClient

NewAccountsClient creates a new instance of AccountsClient.

func (*ClientFactory) NewBillingInfoClient added in v1.2.0

func (c *ClientFactory) NewBillingInfoClient() *BillingInfoClient

NewBillingInfoClient creates a new instance of BillingInfoClient.

func (*ClientFactory) NewConnectedPartnerResourcesClient added in v1.2.0

func (c *ClientFactory) NewConnectedPartnerResourcesClient() *ConnectedPartnerResourcesClient

NewConnectedPartnerResourcesClient creates a new instance of ConnectedPartnerResourcesClient.

func (*ClientFactory) NewMonitoredSubscriptionsClient added in v1.2.0

func (c *ClientFactory) NewMonitoredSubscriptionsClient() *MonitoredSubscriptionsClient

NewMonitoredSubscriptionsClient creates a new instance of MonitoredSubscriptionsClient.

func (*ClientFactory) NewMonitorsClient

func (c *ClientFactory) NewMonitorsClient() *MonitorsClient

NewMonitorsClient creates a new instance of MonitorsClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewOrganizationsClient

func (c *ClientFactory) NewOrganizationsClient() *OrganizationsClient

NewOrganizationsClient creates a new instance of OrganizationsClient.

func (*ClientFactory) NewPlansClient

func (c *ClientFactory) NewPlansClient() *PlansClient

NewPlansClient creates a new instance of PlansClient.

func (*ClientFactory) NewTagRulesClient

func (c *ClientFactory) NewTagRulesClient() *TagRulesClient

NewTagRulesClient creates a new instance of TagRulesClient.

type ConfigurationName added in v1.2.0

type ConfigurationName string
const (
	ConfigurationNameDefault ConfigurationName = "default"
)

func PossibleConfigurationNameValues added in v1.2.0

func PossibleConfigurationNameValues() []ConfigurationName

PossibleConfigurationNameValues returns the possible values for the ConfigurationName const type.

type ConnectedPartnerResourceProperties added in v1.2.0

type ConnectedPartnerResourceProperties struct {
	// NewRelic Account Id
	AccountID *string

	// NewRelic account name
	AccountName *string

	// The azure resource Id of the deployment.
	AzureResourceID *string

	// The location of the deployment.
	Location *string
}

ConnectedPartnerResourceProperties - Connected Partner Resource Properties

func (ConnectedPartnerResourceProperties) MarshalJSON added in v1.2.0

func (c ConnectedPartnerResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectedPartnerResourceProperties.

func (*ConnectedPartnerResourceProperties) UnmarshalJSON added in v1.2.0

func (c *ConnectedPartnerResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedPartnerResourceProperties.

type ConnectedPartnerResourcesClient added in v1.2.0

type ConnectedPartnerResourcesClient struct {
	// contains filtered or unexported fields
}

ConnectedPartnerResourcesClient contains the methods for the ConnectedPartnerResources group. Don't use this type directly, use NewConnectedPartnerResourcesClient() instead.

func NewConnectedPartnerResourcesClient added in v1.2.0

func NewConnectedPartnerResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectedPartnerResourcesClient, error)

NewConnectedPartnerResourcesClient creates a new instance of ConnectedPartnerResourcesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ConnectedPartnerResourcesClient) NewListPager added in v1.2.0

NewListPager - List of all active deployments that are associated with the marketplace subscription linked to the given monitor.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • options - ConnectedPartnerResourcesClientListOptions contains the optional parameters for the ConnectedPartnerResourcesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/ConnectedPartnerResources_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewConnectedPartnerResourcesClient().NewListPager("myResourceGroup", "myMonitor", &armnewrelicobservability.ConnectedPartnerResourcesClientListOptions{Body: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ConnectedPartnerResourcesListResponse = armnewrelicobservability.ConnectedPartnerResourcesListResponse{
		// 	Value: []*armnewrelicobservability.ConnectedPartnerResourcesListFormat{
		// 		{
		// 			Properties: &armnewrelicobservability.ConnectedPartnerResourceProperties{
		// 				AccountID: to.Ptr("1156243"),
		// 				AccountName: to.Ptr("accountName"),
		// 				AzureResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 				Location: to.Ptr("West US 2"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ConnectedPartnerResourcesClientListOptions added in v1.2.0

type ConnectedPartnerResourcesClientListOptions struct {
	// Email Id of the user
	Body *string
}

ConnectedPartnerResourcesClientListOptions contains the optional parameters for the ConnectedPartnerResourcesClient.NewListPager method.

type ConnectedPartnerResourcesClientListResponse added in v1.2.0

type ConnectedPartnerResourcesClientListResponse struct {
	// List of all active newrelic deployments.
	ConnectedPartnerResourcesListResponse
}

ConnectedPartnerResourcesClientListResponse contains the response from method ConnectedPartnerResourcesClient.NewListPager.

type ConnectedPartnerResourcesListFormat added in v1.2.0

type ConnectedPartnerResourcesListFormat struct {
	// Connected Partner Resource Properties
	Properties *ConnectedPartnerResourceProperties
}

ConnectedPartnerResourcesListFormat - Connected Partner Resources List Format

func (ConnectedPartnerResourcesListFormat) MarshalJSON added in v1.2.0

func (c ConnectedPartnerResourcesListFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectedPartnerResourcesListFormat.

func (*ConnectedPartnerResourcesListFormat) UnmarshalJSON added in v1.2.0

func (c *ConnectedPartnerResourcesListFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedPartnerResourcesListFormat.

type ConnectedPartnerResourcesListResponse added in v1.2.0

type ConnectedPartnerResourcesListResponse struct {
	// Link to the next set of results, if any.
	NextLink *string

	// Results of a list operation.
	Value []*ConnectedPartnerResourcesListFormat
}

ConnectedPartnerResourcesListResponse - List of all active newrelic deployments.

func (ConnectedPartnerResourcesListResponse) MarshalJSON added in v1.2.0

func (c ConnectedPartnerResourcesListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectedPartnerResourcesListResponse.

func (*ConnectedPartnerResourcesListResponse) UnmarshalJSON added in v1.2.0

func (c *ConnectedPartnerResourcesListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectedPartnerResourcesListResponse.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type FilteringTag

type FilteringTag struct {
	// Valid actions for a filtering tag. Exclusion takes priority over inclusion.
	Action *TagAction

	// The name (also known as the key) of the tag.
	Name *string

	// The value of the tag.
	Value *string
}

FilteringTag - The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored.

func (FilteringTag) MarshalJSON

func (f FilteringTag) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FilteringTag.

func (*FilteringTag) UnmarshalJSON

func (f *FilteringTag) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FilteringTag.

type HostsGetRequest

type HostsGetRequest struct {
	// REQUIRED; User Email
	UserEmail *string

	// VM resource IDs
	VMIDs []*string
}

HostsGetRequest - Request of a Hosts get Operation.

func (HostsGetRequest) MarshalJSON

func (h HostsGetRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HostsGetRequest.

func (*HostsGetRequest) UnmarshalJSON

func (h *HostsGetRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HostsGetRequest.

type LiftrResourceCategories

type LiftrResourceCategories string

LiftrResourceCategories - Liftr Resource category.

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

func PossibleLiftrResourceCategoriesValues

func PossibleLiftrResourceCategoriesValues() []LiftrResourceCategories

PossibleLiftrResourceCategoriesValues returns the possible values for the LiftrResourceCategories const type.

type LinkedResource added in v1.2.0

type LinkedResource struct {
	// The ARM id of the linked resource.
	ID *string
}

LinkedResource - The definition of a linked resource.

func (LinkedResource) MarshalJSON added in v1.2.0

func (l LinkedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkedResource.

func (*LinkedResource) UnmarshalJSON added in v1.2.0

func (l *LinkedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedResource.

type LinkedResourceListResponse added in v1.2.0

type LinkedResourceListResponse struct {
	// Link to the next set of results, if any.
	NextLink *string

	// Results of a list operation.
	Value []*LinkedResource
}

LinkedResourceListResponse - Response of a list operation.

func (LinkedResourceListResponse) MarshalJSON added in v1.2.0

func (l LinkedResourceListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkedResourceListResponse.

func (*LinkedResourceListResponse) UnmarshalJSON added in v1.2.0

func (l *LinkedResourceListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedResourceListResponse.

type LogRules

type LogRules struct {
	// List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty,
	// all resources will be captured. If only Exclude action is specified, the
	// rules will apply to the list of all available resources. If Include actions are specified, the rules will only include
	// resources with the associated tags.
	FilteringTags []*FilteringTag

	// Flag specifying if AAD logs should be sent for the Monitor resource.
	SendAADLogs *SendAADLogsStatus

	// Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
	SendActivityLogs *SendActivityLogsStatus

	// Flag specifying if subscription logs should be sent for the Monitor resource.
	SendSubscriptionLogs *SendSubscriptionLogsStatus
}

LogRules - Set of rules for sending logs for the Monitor resource.

func (LogRules) MarshalJSON

func (l LogRules) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LogRules.

func (*LogRules) UnmarshalJSON

func (l *LogRules) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LogRules.

type ManagedServiceIdentity

type ManagedServiceIdentity struct {
	// REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
	Type *ManagedServiceIdentityType

	// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
	// The dictionary values can be empty objects ({}) in
	// requests.
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
	TenantID *string
}

ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)

func (ManagedServiceIdentity) MarshalJSON

func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.

func (*ManagedServiceIdentity) UnmarshalJSON

func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

const (
	ManagedServiceIdentityTypeNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned"
	ManagedServiceIdentityTypeUserAssigned               ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type MarketplaceSaaSInfo added in v1.2.0

type MarketplaceSaaSInfo struct {
	// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into.
	BilledAzureSubscriptionID *string

	// Marketplace Subscription Details: Resource URI
	MarketplaceResourceID *string

	// Marketplace Subscription Details: SaaS Subscription Status
	MarketplaceStatus *string

	// Marketplace Subscription Id. This is a GUID-formatted string.
	MarketplaceSubscriptionID *string

	// Marketplace Subscription Details: SAAS Name
	MarketplaceSubscriptionName *string
}

MarketplaceSaaSInfo - Marketplace SAAS Info of the resource.

func (MarketplaceSaaSInfo) MarshalJSON added in v1.2.0

func (m MarketplaceSaaSInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MarketplaceSaaSInfo.

func (*MarketplaceSaaSInfo) UnmarshalJSON added in v1.2.0

func (m *MarketplaceSaaSInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceSaaSInfo.

type MarketplaceSubscriptionStatus

type MarketplaceSubscriptionStatus string

MarketplaceSubscriptionStatus - Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.

const (
	// MarketplaceSubscriptionStatusActive - monitoring is enabled
	MarketplaceSubscriptionStatusActive MarketplaceSubscriptionStatus = "Active"
	// MarketplaceSubscriptionStatusSuspended - monitoring is disabled
	MarketplaceSubscriptionStatusSuspended MarketplaceSubscriptionStatus = "Suspended"
)

func PossibleMarketplaceSubscriptionStatusValues

func PossibleMarketplaceSubscriptionStatusValues() []MarketplaceSubscriptionStatus

PossibleMarketplaceSubscriptionStatusValues returns the possible values for the MarketplaceSubscriptionStatus const type.

type MetricRules

type MetricRules struct {
	// List of filtering tags to be used for capturing metrics.
	FilteringTags []*FilteringTag

	// Flag specifying if metrics should be sent for the Monitor resource.
	SendMetrics *SendMetricsStatus

	// User Email
	UserEmail *string
}

MetricRules - Set of rules for sending metrics for the Monitor resource.

func (MetricRules) MarshalJSON

func (m MetricRules) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricRules.

func (*MetricRules) UnmarshalJSON

func (m *MetricRules) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricRules.

type MetricsRequest

type MetricsRequest struct {
	// REQUIRED; User Email
	UserEmail *string
}

MetricsRequest - Request of get metrics Operation.

func (MetricsRequest) MarshalJSON

func (m MetricsRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricsRequest.

func (*MetricsRequest) UnmarshalJSON

func (m *MetricsRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricsRequest.

type MetricsStatusRequest

type MetricsStatusRequest struct {
	// REQUIRED; User Email
	UserEmail *string

	// Azure resource IDs
	AzureResourceIDs []*string
}

MetricsStatusRequest - Request of get metrics status Operation.

func (MetricsStatusRequest) MarshalJSON

func (m MetricsStatusRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricsStatusRequest.

func (*MetricsStatusRequest) UnmarshalJSON

func (m *MetricsStatusRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricsStatusRequest.

type MetricsStatusResponse

type MetricsStatusResponse struct {
	// Azure resource IDs
	AzureResourceIDs []*string
}

MetricsStatusResponse - Response of get metrics status Operation.

func (MetricsStatusResponse) MarshalJSON

func (m MetricsStatusResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MetricsStatusResponse.

func (*MetricsStatusResponse) UnmarshalJSON

func (m *MetricsStatusResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MetricsStatusResponse.

type MonitorProperties

type MonitorProperties struct {
	// Source of account creation
	AccountCreationSource *AccountCreationSource

	// MarketplaceSubscriptionStatus of the resource
	NewRelicAccountProperties *AccountPropertiesForNewRelic

	// Source of org creation
	OrgCreationSource *OrgCreationSource

	// Plan details
	PlanData *PlanData

	// Status of Azure Subscription where Marketplace SaaS is located.
	SaaSAzureSubscriptionStatus *string

	// State of the Azure Subscription containing the monitor resource
	SubscriptionState *string

	// User Info
	UserInfo *UserInfo

	// READ-ONLY; Liftr resource category
	LiftrResourceCategory *LiftrResourceCategories

	// READ-ONLY; Liftr resource preference. The priority of the resource.
	LiftrResourcePreference *int32

	// READ-ONLY; Marketplace Subscription Id
	MarketplaceSubscriptionID *string

	// READ-ONLY; NewRelic Organization properties of the resource
	MarketplaceSubscriptionStatus *MarketplaceSubscriptionStatus

	// READ-ONLY; MonitoringStatus of the resource
	MonitoringStatus *MonitoringStatus

	// READ-ONLY; Provisioning State of the resource
	ProvisioningState *ProvisioningState
}

MonitorProperties - Properties specific to the NewRelic Monitor resource

func (MonitorProperties) MarshalJSON

func (m MonitorProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MonitorProperties.

func (*MonitorProperties) UnmarshalJSON

func (m *MonitorProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MonitorProperties.

type MonitoredResource

type MonitoredResource struct {
	// The ARM id of the resource.
	ID *string

	// Reason for why the resource is sending logs (or why it is not sending).
	ReasonForLogsStatus *string

	// Reason for why the resource is sending metrics (or why it is not sending).
	ReasonForMetricsStatus *string

	// Flag indicating if resource is sending logs to NewRelic.
	SendingLogs *SendingLogsStatus

	// Flag indicating if resource is sending metrics to NewRelic.
	SendingMetrics *SendingMetricsStatus
}

MonitoredResource - Details of resource being monitored by NewRelic monitor resource

func (MonitoredResource) MarshalJSON

func (m MonitoredResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MonitoredResource.

func (*MonitoredResource) UnmarshalJSON

func (m *MonitoredResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoredResource.

type MonitoredResourceListResponse

type MonitoredResourceListResponse struct {
	// REQUIRED; The MonitoredResource items on this page
	Value []*MonitoredResource

	// The link to the next page of items
	NextLink *string
}

MonitoredResourceListResponse - List of all the resources being monitored by NewRelic monitor resource

func (MonitoredResourceListResponse) MarshalJSON

func (m MonitoredResourceListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MonitoredResourceListResponse.

func (*MonitoredResourceListResponse) UnmarshalJSON

func (m *MonitoredResourceListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoredResourceListResponse.

type MonitoredSubscription added in v1.2.0

type MonitoredSubscription struct {
	// The reason of not monitoring the subscription.
	Error *string

	// The state of monitoring.
	Status *Status

	// The subscriptionId to be monitored.
	SubscriptionID *string

	// The resource-specific properties for this resource.
	TagRules *MonitoringTagRulesProperties
}

MonitoredSubscription - The list of subscriptions and it's monitoring status by current NewRelic monitor.

func (MonitoredSubscription) MarshalJSON added in v1.2.0

func (m MonitoredSubscription) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MonitoredSubscription.

func (*MonitoredSubscription) UnmarshalJSON added in v1.2.0

func (m *MonitoredSubscription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoredSubscription.

type MonitoredSubscriptionProperties added in v1.2.0

type MonitoredSubscriptionProperties struct {
	// The request to update subscriptions needed to be monitored by the NewRelic monitor resource.
	Properties *SubscriptionList

	// READ-ONLY; The id of the monitored subscription resource.
	ID *string

	// READ-ONLY; Name of the monitored subscription resource.
	Name *string

	// READ-ONLY; The type of the monitored subscription resource.
	Type *string
}

MonitoredSubscriptionProperties - The request to update subscriptions needed to be monitored by the NewRelic monitor resource.

func (MonitoredSubscriptionProperties) MarshalJSON added in v1.2.0

func (m MonitoredSubscriptionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MonitoredSubscriptionProperties.

func (*MonitoredSubscriptionProperties) UnmarshalJSON added in v1.2.0

func (m *MonitoredSubscriptionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoredSubscriptionProperties.

type MonitoredSubscriptionPropertiesList added in v1.2.0

type MonitoredSubscriptionPropertiesList struct {
	// The link to the next page of items
	NextLink *string
	Value    []*MonitoredSubscriptionProperties
}

func (MonitoredSubscriptionPropertiesList) MarshalJSON added in v1.2.0

func (m MonitoredSubscriptionPropertiesList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MonitoredSubscriptionPropertiesList.

func (*MonitoredSubscriptionPropertiesList) UnmarshalJSON added in v1.2.0

func (m *MonitoredSubscriptionPropertiesList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoredSubscriptionPropertiesList.

type MonitoredSubscriptionsClient added in v1.2.0

type MonitoredSubscriptionsClient struct {
	// contains filtered or unexported fields
}

MonitoredSubscriptionsClient contains the methods for the MonitoredSubscriptions group. Don't use this type directly, use NewMonitoredSubscriptionsClient() instead.

func NewMonitoredSubscriptionsClient added in v1.2.0

func NewMonitoredSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitoredSubscriptionsClient, error)

NewMonitoredSubscriptionsClient creates a new instance of MonitoredSubscriptionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MonitoredSubscriptionsClient) BeginCreateorUpdate added in v1.2.0

BeginCreateorUpdate - Add the subscriptions that should be monitored by the NewRelic monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • configurationName - The configuration name. Only 'default' value is supported.
  • options - MonitoredSubscriptionsClientBeginCreateorUpdateOptions contains the optional parameters for the MonitoredSubscriptionsClient.BeginCreateorUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/MonitoredSubscriptions_CreateorUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitoredSubscriptionsClient().BeginCreateorUpdate(ctx, "myResourceGroup", "myMonitor", armnewrelicobservability.ConfigurationNameDefault, armnewrelicobservability.MonitoredSubscriptionProperties{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MonitoredSubscriptionProperties = armnewrelicobservability.MonitoredSubscriptionProperties{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("NewRelic.Observability/monitors/monitoredSubscriptions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor/monitoredSubscriptions/default"),
	// 	Properties: &armnewrelicobservability.SubscriptionList{
	// 		MonitoredSubscriptionList: []*armnewrelicobservability.MonitoredSubscription{
	// 			{
	// 				Status: to.Ptr(armnewrelicobservability.StatusActive),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 				TagRules: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 					LogRules: &armnewrelicobservability.LogRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
	// 						SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
	// 						SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
	// 					},
	// 					MetricRules: &armnewrelicobservability.MetricRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						UserEmail: to.Ptr("test@testing.com"),
	// 					},
	// 					ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				},
	// 			},
	// 			{
	// 				Status: to.Ptr(armnewrelicobservability.StatusFailed),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001"),
	// 				TagRules: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 					LogRules: &armnewrelicobservability.LogRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
	// 						SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
	// 						SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
	// 					},
	// 					MetricRules: &armnewrelicobservability.MetricRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						UserEmail: to.Ptr("test@testing.com"),
	// 					},
	// 					ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*MonitoredSubscriptionsClient) BeginDelete added in v1.2.0

BeginDelete - Updates the subscriptions that are being monitored by the NewRelic monitor resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • configurationName - The configuration name. Only 'default' value is supported.
  • options - MonitoredSubscriptionsClientBeginDeleteOptions contains the optional parameters for the MonitoredSubscriptionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/MonitoredSubscriptions_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitoredSubscriptionsClient().BeginDelete(ctx, "myResourceGroup", "myMonitor", armnewrelicobservability.ConfigurationNameDefault, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*MonitoredSubscriptionsClient) BeginUpdate added in v1.2.0

BeginUpdate - Updates the subscriptions that are being monitored by the NewRelic monitor resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • configurationName - The configuration name. Only 'default' value is supported.
  • options - MonitoredSubscriptionsClientBeginUpdateOptions contains the optional parameters for the MonitoredSubscriptionsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/MonitoredSubscriptions_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitoredSubscriptionsClient().BeginUpdate(ctx, "myResourceGroup", "myMonitor", armnewrelicobservability.ConfigurationNameDefault, armnewrelicobservability.MonitoredSubscriptionProperties{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MonitoredSubscriptionProperties = armnewrelicobservability.MonitoredSubscriptionProperties{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("NewRelic.Observability/monitors/monitoredSubscriptions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor/monitoredSubscriptions/default"),
	// 	Properties: &armnewrelicobservability.SubscriptionList{
	// 		MonitoredSubscriptionList: []*armnewrelicobservability.MonitoredSubscription{
	// 			{
	// 				Status: to.Ptr(armnewrelicobservability.StatusActive),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 				TagRules: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 					LogRules: &armnewrelicobservability.LogRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
	// 						SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
	// 						SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
	// 					},
	// 					MetricRules: &armnewrelicobservability.MetricRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						UserEmail: to.Ptr("test@testing.com"),
	// 					},
	// 					ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				},
	// 			},
	// 			{
	// 				Status: to.Ptr(armnewrelicobservability.StatusFailed),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001"),
	// 				TagRules: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 					LogRules: &armnewrelicobservability.LogRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
	// 						SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
	// 						SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
	// 					},
	// 					MetricRules: &armnewrelicobservability.MetricRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						UserEmail: to.Ptr("test@testing.com"),
	// 					},
	// 					ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*MonitoredSubscriptionsClient) Get added in v1.2.0

Get - List the subscriptions currently being monitored by the NewRelic monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • configurationName - The configuration name. Only 'default' value is supported.
  • options - MonitoredSubscriptionsClientGetOptions contains the optional parameters for the MonitoredSubscriptionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/MonitoredSubscriptions_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitoredSubscriptionsClient().Get(ctx, "myResourceGroup", "myMonitor", armnewrelicobservability.ConfigurationNameDefault, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MonitoredSubscriptionProperties = armnewrelicobservability.MonitoredSubscriptionProperties{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("NewRelic.Observability/monitors/monitoredSubscriptions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor/monitoredSubscriptions/default"),
	// 	Properties: &armnewrelicobservability.SubscriptionList{
	// 		MonitoredSubscriptionList: []*armnewrelicobservability.MonitoredSubscription{
	// 			{
	// 				Status: to.Ptr(armnewrelicobservability.StatusActive),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 				TagRules: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 					LogRules: &armnewrelicobservability.LogRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
	// 						SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
	// 						SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
	// 					},
	// 					MetricRules: &armnewrelicobservability.MetricRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						UserEmail: to.Ptr("test@testing.com"),
	// 					},
	// 					ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				},
	// 			},
	// 			{
	// 				Status: to.Ptr(armnewrelicobservability.StatusFailed),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001"),
	// 				TagRules: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 					LogRules: &armnewrelicobservability.LogRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
	// 						SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
	// 						SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
	// 					},
	// 					MetricRules: &armnewrelicobservability.MetricRules{
	// 						FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 							{
	// 								Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 								Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 								Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 						}},
	// 						UserEmail: to.Ptr("test@testing.com"),
	// 					},
	// 					ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*MonitoredSubscriptionsClient) NewListPager added in v1.2.0

NewListPager - List the subscriptions currently being monitored by the NewRelic monitor resource.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • options - MonitoredSubscriptionsClientListOptions contains the optional parameters for the MonitoredSubscriptionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/MonitoredSubscriptions_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitoredSubscriptionsClient().NewListPager("myResourceGroup", "myMonitor", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.MonitoredSubscriptionPropertiesList = armnewrelicobservability.MonitoredSubscriptionPropertiesList{
		// 	Value: []*armnewrelicobservability.MonitoredSubscriptionProperties{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("NewRelic.Observability/monitors/monitoredSubscriptions"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor/monitoredSubscriptions/default"),
		// 			Properties: &armnewrelicobservability.SubscriptionList{
		// 				MonitoredSubscriptionList: []*armnewrelicobservability.MonitoredSubscription{
		// 					{
		// 						Status: to.Ptr(armnewrelicobservability.StatusActive),
		// 						SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
		// 						TagRules: &armnewrelicobservability.MonitoringTagRulesProperties{
		// 							LogRules: &armnewrelicobservability.LogRules{
		// 								FilteringTags: []*armnewrelicobservability.FilteringTag{
		// 									{
		// 										Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
		// 										Action: to.Ptr(armnewrelicobservability.TagActionInclude),
		// 										Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
		// 								}},
		// 								SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
		// 								SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
		// 								SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
		// 							},
		// 							MetricRules: &armnewrelicobservability.MetricRules{
		// 								FilteringTags: []*armnewrelicobservability.FilteringTag{
		// 									{
		// 										Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
		// 										Action: to.Ptr(armnewrelicobservability.TagActionInclude),
		// 										Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
		// 								}},
		// 								UserEmail: to.Ptr("test@testing.com"),
		// 							},
		// 							ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
		// 						},
		// 					},
		// 					{
		// 						Status: to.Ptr(armnewrelicobservability.StatusFailed),
		// 						SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001"),
		// 						TagRules: &armnewrelicobservability.MonitoringTagRulesProperties{
		// 							LogRules: &armnewrelicobservability.LogRules{
		// 								FilteringTags: []*armnewrelicobservability.FilteringTag{
		// 									{
		// 										Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
		// 										Action: to.Ptr(armnewrelicobservability.TagActionInclude),
		// 										Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
		// 								}},
		// 								SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
		// 								SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
		// 								SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
		// 							},
		// 							MetricRules: &armnewrelicobservability.MetricRules{
		// 								FilteringTags: []*armnewrelicobservability.FilteringTag{
		// 									{
		// 										Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
		// 										Action: to.Ptr(armnewrelicobservability.TagActionInclude),
		// 										Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
		// 								}},
		// 								UserEmail: to.Ptr("test@testing.com"),
		// 							},
		// 							ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
		// 						},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

type MonitoredSubscriptionsClientBeginCreateorUpdateOptions added in v1.2.0

type MonitoredSubscriptionsClientBeginCreateorUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MonitoredSubscriptionsClientBeginCreateorUpdateOptions contains the optional parameters for the MonitoredSubscriptionsClient.BeginCreateorUpdate method.

type MonitoredSubscriptionsClientBeginDeleteOptions added in v1.2.0

type MonitoredSubscriptionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MonitoredSubscriptionsClientBeginDeleteOptions contains the optional parameters for the MonitoredSubscriptionsClient.BeginDelete method.

type MonitoredSubscriptionsClientBeginUpdateOptions added in v1.2.0

type MonitoredSubscriptionsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MonitoredSubscriptionsClientBeginUpdateOptions contains the optional parameters for the MonitoredSubscriptionsClient.BeginUpdate method.

type MonitoredSubscriptionsClientCreateorUpdateResponse added in v1.2.0

type MonitoredSubscriptionsClientCreateorUpdateResponse struct {
	// The request to update subscriptions needed to be monitored by the NewRelic monitor resource.
	MonitoredSubscriptionProperties
}

MonitoredSubscriptionsClientCreateorUpdateResponse contains the response from method MonitoredSubscriptionsClient.BeginCreateorUpdate.

type MonitoredSubscriptionsClientDeleteResponse added in v1.2.0

type MonitoredSubscriptionsClientDeleteResponse struct {
}

MonitoredSubscriptionsClientDeleteResponse contains the response from method MonitoredSubscriptionsClient.BeginDelete.

type MonitoredSubscriptionsClientGetOptions added in v1.2.0

type MonitoredSubscriptionsClientGetOptions struct {
}

MonitoredSubscriptionsClientGetOptions contains the optional parameters for the MonitoredSubscriptionsClient.Get method.

type MonitoredSubscriptionsClientGetResponse added in v1.2.0

type MonitoredSubscriptionsClientGetResponse struct {
	// The request to update subscriptions needed to be monitored by the NewRelic monitor resource.
	MonitoredSubscriptionProperties
}

MonitoredSubscriptionsClientGetResponse contains the response from method MonitoredSubscriptionsClient.Get.

type MonitoredSubscriptionsClientListOptions added in v1.2.0

type MonitoredSubscriptionsClientListOptions struct {
}

MonitoredSubscriptionsClientListOptions contains the optional parameters for the MonitoredSubscriptionsClient.NewListPager method.

type MonitoredSubscriptionsClientListResponse added in v1.2.0

type MonitoredSubscriptionsClientListResponse struct {
	MonitoredSubscriptionPropertiesList
}

MonitoredSubscriptionsClientListResponse contains the response from method MonitoredSubscriptionsClient.NewListPager.

type MonitoredSubscriptionsClientUpdateResponse added in v1.2.0

type MonitoredSubscriptionsClientUpdateResponse struct {
	// The request to update subscriptions needed to be monitored by the NewRelic monitor resource.
	MonitoredSubscriptionProperties
}

MonitoredSubscriptionsClientUpdateResponse contains the response from method MonitoredSubscriptionsClient.BeginUpdate.

type MonitoringStatus

type MonitoringStatus string

MonitoringStatus - Flag specifying if the resource monitoring is enabled or disabled.

const (
	// MonitoringStatusDisabled - monitoring is disabled
	MonitoringStatusDisabled MonitoringStatus = "Disabled"
	// MonitoringStatusEnabled - monitoring is enabled
	MonitoringStatusEnabled MonitoringStatus = "Enabled"
)

func PossibleMonitoringStatusValues

func PossibleMonitoringStatusValues() []MonitoringStatus

PossibleMonitoringStatusValues returns the possible values for the MonitoringStatus const type.

type MonitoringTagRulesProperties

type MonitoringTagRulesProperties struct {
	// Set of rules for sending logs for the Monitor resource.
	LogRules *LogRules

	// Set of rules for sending metrics for the Monitor resource.
	MetricRules *MetricRules

	// READ-ONLY; Provisioning State of the resource
	ProvisioningState *ProvisioningState
}

MonitoringTagRulesProperties - The resource-specific properties for this resource.

func (MonitoringTagRulesProperties) MarshalJSON

func (m MonitoringTagRulesProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MonitoringTagRulesProperties.

func (*MonitoringTagRulesProperties) UnmarshalJSON

func (m *MonitoringTagRulesProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringTagRulesProperties.

type MonitorsClient

type MonitorsClient struct {
	// contains filtered or unexported fields
}

MonitorsClient contains the methods for the Monitors group. Don't use this type directly, use NewMonitorsClient() instead.

func NewMonitorsClient

func NewMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitorsClient, error)

NewMonitorsClient creates a new instance of MonitorsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MonitorsClient) BeginCreateOrUpdate

func (client *MonitorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, resource NewRelicMonitorResource, options *MonitorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[MonitorsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a NewRelicMonitorResource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • resource - Resource create parameters.
  • options - MonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the MonitorsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitorsClient().BeginCreateOrUpdate(ctx, "rgNewRelic", "cdlymktqw", armnewrelicobservability.NewRelicMonitorResource{
		Location: to.Ptr("k"),
		Tags: map[string]*string{
			"key6976": to.Ptr("oaxfhf"),
		},
		Identity: &armnewrelicobservability.ManagedServiceIdentity{
			Type: to.Ptr(armnewrelicobservability.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armnewrelicobservability.UserAssignedIdentity{
				"key8903": {},
			},
		},
		Properties: &armnewrelicobservability.MonitorProperties{
			AccountCreationSource:         to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
			LiftrResourceCategory:         to.Ptr(armnewrelicobservability.LiftrResourceCategoriesUnknown),
			MarketplaceSubscriptionStatus: to.Ptr(armnewrelicobservability.MarketplaceSubscriptionStatusActive),
			MonitoringStatus:              to.Ptr(armnewrelicobservability.MonitoringStatusEnabled),
			NewRelicAccountProperties: &armnewrelicobservability.AccountPropertiesForNewRelic{
				AccountInfo: &armnewrelicobservability.AccountInfo{
					AccountID:    to.Ptr("xhqmg"),
					IngestionKey: to.Ptr("wltnimmhqt"),
					Region:       to.Ptr("ljcf"),
				},
				OrganizationInfo: &armnewrelicobservability.OrganizationInfo{
					OrganizationID: to.Ptr("k"),
				},
				SingleSignOnProperties: &armnewrelicobservability.NewRelicSingleSignOnProperties{
					EnterpriseAppID:   to.Ptr("kwiwfz"),
					ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateAccepted),
					SingleSignOnState: to.Ptr(armnewrelicobservability.SingleSignOnStatesInitial),
					SingleSignOnURL:   to.Ptr("kvseueuljsxmfwpqctz"),
				},
				UserID: to.Ptr("vcscxlncofcuduadesd"),
			},
			OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
			PlanData: &armnewrelicobservability.PlanData{
				BillingCycle:  to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
				EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t }()),
				PlanDetails:   to.Ptr("tbbiaga"),
				UsageType:     to.Ptr(armnewrelicobservability.UsageTypePAYG),
			},
			ProvisioningState:           to.Ptr(armnewrelicobservability.ProvisioningStateAccepted),
			SaaSAzureSubscriptionStatus: to.Ptr("Subscribed"),
			SubscriptionState:           to.Ptr("Suspended"),
			UserInfo: &armnewrelicobservability.UserInfo{
				Country:      to.Ptr("hslqnwdanrconqyekwbnttaetv"),
				EmailAddress: to.Ptr("%6%@4-g.N1.3F-kI1.Ue-.lJso"),
				FirstName:    to.Ptr("vdftzcggirefejajwahhwhyibutramdaotvnuf"),
				LastName:     to.Ptr("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc"),
				PhoneNumber:  to.Ptr("krf"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NewRelicMonitorResource = armnewrelicobservability.NewRelicMonitorResource{
	// 	Name: to.Ptr("fteaqmtwspcfgyopqzrepiqu"),
	// 	Type: to.Ptr("hdj"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	SystemData: &armnewrelicobservability.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		CreatedBy: to.Ptr("pcdjzdldbwsdlfi"),
	// 		CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("xbsjrxmwwlmpnpvcica"),
	// 		LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("k"),
	// 	Tags: map[string]*string{
	// 		"key6976": to.Ptr("oaxfhf"),
	// 	},
	// 	Identity: &armnewrelicobservability.ManagedServiceIdentity{
	// 		Type: to.Ptr(armnewrelicobservability.ManagedServiceIdentityTypeNone),
	// 		PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		TenantID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		UserAssignedIdentities: map[string]*armnewrelicobservability.UserAssignedIdentity{
	// 			"key8903": &armnewrelicobservability.UserAssignedIdentity{
	// 				ClientID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 				PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armnewrelicobservability.MonitorProperties{
	// 		AccountCreationSource: to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
	// 		LiftrResourceCategory: to.Ptr(armnewrelicobservability.LiftrResourceCategoriesUnknown),
	// 		LiftrResourcePreference: to.Ptr[int32](12),
	// 		MarketplaceSubscriptionID: to.Ptr("jizcsbgrdjhrfqqvvruhgftqhra"),
	// 		MarketplaceSubscriptionStatus: to.Ptr(armnewrelicobservability.MarketplaceSubscriptionStatusActive),
	// 		MonitoringStatus: to.Ptr(armnewrelicobservability.MonitoringStatusEnabled),
	// 		NewRelicAccountProperties: &armnewrelicobservability.AccountPropertiesForNewRelic{
	// 			AccountInfo: &armnewrelicobservability.AccountInfo{
	// 				AccountID: to.Ptr("xhqmg"),
	// 				Region: to.Ptr("ljcf"),
	// 			},
	// 			OrganizationInfo: &armnewrelicobservability.OrganizationInfo{
	// 				OrganizationID: to.Ptr("k"),
	// 			},
	// 			SingleSignOnProperties: &armnewrelicobservability.NewRelicSingleSignOnProperties{
	// 				EnterpriseAppID: to.Ptr("kwiwfz"),
	// 				ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				SingleSignOnState: to.Ptr(armnewrelicobservability.SingleSignOnStatesInitial),
	// 				SingleSignOnURL: to.Ptr("kvseueuljsxmfwpqctz"),
	// 			},
	// 			UserID: to.Ptr("vcscxlncofcuduadesd"),
	// 		},
	// 		OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
	// 		PlanData: &armnewrelicobservability.PlanData{
	// 			BillingCycle: to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
	// 			EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t}()),
	// 			PlanDetails: to.Ptr("tbbiaga"),
	// 			UsageType: to.Ptr(armnewrelicobservability.UsageTypePAYG),
	// 		},
	// 		ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 		SaaSAzureSubscriptionStatus: to.Ptr("Subscribed"),
	// 		SubscriptionState: to.Ptr("Suspended"),
	// 		UserInfo: &armnewrelicobservability.UserInfo{
	// 			Country: to.Ptr("hslqnwdanrconqyekwbnttaetv"),
	// 			EmailAddress: to.Ptr("%6%@4-g.N1.3F-kI1.Ue-.lJso"),
	// 			FirstName: to.Ptr("vdftzcggirefejajwahhwhyibutramdaotvnuf"),
	// 			LastName: to.Ptr("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc"),
	// 			PhoneNumber: to.Ptr("krf"),
	// 		},
	// 	},
	// }
}
Output:

func (*MonitorsClient) BeginDelete

func (client *MonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, userEmail string, monitorName string, options *MonitorsClientBeginDeleteOptions) (*runtime.Poller[MonitorsClientDeleteResponse], error)

BeginDelete - Delete a NewRelicMonitorResource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • userEmail - User Email.
  • monitorName - Name of the Monitors resource
  • options - MonitorsClientBeginDeleteOptions contains the optional parameters for the MonitorsClient.BeginDelete method.
Example (MonitorsDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitorsClient().BeginDelete(ctx, "rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

Example (MonitorsDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitorsClient().BeginDelete(ctx, "rgopenapi", "ruxvg@xqkmdhrnoo.hlmbpm", "ipxmlcbonyxtolzejcjshkmlron", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*MonitorsClient) Get

func (client *MonitorsClient) Get(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientGetOptions) (MonitorsClientGetResponse, error)

Get - Get a NewRelicMonitorResource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • options - MonitorsClientGetOptions contains the optional parameters for the MonitorsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().Get(ctx, "rgNewRelic", "cdlymktqw", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NewRelicMonitorResource = armnewrelicobservability.NewRelicMonitorResource{
	// 	Name: to.Ptr("fteaqmtwspcfgyopqzrepiqu"),
	// 	Type: to.Ptr("hdj"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	SystemData: &armnewrelicobservability.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		CreatedBy: to.Ptr("pcdjzdldbwsdlfi"),
	// 		CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("xbsjrxmwwlmpnpvcica"),
	// 		LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("k"),
	// 	Tags: map[string]*string{
	// 		"key6976": to.Ptr("oaxfhf"),
	// 	},
	// 	Identity: &armnewrelicobservability.ManagedServiceIdentity{
	// 		Type: to.Ptr(armnewrelicobservability.ManagedServiceIdentityTypeNone),
	// 		PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		TenantID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		UserAssignedIdentities: map[string]*armnewrelicobservability.UserAssignedIdentity{
	// 			"key8903": &armnewrelicobservability.UserAssignedIdentity{
	// 				ClientID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 				PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armnewrelicobservability.MonitorProperties{
	// 		AccountCreationSource: to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
	// 		LiftrResourceCategory: to.Ptr(armnewrelicobservability.LiftrResourceCategoriesUnknown),
	// 		LiftrResourcePreference: to.Ptr[int32](12),
	// 		MarketplaceSubscriptionID: to.Ptr("jizcsbgrdjhrfqqvvruhgftqhra"),
	// 		MarketplaceSubscriptionStatus: to.Ptr(armnewrelicobservability.MarketplaceSubscriptionStatusActive),
	// 		MonitoringStatus: to.Ptr(armnewrelicobservability.MonitoringStatusEnabled),
	// 		NewRelicAccountProperties: &armnewrelicobservability.AccountPropertiesForNewRelic{
	// 			AccountInfo: &armnewrelicobservability.AccountInfo{
	// 				AccountID: to.Ptr("xhqmg"),
	// 				Region: to.Ptr("ljcf"),
	// 			},
	// 			OrganizationInfo: &armnewrelicobservability.OrganizationInfo{
	// 				OrganizationID: to.Ptr("k"),
	// 			},
	// 			SingleSignOnProperties: &armnewrelicobservability.NewRelicSingleSignOnProperties{
	// 				EnterpriseAppID: to.Ptr("kwiwfz"),
	// 				ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				SingleSignOnState: to.Ptr(armnewrelicobservability.SingleSignOnStatesInitial),
	// 				SingleSignOnURL: to.Ptr("kvseueuljsxmfwpqctz"),
	// 			},
	// 			UserID: to.Ptr("vcscxlncofcuduadesd"),
	// 		},
	// 		OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
	// 		PlanData: &armnewrelicobservability.PlanData{
	// 			BillingCycle: to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
	// 			EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t}()),
	// 			PlanDetails: to.Ptr("tbbiaga"),
	// 			UsageType: to.Ptr(armnewrelicobservability.UsageTypePAYG),
	// 		},
	// 		ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 		UserInfo: &armnewrelicobservability.UserInfo{
	// 			Country: to.Ptr("hslqnwdanrconqyekwbnttaetv"),
	// 			EmailAddress: to.Ptr("%6%@4-g.N1.3F-kI1.Ue-.lJso"),
	// 			FirstName: to.Ptr("vdftzcggirefejajwahhwhyibutramdaotvnuf"),
	// 			LastName: to.Ptr("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc"),
	// 			PhoneNumber: to.Ptr("krf"),
	// 		},
	// 	},
	// }
}
Output:

func (*MonitorsClient) GetMetricRules

func (client *MonitorsClient) GetMetricRules(ctx context.Context, resourceGroupName string, monitorName string, request MetricsRequest, options *MonitorsClientGetMetricRulesOptions) (MonitorsClientGetMetricRulesResponse, error)

GetMetricRules - Get metric rules If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • request - The details of the get metrics status request.
  • options - MonitorsClientGetMetricRulesOptions contains the optional parameters for the MonitorsClient.GetMetricRules method.
Example (MonitorsGetMetricRulesMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_GetMetricRules_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().GetMetricRules(ctx, "rgNewRelic", "fhcjxnxumkdlgpwanewtkdnyuz", armnewrelicobservability.MetricsRequest{
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MetricRules = armnewrelicobservability.MetricRules{
	// 	FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 		{
	// 			Name: to.Ptr("qnvixg"),
	// 			Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 			Value: to.Ptr("ihyabcsjvhkfzckfjvgvtlhdyvmwge"),
	// 	}},
	// 	SendMetrics: to.Ptr(armnewrelicobservability.SendMetricsStatusEnabled),
	// 	UserEmail: to.Ptr("test@testing.com"),
	// }
}
Output:

Example (MonitorsGetMetricRulesMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_GetMetricRules_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().GetMetricRules(ctx, "rgNewRelic", "fhcjxnxumkdlgpwanewtkdnyuz", armnewrelicobservability.MetricsRequest{
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MetricRules = armnewrelicobservability.MetricRules{
	// 	FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 	},
	// 	SendMetrics: to.Ptr(armnewrelicobservability.SendMetricsStatusDisabled),
	// }
}
Output:

func (*MonitorsClient) GetMetricStatus

func (client *MonitorsClient) GetMetricStatus(ctx context.Context, resourceGroupName string, monitorName string, request MetricsStatusRequest, options *MonitorsClientGetMetricStatusOptions) (MonitorsClientGetMetricStatusResponse, error)

GetMetricStatus - Get metric status If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • request - The details of the get metrics status request.
  • options - MonitorsClientGetMetricStatusOptions contains the optional parameters for the MonitorsClient.GetMetricStatus method.
Example (MonitorsGetMetricStatusMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().GetMetricStatus(ctx, "rgNewRelic", "fhcjxnxumkdlgpwanewtkdnyuz", armnewrelicobservability.MetricsStatusRequest{
		AzureResourceIDs: []*string{
			to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz")},
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MetricsStatusResponse = armnewrelicobservability.MetricsStatusResponse{
	// 	AzureResourceIDs: []*string{
	// 		to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz")},
	// 	}
}
Output:

Example (MonitorsGetMetricStatusMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().GetMetricStatus(ctx, "rgNewRelic", "fhcjxnxumkdlgpwanewtkdnyuz", armnewrelicobservability.MetricsStatusRequest{
		AzureResourceIDs: []*string{
			to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz")},
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.MetricsStatusResponse = armnewrelicobservability.MetricsStatusResponse{
	// 	AzureResourceIDs: []*string{
	// 	},
	// }
}
Output:

func (*MonitorsClient) NewListAppServicesPager

func (client *MonitorsClient) NewListAppServicesPager(resourceGroupName string, monitorName string, request AppServicesGetRequest, options *MonitorsClientListAppServicesOptions) *runtime.Pager[MonitorsClientListAppServicesResponse]

NewListAppServicesPager - List the app service resources currently being monitored by the NewRelic resource.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • request - The details of the app services get request.
  • options - MonitorsClientListAppServicesOptions contains the optional parameters for the MonitorsClient.NewListAppServicesPager method.
Example (MonitorsListAppServicesMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListAppServicesPager("rgNewRelic", "fhcjxnxumkdlgpwanewtkdnyuz", armnewrelicobservability.AppServicesGetRequest{
		AzureResourceIDs: []*string{
			to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz")},
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
	}, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AppServicesListResponse = armnewrelicobservability.AppServicesListResponse{
		// 	Value: []*armnewrelicobservability.AppServiceInfo{
		// 		{
		// 			AgentStatus: to.Ptr("vclwfecbppsfaygdccfu"),
		// 			AgentVersion: to.Ptr("owxkssnbp"),
		// 			AzureResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz"),
		// 	}},
		// }
	}
}
Output:

Example (MonitorsListAppServicesMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_ListAppServices_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListAppServicesPager("rgNewRelic", "fhcjxnxumkdlgpwanewtkdnyuz", armnewrelicobservability.AppServicesGetRequest{
		AzureResourceIDs: []*string{
			to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz")},
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
	}, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AppServicesListResponse = armnewrelicobservability.AppServicesListResponse{
		// 	Value: []*armnewrelicobservability.AppServiceInfo{
		// 	},
		// }
	}
}
Output:

func (*MonitorsClient) NewListByResourceGroupPager

func (client *MonitorsClient) NewListByResourceGroupPager(resourceGroupName string, options *MonitorsClientListByResourceGroupOptions) *runtime.Pager[MonitorsClientListByResourceGroupResponse]

NewListByResourceGroupPager - List NewRelicMonitorResource resources by resource group

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - MonitorsClientListByResourceGroupOptions contains the optional parameters for the MonitorsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListByResourceGroupPager("rgNewRelic", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.NewRelicMonitorResourceListResult = armnewrelicobservability.NewRelicMonitorResourceListResult{
		// 	Value: []*armnewrelicobservability.NewRelicMonitorResource{
		// 		{
		// 			Name: to.Ptr("fteaqmtwspcfgyopqzrepiqu"),
		// 			Type: to.Ptr("hdj"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 			SystemData: &armnewrelicobservability.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
		// 				CreatedBy: to.Ptr("pcdjzdldbwsdlfi"),
		// 				CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("xbsjrxmwwlmpnpvcica"),
		// 				LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("k"),
		// 			Tags: map[string]*string{
		// 				"key6976": to.Ptr("oaxfhf"),
		// 			},
		// 			Identity: &armnewrelicobservability.ManagedServiceIdentity{
		// 				Type: to.Ptr(armnewrelicobservability.ManagedServiceIdentityTypeNone),
		// 				PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
		// 				TenantID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
		// 				UserAssignedIdentities: map[string]*armnewrelicobservability.UserAssignedIdentity{
		// 					"key8903": &armnewrelicobservability.UserAssignedIdentity{
		// 						ClientID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
		// 						PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
		// 					},
		// 				},
		// 			},
		// 			Properties: &armnewrelicobservability.MonitorProperties{
		// 				AccountCreationSource: to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
		// 				LiftrResourceCategory: to.Ptr(armnewrelicobservability.LiftrResourceCategoriesUnknown),
		// 				LiftrResourcePreference: to.Ptr[int32](12),
		// 				MarketplaceSubscriptionID: to.Ptr("jizcsbgrdjhrfqqvvruhgftqhra"),
		// 				MarketplaceSubscriptionStatus: to.Ptr(armnewrelicobservability.MarketplaceSubscriptionStatusActive),
		// 				MonitoringStatus: to.Ptr(armnewrelicobservability.MonitoringStatusEnabled),
		// 				NewRelicAccountProperties: &armnewrelicobservability.AccountPropertiesForNewRelic{
		// 					AccountInfo: &armnewrelicobservability.AccountInfo{
		// 						AccountID: to.Ptr("xhqmg"),
		// 						Region: to.Ptr("ljcf"),
		// 					},
		// 					OrganizationInfo: &armnewrelicobservability.OrganizationInfo{
		// 						OrganizationID: to.Ptr("k"),
		// 					},
		// 					SingleSignOnProperties: &armnewrelicobservability.NewRelicSingleSignOnProperties{
		// 						EnterpriseAppID: to.Ptr("kwiwfz"),
		// 						ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
		// 						SingleSignOnState: to.Ptr(armnewrelicobservability.SingleSignOnStatesInitial),
		// 						SingleSignOnURL: to.Ptr("kvseueuljsxmfwpqctz"),
		// 					},
		// 					UserID: to.Ptr("vcscxlncofcuduadesd"),
		// 				},
		// 				OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
		// 				PlanData: &armnewrelicobservability.PlanData{
		// 					BillingCycle: to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
		// 					EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t}()),
		// 					PlanDetails: to.Ptr("tbbiaga"),
		// 					UsageType: to.Ptr(armnewrelicobservability.UsageTypePAYG),
		// 				},
		// 				ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
		// 				UserInfo: &armnewrelicobservability.UserInfo{
		// 					Country: to.Ptr("hslqnwdanrconqyekwbnttaetv"),
		// 					EmailAddress: to.Ptr("%6%@4-g.N1.3F-kI1.Ue-.lJso"),
		// 					FirstName: to.Ptr("vdftzcggirefejajwahhwhyibutramdaotvnuf"),
		// 					LastName: to.Ptr("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc"),
		// 					PhoneNumber: to.Ptr("krf"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*MonitorsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List NewRelicMonitorResource resources by subscription ID

Generated from API version 2024-01-01

  • options - MonitorsClientListBySubscriptionOptions contains the optional parameters for the MonitorsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_ListBySubscription_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.NewRelicMonitorResourceListResult = armnewrelicobservability.NewRelicMonitorResourceListResult{
		// 	Value: []*armnewrelicobservability.NewRelicMonitorResource{
		// 		{
		// 			Name: to.Ptr("fteaqmtwspcfgyopqzrepiqu"),
		// 			Type: to.Ptr("hdj"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 			SystemData: &armnewrelicobservability.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
		// 				CreatedBy: to.Ptr("pcdjzdldbwsdlfi"),
		// 				CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("xbsjrxmwwlmpnpvcica"),
		// 				LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
		// 			},
		// 			Location: to.Ptr("k"),
		// 			Tags: map[string]*string{
		// 				"key6976": to.Ptr("oaxfhf"),
		// 			},
		// 			Identity: &armnewrelicobservability.ManagedServiceIdentity{
		// 				Type: to.Ptr(armnewrelicobservability.ManagedServiceIdentityTypeNone),
		// 				PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
		// 				TenantID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
		// 				UserAssignedIdentities: map[string]*armnewrelicobservability.UserAssignedIdentity{
		// 					"key8903": &armnewrelicobservability.UserAssignedIdentity{
		// 						ClientID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
		// 						PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
		// 					},
		// 				},
		// 			},
		// 			Properties: &armnewrelicobservability.MonitorProperties{
		// 				AccountCreationSource: to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
		// 				LiftrResourceCategory: to.Ptr(armnewrelicobservability.LiftrResourceCategoriesUnknown),
		// 				LiftrResourcePreference: to.Ptr[int32](12),
		// 				MarketplaceSubscriptionID: to.Ptr("jizcsbgrdjhrfqqvvruhgftqhra"),
		// 				MarketplaceSubscriptionStatus: to.Ptr(armnewrelicobservability.MarketplaceSubscriptionStatusActive),
		// 				MonitoringStatus: to.Ptr(armnewrelicobservability.MonitoringStatusEnabled),
		// 				NewRelicAccountProperties: &armnewrelicobservability.AccountPropertiesForNewRelic{
		// 					AccountInfo: &armnewrelicobservability.AccountInfo{
		// 						AccountID: to.Ptr("xhqmg"),
		// 						Region: to.Ptr("ljcf"),
		// 					},
		// 					OrganizationInfo: &armnewrelicobservability.OrganizationInfo{
		// 						OrganizationID: to.Ptr("k"),
		// 					},
		// 					SingleSignOnProperties: &armnewrelicobservability.NewRelicSingleSignOnProperties{
		// 						EnterpriseAppID: to.Ptr("kwiwfz"),
		// 						ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
		// 						SingleSignOnState: to.Ptr(armnewrelicobservability.SingleSignOnStatesInitial),
		// 						SingleSignOnURL: to.Ptr("kvseueuljsxmfwpqctz"),
		// 					},
		// 					UserID: to.Ptr("vcscxlncofcuduadesd"),
		// 				},
		// 				OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
		// 				PlanData: &armnewrelicobservability.PlanData{
		// 					BillingCycle: to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
		// 					EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t}()),
		// 					PlanDetails: to.Ptr("tbbiaga"),
		// 					UsageType: to.Ptr(armnewrelicobservability.UsageTypePAYG),
		// 				},
		// 				ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
		// 				UserInfo: &armnewrelicobservability.UserInfo{
		// 					Country: to.Ptr("hslqnwdanrconqyekwbnttaetv"),
		// 					EmailAddress: to.Ptr("%6%@4-g.N1.3F-kI1.Ue-.lJso"),
		// 					FirstName: to.Ptr("vdftzcggirefejajwahhwhyibutramdaotvnuf"),
		// 					LastName: to.Ptr("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc"),
		// 					PhoneNumber: to.Ptr("krf"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*MonitorsClient) NewListHostsPager

func (client *MonitorsClient) NewListHostsPager(resourceGroupName string, monitorName string, request HostsGetRequest, options *MonitorsClientListHostsOptions) *runtime.Pager[MonitorsClientListHostsResponse]

NewListHostsPager - List the compute vm resources currently being monitored by the NewRelic resource.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • request - The details of the Hosts get request.
  • options - MonitorsClientListHostsOptions contains the optional parameters for the MonitorsClient.NewListHostsPager method.
Example (MonitorsListHostsMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_ListHosts_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListHostsPager("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", armnewrelicobservability.HostsGetRequest{
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
		VMIDs: []*string{
			to.Ptr("xzphvxvfmvjrnsgyns")},
	}, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VMHostsListResponse = armnewrelicobservability.VMHostsListResponse{
		// 	Value: []*armnewrelicobservability.VMInfo{
		// 		{
		// 			AgentStatus: to.Ptr("psnjslxwuwtviwzzgqhyzynuxvz"),
		// 			AgentVersion: to.Ptr("tbinulnoozxnbr"),
		// 			VMID: to.Ptr("gwyoa"),
		// 	}},
		// }
	}
}
Output:

Example (MonitorsListHostsMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_ListHosts_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListHostsPager("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", armnewrelicobservability.HostsGetRequest{
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
		VMIDs: []*string{
			to.Ptr("xzphvxvfmvjrnsgyns")},
	}, nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VMHostsListResponse = armnewrelicobservability.VMHostsListResponse{
		// 	Value: []*armnewrelicobservability.VMInfo{
		// 	},
		// }
	}
}
Output:

func (*MonitorsClient) NewListLinkedResourcesPager added in v1.2.0

func (client *MonitorsClient) NewListLinkedResourcesPager(resourceGroupName string, monitorName string, options *MonitorsClientListLinkedResourcesOptions) *runtime.Pager[MonitorsClientListLinkedResourcesResponse]

NewListLinkedResourcesPager - List all Azure resources associated to the same NewRelic organization and account as the target resource.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • options - MonitorsClientListLinkedResourcesOptions contains the optional parameters for the MonitorsClient.NewListLinkedResourcesPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/LinkedResources_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListLinkedResourcesPager("myResourceGroup", "myMonitor", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.LinkedResourceListResponse = armnewrelicobservability.LinkedResourceListResponse{
		// 	Value: []*armnewrelicobservability.LinkedResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 	}},
		// }
	}
}
Output:

func (*MonitorsClient) NewListMonitoredResourcesPager

func (client *MonitorsClient) NewListMonitoredResourcesPager(resourceGroupName string, monitorName string, options *MonitorsClientListMonitoredResourcesOptions) *runtime.Pager[MonitorsClientListMonitoredResourcesResponse]

NewListMonitoredResourcesPager - List the resources currently being monitored by the NewRelic monitor resource.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • options - MonitorsClientListMonitoredResourcesOptions contains the optional parameters for the MonitorsClient.NewListMonitoredResourcesPager method.
Example (MonitorsListMonitoredResourcesMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListMonitoredResourcesPager("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.MonitoredResourceListResponse = armnewrelicobservability.MonitoredResourceListResponse{
		// 	Value: []*armnewrelicobservability.MonitoredResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 			ReasonForLogsStatus: to.Ptr("agzxviwuxgr"),
		// 			ReasonForMetricsStatus: to.Ptr("k"),
		// 			SendingLogs: to.Ptr(armnewrelicobservability.SendingLogsStatusEnabled),
		// 			SendingMetrics: to.Ptr(armnewrelicobservability.SendingMetricsStatusEnabled),
		// 	}},
		// }
	}
}
Output:

Example (MonitorsListMonitoredResourcesMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListMonitoredResourcesPager("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.MonitoredResourceListResponse = armnewrelicobservability.MonitoredResourceListResponse{
		// 	Value: []*armnewrelicobservability.MonitoredResource{
		// 	},
		// }
	}
}
Output:

func (*MonitorsClient) SwitchBilling

func (client *MonitorsClient) SwitchBilling(ctx context.Context, resourceGroupName string, monitorName string, request SwitchBillingRequest, options *MonitorsClientSwitchBillingOptions) (MonitorsClientSwitchBillingResponse, error)

SwitchBilling - Switches the billing for NewRelic monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • request - The details of the switch billing request.
  • options - MonitorsClientSwitchBillingOptions contains the optional parameters for the MonitorsClient.SwitchBilling method.
Example (MonitorsSwitchBillingMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_SwitchBilling_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().SwitchBilling(ctx, "rgNewRelic", "fhcjxnxumkdlgpwanewtkdnyuz", armnewrelicobservability.SwitchBillingRequest{
		AzureResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz"),
		OrganizationID:  to.Ptr("k"),
		PlanData: &armnewrelicobservability.PlanData{
			BillingCycle:  to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
			EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t }()),
			PlanDetails:   to.Ptr("tbbiaga"),
			UsageType:     to.Ptr(armnewrelicobservability.UsageTypePAYG),
		},
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NewRelicMonitorResource = armnewrelicobservability.NewRelicMonitorResource{
	// 	Name: to.Ptr("fteaqmtwspcfgyopqzrepiqu"),
	// 	Type: to.Ptr("hdj"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	SystemData: &armnewrelicobservability.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		CreatedBy: to.Ptr("pcdjzdldbwsdlfi"),
	// 		CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("xbsjrxmwwlmpnpvcica"),
	// 		LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("k"),
	// 	Tags: map[string]*string{
	// 		"key6976": to.Ptr("oaxfhf"),
	// 	},
	// 	Identity: &armnewrelicobservability.ManagedServiceIdentity{
	// 		Type: to.Ptr(armnewrelicobservability.ManagedServiceIdentityTypeNone),
	// 		PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		TenantID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		UserAssignedIdentities: map[string]*armnewrelicobservability.UserAssignedIdentity{
	// 			"key8903": &armnewrelicobservability.UserAssignedIdentity{
	// 				ClientID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 				PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armnewrelicobservability.MonitorProperties{
	// 		AccountCreationSource: to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
	// 		LiftrResourceCategory: to.Ptr(armnewrelicobservability.LiftrResourceCategoriesUnknown),
	// 		LiftrResourcePreference: to.Ptr[int32](12),
	// 		MarketplaceSubscriptionID: to.Ptr("jizcsbgrdjhrfqqvvruhgftqhra"),
	// 		MarketplaceSubscriptionStatus: to.Ptr(armnewrelicobservability.MarketplaceSubscriptionStatusActive),
	// 		MonitoringStatus: to.Ptr(armnewrelicobservability.MonitoringStatusEnabled),
	// 		NewRelicAccountProperties: &armnewrelicobservability.AccountPropertiesForNewRelic{
	// 			AccountInfo: &armnewrelicobservability.AccountInfo{
	// 				AccountID: to.Ptr("xhqmg"),
	// 				Region: to.Ptr("ljcf"),
	// 			},
	// 			OrganizationInfo: &armnewrelicobservability.OrganizationInfo{
	// 				OrganizationID: to.Ptr("k"),
	// 			},
	// 			SingleSignOnProperties: &armnewrelicobservability.NewRelicSingleSignOnProperties{
	// 				EnterpriseAppID: to.Ptr("kwiwfz"),
	// 				ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				SingleSignOnState: to.Ptr(armnewrelicobservability.SingleSignOnStatesInitial),
	// 				SingleSignOnURL: to.Ptr("kvseueuljsxmfwpqctz"),
	// 			},
	// 			UserID: to.Ptr("vcscxlncofcuduadesd"),
	// 		},
	// 		OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
	// 		PlanData: &armnewrelicobservability.PlanData{
	// 			BillingCycle: to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
	// 			EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t}()),
	// 			PlanDetails: to.Ptr("tbbiaga"),
	// 			UsageType: to.Ptr(armnewrelicobservability.UsageTypePAYG),
	// 		},
	// 		ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 		UserInfo: &armnewrelicobservability.UserInfo{
	// 			Country: to.Ptr("hslqnwdanrconqyekwbnttaetv"),
	// 			EmailAddress: to.Ptr("%6%@4-g.N1.3F-kI1.Ue-.lJso"),
	// 			FirstName: to.Ptr("vdftzcggirefejajwahhwhyibutramdaotvnuf"),
	// 			LastName: to.Ptr("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc"),
	// 			PhoneNumber: to.Ptr("krf"),
	// 		},
	// 	},
	// }
}
Output:

Example (MonitorsSwitchBillingMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_SwitchBilling_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().SwitchBilling(ctx, "rgNewRelic", "fhcjxnxumkdlgpwanewtkdnyuz", armnewrelicobservability.SwitchBillingRequest{
		UserEmail: to.Ptr("ruxvg@xqkmdhrnoo.hlmbpm"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NewRelicMonitorResource = armnewrelicobservability.NewRelicMonitorResource{
	// 	Name: to.Ptr("fteaqmtwspcfgyopqzrepiqu"),
	// 	Type: to.Ptr("hdj"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	SystemData: &armnewrelicobservability.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		CreatedBy: to.Ptr("pcdjzdldbwsdlfi"),
	// 		CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("xbsjrxmwwlmpnpvcica"),
	// 		LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("k"),
	// 	Tags: map[string]*string{
	// 		"key6976": to.Ptr("oaxfhf"),
	// 	},
	// 	Identity: &armnewrelicobservability.ManagedServiceIdentity{
	// 		Type: to.Ptr(armnewrelicobservability.ManagedServiceIdentityTypeNone),
	// 		PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		TenantID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		UserAssignedIdentities: map[string]*armnewrelicobservability.UserAssignedIdentity{
	// 			"key8903": &armnewrelicobservability.UserAssignedIdentity{
	// 				ClientID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 				PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armnewrelicobservability.MonitorProperties{
	// 		AccountCreationSource: to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
	// 		LiftrResourceCategory: to.Ptr(armnewrelicobservability.LiftrResourceCategoriesUnknown),
	// 		LiftrResourcePreference: to.Ptr[int32](12),
	// 		MarketplaceSubscriptionID: to.Ptr("jizcsbgrdjhrfqqvvruhgftqhra"),
	// 		MarketplaceSubscriptionStatus: to.Ptr(armnewrelicobservability.MarketplaceSubscriptionStatusActive),
	// 		MonitoringStatus: to.Ptr(armnewrelicobservability.MonitoringStatusEnabled),
	// 		NewRelicAccountProperties: &armnewrelicobservability.AccountPropertiesForNewRelic{
	// 			AccountInfo: &armnewrelicobservability.AccountInfo{
	// 				AccountID: to.Ptr("xhqmg"),
	// 				Region: to.Ptr("ljcf"),
	// 			},
	// 			OrganizationInfo: &armnewrelicobservability.OrganizationInfo{
	// 				OrganizationID: to.Ptr("k"),
	// 			},
	// 			SingleSignOnProperties: &armnewrelicobservability.NewRelicSingleSignOnProperties{
	// 				EnterpriseAppID: to.Ptr("kwiwfz"),
	// 				ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				SingleSignOnState: to.Ptr(armnewrelicobservability.SingleSignOnStatesInitial),
	// 				SingleSignOnURL: to.Ptr("kvseueuljsxmfwpqctz"),
	// 			},
	// 			UserID: to.Ptr("vcscxlncofcuduadesd"),
	// 		},
	// 		OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
	// 		PlanData: &armnewrelicobservability.PlanData{
	// 			BillingCycle: to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
	// 			EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t}()),
	// 			PlanDetails: to.Ptr("tbbiaga"),
	// 			UsageType: to.Ptr(armnewrelicobservability.UsageTypePAYG),
	// 		},
	// 		ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 		UserInfo: &armnewrelicobservability.UserInfo{
	// 			Country: to.Ptr("hslqnwdanrconqyekwbnttaetv"),
	// 			EmailAddress: to.Ptr("%6%@4-g.N1.3F-kI1.Ue-.lJso"),
	// 			FirstName: to.Ptr("vdftzcggirefejajwahhwhyibutramdaotvnuf"),
	// 			LastName: to.Ptr("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc"),
	// 			PhoneNumber: to.Ptr("krf"),
	// 		},
	// 	},
	// }
}
Output:

func (*MonitorsClient) Update

func (client *MonitorsClient) Update(ctx context.Context, resourceGroupName string, monitorName string, properties NewRelicMonitorResourceUpdate, options *MonitorsClientUpdateOptions) (MonitorsClientUpdateResponse, error)

Update - Update a NewRelicMonitorResource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • properties - The resource properties to be updated.
  • options - MonitorsClientUpdateOptions contains the optional parameters for the MonitorsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().Update(ctx, "rgNewRelic", "cdlymktqw", armnewrelicobservability.NewRelicMonitorResourceUpdate{
		Identity: &armnewrelicobservability.ManagedServiceIdentity{
			Type: to.Ptr(armnewrelicobservability.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armnewrelicobservability.UserAssignedIdentity{
				"key8903": {},
			},
		},
		Properties: &armnewrelicobservability.NewRelicMonitorResourceUpdateProperties{
			AccountCreationSource: to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
			NewRelicAccountProperties: &armnewrelicobservability.AccountPropertiesForNewRelic{
				AccountInfo: &armnewrelicobservability.AccountInfo{
					AccountID:    to.Ptr("xhqmg"),
					IngestionKey: to.Ptr("wltnimmhqt"),
					Region:       to.Ptr("ljcf"),
				},
				OrganizationInfo: &armnewrelicobservability.OrganizationInfo{
					OrganizationID: to.Ptr("k"),
				},
				SingleSignOnProperties: &armnewrelicobservability.NewRelicSingleSignOnProperties{
					EnterpriseAppID:   to.Ptr("kwiwfz"),
					ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateAccepted),
					SingleSignOnState: to.Ptr(armnewrelicobservability.SingleSignOnStatesInitial),
					SingleSignOnURL:   to.Ptr("kvseueuljsxmfwpqctz"),
				},
				UserID: to.Ptr("vcscxlncofcuduadesd"),
			},
			OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
			PlanData: &armnewrelicobservability.PlanData{
				BillingCycle:  to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
				EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t }()),
				PlanDetails:   to.Ptr("tbbiaga"),
				UsageType:     to.Ptr(armnewrelicobservability.UsageTypePAYG),
			},
			UserInfo: &armnewrelicobservability.UserInfo{
				Country:      to.Ptr("hslqnwdanrconqyekwbnttaetv"),
				EmailAddress: to.Ptr("%6%@4-g.N1.3F-kI1.Ue-.lJso"),
				FirstName:    to.Ptr("vdftzcggirefejajwahhwhyibutramdaotvnuf"),
				LastName:     to.Ptr("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc"),
				PhoneNumber:  to.Ptr("krf"),
			},
		},
		Tags: map[string]*string{
			"key164": to.Ptr("jqakdrrmmyzytqu"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.NewRelicMonitorResource = armnewrelicobservability.NewRelicMonitorResource{
	// 	Name: to.Ptr("fteaqmtwspcfgyopqzrepiqu"),
	// 	Type: to.Ptr("hdj"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	SystemData: &armnewrelicobservability.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		CreatedBy: to.Ptr("pcdjzdldbwsdlfi"),
	// 		CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.787Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("xbsjrxmwwlmpnpvcica"),
	// 		LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 	},
	// 	Location: to.Ptr("k"),
	// 	Tags: map[string]*string{
	// 		"key6976": to.Ptr("oaxfhf"),
	// 	},
	// 	Identity: &armnewrelicobservability.ManagedServiceIdentity{
	// 		Type: to.Ptr(armnewrelicobservability.ManagedServiceIdentityTypeNone),
	// 		PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		TenantID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 		UserAssignedIdentities: map[string]*armnewrelicobservability.UserAssignedIdentity{
	// 			"key8903": &armnewrelicobservability.UserAssignedIdentity{
	// 				ClientID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 				PrincipalID: to.Ptr("cac47a92-2856-11ed-a261-0242ac120002"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armnewrelicobservability.MonitorProperties{
	// 		AccountCreationSource: to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
	// 		LiftrResourceCategory: to.Ptr(armnewrelicobservability.LiftrResourceCategoriesUnknown),
	// 		LiftrResourcePreference: to.Ptr[int32](12),
	// 		MarketplaceSubscriptionID: to.Ptr("jizcsbgrdjhrfqqvvruhgftqhra"),
	// 		MarketplaceSubscriptionStatus: to.Ptr(armnewrelicobservability.MarketplaceSubscriptionStatusActive),
	// 		MonitoringStatus: to.Ptr(armnewrelicobservability.MonitoringStatusEnabled),
	// 		NewRelicAccountProperties: &armnewrelicobservability.AccountPropertiesForNewRelic{
	// 			AccountInfo: &armnewrelicobservability.AccountInfo{
	// 				AccountID: to.Ptr("xhqmg"),
	// 				Region: to.Ptr("ljcf"),
	// 			},
	// 			OrganizationInfo: &armnewrelicobservability.OrganizationInfo{
	// 				OrganizationID: to.Ptr("k"),
	// 			},
	// 			SingleSignOnProperties: &armnewrelicobservability.NewRelicSingleSignOnProperties{
	// 				EnterpriseAppID: to.Ptr("kwiwfz"),
	// 				ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 				SingleSignOnState: to.Ptr(armnewrelicobservability.SingleSignOnStatesInitial),
	// 				SingleSignOnURL: to.Ptr("kvseueuljsxmfwpqctz"),
	// 			},
	// 			UserID: to.Ptr("vcscxlncofcuduadesd"),
	// 		},
	// 		OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
	// 		PlanData: &armnewrelicobservability.PlanData{
	// 			BillingCycle: to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
	// 			EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t}()),
	// 			PlanDetails: to.Ptr("tbbiaga"),
	// 			UsageType: to.Ptr(armnewrelicobservability.UsageTypePAYG),
	// 		},
	// 		ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 		UserInfo: &armnewrelicobservability.UserInfo{
	// 			Country: to.Ptr("hslqnwdanrconqyekwbnttaetv"),
	// 			EmailAddress: to.Ptr("%6%@4-g.N1.3F-kI1.Ue-.lJso"),
	// 			FirstName: to.Ptr("vdftzcggirefejajwahhwhyibutramdaotvnuf"),
	// 			LastName: to.Ptr("bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc"),
	// 			PhoneNumber: to.Ptr("krf"),
	// 		},
	// 	},
	// }
}
Output:

func (*MonitorsClient) VMHostPayload

func (client *MonitorsClient) VMHostPayload(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientVMHostPayloadOptions) (MonitorsClientVMHostPayloadResponse, error)

VMHostPayload - Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • options - MonitorsClientVMHostPayloadOptions contains the optional parameters for the MonitorsClient.VMHostPayload method.
Example (MonitorsVmHostPayloadMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_VmHostPayload_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().VMHostPayload(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VMExtensionPayload = armnewrelicobservability.VMExtensionPayload{
	// 	IngestionKey: to.Ptr("ltqewhfexphvqgttoevaywrl"),
	// }
}
Output:

Example (MonitorsVmHostPayloadMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Monitors_VmHostPayload_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().VMHostPayload(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VMExtensionPayload = armnewrelicobservability.VMExtensionPayload{
	// 	IngestionKey: to.Ptr("ltqewhfexphvqgttoevaywrl"),
	// }
}
Output:

type MonitorsClientBeginCreateOrUpdateOptions

type MonitorsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the MonitorsClient.BeginCreateOrUpdate method.

type MonitorsClientBeginDeleteOptions

type MonitorsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MonitorsClientBeginDeleteOptions contains the optional parameters for the MonitorsClient.BeginDelete method.

type MonitorsClientCreateOrUpdateResponse

type MonitorsClientCreateOrUpdateResponse struct {
	// A Monitor Resource by NewRelic
	NewRelicMonitorResource
}

MonitorsClientCreateOrUpdateResponse contains the response from method MonitorsClient.BeginCreateOrUpdate.

type MonitorsClientDeleteResponse

type MonitorsClientDeleteResponse struct {
}

MonitorsClientDeleteResponse contains the response from method MonitorsClient.BeginDelete.

type MonitorsClientGetMetricRulesOptions

type MonitorsClientGetMetricRulesOptions struct {
}

MonitorsClientGetMetricRulesOptions contains the optional parameters for the MonitorsClient.GetMetricRules method.

type MonitorsClientGetMetricRulesResponse

type MonitorsClientGetMetricRulesResponse struct {
	// Set of rules for sending metrics for the Monitor resource.
	MetricRules
}

MonitorsClientGetMetricRulesResponse contains the response from method MonitorsClient.GetMetricRules.

type MonitorsClientGetMetricStatusOptions

type MonitorsClientGetMetricStatusOptions struct {
}

MonitorsClientGetMetricStatusOptions contains the optional parameters for the MonitorsClient.GetMetricStatus method.

type MonitorsClientGetMetricStatusResponse

type MonitorsClientGetMetricStatusResponse struct {
	// Response of get metrics status Operation.
	MetricsStatusResponse
}

MonitorsClientGetMetricStatusResponse contains the response from method MonitorsClient.GetMetricStatus.

type MonitorsClientGetOptions

type MonitorsClientGetOptions struct {
}

MonitorsClientGetOptions contains the optional parameters for the MonitorsClient.Get method.

type MonitorsClientGetResponse

type MonitorsClientGetResponse struct {
	// A Monitor Resource by NewRelic
	NewRelicMonitorResource
}

MonitorsClientGetResponse contains the response from method MonitorsClient.Get.

type MonitorsClientListAppServicesOptions

type MonitorsClientListAppServicesOptions struct {
}

MonitorsClientListAppServicesOptions contains the optional parameters for the MonitorsClient.NewListAppServicesPager method.

type MonitorsClientListAppServicesResponse

type MonitorsClientListAppServicesResponse struct {
	// Response of a list app services Operation.
	AppServicesListResponse
}

MonitorsClientListAppServicesResponse contains the response from method MonitorsClient.NewListAppServicesPager.

type MonitorsClientListByResourceGroupOptions

type MonitorsClientListByResourceGroupOptions struct {
}

MonitorsClientListByResourceGroupOptions contains the optional parameters for the MonitorsClient.NewListByResourceGroupPager method.

type MonitorsClientListByResourceGroupResponse

type MonitorsClientListByResourceGroupResponse struct {
	// The response of a NewRelicMonitorResource list operation.
	NewRelicMonitorResourceListResult
}

MonitorsClientListByResourceGroupResponse contains the response from method MonitorsClient.NewListByResourceGroupPager.

type MonitorsClientListBySubscriptionOptions

type MonitorsClientListBySubscriptionOptions struct {
}

MonitorsClientListBySubscriptionOptions contains the optional parameters for the MonitorsClient.NewListBySubscriptionPager method.

type MonitorsClientListBySubscriptionResponse

type MonitorsClientListBySubscriptionResponse struct {
	// The response of a NewRelicMonitorResource list operation.
	NewRelicMonitorResourceListResult
}

MonitorsClientListBySubscriptionResponse contains the response from method MonitorsClient.NewListBySubscriptionPager.

type MonitorsClientListHostsOptions

type MonitorsClientListHostsOptions struct {
}

MonitorsClientListHostsOptions contains the optional parameters for the MonitorsClient.NewListHostsPager method.

type MonitorsClientListHostsResponse

type MonitorsClientListHostsResponse struct {
	// Response of a list VM Host Operation.
	VMHostsListResponse
}

MonitorsClientListHostsResponse contains the response from method MonitorsClient.NewListHostsPager.

type MonitorsClientListLinkedResourcesOptions added in v1.2.0

type MonitorsClientListLinkedResourcesOptions struct {
}

MonitorsClientListLinkedResourcesOptions contains the optional parameters for the MonitorsClient.NewListLinkedResourcesPager method.

type MonitorsClientListLinkedResourcesResponse added in v1.2.0

type MonitorsClientListLinkedResourcesResponse struct {
	// Response of a list operation.
	LinkedResourceListResponse
}

MonitorsClientListLinkedResourcesResponse contains the response from method MonitorsClient.NewListLinkedResourcesPager.

type MonitorsClientListMonitoredResourcesOptions

type MonitorsClientListMonitoredResourcesOptions struct {
}

MonitorsClientListMonitoredResourcesOptions contains the optional parameters for the MonitorsClient.NewListMonitoredResourcesPager method.

type MonitorsClientListMonitoredResourcesResponse

type MonitorsClientListMonitoredResourcesResponse struct {
	// List of all the resources being monitored by NewRelic monitor resource
	MonitoredResourceListResponse
}

MonitorsClientListMonitoredResourcesResponse contains the response from method MonitorsClient.NewListMonitoredResourcesPager.

type MonitorsClientSwitchBillingOptions

type MonitorsClientSwitchBillingOptions struct {
}

MonitorsClientSwitchBillingOptions contains the optional parameters for the MonitorsClient.SwitchBilling method.

type MonitorsClientSwitchBillingResponse

type MonitorsClientSwitchBillingResponse struct {
	// A Monitor Resource by NewRelic
	NewRelicMonitorResource

	// RetryAfter contains the information returned from the Retry-After header response.
	RetryAfter *int32
}

MonitorsClientSwitchBillingResponse contains the response from method MonitorsClient.SwitchBilling.

type MonitorsClientUpdateOptions

type MonitorsClientUpdateOptions struct {
}

MonitorsClientUpdateOptions contains the optional parameters for the MonitorsClient.Update method.

type MonitorsClientUpdateResponse

type MonitorsClientUpdateResponse struct {
	// A Monitor Resource by NewRelic
	NewRelicMonitorResource
}

MonitorsClientUpdateResponse contains the response from method MonitorsClient.Update.

type MonitorsClientVMHostPayloadOptions

type MonitorsClientVMHostPayloadOptions struct {
}

MonitorsClientVMHostPayloadOptions contains the optional parameters for the MonitorsClient.VMHostPayload method.

type MonitorsClientVMHostPayloadResponse

type MonitorsClientVMHostPayloadResponse struct {
	// Response of payload to be passed while installing VM agent.
	VMExtensionPayload
}

MonitorsClientVMHostPayloadResponse contains the response from method MonitorsClient.VMHostPayload.

type NewRelicMonitorResource

type NewRelicMonitorResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; The resource-specific properties for this resource.
	Properties *MonitorProperties

	// The managed service identities assigned to this resource.
	Identity *ManagedServiceIdentity

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

NewRelicMonitorResource - A Monitor Resource by NewRelic

func (NewRelicMonitorResource) MarshalJSON

func (n NewRelicMonitorResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NewRelicMonitorResource.

func (*NewRelicMonitorResource) UnmarshalJSON

func (n *NewRelicMonitorResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NewRelicMonitorResource.

type NewRelicMonitorResourceListResult

type NewRelicMonitorResourceListResult struct {
	// REQUIRED; The NewRelicMonitorResource items on this page
	Value []*NewRelicMonitorResource

	// The link to the next page of items
	NextLink *string
}

NewRelicMonitorResourceListResult - The response of a NewRelicMonitorResource list operation.

func (NewRelicMonitorResourceListResult) MarshalJSON

func (n NewRelicMonitorResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NewRelicMonitorResourceListResult.

func (*NewRelicMonitorResourceListResult) UnmarshalJSON

func (n *NewRelicMonitorResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NewRelicMonitorResourceListResult.

type NewRelicMonitorResourceUpdate

type NewRelicMonitorResourceUpdate struct {
	// The managed service identities assigned to this resource.
	Identity *ManagedServiceIdentity

	// The updatable properties of the NewRelicMonitorResource.
	Properties *NewRelicMonitorResourceUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

NewRelicMonitorResourceUpdate - The type used for update operations of the NewRelicMonitorResource.

func (NewRelicMonitorResourceUpdate) MarshalJSON

func (n NewRelicMonitorResourceUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NewRelicMonitorResourceUpdate.

func (*NewRelicMonitorResourceUpdate) UnmarshalJSON

func (n *NewRelicMonitorResourceUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NewRelicMonitorResourceUpdate.

type NewRelicMonitorResourceUpdateProperties

type NewRelicMonitorResourceUpdateProperties struct {
	// Source of account creation
	AccountCreationSource *AccountCreationSource

	// MarketplaceSubscriptionStatus of the resource
	NewRelicAccountProperties *AccountPropertiesForNewRelic

	// Source of org creation
	OrgCreationSource *OrgCreationSource

	// Plan details
	PlanData *PlanData

	// User Info
	UserInfo *UserInfo
}

NewRelicMonitorResourceUpdateProperties - The updatable properties of the NewRelicMonitorResource.

func (NewRelicMonitorResourceUpdateProperties) MarshalJSON

func (n NewRelicMonitorResourceUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NewRelicMonitorResourceUpdateProperties.

func (*NewRelicMonitorResourceUpdateProperties) UnmarshalJSON

func (n *NewRelicMonitorResourceUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NewRelicMonitorResourceUpdateProperties.

type NewRelicSingleSignOnProperties

type NewRelicSingleSignOnProperties struct {
	// The Id of the Enterprise App used for Single sign-on.
	EnterpriseAppID *string

	// Provisioning state
	ProvisioningState *ProvisioningState

	// Single sign-on state
	SingleSignOnState *SingleSignOnStates

	// The login URL specific to this NewRelic Organization
	SingleSignOnURL *string
}

NewRelicSingleSignOnProperties - Single sign on Info of the NewRelic account

func (NewRelicSingleSignOnProperties) MarshalJSON

func (n NewRelicSingleSignOnProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NewRelicSingleSignOnProperties.

func (*NewRelicSingleSignOnProperties) UnmarshalJSON

func (n *NewRelicSingleSignOnProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NewRelicSingleSignOnProperties.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - List the operations for the provider

Generated from API version 2024-01-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example (OperationsListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Operations_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armnewrelicobservability.OperationListResult{
		// 	Value: []*armnewrelicobservability.Operation{
		// 		{
		// 			Name: to.Ptr("zhlrjcljiysnufaerhpzg"),
		// 			ActionType: to.Ptr(armnewrelicobservability.ActionTypeInternal),
		// 			Display: &armnewrelicobservability.OperationDisplay{
		// 				Description: to.Ptr("sekhimcuecttketh"),
		// 				Operation: to.Ptr("ybyzweygkffbydgaowg"),
		// 				Provider: to.Ptr("v"),
		// 				Resource: to.Ptr("w"),
		// 			},
		// 			IsDataAction: to.Ptr(true),
		// 			Origin: to.Ptr(armnewrelicobservability.OriginUser),
		// 	}},
		// }
	}
}
Output:

Example (OperationsListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Operations_List_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armnewrelicobservability.OperationListResult{
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OrgCreationSource

type OrgCreationSource string

OrgCreationSource - Source of Org creation

const (
	// OrgCreationSourceLIFTR - Org is created from LIFTR
	OrgCreationSourceLIFTR OrgCreationSource = "LIFTR"
	// OrgCreationSourceNEWRELIC - Org is created from NEWRELIC
	OrgCreationSourceNEWRELIC OrgCreationSource = "NEWRELIC"
)

func PossibleOrgCreationSourceValues

func PossibleOrgCreationSourceValues() []OrgCreationSource

PossibleOrgCreationSourceValues returns the possible values for the OrgCreationSource const type.

type OrganizationInfo

type OrganizationInfo struct {
	// Organization id
	OrganizationID *string
}

OrganizationInfo - Organization Info of the NewRelic account

func (OrganizationInfo) MarshalJSON

func (o OrganizationInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OrganizationInfo.

func (*OrganizationInfo) UnmarshalJSON

func (o *OrganizationInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationInfo.

type OrganizationProperties

type OrganizationProperties struct {
	// Billing source
	BillingSource *BillingSource

	// organization id
	OrganizationID *string

	// organization name
	OrganizationName *string
}

OrganizationProperties - Details of Organizations

func (OrganizationProperties) MarshalJSON

func (o OrganizationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OrganizationProperties.

func (*OrganizationProperties) UnmarshalJSON

func (o *OrganizationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationProperties.

type OrganizationResource

type OrganizationResource struct {
	// The resource-specific properties for this resource.
	Properties *OrganizationProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

OrganizationResource - The details of a Organization resource.

func (OrganizationResource) MarshalJSON

func (o OrganizationResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OrganizationResource.

func (*OrganizationResource) UnmarshalJSON

func (o *OrganizationResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationResource.

type OrganizationsClient

type OrganizationsClient struct {
	// contains filtered or unexported fields
}

OrganizationsClient contains the methods for the Organizations group. Don't use this type directly, use NewOrganizationsClient() instead.

func NewOrganizationsClient

func NewOrganizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OrganizationsClient, error)

NewOrganizationsClient creates a new instance of OrganizationsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OrganizationsClient) NewListPager

NewListPager - List all the existing organizations

Generated from API version 2024-01-01

  • userEmail - User Email.
  • location - Location for NewRelic.
  • options - OrganizationsClientListOptions contains the optional parameters for the OrganizationsClient.NewListPager method.
Example (OrganizationsListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Organizations_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOrganizationsClient().NewListPager("ruxvg@xqkmdhrnoo.hlmbpm", "egh", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OrganizationsListResponse = armnewrelicobservability.OrganizationsListResponse{
		// 	Value: []*armnewrelicobservability.OrganizationResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 			Properties: &armnewrelicobservability.OrganizationProperties{
		// 				BillingSource: to.Ptr(armnewrelicobservability.BillingSourceAZURE),
		// 				OrganizationID: to.Ptr("tjmcifofzirili"),
		// 				OrganizationName: to.Ptr("orgname"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (OrganizationsListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Organizations_List_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOrganizationsClient().NewListPager("ruxvg@xqkmdhrnoo.hlmbpm", "egh", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OrganizationsListResponse = armnewrelicobservability.OrganizationsListResponse{
		// 	Value: []*armnewrelicobservability.OrganizationResource{
		// 	},
		// }
	}
}
Output:

type OrganizationsClientListOptions

type OrganizationsClientListOptions struct {
}

OrganizationsClientListOptions contains the optional parameters for the OrganizationsClient.NewListPager method.

type OrganizationsClientListResponse

type OrganizationsClientListResponse struct {
	// Response of get all organizations Operation.
	OrganizationsListResponse
}

OrganizationsClientListResponse contains the response from method OrganizationsClient.NewListPager.

type OrganizationsListResponse

type OrganizationsListResponse struct {
	// REQUIRED; The OrganizationResource items on this page
	Value []*OrganizationResource

	// The link to the next page of items
	NextLink *string
}

OrganizationsListResponse - Response of get all organizations Operation.

func (OrganizationsListResponse) MarshalJSON

func (o OrganizationsListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OrganizationsListResponse.

func (*OrganizationsListResponse) UnmarshalJSON

func (o *OrganizationsListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationsListResponse.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type PartnerBillingEntity added in v1.2.0

type PartnerBillingEntity struct {
	// The New Relic Organization Id.
	OrganizationID *string

	// The New Relic Organization Name.
	OrganizationName *string
}

PartnerBillingEntity - Partner Billing details associated with the resource.

func (PartnerBillingEntity) MarshalJSON added in v1.2.0

func (p PartnerBillingEntity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PartnerBillingEntity.

func (*PartnerBillingEntity) UnmarshalJSON added in v1.2.0

func (p *PartnerBillingEntity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PartnerBillingEntity.

type PatchOperation added in v1.2.0

type PatchOperation string

PatchOperation - The operation for the patch on the resource.

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

func PossiblePatchOperationValues added in v1.2.0

func PossiblePatchOperationValues() []PatchOperation

PossiblePatchOperationValues returns the possible values for the PatchOperation const type.

type PlanData

type PlanData struct {
	// Different billing cycles like MONTHLY/WEEKLY. this could be enum
	BillingCycle *BillingCycle

	// date when plan was applied
	EffectiveDate *time.Time

	// plan id as published by NewRelic
	PlanDetails *string

	// Different usage type like PAYG/COMMITTED. this could be enum
	UsageType *UsageType
}

PlanData - Plan data of NewRelic Monitor resource

func (PlanData) MarshalJSON

func (p PlanData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PlanData.

func (*PlanData) UnmarshalJSON

func (p *PlanData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PlanData.

type PlanDataListResponse

type PlanDataListResponse struct {
	// REQUIRED; The PlanDataResource items on this page
	Value []*PlanDataResource

	// The link to the next page of items
	NextLink *string
}

PlanDataListResponse - Response of get all plan data Operation.

func (PlanDataListResponse) MarshalJSON

func (p PlanDataListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PlanDataListResponse.

func (*PlanDataListResponse) UnmarshalJSON

func (p *PlanDataListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PlanDataListResponse.

type PlanDataProperties

type PlanDataProperties struct {
	// Source of account creation
	AccountCreationSource *AccountCreationSource

	// Source of org creation
	OrgCreationSource *OrgCreationSource

	// Plan details
	PlanData *PlanData
}

PlanDataProperties - Plan details

func (PlanDataProperties) MarshalJSON

func (p PlanDataProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PlanDataProperties.

func (*PlanDataProperties) UnmarshalJSON

func (p *PlanDataProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PlanDataProperties.

type PlanDataResource

type PlanDataResource struct {
	// The resource-specific properties for this resource.
	Properties *PlanDataProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PlanDataResource - The details of a PlanData resource.

func (PlanDataResource) MarshalJSON

func (p PlanDataResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PlanDataResource.

func (*PlanDataResource) UnmarshalJSON

func (p *PlanDataResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PlanDataResource.

type PlansClient

type PlansClient struct {
	// contains filtered or unexported fields
}

PlansClient contains the methods for the Plans group. Don't use this type directly, use NewPlansClient() instead.

func NewPlansClient

func NewPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PlansClient, error)

NewPlansClient creates a new instance of PlansClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PlansClient) NewListPager

func (client *PlansClient) NewListPager(options *PlansClientListOptions) *runtime.Pager[PlansClientListResponse]

NewListPager - List plans data

Generated from API version 2024-01-01

  • options - PlansClientListOptions contains the optional parameters for the PlansClient.NewListPager method.
Example (PlansListMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Plans_List_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPlansClient().NewListPager(&armnewrelicobservability.PlansClientListOptions{AccountID: to.Ptr("pwuxgvrmkk"),
		OrganizationID: to.Ptr("hilawwjz"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PlanDataListResponse = armnewrelicobservability.PlanDataListResponse{
		// 	Value: []*armnewrelicobservability.PlanDataResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 			Properties: &armnewrelicobservability.PlanDataProperties{
		// 				AccountCreationSource: to.Ptr(armnewrelicobservability.AccountCreationSourceLIFTR),
		// 				OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceLIFTR),
		// 				PlanData: &armnewrelicobservability.PlanData{
		// 					BillingCycle: to.Ptr(armnewrelicobservability.BillingCycleYEARLY),
		// 					EffectiveDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-05T14:11:37.786Z"); return t}()),
		// 					PlanDetails: to.Ptr("tbbiaga"),
		// 					UsageType: to.Ptr(armnewrelicobservability.UsageTypePAYG),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (PlansListMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/Plans_List_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPlansClient().NewListPager(&armnewrelicobservability.PlansClientListOptions{AccountID: nil,
		OrganizationID: to.Ptr("hilawwjz"),
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PlanDataListResponse = armnewrelicobservability.PlanDataListResponse{
		// 	Value: []*armnewrelicobservability.PlanDataResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 			Properties: &armnewrelicobservability.PlanDataProperties{
		// 				OrgCreationSource: to.Ptr(armnewrelicobservability.OrgCreationSourceNEWRELIC),
		// 			},
		// 	}},
		// }
	}
}
Output:

type PlansClientListOptions

type PlansClientListOptions struct {
	// Account Id.
	AccountID *string

	// Organization Id.
	OrganizationID *string
}

PlansClientListOptions contains the optional parameters for the PlansClient.NewListPager method.

type PlansClientListResponse

type PlansClientListResponse struct {
	// Response of get all plan data Operation.
	PlanDataListResponse
}

PlansClientListResponse contains the response from method PlansClient.NewListPager.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning State of the Monitor resource

const (
	// ProvisioningStateAccepted - Monitor resource creation request accepted
	ProvisioningStateAccepted ProvisioningState = "Accepted"
	// ProvisioningStateCanceled - Monitor resource creation canceled
	ProvisioningStateCanceled ProvisioningState = "Canceled"
	// ProvisioningStateCreating - Monitor resource creation started
	ProvisioningStateCreating ProvisioningState = "Creating"
	// ProvisioningStateDeleted - Monitor resource is deleted
	ProvisioningStateDeleted ProvisioningState = "Deleted"
	// ProvisioningStateDeleting - Monitor resource deletion started
	ProvisioningStateDeleting ProvisioningState = "Deleting"
	// ProvisioningStateFailed - Monitor resource creation failed
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateNotSpecified - Monitor resource state is unknown
	ProvisioningStateNotSpecified ProvisioningState = "NotSpecified"
	// ProvisioningStateSucceeded - Monitor resource creation successful
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	// ProvisioningStateUpdating - Monitor resource is being updated
	ProvisioningStateUpdating ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type SendAADLogsStatus

type SendAADLogsStatus string

SendAADLogsStatus - Indicates whether AAD logs are being sent.

const (
	SendAADLogsStatusDisabled SendAADLogsStatus = "Disabled"
	SendAADLogsStatusEnabled  SendAADLogsStatus = "Enabled"
)

func PossibleSendAADLogsStatusValues

func PossibleSendAADLogsStatusValues() []SendAADLogsStatus

PossibleSendAADLogsStatusValues returns the possible values for the SendAADLogsStatus const type.

type SendActivityLogsStatus

type SendActivityLogsStatus string

SendActivityLogsStatus - Indicates whether activity logs are being sent.

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

func PossibleSendActivityLogsStatusValues

func PossibleSendActivityLogsStatusValues() []SendActivityLogsStatus

PossibleSendActivityLogsStatusValues returns the possible values for the SendActivityLogsStatus const type.

type SendMetricsStatus

type SendMetricsStatus string

SendMetricsStatus - Indicates whether metrics are being sent.

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

func PossibleSendMetricsStatusValues

func PossibleSendMetricsStatusValues() []SendMetricsStatus

PossibleSendMetricsStatusValues returns the possible values for the SendMetricsStatus const type.

type SendSubscriptionLogsStatus

type SendSubscriptionLogsStatus string

SendSubscriptionLogsStatus - Indicates whether subscription logs are being sent.

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

func PossibleSendSubscriptionLogsStatusValues

func PossibleSendSubscriptionLogsStatusValues() []SendSubscriptionLogsStatus

PossibleSendSubscriptionLogsStatusValues returns the possible values for the SendSubscriptionLogsStatus const type.

type SendingLogsStatus

type SendingLogsStatus string

SendingLogsStatus - Indicates whether logs are being sent.

const (
	SendingLogsStatusDisabled SendingLogsStatus = "Disabled"
	SendingLogsStatusEnabled  SendingLogsStatus = "Enabled"
)

func PossibleSendingLogsStatusValues

func PossibleSendingLogsStatusValues() []SendingLogsStatus

PossibleSendingLogsStatusValues returns the possible values for the SendingLogsStatus const type.

type SendingMetricsStatus

type SendingMetricsStatus string

SendingMetricsStatus - Indicates whether metrics are being sent.

const (
	SendingMetricsStatusDisabled SendingMetricsStatus = "Disabled"
	SendingMetricsStatusEnabled  SendingMetricsStatus = "Enabled"
)

func PossibleSendingMetricsStatusValues

func PossibleSendingMetricsStatusValues() []SendingMetricsStatus

PossibleSendingMetricsStatusValues returns the possible values for the SendingMetricsStatus const type.

type SingleSignOnStates

type SingleSignOnStates string

SingleSignOnStates - Various states of the SSO resource

const (
	SingleSignOnStatesDisable  SingleSignOnStates = "Disable"
	SingleSignOnStatesEnable   SingleSignOnStates = "Enable"
	SingleSignOnStatesExisting SingleSignOnStates = "Existing"
	SingleSignOnStatesInitial  SingleSignOnStates = "Initial"
)

func PossibleSingleSignOnStatesValues

func PossibleSingleSignOnStatesValues() []SingleSignOnStates

PossibleSingleSignOnStatesValues returns the possible values for the SingleSignOnStates const type.

type Status added in v1.2.0

type Status string

Status - The state of monitoring.

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

func PossibleStatusValues added in v1.2.0

func PossibleStatusValues() []Status

PossibleStatusValues returns the possible values for the Status const type.

type SubscriptionList added in v1.2.0

type SubscriptionList struct {
	// List of subscriptions and the state of the monitoring.
	MonitoredSubscriptionList []*MonitoredSubscription

	// The operation for the patch on the resource.
	PatchOperation *PatchOperation

	// READ-ONLY; Provisioning State of the resource
	ProvisioningState *ProvisioningState
}

SubscriptionList - The request to update subscriptions needed to be monitored by the NewRelic monitor resource.

func (SubscriptionList) MarshalJSON added in v1.2.0

func (s SubscriptionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionList.

func (*SubscriptionList) UnmarshalJSON added in v1.2.0

func (s *SubscriptionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionList.

type SwitchBillingRequest

type SwitchBillingRequest struct {
	// REQUIRED; User Email
	UserEmail *string

	// Azure resource Id
	AzureResourceID *string

	// Organization id
	OrganizationID *string

	// Plan details
	PlanData *PlanData
}

SwitchBillingRequest - Request of a switch billing Operation.

func (SwitchBillingRequest) MarshalJSON

func (s SwitchBillingRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SwitchBillingRequest.

func (*SwitchBillingRequest) UnmarshalJSON

func (s *SwitchBillingRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SwitchBillingRequest.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TagAction

type TagAction string

TagAction - Valid actions for a filtering tag. Exclusion takes priority over inclusion.

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

func PossibleTagActionValues

func PossibleTagActionValues() []TagAction

PossibleTagActionValues returns the possible values for the TagAction const type.

type TagRule

type TagRule struct {
	// REQUIRED; The resource-specific properties for this resource.
	Properties *MonitoringTagRulesProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

TagRule - A tag rule belonging to NewRelic account

func (TagRule) MarshalJSON

func (t TagRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagRule.

func (*TagRule) UnmarshalJSON

func (t *TagRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagRule.

type TagRuleListResult

type TagRuleListResult struct {
	// REQUIRED; The TagRule items on this page
	Value []*TagRule

	// The link to the next page of items
	NextLink *string
}

TagRuleListResult - The response of a TagRule list operation.

func (TagRuleListResult) MarshalJSON

func (t TagRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagRuleListResult.

func (*TagRuleListResult) UnmarshalJSON

func (t *TagRuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagRuleListResult.

type TagRuleUpdate

type TagRuleUpdate struct {
	// The updatable properties of the TagRule.
	Properties *TagRuleUpdateProperties
}

TagRuleUpdate - The type used for update operations of the TagRule.

func (TagRuleUpdate) MarshalJSON

func (t TagRuleUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagRuleUpdate.

func (*TagRuleUpdate) UnmarshalJSON

func (t *TagRuleUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagRuleUpdate.

type TagRuleUpdateProperties

type TagRuleUpdateProperties struct {
	// Set of rules for sending logs for the Monitor resource.
	LogRules *LogRules

	// Set of rules for sending metrics for the Monitor resource.
	MetricRules *MetricRules
}

TagRuleUpdateProperties - The updatable properties of the TagRule.

func (TagRuleUpdateProperties) MarshalJSON

func (t TagRuleUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagRuleUpdateProperties.

func (*TagRuleUpdateProperties) UnmarshalJSON

func (t *TagRuleUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagRuleUpdateProperties.

type TagRulesClient

type TagRulesClient struct {
	// contains filtered or unexported fields
}

TagRulesClient contains the methods for the TagRules group. Don't use this type directly, use NewTagRulesClient() instead.

func NewTagRulesClient

func NewTagRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TagRulesClient, error)

NewTagRulesClient creates a new instance of TagRulesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TagRulesClient) BeginCreateOrUpdate

func (client *TagRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, ruleSetName string, resource TagRule, options *TagRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[TagRulesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a TagRule If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • ruleSetName - Name of the TagRule
  • resource - Resource create parameters.
  • options - TagRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the TagRulesClient.BeginCreateOrUpdate method.
Example (TagRulesCreateOrUpdateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTagRulesClient().BeginCreateOrUpdate(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "bxcantgzggsepbhqmedjqyrqeezmfb", armnewrelicobservability.TagRule{
		Properties: &armnewrelicobservability.MonitoringTagRulesProperties{
			LogRules: &armnewrelicobservability.LogRules{
				FilteringTags: []*armnewrelicobservability.FilteringTag{
					{
						Name:   to.Ptr("saokgpjvdlorciqbjmjxazpee"),
						Action: to.Ptr(armnewrelicobservability.TagActionInclude),
						Value:  to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
					}},
				SendAADLogs:          to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
				SendActivityLogs:     to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
				SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
			},
			MetricRules: &armnewrelicobservability.MetricRules{
				FilteringTags: []*armnewrelicobservability.FilteringTag{
					{
						Name:   to.Ptr("saokgpjvdlorciqbjmjxazpee"),
						Action: to.Ptr(armnewrelicobservability.TagActionInclude),
						Value:  to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
					}},
				UserEmail: to.Ptr("test@testing.com"),
			},
			ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateAccepted),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TagRule = armnewrelicobservability.TagRule{
	// 	Name: to.Ptr("ddoieozflu"),
	// 	Type: to.Ptr("roafonrkfwwuv"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	SystemData: &armnewrelicobservability.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T00:39:52.964Z"); return t}()),
	// 		CreatedBy: to.Ptr("wqrkemruqrvclsoevdftfeof"),
	// 		CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T00:39:52.964Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("usdyoriebtakpdotcfp"),
	// 		LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 	},
	// 	Properties: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 		LogRules: &armnewrelicobservability.LogRules{
	// 			FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 				{
	// 					Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 					Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 					Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 			}},
	// 			SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
	// 			SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
	// 			SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
	// 		},
	// 		MetricRules: &armnewrelicobservability.MetricRules{
	// 			FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 				{
	// 					Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 					Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 					Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 			}},
	// 		},
	// 		ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

Example (TagRulesCreateOrUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTagRulesClient().BeginCreateOrUpdate(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "bxcantgzggsepbhqmedjqyrqeezmfb", armnewrelicobservability.TagRule{
		Properties: &armnewrelicobservability.MonitoringTagRulesProperties{},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TagRule = armnewrelicobservability.TagRule{
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	Properties: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 	},
	// }
}
Output:

func (*TagRulesClient) BeginDelete

func (client *TagRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, ruleSetName string, options *TagRulesClientBeginDeleteOptions) (*runtime.Poller[TagRulesClientDeleteResponse], error)

BeginDelete - Delete a TagRule If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • ruleSetName - Name of the TagRule
  • options - TagRulesClientBeginDeleteOptions contains the optional parameters for the TagRulesClient.BeginDelete method.
Example (TagRulesDeleteMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_Delete_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTagRulesClient().BeginDelete(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "bxcantgzggsepbhqmedjqyrqeezmfb", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

Example (TagRulesDeleteMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_Delete_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTagRulesClient().BeginDelete(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "bxcantgzggsepbhqmedjqyrqeezmfb", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*TagRulesClient) Get

func (client *TagRulesClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ruleSetName string, options *TagRulesClientGetOptions) (TagRulesClientGetResponse, error)

Get - Get a TagRule If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • ruleSetName - Name of the TagRule
  • options - TagRulesClientGetOptions contains the optional parameters for the TagRulesClient.Get method.
Example (TagRulesGetMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_Get_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTagRulesClient().Get(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "bxcantgzggsepbhqmedjqyrqeezmfb", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TagRule = armnewrelicobservability.TagRule{
	// 	Name: to.Ptr("ddoieozflu"),
	// 	Type: to.Ptr("roafonrkfwwuv"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	SystemData: &armnewrelicobservability.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T00:39:52.964Z"); return t}()),
	// 		CreatedBy: to.Ptr("wqrkemruqrvclsoevdftfeof"),
	// 		CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T00:39:52.964Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("usdyoriebtakpdotcfp"),
	// 		LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 	},
	// 	Properties: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 		LogRules: &armnewrelicobservability.LogRules{
	// 			FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 				{
	// 					Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 					Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 					Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 			}},
	// 			SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
	// 			SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
	// 			SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
	// 		},
	// 		MetricRules: &armnewrelicobservability.MetricRules{
	// 			FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 				{
	// 					Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 					Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 					Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 			}},
	// 			UserEmail: to.Ptr("test@testing.com"),
	// 		},
	// 		ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

Example (TagRulesGetMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_Get_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTagRulesClient().Get(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "bxcantgzggsepbhqmedjqyrqeezmfb", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TagRule = armnewrelicobservability.TagRule{
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	Properties: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 	},
	// }
}
Output:

func (*TagRulesClient) NewListByNewRelicMonitorResourcePager

func (client *TagRulesClient) NewListByNewRelicMonitorResourcePager(resourceGroupName string, monitorName string, options *TagRulesClientListByNewRelicMonitorResourceOptions) *runtime.Pager[TagRulesClientListByNewRelicMonitorResourceResponse]

NewListByNewRelicMonitorResourcePager - List TagRule resources by NewRelicMonitorResource

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • options - TagRulesClientListByNewRelicMonitorResourceOptions contains the optional parameters for the TagRulesClient.NewListByNewRelicMonitorResourcePager method.
Example (TagRulesListByNewRelicMonitorResourceMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTagRulesClient().NewListByNewRelicMonitorResourcePager("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TagRuleListResult = armnewrelicobservability.TagRuleListResult{
		// 	Value: []*armnewrelicobservability.TagRule{
		// 		{
		// 			Name: to.Ptr("ddoieozflu"),
		// 			Type: to.Ptr("roafonrkfwwuv"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 			SystemData: &armnewrelicobservability.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T00:39:52.964Z"); return t}()),
		// 				CreatedBy: to.Ptr("wqrkemruqrvclsoevdftfeof"),
		// 				CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T00:39:52.964Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("usdyoriebtakpdotcfp"),
		// 				LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
		// 			},
		// 			Properties: &armnewrelicobservability.MonitoringTagRulesProperties{
		// 				LogRules: &armnewrelicobservability.LogRules{
		// 					FilteringTags: []*armnewrelicobservability.FilteringTag{
		// 						{
		// 							Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
		// 							Action: to.Ptr(armnewrelicobservability.TagActionInclude),
		// 							Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
		// 					}},
		// 					SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
		// 					SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
		// 					SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
		// 				},
		// 				MetricRules: &armnewrelicobservability.MetricRules{
		// 					FilteringTags: []*armnewrelicobservability.FilteringTag{
		// 						{
		// 							Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
		// 							Action: to.Ptr(armnewrelicobservability.TagActionInclude),
		// 							Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
		// 					}},
		// 					UserEmail: to.Ptr("test@testing.com"),
		// 				},
		// 				ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (TagRulesListByNewRelicMonitorResourceMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTagRulesClient().NewListByNewRelicMonitorResourcePager("rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TagRuleListResult = armnewrelicobservability.TagRuleListResult{
		// 	Value: []*armnewrelicobservability.TagRule{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
		// 			Properties: &armnewrelicobservability.MonitoringTagRulesProperties{
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*TagRulesClient) Update

func (client *TagRulesClient) Update(ctx context.Context, resourceGroupName string, monitorName string, ruleSetName string, properties TagRuleUpdate, options *TagRulesClientUpdateOptions) (TagRulesClientUpdateResponse, error)

Update - Update a TagRule If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2024-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Name of the Monitors resource
  • ruleSetName - Name of the TagRule
  • properties - The resource properties to be updated.
  • options - TagRulesClientUpdateOptions contains the optional parameters for the TagRulesClient.Update method.
Example (TagRulesUpdateMaximumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_Update_MaximumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTagRulesClient().Update(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "bxcantgzggsepbhqmedjqyrqeezmfb", armnewrelicobservability.TagRuleUpdate{
		Properties: &armnewrelicobservability.TagRuleUpdateProperties{
			LogRules: &armnewrelicobservability.LogRules{
				FilteringTags: []*armnewrelicobservability.FilteringTag{
					{
						Name:   to.Ptr("saokgpjvdlorciqbjmjxazpee"),
						Action: to.Ptr(armnewrelicobservability.TagActionInclude),
						Value:  to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
					}},
				SendAADLogs:          to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
				SendActivityLogs:     to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
				SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
			},
			MetricRules: &armnewrelicobservability.MetricRules{
				FilteringTags: []*armnewrelicobservability.FilteringTag{
					{
						Name:   to.Ptr("saokgpjvdlorciqbjmjxazpee"),
						Action: to.Ptr(armnewrelicobservability.TagActionInclude),
						Value:  to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
					}},
				UserEmail: to.Ptr("test@testing.com"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TagRule = armnewrelicobservability.TagRule{
	// 	Name: to.Ptr("ddoieozflu"),
	// 	Type: to.Ptr("roafonrkfwwuv"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	SystemData: &armnewrelicobservability.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T00:39:52.964Z"); return t}()),
	// 		CreatedBy: to.Ptr("wqrkemruqrvclsoevdftfeof"),
	// 		CreatedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T00:39:52.964Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("usdyoriebtakpdotcfp"),
	// 		LastModifiedByType: to.Ptr(armnewrelicobservability.CreatedByTypeUser),
	// 	},
	// 	Properties: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 		LogRules: &armnewrelicobservability.LogRules{
	// 			FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 				{
	// 					Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 					Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 					Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 			}},
	// 			SendAADLogs: to.Ptr(armnewrelicobservability.SendAADLogsStatusEnabled),
	// 			SendActivityLogs: to.Ptr(armnewrelicobservability.SendActivityLogsStatusEnabled),
	// 			SendSubscriptionLogs: to.Ptr(armnewrelicobservability.SendSubscriptionLogsStatusEnabled),
	// 		},
	// 		MetricRules: &armnewrelicobservability.MetricRules{
	// 			FilteringTags: []*armnewrelicobservability.FilteringTag{
	// 				{
	// 					Name: to.Ptr("saokgpjvdlorciqbjmjxazpee"),
	// 					Action: to.Ptr(armnewrelicobservability.TagActionInclude),
	// 					Value: to.Ptr("sarxrqsxouhdjwsrqqicbeirdb"),
	// 			}},
	// 			UserEmail: to.Ptr("test@testing.com"),
	// 		},
	// 		ProvisioningState: to.Ptr(armnewrelicobservability.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

Example (TagRulesUpdateMinimumSetGen)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-01-01/examples/TagRules_Update_MinimumSet_Gen.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/newrelic/armnewrelicobservability"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnewrelicobservability.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTagRulesClient().Update(ctx, "rgopenapi", "ipxmlcbonyxtolzejcjshkmlron", "bxcantgzggsepbhqmedjqyrqeezmfb", armnewrelicobservability.TagRuleUpdate{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TagRule = armnewrelicobservability.TagRule{
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor"),
	// 	Properties: &armnewrelicobservability.MonitoringTagRulesProperties{
	// 	},
	// }
}
Output:

type TagRulesClientBeginCreateOrUpdateOptions

type TagRulesClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TagRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the TagRulesClient.BeginCreateOrUpdate method.

type TagRulesClientBeginDeleteOptions

type TagRulesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TagRulesClientBeginDeleteOptions contains the optional parameters for the TagRulesClient.BeginDelete method.

type TagRulesClientCreateOrUpdateResponse

type TagRulesClientCreateOrUpdateResponse struct {
	// A tag rule belonging to NewRelic account
	TagRule
}

TagRulesClientCreateOrUpdateResponse contains the response from method TagRulesClient.BeginCreateOrUpdate.

type TagRulesClientDeleteResponse

type TagRulesClientDeleteResponse struct {
}

TagRulesClientDeleteResponse contains the response from method TagRulesClient.BeginDelete.

type TagRulesClientGetOptions

type TagRulesClientGetOptions struct {
}

TagRulesClientGetOptions contains the optional parameters for the TagRulesClient.Get method.

type TagRulesClientGetResponse

type TagRulesClientGetResponse struct {
	// A tag rule belonging to NewRelic account
	TagRule
}

TagRulesClientGetResponse contains the response from method TagRulesClient.Get.

type TagRulesClientListByNewRelicMonitorResourceOptions

type TagRulesClientListByNewRelicMonitorResourceOptions struct {
}

TagRulesClientListByNewRelicMonitorResourceOptions contains the optional parameters for the TagRulesClient.NewListByNewRelicMonitorResourcePager method.

type TagRulesClientListByNewRelicMonitorResourceResponse

type TagRulesClientListByNewRelicMonitorResourceResponse struct {
	// The response of a TagRule list operation.
	TagRuleListResult
}

TagRulesClientListByNewRelicMonitorResourceResponse contains the response from method TagRulesClient.NewListByNewRelicMonitorResourcePager.

type TagRulesClientUpdateOptions

type TagRulesClientUpdateOptions struct {
}

TagRulesClientUpdateOptions contains the optional parameters for the TagRulesClient.Update method.

type TagRulesClientUpdateResponse

type TagRulesClientUpdateResponse struct {
	// A tag rule belonging to NewRelic account
	TagRule
}

TagRulesClientUpdateResponse contains the response from method TagRulesClient.Update.

type UsageType

type UsageType string

UsageType - Different usage type like PAYG/COMMITTED

const (
	// UsageTypeCOMMITTED - Usage type is COMMITTED
	UsageTypeCOMMITTED UsageType = "COMMITTED"
	// UsageTypePAYG - Usage type is PAYG
	UsageTypePAYG UsageType = "PAYG"
)

func PossibleUsageTypeValues

func PossibleUsageTypeValues() []UsageType

PossibleUsageTypeValues returns the possible values for the UsageType const type.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; The client ID of the assigned identity.
	ClientID *string

	// READ-ONLY; The principal ID of the assigned identity.
	PrincipalID *string
}

UserAssignedIdentity - User assigned identity properties

func (UserAssignedIdentity) MarshalJSON

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type UserInfo

type UserInfo struct {
	// country if user
	Country *string

	// User Email
	EmailAddress *string

	// First name
	FirstName *string

	// Last name
	LastName *string

	// Contact phone number
	PhoneNumber *string
}

UserInfo - User Info of NewRelic Monitor resource

func (UserInfo) MarshalJSON

func (u UserInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserInfo.

func (*UserInfo) UnmarshalJSON

func (u *UserInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserInfo.

type VMExtensionPayload

type VMExtensionPayload struct {
	// Ingestion key of the account
	IngestionKey *string
}

VMExtensionPayload - Response of payload to be passed while installing VM agent.

func (VMExtensionPayload) MarshalJSON

func (v VMExtensionPayload) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMExtensionPayload.

func (*VMExtensionPayload) UnmarshalJSON

func (v *VMExtensionPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMExtensionPayload.

type VMHostsListResponse

type VMHostsListResponse struct {
	// REQUIRED; The VMInfo items on this page
	Value []*VMInfo

	// The link to the next page of items
	NextLink *string
}

VMHostsListResponse - Response of a list VM Host Operation.

func (VMHostsListResponse) MarshalJSON

func (v VMHostsListResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMHostsListResponse.

func (*VMHostsListResponse) UnmarshalJSON

func (v *VMHostsListResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMHostsListResponse.

type VMInfo

type VMInfo struct {
	// Status of the NewRelic agent installed on the VM.
	AgentStatus *string

	// Version of the NewRelic agent installed on the VM.
	AgentVersion *string

	// Azure VM resource ID
	VMID *string
}

VMInfo - Details of VM Resource having NewRelic OneAgent installed

func (VMInfo) MarshalJSON

func (v VMInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VMInfo.

func (*VMInfo) UnmarshalJSON

func (v *VMInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VMInfo.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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