Documentation ¶
Index ¶
- type ActionType
- type ApplicationServerConfiguration
- type ApplicationServerFullResourceNames
- type ApplicationServerVMDetails
- type ApplicationServerVirtualMachineType
- type CentralServerConfiguration
- type CentralServerFullResourceNames
- type CentralServerVMDetails
- type CentralServerVirtualMachineType
- type Client
- func (client *Client) SAPAvailabilityZoneDetails(ctx context.Context, location string, ...) (ClientSAPAvailabilityZoneDetailsResponse, error)
- func (client *Client) SAPDiskConfigurations(ctx context.Context, location string, ...) (ClientSAPDiskConfigurationsResponse, error)
- func (client *Client) SAPSizingRecommendations(ctx context.Context, location string, ...) (ClientSAPSizingRecommendationsResponse, error)
- func (client *Client) SAPSupportedSKU(ctx context.Context, location string, options *ClientSAPSupportedSKUOptions) (ClientSAPSupportedSKUResponse, error)
- type ClientFactory
- func (c *ClientFactory) NewClient() *Client
- func (c *ClientFactory) NewMonitorsClient() *MonitorsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewProviderInstancesClient() *ProviderInstancesClient
- func (c *ClientFactory) NewSAPApplicationServerInstancesClient() *SAPApplicationServerInstancesClient
- func (c *ClientFactory) NewSAPCentralInstancesClient() *SAPCentralInstancesClient
- func (c *ClientFactory) NewSAPDatabaseInstancesClient() *SAPDatabaseInstancesClient
- func (c *ClientFactory) NewSAPVirtualInstancesClient() *SAPVirtualInstancesClient
- func (c *ClientFactory) NewSapLandscapeMonitorClient() *SapLandscapeMonitorClient
- type ClientSAPAvailabilityZoneDetailsOptions
- type ClientSAPAvailabilityZoneDetailsResponse
- type ClientSAPDiskConfigurationsOptions
- type ClientSAPDiskConfigurationsResponse
- type ClientSAPSizingRecommendationsOptions
- type ClientSAPSizingRecommendationsResponse
- type ClientSAPSupportedSKUOptions
- type ClientSAPSupportedSKUResponse
- type ConfigurationType
- type CreateAndMountFileShareConfiguration
- type CreatedByType
- type DB2ProviderInstanceProperties
- type DatabaseConfiguration
- type DatabaseServerFullResourceNames
- type DatabaseVMDetails
- type DeployerVMPackages
- type DeploymentConfiguration
- type DeploymentWithOSConfiguration
- type DiscoveryConfiguration
- type DiskConfiguration
- type DiskDetails
- type DiskSKU
- type DiskSKUName
- type DiskVolumeConfiguration
- type EnqueueReplicationServerProperties
- type EnqueueReplicationServerType
- type EnqueueServerProperties
- type Error
- type ErrorAdditionalInfo
- type ErrorDefinition
- type ErrorDetail
- type ErrorInnerError
- type ErrorResponse
- type ExternalInstallationSoftwareConfiguration
- type FileShareConfiguration
- type FileShareConfigurationClassification
- type GatewayServerProperties
- type HanaDbProviderInstanceProperties
- type HighAvailabilityConfiguration
- type HighAvailabilitySoftwareConfiguration
- type ImageReference
- type InfrastructureConfiguration
- type InfrastructureConfigurationClassification
- type LinuxConfiguration
- type LoadBalancerDetails
- type LoadBalancerResourceNames
- type ManagedRGConfiguration
- type ManagedServiceIdentityType
- type MessageServerProperties
- type Monitor
- type MonitorListResult
- type MonitorProperties
- type MonitorPropertiesErrors
- type MonitorsClient
- func (client *MonitorsClient) BeginCreate(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[MonitorsClientCreateResponse], error)
- func (client *MonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[MonitorsClientDeleteResponse], error)
- func (client *MonitorsClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ...) (MonitorsClientGetResponse, error)
- func (client *MonitorsClient) NewListByResourceGroupPager(resourceGroupName string, options *MonitorsClientListByResourceGroupOptions) *runtime.Pager[MonitorsClientListByResourceGroupResponse]
- func (client *MonitorsClient) NewListPager(options *MonitorsClientListOptions) *runtime.Pager[MonitorsClientListResponse]
- func (client *MonitorsClient) Update(ctx context.Context, resourceGroupName string, monitorName string, ...) (MonitorsClientUpdateResponse, error)
- type MonitorsClientBeginCreateOptions
- type MonitorsClientBeginDeleteOptions
- type MonitorsClientCreateResponse
- type MonitorsClientDeleteResponse
- type MonitorsClientGetOptions
- type MonitorsClientGetResponse
- type MonitorsClientListByResourceGroupOptions
- type MonitorsClientListByResourceGroupResponse
- type MonitorsClientListOptions
- type MonitorsClientListResponse
- type MonitorsClientUpdateOptions
- type MonitorsClientUpdateResponse
- type MountFileShareConfiguration
- type MsSQLServerProviderInstanceProperties
- type NamingPatternType
- type NetworkConfiguration
- type NetworkInterfaceResourceNames
- type OSConfiguration
- type OSConfigurationClassification
- type OSProfile
- type OSType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationProperties
- type OperationStatusResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OperationsContent
- type OperationsDefinition
- type OperationsDefinitionArrayResponseWithContinuation
- type OperationsDefinitionDisplay
- type OperationsDisplayDefinition
- type Origin
- type OsSapConfiguration
- type PrometheusHaClusterProviderInstanceProperties
- type PrometheusOSProviderInstanceProperties
- type ProviderInstance
- type ProviderInstanceListResult
- type ProviderInstanceProperties
- type ProviderInstancePropertiesErrors
- type ProviderInstancesClient
- func (client *ProviderInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[ProviderInstancesClientCreateResponse], error)
- func (client *ProviderInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, ...) (*runtime.Poller[ProviderInstancesClientDeleteResponse], error)
- func (client *ProviderInstancesClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ...) (ProviderInstancesClientGetResponse, error)
- func (client *ProviderInstancesClient) NewListPager(resourceGroupName string, monitorName string, ...) *runtime.Pager[ProviderInstancesClientListResponse]
- type ProviderInstancesClientBeginCreateOptions
- type ProviderInstancesClientBeginDeleteOptions
- type ProviderInstancesClientCreateResponse
- type ProviderInstancesClientDeleteResponse
- type ProviderInstancesClientGetOptions
- type ProviderInstancesClientGetResponse
- type ProviderInstancesClientListOptions
- type ProviderInstancesClientListResponse
- type ProviderSpecificProperties
- type ProviderSpecificPropertiesClassification
- type ProxyResource
- type Resource
- type RoutingPreference
- type SAPApplicationServerInstance
- type SAPApplicationServerInstanceList
- type SAPApplicationServerInstancesClient
- func (client *SAPApplicationServerInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPApplicationServerInstancesClientCreateResponse], error)
- func (client *SAPApplicationServerInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPApplicationServerInstancesClientDeleteResponse], error)
- func (client *SAPApplicationServerInstancesClient) BeginStartInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPApplicationServerInstancesClientStartInstanceResponse], ...)
- func (client *SAPApplicationServerInstancesClient) BeginStopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPApplicationServerInstancesClientStopInstanceResponse], ...)
- func (client *SAPApplicationServerInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPApplicationServerInstancesClientUpdateResponse], error)
- func (client *SAPApplicationServerInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPApplicationServerInstancesClientGetResponse, error)
- func (client *SAPApplicationServerInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, ...) *runtime.Pager[SAPApplicationServerInstancesClientListResponse]
- type SAPApplicationServerInstancesClientBeginCreateOptions
- type SAPApplicationServerInstancesClientBeginDeleteOptions
- type SAPApplicationServerInstancesClientBeginStartInstanceOptions
- type SAPApplicationServerInstancesClientBeginStopInstanceOptions
- type SAPApplicationServerInstancesClientBeginUpdateOptions
- type SAPApplicationServerInstancesClientCreateResponse
- type SAPApplicationServerInstancesClientDeleteResponse
- type SAPApplicationServerInstancesClientGetOptions
- type SAPApplicationServerInstancesClientGetResponse
- type SAPApplicationServerInstancesClientListOptions
- type SAPApplicationServerInstancesClientListResponse
- type SAPApplicationServerInstancesClientStartInstanceResponse
- type SAPApplicationServerInstancesClientStopInstanceResponse
- type SAPApplicationServerInstancesClientUpdateResponse
- type SAPApplicationServerProperties
- type SAPAvailabilityZoneDetailsRequest
- type SAPAvailabilityZoneDetailsResult
- type SAPAvailabilityZonePair
- type SAPCentralInstanceList
- type SAPCentralInstancesClient
- func (client *SAPCentralInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPCentralInstancesClientCreateResponse], error)
- func (client *SAPCentralInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPCentralInstancesClientDeleteResponse], error)
- func (client *SAPCentralInstancesClient) BeginStartInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPCentralInstancesClientStartInstanceResponse], error)
- func (client *SAPCentralInstancesClient) BeginStopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPCentralInstancesClientStopInstanceResponse], error)
- func (client *SAPCentralInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPCentralInstancesClientUpdateResponse], error)
- func (client *SAPCentralInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPCentralInstancesClientGetResponse, error)
- func (client *SAPCentralInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, ...) *runtime.Pager[SAPCentralInstancesClientListResponse]
- type SAPCentralInstancesClientBeginCreateOptions
- type SAPCentralInstancesClientBeginDeleteOptions
- type SAPCentralInstancesClientBeginStartInstanceOptions
- type SAPCentralInstancesClientBeginStopInstanceOptions
- type SAPCentralInstancesClientBeginUpdateOptions
- type SAPCentralInstancesClientCreateResponse
- type SAPCentralInstancesClientDeleteResponse
- type SAPCentralInstancesClientGetOptions
- type SAPCentralInstancesClientGetResponse
- type SAPCentralInstancesClientListOptions
- type SAPCentralInstancesClientListResponse
- type SAPCentralInstancesClientStartInstanceResponse
- type SAPCentralInstancesClientStopInstanceResponse
- type SAPCentralInstancesClientUpdateResponse
- type SAPCentralServerInstance
- type SAPCentralServerProperties
- type SAPConfiguration
- type SAPConfigurationClassification
- type SAPConfigurationType
- type SAPDatabaseInstance
- type SAPDatabaseInstanceList
- type SAPDatabaseInstancesClient
- func (client *SAPDatabaseInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPDatabaseInstancesClientCreateResponse], error)
- func (client *SAPDatabaseInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPDatabaseInstancesClientDeleteResponse], error)
- func (client *SAPDatabaseInstancesClient) BeginStartInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPDatabaseInstancesClientStartInstanceResponse], error)
- func (client *SAPDatabaseInstancesClient) BeginStopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPDatabaseInstancesClientStopInstanceResponse], error)
- func (client *SAPDatabaseInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPDatabaseInstancesClientUpdateResponse], error)
- func (client *SAPDatabaseInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPDatabaseInstancesClientGetResponse, error)
- func (client *SAPDatabaseInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, ...) *runtime.Pager[SAPDatabaseInstancesClientListResponse]
- type SAPDatabaseInstancesClientBeginCreateOptions
- type SAPDatabaseInstancesClientBeginDeleteOptions
- type SAPDatabaseInstancesClientBeginStartInstanceOptions
- type SAPDatabaseInstancesClientBeginStopInstanceOptions
- type SAPDatabaseInstancesClientBeginUpdateOptions
- type SAPDatabaseInstancesClientCreateResponse
- type SAPDatabaseInstancesClientDeleteResponse
- type SAPDatabaseInstancesClientGetOptions
- type SAPDatabaseInstancesClientGetResponse
- type SAPDatabaseInstancesClientListOptions
- type SAPDatabaseInstancesClientListResponse
- type SAPDatabaseInstancesClientStartInstanceResponse
- type SAPDatabaseInstancesClientStopInstanceResponse
- type SAPDatabaseInstancesClientUpdateResponse
- type SAPDatabaseProperties
- type SAPDatabaseScaleMethod
- type SAPDatabaseType
- type SAPDeploymentType
- type SAPDiskConfiguration
- type SAPDiskConfigurationsRequest
- type SAPDiskConfigurationsResult
- type SAPEnvironmentType
- type SAPHealthState
- type SAPHighAvailabilityType
- type SAPInstallWithoutOSConfigSoftwareConfiguration
- type SAPProductType
- type SAPSizingRecommendationRequest
- type SAPSizingRecommendationResult
- type SAPSizingRecommendationResultClassification
- type SAPSoftwareInstallationType
- type SAPSupportedResourceSKUsResult
- type SAPSupportedSKU
- type SAPSupportedSKUsRequest
- type SAPVirtualInstance
- type SAPVirtualInstanceError
- type SAPVirtualInstanceList
- type SAPVirtualInstanceProperties
- type SAPVirtualInstanceState
- type SAPVirtualInstanceStatus
- type SAPVirtualInstancesClient
- func (client *SAPVirtualInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPVirtualInstancesClientCreateResponse], error)
- func (client *SAPVirtualInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPVirtualInstancesClientDeleteResponse], error)
- func (client *SAPVirtualInstancesClient) BeginStart(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPVirtualInstancesClientStartResponse], error)
- func (client *SAPVirtualInstancesClient) BeginStop(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPVirtualInstancesClientStopResponse], error)
- func (client *SAPVirtualInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPVirtualInstancesClientGetResponse, error)
- func (client *SAPVirtualInstancesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[SAPVirtualInstancesClientListByResourceGroupResponse]
- func (client *SAPVirtualInstancesClient) NewListBySubscriptionPager(options *SAPVirtualInstancesClientListBySubscriptionOptions) *runtime.Pager[SAPVirtualInstancesClientListBySubscriptionResponse]
- func (client *SAPVirtualInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPVirtualInstancesClientUpdateResponse, error)
- type SAPVirtualInstancesClientBeginCreateOptions
- type SAPVirtualInstancesClientBeginDeleteOptions
- type SAPVirtualInstancesClientBeginStartOptions
- type SAPVirtualInstancesClientBeginStopOptions
- type SAPVirtualInstancesClientCreateResponse
- type SAPVirtualInstancesClientDeleteResponse
- type SAPVirtualInstancesClientGetOptions
- type SAPVirtualInstancesClientGetResponse
- type SAPVirtualInstancesClientListByResourceGroupOptions
- type SAPVirtualInstancesClientListByResourceGroupResponse
- type SAPVirtualInstancesClientListBySubscriptionOptions
- type SAPVirtualInstancesClientListBySubscriptionResponse
- type SAPVirtualInstancesClientStartResponse
- type SAPVirtualInstancesClientStopResponse
- type SAPVirtualInstancesClientUpdateOptions
- type SAPVirtualInstancesClientUpdateResponse
- type SSHConfiguration
- type SSHKeyPair
- type SSHPublicKey
- type SSLPreference
- type SapLandscapeMonitor
- type SapLandscapeMonitorClient
- func (client *SapLandscapeMonitorClient) Create(ctx context.Context, resourceGroupName string, monitorName string, ...) (SapLandscapeMonitorClientCreateResponse, error)
- func (client *SapLandscapeMonitorClient) Delete(ctx context.Context, resourceGroupName string, monitorName string, ...) (SapLandscapeMonitorClientDeleteResponse, error)
- func (client *SapLandscapeMonitorClient) Get(ctx context.Context, resourceGroupName string, monitorName string, ...) (SapLandscapeMonitorClientGetResponse, error)
- func (client *SapLandscapeMonitorClient) List(ctx context.Context, resourceGroupName string, monitorName string, ...) (SapLandscapeMonitorClientListResponse, error)
- func (client *SapLandscapeMonitorClient) Update(ctx context.Context, resourceGroupName string, monitorName string, ...) (SapLandscapeMonitorClientUpdateResponse, error)
- type SapLandscapeMonitorClientCreateOptions
- type SapLandscapeMonitorClientCreateResponse
- type SapLandscapeMonitorClientDeleteOptions
- type SapLandscapeMonitorClientDeleteResponse
- type SapLandscapeMonitorClientGetOptions
- type SapLandscapeMonitorClientGetResponse
- type SapLandscapeMonitorClientListOptions
- type SapLandscapeMonitorClientListResponse
- type SapLandscapeMonitorClientUpdateOptions
- type SapLandscapeMonitorClientUpdateResponse
- type SapLandscapeMonitorListResult
- type SapLandscapeMonitorMetricThresholds
- type SapLandscapeMonitorProperties
- type SapLandscapeMonitorPropertiesGrouping
- type SapLandscapeMonitorProvisioningState
- type SapLandscapeMonitorSidMapping
- type SapNetWeaverProviderInstanceProperties
- type SapVirtualInstanceProvisioningState
- type ServiceInitiatedSoftwareConfiguration
- type SharedStorageResourceNames
- type SingleServerConfiguration
- type SingleServerCustomResourceNames
- type SingleServerCustomResourceNamesClassification
- type SingleServerFullResourceNames
- type SingleServerRecommendationResult
- type SkipFileShareConfiguration
- type SoftwareConfiguration
- type SoftwareConfigurationClassification
- type StopRequest
- type StorageConfiguration
- type StorageInformation
- type SystemData
- type Tags
- type ThreeTierConfiguration
- type ThreeTierCustomResourceNames
- type ThreeTierCustomResourceNamesClassification
- type ThreeTierFullResourceNames
- type ThreeTierRecommendationResult
- type TrackedResource
- type UpdateMonitorRequest
- type UpdateSAPApplicationInstanceRequest
- type UpdateSAPCentralInstanceRequest
- type UpdateSAPDatabaseInstanceRequest
- type UpdateSAPVirtualInstanceRequest
- type UserAssignedIdentity
- type UserAssignedServiceIdentity
- type VirtualMachineConfiguration
- type VirtualMachineResourceNames
- type WindowsConfiguration
- type WorkloadMonitorActionType
- type WorkloadMonitorProvisioningState
Examples ¶
- Client.SAPAvailabilityZoneDetails (SapAvailabilityZoneDetailsEastus)
- Client.SAPAvailabilityZoneDetails (SapAvailabilityZoneDetailsNortheurope)
- Client.SAPDiskConfigurations (SapDiskConfigurationsNonProd)
- Client.SAPDiskConfigurations (SapDiskConfigurationsProd)
- Client.SAPSizingRecommendations (SapSizingRecommendationsS4HanaDistributed)
- Client.SAPSizingRecommendations (SapSizingRecommendationsS4HanaDistributedHaAvSet)
- Client.SAPSizingRecommendations (SapSizingRecommendationsS4HanaDistributedHaAvZone)
- Client.SAPSizingRecommendations (SapSizingRecommendationsS4HanaSingleServer)
- Client.SAPSupportedSKU (SapSupportedSkusDistributed)
- Client.SAPSupportedSKU (SapSupportedSkusDistributedHaAvSet)
- Client.SAPSupportedSKU (SapSupportedSkusDistributedHaAvZone)
- Client.SAPSupportedSKU (SapSupportedSkusSingleServer)
- MonitorsClient.BeginCreate
- MonitorsClient.BeginDelete
- MonitorsClient.Get
- MonitorsClient.NewListByResourceGroupPager
- MonitorsClient.NewListPager
- MonitorsClient.Update (DeleteTagsFieldOfASapMonitor)
- MonitorsClient.Update (UpdateTagsFieldOfASapMonitor)
- OperationsClient.NewListPager
- ProviderInstancesClient.BeginCreate (CreateADb2Provider)
- ProviderInstancesClient.BeginCreate (CreateADb2ProviderWithRootCertificate)
- ProviderInstancesClient.BeginCreate (CreateAMsSqlServerProvider)
- ProviderInstancesClient.BeginCreate (CreateAMsSqlServerProviderWithRootCertificate)
- ProviderInstancesClient.BeginCreate (CreateAOsProvider)
- ProviderInstancesClient.BeginCreate (CreateAOsProviderWithRootCertificate)
- ProviderInstancesClient.BeginCreate (CreateAPrometheusHaClusterProvider)
- ProviderInstancesClient.BeginCreate (CreateAPrometheusHaClusterProviderWithRootCertificate)
- ProviderInstancesClient.BeginCreate (CreateASapMonitorHanaProvider)
- ProviderInstancesClient.BeginCreate (CreateASapMonitorHanaProviderWithRootCertificate)
- ProviderInstancesClient.BeginCreate (CreateASapMonitorNetWeaverProvider)
- ProviderInstancesClient.BeginCreate (CreateASapMonitorNetWeaverProviderWithRootCertificate)
- ProviderInstancesClient.BeginDelete
- ProviderInstancesClient.Get (GetPropertiesOfADb2Provider)
- ProviderInstancesClient.Get (GetPropertiesOfAMsSqlServerProvider)
- ProviderInstancesClient.Get (GetPropertiesOfAOsProvider)
- ProviderInstancesClient.Get (GetPropertiesOfAPrometheusHaClusterProvider)
- ProviderInstancesClient.Get (GetPropertiesOfASapMonitorHanaProvider)
- ProviderInstancesClient.Get (GetPropertiesOfASapMonitorNetWeaverProvider)
- ProviderInstancesClient.NewListPager
- SAPApplicationServerInstancesClient.BeginCreate (CreateSapApplicationServerInstancesForHaSystemWithAvailabilitySet)
- SAPApplicationServerInstancesClient.BeginCreate (SapApplicationServerInstancesCreate)
- SAPApplicationServerInstancesClient.BeginDelete
- SAPApplicationServerInstancesClient.BeginStartInstance
- SAPApplicationServerInstancesClient.BeginStopInstance
- SAPApplicationServerInstancesClient.BeginUpdate
- SAPApplicationServerInstancesClient.Get
- SAPApplicationServerInstancesClient.NewListPager
- SAPCentralInstancesClient.BeginCreate (CreateSapCentralInstancesForHaSystemWithAvailabilitySet)
- SAPCentralInstancesClient.BeginCreate (SapCentralInstancesCreate)
- SAPCentralInstancesClient.BeginDelete
- SAPCentralInstancesClient.BeginStartInstance
- SAPCentralInstancesClient.BeginStopInstance
- SAPCentralInstancesClient.BeginUpdate
- SAPCentralInstancesClient.Get
- SAPCentralInstancesClient.NewListPager
- SAPDatabaseInstancesClient.BeginCreate (CreateSapDatabaseInstancesForHaSystemWithAvailabilitySet)
- SAPDatabaseInstancesClient.BeginCreate (SapDatabaseInstancesCreate)
- SAPDatabaseInstancesClient.BeginDelete
- SAPDatabaseInstancesClient.BeginStartInstance
- SAPDatabaseInstancesClient.BeginStopInstance
- SAPDatabaseInstancesClient.BeginUpdate
- SAPDatabaseInstancesClient.Get
- SAPDatabaseInstancesClient.NewListPager
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureOnlyForDistributedSystem)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureOnlyForHaSystemWithAvailabilitySet)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureOnlyForHaSystemWithAvailabilityZone)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureOnlyForSingleServerSystem)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithANewSapTransportDirectoryFileshare)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithAnExistingSapTransportDirectoryFileshare)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithDiskAndOsConfigurationForDistributedSystemRecommended)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithDiskAndOsConfigurationForHaSystemWithAvailabilitySetRecommended)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithDiskAndOsConfigurationForHaSystemWithAvailabilityZoneRecommended)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithDiskAndOsConfigurationsForSingleServerSystemRecommended)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationForDistributedSystemRecommended)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationForHaSystemWithAvailabilitySetRecommended)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationForHaSystemWithAvailabilityZoneRecommended)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationForSingleServerSystemRecommended)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForDistributedSystem)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForSingleServerSystem)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithoutASapTransportDirectoryFileshare)
- SAPVirtualInstancesClient.BeginCreate (DetectSapSoftwareInstallationOnADistributedSystem)
- SAPVirtualInstancesClient.BeginCreate (DetectSapSoftwareInstallationOnASingleServerSystem)
- SAPVirtualInstancesClient.BeginCreate (DetectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet)
- SAPVirtualInstancesClient.BeginCreate (DetectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone)
- SAPVirtualInstancesClient.BeginCreate (InstallSapSoftwareOnDistributedSystem)
- SAPVirtualInstancesClient.BeginCreate (InstallSapSoftwareOnSingleServerSystem)
- SAPVirtualInstancesClient.BeginCreate (RegisterExistingSapSystemAsVirtualInstanceForSapSolutions)
- SAPVirtualInstancesClient.BeginCreate (RegisterExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations)
- SAPVirtualInstancesClient.BeginDelete
- SAPVirtualInstancesClient.BeginStart
- SAPVirtualInstancesClient.BeginStop
- SAPVirtualInstancesClient.Get
- SAPVirtualInstancesClient.NewListByResourceGroupPager
- SAPVirtualInstancesClient.NewListBySubscriptionPager
- SAPVirtualInstancesClient.Update
- SapLandscapeMonitorClient.Create
- SapLandscapeMonitorClient.Delete
- SapLandscapeMonitorClient.Get
- SapLandscapeMonitorClient.List
- SapLandscapeMonitorClient.Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type ApplicationServerConfiguration ¶ added in v0.2.0
type ApplicationServerConfiguration struct { // REQUIRED; The number of app server instances. InstanceCount *int64 // REQUIRED; The subnet id. SubnetID *string // REQUIRED; Gets or sets the virtual machine configuration. VirtualMachineConfiguration *VirtualMachineConfiguration }
ApplicationServerConfiguration - Gets or sets the application server configuration.
func (ApplicationServerConfiguration) MarshalJSON ¶ added in v0.2.0
func (a ApplicationServerConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationServerConfiguration.
func (*ApplicationServerConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (a *ApplicationServerConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationServerConfiguration.
type ApplicationServerFullResourceNames ¶ added in v0.3.0
type ApplicationServerFullResourceNames struct { // The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. AvailabilitySetName *string // The list of virtual machine naming details. VirtualMachines []*VirtualMachineResourceNames }
ApplicationServerFullResourceNames - The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer.
func (ApplicationServerFullResourceNames) MarshalJSON ¶ added in v0.3.0
func (a ApplicationServerFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationServerFullResourceNames.
func (*ApplicationServerFullResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (a *ApplicationServerFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationServerFullResourceNames.
type ApplicationServerVMDetails ¶ added in v0.3.0
type ApplicationServerVMDetails struct { // READ-ONLY; Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared // Storage. StorageDetails []*StorageInformation // READ-ONLY; Defines the type of application server VM. Type *ApplicationServerVirtualMachineType // READ-ONLY VirtualMachineID *string }
ApplicationServerVMDetails - The Application Server VM Details.
func (ApplicationServerVMDetails) MarshalJSON ¶ added in v0.3.0
func (a ApplicationServerVMDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationServerVMDetails.
func (*ApplicationServerVMDetails) UnmarshalJSON ¶ added in v0.3.0
func (a *ApplicationServerVMDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationServerVMDetails.
type ApplicationServerVirtualMachineType ¶ added in v0.3.0
type ApplicationServerVirtualMachineType string
ApplicationServerVirtualMachineType - Defines the type of application server VM.
const ( ApplicationServerVirtualMachineTypeActive ApplicationServerVirtualMachineType = "Active" ApplicationServerVirtualMachineTypeStandby ApplicationServerVirtualMachineType = "Standby" ApplicationServerVirtualMachineTypeUnknown ApplicationServerVirtualMachineType = "Unknown" )
func PossibleApplicationServerVirtualMachineTypeValues ¶ added in v0.3.0
func PossibleApplicationServerVirtualMachineTypeValues() []ApplicationServerVirtualMachineType
PossibleApplicationServerVirtualMachineTypeValues returns the possible values for the ApplicationServerVirtualMachineType const type.
type CentralServerConfiguration ¶ added in v0.2.0
type CentralServerConfiguration struct { // REQUIRED; The number of central server VMs. InstanceCount *int64 // REQUIRED; The subnet id. SubnetID *string // REQUIRED; Gets or sets the virtual machine configuration. VirtualMachineConfiguration *VirtualMachineConfiguration }
CentralServerConfiguration - Gets or sets the central server configuration.
func (CentralServerConfiguration) MarshalJSON ¶ added in v0.2.0
func (c CentralServerConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CentralServerConfiguration.
func (*CentralServerConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (c *CentralServerConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CentralServerConfiguration.
type CentralServerFullResourceNames ¶ added in v0.3.0
type CentralServerFullResourceNames struct { // The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. AvailabilitySetName *string // The resource names object for load balancer and related resources. LoadBalancer *LoadBalancerResourceNames // The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the // number VMs to be created for ASCS layer. At maximum, there can be two virtual // machines at this layer: ASCS and ERS. VirtualMachines []*VirtualMachineResourceNames }
CentralServerFullResourceNames - The full resource names object for central server layer resources.
func (CentralServerFullResourceNames) MarshalJSON ¶ added in v0.3.0
func (c CentralServerFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CentralServerFullResourceNames.
func (*CentralServerFullResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (c *CentralServerFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CentralServerFullResourceNames.
type CentralServerVMDetails ¶ added in v0.2.0
type CentralServerVMDetails struct { // READ-ONLY; Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared // Storage. StorageDetails []*StorageInformation // READ-ONLY; Defines the type of central server VM. Type *CentralServerVirtualMachineType // READ-ONLY VirtualMachineID *string }
CentralServerVMDetails - The SAP Central Services Instance VM details.
func (CentralServerVMDetails) MarshalJSON ¶ added in v0.2.0
func (c CentralServerVMDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CentralServerVMDetails.
func (*CentralServerVMDetails) UnmarshalJSON ¶ added in v0.2.0
func (c *CentralServerVMDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CentralServerVMDetails.
type CentralServerVirtualMachineType ¶ added in v0.2.0
type CentralServerVirtualMachineType string
CentralServerVirtualMachineType - Defines the type of central server VM.
const ( CentralServerVirtualMachineTypeASCS CentralServerVirtualMachineType = "ASCS" CentralServerVirtualMachineTypeERS CentralServerVirtualMachineType = "ERS" CentralServerVirtualMachineTypeERSInactive CentralServerVirtualMachineType = "ERSInactive" CentralServerVirtualMachineTypePrimary CentralServerVirtualMachineType = "Primary" CentralServerVirtualMachineTypeSecondary CentralServerVirtualMachineType = "Secondary" CentralServerVirtualMachineTypeStandby CentralServerVirtualMachineType = "Standby" CentralServerVirtualMachineTypeUnknown CentralServerVirtualMachineType = "Unknown" )
func PossibleCentralServerVirtualMachineTypeValues ¶ added in v0.2.0
func PossibleCentralServerVirtualMachineTypeValues() []CentralServerVirtualMachineType
PossibleCentralServerVirtualMachineTypeValues returns the possible values for the CentralServerVirtualMachineType const type.
type Client ¶ added in v0.2.0
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the WorkloadsClient group. Don't use this type directly, use NewClient() instead.
func NewClient ¶ added in v0.2.0
func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)
NewClient creates a new instance of Client with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*Client) SAPAvailabilityZoneDetails ¶ added in v0.2.0
func (client *Client) SAPAvailabilityZoneDetails(ctx context.Context, location string, options *ClientSAPAvailabilityZoneDetailsOptions) (ClientSAPAvailabilityZoneDetailsResponse, error)
SAPAvailabilityZoneDetails - Get the recommended SAP Availability Zone Pair Details for your region. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- location - The name of Azure region.
- options - ClientSAPAvailabilityZoneDetailsOptions contains the optional parameters for the Client.SAPAvailabilityZoneDetails method.
Example (SapAvailabilityZoneDetailsEastus) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPAvailabilityZoneDetails(ctx, "centralus", &armworkloads.ClientSAPAvailabilityZoneDetailsOptions{SAPAvailabilityZoneDetails: 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.SAPAvailabilityZoneDetailsResult = armworkloads.SAPAvailabilityZoneDetailsResult{ // AvailabilityZonePairs: []*armworkloads.SAPAvailabilityZonePair{ // { // ZoneA: to.Ptr[int64](1), // ZoneB: to.Ptr[int64](2), // }}, // } }
Output:
Example (SapAvailabilityZoneDetailsNortheurope) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_northeurope.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPAvailabilityZoneDetails(ctx, "centralus", &armworkloads.ClientSAPAvailabilityZoneDetailsOptions{SAPAvailabilityZoneDetails: 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.SAPAvailabilityZoneDetailsResult = armworkloads.SAPAvailabilityZoneDetailsResult{ // AvailabilityZonePairs: []*armworkloads.SAPAvailabilityZonePair{ // { // ZoneA: to.Ptr[int64](2), // ZoneB: to.Ptr[int64](3), // }}, // } }
Output:
func (*Client) SAPDiskConfigurations ¶ added in v0.2.0
func (client *Client) SAPDiskConfigurations(ctx context.Context, location string, options *ClientSAPDiskConfigurationsOptions) (ClientSAPDiskConfigurationsResponse, error)
SAPDiskConfigurations - Get the SAP Disk Configuration Layout prod/non-prod SAP System. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- location - The name of Azure region.
- options - ClientSAPDiskConfigurationsOptions contains the optional parameters for the Client.SAPDiskConfigurations method.
Example (SapDiskConfigurationsNonProd) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPDiskConfigurations(ctx, "centralus", &armworkloads.ClientSAPDiskConfigurationsOptions{SAPDiskConfigurations: 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.SAPDiskConfigurationsResult = armworkloads.SAPDiskConfigurationsResult{ // VolumeConfigurations: map[string]*armworkloads.SAPDiskConfiguration{ // "backup": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("E10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](6), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](0), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("E15"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](6), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](0), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("E20"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](6), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](0), // SizeGB: to.Ptr[int64](512), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](6), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](0), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P15"), // IopsReadWrite: to.Ptr[int64](1100), // MaximumSupportedDiskCount: to.Ptr[int64](6), // MbpsReadWrite: to.Ptr[int64](125), // MinimumSupportedDiskCount: to.Ptr[int64](0), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P20"), // IopsReadWrite: to.Ptr[int64](2300), // MaximumSupportedDiskCount: to.Ptr[int64](6), // MbpsReadWrite: to.Ptr[int64](150), // MinimumSupportedDiskCount: to.Ptr[int64](0), // SizeGB: to.Ptr[int64](512), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/data": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](5), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/log": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](5), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/shared": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P15"), // IopsReadWrite: to.Ptr[int64](1100), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](125), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P20"), // IopsReadWrite: to.Ptr[int64](2300), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](150), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](512), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P30"), // IopsReadWrite: to.Ptr[int64](5000), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](200), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](1024), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P40"), // IopsReadWrite: to.Ptr[int64](7500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](250), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](2048), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P50"), // IopsReadWrite: to.Ptr[int64](7500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](250), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](4096), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("E15"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("E20"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](512), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("E30"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](1024), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("E40"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](2048), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("E50"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](4096), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }}, // }, // "os": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P6"), // IopsReadWrite: to.Ptr[int64](240), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](50), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P6"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }}, // }, // "usr/sap": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](1100), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](125), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](2300), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](150), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](512), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("E10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("E15"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // { // DiskTier: to.Ptr("E20"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](60), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](512), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }}, // }, // }, // } }
Output:
Example (SapDiskConfigurationsProd) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDiskConfigurations_Prod.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPDiskConfigurations(ctx, "centralus", &armworkloads.ClientSAPDiskConfigurationsOptions{SAPDiskConfigurations: 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.SAPDiskConfigurationsResult = armworkloads.SAPDiskConfigurationsResult{ // VolumeConfigurations: map[string]*armworkloads.SAPDiskConfiguration{ // "backup": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](6), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](0), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P15"), // IopsReadWrite: to.Ptr[int64](1100), // MaximumSupportedDiskCount: to.Ptr[int64](6), // MbpsReadWrite: to.Ptr[int64](125), // MinimumSupportedDiskCount: to.Ptr[int64](0), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P20"), // IopsReadWrite: to.Ptr[int64](2300), // MaximumSupportedDiskCount: to.Ptr[int64](6), // MbpsReadWrite: to.Ptr[int64](150), // MinimumSupportedDiskCount: to.Ptr[int64](0), // SizeGB: to.Ptr[int64](512), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/data": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](5), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/log": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](5), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/shared": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P15"), // IopsReadWrite: to.Ptr[int64](1100), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](125), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P20"), // IopsReadWrite: to.Ptr[int64](2300), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](150), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](512), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P30"), // IopsReadWrite: to.Ptr[int64](5000), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](200), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](1024), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P40"), // IopsReadWrite: to.Ptr[int64](7500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](250), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](2048), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P50"), // IopsReadWrite: to.Ptr[int64](7500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](250), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](4096), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }}, // }, // "os": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P6"), // IopsReadWrite: to.Ptr[int64](240), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](50), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }}, // }, // "usr/sap": &armworkloads.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloads.DiskDetails{ // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](500), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](100), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](1100), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](125), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // { // DiskTier: to.Ptr("P10"), // IopsReadWrite: to.Ptr[int64](2300), // MaximumSupportedDiskCount: to.Ptr[int64](1), // MbpsReadWrite: to.Ptr[int64](150), // MinimumSupportedDiskCount: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](512), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }}, // }, // }, // } }
Output:
func (*Client) SAPSizingRecommendations ¶ added in v0.2.0
func (client *Client) SAPSizingRecommendations(ctx context.Context, location string, options *ClientSAPSizingRecommendationsOptions) (ClientSAPSizingRecommendationsResponse, error)
SAPSizingRecommendations - Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- location - The name of Azure region.
- options - ClientSAPSizingRecommendationsOptions contains the optional parameters for the Client.SAPSizingRecommendations method.
Example (SapSizingRecommendationsS4HanaDistributed) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPSizingRecommendations(ctx, "centralus", &armworkloads.ClientSAPSizingRecommendationsOptions{SAPSizingRecommendation: 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 = armworkloads.ClientSAPSizingRecommendationsResponse{ // SAPSizingRecommendationResultClassification: &armworkloads.ThreeTierRecommendationResult{ // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServerInstanceCount: to.Ptr[int64](2), // ApplicationServerVMSKU: to.Ptr("Standard_E8ds_v4"), // CentralServerInstanceCount: to.Ptr[int64](1), // CentralServerVMSKU: to.Ptr("Standard_E4ds_v4"), // DatabaseInstanceCount: to.Ptr[int64](1), // DbVMSKU: to.Ptr("Standard_M64s"), // }, // } }
Output:
Example (SapSizingRecommendationsS4HanaDistributedHaAvSet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPSizingRecommendations(ctx, "centralus", &armworkloads.ClientSAPSizingRecommendationsOptions{SAPSizingRecommendation: 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 = armworkloads.ClientSAPSizingRecommendationsResponse{ // SAPSizingRecommendationResultClassification: &armworkloads.ThreeTierRecommendationResult{ // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServerInstanceCount: to.Ptr[int64](3), // ApplicationServerVMSKU: to.Ptr("Standard_E16ds_v4"), // CentralServerInstanceCount: to.Ptr[int64](2), // CentralServerVMSKU: to.Ptr("Standard_E8ds_v4"), // DatabaseInstanceCount: to.Ptr[int64](2), // DbVMSKU: to.Ptr("Standard_M64s"), // }, // } }
Output:
Example (SapSizingRecommendationsS4HanaDistributedHaAvZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPSizingRecommendations(ctx, "centralus", &armworkloads.ClientSAPSizingRecommendationsOptions{SAPSizingRecommendation: 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 = armworkloads.ClientSAPSizingRecommendationsResponse{ // SAPSizingRecommendationResultClassification: &armworkloads.ThreeTierRecommendationResult{ // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServerInstanceCount: to.Ptr[int64](6), // ApplicationServerVMSKU: to.Ptr("Standard_E8ds_v4"), // CentralServerInstanceCount: to.Ptr[int64](2), // CentralServerVMSKU: to.Ptr("Standard_E4ds_v4"), // DatabaseInstanceCount: to.Ptr[int64](2), // DbVMSKU: to.Ptr("Standard_M64s"), // }, // } }
Output:
Example (SapSizingRecommendationsS4HanaSingleServer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPSizingRecommendations(ctx, "centralus", &armworkloads.ClientSAPSizingRecommendationsOptions{SAPSizingRecommendation: 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 = armworkloads.ClientSAPSizingRecommendationsResponse{ // SAPSizingRecommendationResultClassification: &armworkloads.SingleServerRecommendationResult{ // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), // VMSKU: to.Ptr("Standard_M128s"), // }, // } }
Output:
func (*Client) SAPSupportedSKU ¶ added in v0.2.0
func (client *Client) SAPSupportedSKU(ctx context.Context, location string, options *ClientSAPSupportedSKUOptions) (ClientSAPSupportedSKUResponse, error)
SAPSupportedSKU - Get a list of SAP supported SKUs for ASCS, Application and Database tier. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- location - The name of Azure region.
- options - ClientSAPSupportedSKUOptions contains the optional parameters for the Client.SAPSupportedSKU method.
Example (SapSupportedSkusDistributed) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPSupportedSKU(ctx, "centralus", &armworkloads.ClientSAPSupportedSKUOptions{SAPSupportedSKU: 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.SAPSupportedResourceSKUsResult = armworkloads.SAPSupportedResourceSKUsResult{ // SupportedSKUs: []*armworkloads.SAPSupportedSKU{ // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E4ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E8ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E16ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E20ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E32ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E48ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E64ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M32Is"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M32ts"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M64Is"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M64ms"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M64s"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M128ms"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M128s"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M208ms_v2"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M208s_v2"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M416ms_v2"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M416s_v2"), // }}, // } }
Output:
Example (SapSupportedSkusDistributedHaAvSet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvSet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPSupportedSKU(ctx, "centralus", &armworkloads.ClientSAPSupportedSKUOptions{SAPSupportedSKU: 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.SAPSupportedResourceSKUsResult = armworkloads.SAPSupportedResourceSKUsResult{ // SupportedSKUs: []*armworkloads.SAPSupportedSKU{ // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E4ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E8ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E16ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E20ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E32ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E48ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E64ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M32Is"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M32ts"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M64Is"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M64ms"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M64s"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M128ms"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M128s"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M208ms_v2"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M208s_v2"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M416ms_v2"), // }, // { // IsAppServerCertified: to.Ptr(false), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M416s_v2"), // }}, // } }
Output:
Example (SapSupportedSkusDistributedHaAvZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvZone.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPSupportedSKU(ctx, "centralus", &armworkloads.ClientSAPSupportedSKUOptions{SAPSupportedSKU: 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.SAPSupportedResourceSKUsResult = armworkloads.SAPSupportedResourceSKUsResult{ // SupportedSKUs: []*armworkloads.SAPSupportedSKU{ // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_E32ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_E48ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_E64ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M32Is"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M32ts"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M64Is"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M64ms"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M64s"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M128ms"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M128s"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M208ms_v2"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M208s_v2"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M416ms_v2"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M416s_v2"), // }}, // } }
Output:
Example (SapSupportedSkusSingleServer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSupportedSkus_SingleServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().SAPSupportedSKU(ctx, "centralus", &armworkloads.ClientSAPSupportedSKUOptions{SAPSupportedSKU: 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.SAPSupportedResourceSKUsResult = armworkloads.SAPSupportedResourceSKUsResult{ // SupportedSKUs: []*armworkloads.SAPSupportedSKU{ // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E32ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E48ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(false), // VMSKU: to.Ptr("Standard_E64ds_v4"), // }, // { // IsAppServerCertified: to.Ptr(true), // IsDatabaseCertified: to.Ptr(true), // VMSKU: to.Ptr("Standard_M32ts"), // }}, // } }
Output:
type ClientFactory ¶ added in v1.0.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.0.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewClient ¶ added in v1.0.0
func (c *ClientFactory) NewClient() *Client
NewClient creates a new instance of Client.
func (*ClientFactory) NewMonitorsClient ¶ added in v1.0.0
func (c *ClientFactory) NewMonitorsClient() *MonitorsClient
NewMonitorsClient creates a new instance of MonitorsClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.0.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewProviderInstancesClient ¶ added in v1.0.0
func (c *ClientFactory) NewProviderInstancesClient() *ProviderInstancesClient
NewProviderInstancesClient creates a new instance of ProviderInstancesClient.
func (*ClientFactory) NewSAPApplicationServerInstancesClient ¶ added in v1.0.0
func (c *ClientFactory) NewSAPApplicationServerInstancesClient() *SAPApplicationServerInstancesClient
NewSAPApplicationServerInstancesClient creates a new instance of SAPApplicationServerInstancesClient.
func (*ClientFactory) NewSAPCentralInstancesClient ¶ added in v1.0.0
func (c *ClientFactory) NewSAPCentralInstancesClient() *SAPCentralInstancesClient
NewSAPCentralInstancesClient creates a new instance of SAPCentralInstancesClient.
func (*ClientFactory) NewSAPDatabaseInstancesClient ¶ added in v1.0.0
func (c *ClientFactory) NewSAPDatabaseInstancesClient() *SAPDatabaseInstancesClient
NewSAPDatabaseInstancesClient creates a new instance of SAPDatabaseInstancesClient.
func (*ClientFactory) NewSAPVirtualInstancesClient ¶ added in v1.0.0
func (c *ClientFactory) NewSAPVirtualInstancesClient() *SAPVirtualInstancesClient
NewSAPVirtualInstancesClient creates a new instance of SAPVirtualInstancesClient.
func (*ClientFactory) NewSapLandscapeMonitorClient ¶ added in v1.0.0
func (c *ClientFactory) NewSapLandscapeMonitorClient() *SapLandscapeMonitorClient
NewSapLandscapeMonitorClient creates a new instance of SapLandscapeMonitorClient.
type ClientSAPAvailabilityZoneDetailsOptions ¶ added in v0.2.0
type ClientSAPAvailabilityZoneDetailsOptions struct { // SAP Availability Zone Details Request body SAPAvailabilityZoneDetails *SAPAvailabilityZoneDetailsRequest }
ClientSAPAvailabilityZoneDetailsOptions contains the optional parameters for the Client.SAPAvailabilityZoneDetails method.
type ClientSAPAvailabilityZoneDetailsResponse ¶ added in v0.2.0
type ClientSAPAvailabilityZoneDetailsResponse struct { // The list of supported availability zone pairs which are part of SAP HA deployment. SAPAvailabilityZoneDetailsResult }
ClientSAPAvailabilityZoneDetailsResponse contains the response from method Client.SAPAvailabilityZoneDetails.
type ClientSAPDiskConfigurationsOptions ¶ added in v0.2.0
type ClientSAPDiskConfigurationsOptions struct { // SAP Disk Configurations Request body SAPDiskConfigurations *SAPDiskConfigurationsRequest }
ClientSAPDiskConfigurationsOptions contains the optional parameters for the Client.SAPDiskConfigurations method.
type ClientSAPDiskConfigurationsResponse ¶ added in v0.2.0
type ClientSAPDiskConfigurationsResponse struct { // The list of disk configuration for vmSku which are part of SAP deployment. SAPDiskConfigurationsResult }
ClientSAPDiskConfigurationsResponse contains the response from method Client.SAPDiskConfigurations.
type ClientSAPSizingRecommendationsOptions ¶ added in v0.2.0
type ClientSAPSizingRecommendationsOptions struct { // SAP Sizing Recommendation Request body SAPSizingRecommendation *SAPSizingRecommendationRequest }
ClientSAPSizingRecommendationsOptions contains the optional parameters for the Client.SAPSizingRecommendations method.
type ClientSAPSizingRecommendationsResponse ¶ added in v0.2.0
type ClientSAPSizingRecommendationsResponse struct { // The SAP sizing recommendation result. SAPSizingRecommendationResultClassification }
ClientSAPSizingRecommendationsResponse contains the response from method Client.SAPSizingRecommendations.
func (*ClientSAPSizingRecommendationsResponse) UnmarshalJSON ¶ added in v0.2.0
func (c *ClientSAPSizingRecommendationsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClientSAPSizingRecommendationsResponse.
type ClientSAPSupportedSKUOptions ¶ added in v0.2.0
type ClientSAPSupportedSKUOptions struct { // SAP Supported SKU Request body SAPSupportedSKU *SAPSupportedSKUsRequest }
ClientSAPSupportedSKUOptions contains the optional parameters for the Client.SAPSupportedSKU method.
type ClientSAPSupportedSKUResponse ¶ added in v0.2.0
type ClientSAPSupportedSKUResponse struct { // The list of supported SKUs for different resources which are part of SAP deployment. SAPSupportedResourceSKUsResult }
ClientSAPSupportedSKUResponse contains the response from method Client.SAPSupportedSKU.
type ConfigurationType ¶ added in v0.3.0
type ConfigurationType string
ConfigurationType - The type of file share config.
const ( ConfigurationTypeCreateAndMount ConfigurationType = "CreateAndMount" ConfigurationTypeMount ConfigurationType = "Mount" ConfigurationTypeSkip ConfigurationType = "Skip" )
func PossibleConfigurationTypeValues ¶ added in v0.3.0
func PossibleConfigurationTypeValues() []ConfigurationType
PossibleConfigurationTypeValues returns the possible values for the ConfigurationType const type.
type CreateAndMountFileShareConfiguration ¶ added in v0.3.0
type CreateAndMountFileShareConfiguration struct { ConfigurationType // of missing input. ResourceGroup *string StorageAccountName *string }ConfigurationType *
CreateAndMountFileShareConfiguration - Gets or sets the file share configuration where the transport directory fileshare is created and mounted as a part of the create infra flow. Please pre-create the resource group you intend to place the transport directory in. The storage account and fileshare will be auto-created by the ACSS and doesn’t need to pre-created.
func (*CreateAndMountFileShareConfiguration) GetFileShareConfiguration ¶ added in v0.3.0
func (c *CreateAndMountFileShareConfiguration) GetFileShareConfiguration() *FileShareConfiguration
GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type CreateAndMountFileShareConfiguration.
func (CreateAndMountFileShareConfiguration) MarshalJSON ¶ added in v0.3.0
func (c CreateAndMountFileShareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateAndMountFileShareConfiguration.
func (*CreateAndMountFileShareConfiguration) UnmarshalJSON ¶ added in v0.3.0
func (c *CreateAndMountFileShareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CreateAndMountFileShareConfiguration.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DB2ProviderInstanceProperties ¶
type DB2ProviderInstanceProperties struct { // REQUIRED; The provider type. For example, the value can be SapHana. ProviderType *string // Gets or sets the db2 database name. DbName *string // Gets or sets the db2 database password. DbPassword *string // Gets or sets the key vault URI to secret with the database password. DbPasswordURI *string // Gets or sets the db2 database sql port. DbPort *string // Gets or sets the db2 database user name. DbUsername *string // Gets or sets the target virtual machine name. Hostname *string // Gets or sets the blob URI to SSL certificate for the DB2 Database. SSLCertificateURI *string // Gets or sets certificate preference if secure communication is enabled. SSLPreference *SSLPreference // Gets or sets the SAP System Identifier SapSid *string }
DB2ProviderInstanceProperties - Gets or sets the DB2 provider properties.
func (*DB2ProviderInstanceProperties) GetProviderSpecificProperties ¶
func (d *DB2ProviderInstanceProperties) GetProviderSpecificProperties() *ProviderSpecificProperties
GetProviderSpecificProperties implements the ProviderSpecificPropertiesClassification interface for type DB2ProviderInstanceProperties.
func (DB2ProviderInstanceProperties) MarshalJSON ¶
func (d DB2ProviderInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DB2ProviderInstanceProperties.
func (*DB2ProviderInstanceProperties) UnmarshalJSON ¶
func (d *DB2ProviderInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DB2ProviderInstanceProperties.
type DatabaseConfiguration ¶ added in v0.2.0
type DatabaseConfiguration struct { // REQUIRED; The number of database VMs. InstanceCount *int64 // REQUIRED; The subnet id. SubnetID *string // REQUIRED; Gets or sets the virtual machine configuration. VirtualMachineConfiguration *VirtualMachineConfiguration // The database type. DatabaseType *SAPDatabaseType // Gets or sets the disk configuration. DiskConfiguration *DiskConfiguration }
DatabaseConfiguration - Gets or sets the database configuration.
func (DatabaseConfiguration) MarshalJSON ¶ added in v0.2.0
func (d DatabaseConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseConfiguration.
func (*DatabaseConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (d *DatabaseConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConfiguration.
type DatabaseServerFullResourceNames ¶ added in v0.3.0
type DatabaseServerFullResourceNames struct { // The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. AvailabilitySetName *string // The resource names object for load balancer and related resources. LoadBalancer *LoadBalancerResourceNames // The list of virtual machine naming details. VirtualMachines []*VirtualMachineResourceNames }
DatabaseServerFullResourceNames - The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer.
func (DatabaseServerFullResourceNames) MarshalJSON ¶ added in v0.3.0
func (d DatabaseServerFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseServerFullResourceNames.
func (*DatabaseServerFullResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (d *DatabaseServerFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseServerFullResourceNames.
type DatabaseVMDetails ¶ added in v0.2.0
type DatabaseVMDetails struct { // READ-ONLY; Defines the SAP Instance status. Status *SAPVirtualInstanceStatus // READ-ONLY; Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared // Storage. StorageDetails []*StorageInformation // READ-ONLY VirtualMachineID *string }
DatabaseVMDetails - Database VM details.
func (DatabaseVMDetails) MarshalJSON ¶ added in v0.2.0
func (d DatabaseVMDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVMDetails.
func (*DatabaseVMDetails) UnmarshalJSON ¶ added in v0.2.0
func (d *DatabaseVMDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVMDetails.
type DeployerVMPackages ¶ added in v0.2.0
type DeployerVMPackages struct { // The deployer VM packages storage account id StorageAccountID *string // The URL to the deployer VM packages file. URL *string }
DeployerVMPackages - Defines the url and storage account ID where deployer VM packages are uploaded
func (DeployerVMPackages) MarshalJSON ¶ added in v0.2.0
func (d DeployerVMPackages) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeployerVMPackages.
func (*DeployerVMPackages) UnmarshalJSON ¶ added in v0.2.0
func (d *DeployerVMPackages) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeployerVMPackages.
type DeploymentConfiguration ¶ added in v0.2.0
type DeploymentConfiguration struct { // REQUIRED; The configuration Type. ConfigurationType *SAPConfigurationType // The geo-location where the SAP system is to be created. AppLocation *string // The infrastructure configuration. InfrastructureConfiguration InfrastructureConfigurationClassification // The software configuration. SoftwareConfiguration SoftwareConfigurationClassification }
DeploymentConfiguration - Deployment Configuration.
func (*DeploymentConfiguration) GetSAPConfiguration ¶ added in v0.2.0
func (d *DeploymentConfiguration) GetSAPConfiguration() *SAPConfiguration
GetSAPConfiguration implements the SAPConfigurationClassification interface for type DeploymentConfiguration.
func (DeploymentConfiguration) MarshalJSON ¶ added in v0.2.0
func (d DeploymentConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeploymentConfiguration.
func (*DeploymentConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (d *DeploymentConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentConfiguration.
type DeploymentWithOSConfiguration ¶ added in v0.2.0
type DeploymentWithOSConfiguration struct { // REQUIRED; The configuration Type. ConfigurationType *SAPConfigurationType // The geo-location where the SAP system is to be created. AppLocation *string // The infrastructure configuration. InfrastructureConfiguration InfrastructureConfigurationClassification // The OS and SAP configuration. OSSapConfiguration *OsSapConfiguration // The software configuration. SoftwareConfiguration SoftwareConfigurationClassification }
DeploymentWithOSConfiguration - Deployment along with OS Configuration.
func (*DeploymentWithOSConfiguration) GetSAPConfiguration ¶ added in v0.2.0
func (d *DeploymentWithOSConfiguration) GetSAPConfiguration() *SAPConfiguration
GetSAPConfiguration implements the SAPConfigurationClassification interface for type DeploymentWithOSConfiguration.
func (DeploymentWithOSConfiguration) MarshalJSON ¶ added in v0.2.0
func (d DeploymentWithOSConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeploymentWithOSConfiguration.
func (*DeploymentWithOSConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (d *DeploymentWithOSConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentWithOSConfiguration.
type DiscoveryConfiguration ¶ added in v0.2.0
type DiscoveryConfiguration struct { // REQUIRED; The configuration Type. ConfigurationType *SAPConfigurationType // The virtual machine ID of the Central Server. CentralServerVMID *string // The custom storage account name for the storage account created by the service in the managed resource group created as // part of VIS deployment. // Refer to the storage account naming rules here [https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage]. // If not provided, the service will create the storage account with a random name. ManagedRgStorageAccountName *string // READ-ONLY; The geo-location where the SAP system exists. AppLocation *string }
DiscoveryConfiguration - Discovery Details.
func (*DiscoveryConfiguration) GetSAPConfiguration ¶ added in v0.2.0
func (d *DiscoveryConfiguration) GetSAPConfiguration() *SAPConfiguration
GetSAPConfiguration implements the SAPConfigurationClassification interface for type DiscoveryConfiguration.
func (DiscoveryConfiguration) MarshalJSON ¶ added in v0.2.0
func (d DiscoveryConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiscoveryConfiguration.
func (*DiscoveryConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (d *DiscoveryConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiscoveryConfiguration.
type DiskConfiguration ¶ added in v0.3.0
type DiskConfiguration struct { // The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', // 'os'], Optional volume : ['backup']. DiskVolumeConfigurations map[string]*DiskVolumeConfiguration }
DiskConfiguration - The Disk Configuration Details.
func (DiskConfiguration) MarshalJSON ¶ added in v0.3.0
func (d DiskConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiskConfiguration.
func (*DiskConfiguration) UnmarshalJSON ¶ added in v0.3.0
func (d *DiskConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiskConfiguration.
type DiskDetails ¶ added in v0.3.0
type DiskDetails struct { // The disk tier, e.g. P10, E10. DiskTier *string // The disk Iops. IopsReadWrite *int64 // The maximum supported disk count. MaximumSupportedDiskCount *int64 // The disk provisioned throughput in MBps. MbpsReadWrite *int64 // The minimum supported disk count. MinimumSupportedDiskCount *int64 // The type of disk sku. For example, StandardLRS, StandardZRS, PremiumLRS, PremiumZRS. SKU *DiskSKU // The disk size in GB. SizeGB *int64 }
DiskDetails - The supported disk size details for a disk type.
func (DiskDetails) MarshalJSON ¶ added in v0.3.0
func (d DiskDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiskDetails.
func (*DiskDetails) UnmarshalJSON ¶ added in v0.3.0
func (d *DiskDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiskDetails.
type DiskSKU ¶ added in v0.3.0
type DiskSKU struct { // Defines the disk sku name. Name *DiskSKUName }
DiskSKU - The type of disk sku. For example, StandardLRS, StandardZRS, PremiumLRS, PremiumZRS.
func (DiskSKU) MarshalJSON ¶ added in v0.3.0
MarshalJSON implements the json.Marshaller interface for type DiskSKU.
func (*DiskSKU) UnmarshalJSON ¶ added in v0.3.0
UnmarshalJSON implements the json.Unmarshaller interface for type DiskSKU.
type DiskSKUName ¶ added in v0.3.0
type DiskSKUName string
DiskSKUName - Defines the disk sku name.
const ( DiskSKUNamePremiumLRS DiskSKUName = "Premium_LRS" DiskSKUNamePremiumV2LRS DiskSKUName = "PremiumV2_LRS" DiskSKUNamePremiumZRS DiskSKUName = "Premium_ZRS" DiskSKUNameStandardLRS DiskSKUName = "Standard_LRS" DiskSKUNameStandardSSDLRS DiskSKUName = "StandardSSD_LRS" DiskSKUNameStandardSSDZRS DiskSKUName = "StandardSSD_ZRS" DiskSKUNameUltraSSDLRS DiskSKUName = "UltraSSD_LRS" )
func PossibleDiskSKUNameValues ¶ added in v0.3.0
func PossibleDiskSKUNameValues() []DiskSKUName
PossibleDiskSKUNameValues returns the possible values for the DiskSKUName const type.
type DiskVolumeConfiguration ¶ added in v0.3.0
type DiskVolumeConfiguration struct { // The total number of disks required for the concerned volume. Count *int64 // The disk SKU details. SKU *DiskSKU // The disk size in GB. SizeGB *int64 }
DiskVolumeConfiguration - The disk configuration required for the selected volume.
func (DiskVolumeConfiguration) MarshalJSON ¶ added in v0.3.0
func (d DiskVolumeConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiskVolumeConfiguration.
func (*DiskVolumeConfiguration) UnmarshalJSON ¶ added in v0.3.0
func (d *DiskVolumeConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiskVolumeConfiguration.
type EnqueueReplicationServerProperties ¶ added in v0.2.0
type EnqueueReplicationServerProperties struct { // READ-ONLY; Defines the type of Enqueue Replication Server. ErsVersion *EnqueueReplicationServerType // READ-ONLY; Defines the health of SAP Instances. Health *SAPHealthState // READ-ONLY; ERS SAP Hostname. Hostname *string // READ-ONLY; ERS SAP IP Address. IPAddress *string // READ-ONLY; ERS Instance Number. InstanceNo *string // READ-ONLY; ERS SAP Kernel Patch level. KernelPatch *string // READ-ONLY; ERS SAP Kernel Version. KernelVersion *string }
EnqueueReplicationServerProperties - Defines the SAP Enqueue Replication Server (ERS) properties.
func (EnqueueReplicationServerProperties) MarshalJSON ¶ added in v0.2.0
func (e EnqueueReplicationServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnqueueReplicationServerProperties.
func (*EnqueueReplicationServerProperties) UnmarshalJSON ¶ added in v0.2.0
func (e *EnqueueReplicationServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnqueueReplicationServerProperties.
type EnqueueReplicationServerType ¶ added in v0.2.0
type EnqueueReplicationServerType string
EnqueueReplicationServerType - Defines the type of Enqueue Replication Server.
const ( EnqueueReplicationServerTypeEnqueueReplicator1 EnqueueReplicationServerType = "EnqueueReplicator1" EnqueueReplicationServerTypeEnqueueReplicator2 EnqueueReplicationServerType = "EnqueueReplicator2" )
func PossibleEnqueueReplicationServerTypeValues ¶ added in v0.2.0
func PossibleEnqueueReplicationServerTypeValues() []EnqueueReplicationServerType
PossibleEnqueueReplicationServerTypeValues returns the possible values for the EnqueueReplicationServerType const type.
type EnqueueServerProperties ¶ added in v0.2.0
type EnqueueServerProperties struct { // READ-ONLY; Defines the health of SAP Instances. Health *SAPHealthState // READ-ONLY; Enqueue Server SAP Hostname. Hostname *string // READ-ONLY; Enqueue Server SAP IP Address. IPAddress *string // READ-ONLY; Enqueue Server Port. Port *int64 }
EnqueueServerProperties - Defines the SAP Enqueue Server properties.
func (EnqueueServerProperties) MarshalJSON ¶ added in v0.2.0
func (e EnqueueServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnqueueServerProperties.
func (*EnqueueServerProperties) UnmarshalJSON ¶ added in v0.2.0
func (e *EnqueueServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnqueueServerProperties.
type Error ¶
type Error struct { // READ-ONLY; Server-defined set of error codes. Code *string // READ-ONLY; Array of details about specific errors that led to this reported error. Details []*Error // READ-ONLY; Object containing more specific information than the current object about the error. InnerError *ErrorInnerError // READ-ONLY; Human-readable representation of the error. Message *string // READ-ONLY; Target of the error. Target *string }
Error - Standard error object.
func (Error) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Error.
func (*Error) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Error.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info any // READ-ONLY; The additional info type. Type *string }
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶ added in v0.2.0
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶ added in v0.2.0
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDefinition ¶ added in v0.2.0
type ErrorDefinition struct { // READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. Code *string // READ-ONLY; Internal error details. Details []*ErrorDefinition // READ-ONLY; Description of the error. Message *string }
ErrorDefinition - Error definition.
func (ErrorDefinition) MarshalJSON ¶ added in v0.2.0
func (e ErrorDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.
func (*ErrorDefinition) UnmarshalJSON ¶ added in v0.2.0
func (e *ErrorDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition.
type ErrorDetail ¶
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶ added in v0.2.0
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶ added in v0.2.0
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ErrorInnerError ¶
type ErrorInnerError struct { // Standard error object. InnerError *Error }
ErrorInnerError - Object containing more specific information than the current object about the error.
func (ErrorInnerError) MarshalJSON ¶ added in v0.2.0
func (e ErrorInnerError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorInnerError.
func (*ErrorInnerError) UnmarshalJSON ¶ added in v0.2.0
func (e *ErrorInnerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorInnerError.
type ErrorResponse ¶
type ErrorResponse struct { // The error object. Error *ErrorDetail }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
func (ErrorResponse) MarshalJSON ¶ added in v0.2.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v0.2.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type ExternalInstallationSoftwareConfiguration ¶ added in v0.3.0
type ExternalInstallationSoftwareConfiguration struct { // REQUIRED; The SAP software installation Type. SoftwareInstallationType *SAPSoftwareInstallationType // The resource ID of the virtual machine containing the central server instance. CentralServerVMID *string }
ExternalInstallationSoftwareConfiguration - The SAP Software configuration Input when the software is installed externally outside the service.
func (*ExternalInstallationSoftwareConfiguration) GetSoftwareConfiguration ¶ added in v0.3.0
func (e *ExternalInstallationSoftwareConfiguration) GetSoftwareConfiguration() *SoftwareConfiguration
GetSoftwareConfiguration implements the SoftwareConfigurationClassification interface for type ExternalInstallationSoftwareConfiguration.
func (ExternalInstallationSoftwareConfiguration) MarshalJSON ¶ added in v0.3.0
func (e ExternalInstallationSoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExternalInstallationSoftwareConfiguration.
func (*ExternalInstallationSoftwareConfiguration) UnmarshalJSON ¶ added in v0.3.0
func (e *ExternalInstallationSoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExternalInstallationSoftwareConfiguration.
type FileShareConfiguration ¶ added in v0.3.0
type FileShareConfiguration struct { ConfigurationType }ConfigurationType *
FileShareConfiguration - File Share configuration details, populated with information on storage configuration mounted on the VIS. The createAndMount option is selected in case of missing input.
func (*FileShareConfiguration) GetFileShareConfiguration ¶ added in v0.3.0
func (f *FileShareConfiguration) GetFileShareConfiguration() *FileShareConfiguration
GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type FileShareConfiguration.
func (FileShareConfiguration) MarshalJSON ¶ added in v0.3.0
func (f FileShareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FileShareConfiguration.
func (*FileShareConfiguration) UnmarshalJSON ¶ added in v0.3.0
func (f *FileShareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FileShareConfiguration.
type FileShareConfigurationClassification ¶ added in v0.3.0
type FileShareConfigurationClassification interface { FileShareConfiguration }GetFileShareConfiguration() *
FileShareConfigurationClassification provides polymorphic access to related types. Call the interface's GetFileShareConfiguration() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *CreateAndMountFileShareConfiguration, *FileShareConfiguration, *MountFileShareConfiguration, *SkipFileShareConfiguration
type GatewayServerProperties ¶ added in v0.2.0
type GatewayServerProperties struct { // READ-ONLY; Defines the health of SAP Instances. Health *SAPHealthState // READ-ONLY; Gateway Port. Port *int64 }
GatewayServerProperties - Defines the SAP Gateway Server properties.
func (GatewayServerProperties) MarshalJSON ¶ added in v0.2.0
func (g GatewayServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GatewayServerProperties.
func (*GatewayServerProperties) UnmarshalJSON ¶ added in v0.2.0
func (g *GatewayServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GatewayServerProperties.
type HanaDbProviderInstanceProperties ¶
type HanaDbProviderInstanceProperties struct { // REQUIRED; The provider type. For example, the value can be SapHana. ProviderType *string // Gets or sets the hana database name. DbName *string // Gets or sets the database password. DbPassword *string // Gets or sets the key vault URI to secret with the database password. DbPasswordURI *string // Gets or sets the database user name. DbUsername *string // Gets or sets the target virtual machine size. Hostname *string // Gets or sets the database instance number. InstanceNumber *string // Gets or sets the database sql port. SQLPort *string // Gets or sets the blob URI to SSL certificate for the DB. SSLCertificateURI *string // Gets or sets the hostname(s) in the SSL certificate. SSLHostNameInCertificate *string // Gets or sets certificate preference if secure communication is enabled. SSLPreference *SSLPreference // Gets or sets the SAP System Identifier. SapSid *string }
HanaDbProviderInstanceProperties - Gets or sets the provider properties.
func (*HanaDbProviderInstanceProperties) GetProviderSpecificProperties ¶
func (h *HanaDbProviderInstanceProperties) GetProviderSpecificProperties() *ProviderSpecificProperties
GetProviderSpecificProperties implements the ProviderSpecificPropertiesClassification interface for type HanaDbProviderInstanceProperties.
func (HanaDbProviderInstanceProperties) MarshalJSON ¶
func (h HanaDbProviderInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HanaDbProviderInstanceProperties.
func (*HanaDbProviderInstanceProperties) UnmarshalJSON ¶
func (h *HanaDbProviderInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HanaDbProviderInstanceProperties.
type HighAvailabilityConfiguration ¶ added in v0.2.0
type HighAvailabilityConfiguration struct { // REQUIRED; The high availability type. HighAvailabilityType *SAPHighAvailabilityType }
HighAvailabilityConfiguration - Gets or sets the high availability configuration.
func (HighAvailabilityConfiguration) MarshalJSON ¶ added in v0.2.0
func (h HighAvailabilityConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HighAvailabilityConfiguration.
func (*HighAvailabilityConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (h *HighAvailabilityConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HighAvailabilityConfiguration.
type HighAvailabilitySoftwareConfiguration ¶ added in v0.2.0
type HighAvailabilitySoftwareConfiguration struct { // REQUIRED; The fencing client id. FencingClientID *string // REQUIRED; The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop // the cluster VMs. FencingClientPassword *string }
HighAvailabilitySoftwareConfiguration - Gets or sets the HA software configuration.
func (HighAvailabilitySoftwareConfiguration) MarshalJSON ¶ added in v0.2.0
func (h HighAvailabilitySoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HighAvailabilitySoftwareConfiguration.
func (*HighAvailabilitySoftwareConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (h *HighAvailabilitySoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HighAvailabilitySoftwareConfiguration.
type ImageReference ¶ added in v0.2.0
type ImageReference struct { // Specifies the offer of the platform image or marketplace image used to create the virtual machine. Offer *string // The image publisher. Publisher *string // The image SKU. SKU *string // Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats // are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. // Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image // will not automatically update after deploy time even if a new version becomes // available. Version *string }
ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.
func (ImageReference) MarshalJSON ¶ added in v0.2.0
func (i ImageReference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageReference.
func (*ImageReference) UnmarshalJSON ¶ added in v0.2.0
func (i *ImageReference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageReference.
type InfrastructureConfiguration ¶ added in v0.2.0
type InfrastructureConfiguration struct { // REQUIRED; The application resource group where SAP system resources will be deployed. AppResourceGroup *string // REQUIRED; The type of SAP deployment, single server or Three tier. DeploymentType *SAPDeploymentType }
InfrastructureConfiguration - Deploy SAP Infrastructure Details.
func (*InfrastructureConfiguration) GetInfrastructureConfiguration ¶ added in v0.2.0
func (i *InfrastructureConfiguration) GetInfrastructureConfiguration() *InfrastructureConfiguration
GetInfrastructureConfiguration implements the InfrastructureConfigurationClassification interface for type InfrastructureConfiguration.
func (InfrastructureConfiguration) MarshalJSON ¶ added in v0.2.0
func (i InfrastructureConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InfrastructureConfiguration.
func (*InfrastructureConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (i *InfrastructureConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InfrastructureConfiguration.
type InfrastructureConfigurationClassification ¶ added in v0.2.0
type InfrastructureConfigurationClassification interface { // GetInfrastructureConfiguration returns the InfrastructureConfiguration content of the underlying type. GetInfrastructureConfiguration() *InfrastructureConfiguration }
InfrastructureConfigurationClassification provides polymorphic access to related types. Call the interface's GetInfrastructureConfiguration() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *InfrastructureConfiguration, *SingleServerConfiguration, *ThreeTierConfiguration
type LinuxConfiguration ¶ added in v0.2.0
type LinuxConfiguration struct { // REQUIRED; The OS Type OSType *OSType // Specifies whether password authentication should be disabled. DisablePasswordAuthentication *bool // Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' instead) SSH *SSHConfiguration // The SSH Key-pair used to authenticate with the VM's. SSHKeyPair *SSHKeyPair }
LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions [https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros].
func (*LinuxConfiguration) GetOSConfiguration ¶ added in v0.2.0
func (l *LinuxConfiguration) GetOSConfiguration() *OSConfiguration
GetOSConfiguration implements the OSConfigurationClassification interface for type LinuxConfiguration.
func (LinuxConfiguration) MarshalJSON ¶ added in v0.2.0
func (l LinuxConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LinuxConfiguration.
func (*LinuxConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (l *LinuxConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LinuxConfiguration.
type LoadBalancerDetails ¶ added in v0.3.0
type LoadBalancerDetails struct { // READ-ONLY ID *string }
LoadBalancerDetails - The Load Balancer details such as Load Balancer ID.
func (LoadBalancerDetails) MarshalJSON ¶ added in v0.3.0
func (l LoadBalancerDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadBalancerDetails.
func (*LoadBalancerDetails) UnmarshalJSON ¶ added in v0.3.0
func (l *LoadBalancerDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerDetails.
type LoadBalancerResourceNames ¶ added in v0.3.0
type LoadBalancerResourceNames struct { // The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1 BackendPoolNames []*string // The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should // be 1 for database layer. FrontendIPConfigurationNames []*string // The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database // layer. HealthProbeNames []*string // The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. LoadBalancerName *string }
LoadBalancerResourceNames - The resource names object for load balancer and related resources.
func (LoadBalancerResourceNames) MarshalJSON ¶ added in v0.3.0
func (l LoadBalancerResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadBalancerResourceNames.
func (*LoadBalancerResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (l *LoadBalancerResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerResourceNames.
type ManagedRGConfiguration ¶
type ManagedRGConfiguration struct { // Managed resource group name Name *string }
ManagedRGConfiguration - Managed resource group configuration
func (ManagedRGConfiguration) MarshalJSON ¶ added in v0.2.0
func (m ManagedRGConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedRGConfiguration.
func (*ManagedRGConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (m *ManagedRGConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRGConfiguration.
type ManagedServiceIdentityType ¶ added in v0.2.0
type ManagedServiceIdentityType string
ManagedServiceIdentityType - Type of managed service identity (only None, UserAssigned types are allowed).
const ( ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" )
func PossibleManagedServiceIdentityTypeValues ¶ added in v0.2.0
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType
PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.
type MessageServerProperties ¶ added in v0.2.0
type MessageServerProperties struct { // READ-ONLY; Message Server HTTP Port. HTTPPort *int64 // READ-ONLY; Message Server HTTPS Port. HTTPSPort *int64 // READ-ONLY; Defines the health of SAP Instances. Health *SAPHealthState // READ-ONLY; Message Server SAP Hostname. Hostname *string // READ-ONLY; Message server IP Address. IPAddress *string // READ-ONLY; Message Server internal MS port. InternalMsPort *int64 // READ-ONLY; Message Server port. MSPort *int64 }
MessageServerProperties - Defines the SAP Message Server properties.
func (MessageServerProperties) MarshalJSON ¶ added in v0.2.0
func (m MessageServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MessageServerProperties.
func (*MessageServerProperties) UnmarshalJSON ¶ added in v0.2.0
func (m *MessageServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MessageServerProperties.
type Monitor ¶
type Monitor struct { // REQUIRED; The geo-location where the resource lives Location *string // [currently not in use] Managed service identity(user assigned identities) Identity *UserAssignedServiceIdentity // SAP monitor properties Properties *MonitorProperties // 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 }
Monitor - SAP monitor info on Azure (ARM properties and SAP monitor properties)
func (Monitor) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Monitor.
func (*Monitor) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Monitor.
type MonitorListResult ¶
type MonitorListResult struct { // The URL to get the next set of SAP monitors. NextLink *string // The list of SAP monitors. Value []*Monitor }
MonitorListResult - The response from the List SAP monitors operation.
func (MonitorListResult) MarshalJSON ¶ added in v0.2.0
func (m MonitorListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitorListResult.
func (*MonitorListResult) UnmarshalJSON ¶ added in v0.2.0
func (m *MonitorListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitorListResult.
type MonitorProperties ¶
type MonitorProperties struct { // The SAP monitor resources will be deployed in the SAP monitoring region. The subnet region should be same as the SAP monitoring // region. AppLocation *string // The ARM ID of the Log Analytics Workspace that is used for SAP monitoring. LogAnalyticsWorkspaceArmID *string // Managed resource group configuration ManagedResourceGroupConfiguration *ManagedRGConfiguration // The subnet which the SAP monitor will be deployed in MonitorSubnet *string // Sets the routing preference of the SAP monitor. By default only RFC1918 traffic is routed to the customer VNET. RoutingPreference *RoutingPreference // Sets the preference for zone redundancy on resources created for the SAP monitor. By default resources will be created // which do not support zone redundancy. ZoneRedundancyPreference *string // READ-ONLY; Defines the SAP monitor errors. Errors *MonitorPropertiesErrors // READ-ONLY; The ARM ID of the MSI used for SAP monitoring. MsiArmID *string // READ-ONLY; State of provisioning of the SAP monitor. ProvisioningState *WorkloadMonitorProvisioningState // READ-ONLY; The ARM ID of the Storage account used for SAP monitoring. StorageAccountArmID *string }
MonitorProperties - Describes the properties of a SAP monitor.
func (MonitorProperties) MarshalJSON ¶ added in v0.2.0
func (m MonitorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitorProperties.
func (*MonitorProperties) UnmarshalJSON ¶ added in v0.2.0
func (m *MonitorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitorProperties.
type MonitorPropertiesErrors ¶
type MonitorPropertiesErrors struct { // READ-ONLY; Server-defined set of error codes. Code *string // READ-ONLY; Array of details about specific errors that led to this reported error. Details []*Error // READ-ONLY; Object containing more specific information than the current object about the error. InnerError *ErrorInnerError // READ-ONLY; Human-readable representation of the error. Message *string // READ-ONLY; Target of the error. Target *string }
MonitorPropertiesErrors - Defines the SAP monitor errors.
func (MonitorPropertiesErrors) MarshalJSON ¶
func (m MonitorPropertiesErrors) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MonitorPropertiesErrors.
func (*MonitorPropertiesErrors) UnmarshalJSON ¶ added in v0.2.0
func (m *MonitorPropertiesErrors) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MonitorPropertiesErrors.
type MonitorsClient ¶
type MonitorsClient struct {
// contains filtered or unexported fields
}
MonitorsClient contains the methods for the Monitors group. Don't use this type directly, use NewMonitorsClient() instead.
func NewMonitorsClient ¶
func NewMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MonitorsClient, error)
NewMonitorsClient creates a new instance of MonitorsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*MonitorsClient) BeginCreate ¶
func (client *MonitorsClient) BeginCreate(ctx context.Context, resourceGroupName string, monitorName string, monitorParameter Monitor, options *MonitorsClientBeginCreateOptions) (*runtime.Poller[MonitorsClientCreateResponse], 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 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- monitorParameter - Request body representing a SAP monitor
- options - MonitorsClientBeginCreateOptions contains the optional parameters for the MonitorsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/monitors_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMonitorsClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", armworkloads.Monitor{ Location: to.Ptr("westus"), Tags: map[string]*string{ "key": to.Ptr("value"), }, Properties: &armworkloads.MonitorProperties{ AppLocation: to.Ptr("westus"), LogAnalyticsWorkspaceArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace"), ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ Name: to.Ptr("myManagedRg"), }, MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), RoutingPreference: to.Ptr(armworkloads.RoutingPreferenceRouteAll), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Monitor = armworkloads.Monitor{ // Name: to.Ptr("mySapMonitor"), // Type: to.Ptr("Microsoft.Workloads/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armworkloads.MonitorProperties{ // AppLocation: to.Ptr("eastus"), // Errors: &armworkloads.MonitorPropertiesErrors{ // }, // LogAnalyticsWorkspaceArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace"), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("myManagedRg"), // }, // MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), // MsiArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi"), // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // RoutingPreference: to.Ptr(armworkloads.RoutingPreferenceRouteAll), // StorageAccountArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"), // ZoneRedundancyPreference: to.Ptr("ZoneRedundantApp"), // }, // } }
Output:
func (*MonitorsClient) BeginDelete ¶
func (client *MonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientBeginDeleteOptions) (*runtime.Poller[MonitorsClientDeleteResponse], error)
BeginDelete - Deletes a SAP monitor with the specified subscription, resource group, and SAP monitor name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- options - MonitorsClientBeginDeleteOptions contains the optional parameters for the MonitorsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/monitors_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewMonitorsClient().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 pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("1e4193c3-206e-4916-b124-1da16175eb0f"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/operations/locations/westus/1e4193c3-206e-4916-b124-1da16175eb0f"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*MonitorsClient) Get ¶
func (client *MonitorsClient) Get(ctx context.Context, resourceGroupName string, monitorName string, options *MonitorsClientGetOptions) (MonitorsClientGetResponse, 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 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- options - MonitorsClientGetOptions contains the optional parameters for the MonitorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/monitors_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMonitorsClient().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.Monitor = armworkloads.Monitor{ // Name: to.Ptr("mySapMonitor1"), // Type: to.Ptr("Microsoft.Workloads/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armworkloads.MonitorProperties{ // AppLocation: to.Ptr("eastus"), // Errors: &armworkloads.MonitorPropertiesErrors{ // }, // LogAnalyticsWorkspaceArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace"), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("myManagedRg"), // }, // MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), // MsiArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi"), // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // RoutingPreference: to.Ptr(armworkloads.RoutingPreferenceRouteAll), // StorageAccountArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"), // ZoneRedundancyPreference: to.Ptr("ZoneRedundantApp"), // }, // } }
Output:
func (*MonitorsClient) NewListByResourceGroupPager ¶
func (client *MonitorsClient) NewListByResourceGroupPager(resourceGroupName string, options *MonitorsClientListByResourceGroupOptions) *runtime.Pager[MonitorsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets a list of SAP monitors in the specified resource group.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - MonitorsClientListByResourceGroupOptions contains the optional parameters for the MonitorsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/monitors_ListByRG.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMonitorsClient().NewListByResourceGroupPager("example-rg", 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.MonitorListResult = armworkloads.MonitorListResult{ // Value: []*armworkloads.Monitor{ // { // Name: to.Ptr("mySapMonitor1"), // Type: to.Ptr("Microsoft.Workloads/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Workloads/monitors/mySapMonitor1"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armworkloads.MonitorProperties{ // AppLocation: to.Ptr("eastus"), // Errors: &armworkloads.MonitorPropertiesErrors{ // }, // LogAnalyticsWorkspaceArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/example-rg/providers/microsoft.operationalinsights/workspaces/myWorkspace"), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("myManagedRg1"), // }, // MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), // MsiArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi"), // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // RoutingPreference: to.Ptr(armworkloads.RoutingPreferenceRouteAll), // StorageAccountArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"), // ZoneRedundancyPreference: to.Ptr("ZoneRedundantApp"), // }, // }, // { // Name: to.Ptr("mySapMonitor2"), // Type: to.Ptr("Microsoft.Workloads/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Workloads/monitors/mySapMonitor2"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armworkloads.MonitorProperties{ // AppLocation: to.Ptr("westus"), // Errors: &armworkloads.MonitorPropertiesErrors{ // }, // LogAnalyticsWorkspaceArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/example-rg/providers/microsoft.operationalinsights/workspaces/myWorkspace"), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("myManagedRg2"), // }, // MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), // MsiArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi"), // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // RoutingPreference: to.Ptr(armworkloads.RoutingPreferenceDefault), // StorageAccountArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"), // }, // }}, // } } }
Output:
func (*MonitorsClient) NewListPager ¶
func (client *MonitorsClient) NewListPager(options *MonitorsClientListOptions) *runtime.Pager[MonitorsClientListResponse]
NewListPager - Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP monitor.
Generated from API version 2023-04-01
- options - MonitorsClientListOptions contains the optional parameters for the MonitorsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/monitors_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewMonitorsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MonitorListResult = armworkloads.MonitorListResult{ // Value: []*armworkloads.Monitor{ // { // Name: to.Ptr("mySapMonitor1"), // Type: to.Ptr("Microsoft.Workloads/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor1"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armworkloads.MonitorProperties{ // AppLocation: to.Ptr("eastus"), // Errors: &armworkloads.MonitorPropertiesErrors{ // }, // LogAnalyticsWorkspaceArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace"), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("myManagedRg1"), // }, // MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), // MsiArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi"), // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // RoutingPreference: to.Ptr(armworkloads.RoutingPreferenceRouteAll), // StorageAccountArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"), // ZoneRedundancyPreference: to.Ptr("ZoneRedundantApp"), // }, // }, // { // Name: to.Ptr("mySapMonitor2"), // Type: to.Ptr("Microsoft.Workloads/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor2"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armworkloads.MonitorProperties{ // AppLocation: to.Ptr("westus"), // Errors: &armworkloads.MonitorPropertiesErrors{ // }, // LogAnalyticsWorkspaceArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace"), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("myManagedRg2"), // }, // MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), // MsiArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi"), // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // RoutingPreference: to.Ptr(armworkloads.RoutingPreferenceDefault), // StorageAccountArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"), // }, // }}, // } } }
Output:
func (*MonitorsClient) Update ¶
func (client *MonitorsClient) Update(ctx context.Context, resourceGroupName string, monitorName string, body UpdateMonitorRequest, options *MonitorsClientUpdateOptions) (MonitorsClientUpdateResponse, error)
Update - Patches the Tags field of a SAP monitor for the specified subscription, resource group, and SAP monitor name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- body - The Update SAP workload monitor request body.
- options - MonitorsClientUpdateOptions contains the optional parameters for the MonitorsClient.Update method.
Example (DeleteTagsFieldOfASapMonitor) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/monitors_PatchTags_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMonitorsClient().Update(ctx, "myResourceGroup", "mySapMonitor", armworkloads.UpdateMonitorRequest{ Identity: &armworkloads.UserAssignedServiceIdentity{ Type: to.Ptr(armworkloads.ManagedServiceIdentityTypeNone), }, 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.Monitor = armworkloads.Monitor{ // Name: to.Ptr("mySapMonitor"), // Type: to.Ptr("Microsoft.Workloads/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "testkey": to.Ptr("testvalue"), // }, // Identity: &armworkloads.UserAssignedServiceIdentity{ // Type: to.Ptr(armworkloads.ManagedServiceIdentityTypeNone), // }, // Properties: &armworkloads.MonitorProperties{ // AppLocation: to.Ptr("eastus"), // Errors: &armworkloads.MonitorPropertiesErrors{ // }, // LogAnalyticsWorkspaceArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace"), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("myManagedRg"), // }, // MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), // MsiArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi"), // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // RoutingPreference: to.Ptr(armworkloads.RoutingPreferenceRouteAll), // StorageAccountArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"), // ZoneRedundancyPreference: to.Ptr("ZoneRedundantApp"), // }, // } }
Output:
Example (UpdateTagsFieldOfASapMonitor) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/monitors_PatchTags.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMonitorsClient().Update(ctx, "myResourceGroup", "mySapMonitor", armworkloads.UpdateMonitorRequest{ Identity: &armworkloads.UserAssignedServiceIdentity{ Type: to.Ptr(armworkloads.ManagedServiceIdentityTypeNone), }, 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.Monitor = armworkloads.Monitor{ // Name: to.Ptr("mySapMonitor"), // Type: to.Ptr("Microsoft.Workloads/monitors"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "testkey": to.Ptr("testvalue"), // }, // Identity: &armworkloads.UserAssignedServiceIdentity{ // Type: to.Ptr(armworkloads.ManagedServiceIdentityTypeNone), // }, // Properties: &armworkloads.MonitorProperties{ // AppLocation: to.Ptr("eastus"), // Errors: &armworkloads.MonitorPropertiesErrors{ // }, // LogAnalyticsWorkspaceArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.operationalinsights/workspaces/myWorkspace"), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("myManagedRg"), // }, // MonitorSubnet: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), // MsiArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myMsi"), // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // RoutingPreference: to.Ptr(armworkloads.RoutingPreferenceRouteAll), // StorageAccountArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"), // ZoneRedundancyPreference: to.Ptr("ZoneRedundantApp"), // }, // } }
Output:
type MonitorsClientBeginCreateOptions ¶
type MonitorsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MonitorsClientBeginCreateOptions contains the optional parameters for the MonitorsClient.BeginCreate method.
type MonitorsClientBeginDeleteOptions ¶
type MonitorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
MonitorsClientBeginDeleteOptions contains the optional parameters for the MonitorsClient.BeginDelete method.
type MonitorsClientCreateResponse ¶
type MonitorsClientCreateResponse struct { // SAP monitor info on Azure (ARM properties and SAP monitor properties) Monitor }
MonitorsClientCreateResponse contains the response from method MonitorsClient.BeginCreate.
type MonitorsClientDeleteResponse ¶
type MonitorsClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
MonitorsClientDeleteResponse contains the response from method MonitorsClient.BeginDelete.
type MonitorsClientGetOptions ¶
type MonitorsClientGetOptions struct { }
MonitorsClientGetOptions contains the optional parameters for the MonitorsClient.Get method.
type MonitorsClientGetResponse ¶
type MonitorsClientGetResponse struct { // SAP monitor info on Azure (ARM properties and SAP monitor properties) Monitor }
MonitorsClientGetResponse contains the response from method MonitorsClient.Get.
type MonitorsClientListByResourceGroupOptions ¶
type MonitorsClientListByResourceGroupOptions struct { }
MonitorsClientListByResourceGroupOptions contains the optional parameters for the MonitorsClient.NewListByResourceGroupPager method.
type MonitorsClientListByResourceGroupResponse ¶
type MonitorsClientListByResourceGroupResponse struct { // The response from the List SAP monitors operation. MonitorListResult }
MonitorsClientListByResourceGroupResponse contains the response from method MonitorsClient.NewListByResourceGroupPager.
type MonitorsClientListOptions ¶
type MonitorsClientListOptions struct { }
MonitorsClientListOptions contains the optional parameters for the MonitorsClient.NewListPager method.
type MonitorsClientListResponse ¶
type MonitorsClientListResponse struct { // The response from the List SAP monitors operation. MonitorListResult }
MonitorsClientListResponse contains the response from method MonitorsClient.NewListPager.
type MonitorsClientUpdateOptions ¶
type MonitorsClientUpdateOptions struct { }
MonitorsClientUpdateOptions contains the optional parameters for the MonitorsClient.Update method.
type MonitorsClientUpdateResponse ¶
type MonitorsClientUpdateResponse struct { // SAP monitor info on Azure (ARM properties and SAP monitor properties) Monitor }
MonitorsClientUpdateResponse contains the response from method MonitorsClient.Update.
type MountFileShareConfiguration ¶ added in v0.3.0
type MountFileShareConfiguration struct { ConfigurationType ID *string PrivateEndpointID *string }ConfigurationType *
MountFileShareConfiguration - Gets or sets the file share configuration where the transport directory fileshare already exists, and user wishes to mount the fileshare as a part of the create infra flow.
func (*MountFileShareConfiguration) GetFileShareConfiguration ¶ added in v0.3.0
func (m *MountFileShareConfiguration) GetFileShareConfiguration() *FileShareConfiguration
GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type MountFileShareConfiguration.
func (MountFileShareConfiguration) MarshalJSON ¶ added in v0.3.0
func (m MountFileShareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MountFileShareConfiguration.
func (*MountFileShareConfiguration) UnmarshalJSON ¶ added in v0.3.0
func (m *MountFileShareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MountFileShareConfiguration.
type MsSQLServerProviderInstanceProperties ¶
type MsSQLServerProviderInstanceProperties struct { // REQUIRED; The provider type. For example, the value can be SapHana. ProviderType *string // Gets or sets the database password. DbPassword *string // Gets or sets the key vault URI to secret with the database password. DbPasswordURI *string // Gets or sets the database sql port. DbPort *string // Gets or sets the database user name. DbUsername *string // Gets or sets the SQL server host name. Hostname *string // Gets or sets the blob URI to SSL certificate for the SQL Database. SSLCertificateURI *string // Gets or sets certificate preference if secure communication is enabled. SSLPreference *SSLPreference // Gets or sets the SAP System Identifier SapSid *string }
MsSQLServerProviderInstanceProperties - Gets or sets the SQL server provider properties.
func (*MsSQLServerProviderInstanceProperties) GetProviderSpecificProperties ¶
func (m *MsSQLServerProviderInstanceProperties) GetProviderSpecificProperties() *ProviderSpecificProperties
GetProviderSpecificProperties implements the ProviderSpecificPropertiesClassification interface for type MsSQLServerProviderInstanceProperties.
func (MsSQLServerProviderInstanceProperties) MarshalJSON ¶
func (m MsSQLServerProviderInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MsSQLServerProviderInstanceProperties.
func (*MsSQLServerProviderInstanceProperties) UnmarshalJSON ¶
func (m *MsSQLServerProviderInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MsSQLServerProviderInstanceProperties.
type NamingPatternType ¶ added in v0.3.0
type NamingPatternType string
NamingPatternType - The pattern type to be used for resource naming.
const (
NamingPatternTypeFullResourceName NamingPatternType = "FullResourceName"
)
func PossibleNamingPatternTypeValues ¶ added in v0.3.0
func PossibleNamingPatternTypeValues() []NamingPatternType
PossibleNamingPatternTypeValues returns the possible values for the NamingPatternType const type.
type NetworkConfiguration ¶ added in v0.2.0
type NetworkConfiguration struct { // Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed IsSecondaryIPEnabled *bool }
NetworkConfiguration - Defines the network configuration type for SAP system infrastructure that is being deployed
func (NetworkConfiguration) MarshalJSON ¶ added in v0.2.0
func (n NetworkConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkConfiguration.
func (*NetworkConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (n *NetworkConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkConfiguration.
type NetworkInterfaceResourceNames ¶ added in v0.3.0
type NetworkInterfaceResourceNames struct { // The full name for network interface. If name is not provided, service uses a default name based on the deployment type. // For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, // default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per // layer. For distributed and HA-AvSet systems, default name will be // {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. NetworkInterfaceName *string }
NetworkInterfaceResourceNames - The resource names object for network interface and related resources.
func (NetworkInterfaceResourceNames) MarshalJSON ¶ added in v0.3.0
func (n NetworkInterfaceResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceResourceNames.
func (*NetworkInterfaceResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (n *NetworkInterfaceResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceResourceNames.
type OSConfiguration ¶ added in v0.2.0
type OSConfiguration struct { // REQUIRED; The OS Type OSType *OSType }
OSConfiguration - Defines the OS configuration.
func (*OSConfiguration) GetOSConfiguration ¶ added in v0.2.0
func (o *OSConfiguration) GetOSConfiguration() *OSConfiguration
GetOSConfiguration implements the OSConfigurationClassification interface for type OSConfiguration.
func (OSConfiguration) MarshalJSON ¶ added in v0.2.0
func (o OSConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OSConfiguration.
func (*OSConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (o *OSConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OSConfiguration.
type OSConfigurationClassification ¶ added in v0.2.0
type OSConfigurationClassification interface { // GetOSConfiguration returns the OSConfiguration content of the underlying type. GetOSConfiguration() *OSConfiguration }
OSConfigurationClassification provides polymorphic access to related types. Call the interface's GetOSConfiguration() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *LinuxConfiguration, *OSConfiguration, *WindowsConfiguration
type OSProfile ¶ added in v0.2.0
type OSProfile struct { // Specifies the password of the administrator account. // Minimum-length (Windows): 8 characters // Minimum-length (Linux): 6 characters // Max-length (Windows): 123 characters // Max-length (Linux): 72 characters // Complexity requirements: 3 out of 4 conditions below need to be fulfilled // Has lower characters // Has upper characters // Has a digit // Has a special character (Regex match [\W_]) // Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", // "Password22", "iloveyou!" // For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp] // For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension // [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection] AdminPassword *string // Specifies the name of the administrator account. // This property cannot be updated after the VM is created. // Windows-only restriction: Cannot end in "." // Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", // "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", // "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". // Minimum-length (Linux): 1 character // Max-length (Linux): 64 characters // Max-length (Windows): 20 characters. AdminUsername *string // Specifies Windows operating system settings on the virtual machine. OSConfiguration OSConfigurationClassification }
OSProfile - Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned.
func (OSProfile) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type OSProfile.
func (*OSProfile) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type OSProfile.
type OSType ¶ added in v0.2.0
type OSType string
OSType - The OS Type
func PossibleOSTypeValues ¶ added in v0.2.0
func PossibleOSTypeValues() []OSType
PossibleOSTypeValues returns the possible values for the OSType const type.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶ added in v0.2.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v0.2.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶ added in v0.2.0
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v0.2.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationProperties ¶
type OperationProperties string
OperationProperties - Defines the workload operation origin.
const ( OperationPropertiesNotSpecified OperationProperties = "NotSpecified" OperationPropertiesSystem OperationProperties = "System" OperationPropertiesUser OperationProperties = "User" )
func PossibleOperationPropertiesValues ¶
func PossibleOperationPropertiesValues() []OperationProperties
PossibleOperationPropertiesValues returns the possible values for the OperationProperties const type.
type OperationStatusResult ¶
type OperationStatusResult struct { // REQUIRED; Operation status. Status *string // The end time of the operation. EndTime *time.Time // If present, details of the operation error. Error *ErrorDetail // Fully qualified ID for the async operation. ID *string // Name of the async operation. Name *string // The operations list. Operations []*OperationStatusResult // Percent of the operation that is complete. PercentComplete *float32 // The start time of the operation. StartTime *time.Time }
OperationStatusResult - The current status of an async operation.
func (OperationStatusResult) MarshalJSON ¶ added in v0.2.0
func (o OperationStatusResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationStatusResult.
func (*OperationStatusResult) UnmarshalJSON ¶
func (o *OperationStatusResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult.
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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all the available API operations under this PR
Generated from API version 2023-04-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/Operations_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armworkloads.OperationListResult{ // Value: []*armworkloads.Operation{ // { // Name: to.Ptr("Microsoft.Workloads/RegisteredSubscriptions/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Reads registered subscriptions"), // Operation: to.Ptr("Gets/Lists registered subscriptions"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("RegisteredSubscriptions"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/wordpressInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Lists WordpressInstances resources under a phpWorkload resource"), // Operation: to.Ptr("WordpressInstances_List"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads/wordpressInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/wordpressInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets a WordpressInstances resource"), // Operation: to.Ptr("WordpressInstances_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads/wordpressInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/wordpressInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Create or updated WordpressInstances resource"), // Operation: to.Ptr("WordpressInstances_CreateOrUpdate"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads/wordpressInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/wordpressInstances/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Delete WordpressInstances resource"), // Operation: to.Ptr("WordpressInstances_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads/wordpressInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/skus/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets the list of Microsoft.Workloads SKUs available for your Subscription"), // Operation: to.Ptr("Gets the list of Microsoft.Workloads SKUs available for your Subscription"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("Skus"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/Operations/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("read Operations"), // Operation: to.Ptr("read_Operations"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("Operations"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/register/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Register the subscription for Microsoft.Workloads"), // Operation: to.Ptr("Register the Microsoft.Workloads"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("Microsoft.Workloads"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/unregister/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Unregister the subscription for Microsoft.Workloads"), // Operation: to.Ptr("Unregister the Microsoft.Workloads"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("Microsoft.Workloads"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/Locations/OperationStatuses/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("read OperationStatuses"), // Operation: to.Ptr("read_OperationStatuses"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("Locations/OperationStatuses"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/Locations/OperationStatuses/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("write OperationStatuses"), // Operation: to.Ptr("write_OperationStatuses"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("Locations/OperationStatuses"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Lists phpWorkload resources in a subscription"), // Operation: to.Ptr("PhpWorkloads_ListBySubscription"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Lists phpWorkload resources in a resource group"), // Operation: to.Ptr("PhpWorkloads_ListByResourceGroup"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets a phpWorkload resource"), // Operation: to.Ptr("PhpWorkloads_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Create or updated phpWorkloads resource"), // Operation: to.Ptr("PhpWorkloads_CreateOrUpdate"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Delete phpWorkloads resource"), // Operation: to.Ptr("PhpWorkloads_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Update PHP workload resource."), // Operation: to.Ptr("PhpWorkloads_Update"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("phpWorkloads"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets the SAP Application Server Instance."), // Operation: to.Ptr("SAPApplicationServerInstances_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/applicationInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Puts the SAP Application Server Instance."), // Operation: to.Ptr("SAPApplicationServerInstances_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/applicationInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error."), // Operation: to.Ptr("SAPApplicationServerInstances_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/applicationInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Puts the SAP Application Server Instance."), // Operation: to.Ptr("SAPApplicationServerInstances_Update"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/applicationInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Lists the SAP Application server Instances in an SVI."), // Operation: to.Ptr("SAPApplicationServerInstances_List"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/applicationInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/start/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Starts the SAP Application server Instance in an SVI."), // Operation: to.Ptr("SAPApplicationServerInstances_StartInstance"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/applicationInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/stop/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Stops the SAP Application server Instance in an SVI."), // Operation: to.Ptr("SAPApplicationServerInstances_StopInstance"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/applicationInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets the SAP Central Instance."), // Operation: to.Ptr("SAPCentralInstances_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/centralInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error."), // Operation: to.Ptr("SAPCentralInstances_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/centralInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error."), // Operation: to.Ptr("SAPCentralInstances_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/centralInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Updates the SAP Central Instance. <br><br>This can be used to update tags."), // Operation: to.Ptr("SAPCentralInstances_Update"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/centralInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Lists the SAP Central Instances in an SVI."), // Operation: to.Ptr("SAPCentralInstances_List"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/centralInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/start/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Starts the SAP Central server Instance in an SVI."), // Operation: to.Ptr("SAPCentralInstances_StartInstance"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/centralInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/stop/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Stops the SAP Central server Instance in an SVI."), // Operation: to.Ptr("SAPCentralInstances_StopInstance"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/centralInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets the SAP Database Instance."), // Operation: to.Ptr("SAPDatabaseInstances_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/databaseInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Puts the SAP Database Instance."), // Operation: to.Ptr("SAPDatabaseInstances_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/databaseInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error."), // Operation: to.Ptr("SAPDatabaseInstances_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/databaseInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Puts the SAP Database Instance."), // Operation: to.Ptr("SAPDatabaseInstances_Update"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/databaseInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Lists the SAP Database Instances in an SVI."), // Operation: to.Ptr("SAPDatabaseInstances_List"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/databaseInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/start/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Starts the database instance of the SAP system."), // Operation: to.Ptr("SAPDatabaseInstances_StartInstance"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/databaseInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/stop/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Stops the database instance of the SAP system."), // Operation: to.Ptr("SAPDatabaseInstances_StopInstance"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances/databaseInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP monitor."), // Operation: to.Ptr("monitors_List"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets a list of SAP monitors in the specified resource group."), // Operation: to.Ptr("monitors_ListByResourceGroup"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets properties of a SAP monitor for the specified subscription, resource group, and resource name."), // Operation: to.Ptr("monitors_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Creates a SAP monitor for the specified subscription, resource group, and resource name."), // Operation: to.Ptr("monitors_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes a SAP monitor with the specified subscription, resource group, and monitor name."), // Operation: to.Ptr("monitors_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name."), // Operation: to.Ptr("monitors_Update"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/providerInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each provider instances."), // Operation: to.Ptr("ProviderInstances_List"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors/providerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/providerInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets properties of a provider instance for the specified subscription, resource group, Monitor name, and resource name."), // Operation: to.Ptr("ProviderInstances_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors/providerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/providerInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Creates a provider instance for the specified subscription, resource group, Monitor name, and resource name."), // Operation: to.Ptr("ProviderInstances_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors/providerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/providerInstances/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes a provider instance for the specified subscription, resource group, Monitor name, and resource name."), // Operation: to.Ptr("ProviderInstances_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors/providerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets a list of properties of a SAP Landscape monitor configuration for the specified subscription, resource group, and resource name."), // Operation: to.Ptr("SapLandscapeMonitor_List"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors/sapLandscapeMonitor"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets properties of a SAP Landscape monitor configuration for the specified subscription, resource group, and resource name."), // Operation: to.Ptr("SapLandscapeMonitor_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors/sapLandscapeMonitor"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Creates a SAP Landscape monitor configuration for the specified subscription, resource group, and resource name."), // Operation: to.Ptr("SapLandscapeMonitor_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors/sapLandscapeMonitor"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes a SAP Landscape monitor configuration with the specified subscription, resource group, and monitor name."), // Operation: to.Ptr("SapLandscapeMonitor_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("monitors/sapLandscapeMonitor"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets an SAP Virtual Instance."), // Operation: to.Ptr("SAPVirtualInstances_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Creates an SAP Virtual Instance."), // Operation: to.Ptr("SAPVirtualInstances_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes an SAP Virtual Instance."), // Operation: to.Ptr("SAPVirtualInstances_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Updates an SAP Virtual Instance."), // Operation: to.Ptr("SAPVirtualInstances_Update"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets all SAP Virtual Instances in a resource group."), // Operation: to.Ptr("SAPVirtualInstances_ListByResourceGroup"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets all SAP Virtual Instances in the subscription."), // Operation: to.Ptr("SAPVirtualInstances_ListBySubscription"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/start/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Starts the SAP System."), // Operation: to.Ptr("SAPVirtualInstances_Start"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/stop/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Stops the SAP System."), // Operation: to.Ptr("SAPVirtualInstances_Stop"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("sapVirtualInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/locations/sapVirtualInstanceMetadata/getSizingRecommendations/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Get SAP sizing recommendations."), // Operation: to.Ptr("SAPSizingRecommendations"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("locations/sapVirtualInstanceMetadata"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/locations/sapVirtualInstanceMetadata/getSapSupportedSku/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Get SAP supported SKUs."), // Operation: to.Ptr("SAPSupportedSku"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("locations/sapVirtualInstanceMetadata"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/locations/sapVirtualInstanceMetadata/getDiskConfigurations/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Get SAP Disk Configurations."), // Operation: to.Ptr("SAPDiskConfigurations"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("locations/sapVirtualInstanceMetadata"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/locations/sapVirtualInstanceMetadata/getAvailabilityZoneDetails/action"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Get SAP Availability Zone Details."), // Operation: to.Ptr("SAPAvailabilityZoneDetails"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("locations/sapVirtualInstanceMetadata"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets a connector resource"), // Operation: to.Ptr("Connectors_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Creates a connector resource"), // Operation: to.Ptr("Connectors_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes a connector resource and its child resources, which are the associated connection resources. All the child resources have to be deleted before deleting the connector resource."), // Operation: to.Ptr("Connectors_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Updates a connector resource"), // Operation: to.Ptr("Connectors_Update"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets all connector resources in a Resource Group."), // Operation: to.Ptr("Connectors_ListByResourceGroup"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets all connector resources in a Subscription."), // Operation: to.Ptr("Connectors_ListBySubscription"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets the backup connection resource of virtual instance for SAP."), // Operation: to.Ptr("ACSSBackupConnections_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors/acssBackups"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Creates the backup connection resource of virtual instance for SAP."), // Operation: to.Ptr("ACSSBackupConnections_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors/acssBackups"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes the backup connection resource of virtual instance for SAP."), // Operation: to.Ptr("ACSSBackupConnections_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors/acssBackups"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Updates the backup connection resource of virtual instance for SAP. <br><br>This can be used to update tags on the resource."), // Operation: to.Ptr("ACSSBackupConnections_Update"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors/acssBackups"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Lists the backup connection resources of virtual instance for SAP under the given connector resource."), // Operation: to.Ptr("ACSSBackupConnections_List"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors/acssBackups"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/insights/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets properties of Workloads Insights instance for the specified subscription, resource group and instance name."), // Operation: to.Ptr("Insights_Get"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("insights"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/insights/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets a list of Workloads Insight instances in the specified subscription and resource group. The operations returns various properties of each instance."), // Operation: to.Ptr("Insights_ListByResourceGroup"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("insights"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/insights/read"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Gets a list of Workloads Insight instances in the specified subscription. The operations returns various properties of each instance."), // Operation: to.Ptr("Insights_List"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("insights"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/insights/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Creates a Workloads Insights instance for the specified subscription, resource group, and instance name."), // Operation: to.Ptr("Insights_Create"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("insights"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/insights/delete"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Deletes a Workloads Insights instance for the specified subscription, resource group and instance name."), // Operation: to.Ptr("Insights_Delete"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("insights"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/insights/write"), // Display: &armworkloads.OperationDisplay{ // Description: to.Ptr("Patches the Workload Insights instance for the specified subscription, resource group, and instance name."), // Operation: to.Ptr("Insights_Update"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("insights"), // }, // IsDataAction: to.Ptr(false), // }}, // } } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type OperationsContent ¶
type OperationsContent struct { // Operations content. Properties *OperationsDefinition // 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 }
OperationsContent - Defines the workload operation content.
func (OperationsContent) MarshalJSON ¶ added in v0.2.0
func (o OperationsContent) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationsContent.
func (*OperationsContent) UnmarshalJSON ¶ added in v0.2.0
func (o *OperationsContent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationsContent.
type OperationsDefinition ¶
type OperationsDefinition struct { // REQUIRED; Display information of the operation. Display *OperationsDefinitionDisplay // REQUIRED; Name of the operation. Name *string // Defines the action type of workload operation. ActionType *WorkloadMonitorActionType // Indicates whether the operation applies to data-plane. IsDataAction *bool // Defines the workload operation origin. Origin *OperationProperties // Defines the workload operation properties. Properties any }
OperationsDefinition - Properties of an Operation.
func (OperationsDefinition) MarshalJSON ¶ added in v0.2.0
func (o OperationsDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationsDefinition.
func (*OperationsDefinition) UnmarshalJSON ¶ added in v0.2.0
func (o *OperationsDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDefinition.
type OperationsDefinitionArrayResponseWithContinuation ¶
type OperationsDefinitionArrayResponseWithContinuation struct { // The URL to get to the next set of results, if there are any. NextLink *string // Defines the workload operation definition response properties. Value []*OperationsDefinition }
OperationsDefinitionArrayResponseWithContinuation - Defines the workload operation definition response.
func (OperationsDefinitionArrayResponseWithContinuation) MarshalJSON ¶ added in v0.2.0
func (o OperationsDefinitionArrayResponseWithContinuation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationsDefinitionArrayResponseWithContinuation.
func (*OperationsDefinitionArrayResponseWithContinuation) UnmarshalJSON ¶ added in v0.2.0
func (o *OperationsDefinitionArrayResponseWithContinuation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDefinitionArrayResponseWithContinuation.
type OperationsDefinitionDisplay ¶
type OperationsDefinitionDisplay struct { // REQUIRED; Describes the workload operation. Description *string // REQUIRED; Defines the workload operation. Operation *string // REQUIRED; Defines the workload provider. Provider *string // REQUIRED; Defines the workload resource. Resource *string }
OperationsDefinitionDisplay - Display information of the operation.
func (OperationsDefinitionDisplay) MarshalJSON ¶ added in v0.2.0
func (o OperationsDefinitionDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationsDefinitionDisplay.
func (*OperationsDefinitionDisplay) UnmarshalJSON ¶ added in v0.2.0
func (o *OperationsDefinitionDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDefinitionDisplay.
type OperationsDisplayDefinition ¶
type OperationsDisplayDefinition struct { // REQUIRED; Describes the workload operation. Description *string // REQUIRED; Defines the workload operation. Operation *string // REQUIRED; Defines the workload provider. Provider *string // REQUIRED; Defines the workload resource. Resource *string }
OperationsDisplayDefinition - Defines the workload operation.
func (OperationsDisplayDefinition) MarshalJSON ¶ added in v0.2.0
func (o OperationsDisplayDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationsDisplayDefinition.
func (*OperationsDisplayDefinition) UnmarshalJSON ¶ added in v0.2.0
func (o *OperationsDisplayDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationsDisplayDefinition.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type OsSapConfiguration ¶ added in v0.2.0
type OsSapConfiguration struct { // The url and storage account ID where deployer VM packages are uploaded DeployerVMPackages *DeployerVMPackages // The FQDN to set for the SAP system SapFqdn *string }
OsSapConfiguration - Defines the OS and SAP Configurations for Deployment
func (OsSapConfiguration) MarshalJSON ¶ added in v0.2.0
func (o OsSapConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OsSapConfiguration.
func (*OsSapConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (o *OsSapConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OsSapConfiguration.
type PrometheusHaClusterProviderInstanceProperties ¶
type PrometheusHaClusterProviderInstanceProperties struct { // REQUIRED; The provider type. For example, the value can be SapHana. ProviderType *string // Gets or sets the clusterName. ClusterName *string // Gets or sets the target machine name. Hostname *string // URL of the Node Exporter endpoint. PrometheusURL *string // Gets or sets the blob URI to SSL certificate for the HA cluster exporter. SSLCertificateURI *string // Gets or sets certificate preference if secure communication is enabled. SSLPreference *SSLPreference // Gets or sets the cluster sid. Sid *string }
PrometheusHaClusterProviderInstanceProperties - Gets or sets the PrometheusHaCluster provider properties.
func (*PrometheusHaClusterProviderInstanceProperties) GetProviderSpecificProperties ¶
func (p *PrometheusHaClusterProviderInstanceProperties) GetProviderSpecificProperties() *ProviderSpecificProperties
GetProviderSpecificProperties implements the ProviderSpecificPropertiesClassification interface for type PrometheusHaClusterProviderInstanceProperties.
func (PrometheusHaClusterProviderInstanceProperties) MarshalJSON ¶
func (p PrometheusHaClusterProviderInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrometheusHaClusterProviderInstanceProperties.
func (*PrometheusHaClusterProviderInstanceProperties) UnmarshalJSON ¶
func (p *PrometheusHaClusterProviderInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrometheusHaClusterProviderInstanceProperties.
type PrometheusOSProviderInstanceProperties ¶
type PrometheusOSProviderInstanceProperties struct { // REQUIRED; The provider type. For example, the value can be SapHana. ProviderType *string // URL of the Node Exporter endpoint PrometheusURL *string // Gets or sets the blob URI to SSL certificate for the prometheus node exporter. SSLCertificateURI *string // Gets or sets certificate preference if secure communication is enabled. SSLPreference *SSLPreference // Gets or sets the SAP System Identifier SapSid *string }
PrometheusOSProviderInstanceProperties - Gets or sets the PrometheusOS provider properties.
func (*PrometheusOSProviderInstanceProperties) GetProviderSpecificProperties ¶
func (p *PrometheusOSProviderInstanceProperties) GetProviderSpecificProperties() *ProviderSpecificProperties
GetProviderSpecificProperties implements the ProviderSpecificPropertiesClassification interface for type PrometheusOSProviderInstanceProperties.
func (PrometheusOSProviderInstanceProperties) MarshalJSON ¶
func (p PrometheusOSProviderInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrometheusOSProviderInstanceProperties.
func (*PrometheusOSProviderInstanceProperties) UnmarshalJSON ¶
func (p *PrometheusOSProviderInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrometheusOSProviderInstanceProperties.
type ProviderInstance ¶
type ProviderInstance struct { // [currently not in use] Managed service identity(user assigned identities) Identity *UserAssignedServiceIdentity // 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 SAP monitor.
func (ProviderInstance) MarshalJSON ¶ added in v0.2.0
func (p ProviderInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProviderInstance.
func (*ProviderInstance) UnmarshalJSON ¶ added in v0.2.0
func (p *ProviderInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProviderInstance.
type ProviderInstanceListResult ¶
type ProviderInstanceListResult struct { // The URL to get the next set of provider instances. NextLink *string // The list of provider instances. Value []*ProviderInstance }
ProviderInstanceListResult - The response from the List provider instances operation.
func (ProviderInstanceListResult) MarshalJSON ¶ added in v0.2.0
func (p ProviderInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProviderInstanceListResult.
func (*ProviderInstanceListResult) UnmarshalJSON ¶ added in v0.2.0
func (p *ProviderInstanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProviderInstanceListResult.
type ProviderInstanceProperties ¶
type ProviderInstanceProperties struct { // Defines the provider specific properties. ProviderSettings ProviderSpecificPropertiesClassification // READ-ONLY; Defines the provider instance errors. Errors *ProviderInstancePropertiesErrors // READ-ONLY; State of provisioning of the provider instance ProvisioningState *WorkloadMonitorProvisioningState }
ProviderInstanceProperties - Describes the properties of a provider instance.
func (ProviderInstanceProperties) MarshalJSON ¶
func (p ProviderInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProviderInstanceProperties.
func (*ProviderInstanceProperties) UnmarshalJSON ¶
func (p *ProviderInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProviderInstanceProperties.
type ProviderInstancePropertiesErrors ¶
type ProviderInstancePropertiesErrors struct { // READ-ONLY; Server-defined set of error codes. Code *string // READ-ONLY; Array of details about specific errors that led to this reported error. Details []*Error // READ-ONLY; Object containing more specific information than the current object about the error. InnerError *ErrorInnerError // READ-ONLY; Human-readable representation of the error. Message *string // READ-ONLY; Target of the error. Target *string }
ProviderInstancePropertiesErrors - Defines the provider instance errors.
func (ProviderInstancePropertiesErrors) MarshalJSON ¶
func (p ProviderInstancePropertiesErrors) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProviderInstancePropertiesErrors.
func (*ProviderInstancePropertiesErrors) UnmarshalJSON ¶ added in v0.2.0
func (p *ProviderInstancePropertiesErrors) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProviderInstancePropertiesErrors.
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 - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ProviderInstancesClient) BeginCreate ¶
func (client *ProviderInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, monitorName string, providerInstanceName string, providerInstanceParameter ProviderInstance, options *ProviderInstancesClientBeginCreateOptions) (*runtime.Poller[ProviderInstancesClientCreateResponse], error)
BeginCreate - Creates a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - 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 (CreateADb2Provider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/Db2ProviderInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.DB2ProviderInstanceProperties{ ProviderType: to.Ptr("Db2"), DbName: to.Ptr("dbName"), DbPassword: to.Ptr("password"), DbPasswordURI: to.Ptr(""), DbPort: to.Ptr("dbPort"), DbUsername: to.Ptr("username"), Hostname: to.Ptr("hostname"), SapSid: to.Ptr("SID"), SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.DB2ProviderInstanceProperties{ // ProviderType: to.Ptr("Db2"), // DbName: to.Ptr("OPA"), // DbPasswordURI: to.Ptr(""), // DbPort: to.Ptr("5912"), // DbUsername: to.Ptr("Db2OPA"), // Hostname: to.Ptr("vmname.azure.com"), // SapSid: to.Ptr("SID"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateADb2ProviderWithRootCertificate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/Db2ProviderInstances_Create_Root_Certificate.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.DB2ProviderInstanceProperties{ ProviderType: to.Ptr("Db2"), DbName: to.Ptr("dbName"), DbPassword: to.Ptr("password"), DbPasswordURI: to.Ptr(""), DbPort: to.Ptr("dbPort"), DbUsername: to.Ptr("username"), Hostname: to.Ptr("hostname"), SapSid: to.Ptr("SID"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.DB2ProviderInstanceProperties{ // ProviderType: to.Ptr("Db2"), // DbName: to.Ptr("OPA"), // DbPasswordURI: to.Ptr(""), // DbPort: to.Ptr("5912"), // DbUsername: to.Ptr("Db2OPA"), // Hostname: to.Ptr("vmname.azure.com"), // SapSid: to.Ptr("SID"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateAMsSqlServerProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/MsSqlServerProviderInstance_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.MsSQLServerProviderInstanceProperties{ ProviderType: to.Ptr("MsSqlServer"), DbPassword: to.Ptr("****"), DbPasswordURI: to.Ptr(""), DbPort: to.Ptr("5912"), DbUsername: to.Ptr("user"), Hostname: to.Ptr("hostname"), SapSid: to.Ptr("sid"), SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.MsSQLServerProviderInstanceProperties{ // ProviderType: to.Ptr("MsSqlServer"), // DbPort: to.Ptr("5912"), // DbUsername: to.Ptr("user"), // Hostname: to.Ptr("hostname"), // SapSid: to.Ptr("sid"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateAMsSqlServerProviderWithRootCertificate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/MsSqlServerProviderInstance_Create_Root_Certificate.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.MsSQLServerProviderInstanceProperties{ ProviderType: to.Ptr("MsSqlServer"), DbPassword: to.Ptr("****"), DbPasswordURI: to.Ptr(""), DbPort: to.Ptr("5912"), DbUsername: to.Ptr("user"), Hostname: to.Ptr("hostname"), SapSid: to.Ptr("sid"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.MsSQLServerProviderInstanceProperties{ // ProviderType: to.Ptr("MsSqlServer"), // DbPort: to.Ptr("5912"), // DbUsername: to.Ptr("user"), // Hostname: to.Ptr("hostname"), // SapSid: to.Ptr("sid"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateAOsProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/PrometheusOSProviderInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.PrometheusOSProviderInstanceProperties{ ProviderType: to.Ptr("PrometheusOS"), PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), SapSid: to.Ptr("SID"), SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.PrometheusOSProviderInstanceProperties{ // ProviderType: to.Ptr("PrometheusOS"), // PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), // SapSid: to.Ptr("SID"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateAOsProviderWithRootCertificate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/PrometheusOSProviderInstances_Create_Root_Certificate.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.PrometheusOSProviderInstanceProperties{ ProviderType: to.Ptr("PrometheusOS"), PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), SapSid: to.Ptr("SID"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.PrometheusOSProviderInstanceProperties{ // ProviderType: to.Ptr("PrometheusOS"), // PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), // SapSid: to.Ptr("SID"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateAPrometheusHaClusterProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/PrometheusHaClusterProviderInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.PrometheusHaClusterProviderInstanceProperties{ ProviderType: to.Ptr("PrometheusHaCluster"), ClusterName: to.Ptr("clusterName"), Hostname: to.Ptr("hostname"), PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), Sid: to.Ptr("sid"), SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.PrometheusHaClusterProviderInstanceProperties{ // ProviderType: to.Ptr("PrometheusHaCluster"), // ClusterName: to.Ptr("clusterName"), // Hostname: to.Ptr("hostname"), // PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), // Sid: to.Ptr("sid"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateAPrometheusHaClusterProviderWithRootCertificate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/PrometheusHaClusterProviderInstances_Create_Root_Certificate.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.PrometheusHaClusterProviderInstanceProperties{ ProviderType: to.Ptr("PrometheusHaCluster"), ClusterName: to.Ptr("clusterName"), Hostname: to.Ptr("hostname"), PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), Sid: to.Ptr("sid"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.PrometheusHaClusterProviderInstanceProperties{ // ProviderType: to.Ptr("PrometheusHaCluster"), // ClusterName: to.Ptr("clusterName"), // Hostname: to.Ptr("hostname"), // PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), // Sid: to.Ptr("sid"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateASapMonitorHanaProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.HanaDbProviderInstanceProperties{ ProviderType: to.Ptr("SapHana"), DbName: to.Ptr("db"), DbPassword: to.Ptr("****"), DbPasswordURI: to.Ptr(""), DbUsername: to.Ptr("user"), Hostname: to.Ptr("name"), InstanceNumber: to.Ptr("00"), SapSid: to.Ptr("SID"), SQLPort: to.Ptr("0000"), SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), SSLHostNameInCertificate: to.Ptr("xyz.domain.com"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.HanaDbProviderInstanceProperties{ // ProviderType: to.Ptr("SapHana"), // DbName: to.Ptr("db"), // DbPasswordURI: to.Ptr(""), // DbUsername: to.Ptr("user"), // Hostname: to.Ptr("name"), // InstanceNumber: to.Ptr("00"), // SapSid: to.Ptr("SID"), // SQLPort: to.Ptr("0000"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLHostNameInCertificate: to.Ptr("xyz.domain.com"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateASapMonitorHanaProviderWithRootCertificate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/ProviderInstances_Create_Root_Certificate.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.HanaDbProviderInstanceProperties{ ProviderType: to.Ptr("SapHana"), DbName: to.Ptr("db"), DbPassword: to.Ptr("****"), DbPasswordURI: to.Ptr(""), DbUsername: to.Ptr("user"), Hostname: to.Ptr("name"), InstanceNumber: to.Ptr("00"), SapSid: to.Ptr("SID"), SQLPort: to.Ptr("0000"), SSLHostNameInCertificate: to.Ptr("xyz.domain.com"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.HanaDbProviderInstanceProperties{ // ProviderType: to.Ptr("SapHana"), // DbName: to.Ptr("db"), // DbPasswordURI: to.Ptr(""), // DbUsername: to.Ptr("user"), // Hostname: to.Ptr("name"), // InstanceNumber: to.Ptr("00"), // SapSid: to.Ptr("SID"), // SQLPort: to.Ptr("0000"), // SSLHostNameInCertificate: to.Ptr("xyz.domain.com"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateASapMonitorNetWeaverProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/NetWeaverProviderInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.SapNetWeaverProviderInstanceProperties{ ProviderType: to.Ptr("SapNetWeaver"), SapClientID: to.Ptr("111"), SapHostFileEntries: []*string{ to.Ptr("127.0.0.1 name fqdn")}, SapHostname: to.Ptr("name"), SapInstanceNr: to.Ptr("00"), SapPassword: to.Ptr("****"), SapPasswordURI: to.Ptr(""), SapPortNumber: to.Ptr("1234"), SapSid: to.Ptr("SID"), SapUsername: to.Ptr("username"), SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.SapNetWeaverProviderInstanceProperties{ // ProviderType: to.Ptr("SapNetWeaver"), // SapClientID: to.Ptr("111"), // SapHostFileEntries: []*string{ // to.Ptr("127.0.0.1 name fqdn")}, // SapHostname: to.Ptr("name"), // SapInstanceNr: to.Ptr("00"), // SapPasswordURI: to.Ptr(""), // SapPortNumber: to.Ptr("1234"), // SapSid: to.Ptr("SID"), // SapUsername: to.Ptr("username"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (CreateASapMonitorNetWeaverProviderWithRootCertificate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/NetWeaverProviderInstances_Create_Root_Certificate.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewProviderInstancesClient().BeginCreate(ctx, "myResourceGroup", "mySapMonitor", "myProviderInstance", armworkloads.ProviderInstance{ Properties: &armworkloads.ProviderInstanceProperties{ ProviderSettings: &armworkloads.SapNetWeaverProviderInstanceProperties{ ProviderType: to.Ptr("SapNetWeaver"), SapClientID: to.Ptr("111"), SapHostFileEntries: []*string{ to.Ptr("127.0.0.1 name fqdn")}, SapHostname: to.Ptr("name"), SapInstanceNr: to.Ptr("00"), SapPassword: to.Ptr("****"), SapPasswordURI: to.Ptr(""), SapPortNumber: to.Ptr("1234"), SapSid: to.Ptr("SID"), SapUsername: to.Ptr("username"), SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.SapNetWeaverProviderInstanceProperties{ // ProviderType: to.Ptr("SapNetWeaver"), // SapClientID: to.Ptr("111"), // SapHostFileEntries: []*string{ // to.Ptr("127.0.0.1 name fqdn")}, // SapHostname: to.Ptr("name"), // SapInstanceNr: to.Ptr("00"), // SapPasswordURI: to.Ptr(""), // SapPortNumber: to.Ptr("1234"), // SapSid: to.Ptr("SID"), // SapUsername: to.Ptr("username"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceRootCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
func (*ProviderInstancesClient) BeginDelete ¶
func (client *ProviderInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, monitorName string, providerInstanceName string, options *ProviderInstancesClientBeginDeleteOptions) (*runtime.Poller[ProviderInstancesClientDeleteResponse], error)
BeginDelete - Deletes a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - 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/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", 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 pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("1e4193c3-206e-4916-b124-1da16175eb0f"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/operations/locations/westus/1e4193c3-206e-4916-b124-1da16175eb0f"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*ProviderInstancesClient) Get ¶
func (client *ProviderInstancesClient) Get(ctx context.Context, resourceGroupName string, monitorName string, providerInstanceName string, options *ProviderInstancesClientGetOptions) (ProviderInstancesClientGetResponse, error)
Get - Gets properties of a provider instance for the specified subscription, resource group, SAP monitor name, and resource name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- providerInstanceName - Name of the provider instance.
- options - ProviderInstancesClientGetOptions contains the optional parameters for the ProviderInstancesClient.Get method.
Example (GetPropertiesOfADb2Provider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/Db2ProviderInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", 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.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.DB2ProviderInstanceProperties{ // ProviderType: to.Ptr("Db2"), // DbName: to.Ptr("OPA"), // DbPasswordURI: to.Ptr(""), // DbPort: to.Ptr("5912"), // DbUsername: to.Ptr("Db2OPA"), // Hostname: to.Ptr("vmname.azure.com"), // SapSid: to.Ptr("SID"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (GetPropertiesOfAMsSqlServerProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/MsSqlServerProviderInstance_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", 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.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.MsSQLServerProviderInstanceProperties{ // ProviderType: to.Ptr("MsSqlServer"), // DbPasswordURI: to.Ptr(""), // DbPort: to.Ptr("5912"), // DbUsername: to.Ptr("user"), // Hostname: to.Ptr("hostname"), // SapSid: to.Ptr("sid"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (GetPropertiesOfAOsProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/PrometheusOSProviderInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", 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.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.PrometheusOSProviderInstanceProperties{ // ProviderType: to.Ptr("PrometheusOS"), // PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), // SapSid: to.Ptr("SID"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (GetPropertiesOfAPrometheusHaClusterProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/PrometheusHaClusterProviderInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", 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.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.PrometheusHaClusterProviderInstanceProperties{ // ProviderType: to.Ptr("PrometheusHaCluster"), // ClusterName: to.Ptr("clusterName"), // Hostname: to.Ptr("hostname"), // PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), // Sid: to.Ptr("sid"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (GetPropertiesOfASapMonitorHanaProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", 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.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.HanaDbProviderInstanceProperties{ // ProviderType: to.Ptr("SapHana"), // DbName: to.Ptr("db"), // DbPasswordURI: to.Ptr(""), // DbUsername: to.Ptr("user"), // Hostname: to.Ptr("name"), // InstanceNumber: to.Ptr("00"), // SapSid: to.Ptr("SID"), // SQLPort: to.Ptr("0000"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLHostNameInCertificate: to.Ptr("xyz.domain.com"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
Example (GetPropertiesOfASapMonitorNetWeaverProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/NetWeaverProviderInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", 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.ProviderInstance = armworkloads.ProviderInstance{ // Name: to.Ptr("myProviderInstance"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.SapNetWeaverProviderInstanceProperties{ // ProviderType: to.Ptr("SapNetWeaver"), // SapClientID: to.Ptr("111"), // SapHostFileEntries: []*string{ // to.Ptr("127.0.0.1 name fqdn")}, // SapHostname: to.Ptr("name"), // SapInstanceNr: to.Ptr("00"), // SapPasswordURI: to.Ptr(""), // SapPortNumber: to.Ptr("1234"), // SapSid: to.Ptr("SID"), // SapUsername: to.Ptr("username"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // } }
Output:
func (*ProviderInstancesClient) NewListPager ¶
func (client *ProviderInstancesClient) NewListPager(resourceGroupName string, monitorName 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.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- options - ProviderInstancesClientListOptions contains the optional parameters for the ProviderInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", 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.ProviderInstanceListResult = armworkloads.ProviderInstanceListResult{ // Value: []*armworkloads.ProviderInstance{ // { // Name: to.Ptr("myProviderInstance1"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance1"), // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.HanaDbProviderInstanceProperties{ // ProviderType: to.Ptr("SapHana"), // DbName: to.Ptr("db"), // DbPasswordURI: to.Ptr(""), // DbUsername: to.Ptr("user"), // Hostname: to.Ptr("name"), // InstanceNumber: to.Ptr("00"), // SapSid: to.Ptr("SID"), // SQLPort: to.Ptr("0000"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLHostNameInCertificate: to.Ptr("xyz.domain.com"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("myProviderInstance2"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance1"), // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.SapNetWeaverProviderInstanceProperties{ // ProviderType: to.Ptr("SapNetWeaver"), // SapClientID: to.Ptr("111"), // SapHostFileEntries: []*string{ // to.Ptr("127.0.0.1 name fqdn")}, // SapHostname: to.Ptr("name"), // SapInstanceNr: to.Ptr("00"), // SapPasswordURI: to.Ptr(""), // SapPortNumber: to.Ptr("1234"), // SapSid: to.Ptr("SID"), // SapUsername: to.Ptr("username"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("myProviderInstance4"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance1"), // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.MsSQLServerProviderInstanceProperties{ // ProviderType: to.Ptr("MsSqlServer"), // DbPort: to.Ptr("5912"), // DbUsername: to.Ptr("user"), // Hostname: to.Ptr("hostname"), // SapSid: to.Ptr("sid"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("myProviderInstance3"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance1"), // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.PrometheusOSProviderInstanceProperties{ // ProviderType: to.Ptr("PrometheusOS"), // PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), // SapSid: to.Ptr("SID"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("myProviderInstance3"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance1"), // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.PrometheusHaClusterProviderInstanceProperties{ // ProviderType: to.Ptr("PrometheusHaCluster"), // ClusterName: to.Ptr("clusterName"), // Hostname: to.Ptr("hostname"), // PrometheusURL: to.Ptr("http://192.168.0.0:9090/metrics"), // Sid: to.Ptr("sid"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // }, // { // Name: to.Ptr("myProviderInstance3"), // Type: to.Ptr("Microsoft.Workloads/monitors/providerInstances"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/mySapMonitor/providerInstances/myProviderInstance1"), // Properties: &armworkloads.ProviderInstanceProperties{ // ProviderSettings: &armworkloads.DB2ProviderInstanceProperties{ // ProviderType: to.Ptr("Db2"), // DbName: to.Ptr("OPA"), // DbPasswordURI: to.Ptr(""), // DbPort: to.Ptr("5912"), // DbUsername: to.Ptr("Db2OPA"), // Hostname: to.Ptr("vmname.azure.com"), // SapSid: to.Ptr("SID"), // SSLCertificateURI: to.Ptr("https://storageaccount.blob.core.windows.net/containername/filename"), // SSLPreference: to.Ptr(armworkloads.SSLPreferenceServerCertificate), // }, // ProvisioningState: to.Ptr(armworkloads.WorkloadMonitorProvisioningStateSucceeded), // }, // }}, // } } }
Output:
type ProviderInstancesClientBeginCreateOptions ¶
type ProviderInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ProviderInstancesClientBeginCreateOptions contains the optional parameters for the ProviderInstancesClient.BeginCreate method.
type ProviderInstancesClientBeginDeleteOptions ¶
type ProviderInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ProviderInstancesClientBeginDeleteOptions contains the optional parameters for the ProviderInstancesClient.BeginDelete method.
type ProviderInstancesClientCreateResponse ¶
type ProviderInstancesClientCreateResponse struct { // A provider instance associated with SAP monitor. ProviderInstance }
ProviderInstancesClientCreateResponse contains the response from method ProviderInstancesClient.BeginCreate.
type ProviderInstancesClientDeleteResponse ¶
type ProviderInstancesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
ProviderInstancesClientDeleteResponse contains the response from method ProviderInstancesClient.BeginDelete.
type ProviderInstancesClientGetOptions ¶
type ProviderInstancesClientGetOptions struct { }
ProviderInstancesClientGetOptions contains the optional parameters for the ProviderInstancesClient.Get method.
type ProviderInstancesClientGetResponse ¶
type ProviderInstancesClientGetResponse struct { // A provider instance associated with SAP monitor. ProviderInstance }
ProviderInstancesClientGetResponse contains the response from method ProviderInstancesClient.Get.
type ProviderInstancesClientListOptions ¶
type ProviderInstancesClientListOptions struct { }
ProviderInstancesClientListOptions contains the optional parameters for the ProviderInstancesClient.NewListPager method.
type ProviderInstancesClientListResponse ¶
type ProviderInstancesClientListResponse struct { // The response from the List provider instances operation. ProviderInstanceListResult }
ProviderInstancesClientListResponse contains the response from method ProviderInstancesClient.NewListPager.
type ProviderSpecificProperties ¶
type ProviderSpecificProperties struct { // REQUIRED; The provider type. For example, the value can be SapHana. ProviderType *string }
ProviderSpecificProperties - Gets or sets the provider specific properties.
func (*ProviderSpecificProperties) GetProviderSpecificProperties ¶
func (p *ProviderSpecificProperties) GetProviderSpecificProperties() *ProviderSpecificProperties
GetProviderSpecificProperties implements the ProviderSpecificPropertiesClassification interface for type ProviderSpecificProperties.
func (ProviderSpecificProperties) MarshalJSON ¶ added in v0.2.0
func (p ProviderSpecificProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProviderSpecificProperties.
func (*ProviderSpecificProperties) UnmarshalJSON ¶ added in v0.2.0
func (p *ProviderSpecificProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProviderSpecificProperties.
type ProviderSpecificPropertiesClassification ¶
type ProviderSpecificPropertiesClassification interface { // GetProviderSpecificProperties returns the ProviderSpecificProperties content of the underlying type. GetProviderSpecificProperties() *ProviderSpecificProperties }
ProviderSpecificPropertiesClassification provides polymorphic access to related types. Call the interface's GetProviderSpecificProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *DB2ProviderInstanceProperties, *HanaDbProviderInstanceProperties, *MsSQLServerProviderInstanceProperties, *PrometheusHaClusterProviderInstanceProperties, - *PrometheusOSProviderInstanceProperties, *ProviderSpecificProperties, *SapNetWeaverProviderInstanceProperties
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 // 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 }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶ added in v0.2.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v0.2.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
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 // 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 }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type RoutingPreference ¶
type RoutingPreference string
RoutingPreference - Sets the routing preference of the SAP monitor. By default only RFC1918 traffic is routed to the customer VNET.
const ( RoutingPreferenceDefault RoutingPreference = "Default" RoutingPreferenceRouteAll RoutingPreference = "RouteAll" )
func PossibleRoutingPreferenceValues ¶
func PossibleRoutingPreferenceValues() []RoutingPreference
PossibleRoutingPreferenceValues returns the possible values for the RoutingPreference const type.
type SAPApplicationServerInstance ¶ added in v0.2.0
type SAPApplicationServerInstance struct { // REQUIRED; The geo-location where the resource lives Location *string // Defines the SAP Application Server instance properties. Properties *SAPApplicationServerProperties // 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 }
SAPApplicationServerInstance - Define the SAP Application Server Instance resource.
func (SAPApplicationServerInstance) MarshalJSON ¶ added in v0.2.0
func (s SAPApplicationServerInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPApplicationServerInstance.
func (*SAPApplicationServerInstance) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPApplicationServerInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPApplicationServerInstance.
type SAPApplicationServerInstanceList ¶ added in v0.2.0
type SAPApplicationServerInstanceList struct { // Gets the value of next link. NextLink *string // Gets the list of SAP Application Server instance resources. Value []*SAPApplicationServerInstance }
SAPApplicationServerInstanceList - Defines the collection of SAP Application Server Instance resources.
func (SAPApplicationServerInstanceList) MarshalJSON ¶ added in v0.2.0
func (s SAPApplicationServerInstanceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPApplicationServerInstanceList.
func (*SAPApplicationServerInstanceList) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPApplicationServerInstanceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPApplicationServerInstanceList.
type SAPApplicationServerInstancesClient ¶ added in v0.2.0
type SAPApplicationServerInstancesClient struct {
// contains filtered or unexported fields
}
SAPApplicationServerInstancesClient contains the methods for the SAPApplicationServerInstances group. Don't use this type directly, use NewSAPApplicationServerInstancesClient() instead.
func NewSAPApplicationServerInstancesClient ¶ added in v0.2.0
func NewSAPApplicationServerInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SAPApplicationServerInstancesClient, error)
NewSAPApplicationServerInstancesClient creates a new instance of SAPApplicationServerInstancesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SAPApplicationServerInstancesClient) BeginCreate ¶ added in v0.2.0
func (client *SAPApplicationServerInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body SAPApplicationServerInstance, options *SAPApplicationServerInstancesClientBeginCreateOptions) (*runtime.Poller[SAPApplicationServerInstancesClientCreateResponse], error)
BeginCreate - Puts the SAP Application Server Instance resource. This will be used by service only. PUT by end user will return a Bad Request error. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- applicationInstanceName - The name of SAP Application Server instance resource.
- body - The SAP Application Server Instance resource request body.
- options - SAPApplicationServerInstancesClientBeginCreateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginCreate method.
Example (CreateSapApplicationServerInstancesForHaSystemWithAvailabilitySet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPApplicationServerInstances_Create_HA_AvSet.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginCreate(ctx, "test-rg", "X00", "app01", armworkloads.SAPApplicationServerInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPApplicationServerProperties{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPApplicationServerInstance = armworkloads.SAPApplicationServerInstance{ // Name: to.Ptr("app01"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/app01"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPApplicationServerProperties{ // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // Hostname: to.Ptr("vh-nw1"), // IcmHTTPPort: to.Ptr[int64](3312), // IcmHTTPSPort: to.Ptr[int64](3313), // InstanceNo: to.Ptr("01"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // LoadBalancerDetails: &armworkloads.LoadBalancerDetails{ // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/loadBalancers/cs-loadBalancer"), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // VMDetails: []*armworkloads.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloads.ApplicationServerVirtualMachineTypeActive), // StorageDetails: []*armworkloads.StorageInformation{ // { // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/nfsstorageaccount"), // }}, // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm1"), // }, // { // Type: to.Ptr(armworkloads.ApplicationServerVirtualMachineTypeStandby), // StorageDetails: []*armworkloads.StorageInformation{ // { // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/nfsstorageaccount"), // }}, // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm2"), // }}, // }, // } }
Output:
Example (SapApplicationServerInstancesCreate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPApplicationServerInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginCreate(ctx, "test-rg", "X00", "app01", armworkloads.SAPApplicationServerInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPApplicationServerProperties{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPApplicationServerInstance = armworkloads.SAPApplicationServerInstance{ // Name: to.Ptr("app01"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/app01"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPApplicationServerProperties{ // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // Hostname: to.Ptr("vh-nw1"), // IcmHTTPPort: to.Ptr[int64](3312), // IcmHTTPSPort: to.Ptr[int64](3313), // InstanceNo: to.Ptr("01"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // VMDetails: []*armworkloads.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloads.ApplicationServerVirtualMachineTypeActive), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/app01-vm"), // }}, // }, // } }
Output:
func (*SAPApplicationServerInstancesClient) BeginDelete ¶ added in v0.2.0
func (client *SAPApplicationServerInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginDeleteOptions) (*runtime.Poller[SAPApplicationServerInstancesClientDeleteResponse], error)
BeginDelete - Deletes the SAP Application Server Instance resource. This operation will be used by service only. Delete by end user will return a Bad Request error. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- applicationInstanceName - The name of SAP Application Server instance resource.
- options - SAPApplicationServerInstancesClientBeginDeleteOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPApplicationServerInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginDelete(ctx, "test-rg", "X00", "app01", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("1e4193c3-206e-4916-b124-1da16175eb0e"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/operations/locations/centralus/1e4193c3-206e-4916-b124-1da16175eb0e"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPApplicationServerInstancesClient) BeginStartInstance ¶ added in v0.3.0
func (client *SAPApplicationServerInstancesClient) BeginStartInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStartInstanceOptions) (*runtime.Poller[SAPApplicationServerInstancesClientStartInstanceResponse], error)
BeginStartInstance - Starts the SAP Application Server Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- applicationInstanceName - The name of SAP Application Server instance resource.
- options - SAPApplicationServerInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStartInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPApplicationServerInstances_StartInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginStartInstance(ctx, "test-rg", "X00", "app01", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("app01"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/app01"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPApplicationServerInstancesClient) BeginStopInstance ¶ added in v0.3.0
func (client *SAPApplicationServerInstancesClient) BeginStopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStopInstanceOptions) (*runtime.Poller[SAPApplicationServerInstancesClientStopInstanceResponse], error)
BeginStopInstance - Stops the SAP Application Server Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- applicationInstanceName - The name of SAP Application Server instance resource.
- options - SAPApplicationServerInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStopInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPApplicationServerInstances_StopInstance.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginStopInstance(ctx, "test-rg", "X00", "app01", &armworkloads.SAPApplicationServerInstancesClientBeginStopInstanceOptions{Body: &armworkloads.StopRequest{ SoftStopTimeoutSeconds: to.Ptr[int64](0), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("app01"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/app01"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPApplicationServerInstancesClient) BeginUpdate ¶ added in v0.2.0
func (client *SAPApplicationServerInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body UpdateSAPApplicationInstanceRequest, options *SAPApplicationServerInstancesClientBeginUpdateOptions) (*runtime.Poller[SAPApplicationServerInstancesClientUpdateResponse], error)
BeginUpdate - Puts the SAP Application Server Instance resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- applicationInstanceName - The name of SAP Application Server instance resource.
- body - The SAP Application Server Instance resource request body.
- options - SAPApplicationServerInstancesClientBeginUpdateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPApplicationServerInstances_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginUpdate(ctx, "test-rg", "X00", "app01", armworkloads.UpdateSAPApplicationInstanceRequest{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPApplicationServerInstance = armworkloads.SAPApplicationServerInstance{ // Name: to.Ptr("app01"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/app01"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPApplicationServerProperties{ // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // Hostname: to.Ptr("vh-nw1"), // IcmHTTPPort: to.Ptr[int64](3312), // IcmHTTPSPort: to.Ptr[int64](3313), // InstanceNo: to.Ptr("01"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // VMDetails: []*armworkloads.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloads.ApplicationServerVirtualMachineTypeActive), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/app01-vm"), // }}, // }, // } }
Output:
func (*SAPApplicationServerInstancesClient) Get ¶ added in v0.2.0
func (client *SAPApplicationServerInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientGetOptions) (SAPApplicationServerInstancesClientGetResponse, error)
Get - Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- applicationInstanceName - The name of SAP Application Server instance resource.
- options - SAPApplicationServerInstancesClientGetOptions contains the optional parameters for the SAPApplicationServerInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPApplicationServerInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSAPApplicationServerInstancesClient().Get(ctx, "test-rg", "X00", "app01", 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.SAPApplicationServerInstance = armworkloads.SAPApplicationServerInstance{ // Name: to.Ptr("app01"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/app01"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPApplicationServerProperties{ // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // Hostname: to.Ptr("vh-nw1"), // IcmHTTPPort: to.Ptr[int64](3312), // IcmHTTPSPort: to.Ptr[int64](3313), // InstanceNo: to.Ptr("00"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // VMDetails: []*armworkloads.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloads.ApplicationServerVirtualMachineTypeActive), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/app01-vm"), // }}, // }, // } }
Output:
func (*SAPApplicationServerInstancesClient) NewListPager ¶ added in v0.2.0
func (client *SAPApplicationServerInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, options *SAPApplicationServerInstancesClientListOptions) *runtime.Pager[SAPApplicationServerInstancesClientListResponse]
NewListPager - Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- options - SAPApplicationServerInstancesClientListOptions contains the optional parameters for the SAPApplicationServerInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPApplicationServerInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSAPApplicationServerInstancesClient().NewListPager("test-rg", "X00", 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.SAPApplicationServerInstanceList = armworkloads.SAPApplicationServerInstanceList{ // Value: []*armworkloads.SAPApplicationServerInstance{ // { // Name: to.Ptr("app01"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/app01"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPApplicationServerProperties{ // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // Hostname: to.Ptr("vh-nw1"), // IcmHTTPPort: to.Ptr[int64](3312), // IcmHTTPSPort: to.Ptr[int64](3313), // InstanceNo: to.Ptr("00"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // VMDetails: []*armworkloads.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloads.ApplicationServerVirtualMachineTypeActive), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/app01-vm"), // }}, // }, // }, // { // Name: to.Ptr("app02"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/app02"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPApplicationServerProperties{ // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // Hostname: to.Ptr("vh-nw1"), // IcmHTTPPort: to.Ptr[int64](3312), // IcmHTTPSPort: to.Ptr[int64](3313), // InstanceNo: to.Ptr("01"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // VMDetails: []*armworkloads.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloads.ApplicationServerVirtualMachineTypeActive), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/app01-vm"), // }}, // }, // }}, // } } }
Output:
type SAPApplicationServerInstancesClientBeginCreateOptions ¶ added in v0.2.0
type SAPApplicationServerInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPApplicationServerInstancesClientBeginCreateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginCreate method.
type SAPApplicationServerInstancesClientBeginDeleteOptions ¶ added in v0.2.0
type SAPApplicationServerInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPApplicationServerInstancesClientBeginDeleteOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginDelete method.
type SAPApplicationServerInstancesClientBeginStartInstanceOptions ¶ added in v0.3.0
type SAPApplicationServerInstancesClientBeginStartInstanceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPApplicationServerInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStartInstance method.
type SAPApplicationServerInstancesClientBeginStopInstanceOptions ¶ added in v0.3.0
type SAPApplicationServerInstancesClientBeginStopInstanceOptions struct { // SAP Application server instance stop request body. Body *StopRequest // Resumes the LRO from the provided token. ResumeToken string }
SAPApplicationServerInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStopInstance method.
type SAPApplicationServerInstancesClientBeginUpdateOptions ¶ added in v0.2.0
type SAPApplicationServerInstancesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPApplicationServerInstancesClientBeginUpdateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginUpdate method.
type SAPApplicationServerInstancesClientCreateResponse ¶ added in v0.2.0
type SAPApplicationServerInstancesClientCreateResponse struct { // Define the SAP Application Server Instance resource. SAPApplicationServerInstance }
SAPApplicationServerInstancesClientCreateResponse contains the response from method SAPApplicationServerInstancesClient.BeginCreate.
type SAPApplicationServerInstancesClientDeleteResponse ¶ added in v0.2.0
type SAPApplicationServerInstancesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
SAPApplicationServerInstancesClientDeleteResponse contains the response from method SAPApplicationServerInstancesClient.BeginDelete.
type SAPApplicationServerInstancesClientGetOptions ¶ added in v0.2.0
type SAPApplicationServerInstancesClientGetOptions struct { }
SAPApplicationServerInstancesClientGetOptions contains the optional parameters for the SAPApplicationServerInstancesClient.Get method.
type SAPApplicationServerInstancesClientGetResponse ¶ added in v0.2.0
type SAPApplicationServerInstancesClientGetResponse struct { // Define the SAP Application Server Instance resource. SAPApplicationServerInstance }
SAPApplicationServerInstancesClientGetResponse contains the response from method SAPApplicationServerInstancesClient.Get.
type SAPApplicationServerInstancesClientListOptions ¶ added in v0.2.0
type SAPApplicationServerInstancesClientListOptions struct { }
SAPApplicationServerInstancesClientListOptions contains the optional parameters for the SAPApplicationServerInstancesClient.NewListPager method.
type SAPApplicationServerInstancesClientListResponse ¶ added in v0.2.0
type SAPApplicationServerInstancesClientListResponse struct { // Defines the collection of SAP Application Server Instance resources. SAPApplicationServerInstanceList }
SAPApplicationServerInstancesClientListResponse contains the response from method SAPApplicationServerInstancesClient.NewListPager.
type SAPApplicationServerInstancesClientStartInstanceResponse ¶ added in v0.3.0
type SAPApplicationServerInstancesClientStartInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPApplicationServerInstancesClientStartInstanceResponse contains the response from method SAPApplicationServerInstancesClient.BeginStartInstance.
type SAPApplicationServerInstancesClientStopInstanceResponse ¶ added in v0.3.0
type SAPApplicationServerInstancesClientStopInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPApplicationServerInstancesClientStopInstanceResponse contains the response from method SAPApplicationServerInstancesClient.BeginStopInstance.
type SAPApplicationServerInstancesClientUpdateResponse ¶ added in v0.2.0
type SAPApplicationServerInstancesClientUpdateResponse struct { // Define the SAP Application Server Instance resource. SAPApplicationServerInstance }
SAPApplicationServerInstancesClientUpdateResponse contains the response from method SAPApplicationServerInstancesClient.BeginUpdate.
type SAPApplicationServerProperties ¶ added in v0.2.0
type SAPApplicationServerProperties struct { // READ-ONLY; Defines the Application Instance errors. Errors *SAPVirtualInstanceError // READ-ONLY; Application server instance gateway Port. GatewayPort *int64 // READ-ONLY; Defines the health of SAP Instances. Health *SAPHealthState // READ-ONLY; Application server instance SAP hostname. Hostname *string // READ-ONLY; Application server instance SAP IP Address. IPAddress *string // READ-ONLY; Application server instance ICM HTTP Port. IcmHTTPPort *int64 // READ-ONLY; Application server instance ICM HTTPS Port. IcmHTTPSPort *int64 // READ-ONLY; Application server Instance Number. InstanceNo *string // READ-ONLY; Application server instance SAP Kernel Patch level. KernelPatch *string // READ-ONLY; Application server instance SAP Kernel Version. KernelVersion *string // READ-ONLY; The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines LoadBalancerDetails *LoadBalancerDetails // READ-ONLY; Defines the provisioning states. ProvisioningState *SapVirtualInstanceProvisioningState // READ-ONLY; Defines the SAP Instance status. Status *SAPVirtualInstanceStatus // READ-ONLY; Application server Subnet. Subnet *string // READ-ONLY; The list of virtual machines. VMDetails []*ApplicationServerVMDetails }
SAPApplicationServerProperties - Defines the SAP Application Server instance properties.
func (SAPApplicationServerProperties) MarshalJSON ¶ added in v0.2.0
func (s SAPApplicationServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPApplicationServerProperties.
func (*SAPApplicationServerProperties) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPApplicationServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPApplicationServerProperties.
type SAPAvailabilityZoneDetailsRequest ¶ added in v0.2.0
type SAPAvailabilityZoneDetailsRequest struct { // REQUIRED; The geo-location where the SAP resources will be created. AppLocation *string // REQUIRED; The database type. Eg: HANA, DB2, etc DatabaseType *SAPDatabaseType // REQUIRED; Defines the SAP Product type. SapProduct *SAPProductType }
SAPAvailabilityZoneDetailsRequest - The SAP request to get list of availability zones.
func (SAPAvailabilityZoneDetailsRequest) MarshalJSON ¶ added in v0.2.0
func (s SAPAvailabilityZoneDetailsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPAvailabilityZoneDetailsRequest.
func (*SAPAvailabilityZoneDetailsRequest) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPAvailabilityZoneDetailsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPAvailabilityZoneDetailsRequest.
type SAPAvailabilityZoneDetailsResult ¶ added in v0.2.0
type SAPAvailabilityZoneDetailsResult struct { // Gets the list of availability zone pairs. AvailabilityZonePairs []*SAPAvailabilityZonePair }
SAPAvailabilityZoneDetailsResult - The list of supported availability zone pairs which are part of SAP HA deployment.
func (SAPAvailabilityZoneDetailsResult) MarshalJSON ¶ added in v0.2.0
func (s SAPAvailabilityZoneDetailsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPAvailabilityZoneDetailsResult.
func (*SAPAvailabilityZoneDetailsResult) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPAvailabilityZoneDetailsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPAvailabilityZoneDetailsResult.
type SAPAvailabilityZonePair ¶ added in v0.2.0
SAPAvailabilityZonePair - The SAP Availability Zone Pair.
func (SAPAvailabilityZonePair) MarshalJSON ¶ added in v0.2.0
func (s SAPAvailabilityZonePair) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPAvailabilityZonePair.
func (*SAPAvailabilityZonePair) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPAvailabilityZonePair) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPAvailabilityZonePair.
type SAPCentralInstanceList ¶ added in v0.2.0
type SAPCentralInstanceList struct { // Gets the value of next link. NextLink *string // Gets the list of SAP central services instance resources. Value []*SAPCentralServerInstance }
SAPCentralInstanceList - Defines the collection of SAP Central Services Instance resources.
func (SAPCentralInstanceList) MarshalJSON ¶ added in v0.2.0
func (s SAPCentralInstanceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPCentralInstanceList.
func (*SAPCentralInstanceList) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPCentralInstanceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPCentralInstanceList.
type SAPCentralInstancesClient ¶ added in v0.2.0
type SAPCentralInstancesClient struct {
// contains filtered or unexported fields
}
SAPCentralInstancesClient contains the methods for the SAPCentralInstances group. Don't use this type directly, use NewSAPCentralInstancesClient() instead.
func NewSAPCentralInstancesClient ¶ added in v0.2.0
func NewSAPCentralInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SAPCentralInstancesClient, error)
NewSAPCentralInstancesClient creates a new instance of SAPCentralInstancesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SAPCentralInstancesClient) BeginCreate ¶ added in v0.2.0
func (client *SAPCentralInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body SAPCentralServerInstance, options *SAPCentralInstancesClientBeginCreateOptions) (*runtime.Poller[SAPCentralInstancesClientCreateResponse], error)
BeginCreate - Creates the SAP Central Services Instance resource. This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
- body - The SAP Central Services Instance request body.
- options - SAPCentralInstancesClientBeginCreateOptions contains the optional parameters for the SAPCentralInstancesClient.BeginCreate method.
Example (CreateSapCentralInstancesForHaSystemWithAvailabilitySet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPCentralInstances_Create_HA_AvSet.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPCentralInstancesClient().BeginCreate(ctx, "test-rg", "X00", "centralServer", armworkloads.SAPCentralServerInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPCentralServerProperties{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPCentralServerInstance = armworkloads.SAPCentralServerInstance{ // Name: to.Ptr("centralServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/centralInstances/centralServer"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloads.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloads.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ers1"), // InstanceNo: to.Ptr("00"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // }, // EnqueueServerProperties: &armworkloads.EnqueueServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloads.GatewayServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // LoadBalancerDetails: &armworkloads.LoadBalancerDetails{ // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/loadBalancers/cs-ASCS-loadBalancer"), // }, // MessageServerProperties: &armworkloads.MessageServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // HTTPPort: to.Ptr[int64](8100), // HTTPSPort: to.Ptr[int64](44400), // InternalMsPort: to.Ptr[int64](3900), // IPAddress: to.Ptr("10.0.0.5"), // MSPort: to.Ptr[int64](3600), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // VMDetails: []*armworkloads.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloads.CentralServerVirtualMachineTypePrimary), // StorageDetails: []*armworkloads.StorageInformation{ // { // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/nfsstorageaccount"), // }}, // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm1"), // }, // { // Type: to.Ptr(armworkloads.CentralServerVirtualMachineTypePrimary), // StorageDetails: []*armworkloads.StorageInformation{ // { // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/nfsstorageaccount"), // }}, // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm2"), // }}, // }, // } }
Output:
Example (SapCentralInstancesCreate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPCentralInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPCentralInstancesClient().BeginCreate(ctx, "test-rg", "X00", "centralServer", armworkloads.SAPCentralServerInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPCentralServerProperties{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPCentralServerInstance = armworkloads.SAPCentralServerInstance{ // Name: to.Ptr("centralServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/centralInstances/centralServer"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloads.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloads.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ers1"), // InstanceNo: to.Ptr("00"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // }, // EnqueueServerProperties: &armworkloads.EnqueueServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloads.GatewayServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // MessageServerProperties: &armworkloads.MessageServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // HTTPPort: to.Ptr[int64](8100), // HTTPSPort: to.Ptr[int64](44400), // InternalMsPort: to.Ptr[int64](3900), // IPAddress: to.Ptr("10.0.0.5"), // MSPort: to.Ptr[int64](3600), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // VMDetails: []*armworkloads.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloads.CentralServerVirtualMachineTypePrimary), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm"), // }}, // }, // } }
Output:
func (*SAPCentralInstancesClient) BeginDelete ¶ added in v0.2.0
func (client *SAPCentralInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginDeleteOptions) (*runtime.Poller[SAPCentralInstancesClientDeleteResponse], error)
BeginDelete - Deletes the SAP Central Services Instance resource. This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
- options - SAPCentralInstancesClientBeginDeleteOptions contains the optional parameters for the SAPCentralInstancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPCentralInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPCentralInstancesClient().BeginDelete(ctx, "test-rg", "X00", "centralServer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("1e4193c3-206e-4916-b124-1da16175eb0e"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/operations/locations/centralus/1e4193c3-206e-4916-b124-1da16175eb0e"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPCentralInstancesClient) BeginStartInstance ¶ added in v0.3.0
func (client *SAPCentralInstancesClient) BeginStartInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginStartInstanceOptions) (*runtime.Poller[SAPCentralInstancesClientStartInstanceResponse], error)
BeginStartInstance - Starts the SAP Central Services Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
- options - SAPCentralInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPCentralInstancesClient.BeginStartInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPCentralInstances_StartInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPCentralInstancesClient().BeginStartInstance(ctx, "test-rg", "X00", "centralServer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("centralServer"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/centralInstances/centralServer"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPCentralInstancesClient) BeginStopInstance ¶ added in v0.3.0
func (client *SAPCentralInstancesClient) BeginStopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginStopInstanceOptions) (*runtime.Poller[SAPCentralInstancesClientStopInstanceResponse], error)
BeginStopInstance - Stops the SAP Central Services Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
- options - SAPCentralInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPCentralInstancesClient.BeginStopInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPCentralInstances_StopInstance.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPCentralInstancesClient().BeginStopInstance(ctx, "test-rg", "X00", "centralServer", &armworkloads.SAPCentralInstancesClientBeginStopInstanceOptions{Body: &armworkloads.StopRequest{ SoftStopTimeoutSeconds: to.Ptr[int64](1200), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("centralServer"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/centralInstances/centralServer"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPCentralInstancesClient) BeginUpdate ¶ added in v0.2.0
func (client *SAPCentralInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body UpdateSAPCentralInstanceRequest, options *SAPCentralInstancesClientBeginUpdateOptions) (*runtime.Poller[SAPCentralInstancesClientUpdateResponse], error)
BeginUpdate - Updates the SAP Central Services Instance resource. This can be used to update tags on the resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
- body - The SAP Central Services Instance resource request body.
- options - SAPCentralInstancesClientBeginUpdateOptions contains the optional parameters for the SAPCentralInstancesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPCentralInstances_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPCentralInstancesClient().BeginUpdate(ctx, "test-rg", "X00", "centralServer", armworkloads.UpdateSAPCentralInstanceRequest{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPCentralServerInstance = armworkloads.SAPCentralServerInstance{ // Name: to.Ptr("centralServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/centralInstances/centralServer"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloads.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloads.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ers1"), // InstanceNo: to.Ptr("00"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // }, // EnqueueServerProperties: &armworkloads.EnqueueServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloads.GatewayServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // MessageServerProperties: &armworkloads.MessageServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // HTTPPort: to.Ptr[int64](8100), // HTTPSPort: to.Ptr[int64](44400), // InternalMsPort: to.Ptr[int64](3900), // IPAddress: to.Ptr("10.0.0.5"), // MSPort: to.Ptr[int64](3600), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // VMDetails: []*armworkloads.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloads.CentralServerVirtualMachineTypePrimary), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm"), // }}, // }, // } }
Output:
func (*SAPCentralInstancesClient) Get ¶ added in v0.2.0
func (client *SAPCentralInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientGetOptions) (SAPCentralInstancesClientGetResponse, error)
Get - Gets the SAP Central Services Instance resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
- options - SAPCentralInstancesClientGetOptions contains the optional parameters for the SAPCentralInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPCentralInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSAPCentralInstancesClient().Get(ctx, "test-rg", "X00", "centralServer", 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.SAPCentralServerInstance = armworkloads.SAPCentralServerInstance{ // Name: to.Ptr("centralServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/centralInstances/centralServer"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloads.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloads.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ers1"), // InstanceNo: to.Ptr("00"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // }, // EnqueueServerProperties: &armworkloads.EnqueueServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloads.GatewayServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateDegraded), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // MessageServerProperties: &armworkloads.MessageServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateUnhealthy), // Hostname: to.Ptr("vh-ascs1"), // HTTPPort: to.Ptr[int64](8100), // HTTPSPort: to.Ptr[int64](44400), // InternalMsPort: to.Ptr[int64](3900), // IPAddress: to.Ptr("10.0.0.5"), // MSPort: to.Ptr[int64](3600), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // VMDetails: []*armworkloads.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloads.CentralServerVirtualMachineTypePrimary), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm"), // }}, // }, // } }
Output:
func (*SAPCentralInstancesClient) NewListPager ¶ added in v0.2.0
func (client *SAPCentralInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, options *SAPCentralInstancesClientListOptions) *runtime.Pager[SAPCentralInstancesClientListResponse]
NewListPager - Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- options - SAPCentralInstancesClientListOptions contains the optional parameters for the SAPCentralInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPCentralInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSAPCentralInstancesClient().NewListPager("test-rg", "X00", 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.SAPCentralInstanceList = armworkloads.SAPCentralInstanceList{ // Value: []*armworkloads.SAPCentralServerInstance{ // { // Name: to.Ptr("centralServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/centralInstances/centralServer"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloads.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloads.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ers1"), // InstanceNo: to.Ptr("00"), // IPAddress: to.Ptr("10.0.0.5"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // }, // EnqueueServerProperties: &armworkloads.EnqueueServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloads.GatewayServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // MessageServerProperties: &armworkloads.MessageServerProperties{ // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // HTTPPort: to.Ptr[int64](8100), // HTTPSPort: to.Ptr[int64](44400), // InternalMsPort: to.Ptr[int64](3900), // IPAddress: to.Ptr("10.0.0.5"), // MSPort: to.Ptr[int64](3600), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // VMDetails: []*armworkloads.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloads.CentralServerVirtualMachineTypePrimary), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm"), // }}, // }, // }}, // } } }
Output:
type SAPCentralInstancesClientBeginCreateOptions ¶ added in v0.2.0
type SAPCentralInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPCentralInstancesClientBeginCreateOptions contains the optional parameters for the SAPCentralInstancesClient.BeginCreate method.
type SAPCentralInstancesClientBeginDeleteOptions ¶ added in v0.2.0
type SAPCentralInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPCentralInstancesClientBeginDeleteOptions contains the optional parameters for the SAPCentralInstancesClient.BeginDelete method.
type SAPCentralInstancesClientBeginStartInstanceOptions ¶ added in v0.3.0
type SAPCentralInstancesClientBeginStartInstanceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPCentralInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPCentralInstancesClient.BeginStartInstance method.
type SAPCentralInstancesClientBeginStopInstanceOptions ¶ added in v0.3.0
type SAPCentralInstancesClientBeginStopInstanceOptions struct { // SAP Central Services instance stop request body. Body *StopRequest // Resumes the LRO from the provided token. ResumeToken string }
SAPCentralInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPCentralInstancesClient.BeginStopInstance method.
type SAPCentralInstancesClientBeginUpdateOptions ¶ added in v0.2.0
type SAPCentralInstancesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPCentralInstancesClientBeginUpdateOptions contains the optional parameters for the SAPCentralInstancesClient.BeginUpdate method.
type SAPCentralInstancesClientCreateResponse ¶ added in v0.2.0
type SAPCentralInstancesClientCreateResponse struct { // Define the SAP Central Services Instance resource. SAPCentralServerInstance }
SAPCentralInstancesClientCreateResponse contains the response from method SAPCentralInstancesClient.BeginCreate.
type SAPCentralInstancesClientDeleteResponse ¶ added in v0.2.0
type SAPCentralInstancesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
SAPCentralInstancesClientDeleteResponse contains the response from method SAPCentralInstancesClient.BeginDelete.
type SAPCentralInstancesClientGetOptions ¶ added in v0.2.0
type SAPCentralInstancesClientGetOptions struct { }
SAPCentralInstancesClientGetOptions contains the optional parameters for the SAPCentralInstancesClient.Get method.
type SAPCentralInstancesClientGetResponse ¶ added in v0.2.0
type SAPCentralInstancesClientGetResponse struct { // Define the SAP Central Services Instance resource. SAPCentralServerInstance }
SAPCentralInstancesClientGetResponse contains the response from method SAPCentralInstancesClient.Get.
type SAPCentralInstancesClientListOptions ¶ added in v0.2.0
type SAPCentralInstancesClientListOptions struct { }
SAPCentralInstancesClientListOptions contains the optional parameters for the SAPCentralInstancesClient.NewListPager method.
type SAPCentralInstancesClientListResponse ¶ added in v0.2.0
type SAPCentralInstancesClientListResponse struct { // Defines the collection of SAP Central Services Instance resources. SAPCentralInstanceList }
SAPCentralInstancesClientListResponse contains the response from method SAPCentralInstancesClient.NewListPager.
type SAPCentralInstancesClientStartInstanceResponse ¶ added in v0.3.0
type SAPCentralInstancesClientStartInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPCentralInstancesClientStartInstanceResponse contains the response from method SAPCentralInstancesClient.BeginStartInstance.
type SAPCentralInstancesClientStopInstanceResponse ¶ added in v0.3.0
type SAPCentralInstancesClientStopInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPCentralInstancesClientStopInstanceResponse contains the response from method SAPCentralInstancesClient.BeginStopInstance.
type SAPCentralInstancesClientUpdateResponse ¶ added in v0.2.0
type SAPCentralInstancesClientUpdateResponse struct { // Define the SAP Central Services Instance resource. SAPCentralServerInstance }
SAPCentralInstancesClientUpdateResponse contains the response from method SAPCentralInstancesClient.BeginUpdate.
type SAPCentralServerInstance ¶ added in v0.2.0
type SAPCentralServerInstance struct { // REQUIRED; The geo-location where the resource lives Location *string // Defines the SAP Central Services Instance properties. Properties *SAPCentralServerProperties // 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 }
SAPCentralServerInstance - Define the SAP Central Services Instance resource.
func (SAPCentralServerInstance) MarshalJSON ¶ added in v0.2.0
func (s SAPCentralServerInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPCentralServerInstance.
func (*SAPCentralServerInstance) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPCentralServerInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPCentralServerInstance.
type SAPCentralServerProperties ¶ added in v0.2.0
type SAPCentralServerProperties struct { // Defines the SAP Enqueue Replication Server (ERS) properties. EnqueueReplicationServerProperties *EnqueueReplicationServerProperties // Defines the SAP Enqueue Server properties. EnqueueServerProperties *EnqueueServerProperties // Defines the SAP Gateway Server properties. GatewayServerProperties *GatewayServerProperties // Defines the SAP Message Server properties. MessageServerProperties *MessageServerProperties // READ-ONLY; Defines the errors related to SAP Central Services Instance resource. Errors *SAPVirtualInstanceError // READ-ONLY; Defines the health of SAP Instances. Health *SAPHealthState // READ-ONLY; The central services instance number. InstanceNo *string // READ-ONLY; The central services instance Kernel Patch level. KernelPatch *string // READ-ONLY; The central services instance Kernel Version. KernelVersion *string // READ-ONLY; The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines LoadBalancerDetails *LoadBalancerDetails // READ-ONLY; Defines the provisioning states. ProvisioningState *SapVirtualInstanceProvisioningState // READ-ONLY; Defines the SAP Instance status. Status *SAPVirtualInstanceStatus // READ-ONLY; The central services instance subnet. Subnet *string // READ-ONLY; The list of virtual machines corresponding to the Central Services instance. VMDetails []*CentralServerVMDetails }
SAPCentralServerProperties - Defines the SAP Central Services Instance properties.
func (SAPCentralServerProperties) MarshalJSON ¶ added in v0.2.0
func (s SAPCentralServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPCentralServerProperties.
func (*SAPCentralServerProperties) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPCentralServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPCentralServerProperties.
type SAPConfiguration ¶ added in v0.2.0
type SAPConfiguration struct { // REQUIRED; The configuration Type. ConfigurationType *SAPConfigurationType }
SAPConfiguration - The SAP Configuration.
func (*SAPConfiguration) GetSAPConfiguration ¶ added in v0.2.0
func (s *SAPConfiguration) GetSAPConfiguration() *SAPConfiguration
GetSAPConfiguration implements the SAPConfigurationClassification interface for type SAPConfiguration.
func (SAPConfiguration) MarshalJSON ¶ added in v0.2.0
func (s SAPConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPConfiguration.
func (*SAPConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPConfiguration.
type SAPConfigurationClassification ¶ added in v0.2.0
type SAPConfigurationClassification interface { // GetSAPConfiguration returns the SAPConfiguration content of the underlying type. GetSAPConfiguration() *SAPConfiguration }
SAPConfigurationClassification provides polymorphic access to related types. Call the interface's GetSAPConfiguration() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *DeploymentConfiguration, *DeploymentWithOSConfiguration, *DiscoveryConfiguration, *SAPConfiguration
type SAPConfigurationType ¶ added in v0.2.0
type SAPConfigurationType string
SAPConfigurationType - The configuration Type.
const ( SAPConfigurationTypeDeployment SAPConfigurationType = "Deployment" SAPConfigurationTypeDeploymentWithOSConfig SAPConfigurationType = "DeploymentWithOSConfig" SAPConfigurationTypeDiscovery SAPConfigurationType = "Discovery" )
func PossibleSAPConfigurationTypeValues ¶ added in v0.2.0
func PossibleSAPConfigurationTypeValues() []SAPConfigurationType
PossibleSAPConfigurationTypeValues returns the possible values for the SAPConfigurationType const type.
type SAPDatabaseInstance ¶ added in v0.2.0
type SAPDatabaseInstance struct { // REQUIRED; The geo-location where the resource lives Location *string // Defines the Database properties. Properties *SAPDatabaseProperties // 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 }
SAPDatabaseInstance - Define the Database resource.
func (SAPDatabaseInstance) MarshalJSON ¶ added in v0.2.0
func (s SAPDatabaseInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDatabaseInstance.
func (*SAPDatabaseInstance) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPDatabaseInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDatabaseInstance.
type SAPDatabaseInstanceList ¶ added in v0.2.0
type SAPDatabaseInstanceList struct { // Gets the value of next link. NextLink *string // Gets the list of SAP Database instances. Value []*SAPDatabaseInstance }
SAPDatabaseInstanceList - Defines the collection of SAP Database Instances.
func (SAPDatabaseInstanceList) MarshalJSON ¶ added in v0.2.0
func (s SAPDatabaseInstanceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDatabaseInstanceList.
func (*SAPDatabaseInstanceList) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPDatabaseInstanceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDatabaseInstanceList.
type SAPDatabaseInstancesClient ¶ added in v0.2.0
type SAPDatabaseInstancesClient struct {
// contains filtered or unexported fields
}
SAPDatabaseInstancesClient contains the methods for the SAPDatabaseInstances group. Don't use this type directly, use NewSAPDatabaseInstancesClient() instead.
func NewSAPDatabaseInstancesClient ¶ added in v0.2.0
func NewSAPDatabaseInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SAPDatabaseInstancesClient, error)
NewSAPDatabaseInstancesClient creates a new instance of SAPDatabaseInstancesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SAPDatabaseInstancesClient) BeginCreate ¶ added in v0.2.0
func (client *SAPDatabaseInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body SAPDatabaseInstance, options *SAPDatabaseInstancesClientBeginCreateOptions) (*runtime.Poller[SAPDatabaseInstancesClientCreateResponse], error)
BeginCreate - Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. This will be used by service only. PUT by end user will return a Bad Request error. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
- body - Request body of Database resource of a SAP system.
- options - SAPDatabaseInstancesClientBeginCreateOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginCreate method.
Example (CreateSapDatabaseInstancesForHaSystemWithAvailabilitySet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDatabaseInstances_Create_HA_AvSet.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginCreate(ctx, "test-rg", "X00", "databaseServer", armworkloads.SAPDatabaseInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPDatabaseProperties{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPDatabaseInstance = armworkloads.SAPDatabaseInstance{ // Name: to.Ptr("databaseServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/databaseInstances/databaseServer"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // LoadBalancerDetails: &armworkloads.LoadBalancerDetails{ // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/loadBalancers/db-loadBalancer"), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloads.DatabaseVMDetails{ // { // StorageDetails: []*armworkloads.StorageInformation{ // { // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/nfsstorageaccount"), // }}, // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/db-vm"), // }}, // }, // } }
Output:
Example (SapDatabaseInstancesCreate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDatabaseInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginCreate(ctx, "test-rg", "X00", "databaseServer", armworkloads.SAPDatabaseInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPDatabaseProperties{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPDatabaseInstance = armworkloads.SAPDatabaseInstance{ // Name: to.Ptr("databaseServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/databaseInstances/databaseServer"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloads.DatabaseVMDetails{ // { // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/db-vm"), // }}, // }, // } }
Output:
func (*SAPDatabaseInstancesClient) BeginDelete ¶ added in v0.2.0
func (client *SAPDatabaseInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginDeleteOptions) (*runtime.Poller[SAPDatabaseInstancesClientDeleteResponse], error)
BeginDelete - Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. This will be used by service only. Delete by end user will return a Bad Request error. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
- options - SAPDatabaseInstancesClientBeginDeleteOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDatabaseInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginDelete(ctx, "test-rg", "X00", "databaseServer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("1e4193c3-206e-4916-b124-1da16175eb0e"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/operations/locations/centralus/1e4193c3-206e-4916-b124-1da16175eb0e"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPDatabaseInstancesClient) BeginStartInstance ¶ added in v0.3.0
func (client *SAPDatabaseInstancesClient) BeginStartInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStartInstanceOptions) (*runtime.Poller[SAPDatabaseInstancesClientStartInstanceResponse], error)
BeginStartInstance - Starts the database instance of the SAP system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
- options - SAPDatabaseInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStartInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDatabaseInstances_StartInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginStartInstance(ctx, "test-rg", "X00", "db0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("db0"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-01T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/db0"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-01T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPDatabaseInstancesClient) BeginStopInstance ¶ added in v0.3.0
func (client *SAPDatabaseInstancesClient) BeginStopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStopInstanceOptions) (*runtime.Poller[SAPDatabaseInstancesClientStopInstanceResponse], error)
BeginStopInstance - Stops the database instance of the SAP system. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
- options - SAPDatabaseInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStopInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDatabaseInstances_StopInstance.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginStopInstance(ctx, "test-rg", "X00", "db0", &armworkloads.SAPDatabaseInstancesClientBeginStopInstanceOptions{Body: &armworkloads.StopRequest{ SoftStopTimeoutSeconds: to.Ptr[int64](0), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("db0"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-01T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/applicationInstances/db0"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-01T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPDatabaseInstancesClient) BeginUpdate ¶ added in v0.2.0
func (client *SAPDatabaseInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body UpdateSAPDatabaseInstanceRequest, options *SAPDatabaseInstancesClientBeginUpdateOptions) (*runtime.Poller[SAPDatabaseInstancesClientUpdateResponse], error)
BeginUpdate - Updates the Database resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
- body - Database resource update request body.
- options - SAPDatabaseInstancesClientBeginUpdateOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDatabaseInstances_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginUpdate(ctx, "test-rg", "X00", "databaseServer", armworkloads.UpdateSAPDatabaseInstanceRequest{ Tags: map[string]*string{ "key1": to.Ptr("value1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPDatabaseInstance = armworkloads.SAPDatabaseInstance{ // Name: to.Ptr("databaseServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/databaseInstances/databaseServer"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloads.DatabaseVMDetails{ // { // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/db-vm"), // }}, // }, // } }
Output:
func (*SAPDatabaseInstancesClient) Get ¶ added in v0.2.0
func (client *SAPDatabaseInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientGetOptions) (SAPDatabaseInstancesClientGetResponse, error)
Get - Gets the SAP Database Instance resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
- options - SAPDatabaseInstancesClientGetOptions contains the optional parameters for the SAPDatabaseInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDatabaseInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSAPDatabaseInstancesClient().Get(ctx, "test-rg", "X00", "databaseServer", 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.SAPDatabaseInstance = armworkloads.SAPDatabaseInstance{ // Name: to.Ptr("databaseServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/databaseInstances/databaseServer"), // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloads.DatabaseVMDetails{ // { // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/db-vm"), // }}, // }, // } }
Output:
func (*SAPDatabaseInstancesClient) NewListPager ¶ added in v0.2.0
func (client *SAPDatabaseInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, options *SAPDatabaseInstancesClientListOptions) *runtime.Pager[SAPDatabaseInstancesClientListResponse]
NewListPager - Lists the Database resources associated with a Virtual Instance for SAP solutions resource.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- options - SAPDatabaseInstancesClientListOptions contains the optional parameters for the SAPDatabaseInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPDatabaseInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSAPDatabaseInstancesClient().NewListPager("test-rg", "X00", 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.SAPDatabaseInstanceList = armworkloads.SAPDatabaseInstanceList{ // Value: []*armworkloads.SAPDatabaseInstance{ // { // Name: to.Ptr("databaseServer"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/databaseInstances/databaseServer"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloads.DatabaseVMDetails{ // { // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/db-vm"), // }}, // }, // }}, // } } }
Output:
type SAPDatabaseInstancesClientBeginCreateOptions ¶ added in v0.2.0
type SAPDatabaseInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPDatabaseInstancesClientBeginCreateOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginCreate method.
type SAPDatabaseInstancesClientBeginDeleteOptions ¶ added in v0.2.0
type SAPDatabaseInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPDatabaseInstancesClientBeginDeleteOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginDelete method.
type SAPDatabaseInstancesClientBeginStartInstanceOptions ¶ added in v0.3.0
type SAPDatabaseInstancesClientBeginStartInstanceOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPDatabaseInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStartInstance method.
type SAPDatabaseInstancesClientBeginStopInstanceOptions ¶ added in v0.3.0
type SAPDatabaseInstancesClientBeginStopInstanceOptions struct { // Stop request for the database instance of the SAP system. Body *StopRequest // Resumes the LRO from the provided token. ResumeToken string }
SAPDatabaseInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStopInstance method.
type SAPDatabaseInstancesClientBeginUpdateOptions ¶ added in v0.2.0
type SAPDatabaseInstancesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPDatabaseInstancesClientBeginUpdateOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginUpdate method.
type SAPDatabaseInstancesClientCreateResponse ¶ added in v0.2.0
type SAPDatabaseInstancesClientCreateResponse struct { // Define the Database resource. SAPDatabaseInstance }
SAPDatabaseInstancesClientCreateResponse contains the response from method SAPDatabaseInstancesClient.BeginCreate.
type SAPDatabaseInstancesClientDeleteResponse ¶ added in v0.2.0
type SAPDatabaseInstancesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
SAPDatabaseInstancesClientDeleteResponse contains the response from method SAPDatabaseInstancesClient.BeginDelete.
type SAPDatabaseInstancesClientGetOptions ¶ added in v0.2.0
type SAPDatabaseInstancesClientGetOptions struct { }
SAPDatabaseInstancesClientGetOptions contains the optional parameters for the SAPDatabaseInstancesClient.Get method.
type SAPDatabaseInstancesClientGetResponse ¶ added in v0.2.0
type SAPDatabaseInstancesClientGetResponse struct { // Define the Database resource. SAPDatabaseInstance }
SAPDatabaseInstancesClientGetResponse contains the response from method SAPDatabaseInstancesClient.Get.
type SAPDatabaseInstancesClientListOptions ¶ added in v0.2.0
type SAPDatabaseInstancesClientListOptions struct { }
SAPDatabaseInstancesClientListOptions contains the optional parameters for the SAPDatabaseInstancesClient.NewListPager method.
type SAPDatabaseInstancesClientListResponse ¶ added in v0.2.0
type SAPDatabaseInstancesClientListResponse struct { // Defines the collection of SAP Database Instances. SAPDatabaseInstanceList }
SAPDatabaseInstancesClientListResponse contains the response from method SAPDatabaseInstancesClient.NewListPager.
type SAPDatabaseInstancesClientStartInstanceResponse ¶ added in v0.3.0
type SAPDatabaseInstancesClientStartInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPDatabaseInstancesClientStartInstanceResponse contains the response from method SAPDatabaseInstancesClient.BeginStartInstance.
type SAPDatabaseInstancesClientStopInstanceResponse ¶ added in v0.3.0
type SAPDatabaseInstancesClientStopInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPDatabaseInstancesClientStopInstanceResponse contains the response from method SAPDatabaseInstancesClient.BeginStopInstance.
type SAPDatabaseInstancesClientUpdateResponse ¶ added in v0.2.0
type SAPDatabaseInstancesClientUpdateResponse struct { // Define the Database resource. SAPDatabaseInstance }
SAPDatabaseInstancesClientUpdateResponse contains the response from method SAPDatabaseInstancesClient.BeginUpdate.
type SAPDatabaseProperties ¶ added in v0.2.0
type SAPDatabaseProperties struct { // READ-ONLY; Database SID name. DatabaseSid *string // READ-ONLY; Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. DatabaseType *string // READ-ONLY; Defines the errors related to Database resource. Errors *SAPVirtualInstanceError // READ-ONLY; Database IP Address. IPAddress *string // READ-ONLY; The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines LoadBalancerDetails *LoadBalancerDetails // READ-ONLY; Defines the provisioning states. ProvisioningState *SapVirtualInstanceProvisioningState // READ-ONLY; Defines the SAP Instance status. Status *SAPVirtualInstanceStatus // READ-ONLY; Database subnet. Subnet *string // READ-ONLY; The list of virtual machines corresponding to the Database resource. VMDetails []*DatabaseVMDetails }
SAPDatabaseProperties - Defines the Database properties.
func (SAPDatabaseProperties) MarshalJSON ¶ added in v0.2.0
func (s SAPDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDatabaseProperties.
func (*SAPDatabaseProperties) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDatabaseProperties.
type SAPDatabaseScaleMethod ¶ added in v0.2.0
type SAPDatabaseScaleMethod string
SAPDatabaseScaleMethod - The database scale method.
const (
SAPDatabaseScaleMethodScaleUp SAPDatabaseScaleMethod = "ScaleUp"
)
func PossibleSAPDatabaseScaleMethodValues ¶ added in v0.2.0
func PossibleSAPDatabaseScaleMethodValues() []SAPDatabaseScaleMethod
PossibleSAPDatabaseScaleMethodValues returns the possible values for the SAPDatabaseScaleMethod const type.
type SAPDatabaseType ¶ added in v0.2.0
type SAPDatabaseType string
SAPDatabaseType - Defines the supported SAP Database types.
const ( SAPDatabaseTypeDB2 SAPDatabaseType = "DB2" SAPDatabaseTypeHANA SAPDatabaseType = "HANA" )
func PossibleSAPDatabaseTypeValues ¶ added in v0.2.0
func PossibleSAPDatabaseTypeValues() []SAPDatabaseType
PossibleSAPDatabaseTypeValues returns the possible values for the SAPDatabaseType const type.
type SAPDeploymentType ¶ added in v0.2.0
type SAPDeploymentType string
SAPDeploymentType - The type of SAP deployment, single server or Three tier.
const ( SAPDeploymentTypeSingleServer SAPDeploymentType = "SingleServer" SAPDeploymentTypeThreeTier SAPDeploymentType = "ThreeTier" )
func PossibleSAPDeploymentTypeValues ¶ added in v0.2.0
func PossibleSAPDeploymentTypeValues() []SAPDeploymentType
PossibleSAPDeploymentTypeValues returns the possible values for the SAPDeploymentType const type.
type SAPDiskConfiguration ¶ added in v0.2.0
type SAPDiskConfiguration struct { // The recommended disk details for a given VM Sku. RecommendedConfiguration *DiskVolumeConfiguration // The list of supported disks for a given VM Sku. SupportedConfigurations []*DiskDetails }
SAPDiskConfiguration - The SAP Disk Configuration contains 'recommended disk' details and list of supported disks detail for a volume type.
func (SAPDiskConfiguration) MarshalJSON ¶ added in v0.2.0
func (s SAPDiskConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDiskConfiguration.
func (*SAPDiskConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPDiskConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDiskConfiguration.
type SAPDiskConfigurationsRequest ¶ added in v0.2.0
type SAPDiskConfigurationsRequest struct { // REQUIRED; The geo-location where the SAP resources will be created. AppLocation *string // REQUIRED; The database type. Eg: HANA, DB2, etc DatabaseType *SAPDatabaseType // REQUIRED; The VM SKU for database instance. DbVMSKU *string // REQUIRED; The deployment type. Eg: SingleServer/ThreeTier DeploymentType *SAPDeploymentType // REQUIRED; Defines the environment type - Production/Non Production. Environment *SAPEnvironmentType // REQUIRED; Defines the SAP Product type. SapProduct *SAPProductType }
SAPDiskConfigurationsRequest - The SAP request to get list of disk configurations.
func (SAPDiskConfigurationsRequest) MarshalJSON ¶ added in v0.2.0
func (s SAPDiskConfigurationsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDiskConfigurationsRequest.
func (*SAPDiskConfigurationsRequest) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPDiskConfigurationsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDiskConfigurationsRequest.
type SAPDiskConfigurationsResult ¶ added in v0.2.0
type SAPDiskConfigurationsResult struct { // The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', // 'os'], Optional volume : ['backup']. VolumeConfigurations map[string]*SAPDiskConfiguration }
SAPDiskConfigurationsResult - The list of disk configuration for vmSku which are part of SAP deployment.
func (SAPDiskConfigurationsResult) MarshalJSON ¶ added in v0.2.0
func (s SAPDiskConfigurationsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDiskConfigurationsResult.
func (*SAPDiskConfigurationsResult) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPDiskConfigurationsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDiskConfigurationsResult.
type SAPEnvironmentType ¶ added in v0.2.0
type SAPEnvironmentType string
SAPEnvironmentType - Defines the environment type - Production/Non Production.
const ( SAPEnvironmentTypeNonProd SAPEnvironmentType = "NonProd" SAPEnvironmentTypeProd SAPEnvironmentType = "Prod" )
func PossibleSAPEnvironmentTypeValues ¶ added in v0.2.0
func PossibleSAPEnvironmentTypeValues() []SAPEnvironmentType
PossibleSAPEnvironmentTypeValues returns the possible values for the SAPEnvironmentType const type.
type SAPHealthState ¶ added in v0.2.0
type SAPHealthState string
SAPHealthState - Defines the health of SAP Instances.
const ( SAPHealthStateDegraded SAPHealthState = "Degraded" SAPHealthStateHealthy SAPHealthState = "Healthy" SAPHealthStateUnhealthy SAPHealthState = "Unhealthy" SAPHealthStateUnknown SAPHealthState = "Unknown" )
func PossibleSAPHealthStateValues ¶ added in v0.2.0
func PossibleSAPHealthStateValues() []SAPHealthState
PossibleSAPHealthStateValues returns the possible values for the SAPHealthState const type.
type SAPHighAvailabilityType ¶ added in v0.2.0
type SAPHighAvailabilityType string
SAPHighAvailabilityType - The high availability type (AvailabilitySet or AvailabilityZone).
const ( SAPHighAvailabilityTypeAvailabilitySet SAPHighAvailabilityType = "AvailabilitySet" SAPHighAvailabilityTypeAvailabilityZone SAPHighAvailabilityType = "AvailabilityZone" )
func PossibleSAPHighAvailabilityTypeValues ¶ added in v0.2.0
func PossibleSAPHighAvailabilityTypeValues() []SAPHighAvailabilityType
PossibleSAPHighAvailabilityTypeValues returns the possible values for the SAPHighAvailabilityType const type.
type SAPInstallWithoutOSConfigSoftwareConfiguration ¶ added in v0.2.0
type SAPInstallWithoutOSConfigSoftwareConfiguration struct { // REQUIRED; The URL to the SAP Build of Materials(BOM) file. BomURL *string // REQUIRED; The SAP bits storage account id. SapBitsStorageAccountID *string // REQUIRED; The SAP software installation Type. SoftwareInstallationType *SAPSoftwareInstallationType // REQUIRED; The software version to install. SoftwareVersion *string // Gets or sets the HA software configuration. HighAvailabilitySoftwareConfiguration *HighAvailabilitySoftwareConfiguration }
SAPInstallWithoutOSConfigSoftwareConfiguration - The SAP Software configuration Input when the software is to be installed by service without OS Configurations
func (*SAPInstallWithoutOSConfigSoftwareConfiguration) GetSoftwareConfiguration ¶ added in v0.2.0
func (s *SAPInstallWithoutOSConfigSoftwareConfiguration) GetSoftwareConfiguration() *SoftwareConfiguration
GetSoftwareConfiguration implements the SoftwareConfigurationClassification interface for type SAPInstallWithoutOSConfigSoftwareConfiguration.
func (SAPInstallWithoutOSConfigSoftwareConfiguration) MarshalJSON ¶ added in v0.2.0
func (s SAPInstallWithoutOSConfigSoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPInstallWithoutOSConfigSoftwareConfiguration.
func (*SAPInstallWithoutOSConfigSoftwareConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPInstallWithoutOSConfigSoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPInstallWithoutOSConfigSoftwareConfiguration.
type SAPProductType ¶ added in v0.2.0
type SAPProductType string
SAPProductType - Defines the SAP Product type.
const ( SAPProductTypeECC SAPProductType = "ECC" SAPProductTypeOther SAPProductType = "Other" SAPProductTypeS4HANA SAPProductType = "S4HANA" )
func PossibleSAPProductTypeValues ¶ added in v0.2.0
func PossibleSAPProductTypeValues() []SAPProductType
PossibleSAPProductTypeValues returns the possible values for the SAPProductType const type.
type SAPSizingRecommendationRequest ¶ added in v0.2.0
type SAPSizingRecommendationRequest struct { // REQUIRED; The geo-location where the resource is to be created. AppLocation *string // REQUIRED; The database type. DatabaseType *SAPDatabaseType // REQUIRED; The database memory configuration. DbMemory *int64 // REQUIRED; The deployment type. Eg: SingleServer/ThreeTier DeploymentType *SAPDeploymentType // REQUIRED; Defines the environment type - Production/Non Production. Environment *SAPEnvironmentType // REQUIRED; Defines the SAP Product type. SapProduct *SAPProductType // REQUIRED; The SAP Application Performance Standard measurement. Saps *int64 // The DB scale method. DbScaleMethod *SAPDatabaseScaleMethod // The high availability type. HighAvailabilityType *SAPHighAvailabilityType }
SAPSizingRecommendationRequest - The SAP Sizing Recommendation request.
func (SAPSizingRecommendationRequest) MarshalJSON ¶ added in v0.2.0
func (s SAPSizingRecommendationRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSizingRecommendationRequest.
func (*SAPSizingRecommendationRequest) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPSizingRecommendationRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSizingRecommendationRequest.
type SAPSizingRecommendationResult ¶ added in v0.2.0
type SAPSizingRecommendationResult struct { // REQUIRED; The type of SAP deployment, single server or Three tier. DeploymentType *SAPDeploymentType }
SAPSizingRecommendationResult - The SAP sizing recommendation result.
func (*SAPSizingRecommendationResult) GetSAPSizingRecommendationResult ¶ added in v0.2.0
func (s *SAPSizingRecommendationResult) GetSAPSizingRecommendationResult() *SAPSizingRecommendationResult
GetSAPSizingRecommendationResult implements the SAPSizingRecommendationResultClassification interface for type SAPSizingRecommendationResult.
func (SAPSizingRecommendationResult) MarshalJSON ¶ added in v0.2.0
func (s SAPSizingRecommendationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSizingRecommendationResult.
func (*SAPSizingRecommendationResult) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPSizingRecommendationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSizingRecommendationResult.
type SAPSizingRecommendationResultClassification ¶ added in v0.2.0
type SAPSizingRecommendationResultClassification interface { // GetSAPSizingRecommendationResult returns the SAPSizingRecommendationResult content of the underlying type. GetSAPSizingRecommendationResult() *SAPSizingRecommendationResult }
SAPSizingRecommendationResultClassification provides polymorphic access to related types. Call the interface's GetSAPSizingRecommendationResult() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *SAPSizingRecommendationResult, *SingleServerRecommendationResult, *ThreeTierRecommendationResult
type SAPSoftwareInstallationType ¶ added in v0.2.0
type SAPSoftwareInstallationType string
SAPSoftwareInstallationType - The SAP software installation Type.
const ( SAPSoftwareInstallationTypeExternal SAPSoftwareInstallationType = "External" SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig SAPSoftwareInstallationType = "SAPInstallWithoutOSConfig" SAPSoftwareInstallationTypeServiceInitiated SAPSoftwareInstallationType = "ServiceInitiated" )
func PossibleSAPSoftwareInstallationTypeValues ¶ added in v0.2.0
func PossibleSAPSoftwareInstallationTypeValues() []SAPSoftwareInstallationType
PossibleSAPSoftwareInstallationTypeValues returns the possible values for the SAPSoftwareInstallationType const type.
type SAPSupportedResourceSKUsResult ¶ added in v0.2.0
type SAPSupportedResourceSKUsResult struct { // Gets the list of SAP supported SKUs. SupportedSKUs []*SAPSupportedSKU }
SAPSupportedResourceSKUsResult - The list of supported SKUs for different resources which are part of SAP deployment.
func (SAPSupportedResourceSKUsResult) MarshalJSON ¶ added in v0.2.0
func (s SAPSupportedResourceSKUsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSupportedResourceSKUsResult.
func (*SAPSupportedResourceSKUsResult) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPSupportedResourceSKUsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSupportedResourceSKUsResult.
type SAPSupportedSKU ¶ added in v0.2.0
type SAPSupportedSKU struct { // True if the Sku is certified for App server in the SAP system. IsAppServerCertified *bool // True if the Sku is certified for Database server in the SAP system. IsDatabaseCertified *bool // The VM Sku. VMSKU *string }
SAPSupportedSKU - The SAP supported SKU.
func (SAPSupportedSKU) MarshalJSON ¶ added in v0.2.0
func (s SAPSupportedSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSupportedSKU.
func (*SAPSupportedSKU) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPSupportedSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSupportedSKU.
type SAPSupportedSKUsRequest ¶ added in v0.2.0
type SAPSupportedSKUsRequest struct { // REQUIRED; The geo-location where the resource is to be created. AppLocation *string // REQUIRED; The database type. Eg: HANA, DB2, etc DatabaseType *SAPDatabaseType // REQUIRED; The deployment type. Eg: SingleServer/ThreeTier DeploymentType *SAPDeploymentType // REQUIRED; Defines the environment type - Production/Non Production. Environment *SAPEnvironmentType // REQUIRED; Defines the SAP Product type. SapProduct *SAPProductType // The high availability type. HighAvailabilityType *SAPHighAvailabilityType }
SAPSupportedSKUsRequest - The SAP request to get list of supported SKUs.
func (SAPSupportedSKUsRequest) MarshalJSON ¶ added in v0.2.0
func (s SAPSupportedSKUsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSupportedSKUsRequest.
func (*SAPSupportedSKUsRequest) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPSupportedSKUsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSupportedSKUsRequest.
type SAPVirtualInstance ¶ added in v0.2.0
type SAPVirtualInstance struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; Defines the Virtual Instance for SAP solutions resource properties. Properties *SAPVirtualInstanceProperties // A pre-created user assigned identity with appropriate roles assigned. To learn more on identity and roles required, visit // the ACSS how-to-guide. Identity *UserAssignedServiceIdentity // 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 }
SAPVirtualInstance - Define the Virtual Instance for SAP solutions resource.
func (SAPVirtualInstance) MarshalJSON ¶ added in v0.2.0
func (s SAPVirtualInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstance.
func (*SAPVirtualInstance) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPVirtualInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstance.
type SAPVirtualInstanceError ¶ added in v0.2.0
type SAPVirtualInstanceError struct { // The Virtual Instance for SAP error body. Properties *ErrorDefinition }
SAPVirtualInstanceError - An error response from the Virtual Instance for SAP Workload service.
func (SAPVirtualInstanceError) MarshalJSON ¶ added in v0.2.0
func (s SAPVirtualInstanceError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstanceError.
func (*SAPVirtualInstanceError) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPVirtualInstanceError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstanceError.
type SAPVirtualInstanceList ¶ added in v0.2.0
type SAPVirtualInstanceList struct { // Gets the value of next link. NextLink *string // Gets the list of Virtual Instances for SAP solutions resources. Value []*SAPVirtualInstance }
SAPVirtualInstanceList - Defines the collection of Virtual Instance for SAP solutions resources.
func (SAPVirtualInstanceList) MarshalJSON ¶ added in v0.2.0
func (s SAPVirtualInstanceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstanceList.
func (*SAPVirtualInstanceList) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPVirtualInstanceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstanceList.
type SAPVirtualInstanceProperties ¶ added in v0.2.0
type SAPVirtualInstanceProperties struct { // REQUIRED; Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP // system is being registered with ACSS Configuration SAPConfigurationClassification // REQUIRED; Defines the environment type - Production/Non Production. Environment *SAPEnvironmentType // REQUIRED; Defines the SAP Product type. SapProduct *SAPProductType // Managed resource group configuration ManagedResourceGroupConfiguration *ManagedRGConfiguration // READ-ONLY; Indicates any errors on the Virtual Instance for SAP solutions resource. Errors *SAPVirtualInstanceError // READ-ONLY; Defines the health of SAP Instances. Health *SAPHealthState // READ-ONLY; Defines the provisioning states. ProvisioningState *SapVirtualInstanceProvisioningState // READ-ONLY; Defines the Virtual Instance for SAP state. State *SAPVirtualInstanceState // READ-ONLY; Defines the SAP Instance status. Status *SAPVirtualInstanceStatus }
SAPVirtualInstanceProperties - Defines the Virtual Instance for SAP solutions resource properties.
func (SAPVirtualInstanceProperties) MarshalJSON ¶ added in v0.2.0
func (s SAPVirtualInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstanceProperties.
func (*SAPVirtualInstanceProperties) UnmarshalJSON ¶ added in v0.2.0
func (s *SAPVirtualInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstanceProperties.
type SAPVirtualInstanceState ¶ added in v0.2.0
type SAPVirtualInstanceState string
SAPVirtualInstanceState - Defines the Virtual Instance for SAP state.
const ( SAPVirtualInstanceStateDiscoveryFailed SAPVirtualInstanceState = "DiscoveryFailed" SAPVirtualInstanceStateDiscoveryInProgress SAPVirtualInstanceState = "DiscoveryInProgress" SAPVirtualInstanceStateDiscoveryPending SAPVirtualInstanceState = "DiscoveryPending" SAPVirtualInstanceStateInfrastructureDeploymentFailed SAPVirtualInstanceState = "InfrastructureDeploymentFailed" SAPVirtualInstanceStateInfrastructureDeploymentInProgress SAPVirtualInstanceState = "InfrastructureDeploymentInProgress" SAPVirtualInstanceStateInfrastructureDeploymentPending SAPVirtualInstanceState = "InfrastructureDeploymentPending" SAPVirtualInstanceStateRegistrationComplete SAPVirtualInstanceState = "RegistrationComplete" SAPVirtualInstanceStateSoftwareDetectionFailed SAPVirtualInstanceState = "SoftwareDetectionFailed" SAPVirtualInstanceStateSoftwareDetectionInProgress SAPVirtualInstanceState = "SoftwareDetectionInProgress" SAPVirtualInstanceStateSoftwareInstallationFailed SAPVirtualInstanceState = "SoftwareInstallationFailed" SAPVirtualInstanceStateSoftwareInstallationInProgress SAPVirtualInstanceState = "SoftwareInstallationInProgress" SAPVirtualInstanceStateSoftwareInstallationPending SAPVirtualInstanceState = "SoftwareInstallationPending" )
func PossibleSAPVirtualInstanceStateValues ¶ added in v0.2.0
func PossibleSAPVirtualInstanceStateValues() []SAPVirtualInstanceState
PossibleSAPVirtualInstanceStateValues returns the possible values for the SAPVirtualInstanceState const type.
type SAPVirtualInstanceStatus ¶ added in v0.2.0
type SAPVirtualInstanceStatus string
SAPVirtualInstanceStatus - Defines the SAP Instance status.
const ( SAPVirtualInstanceStatusOffline SAPVirtualInstanceStatus = "Offline" SAPVirtualInstanceStatusPartiallyRunning SAPVirtualInstanceStatus = "PartiallyRunning" SAPVirtualInstanceStatusRunning SAPVirtualInstanceStatus = "Running" SAPVirtualInstanceStatusSoftShutdown SAPVirtualInstanceStatus = "SoftShutdown" SAPVirtualInstanceStatusStarting SAPVirtualInstanceStatus = "Starting" SAPVirtualInstanceStatusStopping SAPVirtualInstanceStatus = "Stopping" )
func PossibleSAPVirtualInstanceStatusValues ¶ added in v0.2.0
func PossibleSAPVirtualInstanceStatusValues() []SAPVirtualInstanceStatus
PossibleSAPVirtualInstanceStatusValues returns the possible values for the SAPVirtualInstanceStatus const type.
type SAPVirtualInstancesClient ¶ added in v0.2.0
type SAPVirtualInstancesClient struct {
// contains filtered or unexported fields
}
SAPVirtualInstancesClient contains the methods for the SAPVirtualInstances group. Don't use this type directly, use NewSAPVirtualInstancesClient() instead.
func NewSAPVirtualInstancesClient ¶ added in v0.2.0
func NewSAPVirtualInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SAPVirtualInstancesClient, error)
NewSAPVirtualInstancesClient creates a new instance of SAPVirtualInstancesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SAPVirtualInstancesClient) BeginCreate ¶ added in v0.2.0
func (client *SAPVirtualInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body SAPVirtualInstance, options *SAPVirtualInstancesClientBeginCreateOptions) (*runtime.Poller[SAPVirtualInstancesClientCreateResponse], error)
BeginCreate - Creates a Virtual Instance for SAP solutions (VIS) resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- body - Virtual Instance for SAP solutions resource request body.
- options - SAPVirtualInstancesClientBeginCreateOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginCreate method.
Example (CreateInfrastructureOnlyForDistributedSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureOnlyForHaSystemWithAvailabilitySet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](5), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), }, }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](5), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureOnlyForHaSystemWithAvailabilityZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), }, }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureOnlyForSingleServerSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), NetworkConfiguration: &armworkloads.NetworkConfiguration{ IsSecondaryIPEnabled: to.Ptr(true), }, SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloads.SSHConfiguration{ PublicKeys: []*armworkloads.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithDiskAndOsConfigurationForDistributedSystemRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_Distributed.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), DiskConfiguration: &armworkloads.DiskConfiguration{ DiskVolumeConfigurations: map[string]*armworkloads.DiskVolumeConfiguration{ "backup": { Count: to.Ptr[int64](2), SizeGB: to.Ptr[int64](256), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "hana/data": { Count: to.Ptr[int64](4), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, "hana/log": { Count: to.Ptr[int64](3), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, "hana/shared": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](256), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "os": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](64), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "usr/sap": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, }, }, InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // DiskConfiguration: &armworkloads.DiskConfiguration{ // DiskVolumeConfigurations: map[string]*armworkloads.DiskVolumeConfiguration{ // "backup": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "hana/data": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // "hana/log": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // "hana/shared": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "os": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "usr/sap": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // }, // }, // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithDiskAndOsConfigurationForHaSystemWithAvailabilitySetRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvSet.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), DiskConfiguration: &armworkloads.DiskConfiguration{ DiskVolumeConfigurations: map[string]*armworkloads.DiskVolumeConfiguration{ "backup": { Count: to.Ptr[int64](2), SizeGB: to.Ptr[int64](256), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "hana/data": { Count: to.Ptr[int64](4), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, "hana/log": { Count: to.Ptr[int64](3), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, "hana/shared": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](256), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "os": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](64), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "usr/sap": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, }, }, InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // DiskConfiguration: &armworkloads.DiskConfiguration{ // DiskVolumeConfigurations: map[string]*armworkloads.DiskVolumeConfiguration{ // "backup": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "hana/data": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // "hana/log": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // "hana/shared": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "os": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "usr/sap": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // }, // }, // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithDiskAndOsConfigurationForHaSystemWithAvailabilityZoneRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvZone.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), DiskConfiguration: &armworkloads.DiskConfiguration{ DiskVolumeConfigurations: map[string]*armworkloads.DiskVolumeConfiguration{ "backup": { Count: to.Ptr[int64](2), SizeGB: to.Ptr[int64](256), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "hana/data": { Count: to.Ptr[int64](4), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, "hana/log": { Count: to.Ptr[int64](3), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, "hana/shared": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](256), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "os": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](64), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "usr/sap": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, }, }, InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // DiskConfiguration: &armworkloads.DiskConfiguration{ // DiskVolumeConfigurations: map[string]*armworkloads.DiskVolumeConfiguration{ // "backup": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "hana/data": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // "hana/log": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // "hana/shared": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "os": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "usr/sap": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // }, // }, // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithDiskAndOsConfigurationsForSingleServerSystemRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_SingleServer.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), DbDiskConfiguration: &armworkloads.DiskConfiguration{ DiskVolumeConfigurations: map[string]*armworkloads.DiskVolumeConfiguration{ "backup": { Count: to.Ptr[int64](2), SizeGB: to.Ptr[int64](256), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "hana/data": { Count: to.Ptr[int64](4), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, "hana/log": { Count: to.Ptr[int64](3), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, "hana/shared": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](256), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "os": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](64), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), }, }, "usr/sap": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](128), SKU: &armworkloads.DiskSKU{ Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), }, }, }, }, NetworkConfiguration: &armworkloads.NetworkConfiguration{ IsSecondaryIPEnabled: to.Ptr(true), }, SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // DbDiskConfiguration: &armworkloads.DiskConfiguration{ // DiskVolumeConfigurations: map[string]*armworkloads.DiskVolumeConfiguration{ // "backup": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "hana/data": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // "hana/log": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // "hana/shared": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "os": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNameStandardSSDLRS), // }, // }, // "usr/sap": &armworkloads.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloads.DiskSKU{ // Name: to.Ptr(armworkloads.DiskSKUNamePremiumLRS), // }, // }, // }, // }, // NetworkConfiguration: &armworkloads.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationForDistributedSystemRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationForHaSystemWithAvailabilitySetRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationForHaSystemWithAvailabilityZoneRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationForSingleServerSystemRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), NetworkConfiguration: &armworkloads.NetworkConfiguration{ IsSecondaryIPEnabled: to.Ptr(true), }, SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // NetworkConfiguration: &armworkloads.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForDistributedSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_Distributed.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, CustomResourceNames: &armworkloads.ThreeTierFullResourceNames{ NamingPatternType: to.Ptr(armworkloads.NamingPatternTypeFullResourceName), ApplicationServer: &armworkloads.ApplicationServerFullResourceNames{ AvailabilitySetName: to.Ptr("appAvSet"), VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "default": { to.Ptr("app0disk0")}, }, HostName: to.Ptr("apphostName0"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("appnic0"), }}, OSDiskName: to.Ptr("app0osdisk"), VMName: to.Ptr("appvm0"), }, { DataDiskNames: map[string][]*string{ "default": { to.Ptr("app1disk0")}, }, HostName: to.Ptr("apphostName1"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("appnic1"), }}, OSDiskName: to.Ptr("app1osdisk"), VMName: to.Ptr("appvm1"), }}, }, CentralServer: &armworkloads.CentralServerFullResourceNames{ VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "default": { to.Ptr("ascsdisk0")}, }, HostName: to.Ptr("ascshostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ascsnic"), }}, OSDiskName: to.Ptr("ascsosdisk"), VMName: to.Ptr("ascsvm"), }}, }, DatabaseServer: &armworkloads.DatabaseServerFullResourceNames{ VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "hanaData": { to.Ptr("hanadata0"), to.Ptr("hanadata1")}, "hanaLog": { to.Ptr("hanalog0"), to.Ptr("hanalog1"), to.Ptr("hanalog2")}, "hanaShared": { to.Ptr("hanashared0"), to.Ptr("hanashared1")}, "usrSap": { to.Ptr("usrsap0")}, }, HostName: to.Ptr("dbhostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("dbnic"), }}, OSDiskName: to.Ptr("dbosdisk"), VMName: to.Ptr("dbvm"), }}, }, SharedStorage: &armworkloads.SharedStorageResourceNames{ SharedStorageAccountName: to.Ptr("storageacc"), SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // CustomResourceNames: &armworkloads.ThreeTierFullResourceNames{ // NamingPatternType: to.Ptr(armworkloads.NamingPatternTypeFullResourceName), // ApplicationServer: &armworkloads.ApplicationServerFullResourceNames{ // AvailabilitySetName: to.Ptr("appAvSet"), // VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("app0disk0")}, // }, // HostName: to.Ptr("apphostName0"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("appnic0"), // }}, // OSDiskName: to.Ptr("app0osdisk"), // VMName: to.Ptr("appvm0"), // }, // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("app1disk0")}, // }, // HostName: to.Ptr("apphostName1"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("appnic1"), // }}, // OSDiskName: to.Ptr("app1osdisk"), // VMName: to.Ptr("appvm1"), // }}, // }, // CentralServer: &armworkloads.CentralServerFullResourceNames{ // VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("ascsdisk0")}, // }, // HostName: to.Ptr("ascshostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ascsnic"), // }}, // OSDiskName: to.Ptr("ascsosdisk"), // VMName: to.Ptr("ascsvm"), // }}, // }, // DatabaseServer: &armworkloads.DatabaseServerFullResourceNames{ // VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "hanaData": []*string{ // to.Ptr("hanadata0"), // to.Ptr("hanadata1")}, // "hanaLog": []*string{ // to.Ptr("hanalog0"), // to.Ptr("hanalog1"), // to.Ptr("hanalog2")}, // "hanaShared": []*string{ // to.Ptr("hanashared0"), // to.Ptr("hanashared1")}, // "usrSap": []*string{ // to.Ptr("usrsap0")}, // }, // HostName: to.Ptr("dbhostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("dbnic"), // }}, // OSDiskName: to.Ptr("dbosdisk"), // VMName: to.Ptr("dbvm"), // }}, // }, // SharedStorage: &armworkloads.SharedStorageResourceNames{ // SharedStorageAccountName: to.Ptr("storageacc"), // SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvSet.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, CustomResourceNames: &armworkloads.ThreeTierFullResourceNames{ NamingPatternType: to.Ptr(armworkloads.NamingPatternTypeFullResourceName), ApplicationServer: &armworkloads.ApplicationServerFullResourceNames{ AvailabilitySetName: to.Ptr("appAvSet"), VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "default": { to.Ptr("app0disk0")}, }, HostName: to.Ptr("apphostName0"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("appnic0"), }}, OSDiskName: to.Ptr("app0osdisk"), VMName: to.Ptr("appvm0"), }, { DataDiskNames: map[string][]*string{ "default": { to.Ptr("app1disk0")}, }, HostName: to.Ptr("apphostName1"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("appnic1"), }}, OSDiskName: to.Ptr("app1osdisk"), VMName: to.Ptr("appvm1"), }}, }, CentralServer: &armworkloads.CentralServerFullResourceNames{ AvailabilitySetName: to.Ptr("csAvSet"), LoadBalancer: &armworkloads.LoadBalancerResourceNames{ BackendPoolNames: []*string{ to.Ptr("ascsBackendPool")}, FrontendIPConfigurationNames: []*string{ to.Ptr("ascsip0"), to.Ptr("ersip0")}, HealthProbeNames: []*string{ to.Ptr("ascsHealthProbe"), to.Ptr("ersHealthProbe")}, LoadBalancerName: to.Ptr("ascslb"), }, VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ { HostName: to.Ptr("ascshostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ascsnic"), }}, OSDiskName: to.Ptr("ascsosdisk"), VMName: to.Ptr("ascsvm"), }, { HostName: to.Ptr("ershostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ersnic"), }}, OSDiskName: to.Ptr("ersosdisk"), VMName: to.Ptr("ersvm"), }}, }, DatabaseServer: &armworkloads.DatabaseServerFullResourceNames{ AvailabilitySetName: to.Ptr("dbAvSet"), LoadBalancer: &armworkloads.LoadBalancerResourceNames{ BackendPoolNames: []*string{ to.Ptr("dbBackendPool")}, FrontendIPConfigurationNames: []*string{ to.Ptr("dbip")}, HealthProbeNames: []*string{ to.Ptr("dbHealthProbe")}, LoadBalancerName: to.Ptr("dblb"), }, VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "hanaData": { to.Ptr("hanadatapr0"), to.Ptr("hanadatapr1")}, "hanaLog": { to.Ptr("hanalogpr0"), to.Ptr("hanalogpr1"), to.Ptr("hanalogpr2")}, "hanaShared": { to.Ptr("hanasharedpr0"), to.Ptr("hanasharedpr1")}, "usrSap": { to.Ptr("usrsappr0")}, }, HostName: to.Ptr("dbprhostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("dbprnic"), }}, OSDiskName: to.Ptr("dbprosdisk"), VMName: to.Ptr("dbvmpr"), }, { DataDiskNames: map[string][]*string{ "hanaData": { to.Ptr("hanadatasr0"), to.Ptr("hanadatasr1")}, "hanaLog": { to.Ptr("hanalogsr0"), to.Ptr("hanalogsr1"), to.Ptr("hanalogsr2")}, "hanaShared": { to.Ptr("hanasharedsr0"), to.Ptr("hanasharedsr1")}, "usrSap": { to.Ptr("usrsapsr0")}, }, HostName: to.Ptr("dbsrhostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("dbsrnic"), }}, OSDiskName: to.Ptr("dbsrosdisk"), VMName: to.Ptr("dbvmsr"), }}, }, SharedStorage: &armworkloads.SharedStorageResourceNames{ SharedStorageAccountName: to.Ptr("storageacc"), SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // CustomResourceNames: &armworkloads.ThreeTierFullResourceNames{ // NamingPatternType: to.Ptr(armworkloads.NamingPatternTypeFullResourceName), // ApplicationServer: &armworkloads.ApplicationServerFullResourceNames{ // AvailabilitySetName: to.Ptr("appAvSet"), // VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("app0disk0")}, // }, // HostName: to.Ptr("apphostName0"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("appnic0"), // }}, // OSDiskName: to.Ptr("app0osdisk"), // VMName: to.Ptr("appvm0"), // }, // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("app1disk0")}, // }, // HostName: to.Ptr("apphostName1"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("appnic1"), // }}, // OSDiskName: to.Ptr("app1osdisk"), // VMName: to.Ptr("appvm1"), // }}, // }, // CentralServer: &armworkloads.CentralServerFullResourceNames{ // AvailabilitySetName: to.Ptr("csAvSet"), // LoadBalancer: &armworkloads.LoadBalancerResourceNames{ // BackendPoolNames: []*string{ // to.Ptr("ascsBackendPool")}, // FrontendIPConfigurationNames: []*string{ // to.Ptr("ascsip0"), // to.Ptr("ersip0")}, // HealthProbeNames: []*string{ // to.Ptr("ascsHealthProbe"), // to.Ptr("ersHealthProbe")}, // LoadBalancerName: to.Ptr("ascslb"), // }, // VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ // { // HostName: to.Ptr("ascshostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ascsnic"), // }}, // OSDiskName: to.Ptr("ascsosdisk"), // VMName: to.Ptr("ascsvm"), // }, // { // HostName: to.Ptr("ershostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ersnic"), // }}, // OSDiskName: to.Ptr("ersosdisk"), // VMName: to.Ptr("ersvm"), // }}, // }, // DatabaseServer: &armworkloads.DatabaseServerFullResourceNames{ // AvailabilitySetName: to.Ptr("dbAvSet"), // LoadBalancer: &armworkloads.LoadBalancerResourceNames{ // BackendPoolNames: []*string{ // to.Ptr("dbBackendPool")}, // FrontendIPConfigurationNames: []*string{ // to.Ptr("dbip")}, // HealthProbeNames: []*string{ // to.Ptr("dbHealthProbe")}, // LoadBalancerName: to.Ptr("dblb"), // }, // VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "hanaData": []*string{ // to.Ptr("hanadatapr0"), // to.Ptr("hanadatapr1")}, // "hanaLog": []*string{ // to.Ptr("hanalogpr0"), // to.Ptr("hanalogpr1"), // to.Ptr("hanalogpr2")}, // "hanaShared": []*string{ // to.Ptr("hanasharedpr0"), // to.Ptr("hanasharedpr1")}, // "usrSap": []*string{ // to.Ptr("usrsappr0")}, // }, // HostName: to.Ptr("dbprhostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("dbprnic"), // }}, // OSDiskName: to.Ptr("dbprosdisk"), // VMName: to.Ptr("dbvmpr"), // }, // { // DataDiskNames: map[string][]*string{ // "hanaData": []*string{ // to.Ptr("hanadatasr0"), // to.Ptr("hanadatasr1")}, // "hanaLog": []*string{ // to.Ptr("hanalogsr0"), // to.Ptr("hanalogsr1"), // to.Ptr("hanalogsr2")}, // "hanaShared": []*string{ // to.Ptr("hanasharedsr0"), // to.Ptr("hanasharedsr1")}, // "usrSap": []*string{ // to.Ptr("usrsapsr0")}, // }, // HostName: to.Ptr("dbsrhostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("dbsrnic"), // }}, // OSDiskName: to.Ptr("dbsrosdisk"), // VMName: to.Ptr("dbvmsr"), // }}, // }, // SharedStorage: &armworkloads.SharedStorageResourceNames{ // SharedStorageAccountName: to.Ptr("storageacc"), // SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvZone.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, CustomResourceNames: &armworkloads.ThreeTierFullResourceNames{ NamingPatternType: to.Ptr(armworkloads.NamingPatternTypeFullResourceName), ApplicationServer: &armworkloads.ApplicationServerFullResourceNames{ VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "default": { to.Ptr("app0disk0")}, }, HostName: to.Ptr("apphostName0"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("appnic0"), }}, OSDiskName: to.Ptr("app0osdisk"), VMName: to.Ptr("appvm0"), }, { DataDiskNames: map[string][]*string{ "default": { to.Ptr("app1disk0")}, }, HostName: to.Ptr("apphostName1"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("appnic1"), }}, OSDiskName: to.Ptr("app1osdisk"), VMName: to.Ptr("appvm1"), }}, }, CentralServer: &armworkloads.CentralServerFullResourceNames{ LoadBalancer: &armworkloads.LoadBalancerResourceNames{ BackendPoolNames: []*string{ to.Ptr("ascsBackendPool")}, FrontendIPConfigurationNames: []*string{ to.Ptr("ascsip0"), to.Ptr("ersip0")}, HealthProbeNames: []*string{ to.Ptr("ascsHealthProbe"), to.Ptr("ersHealthProbe")}, LoadBalancerName: to.Ptr("ascslb"), }, VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ { HostName: to.Ptr("ascshostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ascsnic"), }}, OSDiskName: to.Ptr("ascsosdisk"), VMName: to.Ptr("ascsvm"), }, { HostName: to.Ptr("ershostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ersnic"), }}, OSDiskName: to.Ptr("ersosdisk"), VMName: to.Ptr("ersvm"), }}, }, DatabaseServer: &armworkloads.DatabaseServerFullResourceNames{ LoadBalancer: &armworkloads.LoadBalancerResourceNames{ BackendPoolNames: []*string{ to.Ptr("dbBackendPool")}, FrontendIPConfigurationNames: []*string{ to.Ptr("dbip")}, HealthProbeNames: []*string{ to.Ptr("dbHealthProbe")}, LoadBalancerName: to.Ptr("dblb"), }, VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "hanaData": { to.Ptr("hanadatapr0"), to.Ptr("hanadatapr1")}, "hanaLog": { to.Ptr("hanalogpr0"), to.Ptr("hanalogpr1"), to.Ptr("hanalogpr2")}, "hanaShared": { to.Ptr("hanasharedpr0"), to.Ptr("hanasharedpr1")}, "usrSap": { to.Ptr("usrsappr0")}, }, HostName: to.Ptr("dbprhostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("dbprnic"), }}, OSDiskName: to.Ptr("dbprosdisk"), VMName: to.Ptr("dbvmpr"), }, { DataDiskNames: map[string][]*string{ "hanaData": { to.Ptr("hanadatasr0"), to.Ptr("hanadatasr1")}, "hanaLog": { to.Ptr("hanalogsr0"), to.Ptr("hanalogsr1"), to.Ptr("hanalogsr2")}, "hanaShared": { to.Ptr("hanasharedsr0"), to.Ptr("hanasharedsr1")}, "usrSap": { to.Ptr("usrsapsr0")}, }, HostName: to.Ptr("dbsrhostName"), NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("dbsrnic"), }}, OSDiskName: to.Ptr("dbsrosdisk"), VMName: to.Ptr("dbvmsr"), }}, }, SharedStorage: &armworkloads.SharedStorageResourceNames{ SharedStorageAccountName: to.Ptr("storageacc"), SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // CustomResourceNames: &armworkloads.ThreeTierFullResourceNames{ // NamingPatternType: to.Ptr(armworkloads.NamingPatternTypeFullResourceName), // ApplicationServer: &armworkloads.ApplicationServerFullResourceNames{ // VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("app0disk0")}, // }, // HostName: to.Ptr("apphostName0"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("appnic0"), // }}, // OSDiskName: to.Ptr("app0osdisk"), // VMName: to.Ptr("appvm0"), // }, // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("app1disk0")}, // }, // HostName: to.Ptr("apphostName1"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("appnic1"), // }}, // OSDiskName: to.Ptr("app1osdisk"), // VMName: to.Ptr("appvm1"), // }}, // }, // CentralServer: &armworkloads.CentralServerFullResourceNames{ // LoadBalancer: &armworkloads.LoadBalancerResourceNames{ // BackendPoolNames: []*string{ // to.Ptr("ascsBackendPool")}, // FrontendIPConfigurationNames: []*string{ // to.Ptr("ascsip0"), // to.Ptr("ersip0")}, // HealthProbeNames: []*string{ // to.Ptr("ascsHealthProbe"), // to.Ptr("ersHealthProbe")}, // LoadBalancerName: to.Ptr("ascslb"), // }, // VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ // { // HostName: to.Ptr("ascshostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ascsnic"), // }}, // OSDiskName: to.Ptr("ascsosdisk"), // VMName: to.Ptr("ascsvm"), // }, // { // HostName: to.Ptr("ershostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ersnic"), // }}, // OSDiskName: to.Ptr("ersosdisk"), // VMName: to.Ptr("ersvm"), // }}, // }, // DatabaseServer: &armworkloads.DatabaseServerFullResourceNames{ // LoadBalancer: &armworkloads.LoadBalancerResourceNames{ // BackendPoolNames: []*string{ // to.Ptr("dbBackendPool")}, // FrontendIPConfigurationNames: []*string{ // to.Ptr("dbip")}, // HealthProbeNames: []*string{ // to.Ptr("dbHealthProbe")}, // LoadBalancerName: to.Ptr("dblb"), // }, // VirtualMachines: []*armworkloads.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "hanaData": []*string{ // to.Ptr("hanadatapr0"), // to.Ptr("hanadatapr1")}, // "hanaLog": []*string{ // to.Ptr("hanalogpr0"), // to.Ptr("hanalogpr1"), // to.Ptr("hanalogpr2")}, // "hanaShared": []*string{ // to.Ptr("hanasharedpr0"), // to.Ptr("hanasharedpr1")}, // "usrSap": []*string{ // to.Ptr("usrsappr0")}, // }, // HostName: to.Ptr("dbprhostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("dbprnic"), // }}, // OSDiskName: to.Ptr("dbprosdisk"), // VMName: to.Ptr("dbvmpr"), // }, // { // DataDiskNames: map[string][]*string{ // "hanaData": []*string{ // to.Ptr("hanadatasr0"), // to.Ptr("hanadatasr1")}, // "hanaLog": []*string{ // to.Ptr("hanalogsr0"), // to.Ptr("hanalogsr1"), // to.Ptr("hanalogsr2")}, // "hanaShared": []*string{ // to.Ptr("hanasharedsr0"), // to.Ptr("hanasharedsr1")}, // "usrSap": []*string{ // to.Ptr("usrsapsr0")}, // }, // HostName: to.Ptr("dbsrhostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("dbsrnic"), // }}, // OSDiskName: to.Ptr("dbsrosdisk"), // VMName: to.Ptr("dbvmsr"), // }}, // }, // SharedStorage: &armworkloads.SharedStorageResourceNames{ // SharedStorageAccountName: to.Ptr("storageacc"), // SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForSingleServerSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_SingleServer.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), NetworkConfiguration: &armworkloads.NetworkConfiguration{ IsSecondaryIPEnabled: to.Ptr(true), }, SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), // CustomResourceNames: &armworkloads.SingleServerFullResourceNames{ // NamingPatternType: to.Ptr(armworkloads.NamingPatternTypeFullResourceName), // VirtualMachine: &armworkloads.VirtualMachineResourceNames{ // DataDiskNames: map[string][]*string{ // "hanaData": []*string{ // to.Ptr("hanadata0"), // to.Ptr("hanadata1")}, // "hanaLog": []*string{ // to.Ptr("hanalog0"), // to.Ptr("hanalog1"), // to.Ptr("hanalog2")}, // "hanaShared": []*string{ // to.Ptr("hanashared0"), // to.Ptr("hanashared1")}, // "usrSap": []*string{ // to.Ptr("usrsap0")}, // }, // HostName: to.Ptr("sshostName"), // NetworkInterfaces: []*armworkloads.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ssnic"), // }}, // OSDiskName: to.Ptr("ssosdisk"), // VMName: to.Ptr("ssvm"), // }, // }, // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // NetworkConfiguration: &armworkloads.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (DetectSapSoftwareInstallationOnADistributedSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_Distributed.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("eastus2"), Tags: map[string]*string{ "created by": to.Ptr("azureuser"), }, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("{{resourcegrp}}"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E4ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E4ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, NetworkConfiguration: &armworkloads.NetworkConfiguration{ IsSecondaryIPEnabled: to.Ptr(true), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("sap.bpaas.com"), }, SoftwareConfiguration: &armworkloads.ExternalInstallationSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeExternal), CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("microsoft.workloads/sapvirtualinstances"), // ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-18T18:25:55.240Z"); return t}()), // CreatedBy: to.Ptr("f1bc9460-9d57-4c16-99a8-5a19378a3a93"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-18T18:50:59.194Z"); return t}()), // LastModifiedBy: to.Ptr("f1bc9460-9d57-4c16-99a8-5a19378a3a93"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeApplication), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "created by": to.Ptr("azureuser"), // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("aa-rg"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // NetworkConfiguration: &armworkloads.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("sap.bpaas.com"), // }, // SoftwareConfiguration: &armworkloads.ExternalInstallationSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeExternal), // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // }, // } }
Output:
Example (DetectSapSoftwareInstallationOnASingleServerSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_SingleServer.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), NetworkConfiguration: &armworkloads.NetworkConfiguration{ IsSecondaryIPEnabled: to.Ptr(true), }, SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, SoftwareConfiguration: &armworkloads.ExternalInstallationSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeExternal), CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // NetworkConfiguration: &armworkloads.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // SoftwareConfiguration: &armworkloads.ExternalInstallationSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeExternal), // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // }, // } }
Output:
Example (DetectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvSet.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, SoftwareConfiguration: &armworkloads.ExternalInstallationSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeExternal), CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // SoftwareConfiguration: &armworkloads.ExternalInstallationSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeExternal), // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // }, // } }
Output:
Example (DetectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvZone.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("westcentralus"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](6), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, SoftwareConfiguration: &armworkloads.ExternalInstallationSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeExternal), CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](6), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloads.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloads.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // SoftwareConfiguration: &armworkloads.ExternalInstallationSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeExternal), // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // }, // } }
Output:
Example (InstallSapSoftwareOnDistributedSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Install_Distributed.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("eastus2"), Tags: map[string]*string{ "created by": to.Ptr("azureuser"), }, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("{{resourcegrp}}"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloads.ApplicationServerConfiguration{ InstanceCount: to.Ptr[int64](2), SubnetID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("8.2"), Version: to.Ptr("8.2.2021091201"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E4ds_v4"), }, }, CentralServer: &armworkloads.CentralServerConfiguration{ InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("8.2"), Version: to.Ptr("8.2.2021091201"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E4ds_v4"), }, }, DatabaseServer: &armworkloads.DatabaseConfiguration{ InstanceCount: to.Ptr[int64](1), SubnetID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("8.2"), Version: to.Ptr("8.2.2021091201"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, NetworkConfiguration: &armworkloads.NetworkConfiguration{ IsSecondaryIPEnabled: to.Ptr(true), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("sap.bpaas.com"), }, SoftwareConfiguration: &armworkloads.SAPInstallWithoutOSConfigSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig), BomURL: to.Ptr("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml"), SapBitsStorageAccountID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount"), SoftwareVersion: to.Ptr("SAP S/4HANA 1909 SPS 03"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("microsoft.workloads/sapvirtualinstances"), // ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/aa-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-18T18:25:55.240Z"); return t}()), // CreatedBy: to.Ptr("f1bc9460-9d57-4c16-99a8-5a19378a3a93"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-18T18:50:59.194Z"); return t}()), // LastModifiedBy: to.Ptr("f1bc9460-9d57-4c16-99a8-5a19378a3a93"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeApplication), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "created by": to.Ptr("azureuser"), // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("aa-rg"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // NetworkConfiguration: &armworkloads.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("sap.bpaas.com"), // }, // SoftwareConfiguration: &armworkloads.SAPInstallWithoutOSConfigSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig), // BomURL: to.Ptr("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml"), // SapBitsStorageAccountID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount"), // SoftwareVersion: to.Ptr("SAP S/4HANA 1909 SPS 03"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationInProgress), // }, // } }
Output:
Example (InstallSapSoftwareOnSingleServerSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Install_SingleServer.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("eastus2"), Tags: map[string]*string{}, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloads.SingleServerConfiguration{ AppResourceGroup: to.Ptr("test-rg"), DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer), SubnetID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet"), VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ ImageReference: &armworkloads.ImageReference{ Offer: to.Ptr("SLES-SAP"), Publisher: to.Ptr("SUSE"), SKU: to.Ptr("12-sp4-gen2"), Version: to.Ptr("2022.02.01"), }, OSProfile: &armworkloads.OSProfile{ AdminUsername: to.Ptr("azureappadmin"), OSConfiguration: &armworkloads.LinuxConfiguration{ OSType: to.Ptr(armworkloads.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloads.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloads.OsSapConfiguration{ SapFqdn: to.Ptr("sap.bpaas.com"), }, SoftwareConfiguration: &armworkloads.SAPInstallWithoutOSConfigSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig), BomURL: to.Ptr("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml"), SapBitsStorageAccountID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount"), SoftwareVersion: to.Ptr("SAP S/4HANA 1909 SPS 03"), }, }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("microsoft.workloads/sapvirtualinstances"), // ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/aa-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-18T18:25:55.240Z"); return t}()), // CreatedBy: to.Ptr("f1bc9460-9d57-4c16-99a8-5a19378a3a93"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeApplication), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-18T18:50:59.194Z"); return t}()), // LastModifiedBy: to.Ptr("f1bc9460-9d57-4c16-99a8-5a19378a3a93"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeApplication), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "created by": to.Ptr("azureuser"), // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("aa-rg"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](2), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloads.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // NetworkConfiguration: &armworkloads.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // }, // OSSapConfiguration: &armworkloads.OsSapConfiguration{ // SapFqdn: to.Ptr("sap.bpaas.com"), // }, // SoftwareConfiguration: &armworkloads.SAPInstallWithoutOSConfigSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig), // BomURL: to.Ptr("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml"), // SapBitsStorageAccountID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount"), // SoftwareVersion: to.Ptr("SAP S/4HANA 1909 SPS 03"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateSoftwareInstallationInProgress), // }, // } }
Output:
Example (RegisterExistingSapSystemAsVirtualInstanceForSapSolutions) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("northeurope"), Tags: map[string]*string{ "createdby": to.Ptr("abc@microsoft.com"), "test": to.Ptr("abc"), }, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DiscoveryConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDiscovery), CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("Q20"), // Type: to.Ptr("microsoft.workloads/sapvirtualinstances"), // ID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/Q20"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-27T08:22:52.331Z"); return t}()), // CreatedBy: to.Ptr("abc@microsoft.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-27T11:44:17.931Z"); return t}()), // LastModifiedBy: to.Ptr("abc@microsoft.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DiscoveryConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDiscovery), // AppLocation: to.Ptr("westeurope"), // CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg-infra/providers/Microsoft.Compute/virtualMachines/q20ascsvm0"), // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("mrg-Q20-5b0097"), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // }, // } }
Output:
Example (RegisterExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_CustomMrgStorageAccountName.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginCreate(ctx, "test-rg", "X00", armworkloads.SAPVirtualInstance{ Location: to.Ptr("northeurope"), Tags: map[string]*string{ "createdby": to.Ptr("abc@microsoft.com"), "test": to.Ptr("abc"), }, Properties: &armworkloads.SAPVirtualInstanceProperties{ Configuration: &armworkloads.DiscoveryConfiguration{ ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDiscovery), CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), ManagedRgStorageAccountName: to.Ptr("q20saacssgrs"), }, Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("Q20"), // Type: to.Ptr("microsoft.workloads/sapvirtualinstances"), // ID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/Q20"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-27T08:22:52.331Z"); return t}()), // CreatedBy: to.Ptr("abc@microsoft.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-27T11:44:17.931Z"); return t}()), // LastModifiedBy: to.Ptr("abc@microsoft.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DiscoveryConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDiscovery), // AppLocation: to.Ptr("westeurope"), // CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg-infra/providers/Microsoft.Compute/virtualMachines/q20ascsvm0"), // ManagedRgStorageAccountName: to.Ptr("q20saacssgrs"), // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("mrg-Q20-5b0097"), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // }, // } }
Output:
func (*SAPVirtualInstancesClient) BeginDelete ¶ added in v0.2.0
func (client *SAPVirtualInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPVirtualInstancesClientBeginDeleteOptions) (*runtime.Poller[SAPVirtualInstancesClientDeleteResponse], error)
BeginDelete - Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- options - SAPVirtualInstancesClientBeginDeleteOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginDelete(ctx, "test-rg", "X00", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("1e4193c3-206e-4916-b124-1da16175eb0e"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/operations/locations/centralus/1e4193c3-206e-4916-b124-1da16175eb0e"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPVirtualInstancesClient) BeginStart ¶ added in v0.2.0
func (client *SAPVirtualInstancesClient) BeginStart(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPVirtualInstancesClientBeginStartOptions) (*runtime.Poller[SAPVirtualInstancesClientStartResponse], error)
BeginStart - Starts the SAP application, that is the Central Services instance and Application server instances. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- options - SAPVirtualInstancesClientBeginStartOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Start.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginStart(ctx, "test-rg", "X00", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("1e4193c3-206e-4916-b124-1da16175eb0e"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/operations/locations/centralus/1e4193c3-206e-4916-b124-1da16175eb0e"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPVirtualInstancesClient) BeginStop ¶ added in v0.2.0
func (client *SAPVirtualInstancesClient) BeginStop(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPVirtualInstancesClientBeginStopOptions) (*runtime.Poller[SAPVirtualInstancesClientStopResponse], error)
BeginStop - Stops the SAP Application, that is the Application server instances and Central Services instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- options - SAPVirtualInstancesClientBeginStopOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginStop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Stop.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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginStop(ctx, "test-rg", "X00", &armworkloads.SAPVirtualInstancesClientBeginStopOptions{Body: &armworkloads.StopRequest{ SoftStopTimeoutSeconds: to.Ptr[int64](0), }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloads.OperationStatusResult{ // Name: to.Ptr("1e4193c3-206e-4916-b124-1da16175eb0e"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/operations/locations/centralus/1e4193c3-206e-4916-b124-1da16175eb0e"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()), // Status: to.Ptr("Succeeded"), // } }
Output:
func (*SAPVirtualInstancesClient) Get ¶ added in v0.2.0
func (client *SAPVirtualInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPVirtualInstancesClientGetOptions) (SAPVirtualInstancesClientGetResponse, error)
Get - Gets a Virtual Instance for SAP solutions resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- options - SAPVirtualInstancesClientGetOptions contains the optional parameters for the SAPVirtualInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSAPVirtualInstancesClient().Get(ctx, "test-rg", "X00", 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.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](10), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId3"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId1"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId2"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloads.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeServiceInitiated), // BomURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer/myblob"), // SapBitsStorageAccountID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/ajgupt-test/providers/Microsoft.Storage/storageAccounts/ajguptsavnet"), // SapFqdn: to.Ptr("sapsystem.contoso.net"), // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // }, // } }
Output:
func (*SAPVirtualInstancesClient) NewListByResourceGroupPager ¶ added in v0.2.0
func (client *SAPVirtualInstancesClient) NewListByResourceGroupPager(resourceGroupName string, options *SAPVirtualInstancesClientListByResourceGroupOptions) *runtime.Pager[SAPVirtualInstancesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets all Virtual Instances for SAP solutions resources in a Resource Group.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - SAPVirtualInstancesClientListByResourceGroupOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSAPVirtualInstancesClient().NewListByResourceGroupPager("test-rg", 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.SAPVirtualInstanceList = armworkloads.SAPVirtualInstanceList{ // Value: []*armworkloads.SAPVirtualInstance{ // { // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](10), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId3"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId1"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId2"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloads.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeServiceInitiated), // BomURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer/myblob"), // SapBitsStorageAccountID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/ajgupt-test/providers/Microsoft.Storage/storageAccounts/ajguptsavnet"), // SapFqdn: to.Ptr("sapsystem.contoso.net"), // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // }, // }, // { // Name: to.Ptr("X01"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X01"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](10), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId3"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId1"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId2"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloads.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeServiceInitiated), // BomURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer/myblob"), // SapBitsStorageAccountID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/ajgupt-test/providers/Microsoft.Storage/storageAccounts/ajguptsavnet"), // SapFqdn: to.Ptr("sapsystem.contoso.net"), // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // }, // }}, // } } }
Output:
func (*SAPVirtualInstancesClient) NewListBySubscriptionPager ¶ added in v0.2.0
func (client *SAPVirtualInstancesClient) NewListBySubscriptionPager(options *SAPVirtualInstancesClientListBySubscriptionOptions) *runtime.Pager[SAPVirtualInstancesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Gets all Virtual Instances for SAP solutions resources in a Subscription.
Generated from API version 2023-04-01
- options - SAPVirtualInstancesClientListBySubscriptionOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSAPVirtualInstancesClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SAPVirtualInstanceList = armworkloads.SAPVirtualInstanceList{ // Value: []*armworkloads.SAPVirtualInstance{ // { // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](10), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId3"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId1"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId2"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloads.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeServiceInitiated), // BomURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer/myblob"), // SapBitsStorageAccountID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/ajgupt-test/providers/Microsoft.Storage/storageAccounts/ajguptsavnet"), // SapFqdn: to.Ptr("sapsystem.contoso.net"), // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // }, // }, // { // Name: to.Ptr("X01"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X01"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloads.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloads.ApplicationServerConfiguration{ // InstanceCount: to.Ptr[int64](10), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId3"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloads.CentralServerConfiguration{ // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId1"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloads.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloads.SAPDatabaseTypeHANA), // InstanceCount: to.Ptr[int64](1), // SubnetID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/vnet1/subnets/subnetId2"), // VirtualMachineConfiguration: &armworkloads.VirtualMachineConfiguration{ // ImageReference: &armworkloads.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloads.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloads.LinuxConfiguration{ // OSType: to.Ptr(armworkloads.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloads.SSHConfiguration{ // PublicKeys: []*armworkloads.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloads.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloads.SAPSoftwareInstallationTypeServiceInitiated), // BomURL: to.Ptr("https://myaccount.blob.core.windows.net/mycontainer/myblob"), // SapBitsStorageAccountID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/ajgupt-test/providers/Microsoft.Storage/storageAccounts/ajguptsavnet"), // SapFqdn: to.Ptr("sapsystem.contoso.net"), // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"), // }, // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateHealthy), // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusRunning), // }, // }}, // } } }
Output:
func (*SAPVirtualInstancesClient) Update ¶ added in v0.2.0
func (client *SAPVirtualInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body UpdateSAPVirtualInstanceRequest, options *SAPVirtualInstancesClientUpdateOptions) (SAPVirtualInstancesClientUpdateResponse, error)
Update - Updates a Virtual Instance for SAP solutions resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
- body - Request body to update a Virtual Instance for SAP solutions resource.
- options - SAPVirtualInstancesClientUpdateOptions contains the optional parameters for the SAPVirtualInstancesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSAPVirtualInstancesClient().Update(ctx, "test-rg", "X00", armworkloads.UpdateSAPVirtualInstanceRequest{ Identity: &armworkloads.UserAssignedServiceIdentity{ Type: to.Ptr(armworkloads.ManagedServiceIdentityTypeNone), }, Tags: map[string]*string{ "key1": to.Ptr("svi1"), }, }, 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.SAPVirtualInstance = armworkloads.SAPVirtualInstance{ // Name: to.Ptr("X00"), // Type: to.Ptr("Microsoft.Workloads/sapVirtualInstances"), // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Location: to.Ptr("westcentralus"), // Tags: map[string]*string{ // "key1": to.Ptr("svi1"), // }, // Identity: &armworkloads.UserAssignedServiceIdentity{ // Type: to.Ptr(armworkloads.ManagedServiceIdentityTypeNone), // }, // Properties: &armworkloads.SAPVirtualInstanceProperties{ // Configuration: &armworkloads.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloads.SAPConfigurationTypeDeployment), // }, // Environment: to.Ptr(armworkloads.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloads.SAPHealthStateUnknown), // ManagedResourceGroupConfiguration: &armworkloads.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ProvisioningState: to.Ptr(armworkloads.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloads.SAPProductTypeS4HANA), // State: to.Ptr(armworkloads.SAPVirtualInstanceStateInfrastructureDeploymentPending), // Status: to.Ptr(armworkloads.SAPVirtualInstanceStatusStarting), // }, // } }
Output:
type SAPVirtualInstancesClientBeginCreateOptions ¶ added in v0.2.0
type SAPVirtualInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPVirtualInstancesClientBeginCreateOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginCreate method.
type SAPVirtualInstancesClientBeginDeleteOptions ¶ added in v0.2.0
type SAPVirtualInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPVirtualInstancesClientBeginDeleteOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginDelete method.
type SAPVirtualInstancesClientBeginStartOptions ¶ added in v0.2.0
type SAPVirtualInstancesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPVirtualInstancesClientBeginStartOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginStart method.
type SAPVirtualInstancesClientBeginStopOptions ¶ added in v0.2.0
type SAPVirtualInstancesClientBeginStopOptions struct { // The Virtual Instance for SAP solutions resource stop request body. Body *StopRequest // Resumes the LRO from the provided token. ResumeToken string }
SAPVirtualInstancesClientBeginStopOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginStop method.
type SAPVirtualInstancesClientCreateResponse ¶ added in v0.2.0
type SAPVirtualInstancesClientCreateResponse struct { // Define the Virtual Instance for SAP solutions resource. SAPVirtualInstance }
SAPVirtualInstancesClientCreateResponse contains the response from method SAPVirtualInstancesClient.BeginCreate.
type SAPVirtualInstancesClientDeleteResponse ¶ added in v0.2.0
type SAPVirtualInstancesClientDeleteResponse struct { // The current status of an async operation. OperationStatusResult }
SAPVirtualInstancesClientDeleteResponse contains the response from method SAPVirtualInstancesClient.BeginDelete.
type SAPVirtualInstancesClientGetOptions ¶ added in v0.2.0
type SAPVirtualInstancesClientGetOptions struct { }
SAPVirtualInstancesClientGetOptions contains the optional parameters for the SAPVirtualInstancesClient.Get method.
type SAPVirtualInstancesClientGetResponse ¶ added in v0.2.0
type SAPVirtualInstancesClientGetResponse struct { // Define the Virtual Instance for SAP solutions resource. SAPVirtualInstance }
SAPVirtualInstancesClientGetResponse contains the response from method SAPVirtualInstancesClient.Get.
type SAPVirtualInstancesClientListByResourceGroupOptions ¶ added in v0.2.0
type SAPVirtualInstancesClientListByResourceGroupOptions struct { }
SAPVirtualInstancesClientListByResourceGroupOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListByResourceGroupPager method.
type SAPVirtualInstancesClientListByResourceGroupResponse ¶ added in v0.2.0
type SAPVirtualInstancesClientListByResourceGroupResponse struct { // Defines the collection of Virtual Instance for SAP solutions resources. SAPVirtualInstanceList }
SAPVirtualInstancesClientListByResourceGroupResponse contains the response from method SAPVirtualInstancesClient.NewListByResourceGroupPager.
type SAPVirtualInstancesClientListBySubscriptionOptions ¶ added in v0.2.0
type SAPVirtualInstancesClientListBySubscriptionOptions struct { }
SAPVirtualInstancesClientListBySubscriptionOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListBySubscriptionPager method.
type SAPVirtualInstancesClientListBySubscriptionResponse ¶ added in v0.2.0
type SAPVirtualInstancesClientListBySubscriptionResponse struct { // Defines the collection of Virtual Instance for SAP solutions resources. SAPVirtualInstanceList }
SAPVirtualInstancesClientListBySubscriptionResponse contains the response from method SAPVirtualInstancesClient.NewListBySubscriptionPager.
type SAPVirtualInstancesClientStartResponse ¶ added in v0.2.0
type SAPVirtualInstancesClientStartResponse struct { // The current status of an async operation. OperationStatusResult }
SAPVirtualInstancesClientStartResponse contains the response from method SAPVirtualInstancesClient.BeginStart.
type SAPVirtualInstancesClientStopResponse ¶ added in v0.2.0
type SAPVirtualInstancesClientStopResponse struct { // The current status of an async operation. OperationStatusResult }
SAPVirtualInstancesClientStopResponse contains the response from method SAPVirtualInstancesClient.BeginStop.
type SAPVirtualInstancesClientUpdateOptions ¶ added in v0.2.0
type SAPVirtualInstancesClientUpdateOptions struct { }
SAPVirtualInstancesClientUpdateOptions contains the optional parameters for the SAPVirtualInstancesClient.Update method.
type SAPVirtualInstancesClientUpdateResponse ¶ added in v0.2.0
type SAPVirtualInstancesClientUpdateResponse struct { // Define the Virtual Instance for SAP solutions resource. SAPVirtualInstance }
SAPVirtualInstancesClientUpdateResponse contains the response from method SAPVirtualInstancesClient.Update.
type SSHConfiguration ¶ added in v0.2.0
type SSHConfiguration struct { // The list of SSH public keys used to authenticate with linux based VMs. PublicKeys []*SSHPublicKey }
SSHConfiguration - SSH configuration for Linux based VMs running on Azure
func (SSHConfiguration) MarshalJSON ¶ added in v0.2.0
func (s SSHConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHConfiguration.
func (*SSHConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (s *SSHConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHConfiguration.
type SSHKeyPair ¶ added in v0.2.0
type SSHKeyPair struct { // SSH private key. PrivateKey *string // SSH public key PublicKey *string }
SSHKeyPair - The SSH Key-pair used to authenticate with the VM. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see Create SSH keys on Linux and Mac for Linux VMs in Azure [https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed].
func (SSHKeyPair) MarshalJSON ¶ added in v0.2.0
func (s SSHKeyPair) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHKeyPair.
func (*SSHKeyPair) UnmarshalJSON ¶ added in v0.2.0
func (s *SSHKeyPair) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHKeyPair.
type SSHPublicKey ¶ added in v0.2.0
type SSHPublicKey struct { // SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa // format. // For creating ssh keys, see Create SSH keys on Linux and Mac for Linux VMs in Azure [https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed]. KeyData *string }
SSHPublicKey - Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.
func (SSHPublicKey) MarshalJSON ¶ added in v0.2.0
func (s SSHPublicKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHPublicKey.
func (*SSHPublicKey) UnmarshalJSON ¶ added in v0.2.0
func (s *SSHPublicKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey.
type SSLPreference ¶ added in v0.3.0
type SSLPreference string
SSLPreference - Gets or sets certificate preference if secure communication is enabled.
const ( SSLPreferenceDisabled SSLPreference = "Disabled" SSLPreferenceRootCertificate SSLPreference = "RootCertificate" SSLPreferenceServerCertificate SSLPreference = "ServerCertificate" )
func PossibleSSLPreferenceValues ¶ added in v0.3.0
func PossibleSSLPreferenceValues() []SSLPreference
PossibleSSLPreferenceValues returns the possible values for the SSLPreference const type.
type SapLandscapeMonitor ¶ added in v0.3.0
type SapLandscapeMonitor struct { // Sap Landscape Monitor properties Properties *SapLandscapeMonitorProperties // 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 }
SapLandscapeMonitor - configuration associated with SAP Landscape Monitor Dashboard.
func (SapLandscapeMonitor) MarshalJSON ¶ added in v0.3.0
func (s SapLandscapeMonitor) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SapLandscapeMonitor.
func (*SapLandscapeMonitor) UnmarshalJSON ¶ added in v0.3.0
func (s *SapLandscapeMonitor) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapLandscapeMonitor.
type SapLandscapeMonitorClient ¶ added in v0.3.0
type SapLandscapeMonitorClient struct {
// contains filtered or unexported fields
}
SapLandscapeMonitorClient contains the methods for the SapLandscapeMonitor group. Don't use this type directly, use NewSapLandscapeMonitorClient() instead.
func NewSapLandscapeMonitorClient ¶ added in v0.3.0
func NewSapLandscapeMonitorClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SapLandscapeMonitorClient, error)
NewSapLandscapeMonitorClient creates a new instance of SapLandscapeMonitorClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SapLandscapeMonitorClient) Create ¶ added in v0.3.0
func (client *SapLandscapeMonitorClient) Create(ctx context.Context, resourceGroupName string, monitorName string, sapLandscapeMonitorParameter SapLandscapeMonitor, options *SapLandscapeMonitorClientCreateOptions) (SapLandscapeMonitorClientCreateResponse, error)
Create - Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- sapLandscapeMonitorParameter - Request body representing a configuration for Sap Landscape Monitor Dashboard
- options - SapLandscapeMonitorClientCreateOptions contains the optional parameters for the SapLandscapeMonitorClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/SapLandscapeMonitor_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSapLandscapeMonitorClient().Create(ctx, "myResourceGroup", "mySapMonitor", armworkloads.SapLandscapeMonitor{ Properties: &armworkloads.SapLandscapeMonitorProperties{ Grouping: &armworkloads.SapLandscapeMonitorPropertiesGrouping{ Landscape: []*armworkloads.SapLandscapeMonitorSidMapping{ { Name: to.Ptr("Prod"), TopSid: []*string{ to.Ptr("SID1"), to.Ptr("SID2")}, }}, SapApplication: []*armworkloads.SapLandscapeMonitorSidMapping{ { Name: to.Ptr("ERP1"), TopSid: []*string{ to.Ptr("SID1"), to.Ptr("SID2")}, }}, }, TopMetricsThresholds: []*armworkloads.SapLandscapeMonitorMetricThresholds{ { Name: to.Ptr("Instance Availability"), Green: to.Ptr[float32](90), Red: to.Ptr[float32](50), Yellow: to.Ptr[float32](75), }}, }, }, 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.SapLandscapeMonitor = armworkloads.SapLandscapeMonitor{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/myMonitor/sapLandscapeMonitor/default"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.SapLandscapeMonitorProperties{ // Grouping: &armworkloads.SapLandscapeMonitorPropertiesGrouping{ // Landscape: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("Prod"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // SapApplication: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("ERP1"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // }, // TopMetricsThresholds: []*armworkloads.SapLandscapeMonitorMetricThresholds{ // { // Name: to.Ptr("Instance Availability"), // Green: to.Ptr[float32](90), // Red: to.Ptr[float32](50), // Yellow: to.Ptr[float32](75), // }}, // }, // } }
Output:
func (*SapLandscapeMonitorClient) Delete ¶ added in v0.3.0
func (client *SapLandscapeMonitorClient) Delete(ctx context.Context, resourceGroupName string, monitorName string, options *SapLandscapeMonitorClientDeleteOptions) (SapLandscapeMonitorClientDeleteResponse, error)
Delete - Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- options - SapLandscapeMonitorClientDeleteOptions contains the optional parameters for the SapLandscapeMonitorClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/SapLandscapeMonitor_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSapLandscapeMonitorClient().Delete(ctx, "myResourceGroup", "mySapMonitor", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SapLandscapeMonitorClient) Get ¶ added in v0.3.0
func (client *SapLandscapeMonitorClient) Get(ctx context.Context, resourceGroupName string, monitorName string, options *SapLandscapeMonitorClientGetOptions) (SapLandscapeMonitorClientGetResponse, error)
Get - Gets configuration values for Single Pane Of Glass for 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 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- options - SapLandscapeMonitorClientGetOptions contains the optional parameters for the SapLandscapeMonitorClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/SapLandscapeMonitor_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSapLandscapeMonitorClient().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.SapLandscapeMonitor = armworkloads.SapLandscapeMonitor{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/myMonitor/sapLandscapeMonitor/default"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.SapLandscapeMonitorProperties{ // Grouping: &armworkloads.SapLandscapeMonitorPropertiesGrouping{ // Landscape: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("Prod"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // SapApplication: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("ERP1"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // }, // TopMetricsThresholds: []*armworkloads.SapLandscapeMonitorMetricThresholds{ // { // Name: to.Ptr("Instance Availability"), // Green: to.Ptr[float32](90), // Red: to.Ptr[float32](50), // Yellow: to.Ptr[float32](75), // }}, // }, // } }
Output:
func (*SapLandscapeMonitorClient) List ¶ added in v0.3.0
func (client *SapLandscapeMonitorClient) List(ctx context.Context, resourceGroupName string, monitorName string, options *SapLandscapeMonitorClientListOptions) (SapLandscapeMonitorClientListResponse, error)
List - Gets configuration values for Single Pane Of Glass for 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 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- options - SapLandscapeMonitorClientListOptions contains the optional parameters for the SapLandscapeMonitorClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/SapLandscapeMonitor_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/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSapLandscapeMonitorClient().List(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.SapLandscapeMonitorListResult = armworkloads.SapLandscapeMonitorListResult{ // Value: []*armworkloads.SapLandscapeMonitor{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/myMonitor/sapLandscapeMonitor/default"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.SapLandscapeMonitorProperties{ // Grouping: &armworkloads.SapLandscapeMonitorPropertiesGrouping{ // Landscape: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("Prod"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // SapApplication: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("ERP1"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // }, // TopMetricsThresholds: []*armworkloads.SapLandscapeMonitorMetricThresholds{ // { // Name: to.Ptr("Instance Availability"), // Green: to.Ptr[float32](90), // Red: to.Ptr[float32](50), // Yellow: to.Ptr[float32](75), // }}, // }, // }, // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/myMonitor/sapLandscapeMonitor/default"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.SapLandscapeMonitorProperties{ // Grouping: &armworkloads.SapLandscapeMonitorPropertiesGrouping{ // Landscape: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("Prod"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // SapApplication: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("ERP1"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // }, // TopMetricsThresholds: []*armworkloads.SapLandscapeMonitorMetricThresholds{ // { // Name: to.Ptr("Instance Availability"), // Green: to.Ptr[float32](90), // Red: to.Ptr[float32](50), // Yellow: to.Ptr[float32](75), // }}, // }, // }}, // } }
Output:
func (*SapLandscapeMonitorClient) Update ¶ added in v0.3.0
func (client *SapLandscapeMonitorClient) Update(ctx context.Context, resourceGroupName string, monitorName string, sapLandscapeMonitorParameter SapLandscapeMonitor, options *SapLandscapeMonitorClientUpdateOptions) (SapLandscapeMonitorClientUpdateResponse, error)
Update - Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- monitorName - Name of the SAP monitor resource.
- sapLandscapeMonitorParameter - Request body representing a configuration for Sap Landscape Monitor Dashboard
- options - SapLandscapeMonitorClientUpdateOptions contains the optional parameters for the SapLandscapeMonitorClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/workloadmonitor/SapLandscapeMonitor_Update.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSapLandscapeMonitorClient().Update(ctx, "myResourceGroup", "mySapMonitor", armworkloads.SapLandscapeMonitor{ Properties: &armworkloads.SapLandscapeMonitorProperties{ Grouping: &armworkloads.SapLandscapeMonitorPropertiesGrouping{ Landscape: []*armworkloads.SapLandscapeMonitorSidMapping{ { Name: to.Ptr("Prod"), TopSid: []*string{ to.Ptr("SID1"), to.Ptr("SID2")}, }}, SapApplication: []*armworkloads.SapLandscapeMonitorSidMapping{ { Name: to.Ptr("ERP1"), TopSid: []*string{ to.Ptr("SID1"), to.Ptr("SID2")}, }}, }, TopMetricsThresholds: []*armworkloads.SapLandscapeMonitorMetricThresholds{ { Name: to.Ptr("Instance Availability"), Green: to.Ptr[float32](90), Red: to.Ptr[float32](50), Yellow: to.Ptr[float32](75), }}, }, }, 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.SapLandscapeMonitor = armworkloads.SapLandscapeMonitor{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Workloads/monitors/myMonitor/sapLandscapeMonitor/default"), // SystemData: &armworkloads.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // CreatedBy: to.Ptr("user@xyz.com"), // CreatedByType: to.Ptr(armworkloads.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T15:10:46.196Z"); return t}()), // LastModifiedBy: to.Ptr("user@xyz.com"), // LastModifiedByType: to.Ptr(armworkloads.CreatedByTypeUser), // }, // Properties: &armworkloads.SapLandscapeMonitorProperties{ // Grouping: &armworkloads.SapLandscapeMonitorPropertiesGrouping{ // Landscape: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("Prod"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // SapApplication: []*armworkloads.SapLandscapeMonitorSidMapping{ // { // Name: to.Ptr("ERP1"), // TopSid: []*string{ // to.Ptr("SID1"), // to.Ptr("SID2")}, // }}, // }, // TopMetricsThresholds: []*armworkloads.SapLandscapeMonitorMetricThresholds{ // { // Name: to.Ptr("Instance Availability"), // Green: to.Ptr[float32](90), // Red: to.Ptr[float32](50), // Yellow: to.Ptr[float32](75), // }}, // }, // } }
Output:
type SapLandscapeMonitorClientCreateOptions ¶ added in v0.3.0
type SapLandscapeMonitorClientCreateOptions struct { }
SapLandscapeMonitorClientCreateOptions contains the optional parameters for the SapLandscapeMonitorClient.Create method.
type SapLandscapeMonitorClientCreateResponse ¶ added in v0.3.0
type SapLandscapeMonitorClientCreateResponse struct { // configuration associated with SAP Landscape Monitor Dashboard. SapLandscapeMonitor }
SapLandscapeMonitorClientCreateResponse contains the response from method SapLandscapeMonitorClient.Create.
type SapLandscapeMonitorClientDeleteOptions ¶ added in v0.3.0
type SapLandscapeMonitorClientDeleteOptions struct { }
SapLandscapeMonitorClientDeleteOptions contains the optional parameters for the SapLandscapeMonitorClient.Delete method.
type SapLandscapeMonitorClientDeleteResponse ¶ added in v0.3.0
type SapLandscapeMonitorClientDeleteResponse struct { }
SapLandscapeMonitorClientDeleteResponse contains the response from method SapLandscapeMonitorClient.Delete.
type SapLandscapeMonitorClientGetOptions ¶ added in v0.3.0
type SapLandscapeMonitorClientGetOptions struct { }
SapLandscapeMonitorClientGetOptions contains the optional parameters for the SapLandscapeMonitorClient.Get method.
type SapLandscapeMonitorClientGetResponse ¶ added in v0.3.0
type SapLandscapeMonitorClientGetResponse struct { // configuration associated with SAP Landscape Monitor Dashboard. SapLandscapeMonitor }
SapLandscapeMonitorClientGetResponse contains the response from method SapLandscapeMonitorClient.Get.
type SapLandscapeMonitorClientListOptions ¶ added in v0.3.0
type SapLandscapeMonitorClientListOptions struct { }
SapLandscapeMonitorClientListOptions contains the optional parameters for the SapLandscapeMonitorClient.List method.
type SapLandscapeMonitorClientListResponse ¶ added in v0.3.0
type SapLandscapeMonitorClientListResponse struct { // The response from the List SAP Landscape Monitor Dashboard operation. SapLandscapeMonitorListResult }
SapLandscapeMonitorClientListResponse contains the response from method SapLandscapeMonitorClient.List.
type SapLandscapeMonitorClientUpdateOptions ¶ added in v0.3.0
type SapLandscapeMonitorClientUpdateOptions struct { }
SapLandscapeMonitorClientUpdateOptions contains the optional parameters for the SapLandscapeMonitorClient.Update method.
type SapLandscapeMonitorClientUpdateResponse ¶ added in v0.3.0
type SapLandscapeMonitorClientUpdateResponse struct { // configuration associated with SAP Landscape Monitor Dashboard. SapLandscapeMonitor }
SapLandscapeMonitorClientUpdateResponse contains the response from method SapLandscapeMonitorClient.Update.
type SapLandscapeMonitorListResult ¶ added in v0.3.0
type SapLandscapeMonitorListResult struct { // The URL to get the next set of SAP Landscape Monitor Dashboard. NextLink *string // The list of Sap Landscape Monitor configuration. Value []*SapLandscapeMonitor }
SapLandscapeMonitorListResult - The response from the List SAP Landscape Monitor Dashboard operation.
func (SapLandscapeMonitorListResult) MarshalJSON ¶ added in v0.3.0
func (s SapLandscapeMonitorListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SapLandscapeMonitorListResult.
func (*SapLandscapeMonitorListResult) UnmarshalJSON ¶ added in v0.3.0
func (s *SapLandscapeMonitorListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapLandscapeMonitorListResult.
type SapLandscapeMonitorMetricThresholds ¶ added in v0.3.0
type SapLandscapeMonitorMetricThresholds struct { // Gets or sets the threshold value for Green. Green *float32 // Gets or sets the name of the threshold. Name *string // Gets or sets the threshold value for Red. Red *float32 // Gets or sets the threshold value for Yellow. Yellow *float32 }
SapLandscapeMonitorMetricThresholds - Gets or sets the Threshold Values for Top Metrics Health.
func (SapLandscapeMonitorMetricThresholds) MarshalJSON ¶ added in v0.3.0
func (s SapLandscapeMonitorMetricThresholds) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SapLandscapeMonitorMetricThresholds.
func (*SapLandscapeMonitorMetricThresholds) UnmarshalJSON ¶ added in v0.3.0
func (s *SapLandscapeMonitorMetricThresholds) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapLandscapeMonitorMetricThresholds.
type SapLandscapeMonitorProperties ¶ added in v0.3.0
type SapLandscapeMonitorProperties struct { // Gets or sets the SID groupings by landscape and Environment. Grouping *SapLandscapeMonitorPropertiesGrouping // Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor Dashboard TopMetricsThresholds []*SapLandscapeMonitorMetricThresholds // READ-ONLY; State of provisioning of the SAP monitor. ProvisioningState *SapLandscapeMonitorProvisioningState }
SapLandscapeMonitorProperties - Gets or sets the properties for Sap Landscape Monitor Dashboard.
func (SapLandscapeMonitorProperties) MarshalJSON ¶ added in v0.3.0
func (s SapLandscapeMonitorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SapLandscapeMonitorProperties.
func (*SapLandscapeMonitorProperties) UnmarshalJSON ¶ added in v0.3.0
func (s *SapLandscapeMonitorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapLandscapeMonitorProperties.
type SapLandscapeMonitorPropertiesGrouping ¶ added in v0.3.0
type SapLandscapeMonitorPropertiesGrouping struct { // Gets or sets the list of landscape to SID mappings. Landscape []*SapLandscapeMonitorSidMapping // Gets or sets the list of Sap Applications to SID mappings. SapApplication []*SapLandscapeMonitorSidMapping }
SapLandscapeMonitorPropertiesGrouping - Gets or sets the SID groupings by landscape and Environment.
func (SapLandscapeMonitorPropertiesGrouping) MarshalJSON ¶ added in v0.3.0
func (s SapLandscapeMonitorPropertiesGrouping) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SapLandscapeMonitorPropertiesGrouping.
func (*SapLandscapeMonitorPropertiesGrouping) UnmarshalJSON ¶ added in v0.3.0
func (s *SapLandscapeMonitorPropertiesGrouping) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapLandscapeMonitorPropertiesGrouping.
type SapLandscapeMonitorProvisioningState ¶ added in v0.3.0
type SapLandscapeMonitorProvisioningState string
SapLandscapeMonitorProvisioningState - State of provisioning of the SAP monitor.
const ( SapLandscapeMonitorProvisioningStateAccepted SapLandscapeMonitorProvisioningState = "Accepted" SapLandscapeMonitorProvisioningStateCanceled SapLandscapeMonitorProvisioningState = "Canceled" SapLandscapeMonitorProvisioningStateCreated SapLandscapeMonitorProvisioningState = "Created" SapLandscapeMonitorProvisioningStateFailed SapLandscapeMonitorProvisioningState = "Failed" SapLandscapeMonitorProvisioningStateSucceeded SapLandscapeMonitorProvisioningState = "Succeeded" )
func PossibleSapLandscapeMonitorProvisioningStateValues ¶ added in v0.3.0
func PossibleSapLandscapeMonitorProvisioningStateValues() []SapLandscapeMonitorProvisioningState
PossibleSapLandscapeMonitorProvisioningStateValues returns the possible values for the SapLandscapeMonitorProvisioningState const type.
type SapLandscapeMonitorSidMapping ¶ added in v0.3.0
type SapLandscapeMonitorSidMapping struct { // Gets or sets the name of the grouping. Name *string // Gets or sets the list of SID's. TopSid []*string }
SapLandscapeMonitorSidMapping - Gets or sets the mapping for SID to Environment/Applications.
func (SapLandscapeMonitorSidMapping) MarshalJSON ¶ added in v0.3.0
func (s SapLandscapeMonitorSidMapping) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SapLandscapeMonitorSidMapping.
func (*SapLandscapeMonitorSidMapping) UnmarshalJSON ¶ added in v0.3.0
func (s *SapLandscapeMonitorSidMapping) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapLandscapeMonitorSidMapping.
type SapNetWeaverProviderInstanceProperties ¶
type SapNetWeaverProviderInstanceProperties struct { // REQUIRED; The provider type. For example, the value can be SapHana. ProviderType *string // Gets or sets the blob URI to SSL certificate for the SAP system. SSLCertificateURI *string // Gets or sets certificate preference if secure communication is enabled. SSLPreference *SSLPreference // Gets or sets the SAP Client ID. SapClientID *string // Gets or sets the list of HostFile Entries SapHostFileEntries []*string // Gets or sets the target virtual machine IP Address/FQDN. SapHostname *string // Gets or sets the instance number of SAP NetWeaver. SapInstanceNr *string // Sets the SAP password. SapPassword *string // Gets or sets the key vault URI to secret with the SAP password. SapPasswordURI *string // Gets or sets the SAP HTTP port number. SapPortNumber *string // Gets or sets the SAP System Identifier SapSid *string // Gets or sets the SAP user name. SapUsername *string }
SapNetWeaverProviderInstanceProperties - Gets or sets the provider properties.
func (*SapNetWeaverProviderInstanceProperties) GetProviderSpecificProperties ¶
func (s *SapNetWeaverProviderInstanceProperties) GetProviderSpecificProperties() *ProviderSpecificProperties
GetProviderSpecificProperties implements the ProviderSpecificPropertiesClassification interface for type SapNetWeaverProviderInstanceProperties.
func (SapNetWeaverProviderInstanceProperties) MarshalJSON ¶
func (s SapNetWeaverProviderInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SapNetWeaverProviderInstanceProperties.
func (*SapNetWeaverProviderInstanceProperties) UnmarshalJSON ¶
func (s *SapNetWeaverProviderInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SapNetWeaverProviderInstanceProperties.
type SapVirtualInstanceProvisioningState ¶ added in v0.2.0
type SapVirtualInstanceProvisioningState string
SapVirtualInstanceProvisioningState - Defines the provisioning states.
const ( SapVirtualInstanceProvisioningStateCreating SapVirtualInstanceProvisioningState = "Creating" SapVirtualInstanceProvisioningStateDeleting SapVirtualInstanceProvisioningState = "Deleting" SapVirtualInstanceProvisioningStateFailed SapVirtualInstanceProvisioningState = "Failed" SapVirtualInstanceProvisioningStateSucceeded SapVirtualInstanceProvisioningState = "Succeeded" SapVirtualInstanceProvisioningStateUpdating SapVirtualInstanceProvisioningState = "Updating" )
func PossibleSapVirtualInstanceProvisioningStateValues ¶ added in v0.2.0
func PossibleSapVirtualInstanceProvisioningStateValues() []SapVirtualInstanceProvisioningState
PossibleSapVirtualInstanceProvisioningStateValues returns the possible values for the SapVirtualInstanceProvisioningState const type.
type ServiceInitiatedSoftwareConfiguration ¶ added in v0.2.0
type ServiceInitiatedSoftwareConfiguration struct { // REQUIRED; The URL to the SAP Build of Materials(BOM) file. BomURL *string // REQUIRED; The SSH private key. SSHPrivateKey *string // REQUIRED; The SAP bits storage account id. SapBitsStorageAccountID *string // REQUIRED; The FQDN to set for the SAP system during install. SapFqdn *string // REQUIRED; The SAP software installation Type. SoftwareInstallationType *SAPSoftwareInstallationType // REQUIRED; The software version to install. SoftwareVersion *string // Gets or sets the HA software configuration. HighAvailabilitySoftwareConfiguration *HighAvailabilitySoftwareConfiguration }
ServiceInitiatedSoftwareConfiguration - The SAP Software configuration Input when the software is to be installed by service.
func (*ServiceInitiatedSoftwareConfiguration) GetSoftwareConfiguration ¶ added in v0.2.0
func (s *ServiceInitiatedSoftwareConfiguration) GetSoftwareConfiguration() *SoftwareConfiguration
GetSoftwareConfiguration implements the SoftwareConfigurationClassification interface for type ServiceInitiatedSoftwareConfiguration.
func (ServiceInitiatedSoftwareConfiguration) MarshalJSON ¶ added in v0.2.0
func (s ServiceInitiatedSoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceInitiatedSoftwareConfiguration.
func (*ServiceInitiatedSoftwareConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (s *ServiceInitiatedSoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceInitiatedSoftwareConfiguration.
type SharedStorageResourceNames ¶ added in v0.3.0
type SharedStorageResourceNames struct { string SharedStorageAccountPrivateEndPointName *string }SharedStorageAccountName *
SharedStorageResourceNames - The resource names object for shared storage.
func (SharedStorageResourceNames) MarshalJSON ¶ added in v0.3.0
func (s SharedStorageResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedStorageResourceNames.
func (*SharedStorageResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (s *SharedStorageResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedStorageResourceNames.
type SingleServerConfiguration ¶ added in v0.2.0
type SingleServerConfiguration struct { // REQUIRED; The application resource group where SAP system resources will be deployed. AppResourceGroup *string // REQUIRED; The type of SAP deployment, single server or Three tier. DeploymentType *SAPDeploymentType // REQUIRED; The subnet id. SubnetID *string // REQUIRED; Gets or sets the virtual machine configuration. VirtualMachineConfiguration *VirtualMachineConfiguration // The set of custom names to be used for underlying azure resources that are part of the SAP system. CustomResourceNames SingleServerCustomResourceNamesClassification // The database type. DatabaseType *SAPDatabaseType // Gets or sets the disk configuration. DbDiskConfiguration *DiskConfiguration // Network configuration for the server NetworkConfiguration *NetworkConfiguration }
SingleServerConfiguration - Gets or sets the single server configuration. For prerequisites for creating the infrastructure, please see here [https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409]
func (*SingleServerConfiguration) GetInfrastructureConfiguration ¶ added in v0.2.0
func (s *SingleServerConfiguration) GetInfrastructureConfiguration() *InfrastructureConfiguration
GetInfrastructureConfiguration implements the InfrastructureConfigurationClassification interface for type SingleServerConfiguration.
func (SingleServerConfiguration) MarshalJSON ¶ added in v0.2.0
func (s SingleServerConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleServerConfiguration.
func (*SingleServerConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (s *SingleServerConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleServerConfiguration.
type SingleServerCustomResourceNames ¶ added in v0.3.0
type SingleServerCustomResourceNames struct { // REQUIRED; The pattern type to be used for resource naming. NamingPatternType *NamingPatternType }
SingleServerCustomResourceNames - The resource-names input to specify custom names for underlying azure resources that are part of a single server SAP system.
func (*SingleServerCustomResourceNames) GetSingleServerCustomResourceNames ¶ added in v0.3.0
func (s *SingleServerCustomResourceNames) GetSingleServerCustomResourceNames() *SingleServerCustomResourceNames
GetSingleServerCustomResourceNames implements the SingleServerCustomResourceNamesClassification interface for type SingleServerCustomResourceNames.
func (SingleServerCustomResourceNames) MarshalJSON ¶ added in v0.3.0
func (s SingleServerCustomResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleServerCustomResourceNames.
func (*SingleServerCustomResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (s *SingleServerCustomResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleServerCustomResourceNames.
type SingleServerCustomResourceNamesClassification ¶ added in v0.3.0
type SingleServerCustomResourceNamesClassification interface { // GetSingleServerCustomResourceNames returns the SingleServerCustomResourceNames content of the underlying type. GetSingleServerCustomResourceNames() *SingleServerCustomResourceNames }
SingleServerCustomResourceNamesClassification provides polymorphic access to related types. Call the interface's GetSingleServerCustomResourceNames() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *SingleServerCustomResourceNames, *SingleServerFullResourceNames
type SingleServerFullResourceNames ¶ added in v0.3.0
type SingleServerFullResourceNames struct { // REQUIRED; The pattern type to be used for resource naming. NamingPatternType *NamingPatternType // The resource names object for virtual machine and related resources. VirtualMachine *VirtualMachineResourceNames }
SingleServerFullResourceNames - The resource name object where the specified values will be full resource names of the corresponding resources in a single server SAP system.
func (*SingleServerFullResourceNames) GetSingleServerCustomResourceNames ¶ added in v0.3.0
func (s *SingleServerFullResourceNames) GetSingleServerCustomResourceNames() *SingleServerCustomResourceNames
GetSingleServerCustomResourceNames implements the SingleServerCustomResourceNamesClassification interface for type SingleServerFullResourceNames.
func (SingleServerFullResourceNames) MarshalJSON ¶ added in v0.3.0
func (s SingleServerFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleServerFullResourceNames.
func (*SingleServerFullResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (s *SingleServerFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleServerFullResourceNames.
type SingleServerRecommendationResult ¶ added in v0.2.0
type SingleServerRecommendationResult struct { // REQUIRED; The type of SAP deployment, single server or Three tier. DeploymentType *SAPDeploymentType // The recommended VM SKU for single server. VMSKU *string }
SingleServerRecommendationResult - The recommended configuration for a single server SAP system.
func (*SingleServerRecommendationResult) GetSAPSizingRecommendationResult ¶ added in v0.2.0
func (s *SingleServerRecommendationResult) GetSAPSizingRecommendationResult() *SAPSizingRecommendationResult
GetSAPSizingRecommendationResult implements the SAPSizingRecommendationResultClassification interface for type SingleServerRecommendationResult.
func (SingleServerRecommendationResult) MarshalJSON ¶ added in v0.2.0
func (s SingleServerRecommendationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleServerRecommendationResult.
func (*SingleServerRecommendationResult) UnmarshalJSON ¶ added in v0.2.0
func (s *SingleServerRecommendationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleServerRecommendationResult.
type SkipFileShareConfiguration ¶ added in v0.3.0
type SkipFileShareConfiguration struct { ConfigurationType }ConfigurationType *
SkipFileShareConfiguration - Gets or sets the file share configuration for scenarios where transport directory fileshare is not created or required.
func (*SkipFileShareConfiguration) GetFileShareConfiguration ¶ added in v0.3.0
func (s *SkipFileShareConfiguration) GetFileShareConfiguration() *FileShareConfiguration
GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type SkipFileShareConfiguration.
func (SkipFileShareConfiguration) MarshalJSON ¶ added in v0.3.0
func (s SkipFileShareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SkipFileShareConfiguration.
func (*SkipFileShareConfiguration) UnmarshalJSON ¶ added in v0.3.0
func (s *SkipFileShareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SkipFileShareConfiguration.
type SoftwareConfiguration ¶ added in v0.2.0
type SoftwareConfiguration struct { // REQUIRED; The SAP software installation Type. SoftwareInstallationType *SAPSoftwareInstallationType }
SoftwareConfiguration - The SAP Software configuration Input.
func (*SoftwareConfiguration) GetSoftwareConfiguration ¶ added in v0.2.0
func (s *SoftwareConfiguration) GetSoftwareConfiguration() *SoftwareConfiguration
GetSoftwareConfiguration implements the SoftwareConfigurationClassification interface for type SoftwareConfiguration.
func (SoftwareConfiguration) MarshalJSON ¶ added in v0.2.0
func (s SoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SoftwareConfiguration.
func (*SoftwareConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (s *SoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SoftwareConfiguration.
type SoftwareConfigurationClassification ¶ added in v0.2.0
type SoftwareConfigurationClassification interface { // GetSoftwareConfiguration returns the SoftwareConfiguration content of the underlying type. GetSoftwareConfiguration() *SoftwareConfiguration }
SoftwareConfigurationClassification provides polymorphic access to related types. Call the interface's GetSoftwareConfiguration() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ExternalInstallationSoftwareConfiguration, *SAPInstallWithoutOSConfigSoftwareConfiguration, *ServiceInitiatedSoftwareConfiguration, - *SoftwareConfiguration
type StopRequest ¶ added in v0.2.0
type StopRequest struct { // This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer consider the // server for calls with load balancing. Value 0 means that the kernel does not // wait, but goes directly into the next shutdown state, i.e. hard stop. SoftStopTimeoutSeconds *int64 }
StopRequest - Stop SAP instance(s) request body.
func (StopRequest) MarshalJSON ¶ added in v0.2.0
func (s StopRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StopRequest.
func (*StopRequest) UnmarshalJSON ¶ added in v0.2.0
func (s *StopRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StopRequest.
type StorageConfiguration ¶ added in v0.3.0
type StorageConfiguration struct { // flow if storage configuration is missing. TransportFileShareConfiguration FileShareConfigurationClassification }
StorageConfiguration - Gets or sets the storage configuration.
func (StorageConfiguration) MarshalJSON ¶ added in v0.3.0
func (s StorageConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageConfiguration.
func (*StorageConfiguration) UnmarshalJSON ¶ added in v0.3.0
func (s *StorageConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageConfiguration.
type StorageInformation ¶ added in v0.3.0
type StorageInformation struct { // READ-ONLY ID *string }
StorageInformation - Storage details of all the Storage accounts attached to the VM. For e.g. NFS on AFS Shared Storage.
func (StorageInformation) MarshalJSON ¶ added in v0.3.0
func (s StorageInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageInformation.
func (*StorageInformation) UnmarshalJSON ¶ added in v0.3.0
func (s *StorageInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageInformation.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type Tags ¶
Tags field of the resource.
func (Tags) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Tags.
func (*Tags) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Tags.
type ThreeTierConfiguration ¶ added in v0.2.0
type ThreeTierConfiguration struct { // REQUIRED; The application resource group where SAP system resources will be deployed. AppResourceGroup *string // REQUIRED; The application server configuration. ApplicationServer *ApplicationServerConfiguration // REQUIRED; The central server configuration. CentralServer *CentralServerConfiguration // REQUIRED; The database configuration. DatabaseServer *DatabaseConfiguration // REQUIRED; The type of SAP deployment, single server or Three tier. DeploymentType *SAPDeploymentType // The set of custom names to be used for underlying azure resources that are part of the SAP system. CustomResourceNames ThreeTierCustomResourceNamesClassification // The high availability configuration. HighAvailabilityConfig *HighAvailabilityConfiguration // Network configuration common to all servers NetworkConfiguration *NetworkConfiguration // The storage configuration. StorageConfiguration *StorageConfiguration }
ThreeTierConfiguration - Gets or sets the three tier SAP configuration. For prerequisites for creating the infrastructure, please see here [https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409]
func (*ThreeTierConfiguration) GetInfrastructureConfiguration ¶ added in v0.2.0
func (t *ThreeTierConfiguration) GetInfrastructureConfiguration() *InfrastructureConfiguration
GetInfrastructureConfiguration implements the InfrastructureConfigurationClassification interface for type ThreeTierConfiguration.
func (ThreeTierConfiguration) MarshalJSON ¶ added in v0.2.0
func (t ThreeTierConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThreeTierConfiguration.
func (*ThreeTierConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (t *ThreeTierConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThreeTierConfiguration.
type ThreeTierCustomResourceNames ¶ added in v0.3.0
type ThreeTierCustomResourceNames struct { // REQUIRED; The pattern type to be used for resource naming. NamingPatternType *NamingPatternType }
ThreeTierCustomResourceNames - The resource-names input to specify custom names for underlying azure resources that are part of a three tier SAP system.
func (*ThreeTierCustomResourceNames) GetThreeTierCustomResourceNames ¶ added in v0.3.0
func (t *ThreeTierCustomResourceNames) GetThreeTierCustomResourceNames() *ThreeTierCustomResourceNames
GetThreeTierCustomResourceNames implements the ThreeTierCustomResourceNamesClassification interface for type ThreeTierCustomResourceNames.
func (ThreeTierCustomResourceNames) MarshalJSON ¶ added in v0.3.0
func (t ThreeTierCustomResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThreeTierCustomResourceNames.
func (*ThreeTierCustomResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (t *ThreeTierCustomResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThreeTierCustomResourceNames.
type ThreeTierCustomResourceNamesClassification ¶ added in v0.3.0
type ThreeTierCustomResourceNamesClassification interface { // GetThreeTierCustomResourceNames returns the ThreeTierCustomResourceNames content of the underlying type. GetThreeTierCustomResourceNames() *ThreeTierCustomResourceNames }
ThreeTierCustomResourceNamesClassification provides polymorphic access to related types. Call the interface's GetThreeTierCustomResourceNames() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ThreeTierCustomResourceNames, *ThreeTierFullResourceNames
type ThreeTierFullResourceNames ¶ added in v0.3.0
type ThreeTierFullResourceNames struct { // REQUIRED; The pattern type to be used for resource naming. NamingPatternType *NamingPatternType // The full resource names object for application layer resources. The number of entries in this list should be equal to the // number VMs to be created for application layer. ApplicationServer *ApplicationServerFullResourceNames // The full resource names object for central server layer resources. CentralServer *CentralServerFullResourceNames // The full resource names object for database layer resources. The number of entries in this list should be equal to the // number VMs to be created for database layer. DatabaseServer *DatabaseServerFullResourceNames SharedStorage *SharedStorageResourceNames }
ThreeTierFullResourceNames - The resource name object where the specified values will be full resource names of the corresponding resources in a three tier SAP system.
func (*ThreeTierFullResourceNames) GetThreeTierCustomResourceNames ¶ added in v0.3.0
func (t *ThreeTierFullResourceNames) GetThreeTierCustomResourceNames() *ThreeTierCustomResourceNames
GetThreeTierCustomResourceNames implements the ThreeTierCustomResourceNamesClassification interface for type ThreeTierFullResourceNames.
func (ThreeTierFullResourceNames) MarshalJSON ¶ added in v0.3.0
func (t ThreeTierFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThreeTierFullResourceNames.
func (*ThreeTierFullResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (t *ThreeTierFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThreeTierFullResourceNames.
type ThreeTierRecommendationResult ¶ added in v0.2.0
type ThreeTierRecommendationResult struct { // REQUIRED; The type of SAP deployment, single server or Three tier. DeploymentType *SAPDeploymentType // The application server instance count. ApplicationServerInstanceCount *int64 // The application server VM SKU. ApplicationServerVMSKU *string // The central server instance count. CentralServerInstanceCount *int64 // The central server VM SKU. CentralServerVMSKU *string // The database server instance count. DatabaseInstanceCount *int64 // The database VM SKU. DbVMSKU *string }
ThreeTierRecommendationResult - The recommended configuration for a three tier SAP system.
func (*ThreeTierRecommendationResult) GetSAPSizingRecommendationResult ¶ added in v0.2.0
func (t *ThreeTierRecommendationResult) GetSAPSizingRecommendationResult() *SAPSizingRecommendationResult
GetSAPSizingRecommendationResult implements the SAPSizingRecommendationResultClassification interface for type ThreeTierRecommendationResult.
func (ThreeTierRecommendationResult) MarshalJSON ¶ added in v0.2.0
func (t ThreeTierRecommendationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThreeTierRecommendationResult.
func (*ThreeTierRecommendationResult) UnmarshalJSON ¶ added in v0.2.0
func (t *ThreeTierRecommendationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThreeTierRecommendationResult.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // 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 }
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.
func (*TrackedResource) UnmarshalJSON ¶ added in v0.2.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type UpdateMonitorRequest ¶ added in v0.2.0
type UpdateMonitorRequest struct { // [currently not in use] Managed service identity(user assigned identities) Identity *UserAssignedServiceIdentity // Gets or sets the Resource tags. Tags map[string]*string }
UpdateMonitorRequest - Defines the request body for updating SAP monitor resource.
func (UpdateMonitorRequest) MarshalJSON ¶ added in v0.2.0
func (u UpdateMonitorRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateMonitorRequest.
func (*UpdateMonitorRequest) UnmarshalJSON ¶ added in v0.2.0
func (u *UpdateMonitorRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateMonitorRequest.
type UpdateSAPApplicationInstanceRequest ¶ added in v0.2.0
type UpdateSAPApplicationInstanceRequest struct { // Gets or sets the Resource tags. Tags map[string]*string }
UpdateSAPApplicationInstanceRequest - Defines the request body for updating SAP Application Instance.
func (UpdateSAPApplicationInstanceRequest) MarshalJSON ¶ added in v0.2.0
func (u UpdateSAPApplicationInstanceRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSAPApplicationInstanceRequest.
func (*UpdateSAPApplicationInstanceRequest) UnmarshalJSON ¶ added in v0.2.0
func (u *UpdateSAPApplicationInstanceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSAPApplicationInstanceRequest.
type UpdateSAPCentralInstanceRequest ¶ added in v0.2.0
type UpdateSAPCentralInstanceRequest struct { // Gets or sets the Resource tags. Tags map[string]*string }
UpdateSAPCentralInstanceRequest - Defines the request body for updating SAP Central Instance.
func (UpdateSAPCentralInstanceRequest) MarshalJSON ¶ added in v0.2.0
func (u UpdateSAPCentralInstanceRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSAPCentralInstanceRequest.
func (*UpdateSAPCentralInstanceRequest) UnmarshalJSON ¶ added in v0.2.0
func (u *UpdateSAPCentralInstanceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSAPCentralInstanceRequest.
type UpdateSAPDatabaseInstanceRequest ¶ added in v0.2.0
type UpdateSAPDatabaseInstanceRequest struct { // Gets or sets the Resource tags. Tags map[string]*string }
UpdateSAPDatabaseInstanceRequest - Defines the request body for updating SAP Database Instance.
func (UpdateSAPDatabaseInstanceRequest) MarshalJSON ¶ added in v0.2.0
func (u UpdateSAPDatabaseInstanceRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSAPDatabaseInstanceRequest.
func (*UpdateSAPDatabaseInstanceRequest) UnmarshalJSON ¶ added in v0.2.0
func (u *UpdateSAPDatabaseInstanceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSAPDatabaseInstanceRequest.
type UpdateSAPVirtualInstanceRequest ¶ added in v0.2.0
type UpdateSAPVirtualInstanceRequest struct { // A pre-created user assigned identity with appropriate roles assigned. To learn more on identity and roles required, visit // the ACSS how-to-guide. Identity *UserAssignedServiceIdentity // Gets or sets the Resource tags. Tags map[string]*string }
UpdateSAPVirtualInstanceRequest - Defines the request body for updating Virtual Instance for SAP.
func (UpdateSAPVirtualInstanceRequest) MarshalJSON ¶ added in v0.2.0
func (u UpdateSAPVirtualInstanceRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSAPVirtualInstanceRequest.
func (*UpdateSAPVirtualInstanceRequest) UnmarshalJSON ¶ added in v0.2.0
func (u *UpdateSAPVirtualInstanceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSAPVirtualInstanceRequest.
type UserAssignedIdentity ¶ added in v0.2.0
type UserAssignedIdentity struct { // READ-ONLY; The client ID of the assigned identity. ClientID *string // READ-ONLY; The principal ID of the assigned identity. PrincipalID *string }
UserAssignedIdentity - User assigned identity properties
func (UserAssignedIdentity) MarshalJSON ¶ added in v0.2.0
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶ added in v0.2.0
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type UserAssignedServiceIdentity ¶ added in v0.2.0
type UserAssignedServiceIdentity struct { // REQUIRED; Type of manage identity Type *ManagedServiceIdentityType // User assigned identities dictionary UserAssignedIdentities map[string]*UserAssignedIdentity }
UserAssignedServiceIdentity - A pre-created user assigned identity with appropriate roles assigned. To learn more on identity and roles required, visit the ACSS how-to-guide.
func (UserAssignedServiceIdentity) MarshalJSON ¶ added in v0.2.0
func (u UserAssignedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedServiceIdentity.
func (*UserAssignedServiceIdentity) UnmarshalJSON ¶ added in v0.2.0
func (u *UserAssignedServiceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedServiceIdentity.
type VirtualMachineConfiguration ¶ added in v0.2.0
type VirtualMachineConfiguration struct { // REQUIRED; The image reference. ImageReference *ImageReference // REQUIRED; The OS profile. OSProfile *OSProfile // REQUIRED; The virtual machine size. VMSize *string }
VirtualMachineConfiguration - Defines the virtual machine configuration.
func (VirtualMachineConfiguration) MarshalJSON ¶ added in v0.2.0
func (v VirtualMachineConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineConfiguration.
func (*VirtualMachineConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (v *VirtualMachineConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineConfiguration.
type VirtualMachineResourceNames ¶ added in v0.3.0
type VirtualMachineResourceNames struct { // The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per // volume. Currently supported volumes for database layer are ['hana/data', // 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported DataDiskNames map[string][]*string // The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than // or equal to 13 characters long. If this value is not provided, vmName will be // used as host name. HostName *string // The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported // per virtual machine. NetworkInterfaces []*NetworkInterfaceResourceNames // The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default // naming standards (prefixed with vm name). There is only one OS disk attached per // Virtual Machine. OSDiskName *string // The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service // uses a default name based on the deployment type. For SingleServer, default name // is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end // in case of more than 1 vm per layer. For distributed and HA-AvSet systems, // default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. VMName *string }
VirtualMachineResourceNames - The resource names object for virtual machine and related resources.
func (VirtualMachineResourceNames) MarshalJSON ¶ added in v0.3.0
func (v VirtualMachineResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineResourceNames.
func (*VirtualMachineResourceNames) UnmarshalJSON ¶ added in v0.3.0
func (v *VirtualMachineResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineResourceNames.
type WindowsConfiguration ¶ added in v0.2.0
type WindowsConfiguration struct { // REQUIRED; The OS Type OSType *OSType }
WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
func (*WindowsConfiguration) GetOSConfiguration ¶ added in v0.2.0
func (w *WindowsConfiguration) GetOSConfiguration() *OSConfiguration
GetOSConfiguration implements the OSConfigurationClassification interface for type WindowsConfiguration.
func (WindowsConfiguration) MarshalJSON ¶ added in v0.2.0
func (w WindowsConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WindowsConfiguration.
func (*WindowsConfiguration) UnmarshalJSON ¶ added in v0.2.0
func (w *WindowsConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WindowsConfiguration.
type WorkloadMonitorActionType ¶
type WorkloadMonitorActionType string
WorkloadMonitorActionType - Defines the action type of workload operation.
const ( WorkloadMonitorActionTypeInternal WorkloadMonitorActionType = "Internal" WorkloadMonitorActionTypeNotSpecified WorkloadMonitorActionType = "NotSpecified" )
func PossibleWorkloadMonitorActionTypeValues ¶
func PossibleWorkloadMonitorActionTypeValues() []WorkloadMonitorActionType
PossibleWorkloadMonitorActionTypeValues returns the possible values for the WorkloadMonitorActionType const type.
type WorkloadMonitorProvisioningState ¶
type WorkloadMonitorProvisioningState string
WorkloadMonitorProvisioningState - State of provisioning of the SAP monitor.
const ( WorkloadMonitorProvisioningStateAccepted WorkloadMonitorProvisioningState = "Accepted" WorkloadMonitorProvisioningStateCreating WorkloadMonitorProvisioningState = "Creating" WorkloadMonitorProvisioningStateDeleting WorkloadMonitorProvisioningState = "Deleting" WorkloadMonitorProvisioningStateFailed WorkloadMonitorProvisioningState = "Failed" WorkloadMonitorProvisioningStateMigrating WorkloadMonitorProvisioningState = "Migrating" WorkloadMonitorProvisioningStateSucceeded WorkloadMonitorProvisioningState = "Succeeded" WorkloadMonitorProvisioningStateUpdating WorkloadMonitorProvisioningState = "Updating" )
func PossibleWorkloadMonitorProvisioningStateValues ¶
func PossibleWorkloadMonitorProvisioningStateValues() []WorkloadMonitorProvisioningState
PossibleWorkloadMonitorProvisioningStateValues returns the possible values for the WorkloadMonitorProvisioningState const type.
Source Files ¶
- build.go
- client.go
- client_factory.go
- constants.go
- interfaces.go
- models.go
- models_serde.go
- monitors_client.go
- operations_client.go
- options.go
- polymorphic_helpers.go
- providerinstances_client.go
- response_types.go
- sapapplicationserverinstances_client.go
- sapcentralinstances_client.go
- sapdatabaseinstances_client.go
- saplandscapemonitor_client.go
- sapvirtualinstances_client.go
- time_rfc3339.go