armelastic

package module
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 14 Imported by: 5

README

Azure Elastic Module for Go

PkgGoDev

The armelastic module provides operations for working with Azure Elastic.

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

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elastic/armelastic

Authorization

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

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 Elastic 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 AllTrafficFiltersClient added in v0.6.0

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

AllTrafficFiltersClient contains the methods for the AllTrafficFilters group. Don't use this type directly, use NewAllTrafficFiltersClient() instead.

func NewAllTrafficFiltersClient added in v0.6.0

func NewAllTrafficFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AllTrafficFiltersClient, error)

NewAllTrafficFiltersClient creates a new instance of AllTrafficFiltersClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AllTrafficFiltersClient) List added in v0.6.0

List - Get the list of all traffic filters for the account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - AllTrafficFiltersClientListOptions contains the optional parameters for the AllTrafficFiltersClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AllTrafficFilters_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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAllTrafficFiltersClient().List(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.TrafficFilterResponse = armelastic.TrafficFilterResponse{
	// 	Rulesets: []*armelastic.TrafficFilter{
	// 		{
	// 			Name: to.Ptr("IPFromApi"),
	// 			Type: to.Ptr(armelastic.TypeIP),
	// 			Description: to.Ptr("created from azure"),
	// 			ID: to.Ptr("31d91b5afb6f4c2eaaf104c97b1991dd"),
	// 			IncludeByDefault: to.Ptr(false),
	// 			Region: to.Ptr("azure-eastus"),
	// 			Rules: []*armelastic.TrafficFilterRule{
	// 				{
	// 					Description: to.Ptr("Allow inbound traffic from IP address 192.168.131.0"),
	// 					ID: to.Ptr("f0297dad72af4a5e964cddf817f35e65"),
	// 					Source: to.Ptr("192.168.131.0"),
	// 				},
	// 				{
	// 					Description: to.Ptr("Allow inbound traffic from IP address block 192.168.132.6/22"),
	// 					ID: to.Ptr("f9c00169f0e54931ae72aabde326b589"),
	// 					Source: to.Ptr("192.168.132.6/22"),
	// 			}},
	// 	}},
	// }
}
Output:

type AllTrafficFiltersClientListOptions added in v0.6.0

type AllTrafficFiltersClientListOptions struct {
}

AllTrafficFiltersClientListOptions contains the optional parameters for the AllTrafficFiltersClient.List method.

type AllTrafficFiltersClientListResponse added in v0.6.0

type AllTrafficFiltersClientListResponse struct {
	// List of elastic traffic filters in the account
	TrafficFilterResponse
}

AllTrafficFiltersClientListResponse contains the response from method AllTrafficFiltersClient.List.

type AssociateTrafficFilterClient added in v0.6.0

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

AssociateTrafficFilterClient contains the methods for the AssociateTrafficFilter group. Don't use this type directly, use NewAssociateTrafficFilterClient() instead.

func NewAssociateTrafficFilterClient added in v0.6.0

func NewAssociateTrafficFilterClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssociateTrafficFilterClient, error)

NewAssociateTrafficFilterClient creates a new instance of AssociateTrafficFilterClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssociateTrafficFilterClient) BeginAssociate added in v0.6.0

BeginAssociate - Associate traffic filter for the given deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - AssociateTrafficFilterClientBeginAssociateOptions contains the optional parameters for the AssociateTrafficFilterClient.BeginAssociate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AssociateTrafficFilter_Update.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAssociateTrafficFilterClient().BeginAssociate(ctx, "myResourceGroup", "myMonitor", &armelastic.AssociateTrafficFilterClientBeginAssociateOptions{RulesetID: to.Ptr("31d91b5afb6f4c2eaaf104c97b1991dd")})
	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:

type AssociateTrafficFilterClientAssociateResponse added in v0.6.0

type AssociateTrafficFilterClientAssociateResponse struct {
}

AssociateTrafficFilterClientAssociateResponse contains the response from method AssociateTrafficFilterClient.BeginAssociate.

type AssociateTrafficFilterClientBeginAssociateOptions added in v0.6.0

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

	// Ruleset Id of the filter
	RulesetID *string
}

AssociateTrafficFilterClientBeginAssociateOptions contains the optional parameters for the AssociateTrafficFilterClient.BeginAssociate method.

type ClientFactory added in v0.7.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 v0.7.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 Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAllTrafficFiltersClient added in v0.7.0

func (c *ClientFactory) NewAllTrafficFiltersClient() *AllTrafficFiltersClient

NewAllTrafficFiltersClient creates a new instance of AllTrafficFiltersClient.

func (*ClientFactory) NewAssociateTrafficFilterClient added in v0.7.0

func (c *ClientFactory) NewAssociateTrafficFilterClient() *AssociateTrafficFilterClient

NewAssociateTrafficFilterClient creates a new instance of AssociateTrafficFilterClient.

func (*ClientFactory) NewCreateAndAssociateIPFilterClient added in v0.7.0

func (c *ClientFactory) NewCreateAndAssociateIPFilterClient() *CreateAndAssociateIPFilterClient

NewCreateAndAssociateIPFilterClient creates a new instance of CreateAndAssociateIPFilterClient.

func (*ClientFactory) NewCreateAndAssociatePLFilterClient added in v0.7.0

func (c *ClientFactory) NewCreateAndAssociatePLFilterClient() *CreateAndAssociatePLFilterClient

NewCreateAndAssociatePLFilterClient creates a new instance of CreateAndAssociatePLFilterClient.

func (*ClientFactory) NewDeploymentInfoClient added in v0.7.0

func (c *ClientFactory) NewDeploymentInfoClient() *DeploymentInfoClient

NewDeploymentInfoClient creates a new instance of DeploymentInfoClient.

func (*ClientFactory) NewDetachAndDeleteTrafficFilterClient added in v0.7.0

func (c *ClientFactory) NewDetachAndDeleteTrafficFilterClient() *DetachAndDeleteTrafficFilterClient

NewDetachAndDeleteTrafficFilterClient creates a new instance of DetachAndDeleteTrafficFilterClient.

func (*ClientFactory) NewDetachTrafficFilterClient added in v0.7.0

func (c *ClientFactory) NewDetachTrafficFilterClient() *DetachTrafficFilterClient

NewDetachTrafficFilterClient creates a new instance of DetachTrafficFilterClient.

func (*ClientFactory) NewExternalUserClient added in v0.7.0

func (c *ClientFactory) NewExternalUserClient() *ExternalUserClient

NewExternalUserClient creates a new instance of ExternalUserClient.

func (*ClientFactory) NewListAssociatedTrafficFiltersClient added in v0.7.0

func (c *ClientFactory) NewListAssociatedTrafficFiltersClient() *ListAssociatedTrafficFiltersClient

NewListAssociatedTrafficFiltersClient creates a new instance of ListAssociatedTrafficFiltersClient.

func (*ClientFactory) NewMonitorClient added in v0.7.0

func (c *ClientFactory) NewMonitorClient() *MonitorClient

NewMonitorClient creates a new instance of MonitorClient.

func (*ClientFactory) NewMonitoredResourcesClient added in v0.7.0

func (c *ClientFactory) NewMonitoredResourcesClient() *MonitoredResourcesClient

NewMonitoredResourcesClient creates a new instance of MonitoredResourcesClient.

func (*ClientFactory) NewMonitorsClient added in v0.7.0

func (c *ClientFactory) NewMonitorsClient() *MonitorsClient

NewMonitorsClient creates a new instance of MonitorsClient.

func (*ClientFactory) NewOperationsClient added in v0.7.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewOrganizationsClient added in v0.8.0

func (c *ClientFactory) NewOrganizationsClient() *OrganizationsClient

NewOrganizationsClient creates a new instance of OrganizationsClient.

func (*ClientFactory) NewTagRulesClient added in v0.7.0

func (c *ClientFactory) NewTagRulesClient() *TagRulesClient

NewTagRulesClient creates a new instance of TagRulesClient.

func (*ClientFactory) NewTrafficFiltersClient added in v0.7.0

func (c *ClientFactory) NewTrafficFiltersClient() *TrafficFiltersClient

NewTrafficFiltersClient creates a new instance of TrafficFiltersClient.

func (*ClientFactory) NewUpgradableVersionsClient added in v0.7.0

func (c *ClientFactory) NewUpgradableVersionsClient() *UpgradableVersionsClient

NewUpgradableVersionsClient creates a new instance of UpgradableVersionsClient.

