armdatadog

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: MIT Imports: 14 Imported by: 2

README

Azure Datadog Module for Go

PkgGoDev

The armdatadog module provides operations for working with Azure Datadog.

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 Datadog module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Datadog. 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 Datadog 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 := armdatadog.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 := armdatadog.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.NewMarketplaceAgreementsClient()

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 Datadog 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 APIKey added in v0.2.0

type APIKey struct {
	// REQUIRED; The value of the API key.
	Key *string

	// The time of creation of the API key.
	Created *string

	// The user that created the API key.
	CreatedBy *string

	// The name of the API key.
	Name *string
}

func (APIKey) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type APIKey.

func (*APIKey) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIKey.

type APIKeyListResponse added in v0.2.0

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

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

APIKeyListResponse - Response of a list operation.

func (APIKeyListResponse) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type APIKeyListResponse.

func (*APIKeyListResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIKeyListResponse.

type AgreementProperties added in v0.2.0

type AgreementProperties struct {
	// If any version of the terms have been accepted, otherwise false.
	Accepted *bool

	// Link to HTML with Microsoft and Publisher terms.
	LicenseTextLink *string

	// Plan identifier string.
	Plan *string

	// Link to the privacy policy of the publisher.
	PrivacyPolicyLink *string

	// Product identifier string.
	Product *string

	// Publisher identifier string.
	Publisher *string

	// Date and time in UTC of when the terms were accepted. This is empty if Accepted is false.
	RetrieveDatetime *time.Time

	// Terms signature.
	Signature *string
}

AgreementProperties - Terms properties.

func (AgreementProperties) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AgreementProperties.

func (*AgreementProperties) UnmarshalJSON added in v0.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgreementProperties.

type AgreementResource added in v0.2.0

type AgreementResource struct {
	// Represents the properties of the resource.
	Properties *AgreementProperties

	// READ-ONLY; ARM id of the resource.
	ID *string

	// READ-ONLY; Name of the agreement.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

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

func (AgreementResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AgreementResource.

func (*AgreementResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgreementResource.

type AgreementResourceListResponse added in v0.2.0

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

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

AgreementResourceListResponse - Response of a list operation.

func (AgreementResourceListResponse) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type AgreementResourceListResponse.

func (*AgreementResourceListResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgreementResourceListResponse.

type ClientFactory added in v1.1.0

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 added in v1.1.0

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) NewCreationSupportedClient added in v1.2.0

func (c *ClientFactory) NewCreationSupportedClient() *CreationSupportedClient

NewCreationSupportedClient creates a new instance of CreationSupportedClient.

func (*ClientFactory) NewMarketplaceAgreementsClient added in v1.1.0

func (c *ClientFactory) NewMarketplaceAgreementsClient() *MarketplaceAgreementsClient

NewMarketplaceAgreementsClient creates a new instance of MarketplaceAgreementsClient.

func (*ClientFactory) NewMonitoredSubscriptionsClient added in v1.2.0

func (c *ClientFactory) NewMonitoredSubscriptionsClient() *MonitoredSubscriptionsClient

NewMonitoredSubscriptionsClient creates a new instance of MonitoredSubscriptionsClient.

func (*ClientFactory) NewMonitorsClient added in v1.1.0

func (c *ClientFactory) NewMonitorsClient() *MonitorsClient

NewMonitorsClient creates a new instance of MonitorsClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewSingleSignOnConfigurationsClient added in v1.1.0

func (c *ClientFactory) NewSingleSignOnConfigurationsClient() *SingleSignOnConfigurationsClient

NewSingleSignOnConfigurationsClient creates a new instance of SingleSignOnConfigurationsClient.

func (*ClientFactory) NewTagRulesClient added in v1.1.0

func (c *ClientFactory) NewTagRulesClient() *TagRulesClient

NewTagRulesClient creates a new instance of TagRulesClient.

type CreateResourceSupportedProperties added in v1.2.0

type CreateResourceSupportedProperties struct {
	// READ-ONLY; Indicates if selected subscription supports Datadog resource creation, if not it is already being monitored
	// for the selected organization via multi subscription feature.
	CreationSupported *bool

	// READ-ONLY; The ARM id of the subscription.
	Name *string
}

CreateResourceSupportedProperties - Datadog resource can be created or not properties.

func (CreateResourceSupportedProperties) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CreateResourceSupportedProperties.

func (*CreateResourceSupportedProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CreateResourceSupportedProperties.

type CreateResourceSupportedResponse added in v1.2.0

type CreateResourceSupportedResponse struct {
	// Represents the properties of the resource.
	Properties *CreateResourceSupportedProperties
}

CreateResourceSupportedResponse - Datadog resource can be created or not.

func (CreateResourceSupportedResponse) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CreateResourceSupportedResponse.

func (*CreateResourceSupportedResponse) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CreateResourceSupportedResponse.

type CreateResourceSupportedResponseList added in v1.2.0

type CreateResourceSupportedResponseList struct {
	Value []*CreateResourceSupportedResponse
}

func (CreateResourceSupportedResponseList) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CreateResourceSupportedResponseList.

func (*CreateResourceSupportedResponseList) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CreateResourceSupportedResponseList.

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 CreationSupportedClient added in v1.2.0

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

CreationSupportedClient contains the methods for the CreationSupported group. Don't use this type directly, use NewCreationSupportedClient() instead.

func NewCreationSupportedClient added in v1.2.0

func NewCreationSupportedClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CreationSupportedClient, error)

NewCreationSupportedClient creates a new instance of CreationSupportedClient 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 (*CreationSupportedClient) Get added in v1.2.0

Get - Informs if the current subscription is being already monitored for selected Datadog organization. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • datadogOrganizationID - Datadog Organization Id
  • options - CreationSupportedClientGetOptions contains the optional parameters for the CreationSupportedClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/CreationSupported_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCreationSupportedClient().Get(ctx, "00000000-0000-0000-0000", 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.CreateResourceSupportedResponse = armdatadog.CreateResourceSupportedResponse{
	// 	Properties: &armdatadog.CreateResourceSupportedProperties{
	// 		Name: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 		CreationSupported: to.Ptr(true),
	// 	},
	// }
}
Output:

func (*CreationSupportedClient) NewListPager added in v1.2.0

NewListPager - Informs if the current subscription is being already monitored for selected Datadog organization.

Generated from API version 2023-01-01

  • datadogOrganizationID - Datadog Organization Id
  • options - CreationSupportedClientListOptions contains the optional parameters for the CreationSupportedClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/CreationSupported_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCreationSupportedClient().NewListPager("00000000-0000-0000-0000", 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.CreateResourceSupportedResponseList = armdatadog.CreateResourceSupportedResponseList{
		// 	Value: []*armdatadog.CreateResourceSupportedResponse{
		// 		{
		// 			Properties: &armdatadog.CreateResourceSupportedProperties{
		// 				Name: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
		// 				CreationSupported: to.Ptr(true),
		// 			},
		// 	}},
		// }
	}
}
Output:

type CreationSupportedClientGetOptions added in v1.2.0

type CreationSupportedClientGetOptions struct {
}

CreationSupportedClientGetOptions contains the optional parameters for the CreationSupportedClient.Get method.

type CreationSupportedClientGetResponse added in v1.2.0

type CreationSupportedClientGetResponse struct {
	// Datadog resource can be created or not.
	CreateResourceSupportedResponse
}

CreationSupportedClientGetResponse contains the response from method CreationSupportedClient.Get.

type CreationSupportedClientListOptions added in v1.2.0

type CreationSupportedClientListOptions struct {
}

CreationSupportedClientListOptions contains the optional parameters for the CreationSupportedClient.NewListPager method.

type CreationSupportedClientListResponse added in v1.2.0

type CreationSupportedClientListResponse struct {
	CreateResourceSupportedResponseList
}

CreationSupportedClientListResponse contains the response from method CreationSupportedClient.NewListPager.

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type FilteringTag.

func (*FilteringTag) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type FilteringTag.

type Host added in v0.2.0

type Host struct {
	// The aliases for the host installed via the Datadog agent.
	Aliases []*string

	// The Datadog integrations reporting metrics for the host.
	Apps []*string
	Meta *HostMetadata

	// The name of the host.
	Name *string
}

func (Host) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type Host.

func (*Host) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Host.

type HostListResponse added in v0.2.0

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

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

HostListResponse - Response of a list operation.

func (HostListResponse) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type HostListResponse.

func (*HostListResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type HostListResponse.

type HostMetadata added in v0.2.0

type HostMetadata struct {
	// The agent version.
	AgentVersion  *string
	InstallMethod *InstallMethod
	LogsAgent     *LogsAgent
}

func (HostMetadata) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type HostMetadata.

func (*HostMetadata) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type HostMetadata.

type IdentityProperties

type IdentityProperties struct {
	// Specifies the identity type of the Datadog Monitor. At this time the only allowed value is 'SystemAssigned'.
	Type *ManagedIdentityTypes

	// READ-ONLY; The identity ID.
	PrincipalID *string

	// READ-ONLY; The tenant ID of resource.
	TenantID *string
}

func (IdentityProperties) MarshalJSON added in v1.1.0

func (i IdentityProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IdentityProperties.

func (*IdentityProperties) UnmarshalJSON added in v1.1.0

func (i *IdentityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProperties.

type InstallMethod added in v0.2.0

type InstallMethod struct {
	// The installer version.
	InstallerVersion *string

	// The tool.
	Tool *string

	// The tool version.
	ToolVersion *string
}

func (InstallMethod) MarshalJSON added in v1.1.0

func (i InstallMethod) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InstallMethod.

func (*InstallMethod) UnmarshalJSON added in v1.1.0

func (i *InstallMethod) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InstallMethod.

type LiftrResourceCategories

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

func PossibleLiftrResourceCategoriesValues

func PossibleLiftrResourceCategoriesValues() []LiftrResourceCategories

PossibleLiftrResourceCategoriesValues returns the possible values for the LiftrResourceCategories const type.

type LinkedResource

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.1.0

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

MarshalJSON implements the json.Marshaller interface for type LinkedResource.

func (*LinkedResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedResource.

type LinkedResourceListResponse

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

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

MarshalJSON implements the json.Marshaller interface for type LinkedResourceListResponse.

func (*LinkedResourceListResponse) UnmarshalJSON added in v1.1.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 SendResourceLogs 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 *bool

	// Flag specifying if Azure resource logs should be sent for the Monitor resource.
	SendResourceLogs *bool

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

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 added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LogRules.

type LogsAgent added in v0.2.0

type LogsAgent struct {
	// The transport.
	Transport *string
}

func (LogsAgent) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LogsAgent.

func (*LogsAgent) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LogsAgent.

type ManagedIdentityTypes

type ManagedIdentityTypes string

ManagedIdentityTypes - Specifies the identity type of the Datadog Monitor. At this time the only allowed value is 'SystemAssigned'.

const (
	ManagedIdentityTypesSystemAssigned ManagedIdentityTypes = "SystemAssigned"
	ManagedIdentityTypesUserAssigned   ManagedIdentityTypes = "UserAssigned"
)

func PossibleManagedIdentityTypesValues

func PossibleManagedIdentityTypesValues() []ManagedIdentityTypes

PossibleManagedIdentityTypesValues returns the possible values for the ManagedIdentityTypes const type.

type MarketplaceAgreementsClient

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

MarketplaceAgreementsClient contains the methods for the MarketplaceAgreements group. Don't use this type directly, use NewMarketplaceAgreementsClient() instead.

func NewMarketplaceAgreementsClient

func NewMarketplaceAgreementsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MarketplaceAgreementsClient, error)

NewMarketplaceAgreementsClient creates a new instance of MarketplaceAgreementsClient 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 (*MarketplaceAgreementsClient) CreateOrUpdate

CreateOrUpdate - Create Datadog marketplace agreement in the subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • options - MarketplaceAgreementsClientCreateOrUpdateOptions contains the optional parameters for the MarketplaceAgreementsClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MarketplaceAgreements_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMarketplaceAgreementsClient().CreateOrUpdate(ctx, &armdatadog.MarketplaceAgreementsClientCreateOrUpdateOptions{Body: 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.AgreementResource = armdatadog.AgreementResource{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Datadog/agreements"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Datadog/agreements/default"),
	// 	Properties: &armdatadog.AgreementProperties{
	// 		Accepted: to.Ptr(true),
	// 		LicenseTextLink: to.Ptr("test.licenseLink1"),
	// 		Plan: to.Ptr("planid1"),
	// 		PrivacyPolicyLink: to.Ptr("test.privacyPolicyLink1"),
	// 		Product: to.Ptr("offid1"),
	// 		Publisher: to.Ptr("pubid1"),
	// 		RetrieveDatetime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T11:33:07.121Z"); return t}()),
	// 		Signature: to.Ptr("ASDFSDAFWEFASDGWERLWER"),
	// 	},
	// }
}
Output:

func (*MarketplaceAgreementsClient) NewListPager added in v0.4.0

NewListPager - List Datadog marketplace agreements in the subscription.

Generated from API version 2023-01-01

  • options - MarketplaceAgreementsClientListOptions contains the optional parameters for the MarketplaceAgreementsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MarketplaceAgreements_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMarketplaceAgreementsClient().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.AgreementResourceListResponse = armdatadog.AgreementResourceListResponse{
		// 	Value: []*armdatadog.AgreementResource{
		// 		{
		// 			Name: to.Ptr("planid1"),
		// 			Type: to.Ptr("Microsoft.Datadog/agreements"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Datadog/agreements/id1"),
		// 			Properties: &armdatadog.AgreementProperties{
		// 				Accepted: to.Ptr(false),
		// 				LicenseTextLink: to.Ptr("test.licenseLink1"),
		// 				Plan: to.Ptr("planid1"),
		// 				PrivacyPolicyLink: to.Ptr("test.privacyPolicyLink1"),
		// 				Product: to.Ptr("offid1"),
		// 				Publisher: to.Ptr("pubid1"),
		// 				RetrieveDatetime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-15T11:33:07.121Z"); return t}()),
		// 				Signature: to.Ptr("ASDFSDAFWEFASDGWERLWER"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("planid2"),
		// 			Type: to.Ptr("Microsoft.Datadog/agreements"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Datadog/agreements/id2"),
		// 			Properties: &armdatadog.AgreementProperties{
		// 				Accepted: to.Ptr(false),
		// 				LicenseTextLink: to.Ptr("test.licenseLin2k"),
		// 				Plan: to.Ptr("planid2"),
		// 				PrivacyPolicyLink: to.Ptr("test.privacyPolicyLink2"),
		// 				Product: to.Ptr("offid2"),
		// 				Publisher: to.Ptr("pubid2"),
		// 				RetrieveDatetime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-14T11:33:07.121Z"); return t}()),
		// 				Signature: to.Ptr("ASDFSDAFWEFASDGWERLWER"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type MarketplaceAgreementsClientCreateOrUpdateOptions added in v0.2.0

type MarketplaceAgreementsClientCreateOrUpdateOptions struct {
	Body *AgreementResource
}

MarketplaceAgreementsClientCreateOrUpdateOptions contains the optional parameters for the MarketplaceAgreementsClient.CreateOrUpdate method.

type MarketplaceAgreementsClientCreateOrUpdateResponse added in v0.2.0

type MarketplaceAgreementsClientCreateOrUpdateResponse struct {
	AgreementResource
}

MarketplaceAgreementsClientCreateOrUpdateResponse contains the response from method MarketplaceAgreementsClient.CreateOrUpdate.

type MarketplaceAgreementsClientListOptions added in v0.2.0

type MarketplaceAgreementsClientListOptions struct {
}

MarketplaceAgreementsClientListOptions contains the optional parameters for the MarketplaceAgreementsClient.NewListPager method.

type MarketplaceAgreementsClientListResponse added in v0.2.0

type MarketplaceAgreementsClientListResponse struct {
	// Response of a list operation.
	AgreementResourceListResponse
}

MarketplaceAgreementsClientListResponse contains the response from method MarketplaceAgreementsClient.NewListPager.

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       MarketplaceSubscriptionStatus = "Active"
	MarketplaceSubscriptionStatusProvisioning MarketplaceSubscriptionStatus = "Provisioning"
	MarketplaceSubscriptionStatusSuspended    MarketplaceSubscriptionStatus = "Suspended"
	MarketplaceSubscriptionStatusUnsubscribed MarketplaceSubscriptionStatus = "Unsubscribed"
)

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. 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
}

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 added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MetricRules.

type MonitorProperties

type MonitorProperties struct {
	// Specify the Datadog organization name. In the case of linking to existing organizations, Id, ApiKey, and Applicationkey
	// is required as well.
	DatadogOrganizationProperties *OrganizationProperties

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

	// Includes name, email and optionally, phone number. User Information can't be null.
	UserInfo *UserInfo

	// READ-ONLY
	LiftrResourceCategory *LiftrResourceCategories

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

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

	// READ-ONLY
	ProvisioningState *ProvisioningState
}

MonitorProperties - Properties specific to the monitor resource.

func (MonitorProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MonitorProperties.

func (*MonitorProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitorProperties.

type MonitorResource added in v0.2.0

type MonitorResource struct {
	// REQUIRED
	Location *string
	Identity *IdentityProperties

	// Properties specific to the monitor resource.
	Properties *MonitorProperties
	SKU        *ResourceSKU

	// Dictionary of
	Tags map[string]*string

	// READ-ONLY; ARM id of the monitor resource.
	ID *string

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

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

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

func (MonitorResource) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type MonitorResource.

func (*MonitorResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitorResource.

type MonitorResourceListResponse added in v0.2.0

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

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

MonitorResourceListResponse - Response of a list operation.

func (MonitorResourceListResponse) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type MonitorResourceListResponse.

func (*MonitorResourceListResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitorResourceListResponse.

type MonitorResourceUpdateParameters added in v0.2.0

type MonitorResourceUpdateParameters struct {
	// The set of properties that can be update in a PATCH request to a monitor resource.
	Properties *MonitorUpdateProperties
	SKU        *ResourceSKU

	// The new tags of the monitor resource.
	Tags map[string]*string
}

MonitorResourceUpdateParameters - The parameters for a PATCH request to a monitor resource.

func (MonitorResourceUpdateParameters) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type MonitorResourceUpdateParameters.

func (*MonitorResourceUpdateParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitorResourceUpdateParameters.

type MonitorUpdateProperties

type MonitorUpdateProperties struct {
	// The new cloud security posture management value of the monitor resource. This collects configuration information for all
	// resources in a subscription and track conformance to industry benchmarks.
	Cspm *bool

	// Flag specifying if the resource monitoring is enabled or disabled.
	MonitoringStatus *MonitoringStatus
}

MonitorUpdateProperties - The set of properties that can be update in a PATCH request to a monitor resource.

func (MonitorUpdateProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MonitorUpdateProperties.

func (*MonitorUpdateProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitorUpdateProperties.

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 Datadog.
	SendingLogs *bool

	// Flag indicating if resource is sending metrics to Datadog.
	SendingMetrics *bool
}

MonitoredResource - The properties of a resource currently being monitored by the Datadog monitor resource.

func (MonitoredResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MonitoredResource.

func (*MonitoredResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoredResource.

type MonitoredResourceListResponse

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

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

MonitoredResourceListResponse - Response of a list operation.

func (MonitoredResourceListResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MonitoredResourceListResponse.

func (*MonitoredResourceListResponse) UnmarshalJSON added in v1.1.0

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

	// Definition of the properties for a TagRules resource.
	TagRules *MonitoringTagRulesProperties
}

MonitoredSubscription - The list of subscriptions and it's monitoring status by current Datadog 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 Datadog 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 Datadog 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 {
	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 Datadog monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • 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/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitoredSubscriptionsClient().BeginCreateorUpdate(ctx, "myResourceGroup", "myMonitor", "default", &armdatadog.MonitoredSubscriptionsClientBeginCreateorUpdateOptions{Body: 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 = armdatadog.MonitoredSubscriptionProperties{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Datadog/monitors/monitoredSubscriptions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/monitoredSubscriptions/default"),
	// 	Properties: &armdatadog.SubscriptionList{
	// 		MonitoredSubscriptionList: []*armdatadog.MonitoredSubscription{
	// 			{
	// 				Status: to.Ptr(armdatadog.StatusActive),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 				TagRules: &armdatadog.MonitoringTagRulesProperties{
	// 					Automuting: to.Ptr(true),
	// 					LogRules: &armdatadog.LogRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionInclude),
	// 								Value: to.Ptr("Prod"),
	// 							},
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionExclude),
	// 								Value: to.Ptr("Dev"),
	// 						}},
	// 						SendAADLogs: to.Ptr(false),
	// 						SendResourceLogs: to.Ptr(true),
	// 						SendSubscriptionLogs: to.Ptr(true),
	// 					},
	// 					MetricRules: &armdatadog.MetricRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 						},
	// 					},
	// 				},
	// 			},
	// 			{
	// 				Status: to.Ptr(armdatadog.StatusFailed),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001"),
	// 				TagRules: &armdatadog.MonitoringTagRulesProperties{
	// 					Automuting: to.Ptr(true),
	// 					LogRules: &armdatadog.LogRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionInclude),
	// 								Value: to.Ptr("Prod"),
	// 							},
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionExclude),
	// 								Value: to.Ptr("Dev"),
	// 						}},
	// 						SendAADLogs: to.Ptr(false),
	// 						SendResourceLogs: to.Ptr(true),
	// 						SendSubscriptionLogs: to.Ptr(true),
	// 					},
	// 					MetricRules: &armdatadog.MetricRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 						},
	// 					},
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*MonitoredSubscriptionsClient) BeginDelete added in v1.2.0

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

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • configurationName - Configuration name
  • 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/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitoredSubscriptionsClient().BeginDelete(ctx, "myResourceGroup", "myMonitor", "default", 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 Datadog monitor resource If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • 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/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitoredSubscriptionsClient().BeginUpdate(ctx, "myResourceGroup", "myMonitor", "default", &armdatadog.MonitoredSubscriptionsClientBeginUpdateOptions{Body: 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 = armdatadog.MonitoredSubscriptionProperties{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Datadog/monitors/monitoredSubscriptions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/monitoredSubscriptions/default"),
	// 	Properties: &armdatadog.SubscriptionList{
	// 		MonitoredSubscriptionList: []*armdatadog.MonitoredSubscription{
	// 			{
	// 				Status: to.Ptr(armdatadog.StatusActive),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 				TagRules: &armdatadog.MonitoringTagRulesProperties{
	// 					Automuting: to.Ptr(true),
	// 					LogRules: &armdatadog.LogRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionInclude),
	// 								Value: to.Ptr("Prod"),
	// 							},
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionExclude),
	// 								Value: to.Ptr("Dev"),
	// 						}},
	// 						SendAADLogs: to.Ptr(false),
	// 						SendResourceLogs: to.Ptr(true),
	// 						SendSubscriptionLogs: to.Ptr(true),
	// 					},
	// 					MetricRules: &armdatadog.MetricRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 						},
	// 					},
	// 				},
	// 			},
	// 			{
	// 				Status: to.Ptr(armdatadog.StatusFailed),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001"),
	// 				TagRules: &armdatadog.MonitoringTagRulesProperties{
	// 					Automuting: to.Ptr(true),
	// 					LogRules: &armdatadog.LogRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionInclude),
	// 								Value: to.Ptr("Prod"),
	// 							},
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionExclude),
	// 								Value: to.Ptr("Dev"),
	// 						}},
	// 						SendAADLogs: to.Ptr(false),
	// 						SendResourceLogs: to.Ptr(true),
	// 						SendSubscriptionLogs: to.Ptr(true),
	// 					},
	// 					MetricRules: &armdatadog.MetricRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 						},
	// 					},
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*MonitoredSubscriptionsClient) Get added in v1.2.0

func (client *MonitoredSubscriptionsClient) Get(ctx context.Context, resourceGroupName string, monitorName string, configurationName string, options *MonitoredSubscriptionsClientGetOptions) (MonitoredSubscriptionsClientGetResponse, error)

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

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • 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/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitoredSubscriptionsClient().Get(ctx, "myResourceGroup", "myMonitor", "default", 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 = armdatadog.MonitoredSubscriptionProperties{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Datadog/monitors/monitoredSubscriptions"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/monitoredSubscriptions/default"),
	// 	Properties: &armdatadog.SubscriptionList{
	// 		MonitoredSubscriptionList: []*armdatadog.MonitoredSubscription{
	// 			{
	// 				Status: to.Ptr(armdatadog.StatusActive),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 				TagRules: &armdatadog.MonitoringTagRulesProperties{
	// 					Automuting: to.Ptr(true),
	// 					LogRules: &armdatadog.LogRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionInclude),
	// 								Value: to.Ptr("Prod"),
	// 							},
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionExclude),
	// 								Value: to.Ptr("Dev"),
	// 						}},
	// 						SendAADLogs: to.Ptr(false),
	// 						SendResourceLogs: to.Ptr(true),
	// 						SendSubscriptionLogs: to.Ptr(true),
	// 					},
	// 					MetricRules: &armdatadog.MetricRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 						},
	// 					},
	// 				},
	// 			},
	// 			{
	// 				Status: to.Ptr(armdatadog.StatusFailed),
	// 				SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001"),
	// 				TagRules: &armdatadog.MonitoringTagRulesProperties{
	// 					Automuting: to.Ptr(true),
	// 					LogRules: &armdatadog.LogRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionInclude),
	// 								Value: to.Ptr("Prod"),
	// 							},
	// 							{
	// 								Name: to.Ptr("Environment"),
	// 								Action: to.Ptr(armdatadog.TagActionExclude),
	// 								Value: to.Ptr("Dev"),
	// 						}},
	// 						SendAADLogs: to.Ptr(false),
	// 						SendResourceLogs: to.Ptr(true),
	// 						SendSubscriptionLogs: to.Ptr(true),
	// 					},
	// 					MetricRules: &armdatadog.MetricRules{
	// 						FilteringTags: []*armdatadog.FilteringTag{
	// 						},
	// 					},
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*MonitoredSubscriptionsClient) NewListPager added in v1.2.0

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

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • 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/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.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 = armdatadog.MonitoredSubscriptionPropertiesList{
		// 	Value: []*armdatadog.MonitoredSubscriptionProperties{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.Datadog/monitors/monitoredSubscriptions"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/monitoredSubscriptions/default"),
		// 			Properties: &armdatadog.SubscriptionList{
		// 				MonitoredSubscriptionList: []*armdatadog.MonitoredSubscription{
		// 					{
		// 						Status: to.Ptr(armdatadog.StatusActive),
		// 						SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000"),
		// 						TagRules: &armdatadog.MonitoringTagRulesProperties{
		// 							Automuting: to.Ptr(true),
		// 							LogRules: &armdatadog.LogRules{
		// 								FilteringTags: []*armdatadog.FilteringTag{
		// 									{
		// 										Name: to.Ptr("Environment"),
		// 										Action: to.Ptr(armdatadog.TagActionInclude),
		// 										Value: to.Ptr("Prod"),
		// 									},
		// 									{
		// 										Name: to.Ptr("Environment"),
		// 										Action: to.Ptr(armdatadog.TagActionExclude),
		// 										Value: to.Ptr("Dev"),
		// 								}},
		// 								SendAADLogs: to.Ptr(false),
		// 								SendResourceLogs: to.Ptr(true),
		// 								SendSubscriptionLogs: to.Ptr(true),
		// 							},
		// 							MetricRules: &armdatadog.MetricRules{
		// 								FilteringTags: []*armdatadog.FilteringTag{
		// 								},
		// 							},
		// 						},
		// 					},
		// 					{
		// 						Status: to.Ptr(armdatadog.StatusFailed),
		// 						SubscriptionID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000001"),
		// 						TagRules: &armdatadog.MonitoringTagRulesProperties{
		// 							Automuting: to.Ptr(true),
		// 							LogRules: &armdatadog.LogRules{
		// 								FilteringTags: []*armdatadog.FilteringTag{
		// 									{
		// 										Name: to.Ptr("Environment"),
		// 										Action: to.Ptr(armdatadog.TagActionInclude),
		// 										Value: to.Ptr("Prod"),
		// 									},
		// 									{
		// 										Name: to.Ptr("Environment"),
		// 										Action: to.Ptr(armdatadog.TagActionExclude),
		// 										Value: to.Ptr("Dev"),
		// 								}},
		// 								SendAADLogs: to.Ptr(false),
		// 								SendResourceLogs: to.Ptr(true),
		// 								SendSubscriptionLogs: to.Ptr(true),
		// 							},
		// 							MetricRules: &armdatadog.MetricRules{
		// 								FilteringTags: []*armdatadog.FilteringTag{
		// 								},
		// 							},
		// 						},
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

type MonitoredSubscriptionsClientBeginCreateorUpdateOptions added in v1.2.0

type MonitoredSubscriptionsClientBeginCreateorUpdateOptions struct {
	Body *MonitoredSubscriptionProperties

	// 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 {
	Body *MonitoredSubscriptionProperties

	// 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 Datadog 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 Datadog 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 Datadog 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 MonitoringStatus = "Disabled"
	MonitoringStatusEnabled  MonitoringStatus = "Enabled"
)

func PossibleMonitoringStatusValues

func PossibleMonitoringStatusValues() []MonitoringStatus

PossibleMonitoringStatusValues returns the possible values for the MonitoringStatus const type.

type MonitoringTagRules

type MonitoringTagRules struct {
	// Definition of the properties for a TagRules resource.
	Properties *MonitoringTagRulesProperties

	// READ-ONLY; The id of the rule set.
	ID *string

	// READ-ONLY; Name of the rule set.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

	// READ-ONLY; The type of the rule set.
	Type *string
}

MonitoringTagRules - Capture logs and metrics of Azure resources based on ARM tags.

func (MonitoringTagRules) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MonitoringTagRules.

func (*MonitoringTagRules) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringTagRules.

type MonitoringTagRulesListResponse

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

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

MonitoringTagRulesListResponse - Response of a list operation.

func (MonitoringTagRulesListResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type MonitoringTagRulesListResponse.

func (*MonitoringTagRulesListResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringTagRulesListResponse.

type MonitoringTagRulesProperties

type MonitoringTagRulesProperties struct {
	// Configuration to enable/disable auto-muting flag
	Automuting *bool

	// 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
	ProvisioningState *ProvisioningState
}

MonitoringTagRulesProperties - Definition of the properties for a TagRules resource.

func (MonitoringTagRulesProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MonitoringTagRulesProperties.

func (*MonitoringTagRulesProperties) UnmarshalJSON added in v1.1.0

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

func (client *MonitorsClient) BeginCreate(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientBeginCreateOptions) (*runtime.Poller[MonitorsClientCreateResponse], error)

BeginCreate - Create a monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - MonitorsClientBeginCreateOptions contains the optional parameters for the MonitorsClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_Create.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitorsClient().BeginCreate(ctx, "myResourceGroup", "myMonitor", &armdatadog.MonitorsClientBeginCreateOptions{Body: 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.MonitorResource = armdatadog.MonitorResource{
	// 	Name: to.Ptr("myMonitor"),
	// 	Type: to.Ptr("Microsoft.Datadog/monitors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armdatadog.MonitorProperties{
	// 		DatadogOrganizationProperties: &armdatadog.OrganizationProperties{
	// 			Name: to.Ptr("myOrg"),
	// 			ID: to.Ptr("myOrg123"),
	// 		},
	// 		LiftrResourceCategory: to.Ptr(armdatadog.LiftrResourceCategoriesMonitorLogs),
	// 		LiftrResourcePreference: to.Ptr[int32](1),
	// 		MonitoringStatus: to.Ptr(armdatadog.MonitoringStatusEnabled),
	// 		ProvisioningState: to.Ptr(armdatadog.ProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armdatadog.ResourceSKU{
	// 		Name: to.Ptr("free_Monthly"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"Environment": to.Ptr("Dev"),
	// 	},
	// }
}
Output:

func (*MonitorsClient) BeginDelete

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

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

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - MonitorsClientBeginDeleteOptions contains the optional parameters for the MonitorsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitorsClient().BeginDelete(ctx, "myResourceGroup", "myMonitor", 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) BeginUpdate

func (client *MonitorsClient) BeginUpdate(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientBeginUpdateOptions) (*runtime.Poller[MonitorsClientUpdateResponse], error)

BeginUpdate - Update a monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - MonitorsClientBeginUpdateOptions contains the optional parameters for the MonitorsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitorsClient().BeginUpdate(ctx, "myResourceGroup", "myMonitor", &armdatadog.MonitorsClientBeginUpdateOptions{Body: 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.MonitorResource = armdatadog.MonitorResource{
	// 	Name: to.Ptr("myMonitor"),
	// 	Type: to.Ptr("Microsoft.Datadog/monitors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armdatadog.MonitorProperties{
	// 		DatadogOrganizationProperties: &armdatadog.OrganizationProperties{
	// 			Name: to.Ptr("myOrg"),
	// 			ID: to.Ptr("myOrg123"),
	// 		},
	// 		LiftrResourceCategory: to.Ptr(armdatadog.LiftrResourceCategoriesMonitorLogs),
	// 		LiftrResourcePreference: to.Ptr[int32](1),
	// 		MonitoringStatus: to.Ptr(armdatadog.MonitoringStatusEnabled),
	// 		ProvisioningState: to.Ptr(armdatadog.ProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armdatadog.ResourceSKU{
	// 		Name: to.Ptr("free_Monthly"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"Environment": to.Ptr("Dev"),
	// 	},
	// }
}
Output:

func (*MonitorsClient) Get

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

Get - Get the properties of a specific monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • 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/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().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.MonitorResource = armdatadog.MonitorResource{
	// 	Name: to.Ptr("myMonitor"),
	// 	Type: to.Ptr("Microsoft.Datadog/monitors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
	// 	Location: to.Ptr("West US"),
	// 	Properties: &armdatadog.MonitorProperties{
	// 		DatadogOrganizationProperties: &armdatadog.OrganizationProperties{
	// 			Name: to.Ptr("myOrg"),
	// 			Cspm: to.Ptr(false),
	// 			ID: to.Ptr("myOrg123"),
	// 		},
	// 		LiftrResourceCategory: to.Ptr(armdatadog.LiftrResourceCategoriesMonitorLogs),
	// 		LiftrResourcePreference: to.Ptr[int32](1),
	// 		MonitoringStatus: to.Ptr(armdatadog.MonitoringStatusEnabled),
	// 		ProvisioningState: to.Ptr(armdatadog.ProvisioningStateSucceeded),
	// 	},
	// 	Tags: map[string]*string{
	// 		"Environment": to.Ptr("Dev"),
	// 	},
	// }
}
Output:

func (*MonitorsClient) GetDefaultKey

func (client *MonitorsClient) GetDefaultKey(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientGetDefaultKeyOptions) (MonitorsClientGetDefaultKeyResponse, error)

GetDefaultKey - Get the default api key. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - MonitorsClientGetDefaultKeyOptions contains the optional parameters for the MonitorsClient.GetDefaultKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ApiKeys_GetDefaultKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().GetDefaultKey(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.APIKey = armdatadog.APIKey{
	// 	Name: to.Ptr("<API_KEY_NAME>"),
	// 	Created: to.Ptr("2019-04-05 09:20:30"),
	// 	CreatedBy: to.Ptr("john@example.com"),
	// 	Key: to.Ptr("1111111111111111aaaaaaaaaaaaaaaa"),
	// }
}
Output:

func (*MonitorsClient) NewListAPIKeysPager added in v0.4.0

func (client *MonitorsClient) NewListAPIKeysPager(resourceGroupName string, monitorName string, options *MonitorsClientListAPIKeysOptions) *runtime.Pager[MonitorsClientListAPIKeysResponse]

NewListAPIKeysPager - List the api keys for a given monitor resource.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - MonitorsClientListAPIKeysOptions contains the optional parameters for the MonitorsClient.NewListAPIKeysPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ApiKeys_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListAPIKeysPager("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.APIKeyListResponse = armdatadog.APIKeyListResponse{
		// 	Value: []*armdatadog.APIKey{
		// 		{
		// 			Name: to.Ptr("<API_KEY_NAME>"),
		// 			Created: to.Ptr("2019-04-05 09:20:30"),
		// 			CreatedBy: to.Ptr("john@example.com"),
		// 			Key: to.Ptr("1111111111111111aaaaaaaaaaaaaaaa"),
		// 		},
		// 		{
		// 			Name: to.Ptr("<API_KEY_NAME_2>"),
		// 			Created: to.Ptr("2019-04-05 09:19:53"),
		// 			CreatedBy: to.Ptr("jane@example.com"),
		// 			Key: to.Ptr("2111111111111111aaaaaaaaaaaaaaaa"),
		// 	}},
		// }
	}
}
Output:

func (*MonitorsClient) NewListByResourceGroupPager added in v0.4.0

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

NewListByResourceGroupPager - List all monitors under the specified resource group.

Generated from API version 2023-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/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListByResourceGroupPager("myResourceGroup", 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.MonitorResourceListResponse = armdatadog.MonitorResourceListResponse{
		// 	Value: []*armdatadog.MonitorResource{
		// 		{
		// 			Name: to.Ptr("myMonitor"),
		// 			Type: to.Ptr("Microsoft.Datadog/monitors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
		// 			Location: to.Ptr("West US"),
		// 			Properties: &armdatadog.MonitorProperties{
		// 				DatadogOrganizationProperties: &armdatadog.OrganizationProperties{
		// 					Name: to.Ptr("myOrg"),
		// 					ID: to.Ptr("myOrg123"),
		// 				},
		// 				LiftrResourceCategory: to.Ptr(armdatadog.LiftrResourceCategoriesMonitorLogs),
		// 				LiftrResourcePreference: to.Ptr[int32](1),
		// 				MonitoringStatus: to.Ptr(armdatadog.MonitoringStatusEnabled),
		// 				ProvisioningState: to.Ptr(armdatadog.ProvisioningStateSucceeded),
		// 			},
		// 			Tags: map[string]*string{
		// 				"Environment": to.Ptr("Dev"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*MonitorsClient) NewListHostsPager added in v0.4.0

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

NewListHostsPager - List the hosts for a given monitor resource.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - MonitorsClientListHostsOptions contains the optional parameters for the MonitorsClient.NewListHostsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Hosts_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListHostsPager("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.HostListResponse = armdatadog.HostListResponse{
		// 	Value: []*armdatadog.Host{
		// 		{
		// 			Name: to.Ptr("vm1"),
		// 			Aliases: []*string{
		// 				to.Ptr("vm1"),
		// 				to.Ptr("65f2dd83-95ae-4f56-b6aa-a5dafc05f4cd")},
		// 				Apps: []*string{
		// 					to.Ptr("ntp"),
		// 					to.Ptr("agent")},
		// 					Meta: &armdatadog.HostMetadata{
		// 						AgentVersion: to.Ptr("7.19.2"),
		// 						InstallMethod: &armdatadog.InstallMethod{
		// 							InstallerVersion: to.Ptr("install_script-1.0.0"),
		// 							Tool: to.Ptr("install_script"),
		// 							ToolVersion: to.Ptr("install_script"),
		// 						},
		// 						LogsAgent: &armdatadog.LogsAgent{
		// 							Transport: to.Ptr(""),
		// 						},
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("vm2"),
		// 					Aliases: []*string{
		// 						to.Ptr("vm2"),
		// 						to.Ptr("df631d9a-8178-4580-bf60-c697a5e8df4d")},
		// 						Apps: []*string{
		// 							to.Ptr("infra"),
		// 							to.Ptr("agent")},
		// 							Meta: &armdatadog.HostMetadata{
		// 								AgentVersion: to.Ptr("7.18.1"),
		// 								InstallMethod: &armdatadog.InstallMethod{
		// 									InstallerVersion: to.Ptr("install_script-1.0.0"),
		// 									Tool: to.Ptr("install_script"),
		// 									ToolVersion: to.Ptr("install_script"),
		// 								},
		// 								LogsAgent: &armdatadog.LogsAgent{
		// 									Transport: to.Ptr("HTTP"),
		// 								},
		// 							},
		// 					}},
		// 				}
	}
}
Output:

func (*MonitorsClient) NewListLinkedResourcesPager added in v0.4.0

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

NewListLinkedResourcesPager - List all Azure resources associated to the same Datadog organization as the target resource.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • 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/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.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 = armdatadog.LinkedResourceListResponse{
		// 	Value: []*armdatadog.LinkedResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor"),
		// 	}},
		// }
	}
}
Output:

func (*MonitorsClient) NewListMonitoredResourcesPager added in v0.4.0

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

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

Generated from API version 2023-01-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredResources_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().NewListMonitoredResourcesPager("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.MonitoredResourceListResponse = armdatadog.MonitoredResourceListResponse{
		// 	Value: []*armdatadog.MonitoredResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVault"),
		// 			ReasonForLogsStatus: to.Ptr("CapturedByRules"),
		// 			ReasonForMetricsStatus: to.Ptr("CapturedByRules"),
		// 			SendingLogs: to.Ptr(true),
		// 			SendingMetrics: to.Ptr(true),
		// 	}},
		// }
	}
}
Output:

func (*MonitorsClient) NewListPager added in v0.4.0

NewListPager - List all monitors under the specified subscription.

Generated from API version 2023-01-01

  • options - MonitorsClientListOptions contains the optional parameters for the MonitorsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewMonitorsClient().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.MonitorResourceListResponse = armdatadog.MonitorResourceListResponse{
		// 	Value: []*armdatadog.MonitorResource{
		// 		{
		// 			Name: to.Ptr("myMonitor"),
		// 			Type: to.Ptr("Microsoft.Datadog/monitors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
		// 			Location: to.Ptr("West US"),
		// 			Properties: &armdatadog.MonitorProperties{
		// 				DatadogOrganizationProperties: &armdatadog.OrganizationProperties{
		// 					Name: to.Ptr("myOrg"),
		// 					Cspm: to.Ptr(false),
		// 					ID: to.Ptr("myOrg123"),
		// 				},
		// 				LiftrResourceCategory: to.Ptr(armdatadog.LiftrResourceCategoriesMonitorLogs),
		// 				LiftrResourcePreference: to.Ptr[int32](1),
		// 				MonitoringStatus: to.Ptr(armdatadog.MonitoringStatusEnabled),
		// 				ProvisioningState: to.Ptr(armdatadog.ProvisioningStateSucceeded),
		// 			},
		// 			Tags: map[string]*string{
		// 				"Environment": to.Ptr("Dev"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (client *MonitorsClient) RefreshSetPasswordLink(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientRefreshSetPasswordLinkOptions) (MonitorsClientRefreshSetPasswordLinkResponse, error)

RefreshSetPasswordLink - Refresh the set password link and return a latest one. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - MonitorsClientRefreshSetPasswordLinkOptions contains the optional parameters for the MonitorsClient.RefreshSetPasswordLink method.

func (*MonitorsClient) SetDefaultKey

func (client *MonitorsClient) SetDefaultKey(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientSetDefaultKeyOptions) (MonitorsClientSetDefaultKeyResponse, error)

SetDefaultKey - Set the default api key. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - MonitorsClientSetDefaultKeyOptions contains the optional parameters for the MonitorsClient.SetDefaultKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ApiKeys_SetDefaultKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewMonitorsClient().SetDefaultKey(ctx, "myResourceGroup", "myMonitor", &armdatadog.MonitorsClientSetDefaultKeyOptions{Body: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type MonitorsClientBeginCreateOptions added in v0.2.0

type MonitorsClientBeginCreateOptions struct {
	Body *MonitorResource

	// Resumes the LRO from the provided token.
	ResumeToken string
}

MonitorsClientBeginCreateOptions contains the optional parameters for the MonitorsClient.BeginCreate method.

type MonitorsClientBeginDeleteOptions added in v0.2.0

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

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

type MonitorsClientBeginUpdateOptions added in v0.2.0

type MonitorsClientBeginUpdateOptions struct {
	Body *MonitorResourceUpdateParameters

	// Resumes the LRO from the provided token.
	ResumeToken string
}

MonitorsClientBeginUpdateOptions contains the optional parameters for the MonitorsClient.BeginUpdate method.

type MonitorsClientCreateResponse added in v0.2.0

type MonitorsClientCreateResponse struct {
	MonitorResource
}

MonitorsClientCreateResponse contains the response from method MonitorsClient.BeginCreate.

type MonitorsClientDeleteResponse added in v0.2.0

type MonitorsClientDeleteResponse struct {
}

MonitorsClientDeleteResponse contains the response from method MonitorsClient.BeginDelete.

type MonitorsClientGetDefaultKeyOptions added in v0.2.0

type MonitorsClientGetDefaultKeyOptions struct {
}

MonitorsClientGetDefaultKeyOptions contains the optional parameters for the MonitorsClient.GetDefaultKey method.

type MonitorsClientGetDefaultKeyResponse added in v0.2.0

type MonitorsClientGetDefaultKeyResponse struct {
	APIKey
}

MonitorsClientGetDefaultKeyResponse contains the response from method MonitorsClient.GetDefaultKey.

type MonitorsClientGetOptions added in v0.2.0

type MonitorsClientGetOptions struct {
}

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

type MonitorsClientGetResponse added in v0.2.0

type MonitorsClientGetResponse struct {
	MonitorResource
}

MonitorsClientGetResponse contains the response from method MonitorsClient.Get.

type MonitorsClientListAPIKeysOptions added in v0.2.0

type MonitorsClientListAPIKeysOptions struct {
}

MonitorsClientListAPIKeysOptions contains the optional parameters for the MonitorsClient.NewListAPIKeysPager method.

type MonitorsClientListAPIKeysResponse added in v0.2.0

type MonitorsClientListAPIKeysResponse struct {
	// Response of a list operation.
	APIKeyListResponse
}

MonitorsClientListAPIKeysResponse contains the response from method MonitorsClient.NewListAPIKeysPager.

type MonitorsClientListByResourceGroupOptions added in v0.2.0

type MonitorsClientListByResourceGroupOptions struct {
}

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

type MonitorsClientListByResourceGroupResponse added in v0.2.0

type MonitorsClientListByResourceGroupResponse struct {
	// Response of a list operation.
	MonitorResourceListResponse
}

MonitorsClientListByResourceGroupResponse contains the response from method MonitorsClient.NewListByResourceGroupPager.

type MonitorsClientListHostsOptions added in v0.2.0

type MonitorsClientListHostsOptions struct {
}

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

type MonitorsClientListHostsResponse added in v0.2.0

type MonitorsClientListHostsResponse struct {
	// Response of a list operation.
	HostListResponse
}

MonitorsClientListHostsResponse contains the response from method MonitorsClient.NewListHostsPager.

type MonitorsClientListLinkedResourcesOptions added in v0.2.0

type MonitorsClientListLinkedResourcesOptions struct {
}

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

type MonitorsClientListLinkedResourcesResponse added in v0.2.0

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

MonitorsClientListLinkedResourcesResponse contains the response from method MonitorsClient.NewListLinkedResourcesPager.

type MonitorsClientListMonitoredResourcesOptions added in v0.2.0

type MonitorsClientListMonitoredResourcesOptions struct {
}

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

type MonitorsClientListMonitoredResourcesResponse added in v0.2.0

type MonitorsClientListMonitoredResourcesResponse struct {
	// Response of a list operation.
	MonitoredResourceListResponse
}

MonitorsClientListMonitoredResourcesResponse contains the response from method MonitorsClient.NewListMonitoredResourcesPager.

type MonitorsClientListOptions added in v0.2.0

type MonitorsClientListOptions struct {
}

MonitorsClientListOptions contains the optional parameters for the MonitorsClient.NewListPager method.

type MonitorsClientListResponse added in v0.2.0

type MonitorsClientListResponse struct {
	// Response of a list operation.
	MonitorResourceListResponse
}

MonitorsClientListResponse contains the response from method MonitorsClient.NewListPager.

type MonitorsClientRefreshSetPasswordLinkOptions added in v0.2.0

type MonitorsClientRefreshSetPasswordLinkOptions struct {
}

MonitorsClientRefreshSetPasswordLinkOptions contains the optional parameters for the MonitorsClient.RefreshSetPasswordLink method.

type MonitorsClientRefreshSetPasswordLinkResponse added in v0.2.0

type MonitorsClientRefreshSetPasswordLinkResponse struct {
	SetPasswordLink
}

MonitorsClientRefreshSetPasswordLinkResponse contains the response from method MonitorsClient.RefreshSetPasswordLink.

type MonitorsClientSetDefaultKeyOptions added in v0.2.0

type MonitorsClientSetDefaultKeyOptions struct {
	Body *APIKey
}

MonitorsClientSetDefaultKeyOptions contains the optional parameters for the MonitorsClient.SetDefaultKey method.

type MonitorsClientSetDefaultKeyResponse added in v0.2.0

type MonitorsClientSetDefaultKeyResponse struct {
}

MonitorsClientSetDefaultKeyResponse contains the response from method MonitorsClient.SetDefaultKey.

type MonitorsClientUpdateResponse added in v0.2.0

type MonitorsClientUpdateResponse struct {
	MonitorResource
}

MonitorsClientUpdateResponse contains the response from method MonitorsClient.BeginUpdate.

type Operation added in v1.2.0

type Operation string

Operation - The operation for the patch on the resource.

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

func PossibleOperationValues added in v1.2.0

func PossibleOperationValues() []Operation

PossibleOperationValues returns the possible values for the Operation const type.

type OperationDisplay

type OperationDisplay struct {
	// Description of the operation, e.g., 'Write monitors'.
	Description *string

	// Operation type, e.g., read, write, delete, etc.
	Operation *string

	// Service provider, i.e., Microsoft.Datadog.
	Provider *string

	// Type on which the operation is performed, e.g., 'monitors'.
	Resource *string
}

OperationDisplay - The object that represents the operation.

func (OperationDisplay) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// URL to get the next set of operation list results if there are any.
	NextLink *string

	// List of operations supported by the Microsoft.Datadog provider.
	Value []*OperationResult
}

OperationListResult - Result of GET request to list the Microsoft.Datadog operations.

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationResult

type OperationResult struct {
	// The object that represents the operation.
	Display *OperationDisplay

	// Indicates whether the operation is a data action
	IsDataAction *bool

	// Operation name, i.e., {provider}/{resource}/{operation}.
	Name *string
}

OperationResult - A Microsoft.Datadog REST API operation.

func (OperationResult) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationResult.

func (*OperationResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResult.

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 added in v0.4.0

NewListPager - List all operations provided by Microsoft.Datadog for the 2023-01-01 api version.

Generated from API version 2023-01-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Operations_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.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 = armdatadog.OperationListResult{
		// 	Value: []*armdatadog.OperationResult{
		// 		{
		// 			Name: to.Ptr("Microsoft.Datadog/monitors/write"),
		// 			Display: &armdatadog.OperationDisplay{
		// 				Description: to.Ptr("Write monitors resource"),
		// 				Operation: to.Ptr("write"),
		// 				Provider: to.Ptr("Microsoft.Datadog"),
		// 				Resource: to.Ptr("monitors"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	// Result of GET request to list the Microsoft.Datadog operations.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OrganizationProperties added in v0.2.0

type OrganizationProperties struct {
	// Api key associated to the Datadog organization.
	APIKey *string

	// Application key associated to the Datadog organization.
	ApplicationKey *string

	// The configuration which describes the state of cloud security posture management. This collects configuration information
	// for all resources in a subscription and track conformance to industry
	// benchmarks.
	Cspm *bool

	// The Id of the Enterprise App used for Single sign on.
	EnterpriseAppID *string

	// Id of the Datadog organization.
	ID *string

	// The auth code used to linking to an existing Datadog organization.
	LinkingAuthCode *string

	// The client_id from an existing in exchange for an auth token to link organization.
	LinkingClientID *string

	// Name of the Datadog organization.
	Name *string

	// The redirect URI for linking.
	RedirectURI *string
}

OrganizationProperties - Specify the Datadog organization name. In the case of linking to existing organizations, Id, ApiKey, and Applicationkey is required as well.

func (OrganizationProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OrganizationProperties.

func (*OrganizationProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationProperties.

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreating     ProvisioningState = "Creating"
	ProvisioningStateDeleted      ProvisioningState = "Deleted"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateNotSpecified ProvisioningState = "NotSpecified"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ResourceSKU

type ResourceSKU struct {
	// REQUIRED; Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'linking'.
	Name *string
}

func (ResourceSKU) MarshalJSON added in v1.1.0

func (r ResourceSKU) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceSKU.

func (*ResourceSKU) UnmarshalJSON added in v1.1.0

func (r *ResourceSKU) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.

type SetPasswordLink struct {
	SetPasswordLink *string
}

func (SetPasswordLink) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SetPasswordLink.

func (*SetPasswordLink) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SetPasswordLink.

type SingleSignOnConfigurationsClient

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

SingleSignOnConfigurationsClient contains the methods for the SingleSignOnConfigurations group. Don't use this type directly, use NewSingleSignOnConfigurationsClient() instead.

func NewSingleSignOnConfigurationsClient

func NewSingleSignOnConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SingleSignOnConfigurationsClient, error)

NewSingleSignOnConfigurationsClient creates a new instance of SingleSignOnConfigurationsClient 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 (*SingleSignOnConfigurationsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Configures single-sign-on for this resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • configurationName - Configuration name
  • options - SingleSignOnConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the SingleSignOnConfigurationsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/SingleSignOnConfigurations_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewSingleSignOnConfigurationsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myMonitor", "default", &armdatadog.SingleSignOnConfigurationsClientBeginCreateOrUpdateOptions{Body: 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.SingleSignOnResource = armdatadog.SingleSignOnResource{
	// 	Name: to.Ptr("default"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/singleSignOnConfigurations/default"),
	// 	Properties: &armdatadog.SingleSignOnProperties{
	// 		EnterpriseAppID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		SingleSignOnState: to.Ptr(armdatadog.SingleSignOnStatesEnable),
	// 	},
	// }
}
Output:

func (*SingleSignOnConfigurationsClient) Get

Get - Gets the datadog single sign-on resource for the given Monitor. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • configurationName - Configuration name
  • options - SingleSignOnConfigurationsClientGetOptions contains the optional parameters for the SingleSignOnConfigurationsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/SingleSignOnConfigurations_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSingleSignOnConfigurationsClient().Get(ctx, "myResourceGroup", "myMonitor", "default", 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.SingleSignOnResource = armdatadog.SingleSignOnResource{
	// 	Name: to.Ptr("default"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/singleSignOnConfigurations/default"),
	// 	Properties: &armdatadog.SingleSignOnProperties{
	// 		EnterpriseAppID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 		SingleSignOnState: to.Ptr(armdatadog.SingleSignOnStatesEnable),
	// 		SingleSignOnURL: to.Ptr("https://www.datadoghq.com/IAmSomeHash"),
	// 	},
	// }
}
Output:

func (*SingleSignOnConfigurationsClient) NewListPager added in v0.4.0

NewListPager - List the single sign-on configurations for a given monitor resource.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - SingleSignOnConfigurationsClientListOptions contains the optional parameters for the SingleSignOnConfigurationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/SingleSignOnConfigurations_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewSingleSignOnConfigurationsClient().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.SingleSignOnResourceListResponse = armdatadog.SingleSignOnResourceListResponse{
		// 	Value: []*armdatadog.SingleSignOnResource{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/singleSignOnConfigurations/default"),
		// 			Properties: &armdatadog.SingleSignOnProperties{
		// 				EnterpriseAppID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				SingleSignOnState: to.Ptr(armdatadog.SingleSignOnStatesEnable),
		// 				SingleSignOnURL: to.Ptr("https://www.datadoghq.com/IAmSomeHash"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type SingleSignOnConfigurationsClientBeginCreateOrUpdateOptions added in v0.2.0

type SingleSignOnConfigurationsClientBeginCreateOrUpdateOptions struct {
	Body *SingleSignOnResource

	// Resumes the LRO from the provided token.
	ResumeToken string
}

SingleSignOnConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the SingleSignOnConfigurationsClient.BeginCreateOrUpdate method.

type SingleSignOnConfigurationsClientCreateOrUpdateResponse added in v0.2.0

type SingleSignOnConfigurationsClientCreateOrUpdateResponse struct {
	SingleSignOnResource
}

SingleSignOnConfigurationsClientCreateOrUpdateResponse contains the response from method SingleSignOnConfigurationsClient.BeginCreateOrUpdate.

type SingleSignOnConfigurationsClientGetOptions added in v0.2.0

type SingleSignOnConfigurationsClientGetOptions struct {
}

SingleSignOnConfigurationsClientGetOptions contains the optional parameters for the SingleSignOnConfigurationsClient.Get method.

type SingleSignOnConfigurationsClientGetResponse added in v0.2.0

type SingleSignOnConfigurationsClientGetResponse struct {
	SingleSignOnResource
}

SingleSignOnConfigurationsClientGetResponse contains the response from method SingleSignOnConfigurationsClient.Get.

type SingleSignOnConfigurationsClientListOptions added in v0.2.0

type SingleSignOnConfigurationsClientListOptions struct {
}

SingleSignOnConfigurationsClientListOptions contains the optional parameters for the SingleSignOnConfigurationsClient.NewListPager method.

type SingleSignOnConfigurationsClientListResponse added in v0.2.0

type SingleSignOnConfigurationsClientListResponse struct {
	// Response of a list operation.
	SingleSignOnResourceListResponse
}

SingleSignOnConfigurationsClientListResponse contains the response from method SingleSignOnConfigurationsClient.NewListPager.

type SingleSignOnProperties added in v0.2.0

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

	// Various states of the SSO resource
	SingleSignOnState *SingleSignOnStates

	// READ-ONLY
	ProvisioningState *ProvisioningState

	// READ-ONLY; The login URL specific to this Datadog Organization.
	SingleSignOnURL *string
}

func (SingleSignOnProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SingleSignOnProperties.

func (*SingleSignOnProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SingleSignOnProperties.

type SingleSignOnResource added in v0.2.0

type SingleSignOnResource struct {
	Properties *SingleSignOnProperties

	// READ-ONLY; ARM id of the resource.
	ID *string

	// READ-ONLY; Name of the configuration.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource.
	SystemData *SystemData

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

func (SingleSignOnResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SingleSignOnResource.

func (*SingleSignOnResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SingleSignOnResource.

type SingleSignOnResourceListResponse added in v0.2.0

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

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

SingleSignOnResourceListResponse - Response of a list operation.

func (SingleSignOnResourceListResponse) MarshalJSON added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type SingleSignOnResourceListResponse.

func (*SingleSignOnResourceListResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SingleSignOnResourceListResponse.

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.
	Operation *Operation
}

SubscriptionList - The request to update subscriptions needed to be monitored by the Datadog 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 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 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) CreateOrUpdate

func (client *TagRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, ruleSetName string, options *TagRulesClientCreateOrUpdateOptions) (TagRulesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create or update a tag rule set for a given monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • ruleSetName - Rule set name
  • options - TagRulesClientCreateOrUpdateOptions contains the optional parameters for the TagRulesClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/TagRules_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTagRulesClient().CreateOrUpdate(ctx, "myResourceGroup", "myMonitor", "default", &armdatadog.TagRulesClientCreateOrUpdateOptions{Body: 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.MonitoringTagRules = armdatadog.MonitoringTagRules{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Datadog/monitors/tagRules"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/tagRules/default"),
	// 	Properties: &armdatadog.MonitoringTagRulesProperties{
	// 		Automuting: to.Ptr(true),
	// 		LogRules: &armdatadog.LogRules{
	// 			FilteringTags: []*armdatadog.FilteringTag{
	// 				{
	// 					Name: to.Ptr("Environment"),
	// 					Action: to.Ptr(armdatadog.TagActionInclude),
	// 					Value: to.Ptr("Prod"),
	// 				},
	// 				{
	// 					Name: to.Ptr("Environment"),
	// 					Action: to.Ptr(armdatadog.TagActionExclude),
	// 					Value: to.Ptr("Dev"),
	// 			}},
	// 			SendAADLogs: to.Ptr(false),
	// 			SendResourceLogs: to.Ptr(true),
	// 			SendSubscriptionLogs: to.Ptr(true),
	// 		},
	// 		MetricRules: &armdatadog.MetricRules{
	// 			FilteringTags: []*armdatadog.FilteringTag{
	// 			},
	// 		},
	// 	},
	// }
}
Output:

func (*TagRulesClient) Get

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

Get - Get a tag rule set for a given monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • ruleSetName - Rule set name
  • options - TagRulesClientGetOptions contains the optional parameters for the TagRulesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/TagRules_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTagRulesClient().Get(ctx, "myResourceGroup", "myMonitor", "default", 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.MonitoringTagRules = armdatadog.MonitoringTagRules{
	// 	Name: to.Ptr("default"),
	// 	Type: to.Ptr("Microsoft.Datadog/monitors/tagRules"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/tagRules/default"),
	// 	Properties: &armdatadog.MonitoringTagRulesProperties{
	// 		Automuting: to.Ptr(true),
	// 		LogRules: &armdatadog.LogRules{
	// 			FilteringTags: []*armdatadog.FilteringTag{
	// 				{
	// 					Name: to.Ptr("Environment"),
	// 					Action: to.Ptr(armdatadog.TagActionInclude),
	// 					Value: to.Ptr("Prod"),
	// 				},
	// 				{
	// 					Name: to.Ptr("Environment"),
	// 					Action: to.Ptr(armdatadog.TagActionExclude),
	// 					Value: to.Ptr("Dev"),
	// 			}},
	// 			SendAADLogs: to.Ptr(false),
	// 			SendResourceLogs: to.Ptr(true),
	// 			SendSubscriptionLogs: to.Ptr(true),
	// 		},
	// 		MetricRules: &armdatadog.MetricRules{
	// 			FilteringTags: []*armdatadog.FilteringTag{
	// 			},
	// 		},
	// 	},
	// }
}
Output:

func (*TagRulesClient) NewListPager added in v0.4.0

func (client *TagRulesClient) NewListPager(resourceGroupName string, monitorName string, options *TagRulesClientListOptions) *runtime.Pager[TagRulesClientListResponse]

NewListPager - List the tag rules for a given monitor resource.

Generated from API version 2023-01-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • monitorName - Monitor resource name
  • options - TagRulesClientListOptions contains the optional parameters for the TagRulesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c280892951a9e45c059132c05aace25a9c752d48/specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/TagRules_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/datadog/armdatadog"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatadog.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTagRulesClient().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.MonitoringTagRulesListResponse = armdatadog.MonitoringTagRulesListResponse{
		// 	Value: []*armdatadog.MonitoringTagRules{
		// 		{
		// 			Name: to.Ptr("default"),
		// 			Type: to.Ptr("Microsoft.Datadog/monitors/tagRules"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Datadog/monitors/myMonitor/tagRules/default"),
		// 			Properties: &armdatadog.MonitoringTagRulesProperties{
		// 				Automuting: to.Ptr(true),
		// 				LogRules: &armdatadog.LogRules{
		// 					FilteringTags: []*armdatadog.FilteringTag{
		// 						{
		// 							Name: to.Ptr("Environment"),
		// 							Action: to.Ptr(armdatadog.TagActionInclude),
		// 							Value: to.Ptr("Prod"),
		// 						},
		// 						{
		// 							Name: to.Ptr("Environment"),
		// 							Action: to.Ptr(armdatadog.TagActionExclude),
		// 							Value: to.Ptr("Dev"),
		// 					}},
		// 					SendAADLogs: to.Ptr(false),
		// 					SendResourceLogs: to.Ptr(true),
		// 					SendSubscriptionLogs: to.Ptr(true),
		// 				},
		// 				MetricRules: &armdatadog.MetricRules{
		// 					FilteringTags: []*armdatadog.FilteringTag{
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type TagRulesClientCreateOrUpdateOptions added in v0.2.0

type TagRulesClientCreateOrUpdateOptions struct {
	Body *MonitoringTagRules
}

TagRulesClientCreateOrUpdateOptions contains the optional parameters for the TagRulesClient.CreateOrUpdate method.

type TagRulesClientCreateOrUpdateResponse added in v0.2.0

type TagRulesClientCreateOrUpdateResponse struct {
	// Capture logs and metrics of Azure resources based on ARM tags.
	MonitoringTagRules
}

TagRulesClientCreateOrUpdateResponse contains the response from method TagRulesClient.CreateOrUpdate.

type TagRulesClientGetOptions added in v0.2.0

type TagRulesClientGetOptions struct {
}

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

type TagRulesClientGetResponse added in v0.2.0

type TagRulesClientGetResponse struct {
	// Capture logs and metrics of Azure resources based on ARM tags.
	MonitoringTagRules
}

TagRulesClientGetResponse contains the response from method TagRulesClient.Get.

type TagRulesClientListOptions added in v0.2.0

type TagRulesClientListOptions struct {
}

TagRulesClientListOptions contains the optional parameters for the TagRulesClient.NewListPager method.

type TagRulesClientListResponse added in v0.2.0

type TagRulesClientListResponse struct {
	// Response of a list operation.
	MonitoringTagRulesListResponse
}

TagRulesClientListResponse contains the response from method TagRulesClient.NewListPager.

type UserInfo

type UserInfo struct {
	// Email of the user used by Datadog for contacting them if needed
	EmailAddress *string

	// Name of the user
	Name *string

	// Phone number of the user used by Datadog for contacting them if needed
	PhoneNumber *string
}

UserInfo - Includes name, email and optionally, phone number. User Information can't be null.

func (UserInfo) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type UserInfo.

func (*UserInfo) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserInfo.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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