armhanaonazure

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 13 Imported by: 2

README

Azure SAP HANA Module for Go

PkgGoDev

The armhanaonazure module provides operations for working with Azure SAP HANA.

Source code

Getting started

Prerequisites

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure SAP HANA module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure SAP HANA. 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.

Clients

Azure SAP HANA modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential.

client, err := armhanaonazure.NewSapMonitorsClient(<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,
    },
}
client, err := armhanaonazure.NewSapMonitorsClient(<subscription ID>, cred, &options)

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the SAP HANA 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 Display

type Display struct {
	// READ-ONLY; The localized friendly description for the operation as shown to the user. This description should be thorough,
	// yet concise. It will be used in tool-tips and detailed views.
	Description *string `json:"description,omitempty" azure:"ro"`

	// READ-ONLY; The localized friendly name for the operation as shown to the user. This name should be concise (to fit in drop
	// downs), but clear (self-documenting). Use Title Casing and include the entity/resource
	// to which it applies.
	Operation *string `json:"operation,omitempty" azure:"ro"`

	// READ-ONLY; The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs
	// UX. Default value is 'user,system'
	Origin *string `json:"origin,omitempty" azure:"ro"`

	// READ-ONLY; The localized friendly form of the resource provider name. This form is also expected to include the publisher/company
	// responsible. Use Title Casing. Begin with "Microsoft" for 1st party services.
	Provider *string `json:"provider,omitempty" azure:"ro"`

	// READ-ONLY; The localized friendly form of the resource type related to this action/operation. This form should match the
	// public documentation for the resource provider. Use Title Casing. For examples, refer to
	// the “name” section.
	Resource *string `json:"resource,omitempty" azure:"ro"`
}

Display - Detailed HANA operation information

type ErrorResponse

type ErrorResponse struct {
	// Describes the error object.
	Error *ErrorResponseError `json:"error,omitempty"`
}

ErrorResponse - Describes the format of Error response.

type ErrorResponseError

type ErrorResponseError struct {
	// READ-ONLY; Error code
	Code *string `json:"code,omitempty" azure:"ro"`

	// READ-ONLY; Error message indicating why the operation failed.
	Message *string `json:"message,omitempty" azure:"ro"`
}

ErrorResponseError - Describes the error object.

type HanaProvisioningStatesEnum

type HanaProvisioningStatesEnum string

HanaProvisioningStatesEnum - State of provisioning of the HanaInstance

const (
	HanaProvisioningStatesEnumAccepted  HanaProvisioningStatesEnum = "Accepted"
	HanaProvisioningStatesEnumCreating  HanaProvisioningStatesEnum = "Creating"
	HanaProvisioningStatesEnumDeleting  HanaProvisioningStatesEnum = "Deleting"
	HanaProvisioningStatesEnumFailed    HanaProvisioningStatesEnum = "Failed"
	HanaProvisioningStatesEnumMigrating HanaProvisioningStatesEnum = "Migrating"
	HanaProvisioningStatesEnumSucceeded HanaProvisioningStatesEnum = "Succeeded"
	HanaProvisioningStatesEnumUpdating  HanaProvisioningStatesEnum = "Updating"
)

func PossibleHanaProvisioningStatesEnumValues

func PossibleHanaProvisioningStatesEnumValues() []HanaProvisioningStatesEnum

PossibleHanaProvisioningStatesEnumValues returns the possible values for the HanaProvisioningStatesEnum const type.

type Operation

type Operation struct {
	// Displayed HANA operation information
	Display *Display `json:"display,omitempty"`

	// READ-ONLY; The name of the operation being performed on this particular object. This name should match the action name
	// that appears in RBAC / the event service.
	Name *string `json:"name,omitempty" azure:"ro"`
}

Operation - HANA operation information

type OperationList

type OperationList struct {
	// List of HANA operations
	Value []*Operation `json:"value,omitempty"`
}