func (*ClientFactory) NewVMCollectionClient added in v0.7.0

func (c *ClientFactory) NewVMCollectionClient() *VMCollectionClient

NewVMCollectionClient creates a new instance of VMCollectionClient.

func (*ClientFactory) NewVMHostClient added in v0.7.0

func (c *ClientFactory) NewVMHostClient() *VMHostClient

NewVMHostClient creates a new instance of VMHostClient.

func (*ClientFactory) NewVMIngestionClient added in v0.7.0

func (c *ClientFactory) NewVMIngestionClient() *VMIngestionClient

NewVMIngestionClient creates a new instance of VMIngestionClient.

func (*ClientFactory) NewVersionsClient added in v0.9.0

func (c *ClientFactory) NewVersionsClient() *VersionsClient

NewVersionsClient creates a new instance of VersionsClient.

type CloudDeployment added in v0.2.0

type CloudDeployment struct {
	// READ-ONLY; Associated Azure subscription Id for the elastic deployment.
	AzureSubscriptionID *string

	// READ-ONLY; Elastic deployment Id
	DeploymentID *string

	// READ-ONLY; Region where Deployment at Elastic side took place.
	ElasticsearchRegion *string

	// READ-ONLY; Elasticsearch ingestion endpoint of the Elastic deployment.
	ElasticsearchServiceURL *string

	// READ-ONLY; Kibana endpoint of the Elastic deployment.
	KibanaServiceURL *string

	// READ-ONLY; Kibana dashboard sso URL of the Elastic deployment.
	KibanaSsoURL *string

	// READ-ONLY; Elastic deployment name
	Name *string
}

CloudDeployment - Details of the user's elastic deployment associated with the monitor resource.

func (CloudDeployment) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type CloudDeployment.

func (*CloudDeployment) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudDeployment.

type CloudUser added in v0.2.0

type CloudUser struct {
	// READ-ONLY; Elastic cloud default dashboard sso URL of the Elastic user account.
	ElasticCloudSsoDefaultURL *string

	// READ-ONLY; Email of the Elastic User Account.
	EmailAddress *string

	// READ-ONLY; User Id of the elastic account of the User.
	ID *string
}

CloudUser - Details of the user's elastic account.

func (CloudUser) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type CloudUser.

func (*CloudUser) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudUser.

type CompanyInfo

type CompanyInfo struct {
	// Business of the company
	Business *string

	// Country of the company location.
	Country *string

	// Domain of the company
	Domain *string

	// Number of employees in the company
	EmployeesNumber *string

	// State of the company location.
	State *string
}

CompanyInfo - Company information of the user to be passed to partners.

func (CompanyInfo) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type CompanyInfo.

func (*CompanyInfo) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CompanyInfo.

type CreateAndAssociateIPFilterClient added in v0.6.0

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

CreateAndAssociateIPFilterClient contains the methods for the CreateAndAssociateIPFilter group. Don't use this type directly, use NewCreateAndAssociateIPFilterClient() instead.

func NewCreateAndAssociateIPFilterClient added in v0.6.0

func NewCreateAndAssociateIPFilterClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CreateAndAssociateIPFilterClient, error)

NewCreateAndAssociateIPFilterClient creates a new instance of CreateAndAssociateIPFilterClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CreateAndAssociateIPFilterClient) BeginCreate added in v0.6.0

BeginCreate - Create and Associate IP traffic filter for the given deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - CreateAndAssociateIPFilterClientBeginCreateOptions contains the optional parameters for the CreateAndAssociateIPFilterClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/IPTrafficFilter_Create.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCreateAndAssociateIPFilterClient().BeginCreate(ctx, "myResourceGroup", "myMonitor", &armelastic.CreateAndAssociateIPFilterClientBeginCreateOptions{IPs: to.Ptr("192.168.131.0, 192.168.132.6/22"),
		Name: 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:

type CreateAndAssociateIPFilterClientBeginCreateOptions added in v0.6.0

type CreateAndAssociateIPFilterClientBeginCreateOptions struct {
	// List of ips
	IPs *string

	// Name of the traffic filter
	Name *string

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

CreateAndAssociateIPFilterClientBeginCreateOptions contains the optional parameters for the CreateAndAssociateIPFilterClient.BeginCreate method.

type CreateAndAssociateIPFilterClientCreateResponse added in v0.6.0

type CreateAndAssociateIPFilterClientCreateResponse struct {
}

CreateAndAssociateIPFilterClientCreateResponse contains the response from method CreateAndAssociateIPFilterClient.BeginCreate.

type CreateAndAssociatePLFilterClient added in v0.6.0

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

CreateAndAssociatePLFilterClient contains the methods for the CreateAndAssociatePLFilter group. Don't use this type directly, use NewCreateAndAssociatePLFilterClient() instead.

func NewCreateAndAssociatePLFilterClient added in v0.6.0

func NewCreateAndAssociatePLFilterClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CreateAndAssociatePLFilterClient, error)

NewCreateAndAssociatePLFilterClient creates a new instance of CreateAndAssociatePLFilterClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*CreateAndAssociatePLFilterClient) BeginCreate added in v0.6.0

BeginCreate - Create and Associate private link traffic filter for the given deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - CreateAndAssociatePLFilterClientBeginCreateOptions contains the optional parameters for the CreateAndAssociatePLFilterClient.BeginCreate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/PrivateLinkTrafficFilters_Create.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewCreateAndAssociatePLFilterClient().BeginCreate(ctx, "myResourceGroup", "myMonitor", &armelastic.CreateAndAssociatePLFilterClientBeginCreateOptions{Name: nil,
		PrivateEndpointGUID: to.Ptr("fdb54d3b-e85e-4d08-8958-0d2f7g523df9"),
		PrivateEndpointName: to.Ptr("myPrivateEndpoint"),
	})
	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:

type CreateAndAssociatePLFilterClientBeginCreateOptions added in v0.6.0

type CreateAndAssociatePLFilterClientBeginCreateOptions struct {
	// Name of the traffic filter
	Name *string

	// Guid of the private endpoint
	PrivateEndpointGUID *string

	// Name of the private endpoint
	PrivateEndpointName *string

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

CreateAndAssociatePLFilterClientBeginCreateOptions contains the optional parameters for the CreateAndAssociatePLFilterClient.BeginCreate method.

type CreateAndAssociatePLFilterClientCreateResponse added in v0.6.0

type CreateAndAssociatePLFilterClientCreateResponse struct {
}

CreateAndAssociatePLFilterClientCreateResponse contains the response from method CreateAndAssociatePLFilterClient.BeginCreate.

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 DeploymentInfoClient

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

DeploymentInfoClient contains the methods for the DeploymentInfo group. Don't use this type directly, use NewDeploymentInfoClient() instead.

func NewDeploymentInfoClient

func NewDeploymentInfoClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeploymentInfoClient, error)

NewDeploymentInfoClient creates a new instance of DeploymentInfoClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DeploymentInfoClient) List

func (client *DeploymentInfoClient) List(ctx context.Context, resourceGroupName string, monitorName string, options *DeploymentInfoClientListOptions) (DeploymentInfoClientListResponse, error)

List - Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - DeploymentInfoClientListOptions contains the optional parameters for the DeploymentInfoClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DeploymentInfo_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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDeploymentInfoClient().List(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.DeploymentInfoResponse = armelastic.DeploymentInfoResponse{
	// 	DeploymentURL: to.Ptr("https://endpoint.eastus.kb.azure.elastic-cloud.com:9243"),
	// 	DiskCapacity: to.Ptr("245760"),
	// 	MarketplaceSaasInfo: &armelastic.MarketplaceSaaSInfo{
	// 		MarketplaceName: to.Ptr("MP_RESOURCE"),
	// 		MarketplaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SaaS/resources/AzElastic_b1190c8f"),
	// 		MarketplaceSubscription: &armelastic.MarketplaceSaaSInfoMarketplaceSubscription{
	// 			ID: to.Ptr("12345678-1234-1234-1234-123456789012"),
	// 		},
	// 	},
	// 	MemoryCapacity: to.Ptr("1024"),
	// 	Status: to.Ptr(armelastic.ElasticDeploymentStatusHealthy),
	// 	Version: to.Ptr("7.9.3"),
	// }
}
Output:

type DeploymentInfoClientListOptions added in v0.2.0

type DeploymentInfoClientListOptions struct {
}

DeploymentInfoClientListOptions contains the optional parameters for the DeploymentInfoClient.List method.

type DeploymentInfoClientListResponse added in v0.2.0

type DeploymentInfoClientListResponse struct {
	// The properties of deployment in Elastic cloud corresponding to the Elastic monitor resource.
	DeploymentInfoResponse
}

DeploymentInfoClientListResponse contains the response from method DeploymentInfoClient.List.

type DeploymentInfoResponse

type DeploymentInfoResponse struct {
	// READ-ONLY; Deployment URL of the elasticsearch in Elastic cloud deployment.
	DeploymentURL *string

	// READ-ONLY; Disk capacity of the elasticsearch in Elastic cloud deployment.
	DiskCapacity *string

	// READ-ONLY; Marketplace SaaS Info of the resource.
	MarketplaceSaasInfo *MarketplaceSaaSInfo

	// READ-ONLY; RAM capacity of the elasticsearch in Elastic cloud deployment.
	MemoryCapacity *string

	// READ-ONLY; The Elastic deployment status.
	Status *ElasticDeploymentStatus

	// READ-ONLY; Version of the elasticsearch in Elastic cloud deployment.
	Version *string
}

DeploymentInfoResponse - The properties of deployment in Elastic cloud corresponding to the Elastic monitor resource.

func (DeploymentInfoResponse) MarshalJSON added in v0.6.0

func (d DeploymentInfoResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DeploymentInfoResponse.

func (*DeploymentInfoResponse) UnmarshalJSON added in v0.6.0

func (d *DeploymentInfoResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentInfoResponse.

type DetachAndDeleteTrafficFilterClient added in v0.6.0

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

DetachAndDeleteTrafficFilterClient contains the methods for the DetachAndDeleteTrafficFilter group. Don't use this type directly, use NewDetachAndDeleteTrafficFilterClient() instead.

func NewDetachAndDeleteTrafficFilterClient added in v0.6.0

func NewDetachAndDeleteTrafficFilterClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DetachAndDeleteTrafficFilterClient, error)

NewDetachAndDeleteTrafficFilterClient creates a new instance of DetachAndDeleteTrafficFilterClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DetachAndDeleteTrafficFilterClient) Delete added in v0.6.0

Delete - Detach and Delete traffic filter from the given deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - DetachAndDeleteTrafficFilterClientDeleteOptions contains the optional parameters for the DetachAndDeleteTrafficFilterClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DetachAndDeleteTrafficFilter_Delete.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewDetachAndDeleteTrafficFilterClient().Delete(ctx, "myResourceGroup", "myMonitor", &armelastic.DetachAndDeleteTrafficFilterClientDeleteOptions{RulesetID: to.Ptr("31d91b5afb6f4c2eaaf104c97b1991dd")})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type DetachAndDeleteTrafficFilterClientDeleteOptions added in v0.6.0

type DetachAndDeleteTrafficFilterClientDeleteOptions struct {
	// Ruleset Id of the filter
	RulesetID *string
}

DetachAndDeleteTrafficFilterClientDeleteOptions contains the optional parameters for the DetachAndDeleteTrafficFilterClient.Delete method.

type DetachAndDeleteTrafficFilterClientDeleteResponse added in v0.6.0

type DetachAndDeleteTrafficFilterClientDeleteResponse struct {
}

DetachAndDeleteTrafficFilterClientDeleteResponse contains the response from method DetachAndDeleteTrafficFilterClient.Delete.

type DetachTrafficFilterClient added in v0.6.0

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

DetachTrafficFilterClient contains the methods for the DetachTrafficFilter group. Don't use this type directly, use NewDetachTrafficFilterClient() instead.

func NewDetachTrafficFilterClient added in v0.6.0

func NewDetachTrafficFilterClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DetachTrafficFilterClient, error)

NewDetachTrafficFilterClient creates a new instance of DetachTrafficFilterClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DetachTrafficFilterClient) BeginUpdate added in v0.6.0

BeginUpdate - Detach traffic filter for the given deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - DetachTrafficFilterClientBeginUpdateOptions contains the optional parameters for the DetachTrafficFilterClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/DetachTrafficFilters_Update.json

package main

import (
	"context"
	"log"

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

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

type DetachTrafficFilterClientBeginUpdateOptions added in v0.6.0

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

	// Ruleset Id of the filter
	RulesetID *string
}

DetachTrafficFilterClientBeginUpdateOptions contains the optional parameters for the DetachTrafficFilterClient.BeginUpdate method.

type DetachTrafficFilterClientUpdateResponse added in v0.6.0

type DetachTrafficFilterClientUpdateResponse struct {
}

DetachTrafficFilterClientUpdateResponse contains the response from method DetachTrafficFilterClient.BeginUpdate.

type ElasticDeploymentStatus

type ElasticDeploymentStatus string

ElasticDeploymentStatus - Flag specifying if the Elastic deployment status is healthy or not.

const (
	ElasticDeploymentStatusHealthy   ElasticDeploymentStatus = "Healthy"
	ElasticDeploymentStatusUnhealthy ElasticDeploymentStatus = "Unhealthy"
)

func PossibleElasticDeploymentStatusValues

func PossibleElasticDeploymentStatusValues() []ElasticDeploymentStatus

PossibleElasticDeploymentStatusValues returns the possible values for the ElasticDeploymentStatus const type.

type ExternalUserClient added in v0.6.0

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

ExternalUserClient contains the methods for the ExternalUser group. Don't use this type directly, use NewExternalUserClient() instead.

func NewExternalUserClient added in v0.6.0

func NewExternalUserClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExternalUserClient, error)

NewExternalUserClient creates a new instance of ExternalUserClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ExternalUserClient) CreateOrUpdate added in v0.6.0

