Documentation
¶
Index ¶
- type ClientFactory
- type CreatedByType
- type Display
- type HanaProvisioningStatesEnum
- type Operation
- type OperationList
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type ProviderInstance
- type ProviderInstanceListResult
- type ProviderInstanceProperties
- type ProviderInstancesClient
- func (client *ProviderInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapMonitorName string, ...) (*runtime.Poller[ProviderInstancesClientCreateResponse], error)
- func (client *ProviderInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapMonitorName string, ...) (*runtime.Poller[ProviderInstancesClientDeleteResponse], error)
- func (client *ProviderInstancesClient) Get(ctx context.Context, resourceGroupName string, sapMonitorName string, ...) (ProviderInstancesClientGetResponse, error)
- func (client *ProviderInstancesClient) NewListPager(resourceGroupName string, sapMonitorName string, ...) *runtime.Pager[ProviderInstancesClientListResponse]
- type ProviderInstancesClientBeginCreateOptions
- type ProviderInstancesClientBeginDeleteOptions
- type ProviderInstancesClientCreateResponse
- type ProviderInstancesClientDeleteResponse
- type ProviderInstancesClientGetOptions
- type ProviderInstancesClientGetResponse
- type ProviderInstancesClientListOptions
- type ProviderInstancesClientListResponse
- type SapMonitor
- type SapMonitorListResult
- type SapMonitorProperties
- type SapMonitorsClient
- func (client *SapMonitorsClient) BeginCreate(ctx context.Context, resourceGroupName string, sapMonitorName string, ...) (*runtime.Poller[SapMonitorsClientCreateResponse], error)
- func (client *SapMonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, sapMonitorName string, ...) (*runtime.Poller[SapMonitorsClientDeleteResponse], error)
- func (client *SapMonitorsClient) Get(ctx context.Context, resourceGroupName string, sapMonitorName string, ...) (SapMonitorsClientGetResponse, error)
- func (client *SapMonitorsClient) NewListPager(options *SapMonitorsClientListOptions) *runtime.Pager[SapMonitorsClientListResponse]
- func (client *SapMonitorsClient) Update(ctx context.Context, resourceGroupName string, sapMonitorName string, ...) (SapMonitorsClientUpdateResponse, error)
- type SapMonitorsClientBeginCreateOptions
- type SapMonitorsClientBeginDeleteOptions
- type SapMonitorsClientCreateResponse
- type SapMonitorsClientDeleteResponse
- type SapMonitorsClientGetOptions
- type SapMonitorsClientGetResponse
- type SapMonitorsClientListOptions
- type SapMonitorsClientListResponse
- type SapMonitorsClientUpdateOptions
- type SapMonitorsClientUpdateResponse
- type SystemData
- type Tags
Examples ¶
- OperationsClient.NewListPager
- ProviderInstancesClient.BeginCreate
- ProviderInstancesClient.BeginDelete
- ProviderInstancesClient.Get
- ProviderInstancesClient.NewListPager
- SapMonitorsClient.BeginCreate
- SapMonitorsClient.BeginDelete
- SapMonitorsClient.Get
- SapMonitorsClient.NewListPager
- SapMonitorsClient.Update (DeleteTagsFieldOfASapMonitor)
- SapMonitorsClient.Update (UpdateTagsFieldOfASapMonitor)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶ added in v0.6.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.6.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewOperationsClient ¶ added in v0.6.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewProviderInstancesClient ¶ added in v0.6.0
func (c *ClientFactory) NewProviderInstancesClient() *ProviderInstancesClient
NewProviderInstancesClient creates a new instance of ProviderInstancesClient.
func (*ClientFactory) NewSapMonitorsClient ¶ added in v0.6.0
func (c *ClientFactory) NewSapMonitorsClient() *SapMonitorsClient
NewSapMonitorsClient creates a new instance of SapMonitorsClient.
type CreatedByType ¶ added in v0.8.0
type CreatedByType string
CreatedByType - The kind of entity that created the resource.
const ( // CreatedByTypeApplication - The entity was created by an application. CreatedByTypeApplication CreatedByType = "Application" // CreatedByTypeKey - The entity was created by a key. CreatedByTypeKey CreatedByType = "Key" // CreatedByTypeManagedIdentity - The entity was created by a managed identity. CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" // CreatedByTypeUser - The entity was created by a user. CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶ added in v0.8.0
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
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
// 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
// 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
// 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
// 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
}
Display - Detailed HANA operation information
func (Display) MarshalJSON ¶ added in v0.6.0
MarshalJSON implements the json.Marshaller interface for type Display.
func (*Display) UnmarshalJSON ¶ added in v0.6.0
UnmarshalJSON implements the json.Unmarshaller interface for type Display.
type HanaProvisioningStatesEnum ¶
type HanaProvisioningStatesEnum string
HanaProvisioningStatesEnum - State of provisioning of the HanaInstance
const ( // HanaProvisioningStatesEnumAccepted - Accepted HanaProvisioningStatesEnumAccepted HanaProvisioningStatesEnum = "Accepted" // HanaProvisioningStatesEnumCreating - Creating HanaProvisioningStatesEnumCreating HanaProvisioningStatesEnum = "Creating" // HanaProvisioningStatesEnumDeleting - Deleting HanaProvisioningStatesEnumDeleting HanaProvisioningStatesEnum = "Deleting" // HanaProvisioningStatesEnumFailed - Failed HanaProvisioningStatesEnumFailed HanaProvisioningStatesEnum = "Failed" // HanaProvisioningStatesEnumMigrating - Migrating HanaProvisioningStatesEnumMigrating HanaProvisioningStatesEnum = "Migrating" // HanaProvisioningStatesEnumSucceeded - Succeeded HanaProvisioningStatesEnumSucceeded HanaProvisioningStatesEnum = "Succeeded" // HanaProvisioningStatesEnumUpdating - Updating 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
// 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
}
Operation - HANA operation information
func (Operation) MarshalJSON ¶ added in v0.6.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v0.6.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationList ¶
OperationList - List of HANA operations
func (OperationList) MarshalJSON ¶
func (o OperationList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationList.
func (*OperationList) UnmarshalJSON ¶ added in v0.6.0
func (o *OperationList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.
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.
Generated from API version 2020-02-07-preview
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 - Contains optional client configuration. Pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Gets a list of SAP HANA management operations.
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: 2020-02-07-preview/HanaOperations_List.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("", 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 = armhanaonazure.OperationsClientListResponse{
// OperationList: armhanaonazure.OperationList{
// Value: []*armhanaonazure.Operation{
// {
// Name: to.Ptr("HanaOp1"),
// Display: &armhanaonazure.Display{
// Description: to.Ptr("HanaOp1Description"),
// Operation: to.Ptr("HanaOp1OperationName"),
// Origin: to.Ptr("HanaOp1Origin"),
// Provider: to.Ptr("HanaOp1ProviderName"),
// Resource: to.Ptr("HanaOp1ResourceName"),
// },
// },
// {
// Name: to.Ptr("HanaOp2"),
// Display: &armhanaonazure.Display{
// Description: to.Ptr("HanaOp2Description"),
// Operation: to.Ptr("HanaOp2OperationName"),
// Origin: to.Ptr("HanaOp2Origin"),
// Provider: to.Ptr("HanaOp2ProviderName"),
// Resource: to.Ptr("HanaOp2ResourceName"),
// },
// },
// },
// },
// }
}
}
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 {
// List of HANA operations
OperationList
}
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type ProviderInstance ¶
type ProviderInstance struct {
// Provider Instance properties
Properties *ProviderInstanceProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
ProviderInstance - A provider instance associated with a SAP monitor.
func (ProviderInstance) MarshalJSON ¶
func (p ProviderInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProviderInstance.
func (*ProviderInstance) UnmarshalJSON ¶ added in v0.6.0
func (p *ProviderInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProviderInstance.
type ProviderInstanceListResult ¶
type ProviderInstanceListResult struct {
// REQUIRED; The ProviderInstance items on this page
Value []*ProviderInstance
// The link to the next page of items
NextLink *string
}
ProviderInstanceListResult - The response of a ProviderInstance list operation.
func (ProviderInstanceListResult) MarshalJSON ¶
func (p ProviderInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProviderInstanceListResult.
func (*ProviderInstanceListResult) UnmarshalJSON ¶ added in v0.6.0
func (p *ProviderInstanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProviderInstanceListResult.
type ProviderInstanceProperties ¶
type ProviderInstanceProperties struct {
// A JSON string containing metadata of the provider instance.
Metadata *string
// A JSON string containing the properties of the provider instance.
Properties *string
// The type of provider instance.
Type *string
// READ-ONLY; State of provisioning of the provider instance
ProvisioningState *HanaProvisioningStatesEnum
}
ProviderInstanceProperties - Describes the properties of a provider instance.
func (ProviderInstanceProperties) MarshalJSON ¶ added in v0.6.0
func (p ProviderInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProviderInstanceProperties.
func (*ProviderInstanceProperties) UnmarshalJSON ¶ added in v0.6.0
func (p *ProviderInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProviderInstanceProperties.
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.
Generated from API version 2020-02-07-preview
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 - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. 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.
The product Microsoft.Workloads/sapMonitors (AMS Classic) is officially retired as of May 31, 2023. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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: 2020-02-07-preview/ProviderInstances_Create.json
package main
import (
"context"
"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"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProviderInstancesClient().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 poll 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 = armhanaonazure.ProviderInstancesClientCreateResponse{
// ProviderInstance: armhanaonazure.ProviderInstance{
// Name: to.Ptr("myProviderInstance"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors/providerInstances"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance"),
// Properties: &armhanaonazure.ProviderInstanceProperties{
// Type: to.Ptr("SapHana"),
// Metadata: to.Ptr("{\"key\":\"value\"}"),
// Properties: to.Ptr("{\"hostname\":\"10.0.0.6\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30013,\"dbUsername\":\"SYSTEM\"}"),
// ProvisioningState: to.Ptr(armhanaonazure.HanaProvisioningStatesEnumAccepted),
// },
// },
// }
}
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.
The product Microsoft.Workloads/sapMonitors (AMS Classic) is officially retired as of May 31, 2023. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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: 2020-02-07-preview/ProviderInstances_Delete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewProviderInstancesClient().BeginDelete(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", 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 poll 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 = armhanaonazure.ProviderInstancesClientDeleteResponse{
// }
}
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.
The product Microsoft.Workloads/sapMonitors (AMS Classic) is officially retired as of May 31, 2023. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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: 2020-02-07-preview/ProviderInstances_Get.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProviderInstancesClient().Get(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", 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 = armhanaonazure.ProviderInstancesClientGetResponse{
// ProviderInstance: armhanaonazure.ProviderInstance{
// Name: to.Ptr("myProviderInstance"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors/providerInstances"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance"),
// Properties: &armhanaonazure.ProviderInstanceProperties{
// Type: to.Ptr("SapHana"),
// Metadata: to.Ptr("{\"key\":\"value\"}"),
// Properties: to.Ptr("{\"hostname\":\"10.0.0.6\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30013,\"dbUsername\":\"SYSTEM\"}"),
// },
// },
// }
}
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 product Microsoft.Workloads/sapMonitors (AMS Classic) is officially retired as of May 31, 2023.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapMonitorName - Name of the SAP monitor resource.
- options - ProviderInstancesClientListOptions contains the optional parameters for the ProviderInstancesClient.NewListPager method.
Example ¶
Generated from example definition: 2020-02-07-preview/ProviderInstances_List.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewProviderInstancesClient().NewListPager("myResourceGroup", "mySapMonitor", 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 = armhanaonazure.ProviderInstancesClientListResponse{
// ProviderInstanceListResult: armhanaonazure.ProviderInstanceListResult{
// Value: []*armhanaonazure.ProviderInstance{
// {
// Name: to.Ptr("myProviderInstance1"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors/providerInstances"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance1"),
// Properties: &armhanaonazure.ProviderInstanceProperties{
// Type: to.Ptr("SapHana"),
// Metadata: to.Ptr("{\"key\":\"value\"}"),
// Properties: to.Ptr("{\"hostname\":\"10.0.0.6\",\"dbName\":\"SYSTEMDB\",\"sqlPort\":30013,\"dbUsername\":\"SYSTEM\"}"),
// },
// },
// {
// Name: to.Ptr("myProviderInstance2"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors/providerInstances"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance2"),
// Properties: &armhanaonazure.ProviderInstanceProperties{
// Type: to.Ptr("PrometheusHaCluster"),
// Metadata: to.Ptr("{\"key\":\"value\"}"),
// Properties: to.Ptr("{\"prometheusUrl\":\"http://10.0.0.21:9664/metrics\"}"),
// },
// },
// {
// Name: to.Ptr("myProviderInstance2"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors/providerInstances"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor/providerInstances/myProviderInstance2"),
// Properties: &armhanaonazure.ProviderInstanceProperties{
// Type: to.Ptr("MsSqlServer"),
// Metadata: to.Ptr("{\"key\":\"value\"}"),
// Properties: to.Ptr("{\"sqlHostname\":\"10.0.0.6\",\"sqlPort\":1433,\"sqlUsername\":\"sqladmin\"}"),
// },
// },
// },
// },
// }
}
}
Output:
type ProviderInstancesClientBeginCreateOptions ¶ added in v0.2.0
type ProviderInstancesClientBeginCreateOptions struct {
// Resumes the long-running operation 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 long-running operation 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 {
// A provider instance associated with a SAP monitor.
ProviderInstance
}
ProviderInstancesClientCreateResponse contains the response from method ProviderInstancesClient.BeginCreate.
type ProviderInstancesClientDeleteResponse ¶ added in v0.2.0
type ProviderInstancesClientDeleteResponse struct {
}
ProviderInstancesClientDeleteResponse contains the response from method ProviderInstancesClient.BeginDelete.
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 {
// A provider instance associated with a SAP monitor.
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.NewListPager method.
type ProviderInstancesClientListResponse ¶ added in v0.2.0
type ProviderInstancesClientListResponse struct {
// The response of a ProviderInstance list operation.
ProviderInstanceListResult
}
ProviderInstancesClientListResponse contains the response from method ProviderInstancesClient.NewListPager.
type SapMonitor ¶
type SapMonitor struct {
// REQUIRED; The geo-location where the resource lives
Location *string
// SAP monitor properties
Properties *SapMonitorProperties
// Resource tags.
Tags map[string]*string
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
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.
func (*SapMonitor) UnmarshalJSON ¶ added in v0.6.0
func (s *SapMonitor) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapMonitor.
type SapMonitorListResult ¶
type SapMonitorListResult struct {
// REQUIRED; The SapMonitor items on this page
Value []*SapMonitor
// The link to the next page of items
NextLink *string
}
SapMonitorListResult - The response of a SapMonitor list operation.
func (SapMonitorListResult) MarshalJSON ¶
func (s SapMonitorListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SapMonitorListResult.
func (*SapMonitorListResult) UnmarshalJSON ¶ added in v0.6.0
func (s *SapMonitorListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapMonitorListResult.
type SapMonitorProperties ¶
type SapMonitorProperties struct {
// The value indicating whether to send analytics to Microsoft
EnableCustomerAnalytics *bool
// The ARM ID of the Log Analytics Workspace that is used for monitoring
LogAnalyticsWorkspaceArmID *string
// The workspace ID of the log analytics workspace to be used for monitoring
LogAnalyticsWorkspaceID *string
LogAnalyticsWorkspaceSharedKey *string
// The subnet which the SAP monitor will be deployed in
MonitorSubnet *string
// READ-ONLY; The name of the resource group the SAP Monitor resources get deployed into.
ManagedResourceGroupName *string
// READ-ONLY; State of provisioning of the HanaInstance
ProvisioningState *HanaProvisioningStatesEnum
// READ-ONLY; The version of the payload running in the Collector VM
SapMonitorCollectorVersion *string
}
SapMonitorProperties - Describes the properties of a SAP monitor.
func (SapMonitorProperties) MarshalJSON ¶ added in v0.6.0
func (s SapMonitorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SapMonitorProperties.
func (*SapMonitorProperties) UnmarshalJSON ¶ added in v0.6.0
func (s *SapMonitorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapMonitorProperties.
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.
Generated from API version 2020-02-07-preview
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 - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - Contains optional client configuration. 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.
The product Microsoft.Workloads/sapMonitors (AMS Classic) is officially retired as of May 31, 2023. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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: 2020-02-07-preview/SapMonitors_Create.json
package main
import (
"context"
"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"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSapMonitorsClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", armhanaonazure.SapMonitor{
Location: to.Ptr("westus"),
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"),
},
Tags: map[string]*string{
"key": to.Ptr("value"),
},
}, 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 poll 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 = armhanaonazure.SapMonitorsClientCreateResponse{
// SapMonitor: armhanaonazure.SapMonitor{
// Name: to.Ptr("myHanaInstance"),
// Type: to.Ptr("Microsoft.HanaOnAzure/hanaInstances"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/hanaInstances/myHanaInstance"),
// Location: to.Ptr("westus"),
// 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=="),
// ManagedResourceGroupName: to.Ptr("myManagedResourceGroup"),
// MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"),
// ProvisioningState: to.Ptr(armhanaonazure.HanaProvisioningStatesEnumSucceeded),
// SapMonitorCollectorVersion: to.Ptr("v1.0"),
// },
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// },
// }
}
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.
The product Microsoft.Workloads/sapMonitors (AMS Classic) is officially retired as of May 31, 2023. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapMonitorName - Name of the SAP monitor resource.
- options - SapMonitorsClientBeginDeleteOptions contains the optional parameters for the SapMonitorsClient.BeginDelete method.
Example ¶
Generated from example definition: 2020-02-07-preview/SapMonitors_Delete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSapMonitorsClient().BeginDelete(ctx, "myResourceGroup", "mySapMonitor", 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 poll 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 = armhanaonazure.SapMonitorsClientDeleteResponse{
// }
}
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.
The product Microsoft.Workloads/sapMonitors (AMS Classic) is officially retired as of May 31, 2023. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapMonitorName - Name of the SAP monitor resource.
- options - SapMonitorsClientGetOptions contains the optional parameters for the SapMonitorsClient.Get method.
Example ¶
Generated from example definition: 2020-02-07-preview/SapMonitors_Get.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSapMonitorsClient().Get(ctx, "myResourceGroup", "mySapMonitor", 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 = armhanaonazure.SapMonitorsClientGetResponse{
// SapMonitor: armhanaonazure.SapMonitor{
// Name: to.Ptr("mySapMonitor"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor"),
// Location: to.Ptr("westus"),
// 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=="),
// ManagedResourceGroupName: to.Ptr("myManagedResourceGroup"),
// MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"),
// ProvisioningState: to.Ptr(armhanaonazure.HanaProvisioningStatesEnumSucceeded),
// SapMonitorCollectorVersion: to.Ptr("v1.0"),
// },
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// },
// }
}
Output:
func (*SapMonitorsClient) NewListPager ¶ added in v0.4.0
func (client *SapMonitorsClient) NewListPager(options *SapMonitorsClientListOptions) *runtime.Pager[SapMonitorsClientListResponse]
NewListPager - Gets a list of SAP monitors in the specified subscription.
The product Microsoft.Workloads/sapMonitors (AMS Classic) is officially retired as of May 31, 2023.
- options - SapMonitorsClientListOptions contains the optional parameters for the SapMonitorsClient.NewListPager method.
Example ¶
Generated from example definition: 2020-02-07-preview/SapMonitors_List.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewSapMonitorsClient().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 = armhanaonazure.SapMonitorsClientListResponse{
// SapMonitorListResult: armhanaonazure.SapMonitorListResult{
// Value: []*armhanaonazure.SapMonitor{
// {
// Name: to.Ptr("mySapMonitor1"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor1"),
// Location: to.Ptr("westus"),
// 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=="),
// ManagedResourceGroupName: to.Ptr("myManagedResourceGroup"),
// MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"),
// ProvisioningState: to.Ptr(armhanaonazure.HanaProvisioningStatesEnumSucceeded),
// SapMonitorCollectorVersion: to.Ptr("v1.0"),
// },
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// },
// {
// Name: to.Ptr("mySapMonitor2"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor2"),
// Location: to.Ptr("westus"),
// 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=="),
// ManagedResourceGroupName: to.Ptr("myManagedResourceGroup"),
// MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"),
// ProvisioningState: to.Ptr(armhanaonazure.HanaProvisioningStatesEnumSucceeded),
// SapMonitorCollectorVersion: to.Ptr("v1.0"),
// },
// Tags: map[string]*string{
// "key": to.Ptr("value"),
// },
// },
// },
// },
// }
}
}
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.
The product Microsoft.Workloads/sapMonitors (AMS Classic) is officially retired as of May 31, 2023. If the operation fails it returns an *azcore.ResponseError type.
- resourceGroupName - The name of the resource group. The name is case insensitive.
- 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 (DeleteTagsFieldOfASapMonitor) ¶
Generated from example definition: 2020-02-07-preview/SapMonitors_PatchTags_Delete.json
package main
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hanaonazure/armhanaonazure"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSapMonitorsClient().Update(ctx, "myResourceGroup", "mySapMonitor", armhanaonazure.Tags{
Tags: map[string]*string{},
}, 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 = armhanaonazure.SapMonitorsClientUpdateResponse{
// SapMonitor: armhanaonazure.SapMonitor{
// Name: to.Ptr("mySapMonitor"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor"),
// Location: to.Ptr("westus"),
// 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=="),
// ManagedResourceGroupName: to.Ptr("myManagedResourceGroup"),
// MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"),
// ProvisioningState: to.Ptr(armhanaonazure.HanaProvisioningStatesEnumSucceeded),
// SapMonitorCollectorVersion: to.Ptr("v1.0"),
// },
// Tags: map[string]*string{
// },
// },
// }
}
Output:
Example (UpdateTagsFieldOfASapMonitor) ¶
Generated from example definition: 2020-02-07-preview/SapMonitors_PatchTags.json
package main
import (
"context"
"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"
"log"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhanaonazure.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSapMonitorsClient().Update(ctx, "myResourceGroup", "mySapMonitor", armhanaonazure.Tags{
Tags: map[string]*string{
"testkey": to.Ptr("testvalue"),
},
}, 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 = armhanaonazure.SapMonitorsClientUpdateResponse{
// SapMonitor: armhanaonazure.SapMonitor{
// Name: to.Ptr("mySapMonitor"),
// Type: to.Ptr("Microsoft.HanaOnAzure/sapMonitors"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor"),
// Location: to.Ptr("westus"),
// 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=="),
// ManagedResourceGroupName: to.Ptr("myManagedResourceGroup"),
// MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"),
// ProvisioningState: to.Ptr(armhanaonazure.HanaProvisioningStatesEnumSucceeded),
// SapMonitorCollectorVersion: to.Ptr("v1.0"),
// },
// Tags: map[string]*string{
// "testkey": to.Ptr("testvalue"),
// },
// },
// }
}
Output:
type SapMonitorsClientBeginCreateOptions ¶ added in v0.2.0
type SapMonitorsClientBeginCreateOptions struct {
// Resumes the long-running operation 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 long-running operation 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 {
// SAP monitor info on Azure (ARM properties and SAP monitor properties)
SapMonitor
}
SapMonitorsClientCreateResponse contains the response from method SapMonitorsClient.BeginCreate.
type SapMonitorsClientDeleteResponse ¶ added in v0.2.0
type SapMonitorsClientDeleteResponse struct {
}
SapMonitorsClientDeleteResponse contains the response from method SapMonitorsClient.BeginDelete.
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 {
// SAP monitor info on Azure (ARM properties and SAP monitor properties)
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.NewListPager method.
type SapMonitorsClientListResponse ¶ added in v0.2.0
type SapMonitorsClientListResponse struct {
// The response of a SapMonitor list operation.
SapMonitorListResult
}
SapMonitorsClientListResponse contains the response from method SapMonitorsClient.NewListPager.
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 {
// SAP monitor info on Azure (ARM properties and SAP monitor properties)
SapMonitor
}
SapMonitorsClientUpdateResponse contains the response from method SapMonitorsClient.Update.
type SystemData ¶ added in v0.8.0
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 ¶ added in v0.8.0
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶ added in v0.8.0
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type Tags ¶
Tags field of the resource.
func (Tags) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Tags.
func (*Tags) UnmarshalJSON ¶ added in v0.6.0
UnmarshalJSON implements the json.Unmarshaller interface for type Tags.