OperationList - List of HANA operations

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 - Gets a list of SAP HANA management operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/HanaOperations_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewOperationsClient(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type OperationsClientListOptions added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

type OperationsClientListResponse struct {
	OperationList
}

OperationsClientListResponse contains the response from method OperationsClient.List.

type ProviderInstance

type ProviderInstance struct {
	// Provider Instance properties
	Properties *ProviderInstanceProperties `json:"properties,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProviderInstance - A provider instance associated with a SAP monitor.

type ProviderInstanceListResult

type ProviderInstanceListResult struct {
	// The URL to get the next set of provider instances.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of provider instances.
	Value []*ProviderInstance `json:"value,omitempty"`
}

ProviderInstanceListResult - The response from the List provider instances operation.

type ProviderInstanceProperties

type ProviderInstanceProperties struct {
	// A JSON string containing metadata of the provider instance.
	Metadata *string `json:"metadata,omitempty"`

	// A JSON string containing the properties of the provider instance.
	Properties *string `json:"properties,omitempty"`

	// The type of provider instance.
	Type *string `json:"type,omitempty"`

	// READ-ONLY; State of provisioning of the provider instance
	ProvisioningState *HanaProvisioningStatesEnum `json:"provisioningState,omitempty" azure:"ro"`
}

ProviderInstanceProperties - Describes the properties of a provider instance.

type ProviderInstancesClient

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

ProviderInstancesClient contains the methods for the ProviderInstances group. Don't use this type directly, use NewProviderInstancesClient() instead.

func NewProviderInstancesClient

func NewProviderInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderInstancesClient, error)

NewProviderInstancesClient creates a new instance of ProviderInstancesClient with the specified values. subscriptionID - Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*ProviderInstancesClient) BeginCreate

func (client *ProviderInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapMonitorName string, providerInstanceName string, providerInstanceParameter ProviderInstance, options *ProviderInstancesClientBeginCreateOptions) (*runtime.Poller[ProviderInstancesClientCreateResponse], error)

BeginCreate - Creates a provider instance for the specified subscription, resource group, SapMonitor name, and resource name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview resourceGroupName - Name of the resource group. sapMonitorName - Name of the SAP monitor resource. providerInstanceName - Name of the provider instance. providerInstanceParameter - Request body representing a provider instance options - ProviderInstancesClientBeginCreateOptions contains the optional parameters for the ProviderInstancesClient.BeginCreate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/ProviderInstances_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewProviderInstancesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx,
		"myResourceGroup",
		"mySapMonitor",
		"myProviderInstance",
		armhanaonazure.ProviderInstance{
			Properties: &armhanaonazure.ProviderInstanceProperties{
				Type:       to.Ptr("hana"),
				Metadata:   to.Ptr("{\"key\":\"value\"}"),
				Properties: to.Ptr("{\"hostname\":\"10.0.0.6\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30013,\"dbUsername\":\"SYSTEM\",\"dbPassword\":\"PASSWORD\"}"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ProviderInstancesClient) BeginDelete

func (client *ProviderInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapMonitorName string, providerInstanceName string, options *ProviderInstancesClientBeginDeleteOptions) (*runtime.Poller[ProviderInstancesClientDeleteResponse], error)

BeginDelete - Deletes a provider instance for the specified subscription, resource group, SapMonitor name, and resource name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview resourceGroupName - Name of the resource group. sapMonitorName - Name of the SAP monitor resource. providerInstanceName - Name of the provider instance. options - ProviderInstancesClientBeginDeleteOptions contains the optional parameters for the ProviderInstancesClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/ProviderInstances_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewProviderInstancesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"mySapMonitor",
		"myProviderInstance",
		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 (*ProviderInstancesClient) Get

func (client *ProviderInstancesClient) Get(ctx context.Context, resourceGroupName string, sapMonitorName string, providerInstanceName string, options *ProviderInstancesClientGetOptions) (ProviderInstancesClientGetResponse, error)

Get - Gets properties of a provider instance for the specified subscription, resource group, SapMonitor name, and resource name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview resourceGroupName - Name of the resource group. sapMonitorName - Name of the SAP monitor resource. providerInstanceName - Name of the provider instance. options - ProviderInstancesClientGetOptions contains the optional parameters for the ProviderInstancesClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/ProviderInstances_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewProviderInstancesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"mySapMonitor",
		"myProviderInstance",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*ProviderInstancesClient) NewListPager added in v0.4.0

func (client *ProviderInstancesClient) NewListPager(resourceGroupName string, sapMonitorName string, options *ProviderInstancesClientListOptions) *runtime.Pager[ProviderInstancesClientListResponse]

NewListPager - Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each provider instances. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview resourceGroupName - Name of the resource group. sapMonitorName - Name of the SAP monitor resource. options - ProviderInstancesClientListOptions contains the optional parameters for the ProviderInstancesClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/ProviderInstances_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewProviderInstancesClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager("myResourceGroup",
		"mySapMonitor",
		nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

type ProviderInstancesClientBeginCreateOptions added in v0.2.0

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

ProviderInstancesClientBeginCreateOptions contains the optional parameters for the ProviderInstancesClient.BeginCreate method.

type ProviderInstancesClientBeginDeleteOptions added in v0.2.0

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

ProviderInstancesClientBeginDeleteOptions contains the optional parameters for the ProviderInstancesClient.BeginDelete method.

type ProviderInstancesClientCreateResponse added in v0.2.0

type ProviderInstancesClientCreateResponse struct {
	ProviderInstance
}

ProviderInstancesClientCreateResponse contains the response from method ProviderInstancesClient.Create.

type ProviderInstancesClientDeleteResponse added in v0.2.0

type ProviderInstancesClientDeleteResponse struct {
}

ProviderInstancesClientDeleteResponse contains the response from method ProviderInstancesClient.Delete.

type ProviderInstancesClientGetOptions added in v0.2.0

type ProviderInstancesClientGetOptions struct {
}

ProviderInstancesClientGetOptions contains the optional parameters for the ProviderInstancesClient.Get method.

type ProviderInstancesClientGetResponse added in v0.2.0

type ProviderInstancesClientGetResponse struct {
	ProviderInstance
}

ProviderInstancesClientGetResponse contains the response from method ProviderInstancesClient.Get.

type ProviderInstancesClientListOptions added in v0.2.0

type ProviderInstancesClientListOptions struct {
}

ProviderInstancesClientListOptions contains the optional parameters for the ProviderInstancesClient.List method.

type ProviderInstancesClientListResponse added in v0.2.0

type ProviderInstancesClientListResponse struct {
	ProviderInstanceListResult
}

ProviderInstancesClientListResponse contains the response from method ProviderInstancesClient.List.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

type SapMonitor

type SapMonitor struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// SAP monitor properties
	Properties *SapMonitorProperties `json:"properties,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

SapMonitor - SAP monitor info on Azure (ARM properties and SAP monitor properties)

func (SapMonitor) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SapMonitor.

type SapMonitorListResult

type SapMonitorListResult struct {
	// The URL to get the next set of SAP monitors.
	NextLink *string `json:"nextLink,omitempty"`

	// The list of SAP monitors.
	Value []*SapMonitor `json:"value,omitempty"`
}

SapMonitorListResult - The response from the List SAP monitors operation.

type SapMonitorProperties

type SapMonitorProperties struct {
	// The value indicating whether to send analytics to Microsoft
	EnableCustomerAnalytics *bool `json:"enableCustomerAnalytics,omitempty"`

	// The ARM ID of the Log Analytics Workspace that is used for monitoring
	LogAnalyticsWorkspaceArmID *string `json:"logAnalyticsWorkspaceArmId,omitempty"`

	// The workspace ID of the log analytics workspace to be used for monitoring
	LogAnalyticsWorkspaceID *string `json:"logAnalyticsWorkspaceId,omitempty"`

	// The shared key of the log analytics workspace that is used for monitoring
	LogAnalyticsWorkspaceSharedKey *string `json:"logAnalyticsWorkspaceSharedKey,omitempty"`

	// The subnet which the SAP monitor will be deployed in
	MonitorSubnet *string `json:"monitorSubnet,omitempty"`

	// READ-ONLY; The name of the resource group the SAP Monitor resources get deployed into.
	ManagedResourceGroupName *string `json:"managedResourceGroupName,omitempty" azure:"ro"`

	// READ-ONLY; State of provisioning of the HanaInstance
	ProvisioningState *HanaProvisioningStatesEnum `json:"provisioningState,omitempty" azure:"ro"`

	// READ-ONLY; The version of the payload running in the Collector VM
	SapMonitorCollectorVersion *string `json:"sapMonitorCollectorVersion,omitempty" azure:"ro"`
}

SapMonitorProperties - Describes the properties of a SAP monitor.

type SapMonitorsClient

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

SapMonitorsClient contains the methods for the SapMonitors group. Don't use this type directly, use NewSapMonitorsClient() instead.

func NewSapMonitorsClient

func NewSapMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SapMonitorsClient, error)

NewSapMonitorsClient creates a new instance of SapMonitorsClient with the specified values. subscriptionID - Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.

func (*SapMonitorsClient) BeginCreate

func (client *SapMonitorsClient) BeginCreate(ctx context.Context, resourceGroupName string, sapMonitorName string, sapMonitorParameter SapMonitor, options *SapMonitorsClientBeginCreateOptions) (*runtime.Poller[SapMonitorsClientCreateResponse], error)

BeginCreate - Creates a SAP monitor for the specified subscription, resource group, and resource name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview resourceGroupName - Name of the resource group. sapMonitorName - Name of the SAP monitor resource. sapMonitorParameter - Request body representing a SAP Monitor options - SapMonitorsClientBeginCreateOptions contains the optional parameters for the SapMonitorsClient.BeginCreate method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/SapMonitors_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewSapMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginCreate(ctx,
		"myResourceGroup",
		"mySapMonitor",
		armhanaonazure.SapMonitor{
			Location: to.Ptr("westus"),
			Tags: map[string]*string{
				"key": to.Ptr("value"),
			},
			Properties: &armhanaonazure.SapMonitorProperties{
				EnableCustomerAnalytics:        to.Ptr(true),
				LogAnalyticsWorkspaceArmID:     to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace"),
				LogAnalyticsWorkspaceID:        to.Ptr("00000000-0000-0000-0000-000000000000"),
				LogAnalyticsWorkspaceSharedKey: to.Ptr("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000=="),
				MonitorSubnet:                  to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"),
			},
		},
		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)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SapMonitorsClient) BeginDelete