func (client *ExternalUserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, monitorName string, options *ExternalUserClientCreateOrUpdateOptions) (ExternalUserClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create User inside elastic deployment which are used by customers to perform operations on the elastic deployment If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - ExternalUserClientCreateOrUpdateOptions contains the optional parameters for the ExternalUserClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ExternalUserInfo.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewExternalUserClient().CreateOrUpdate(ctx, "myResourceGroup", "myMonitor", &armelastic.ExternalUserClientCreateOrUpdateOptions{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.ExternalUserCreationResponse = armelastic.ExternalUserCreationResponse{
	// 	Created: to.Ptr(true),
	// }
}
Output:

type ExternalUserClientCreateOrUpdateOptions added in v0.6.0

type ExternalUserClientCreateOrUpdateOptions struct {
	// Elastic External User Creation Parameters
	Body *ExternalUserInfo
}

ExternalUserClientCreateOrUpdateOptions contains the optional parameters for the ExternalUserClient.CreateOrUpdate method.

type ExternalUserClientCreateOrUpdateResponse added in v0.6.0

type ExternalUserClientCreateOrUpdateResponse struct {
	// The properties of the response we got from elastic while creating external user
	ExternalUserCreationResponse
}

ExternalUserClientCreateOrUpdateResponse contains the response from method ExternalUserClient.CreateOrUpdate.

type ExternalUserCreationResponse added in v0.6.0

type ExternalUserCreationResponse struct {
	// READ-ONLY; Shows if user is created or updated
	Created *bool
}

ExternalUserCreationResponse - The properties of the response we got from elastic while creating external user

func (ExternalUserCreationResponse) MarshalJSON added in v0.6.0

func (e ExternalUserCreationResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExternalUserCreationResponse.

func (*ExternalUserCreationResponse) UnmarshalJSON added in v0.6.0

func (e *ExternalUserCreationResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExternalUserCreationResponse.

type ExternalUserInfo added in v0.6.0

type ExternalUserInfo struct {
	// Email id of the user to be created or updated
	EmailID *string

	// Full name of the user to be created or updated
	FullName *string

	// Password of the user to be created or updated
	Password *string

	// Roles to be assigned for created or updated user
	Roles []*string

	// Username of the user to be created or updated
	UserName *string
}

ExternalUserInfo - The properties of the request required for creating user on elastic side

func (ExternalUserInfo) MarshalJSON added in v0.6.0

func (e ExternalUserInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExternalUserInfo.

func (*ExternalUserInfo) UnmarshalJSON added in v0.6.0

func (e *ExternalUserInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExternalUserInfo.

type FilteringTag

type FilteringTag struct {
	// Valid actions for a filtering tag.
	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 v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type FilteringTag.

func (*FilteringTag) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type FilteringTag.

type IdentityProperties

type IdentityProperties struct {
	// Managed identity type.
	Type *ManagedIdentityTypes

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

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

IdentityProperties - Identity properties.

func (IdentityProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type IdentityProperties.

func (*IdentityProperties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityProperties.

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

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

ListAssociatedTrafficFiltersClient contains the methods for the ListAssociatedTrafficFilters group. Don't use this type directly, use NewListAssociatedTrafficFiltersClient() instead.

func NewListAssociatedTrafficFiltersClient added in v0.6.0

func NewListAssociatedTrafficFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ListAssociatedTrafficFiltersClient, error)

NewListAssociatedTrafficFiltersClient creates a new instance of ListAssociatedTrafficFiltersClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ListAssociatedTrafficFiltersClient) List added in v0.6.0

List - Get the list of all associated traffic filters for the given deployment. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - ListAssociatedTrafficFiltersClientListOptions contains the optional parameters for the ListAssociatedTrafficFiltersClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/AssociatedFiltersForDeployment_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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewListAssociatedTrafficFiltersClient().List(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.TrafficFilterResponse = armelastic.TrafficFilterResponse{
	// 	Rulesets: []*armelastic.TrafficFilter{
	// 		{
	// 			Name: to.Ptr("IPFromApi"),
	// 			Type: to.Ptr(armelastic.TypeIP),
	// 			Description: to.Ptr("created from azure"),
	// 			ID: to.Ptr("31d91b5afb6f4c2eaaf104c97b1991dd"),
	// 			IncludeByDefault: to.Ptr(false),
	// 			Region: to.Ptr("azure-eastus"),
	// 			Rules: []*armelastic.TrafficFilterRule{
	// 				{
	// 					Description: to.Ptr("Allow inbound traffic from IP address 192.168.131.0"),
	// 					ID: to.Ptr("f0297dad72af4a5e964cddf817f35e65"),
	// 					Source: to.Ptr("192.168.131.0"),
	// 				},
	// 				{
	// 					Description: to.Ptr("Allow inbound traffic from IP address block 192.168.132.6/22"),
	// 					ID: to.Ptr("f9c00169f0e54931ae72aabde326b589"),
	// 					Source: to.Ptr("192.168.132.6/22"),
	// 			}},
	// 	}},
	// }
}
Output:

type ListAssociatedTrafficFiltersClientListOptions added in v0.6.0

type ListAssociatedTrafficFiltersClientListOptions struct {
}

ListAssociatedTrafficFiltersClientListOptions contains the optional parameters for the ListAssociatedTrafficFiltersClient.List method.

type ListAssociatedTrafficFiltersClientListResponse added in v0.6.0

type ListAssociatedTrafficFiltersClientListResponse struct {
	// List of elastic traffic filters in the account
	TrafficFilterResponse
}

ListAssociatedTrafficFiltersClientListResponse contains the response from method ListAssociatedTrafficFiltersClient.List.

type LogRules

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

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

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

	// Flag specifying if 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 v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type LogRules.

type ManagedIdentityTypes

type ManagedIdentityTypes string

ManagedIdentityTypes - Managed Identity types.

const (
	ManagedIdentityTypesSystemAssigned ManagedIdentityTypes = "SystemAssigned"
)

func PossibleManagedIdentityTypesValues

func PossibleManagedIdentityTypesValues() []ManagedIdentityTypes

PossibleManagedIdentityTypesValues returns the possible values for the ManagedIdentityTypes const type.

type MarketplaceSaaSInfo added in v0.8.0

type MarketplaceSaaSInfo struct {
	// Marketplace Subscription Details: SAAS Name
	MarketplaceName *string

	// Marketplace Subscription Details: Resource URI
	MarketplaceResourceID *string

	// Marketplace Subscription
	MarketplaceSubscription *MarketplaceSaaSInfoMarketplaceSubscription
}

MarketplaceSaaSInfo - Marketplace SAAS Info of the resource.

func (MarketplaceSaaSInfo) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type MarketplaceSaaSInfo.

func (*MarketplaceSaaSInfo) UnmarshalJSON added in v0.8.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceSaaSInfo.

type MarketplaceSaaSInfoMarketplaceSubscription added in v0.8.0

type MarketplaceSaaSInfoMarketplaceSubscription struct {
	// Marketplace Subscription Id. This is a GUID-formatted string.
	ID *string
}

MarketplaceSaaSInfoMarketplaceSubscription - Marketplace Subscription

func (MarketplaceSaaSInfoMarketplaceSubscription) MarshalJSON added in v0.8.0

MarshalJSON implements the json.Marshaller interface for type MarketplaceSaaSInfoMarketplaceSubscription.

func (*MarketplaceSaaSInfoMarketplaceSubscription) UnmarshalJSON added in v0.8.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MarketplaceSaaSInfoMarketplaceSubscription.

type MonitorClient added in v0.6.0

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

MonitorClient contains the methods for the Monitor group. Don't use this type directly, use NewMonitorClient() instead.

func NewMonitorClient added in v0.6.0

func NewMonitorClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitorClient, error)

NewMonitorClient creates a new instance of MonitorClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MonitorClient) BeginUpgrade added in v0.6.0

func (client *MonitorClient) BeginUpgrade(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorClientBeginUpgradeOptions) (*runtime.Poller[MonitorClientUpgradeResponse], error)

BeginUpgrade - Upgradable version for a monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - MonitorClientBeginUpgradeOptions contains the optional parameters for the MonitorClient.BeginUpgrade method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Monitor_Upgrade.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elastic/armelastic"
)

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

type MonitorClientBeginUpgradeOptions added in v0.6.0

type MonitorClientBeginUpgradeOptions struct {
	// Elastic Monitor Upgrade Parameters
	Body *MonitorUpgrade

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

MonitorClientBeginUpgradeOptions contains the optional parameters for the MonitorClient.BeginUpgrade method.

type MonitorClientUpgradeResponse added in v0.6.0

type MonitorClientUpgradeResponse struct {
}

MonitorClientUpgradeResponse contains the response from method MonitorClient.BeginUpgrade.

type MonitorProperties

type MonitorProperties struct {
	// Elastic cloud properties.
	ElasticProperties *Properties

	// Flag to determine if User API Key has to be generated and shared.
	GenerateAPIKey *bool

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

	// Provisioning state of the monitor resource.
	ProvisioningState *ProvisioningState

	// User information.
	UserInfo *UserInfo

	// Version of elastic of the monitor resource
	Version *string

	// READ-ONLY
	LiftrResourceCategory *LiftrResourceCategories

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

MonitorProperties - Properties specific to the monitor resource.

func (MonitorProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type MonitorProperties.

func (*MonitorProperties) UnmarshalJSON added in v0.6.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; The location of the monitor resource
	Location *string

	// Identity properties of the monitor resource.
	Identity *IdentityProperties

	// Properties of the monitor resource.
	Properties *MonitorProperties

	// SKU of the monitor resource.
	SKU *ResourceSKU

	// The tags of the monitor resource.
	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; The system metadata relating to this resource
	SystemData *SystemData

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

MonitorResource - Monitor resource.

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 v0.6.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 v0.6.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 {
	// elastic monitor resource tags.
	Tags map[string]*string
}

MonitorResourceUpdateParameters - Monitor resource update parameters.

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 v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitorResourceUpdateParameters.

type MonitorUpgrade added in v0.6.0

type MonitorUpgrade struct {
	// Version to which the elastic monitor should be upgraded to
	Version *string
}

MonitorUpgrade - Upgrade elastic monitor version

func (MonitorUpgrade) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type MonitorUpgrade.

func (*MonitorUpgrade) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitorUpgrade.

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

	// Flag indicating the status of the resource for sending logs operation to Elastic.
	SendingLogs *SendingLogs
}

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

func (MonitoredResource) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type MonitoredResource.

func (*MonitoredResource) UnmarshalJSON added in v0.6.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 v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoredResourceListResponse.

type MonitoredResourcesClient

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

MonitoredResourcesClient contains the methods for the MonitoredResources group. Don't use this type directly, use NewMonitoredResourcesClient() instead.

func NewMonitoredResourcesClient

func NewMonitoredResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitoredResourcesClient, error)

NewMonitoredResourcesClient creates a new instance of MonitoredResourcesClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MonitoredResourcesClient) NewListPager added in v0.4.0

func (client *MonitoredResourcesClient) NewListPager(resourceGroupName string, monitorName string, options *MonitoredResourcesClientListOptions) *runtime.Pager[MonitoredResourcesClientListResponse]

NewListPager - List the resources currently being monitored by the Elastic monitor resource.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - MonitoredResourcesClientListOptions contains the optional parameters for the MonitoredResourcesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

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

type MonitoredResourcesClientListOptions added in v0.2.0

type MonitoredResourcesClientListOptions struct {
}

MonitoredResourcesClientListOptions contains the optional parameters for the MonitoredResourcesClient.NewListPager method.

type MonitoredResourcesClientListResponse added in v0.2.0

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

MonitoredResourcesClientListResponse contains the response from method MonitoredResourcesClient.NewListPager.

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 {
	// Properties of the monitoring tag rules.
	Properties *MonitoringTagRulesProperties

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

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

	// READ-ONLY; The system metadata relating to this 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 v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type MonitoringTagRules.

func (*MonitoringTagRules) UnmarshalJSON added in v0.6.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 v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringTagRulesListResponse.

type MonitoringTagRulesProperties

type MonitoringTagRulesProperties struct {
	// Rules for sending logs.
	LogRules *LogRules

	// Provisioning state of the monitoring tag rules.
	ProvisioningState *ProvisioningState
}

MonitoringTagRulesProperties - Definition of the properties for a TagRules resource.

func (MonitoringTagRulesProperties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type MonitoringTagRulesProperties.

func (*MonitoringTagRulesProperties) UnmarshalJSON added in v0.6.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 Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • 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-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • 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/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewMonitorsClient().BeginCreate(ctx, "myResourceGroup", "myMonitor", &armelastic.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 = armelastic.MonitorResource{
	// 	Name: to.Ptr("myMonitor"),
	// 	Type: to.Ptr("Microsoft.Elastic/monitors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
	// 	Location: to.Ptr("West US 2"),
	// 	Properties: &armelastic.MonitorProperties{
	// 		ElasticProperties: &armelastic.Properties{
	// 			ElasticCloudDeployment: &armelastic.CloudDeployment{
	// 				Name: to.Ptr("deploymentname"),
	// 				AzureSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				DeploymentID: to.Ptr("deployment_id"),
	// 				ElasticsearchRegion: to.Ptr("azure-westus2"),
	// 				ElasticsearchServiceURL: to.Ptr("https://elasticsearchendpoint.com"),
	// 				KibanaServiceURL: to.Ptr("https://kibanaserviceurl.com"),
	// 				KibanaSsoURL: to.Ptr("https://kibanssourl.com"),
	// 			},
	// 			ElasticCloudUser: &armelastic.CloudUser{
	// 				ElasticCloudSsoDefaultURL: to.Ptr("https://examplessourl.com"),
	// 				EmailAddress: to.Ptr("alice@microsoft.com"),
	// 				ID: to.Ptr("myid123"),
	// 			},
	// 		},
	// 		ProvisioningState: to.Ptr(armelastic.ProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armelastic.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-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • 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/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.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) 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-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • 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/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.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 = armelastic.MonitorResource{
	// 	Name: to.Ptr("myMonitor"),
	// 	Type: to.Ptr("Microsoft.Elastic/monitors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
	// 	Location: to.Ptr("West US 2"),
	// 	Properties: &armelastic.MonitorProperties{
	// 		ElasticProperties: &armelastic.Properties{
	// 			ElasticCloudDeployment: &armelastic.CloudDeployment{
	// 				Name: to.Ptr("deploymentname"),
	// 				AzureSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				DeploymentID: to.Ptr("deployment_id"),
	// 				ElasticsearchRegion: to.Ptr("azure-westus2"),
	// 				ElasticsearchServiceURL: to.Ptr("https://elasticsearchendpoint.com"),
	// 				KibanaServiceURL: to.Ptr("https://kibanaserviceurl.com"),
	// 				KibanaSsoURL: to.Ptr("https://kibanssourl.com"),
	// 			},
	// 			ElasticCloudUser: &armelastic.CloudUser{
	// 				ElasticCloudSsoDefaultURL: to.Ptr("https://examplessourl.com"),
	// 				EmailAddress: to.Ptr("alice@microsoft.com"),
	// 				ID: to.Ptr("myid123"),
	// 			},
	// 		},
	// 		LiftrResourceCategory: to.Ptr(armelastic.LiftrResourceCategoriesMonitorLogs),
	// 		LiftrResourcePreference: to.Ptr[int32](0),
	// 		MonitoringStatus: to.Ptr(armelastic.MonitoringStatusEnabled),
	// 		ProvisioningState: to.Ptr(armelastic.ProvisioningStateSucceeded),
	// 	},
	// 	Tags: map[string]*string{
	// 		"Environment": to.Ptr("Dev"),
	// 	},
	// }
}
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-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • 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/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.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 = armelastic.MonitorResourceListResponse{
		// 	Value: []*armelastic.MonitorResource{
		// 		{
		// 			Name: to.Ptr("myMonitor"),
		// 			Type: to.Ptr("Microsoft.Elastic/monitors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
		// 			Location: to.Ptr("West US 2"),
		// 			Properties: &armelastic.MonitorProperties{
		// 				ElasticProperties: &armelastic.Properties{
		// 					ElasticCloudDeployment: &armelastic.CloudDeployment{
		// 						Name: to.Ptr("deploymentname"),
		// 						AzureSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						DeploymentID: to.Ptr("deployment_id"),
		// 						ElasticsearchRegion: to.Ptr("azure-westus2"),
		// 						ElasticsearchServiceURL: to.Ptr("https://elasticsearchendpoint.com"),
		// 						KibanaServiceURL: to.Ptr("https://kibanaserviceurl.com"),
		// 						KibanaSsoURL: to.Ptr("https://kibanssourl.com"),
		// 					},
		// 					ElasticCloudUser: &armelastic.CloudUser{
		// 						ElasticCloudSsoDefaultURL: to.Ptr("https://examplessourl.com"),
		// 						EmailAddress: to.Ptr("alice@microsoft.com"),
		// 						ID: to.Ptr("myid123"),
		// 					},
		// 				},
		// 				LiftrResourceCategory: to.Ptr(armelastic.LiftrResourceCategoriesMonitorLogs),
		// 				LiftrResourcePreference: to.Ptr[int32](0),
		// 				MonitoringStatus: to.Ptr(armelastic.MonitoringStatusEnabled),
		// 				ProvisioningState: to.Ptr(armelastic.ProvisioningStateSucceeded),
		// 			},
		// 			Tags: map[string]*string{
		// 				"Environment": to.Ptr("Dev"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*MonitorsClient) NewListPager added in v0.4.0

NewListPager - List all monitors under the specified subscription.

Generated from API version 2023-02-01-preview

  • 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/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.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 = armelastic.MonitorResourceListResponse{
		// 	Value: []*armelastic.MonitorResource{
		// 		{
		// 			Name: to.Ptr("myMonitor"),
		// 			Type: to.Ptr("Microsoft.Elastic/monitors"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
		// 			Location: to.Ptr("West US 2"),
		// 			Properties: &armelastic.MonitorProperties{
		// 				ElasticProperties: &armelastic.Properties{
		// 					ElasticCloudDeployment: &armelastic.CloudDeployment{
		// 						Name: to.Ptr("deploymentname"),
		// 						AzureSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						DeploymentID: to.Ptr("deployment_id"),
		// 						ElasticsearchRegion: to.Ptr("azure-westus2"),
		// 						ElasticsearchServiceURL: to.Ptr("https://elasticsearchendpoint.com"),
		// 						KibanaServiceURL: to.Ptr("https://kibanaserviceurl.com"),
		// 						KibanaSsoURL: to.Ptr("https://kibanssourl.com"),
		// 					},
		// 					ElasticCloudUser: &armelastic.CloudUser{
		// 						ElasticCloudSsoDefaultURL: to.Ptr("https://examplessourl.com"),
		// 						EmailAddress: to.Ptr("alice@microsoft.com"),
		// 						ID: to.Ptr("myid123"),
		// 					},
		// 				},
		// 				LiftrResourceCategory: to.Ptr(armelastic.LiftrResourceCategoriesMonitorLogs),
		// 				LiftrResourcePreference: to.Ptr[int32](0),
		// 				MonitoringStatus: to.Ptr(armelastic.MonitoringStatusEnabled),
		// 				ProvisioningState: to.Ptr(armelastic.ProvisioningStateSucceeded),
		// 			},
		// 			Tags: map[string]*string{
		// 				"Environment": to.Ptr("Dev"),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*MonitorsClient) Update

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

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

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - MonitorsClientUpdateOptions contains the optional parameters for the MonitorsClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewMonitorsClient().Update(ctx, "myResourceGroup", "myMonitor", &armelastic.MonitorsClientUpdateOptions{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.MonitorResource = armelastic.MonitorResource{
	// 	Name: to.Ptr("myMonitor"),
	// 	Type: to.Ptr("Microsoft.Elastic/monitors"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/monitors/myMonitor"),
	// 	Location: to.Ptr("West US 2"),
	// 	Properties: &armelastic.MonitorProperties{
	// 		ElasticProperties: &armelastic.Properties{
	// 			ElasticCloudDeployment: &armelastic.CloudDeployment{
	// 				Name: to.Ptr("deploymentname"),
	// 				AzureSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				DeploymentID: to.Ptr("deployment_id"),
	// 				ElasticsearchRegion: to.Ptr("azure-westus2"),
	// 				ElasticsearchServiceURL: to.Ptr("https://elasticsearchendpoint.com"),
	// 				KibanaServiceURL: to.Ptr("https://kibanaserviceurl.com"),
	// 				KibanaSsoURL: to.Ptr("https://kibanssourl.com"),
	// 			},
	// 			ElasticCloudUser: &armelastic.CloudUser{
	// 				ElasticCloudSsoDefaultURL: to.Ptr("https://examplessourl.com"),
	// 				EmailAddress: to.Ptr("alice@microsoft.com"),
	// 				ID: to.Ptr("myid123"),
	// 			},
	// 		},
	// 		LiftrResourceCategory: to.Ptr(armelastic.LiftrResourceCategoriesMonitorLogs),
	// 		LiftrResourcePreference: to.Ptr[int32](0),
	// 		MonitoringStatus: to.Ptr(armelastic.MonitoringStatusEnabled),
	// 		ProvisioningState: to.Ptr(armelastic.ProvisioningStateSucceeded),
	// 	},
	// 	SKU: &armelastic.ResourceSKU{
	// 		Name: to.Ptr("free_Monthly"),
	// 	},
	// 	Tags: map[string]*string{
	// 		"Environment": to.Ptr("Dev"),
	// 	},
	// }
}
Output:

type MonitorsClientBeginCreateOptions added in v0.2.0

type MonitorsClientBeginCreateOptions struct {
	// Elastic monitor resource model
	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 MonitorsClientCreateResponse added in v0.2.0

type MonitorsClientCreateResponse struct {
	// Monitor resource.
	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 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 {
	// Monitor resource.
	MonitorResource
}

MonitorsClientGetResponse contains the response from method MonitorsClient.Get.

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

type MonitorsClientUpdateOptions struct {
	// Elastic resource model update parameters.
	Body *MonitorResourceUpdateParameters
}

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

type MonitorsClientUpdateResponse added in v0.2.0

type MonitorsClientUpdateResponse struct {
	// Monitor resource.
	MonitorResource
}

MonitorsClientUpdateResponse contains the response from method MonitorsClient.Update.

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.Elastic.
	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 v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v0.6.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.Elastic provider.
	Value []*OperationResult
}

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

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationName

type OperationName string

OperationName - Operation to be performed on the given vm resource id.

const (
	OperationNameAdd    OperationName = "Add"
	OperationNameDelete OperationName = "Delete"
)

func PossibleOperationNameValues

func PossibleOperationNameValues() []OperationName

PossibleOperationNameValues returns the possible values for the OperationName const type.

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

	// Origin of the operation
	Origin *string
}

OperationResult - A Microsoft.Elastic REST API operation.

func (OperationResult) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type OperationResult.

func (*OperationResult) UnmarshalJSON added in v0.6.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.Elastic.

Generated from API version 2023-02-01-preview

  • 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/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

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

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OrganizationsClient added in v0.8.0

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

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

func NewOrganizationsClient added in v0.8.0

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

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

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OrganizationsClient) GetAPIKey added in v0.8.0

GetAPIKey - Fetch User API Key from internal database, if it was generated and stored while creating the Elasticsearch Organization. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • options - OrganizationsClientGetAPIKeyOptions contains the optional parameters for the OrganizationsClient.GetAPIKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/Organizations_GetApiKey.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOrganizationsClient().GetAPIKey(ctx, &armelastic.OrganizationsClientGetAPIKeyOptions{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.UserAPIKeyResponse = armelastic.UserAPIKeyResponse{
	// 	Properties: &armelastic.UserAPIKeyResponseProperties{
	// 		APIKey: to.Ptr("AbCdEfGhIjKlMnOpQrStUvWxYz"),
	// 	},
	// }
}
Output:

type OrganizationsClientGetAPIKeyOptions added in v0.8.0

type OrganizationsClientGetAPIKeyOptions struct {
	// Email Id parameter of the User Organization, of which the API Key must be returned
	Body *UserEmailID
}

OrganizationsClientGetAPIKeyOptions contains the optional parameters for the OrganizationsClient.GetAPIKey method.

type OrganizationsClientGetAPIKeyResponse added in v0.8.0

type OrganizationsClientGetAPIKeyResponse struct {
	// The User Api Key created for the Organization associated with the User Email Id that was passed in the request
	UserAPIKeyResponse
}

OrganizationsClientGetAPIKeyResponse contains the response from method OrganizationsClient.GetAPIKey.

type Properties added in v0.2.0

type Properties struct {
	// Details of the elastic cloud deployment.
	ElasticCloudDeployment *CloudDeployment

	// Details of the user's elastic account.
	ElasticCloudUser *CloudUser
}

Properties - Elastic Resource Properties.

func (Properties) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of Elastic resource.

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.
	Name *string
}

ResourceSKU - Microsoft.Elastic SKU.

func (ResourceSKU) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceSKU.

func (*ResourceSKU) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.

type SendingLogs

type SendingLogs string

SendingLogs - Flag indicating the status of the resource for sending logs operation to Elastic.

const (
	SendingLogsFalse SendingLogs = "False"
	SendingLogsTrue  SendingLogs = "True"
)

func PossibleSendingLogsValues

func PossibleSendingLogsValues() []SendingLogs

PossibleSendingLogsValues returns the possible values for the SendingLogs const type.

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 Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TagRulesClient) BeginDelete

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

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

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • ruleSetName - Tag Rule Set resource name
  • options - TagRulesClientBeginDeleteOptions contains the optional parameters for the TagRulesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TagRules_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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTagRulesClient().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 (*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-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • ruleSetName - Tag Rule Set resource 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/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.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", &armelastic.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 = armelastic.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: &armelastic.MonitoringTagRulesProperties{
	// 		LogRules: &armelastic.LogRules{
	// 			FilteringTags: []*armelastic.FilteringTag{
	// 				{
	// 					Name: to.Ptr("Environment"),
	// 					Action: to.Ptr(armelastic.TagActionInclude),
	// 					Value: to.Ptr("Prod"),
	// 				},
	// 				{
	// 					Name: to.Ptr("Environment"),
	// 					Action: to.Ptr(armelastic.TagActionExclude),
	// 					Value: to.Ptr("Dev"),
	// 			}},
	// 			SendAADLogs: to.Ptr(false),
	// 			SendActivityLogs: to.Ptr(true),
	// 			SendSubscriptionLogs: to.Ptr(true),
	// 		},
	// 		ProvisioningState: to.Ptr(armelastic.ProvisioningStateSucceeded),
	// 	},
	// }
}
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-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • ruleSetName - Tag Rule Set resource 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/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.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 = armelastic.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: &armelastic.MonitoringTagRulesProperties{
	// 		LogRules: &armelastic.LogRules{
	// 			FilteringTags: []*armelastic.FilteringTag{
	// 				{
	// 					Name: to.Ptr("Environment"),
	// 					Action: to.Ptr(armelastic.TagActionInclude),
	// 					Value: to.Ptr("Prod"),
	// 				},
	// 				{
	// 					Name: to.Ptr("Environment"),
	// 					Action: to.Ptr(armelastic.TagActionExclude),
	// 					Value: to.Ptr("Dev"),
	// 			}},
	// 			SendAADLogs: to.Ptr(false),
	// 			SendActivityLogs: to.Ptr(true),
	// 			SendSubscriptionLogs: to.Ptr(true),
	// 		},
	// 		ProvisioningState: to.Ptr(armelastic.ProvisioningStateSucceeded),
	// 	},
	// }
}
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-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • 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/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.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 = armelastic.MonitoringTagRulesListResponse{
		// 	Value: []*armelastic.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: &armelastic.MonitoringTagRulesProperties{
		// 				LogRules: &armelastic.LogRules{
		// 					FilteringTags: []*armelastic.FilteringTag{
		// 						{
		// 							Name: to.Ptr("Environment"),
		// 							Action: to.Ptr(armelastic.TagActionInclude),
		// 							Value: to.Ptr("Prod"),
		// 						},
		// 						{
		// 							Name: to.Ptr("Environment"),
		// 							Action: to.Ptr(armelastic.TagActionExclude),
		// 							Value: to.Ptr("Dev"),
		// 					}},
		// 					SendAADLogs: to.Ptr(false),
		// 					SendActivityLogs: to.Ptr(true),
		// 					SendSubscriptionLogs: to.Ptr(true),
		// 				},
		// 				ProvisioningState: to.Ptr(armelastic.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type TagRulesClientBeginDeleteOptions added in v0.2.0

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

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

type TagRulesClientCreateOrUpdateOptions added in v0.2.0

type TagRulesClientCreateOrUpdateOptions struct {
	// request body of MonitoringTagRules
	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 TagRulesClientDeleteResponse added in v0.2.0

type TagRulesClientDeleteResponse struct {
}

TagRulesClientDeleteResponse contains the response from method TagRulesClient.BeginDelete.

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

type TrafficFilter struct {
	// Description of the elastic filter
	Description *string

	// Id of the elastic filter
	ID *string

	// IncludeByDefault for the elastic filter
	IncludeByDefault *bool

	// Name of the elastic filter
	Name *string

	// Region of the elastic filter
	Region *string

	// Rules in the elastic filter
	Rules []*TrafficFilterRule

	// Type of the elastic filter
	Type *Type
}

TrafficFilter - Elastic traffic filter object

func (TrafficFilter) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type TrafficFilter.

func (*TrafficFilter) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrafficFilter.

type TrafficFilterResponse added in v0.6.0

type TrafficFilterResponse struct {
	// List of elastic traffic filters in the account
	Rulesets []*TrafficFilter
}

TrafficFilterResponse - List of elastic traffic filters in the account

func (TrafficFilterResponse) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type TrafficFilterResponse.

func (*TrafficFilterResponse) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrafficFilterResponse.

type TrafficFilterRule added in v0.6.0

type TrafficFilterRule struct {
	// Guid of Private Endpoint in the elastic filter rule
	AzureEndpointGUID *string

	// Name of the Private Endpoint in the elastic filter rule
	AzureEndpointName *string

	// Description of the elastic filter rule
	Description *string

	// Id of the elastic filter rule
	ID *string

	// IP of the elastic filter rule
	Source *string
}

TrafficFilterRule - Elastic traffic filter rule object

func (TrafficFilterRule) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type TrafficFilterRule.

func (*TrafficFilterRule) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrafficFilterRule.

type TrafficFiltersClient added in v0.6.0

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

TrafficFiltersClient contains the methods for the TrafficFilters group. Don't use this type directly, use NewTrafficFiltersClient() instead.

func NewTrafficFiltersClient added in v0.6.0

func NewTrafficFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TrafficFiltersClient, error)

NewTrafficFiltersClient creates a new instance of TrafficFiltersClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TrafficFiltersClient) Delete added in v0.6.0

func (client *TrafficFiltersClient) Delete(ctx context.Context, resourceGroupName string, monitorName string, options *TrafficFiltersClientDeleteOptions) (TrafficFiltersClientDeleteResponse, error)

Delete - Delete traffic filter from the account. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - TrafficFiltersClientDeleteOptions contains the optional parameters for the TrafficFiltersClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/TrafficFilters_Delete.json

package main

import (
	"context"
	"log"

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

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewTrafficFiltersClient().Delete(ctx, "myResourceGroup", "myMonitor", &armelastic.TrafficFiltersClientDeleteOptions{RulesetID: to.Ptr("31d91b5afb6f4c2eaaf104c97b1991dd")})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type TrafficFiltersClientDeleteOptions added in v0.6.0

type TrafficFiltersClientDeleteOptions struct {
	// Ruleset Id of the filter
	RulesetID *string
}

TrafficFiltersClientDeleteOptions contains the optional parameters for the TrafficFiltersClient.Delete method.

type TrafficFiltersClientDeleteResponse added in v0.6.0

type TrafficFiltersClientDeleteResponse struct {
}

TrafficFiltersClientDeleteResponse contains the response from method TrafficFiltersClient.Delete.

type Type added in v0.6.0

type Type string

Type - Type of the elastic filter

const (
	TypeAzurePrivateEndpoint Type = "azure_private_endpoint"
	TypeIP                   Type = "ip"
)

func PossibleTypeValues added in v0.6.0

func PossibleTypeValues() []Type

PossibleTypeValues returns the possible values for the Type const type.

type UpgradableVersionsClient added in v0.6.0

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

UpgradableVersionsClient contains the methods for the UpgradableVersions group. Don't use this type directly, use NewUpgradableVersionsClient() instead.

func NewUpgradableVersionsClient added in v0.6.0

func NewUpgradableVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UpgradableVersionsClient, error)

NewUpgradableVersionsClient creates a new instance of UpgradableVersionsClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*UpgradableVersionsClient) Details added in v0.6.0

Details - List of upgradable versions for a given monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - UpgradableVersionsClientDetailsOptions contains the optional parameters for the UpgradableVersionsClient.Details method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/UpgradableVersions_Details.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewUpgradableVersionsClient().Details(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.UpgradableVersionsList = armelastic.UpgradableVersionsList{
	// 	CurrentVersion: to.Ptr("7.15.0"),
	// 	UpgradableVersions: []*string{
	// 		to.Ptr("7.15.1"),
	// 		to.Ptr("7.16.0")},
	// 	}
}
Output:

type UpgradableVersionsClientDetailsOptions added in v0.6.0

type UpgradableVersionsClientDetailsOptions struct {
}

UpgradableVersionsClientDetailsOptions contains the optional parameters for the UpgradableVersionsClient.Details method.

type UpgradableVersionsClientDetailsResponse added in v0.6.0

type UpgradableVersionsClientDetailsResponse struct {
	// Stack Versions that this version can upgrade to
	UpgradableVersionsList
}

UpgradableVersionsClientDetailsResponse contains the response from method UpgradableVersionsClient.Details.

type UpgradableVersionsList added in v0.6.0

type UpgradableVersionsList struct {
	// Current version of the elastic monitor
	CurrentVersion *string

	// Stack Versions that this version can upgrade to
	UpgradableVersions []*string
}

UpgradableVersionsList - Stack Versions that this version can upgrade to

func (UpgradableVersionsList) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type UpgradableVersionsList.

func (*UpgradableVersionsList) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UpgradableVersionsList.

type UserAPIKeyResponse added in v0.8.0

type UserAPIKeyResponse struct {
	Properties *UserAPIKeyResponseProperties
}

UserAPIKeyResponse - The User Api Key created for the Organization associated with the User Email Id that was passed in the request

func (UserAPIKeyResponse) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type UserAPIKeyResponse.

func (*UserAPIKeyResponse) UnmarshalJSON added in v0.8.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserAPIKeyResponse.

type UserAPIKeyResponseProperties added in v0.9.0

type UserAPIKeyResponseProperties struct {
	// The User Api Key Generated based on GenerateApiKey flag. This is applicable for non-Portal clients only.
	APIKey *string
}

func (UserAPIKeyResponseProperties) MarshalJSON added in v0.9.0

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

MarshalJSON implements the json.Marshaller interface for type UserAPIKeyResponseProperties.

func (*UserAPIKeyResponseProperties) UnmarshalJSON added in v0.9.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserAPIKeyResponseProperties.

type UserEmailID added in v0.8.0

type UserEmailID struct {
	// The User email Id
	EmailID *string
}

UserEmailID - Email Id of the User Organization, of which the API Key must be returned

func (UserEmailID) MarshalJSON added in v0.8.0

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

MarshalJSON implements the json.Marshaller interface for type UserEmailID.

func (*UserEmailID) UnmarshalJSON added in v0.8.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserEmailID.

type UserInfo

type UserInfo struct {
	// Company information of the user to be passed to partners.
	CompanyInfo *CompanyInfo

	// Company name of the user
	CompanyName *string

	// Email of the user used by Elastic for contacting them if needed
	EmailAddress *string

	// First name of the user
	FirstName *string

	// Last name of the user
	LastName *string
}

UserInfo - User Information to be passed to partners.

func (UserInfo) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type UserInfo.

func (*UserInfo) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserInfo.

type VMCollectionClient

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

VMCollectionClient contains the methods for the VMCollection group. Don't use this type directly, use NewVMCollectionClient() instead.

func NewVMCollectionClient

func NewVMCollectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VMCollectionClient, error)

NewVMCollectionClient creates a new instance of VMCollectionClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VMCollectionClient) Update

func (client *VMCollectionClient) Update(ctx context.Context, resourceGroupName string, monitorName string, options *VMCollectionClientUpdateOptions) (VMCollectionClientUpdateResponse, error)

Update - Update the vm details that will be monitored by the Elastic monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - VMCollectionClientUpdateOptions contains the optional parameters for the VMCollectionClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/VMCollection_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/elastic/armelastic"
)

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

type VMCollectionClientUpdateOptions added in v0.2.0

type VMCollectionClientUpdateOptions struct {
	// VM resource Id
	Body *VMCollectionUpdate
}

VMCollectionClientUpdateOptions contains the optional parameters for the VMCollectionClient.Update method.

type VMCollectionClientUpdateResponse added in v0.2.0

type VMCollectionClientUpdateResponse struct {
}

VMCollectionClientUpdateResponse contains the response from method VMCollectionClient.Update.

type VMCollectionUpdate

type VMCollectionUpdate struct {
	// Operation to be performed for given VM.
	OperationName *OperationName

	// ARM id of the VM resource.
	VMResourceID *string
}

VMCollectionUpdate - Update VM resource collection.

func (VMCollectionUpdate) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type VMCollectionUpdate.

func (*VMCollectionUpdate) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMCollectionUpdate.

type VMHostClient

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

VMHostClient contains the methods for the VMHost group. Don't use this type directly, use NewVMHostClient() instead.

func NewVMHostClient

func NewVMHostClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VMHostClient, error)

NewVMHostClient creates a new instance of VMHostClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VMHostClient) NewListPager added in v0.4.0

func (client *VMHostClient) NewListPager(resourceGroupName string, monitorName string, options *VMHostClientListOptions) *runtime.Pager[VMHostClientListResponse]

NewListPager - List the vm resources currently being monitored by the Elastic monitor resource.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - VMHostClientListOptions contains the optional parameters for the VMHostClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/VMHost_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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVMHostClient().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.VMHostListResponse = armelastic.VMHostListResponse{
		// 	Value: []*armelastic.VMResources{
		// 		{
		// 			VMResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualmachines/myVM"),
		// 	}},
		// }
	}
}
Output:

type VMHostClientListOptions added in v0.2.0

type VMHostClientListOptions struct {
}

VMHostClientListOptions contains the optional parameters for the VMHostClient.NewListPager method.

type VMHostClientListResponse added in v0.2.0

type VMHostClientListResponse struct {
	// Response of a list operation.
	VMHostListResponse
}

VMHostClientListResponse contains the response from method VMHostClient.NewListPager.

type VMHostListResponse

type VMHostListResponse struct {
	// Link to the next Vm resource Id, if any.
	NextLink *string

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

VMHostListResponse - Response of a list operation.

func (VMHostListResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VMHostListResponse.

func (*VMHostListResponse) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMHostListResponse.

type VMIngestionClient

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

VMIngestionClient contains the methods for the VMIngestion group. Don't use this type directly, use NewVMIngestionClient() instead.

func NewVMIngestionClient

func NewVMIngestionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VMIngestionClient, error)

NewVMIngestionClient creates a new instance of VMIngestionClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VMIngestionClient) Details

func (client *VMIngestionClient) Details(ctx context.Context, resourceGroupName string, monitorName string, options *VMIngestionClientDetailsOptions) (VMIngestionClientDetailsResponse, error)

Details - List the vm ingestion details that will be monitored by the Elastic monitor resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-02-01-preview

  • resourceGroupName - The name of the resource group to which the Elastic resource belongs.
  • monitorName - Monitor resource name
  • options - VMIngestionClientDetailsOptions contains the optional parameters for the VMIngestionClient.Details method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/VMIngestion_Details.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVMIngestionClient().Details(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.VMIngestionDetailsResponse = armelastic.VMIngestionDetailsResponse{
	// 	CloudID: to.Ptr("myid123"),
	// 	IngestionKey: to.Ptr("Vmingeationkey"),
	// }
}
Output:

type VMIngestionClientDetailsOptions added in v0.2.0

type VMIngestionClientDetailsOptions struct {
}

VMIngestionClientDetailsOptions contains the optional parameters for the VMIngestionClient.Details method.

type VMIngestionClientDetailsResponse added in v0.2.0

type VMIngestionClientDetailsResponse struct {
	// The vm ingestion details to install an agent.
	VMIngestionDetailsResponse
}

VMIngestionClientDetailsResponse contains the response from method VMIngestionClient.Details.

type VMIngestionDetailsResponse

type VMIngestionDetailsResponse struct {
	// The cloudId of given Elastic monitor resource.
	CloudID *string

	// Ingestion details to install agent on given VM.
	IngestionKey *string
}

VMIngestionDetailsResponse - The vm ingestion details to install an agent.

func (VMIngestionDetailsResponse) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type VMIngestionDetailsResponse.

func (*VMIngestionDetailsResponse) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMIngestionDetailsResponse.

type VMResources

type VMResources struct {
	// The ARM id of the VM resource.
	VMResourceID *string
}

VMResources - The vm resource properties that is currently being monitored by the Elastic monitor resource.

func (VMResources) MarshalJSON added in v0.6.0

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

MarshalJSON implements the json.Marshaller interface for type VMResources.

func (*VMResources) UnmarshalJSON added in v0.6.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VMResources.

type VersionListFormat added in v0.9.0

type VersionListFormat struct {
	// Elastic Version Properties
	Properties *VersionListProperties
}

VersionListFormat - Elastic Version List Format

func (VersionListFormat) MarshalJSON added in v0.9.0

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

MarshalJSON implements the json.Marshaller interface for type VersionListFormat.

func (*VersionListFormat) UnmarshalJSON added in v0.9.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VersionListFormat.

type VersionListProperties added in v0.9.0

type VersionListProperties struct {
	// Available elastic version of the given region
	Version *string
}

VersionListProperties - Elastic Version Properties

func (VersionListProperties) MarshalJSON added in v0.9.0

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

MarshalJSON implements the json.Marshaller interface for type VersionListProperties.

func (*VersionListProperties) UnmarshalJSON added in v0.9.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VersionListProperties.

type VersionsClient added in v0.9.0

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

VersionsClient contains the methods for the ElasticVersions group. Don't use this type directly, use NewVersionsClient() instead.

func NewVersionsClient added in v0.9.0

func NewVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VersionsClient, error)

NewVersionsClient creates a new instance of VersionsClient with the specified values.

  • subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VersionsClient) NewListPager added in v0.9.0

NewListPager - Get a list of available versions for a region.

Generated from API version 2023-02-01-preview

  • region - Region where elastic deployment will take place.
  • options - VersionsClientListOptions contains the optional parameters for the VersionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/dbd896bc9a795bcb3ec7db0a340b517fd3059620/specification/elastic/resource-manager/Microsoft.Elastic/preview/2023-02-01-preview/examples/ElasticVersions_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/elastic/armelastic"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVersionsClient().NewListPager("myregion", 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.VersionsListResponse = armelastic.VersionsListResponse{
		// 	Value: []*armelastic.VersionListFormat{
		// 		{
		// 			Properties: &armelastic.VersionListProperties{
		// 				Version: to.Ptr("version1"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type VersionsClientListOptions added in v0.9.0

type VersionsClientListOptions struct {
}

VersionsClientListOptions contains the optional parameters for the VersionsClient.NewListPager method.

type VersionsClientListResponse added in v0.9.0

type VersionsClientListResponse struct {
	// List of elastic versions available in a region.
	VersionsListResponse
}

VersionsClientListResponse contains the response from method VersionsClient.NewListPager.

type VersionsListResponse added in v0.9.0

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

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

VersionsListResponse - List of elastic versions available in a region.

func (VersionsListResponse) MarshalJSON added in v0.9.0

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

MarshalJSON implements the json.Marshaller interface for type VersionsListResponse.

func (*VersionsListResponse) UnmarshalJSON added in v0.9.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VersionsListResponse.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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