func (client *SapMonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, sapMonitorName string, options *SapMonitorsClientBeginDeleteOptions) (*runtime.Poller[SapMonitorsClientDeleteResponse], error)

BeginDelete - Deletes a SAP monitor with the specified subscription, resource group, and monitor name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview resourceGroupName - Name of the resource group. sapMonitorName - Name of the SAP monitor resource. options - SapMonitorsClientBeginDeleteOptions contains the optional parameters for the SapMonitorsClient.BeginDelete method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/SapMonitors_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewSapMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := client.BeginDelete(ctx,
		"myResourceGroup",
		"mySapMonitor",
		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 (*SapMonitorsClient) Get

func (client *SapMonitorsClient) Get(ctx context.Context, resourceGroupName string, sapMonitorName string, options *SapMonitorsClientGetOptions) (SapMonitorsClientGetResponse, error)

Get - Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview resourceGroupName - Name of the resource group. sapMonitorName - Name of the SAP monitor resource. options - SapMonitorsClientGetOptions contains the optional parameters for the SapMonitorsClient.Get method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/SapMonitors_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewSapMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx,
		"myResourceGroup",
		"mySapMonitor",
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

func (*SapMonitorsClient) NewListPager added in v0.4.0

NewListPager - Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP monitor. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview options - SapMonitorsClientListOptions contains the optional parameters for the SapMonitorsClient.List method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/SapMonitors_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewSapMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}
Output:

func (*SapMonitorsClient) Update

func (client *SapMonitorsClient) Update(ctx context.Context, resourceGroupName string, sapMonitorName string, tagsParameter Tags, options *SapMonitorsClientUpdateOptions) (SapMonitorsClientUpdateResponse, error)

Update - Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-02-07-preview resourceGroupName - Name of the resource group. sapMonitorName - Name of the SAP monitor resource. tagsParameter - Request body that only contains the new Tags field options - SapMonitorsClientUpdateOptions contains the optional parameters for the SapMonitorsClient.Update method.

Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/examples/SapMonitors_PatchTags_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/hanaonazure/armhanaonazure"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armhanaonazure.NewSapMonitorsClient("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Update(ctx,
		"myResourceGroup",
		"mySapMonitor",
		armhanaonazure.Tags{
			Tags: map[string]*string{},
		},
		nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}
Output:

type SapMonitorsClientBeginCreateOptions added in v0.2.0

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

SapMonitorsClientBeginCreateOptions contains the optional parameters for the SapMonitorsClient.BeginCreate method.

type SapMonitorsClientBeginDeleteOptions added in v0.2.0

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

SapMonitorsClientBeginDeleteOptions contains the optional parameters for the SapMonitorsClient.BeginDelete method.

type SapMonitorsClientCreateResponse added in v0.2.0

type SapMonitorsClientCreateResponse struct {
	SapMonitor
}

SapMonitorsClientCreateResponse contains the response from method SapMonitorsClient.Create.

type SapMonitorsClientDeleteResponse added in v0.2.0

type SapMonitorsClientDeleteResponse struct {
}

SapMonitorsClientDeleteResponse contains the response from method SapMonitorsClient.Delete.

type SapMonitorsClientGetOptions added in v0.2.0

type SapMonitorsClientGetOptions struct {
}

SapMonitorsClientGetOptions contains the optional parameters for the SapMonitorsClient.Get method.

type SapMonitorsClientGetResponse added in v0.2.0

type SapMonitorsClientGetResponse struct {
	SapMonitor
}

SapMonitorsClientGetResponse contains the response from method SapMonitorsClient.Get.

type SapMonitorsClientListOptions added in v0.2.0

type SapMonitorsClientListOptions struct {
}

SapMonitorsClientListOptions contains the optional parameters for the SapMonitorsClient.List method.

type SapMonitorsClientListResponse added in v0.2.0

type SapMonitorsClientListResponse struct {
	SapMonitorListResult
}

SapMonitorsClientListResponse contains the response from method SapMonitorsClient.List.

type SapMonitorsClientUpdateOptions added in v0.2.0

type SapMonitorsClientUpdateOptions struct {
}

SapMonitorsClientUpdateOptions contains the optional parameters for the SapMonitorsClient.Update method.

type SapMonitorsClientUpdateResponse added in v0.2.0

type SapMonitorsClientUpdateResponse struct {
	SapMonitor
}

SapMonitorsClientUpdateResponse contains the response from method SapMonitorsClient.Update.

type Tags

type Tags struct {
	// Tags field of the resource.
	Tags map[string]*string `json:"tags,omitempty"`
}

Tags field of the resource.

func (Tags) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Tags.

type TrackedResource

type TrackedResource struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string `json:"location,omitempty"`

	// Resource tags.
	Tags map[string]*string `json:"tags,omitempty"`

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty" azure:"ro"`

	// READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty" azure:"ro"`

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty" azure:"ro"`
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

Jump to

Keyboard shortcuts

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