Documentation ¶
Index ¶
- type ActionType
- type ApplicationServerConfiguration
- type ApplicationServerFullResourceNames
- type ApplicationServerVMDetails
- type ApplicationServerVirtualMachineType
- type CentralServerConfiguration
- type CentralServerFullResourceNames
- type CentralServerVMDetails
- type CentralServerVirtualMachineType
- type ClientFactory
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewSAPApplicationServerInstancesClient() *SAPApplicationServerInstancesClient
- func (c *ClientFactory) NewSAPCentralInstancesClient() *SAPCentralInstancesClient
- func (c *ClientFactory) NewSAPDatabaseInstancesClient() *SAPDatabaseInstancesClient
- func (c *ClientFactory) NewSAPVirtualInstancesClient() *SAPVirtualInstancesClient
- func (c *ClientFactory) NewWorkloadsClient() *WorkloadsClient
- type ConfigurationType
- type CreateAndMountFileShareConfiguration
- type CreatedByType
- 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 ErrorAdditionalInfo
- type ErrorDefinition
- type ErrorDetail
- type ExternalInstallationSoftwareConfiguration
- type FileShareConfiguration
- type FileShareConfigurationClassification
- type GatewayServerProperties
- type HighAvailabilityConfiguration
- type HighAvailabilitySoftwareConfiguration
- type ImageReference
- type InfrastructureConfiguration
- type InfrastructureConfigurationClassification
- type LinuxConfiguration
- type LoadBalancerDetails
- type LoadBalancerResourceNames
- type ManagedRGConfiguration
- type ManagedResourcesNetworkAccessType
- type ManagedServiceIdentityType
- type MessageServerProperties
- type MountFileShareConfiguration
- type NamingPatternType
- type NetworkConfiguration
- type NetworkInterfaceResourceNames
- type OSConfiguration
- type OSConfigurationClassification
- type OSProfile
- type OSType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationStatusResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type OsSapConfiguration
- 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) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPApplicationServerInstancesClientGetResponse, error)
- func (client *SAPApplicationServerInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, ...) *runtime.Pager[SAPApplicationServerInstancesClientListResponse]
- func (client *SAPApplicationServerInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPApplicationServerInstancesClientUpdateResponse, error)
- type SAPApplicationServerInstancesClientBeginCreateOptions
- type SAPApplicationServerInstancesClientBeginDeleteOptions
- type SAPApplicationServerInstancesClientBeginStartInstanceOptions
- type SAPApplicationServerInstancesClientBeginStopInstanceOptions
- type SAPApplicationServerInstancesClientCreateResponse
- type SAPApplicationServerInstancesClientDeleteResponse
- type SAPApplicationServerInstancesClientGetOptions
- type SAPApplicationServerInstancesClientGetResponse
- type SAPApplicationServerInstancesClientListOptions
- type SAPApplicationServerInstancesClientListResponse
- type SAPApplicationServerInstancesClientStartInstanceResponse
- type SAPApplicationServerInstancesClientStopInstanceResponse
- type SAPApplicationServerInstancesClientUpdateOptions
- 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) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPCentralInstancesClientGetResponse, error)
- func (client *SAPCentralInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, ...) *runtime.Pager[SAPCentralInstancesClientListResponse]
- func (client *SAPCentralInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPCentralInstancesClientUpdateResponse, error)
- type SAPCentralInstancesClientBeginCreateOptions
- type SAPCentralInstancesClientBeginDeleteOptions
- type SAPCentralInstancesClientBeginStartInstanceOptions
- type SAPCentralInstancesClientBeginStopInstanceOptions
- type SAPCentralInstancesClientCreateResponse
- type SAPCentralInstancesClientDeleteResponse
- type SAPCentralInstancesClientGetOptions
- type SAPCentralInstancesClientGetResponse
- type SAPCentralInstancesClientListOptions
- type SAPCentralInstancesClientListResponse
- type SAPCentralInstancesClientStartInstanceResponse
- type SAPCentralInstancesClientStopInstanceResponse
- type SAPCentralInstancesClientUpdateOptions
- 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) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPDatabaseInstancesClientGetResponse, error)
- func (client *SAPDatabaseInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, ...) *runtime.Pager[SAPDatabaseInstancesClientListResponse]
- func (client *SAPDatabaseInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (SAPDatabaseInstancesClientUpdateResponse, error)
- type SAPDatabaseInstancesClientBeginCreateOptions
- type SAPDatabaseInstancesClientBeginDeleteOptions
- type SAPDatabaseInstancesClientBeginStartInstanceOptions
- type SAPDatabaseInstancesClientBeginStopInstanceOptions
- type SAPDatabaseInstancesClientCreateResponse
- type SAPDatabaseInstancesClientDeleteResponse
- type SAPDatabaseInstancesClientGetOptions
- type SAPDatabaseInstancesClientGetResponse
- type SAPDatabaseInstancesClientListOptions
- type SAPDatabaseInstancesClientListResponse
- type SAPDatabaseInstancesClientStartInstanceResponse
- type SAPDatabaseInstancesClientStopInstanceResponse
- type SAPDatabaseInstancesClientUpdateOptions
- 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) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, ...) (*runtime.Poller[SAPVirtualInstancesClientUpdateResponse], 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]
- type SAPVirtualInstancesClientBeginCreateOptions
- type SAPVirtualInstancesClientBeginDeleteOptions
- type SAPVirtualInstancesClientBeginStartOptions
- type SAPVirtualInstancesClientBeginStopOptions
- type SAPVirtualInstancesClientBeginUpdateOptions
- type SAPVirtualInstancesClientCreateResponse
- type SAPVirtualInstancesClientDeleteResponse
- type SAPVirtualInstancesClientGetOptions
- type SAPVirtualInstancesClientGetResponse
- type SAPVirtualInstancesClientListByResourceGroupOptions
- type SAPVirtualInstancesClientListByResourceGroupResponse
- type SAPVirtualInstancesClientListBySubscriptionOptions
- type SAPVirtualInstancesClientListBySubscriptionResponse
- type SAPVirtualInstancesClientStartResponse
- type SAPVirtualInstancesClientStopResponse
- type SAPVirtualInstancesClientUpdateResponse
- type SSHConfiguration
- type SSHKeyPair
- type SSHPublicKey
- type SapVirtualInstanceProvisioningState
- type ServiceInitiatedSoftwareConfiguration
- type SharedStorageResourceNames
- type SingleServerConfiguration
- type SingleServerCustomResourceNames
- type SingleServerCustomResourceNamesClassification
- type SingleServerFullResourceNames
- type SingleServerRecommendationResult
- type SkipFileShareConfiguration
- type SoftwareConfiguration
- type SoftwareConfigurationClassification
- type StartRequest
- type StopRequest
- type StorageConfiguration
- type StorageInformation
- type SystemData
- type ThreeTierConfiguration
- type ThreeTierCustomResourceNames
- type ThreeTierCustomResourceNamesClassification
- type ThreeTierFullResourceNames
- type ThreeTierRecommendationResult
- type UpdateSAPApplicationInstanceRequest
- type UpdateSAPCentralInstanceRequest
- type UpdateSAPDatabaseInstanceRequest
- type UpdateSAPVirtualInstanceProperties
- type UpdateSAPVirtualInstanceRequest
- type UserAssignedIdentity
- type UserAssignedServiceIdentity
- type VirtualMachineConfiguration
- type VirtualMachineResourceNames
- type WindowsConfiguration
- type WorkloadsClient
- func (client *WorkloadsClient) SAPAvailabilityZoneDetails(ctx context.Context, location string, ...) (WorkloadsClientSAPAvailabilityZoneDetailsResponse, error)
- func (client *WorkloadsClient) SAPDiskConfigurations(ctx context.Context, location string, ...) (WorkloadsClientSAPDiskConfigurationsResponse, error)
- func (client *WorkloadsClient) SAPSizingRecommendations(ctx context.Context, location string, ...) (WorkloadsClientSAPSizingRecommendationsResponse, error)
- func (client *WorkloadsClient) SAPSupportedSKU(ctx context.Context, location string, ...) (WorkloadsClientSAPSupportedSKUResponse, error)
- type WorkloadsClientSAPAvailabilityZoneDetailsOptions
- type WorkloadsClientSAPAvailabilityZoneDetailsResponse
- type WorkloadsClientSAPDiskConfigurationsOptions
- type WorkloadsClientSAPDiskConfigurationsResponse
- type WorkloadsClientSAPSizingRecommendationsOptions
- type WorkloadsClientSAPSizingRecommendationsResponse
- type WorkloadsClientSAPSupportedSKUOptions
- type WorkloadsClientSAPSupportedSKUResponse
Examples ¶
- OperationsClient.NewListPager
- SAPApplicationServerInstancesClient.BeginCreate (CreateSapApplicationServerInstancesForHaSystemWithAvailabilitySet)
- SAPApplicationServerInstancesClient.BeginCreate (SapApplicationServerInstancesCreate)
- SAPApplicationServerInstancesClient.BeginDelete
- SAPApplicationServerInstancesClient.BeginStartInstance (StartTheSapApplicationServerInstance)
- SAPApplicationServerInstancesClient.BeginStartInstance (StartVirtualMachineAndTheSapApplicationServerInstanceOnIt)
- SAPApplicationServerInstancesClient.BeginStopInstance (StopTheSapApplicationServerInstance)
- SAPApplicationServerInstancesClient.BeginStopInstance (StopTheSapApplicationServerInstanceAndTheVirtualMachine)
- SAPApplicationServerInstancesClient.Get
- SAPApplicationServerInstancesClient.NewListPager
- SAPApplicationServerInstancesClient.Update
- SAPCentralInstancesClient.BeginCreate (CreateSapCentralInstancesForHaSystemWithAvailabilitySet)
- SAPCentralInstancesClient.BeginCreate (SapCentralInstancesCreate)
- SAPCentralInstancesClient.BeginDelete
- SAPCentralInstancesClient.BeginStartInstance (StartTheSapCentralServicesInstance)
- SAPCentralInstancesClient.BeginStartInstance (StartTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt)
- SAPCentralInstancesClient.BeginStopInstance (StopTheSapCentralServicesInstance)
- SAPCentralInstancesClient.BeginStopInstance (StopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS)
- SAPCentralInstancesClient.Get
- SAPCentralInstancesClient.NewListPager
- SAPCentralInstancesClient.Update
- SAPDatabaseInstancesClient.BeginCreate (CreateSapDatabaseInstancesForHaSystemWithAvailabilitySet)
- SAPDatabaseInstancesClient.BeginCreate (SapDatabaseInstancesCreate)
- SAPDatabaseInstancesClient.BeginDelete
- SAPDatabaseInstancesClient.BeginStartInstance (StartTheDatabaseInstanceOfTheSapSystem)
- SAPDatabaseInstancesClient.BeginStartInstance (StartVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt)
- SAPDatabaseInstancesClient.BeginStopInstance (StopTheDatabaseInstanceOfTheSapSystem)
- SAPDatabaseInstancesClient.BeginStopInstance (StopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS)
- SAPDatabaseInstancesClient.Get
- SAPDatabaseInstancesClient.NewListPager
- SAPDatabaseInstancesClient.Update
- 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 (CreateInfrastructureWithOsConfigurationWithAzureComputeGalleryImage)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForDistributedSystem)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForSingleServerSystem)
- SAPVirtualInstancesClient.BeginCreate (CreateInfrastructureWithOsConfigurationWithTrustedAccessEnabled)
- 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.BeginCreate (RegisterWithTrustedAccessEnabled)
- SAPVirtualInstancesClient.BeginDelete
- SAPVirtualInstancesClient.BeginStart (StartTheSapSystem)
- SAPVirtualInstancesClient.BeginStart (StartTheVirtualMachinesAndTheSapSystem)
- SAPVirtualInstancesClient.BeginStop (SapVirtualInstancesStop)
- SAPVirtualInstancesClient.BeginStop (StopTheVirtualMachineSAndTheSapSystemOnIt)
- SAPVirtualInstancesClient.BeginUpdate (SapVirtualInstancesTrustedAccessEnableUpdate)
- SAPVirtualInstancesClient.BeginUpdate (SapVirtualInstancesUpdate)
- SAPVirtualInstancesClient.Get (SapVirtualInstancesGet)
- SAPVirtualInstancesClient.Get (SapVirtualInstancesGetWithAcssInstallationBlocked)
- SAPVirtualInstancesClient.NewListByResourceGroupPager
- SAPVirtualInstancesClient.NewListBySubscriptionPager
- WorkloadsClient.SAPAvailabilityZoneDetails (SapAvailabilityZoneDetailsEastus)
- WorkloadsClient.SAPAvailabilityZoneDetails (SapAvailabilityZoneDetailsNortheurope)
- WorkloadsClient.SAPDiskConfigurations (SapDiskConfigurationsNonProd)
- WorkloadsClient.SAPDiskConfigurations (SapDiskConfigurationsProd)
- WorkloadsClient.SAPSizingRecommendations (SapSizingRecommendationsS4HanaDistributed)
- WorkloadsClient.SAPSizingRecommendations (SapSizingRecommendationsS4HanaDistributedHaAvSet)
- WorkloadsClient.SAPSizingRecommendations (SapSizingRecommendationsS4HanaDistributedHaAvZone)
- WorkloadsClient.SAPSizingRecommendations (SapSizingRecommendationsS4HanaSingleServer)
- WorkloadsClient.SAPSupportedSKU (SapSupportedSkusDistributed)
- WorkloadsClient.SAPSupportedSKU (SapSupportedSkusDistributedHaAvSet)
- WorkloadsClient.SAPSupportedSKU (SapSupportedSkusDistributedHaAvZone)
- WorkloadsClient.SAPSupportedSKU (SapSupportedSkusSingleServer)
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 ¶
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 ¶
func (a ApplicationServerConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationServerConfiguration.
func (*ApplicationServerConfiguration) UnmarshalJSON ¶
func (a *ApplicationServerConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationServerConfiguration.
type ApplicationServerFullResourceNames ¶
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 ¶
func (a ApplicationServerFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationServerFullResourceNames.
func (*ApplicationServerFullResourceNames) UnmarshalJSON ¶
func (a *ApplicationServerFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationServerFullResourceNames.
type ApplicationServerVMDetails ¶
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 ¶
func (a ApplicationServerVMDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApplicationServerVMDetails.
func (*ApplicationServerVMDetails) UnmarshalJSON ¶
func (a *ApplicationServerVMDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationServerVMDetails.
type ApplicationServerVirtualMachineType ¶
type ApplicationServerVirtualMachineType string
ApplicationServerVirtualMachineType - Defines the type of application server VM.
const ( ApplicationServerVirtualMachineTypeActive ApplicationServerVirtualMachineType = "Active" ApplicationServerVirtualMachineTypeStandby ApplicationServerVirtualMachineType = "Standby" ApplicationServerVirtualMachineTypeUnknown ApplicationServerVirtualMachineType = "Unknown" )
func PossibleApplicationServerVirtualMachineTypeValues ¶
func PossibleApplicationServerVirtualMachineTypeValues() []ApplicationServerVirtualMachineType
PossibleApplicationServerVirtualMachineTypeValues returns the possible values for the ApplicationServerVirtualMachineType const type.
type CentralServerConfiguration ¶
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 ¶
func (c CentralServerConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CentralServerConfiguration.
func (*CentralServerConfiguration) UnmarshalJSON ¶
func (c *CentralServerConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CentralServerConfiguration.
type CentralServerFullResourceNames ¶
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 ¶
func (c CentralServerFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CentralServerFullResourceNames.
func (*CentralServerFullResourceNames) UnmarshalJSON ¶
func (c *CentralServerFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CentralServerFullResourceNames.
type CentralServerVMDetails ¶
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 ¶
func (c CentralServerVMDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CentralServerVMDetails.
func (*CentralServerVMDetails) UnmarshalJSON ¶
func (c *CentralServerVMDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CentralServerVMDetails.
type CentralServerVirtualMachineType ¶
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 ¶
func PossibleCentralServerVirtualMachineTypeValues() []CentralServerVirtualMachineType
PossibleCentralServerVirtualMachineTypeValues returns the possible values for the CentralServerVirtualMachineType const type.
type ClientFactory ¶
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 ¶
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) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewSAPApplicationServerInstancesClient ¶
func (c *ClientFactory) NewSAPApplicationServerInstancesClient() *SAPApplicationServerInstancesClient
NewSAPApplicationServerInstancesClient creates a new instance of SAPApplicationServerInstancesClient.
func (*ClientFactory) NewSAPCentralInstancesClient ¶
func (c *ClientFactory) NewSAPCentralInstancesClient() *SAPCentralInstancesClient
NewSAPCentralInstancesClient creates a new instance of SAPCentralInstancesClient.
func (*ClientFactory) NewSAPDatabaseInstancesClient ¶
func (c *ClientFactory) NewSAPDatabaseInstancesClient() *SAPDatabaseInstancesClient
NewSAPDatabaseInstancesClient creates a new instance of SAPDatabaseInstancesClient.
func (*ClientFactory) NewSAPVirtualInstancesClient ¶
func (c *ClientFactory) NewSAPVirtualInstancesClient() *SAPVirtualInstancesClient
NewSAPVirtualInstancesClient creates a new instance of SAPVirtualInstancesClient.
func (*ClientFactory) NewWorkloadsClient ¶
func (c *ClientFactory) NewWorkloadsClient() *WorkloadsClient
NewWorkloadsClient creates a new instance of WorkloadsClient.
type ConfigurationType ¶
type ConfigurationType string
ConfigurationType - The type of file share config.
const ( ConfigurationTypeCreateAndMount ConfigurationType = "CreateAndMount" ConfigurationTypeMount ConfigurationType = "Mount" ConfigurationTypeSkip ConfigurationType = "Skip" )
func PossibleConfigurationTypeValues ¶
func PossibleConfigurationTypeValues() []ConfigurationType
PossibleConfigurationTypeValues returns the possible values for the ConfigurationType const type.
type CreateAndMountFileShareConfiguration ¶
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 be pre-created.
func (*CreateAndMountFileShareConfiguration) GetFileShareConfiguration ¶
func (c *CreateAndMountFileShareConfiguration) GetFileShareConfiguration() *FileShareConfiguration
GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type CreateAndMountFileShareConfiguration.
func (CreateAndMountFileShareConfiguration) MarshalJSON ¶
func (c CreateAndMountFileShareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateAndMountFileShareConfiguration.
func (*CreateAndMountFileShareConfiguration) UnmarshalJSON ¶
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 DatabaseConfiguration ¶
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 ¶
func (d DatabaseConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseConfiguration.
func (*DatabaseConfiguration) UnmarshalJSON ¶
func (d *DatabaseConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseConfiguration.
type DatabaseServerFullResourceNames ¶
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 ¶
func (d DatabaseServerFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseServerFullResourceNames.
func (*DatabaseServerFullResourceNames) UnmarshalJSON ¶
func (d *DatabaseServerFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseServerFullResourceNames.
type DatabaseVMDetails ¶
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 ¶
func (d DatabaseVMDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVMDetails.
func (*DatabaseVMDetails) UnmarshalJSON ¶
func (d *DatabaseVMDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVMDetails.
type DeployerVMPackages ¶
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 ¶
func (d DeployerVMPackages) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeployerVMPackages.
func (*DeployerVMPackages) UnmarshalJSON ¶
func (d *DeployerVMPackages) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeployerVMPackages.
type DeploymentConfiguration ¶
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 ¶
func (d *DeploymentConfiguration) GetSAPConfiguration() *SAPConfiguration
GetSAPConfiguration implements the SAPConfigurationClassification interface for type DeploymentConfiguration.
func (DeploymentConfiguration) MarshalJSON ¶
func (d DeploymentConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeploymentConfiguration.
func (*DeploymentConfiguration) UnmarshalJSON ¶
func (d *DeploymentConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentConfiguration.
type DeploymentWithOSConfiguration ¶
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 ¶
func (d *DeploymentWithOSConfiguration) GetSAPConfiguration() *SAPConfiguration
GetSAPConfiguration implements the SAPConfigurationClassification interface for type DeploymentWithOSConfiguration.
func (DeploymentWithOSConfiguration) MarshalJSON ¶
func (d DeploymentWithOSConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeploymentWithOSConfiguration.
func (*DeploymentWithOSConfiguration) UnmarshalJSON ¶
func (d *DeploymentWithOSConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentWithOSConfiguration.
type DiscoveryConfiguration ¶
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 ¶
func (d *DiscoveryConfiguration) GetSAPConfiguration() *SAPConfiguration
GetSAPConfiguration implements the SAPConfigurationClassification interface for type DiscoveryConfiguration.
func (DiscoveryConfiguration) MarshalJSON ¶
func (d DiscoveryConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiscoveryConfiguration.
func (*DiscoveryConfiguration) UnmarshalJSON ¶
func (d *DiscoveryConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiscoveryConfiguration.
type DiskConfiguration ¶
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 ¶
func (d DiskConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiskConfiguration.
func (*DiskConfiguration) UnmarshalJSON ¶
func (d *DiskConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiskConfiguration.
type DiskDetails ¶
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 ¶
func (d DiskDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiskDetails.
func (*DiskDetails) UnmarshalJSON ¶
func (d *DiskDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiskDetails.
type DiskSKU ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type DiskSKU.
func (*DiskSKU) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type DiskSKU.
type DiskSKUName ¶
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 ¶
func PossibleDiskSKUNameValues() []DiskSKUName
PossibleDiskSKUNameValues returns the possible values for the DiskSKUName const type.
type DiskVolumeConfiguration ¶
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 ¶
func (d DiskVolumeConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DiskVolumeConfiguration.
func (*DiskVolumeConfiguration) UnmarshalJSON ¶
func (d *DiskVolumeConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DiskVolumeConfiguration.
type EnqueueReplicationServerProperties ¶
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 ¶
func (e EnqueueReplicationServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnqueueReplicationServerProperties.
func (*EnqueueReplicationServerProperties) UnmarshalJSON ¶
func (e *EnqueueReplicationServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnqueueReplicationServerProperties.
type EnqueueReplicationServerType ¶
type EnqueueReplicationServerType string
EnqueueReplicationServerType - Defines the type of Enqueue Replication Server.
const ( EnqueueReplicationServerTypeEnqueueReplicator1 EnqueueReplicationServerType = "EnqueueReplicator1" EnqueueReplicationServerTypeEnqueueReplicator2 EnqueueReplicationServerType = "EnqueueReplicator2" )
func PossibleEnqueueReplicationServerTypeValues ¶
func PossibleEnqueueReplicationServerTypeValues() []EnqueueReplicationServerType
PossibleEnqueueReplicationServerTypeValues returns the possible values for the EnqueueReplicationServerType const type.
type EnqueueServerProperties ¶
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 ¶
func (e EnqueueServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EnqueueServerProperties.
func (*EnqueueServerProperties) UnmarshalJSON ¶
func (e *EnqueueServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EnqueueServerProperties.
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 ¶
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDefinition ¶
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 ¶
func (e ErrorDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.
func (*ErrorDefinition) UnmarshalJSON ¶
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 ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ExternalInstallationSoftwareConfiguration ¶
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 ¶
func (e *ExternalInstallationSoftwareConfiguration) GetSoftwareConfiguration() *SoftwareConfiguration
GetSoftwareConfiguration implements the SoftwareConfigurationClassification interface for type ExternalInstallationSoftwareConfiguration.
func (ExternalInstallationSoftwareConfiguration) MarshalJSON ¶
func (e ExternalInstallationSoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExternalInstallationSoftwareConfiguration.
func (*ExternalInstallationSoftwareConfiguration) UnmarshalJSON ¶
func (e *ExternalInstallationSoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExternalInstallationSoftwareConfiguration.
type FileShareConfiguration ¶
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 ¶
func (f *FileShareConfiguration) GetFileShareConfiguration() *FileShareConfiguration
GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type FileShareConfiguration.
func (FileShareConfiguration) MarshalJSON ¶
func (f FileShareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FileShareConfiguration.
func (*FileShareConfiguration) UnmarshalJSON ¶
func (f *FileShareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FileShareConfiguration.
type FileShareConfigurationClassification ¶
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 ¶
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 ¶
func (g GatewayServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GatewayServerProperties.
func (*GatewayServerProperties) UnmarshalJSON ¶
func (g *GatewayServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GatewayServerProperties.
type HighAvailabilityConfiguration ¶
type HighAvailabilityConfiguration struct { // REQUIRED; The high availability type. HighAvailabilityType *SAPHighAvailabilityType }
HighAvailabilityConfiguration - Gets or sets the high availability configuration.
func (HighAvailabilityConfiguration) MarshalJSON ¶
func (h HighAvailabilityConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HighAvailabilityConfiguration.
func (*HighAvailabilityConfiguration) UnmarshalJSON ¶
func (h *HighAvailabilityConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HighAvailabilityConfiguration.
type HighAvailabilitySoftwareConfiguration ¶
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 ¶
func (h HighAvailabilitySoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HighAvailabilitySoftwareConfiguration.
func (*HighAvailabilitySoftwareConfiguration) UnmarshalJSON ¶
func (h *HighAvailabilitySoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HighAvailabilitySoftwareConfiguration.
type ImageReference ¶
type ImageReference struct { // Specifies the ARM resource ID of the Azure Compute Gallery image version used for creating ACSS VMs. You will need to provide // this input when you choose to deploy virtual machines in ACSS with OS // image from the Azure Compute gallery. ID *string // 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 ¶
func (i ImageReference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageReference.
func (*ImageReference) UnmarshalJSON ¶
func (i *ImageReference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageReference.
type InfrastructureConfiguration ¶
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 ¶
func (i *InfrastructureConfiguration) GetInfrastructureConfiguration() *InfrastructureConfiguration
GetInfrastructureConfiguration implements the InfrastructureConfigurationClassification interface for type InfrastructureConfiguration.
func (InfrastructureConfiguration) MarshalJSON ¶
func (i InfrastructureConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InfrastructureConfiguration.
func (*InfrastructureConfiguration) UnmarshalJSON ¶
func (i *InfrastructureConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InfrastructureConfiguration.
type InfrastructureConfigurationClassification ¶
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 ¶
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 ¶
func (l *LinuxConfiguration) GetOSConfiguration() *OSConfiguration
GetOSConfiguration implements the OSConfigurationClassification interface for type LinuxConfiguration.
func (LinuxConfiguration) MarshalJSON ¶
func (l LinuxConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LinuxConfiguration.
func (*LinuxConfiguration) UnmarshalJSON ¶
func (l *LinuxConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LinuxConfiguration.
type LoadBalancerDetails ¶
type LoadBalancerDetails struct { // READ-ONLY ID *string }
LoadBalancerDetails - The Load Balancer details such as Load Balancer ID.
func (LoadBalancerDetails) MarshalJSON ¶
func (l LoadBalancerDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadBalancerDetails.
func (*LoadBalancerDetails) UnmarshalJSON ¶
func (l *LoadBalancerDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerDetails.
type LoadBalancerResourceNames ¶
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 ¶
func (l LoadBalancerResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LoadBalancerResourceNames.
func (*LoadBalancerResourceNames) UnmarshalJSON ¶
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 ¶
func (m ManagedRGConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedRGConfiguration.
func (*ManagedRGConfiguration) UnmarshalJSON ¶
func (m *ManagedRGConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedRGConfiguration.
type ManagedResourcesNetworkAccessType ¶
type ManagedResourcesNetworkAccessType string
ManagedResourcesNetworkAccessType - Defines the network access type for managed resources.
const ( ManagedResourcesNetworkAccessTypePrivate ManagedResourcesNetworkAccessType = "Private" ManagedResourcesNetworkAccessTypePublic ManagedResourcesNetworkAccessType = "Public" )
func PossibleManagedResourcesNetworkAccessTypeValues ¶
func PossibleManagedResourcesNetworkAccessTypeValues() []ManagedResourcesNetworkAccessType
PossibleManagedResourcesNetworkAccessTypeValues returns the possible values for the ManagedResourcesNetworkAccessType const type.
type ManagedServiceIdentityType ¶
type ManagedServiceIdentityType string
ManagedServiceIdentityType - Type of managed service identity (only None, UserAssigned types are allowed).
const ( ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" )
func PossibleManagedServiceIdentityTypeValues ¶
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType
PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.
type MessageServerProperties ¶
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 ¶
func (m MessageServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MessageServerProperties.
func (*MessageServerProperties) UnmarshalJSON ¶
func (m *MessageServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MessageServerProperties.
type MountFileShareConfiguration ¶
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 ¶
func (m *MountFileShareConfiguration) GetFileShareConfiguration() *FileShareConfiguration
GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type MountFileShareConfiguration.
func (MountFileShareConfiguration) MarshalJSON ¶
func (m MountFileShareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MountFileShareConfiguration.
func (*MountFileShareConfiguration) UnmarshalJSON ¶
func (m *MountFileShareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MountFileShareConfiguration.
type NamingPatternType ¶
type NamingPatternType string
NamingPatternType - The pattern type to be used for resource naming.
const (
NamingPatternTypeFullResourceName NamingPatternType = "FullResourceName"
)
func PossibleNamingPatternTypeValues ¶
func PossibleNamingPatternTypeValues() []NamingPatternType
PossibleNamingPatternTypeValues returns the possible values for the NamingPatternType const type.
type NetworkConfiguration ¶
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 ¶
func (n NetworkConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkConfiguration.
func (*NetworkConfiguration) UnmarshalJSON ¶
func (n *NetworkConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkConfiguration.
type NetworkInterfaceResourceNames ¶
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 ¶
func (n NetworkInterfaceResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceResourceNames.
func (*NetworkInterfaceResourceNames) UnmarshalJSON ¶
func (n *NetworkInterfaceResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceResourceNames.
type OSConfiguration ¶
type OSConfiguration struct { // REQUIRED; The OS Type OSType *OSType }
OSConfiguration - Defines the OS configuration.
func (*OSConfiguration) GetOSConfiguration ¶
func (o *OSConfiguration) GetOSConfiguration() *OSConfiguration
GetOSConfiguration implements the OSConfigurationClassification interface for type OSConfiguration.
func (OSConfiguration) MarshalJSON ¶
func (o OSConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OSConfiguration.
func (*OSConfiguration) UnmarshalJSON ¶
func (o *OSConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OSConfiguration.
type OSConfigurationClassification ¶
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 ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type OSProfile.
func (*OSProfile) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type OSProfile.
type OSType ¶
type OSType string
OSType - The OS Type
func PossibleOSTypeValues ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
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 ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
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 ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
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 ¶
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-10-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/operations/preview/2023-10-01-preview/examples/Operations_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.OperationListResult{ // Value: []*armworkloadssapvirtualinstance.Operation{ // { // Name: to.Ptr("Microsoft.Workloads/monitors/read"), // Display: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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/SapDiscoverySites/Write"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Set SapDiscoverySites"), // Operation: to.Ptr("Creates or updates the SapDiscoverySites"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("SapDiscoverySites"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/SapDiscoverySites/Delete"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Delete SapDiscoverySites"), // Operation: to.Ptr("Deletes the SapDiscoverySites"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("SapDiscoverySites"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/SapDiscoverySites/Read"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Read SapDiscoverySites"), // Operation: to.Ptr("Reads the SapDiscoverySites"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("SapDiscoverySites"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/SapDiscoverySites/SapInstances/Write"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Set SapInstances"), // Operation: to.Ptr("Creates or updates the SapInstances"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("SapInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/SapDiscoverySites/SapInstances/Delete"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Delete SapInstances"), // Operation: to.Ptr("Deletes the SapInstances"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("SapInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/SapDiscoverySites/SapInstances/Read"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Read SapInstances"), // Operation: to.Ptr("Reads the SapInstances"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("SapInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/SapDiscoverySites/SapInstances/serverInstances/Write"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Set serverInstances"), // Operation: to.Ptr("Creates or updates the serverInstances"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("serverInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/SapDiscoverySites/SapInstances/serverInstances/Delete"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Delete serverInstances"), // Operation: to.Ptr("Deletes the serverInstances"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("serverInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/SapDiscoverySites/SapInstances/serverInstances/Read"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Read serverInstances"), // Operation: to.Ptr("Reads the serverInstances"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("serverInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/Write"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Set connectors"), // Operation: to.Ptr("Creates or updates the connectors"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/Read"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Read connectors"), // Operation: to.Ptr("Reads the connectors"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("connectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/Write"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Set acssBackups"), // Operation: to.Ptr("Creates or updates the acssBackups"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("acssBackups"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/Read"), // Display: &armworkloadssapvirtualinstance.OperationDisplay{ // Description: to.Ptr("Read acssBackups"), // Operation: to.Ptr("Reads the acssBackups"), // Provider: to.Ptr("Microsoft.Workloads"), // Resource: to.Ptr("acssBackups"), // }, // 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 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 ¶
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 ¶
func (o OsSapConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OsSapConfiguration.
func (*OsSapConfiguration) UnmarshalJSON ¶
func (o *OsSapConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OsSapConfiguration.
type SAPApplicationServerInstance ¶
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 ¶
func (s SAPApplicationServerInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPApplicationServerInstance.
func (*SAPApplicationServerInstance) UnmarshalJSON ¶
func (s *SAPApplicationServerInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPApplicationServerInstance.
type SAPApplicationServerInstanceList ¶
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 ¶
func (s SAPApplicationServerInstanceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPApplicationServerInstanceList.
func (*SAPApplicationServerInstanceList) UnmarshalJSON ¶
func (s *SAPApplicationServerInstanceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPApplicationServerInstanceList.
type SAPApplicationServerInstancesClient ¶
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 ¶
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 ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPApplicationServerInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPApplicationServerProperties{ // DispatcherStatus: to.Ptr("Running"), // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // 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: &armworkloadssapvirtualinstance.LoadBalancerDetails{ // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/loadBalancers/cs-loadBalancer"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.ApplicationServerVirtualMachineTypeActive), // StorageDetails: []*armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.ApplicationServerVirtualMachineTypeStandby), // StorageDetails: []*armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPApplicationServerInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPApplicationServerProperties{ // DispatcherStatus: to.Ptr("Running"), // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // 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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.ApplicationServerVirtualMachineTypeActive), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/app01-vm"), // }}, // }, // } }
Output:
func (*SAPApplicationServerInstancesClient) BeginDelete ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SAPApplicationServerInstancesClient) BeginStartInstance ¶
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-10-01-preview
- 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 (StartTheSapApplicationServerInstance) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStartInstanceOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloadssapvirtualinstance.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:
Example (StartVirtualMachineAndTheSapApplicationServerInstanceOnIt) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StartInstance_WithInfraOperations.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStartInstanceOptions{Body: &armworkloadssapvirtualinstance.StartRequest{ StartVM: to.Ptr(true), }, }) 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 = armworkloadssapvirtualinstance.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 ¶
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-10-01-preview
- 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 (StopTheSapApplicationServerInstance) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStopInstanceOptions{Body: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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:
Example (StopTheSapApplicationServerInstanceAndTheVirtualMachine) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StopInstance_WithInfraOperations.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStopInstanceOptions{Body: &armworkloadssapvirtualinstance.StopRequest{ DeallocateVM: to.Ptr(true), 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 = armworkloadssapvirtualinstance.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) Get ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPApplicationServerProperties{ // DispatcherStatus: to.Ptr("Running"), // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // 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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.ApplicationServerVirtualMachineTypeActive), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/app01-vm"), // }}, // }, // } }
Output:
func (*SAPApplicationServerInstancesClient) NewListPager ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.SAPApplicationServerInstanceList{ // Value: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPApplicationServerProperties{ // DispatcherStatus: to.Ptr("Running"), // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // 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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPApplicationServerProperties{ // DispatcherStatus: to.Ptr("Running"), // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // 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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.ApplicationServerVirtualMachineTypeActive), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/app01-vm"), // }}, // }, // }}, // } } }
Output:
func (*SAPApplicationServerInstancesClient) Update ¶
func (client *SAPApplicationServerInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body UpdateSAPApplicationInstanceRequest, options *SAPApplicationServerInstancesClientUpdateOptions) (SAPApplicationServerInstancesClientUpdateResponse, error)
Update - Updates the SAP Application server 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-10-01-preview
- 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 - SAPApplicationServerInstancesClientUpdateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSAPApplicationServerInstancesClient().Update(ctx, "test-rg", "X00", "app01", armworkloadssapvirtualinstance.UpdateSAPApplicationInstanceRequest{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), }, }, 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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPApplicationServerProperties{ // DispatcherStatus: to.Ptr("Running"), // GatewayPort: to.Ptr[int64](3300), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // 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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.ApplicationServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.ApplicationServerVirtualMachineTypeActive), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/app01-vm"), // }}, // }, // } }
Output:
type SAPApplicationServerInstancesClientBeginCreateOptions ¶
type SAPApplicationServerInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPApplicationServerInstancesClientBeginCreateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginCreate method.
type SAPApplicationServerInstancesClientBeginDeleteOptions ¶
type SAPApplicationServerInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPApplicationServerInstancesClientBeginDeleteOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginDelete method.
type SAPApplicationServerInstancesClientBeginStartInstanceOptions ¶
type SAPApplicationServerInstancesClientBeginStartInstanceOptions struct { // SAP Application server instance start request body. Body *StartRequest // Resumes the LRO from the provided token. ResumeToken string }
SAPApplicationServerInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStartInstance method.
type SAPApplicationServerInstancesClientBeginStopInstanceOptions ¶
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 SAPApplicationServerInstancesClientCreateResponse ¶
type SAPApplicationServerInstancesClientCreateResponse struct { // Define the SAP Application Server Instance resource. SAPApplicationServerInstance }
SAPApplicationServerInstancesClientCreateResponse contains the response from method SAPApplicationServerInstancesClient.BeginCreate.
type SAPApplicationServerInstancesClientDeleteResponse ¶
type SAPApplicationServerInstancesClientDeleteResponse struct { }
SAPApplicationServerInstancesClientDeleteResponse contains the response from method SAPApplicationServerInstancesClient.BeginDelete.
type SAPApplicationServerInstancesClientGetOptions ¶
type SAPApplicationServerInstancesClientGetOptions struct { }
SAPApplicationServerInstancesClientGetOptions contains the optional parameters for the SAPApplicationServerInstancesClient.Get method.
type SAPApplicationServerInstancesClientGetResponse ¶
type SAPApplicationServerInstancesClientGetResponse struct { // Define the SAP Application Server Instance resource. SAPApplicationServerInstance }
SAPApplicationServerInstancesClientGetResponse contains the response from method SAPApplicationServerInstancesClient.Get.
type SAPApplicationServerInstancesClientListOptions ¶
type SAPApplicationServerInstancesClientListOptions struct { }
SAPApplicationServerInstancesClientListOptions contains the optional parameters for the SAPApplicationServerInstancesClient.NewListPager method.
type SAPApplicationServerInstancesClientListResponse ¶
type SAPApplicationServerInstancesClientListResponse struct { // Defines the collection of SAP Application Server Instance resources. SAPApplicationServerInstanceList }
SAPApplicationServerInstancesClientListResponse contains the response from method SAPApplicationServerInstancesClient.NewListPager.
type SAPApplicationServerInstancesClientStartInstanceResponse ¶
type SAPApplicationServerInstancesClientStartInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPApplicationServerInstancesClientStartInstanceResponse contains the response from method SAPApplicationServerInstancesClient.BeginStartInstance.
type SAPApplicationServerInstancesClientStopInstanceResponse ¶
type SAPApplicationServerInstancesClientStopInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPApplicationServerInstancesClientStopInstanceResponse contains the response from method SAPApplicationServerInstancesClient.BeginStopInstance.
type SAPApplicationServerInstancesClientUpdateOptions ¶
type SAPApplicationServerInstancesClientUpdateOptions struct { }
SAPApplicationServerInstancesClientUpdateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.Update method.
type SAPApplicationServerInstancesClientUpdateResponse ¶
type SAPApplicationServerInstancesClientUpdateResponse struct { // Define the SAP Application Server Instance resource. SAPApplicationServerInstance }
SAPApplicationServerInstancesClientUpdateResponse contains the response from method SAPApplicationServerInstancesClient.Update.
type SAPApplicationServerProperties ¶
type SAPApplicationServerProperties struct { // READ-ONLY; Application server instance dispatcher status. DispatcherStatus *string // 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 ¶
func (s SAPApplicationServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPApplicationServerProperties.
func (*SAPApplicationServerProperties) UnmarshalJSON ¶
func (s *SAPApplicationServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPApplicationServerProperties.
type SAPAvailabilityZoneDetailsRequest ¶
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 ¶
func (s SAPAvailabilityZoneDetailsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPAvailabilityZoneDetailsRequest.
func (*SAPAvailabilityZoneDetailsRequest) UnmarshalJSON ¶
func (s *SAPAvailabilityZoneDetailsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPAvailabilityZoneDetailsRequest.
type SAPAvailabilityZoneDetailsResult ¶
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 ¶
func (s SAPAvailabilityZoneDetailsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPAvailabilityZoneDetailsResult.
func (*SAPAvailabilityZoneDetailsResult) UnmarshalJSON ¶
func (s *SAPAvailabilityZoneDetailsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPAvailabilityZoneDetailsResult.
type SAPAvailabilityZonePair ¶
SAPAvailabilityZonePair - The SAP Availability Zone Pair.
func (SAPAvailabilityZonePair) MarshalJSON ¶
func (s SAPAvailabilityZonePair) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPAvailabilityZonePair.
func (*SAPAvailabilityZonePair) UnmarshalJSON ¶
func (s *SAPAvailabilityZonePair) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPAvailabilityZonePair.
type SAPCentralInstanceList ¶
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 ¶
func (s SAPCentralInstanceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPCentralInstanceList.
func (*SAPCentralInstanceList) UnmarshalJSON ¶
func (s *SAPCentralInstanceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPCentralInstanceList.
type SAPCentralInstancesClient ¶
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 ¶
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 ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPCentralServerInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloadssapvirtualinstance.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloadssapvirtualinstance.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.EnqueueServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloadssapvirtualinstance.GatewayServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // LoadBalancerDetails: &armworkloadssapvirtualinstance.LoadBalancerDetails{ // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/loadBalancers/cs-ASCS-loadBalancer"), // }, // MessageServerProperties: &armworkloadssapvirtualinstance.MessageServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.CentralServerVirtualMachineTypePrimary), // StorageDetails: []*armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CentralServerVirtualMachineTypePrimary), // StorageDetails: []*armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPCentralServerInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloadssapvirtualinstance.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloadssapvirtualinstance.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.EnqueueServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloadssapvirtualinstance.GatewayServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // MessageServerProperties: &armworkloadssapvirtualinstance.MessageServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.CentralServerVirtualMachineTypePrimary), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm"), // }}, // }, // } }
Output:
func (*SAPCentralInstancesClient) BeginDelete ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SAPCentralInstancesClient) BeginStartInstance ¶
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-10-01-preview
- 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 (StartTheSapCentralServicesInstance) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStartInstanceOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloadssapvirtualinstance.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:
Example (StartTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StartInstance_WithInfraOperations.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStartInstanceOptions{Body: &armworkloadssapvirtualinstance.StartRequest{ StartVM: to.Ptr(true), }, }) 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 = armworkloadssapvirtualinstance.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 ¶
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-10-01-preview
- 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 (StopTheSapCentralServicesInstance) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStopInstanceOptions{Body: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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:
Example (StopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StopInstance_WithInfraOperations.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStopInstanceOptions{Body: &armworkloadssapvirtualinstance.StopRequest{ DeallocateVM: to.Ptr(true), }, }) 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 = armworkloadssapvirtualinstance.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) Get ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloadssapvirtualinstance.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloadssapvirtualinstance.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.EnqueueServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloadssapvirtualinstance.GatewayServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateDegraded), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // MessageServerProperties: &armworkloadssapvirtualinstance.MessageServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.CentralServerVirtualMachineTypePrimary), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm"), // }}, // }, // } }
Output:
func (*SAPCentralInstancesClient) NewListPager ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.SAPCentralInstanceList{ // Value: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloadssapvirtualinstance.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloadssapvirtualinstance.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.EnqueueServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloadssapvirtualinstance.GatewayServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // MessageServerProperties: &armworkloadssapvirtualinstance.MessageServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.CentralServerVirtualMachineTypePrimary), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm"), // }}, // }, // }}, // } } }
Output:
func (*SAPCentralInstancesClient) Update ¶
func (client *SAPCentralInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body UpdateSAPCentralInstanceRequest, options *SAPCentralInstancesClientUpdateOptions) (SAPCentralInstancesClientUpdateResponse, error)
Update - 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-10-01-preview
- 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 - SAPCentralInstancesClientUpdateOptions contains the optional parameters for the SAPCentralInstancesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSAPCentralInstancesClient().Update(ctx, "test-rg", "X00", "centralServer", armworkloadssapvirtualinstance.UpdateSAPCentralInstanceRequest{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), }, }, 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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPCentralServerProperties{ // EnqueueReplicationServerProperties: &armworkloadssapvirtualinstance.EnqueueReplicationServerProperties{ // ErsVersion: to.Ptr(armworkloadssapvirtualinstance.EnqueueReplicationServerTypeEnqueueReplicator1), // Health: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.EnqueueServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // Hostname: to.Ptr("vh-ascs1"), // IPAddress: to.Ptr("10.0.0.5"), // Port: to.Ptr[int64](3600), // }, // GatewayServerProperties: &armworkloadssapvirtualinstance.GatewayServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // Port: to.Ptr[int64](3300), // }, // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // InstanceNo: to.Ptr("00"), // KernelPatch: to.Ptr("patch 300"), // KernelVersion: to.Ptr("777"), // MessageServerProperties: &armworkloadssapvirtualinstance.MessageServerProperties{ // Health: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/SAP-E2ETest-rg/providers/Microsoft.Network/virtualNetworks/loop-test-vnet/subnets/loopsubnet"), // VMDetails: []*armworkloadssapvirtualinstance.CentralServerVMDetails{ // { // Type: to.Ptr(armworkloadssapvirtualinstance.CentralServerVirtualMachineTypePrimary), // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/cs-vm"), // }}, // }, // } }
Output:
type SAPCentralInstancesClientBeginCreateOptions ¶
type SAPCentralInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPCentralInstancesClientBeginCreateOptions contains the optional parameters for the SAPCentralInstancesClient.BeginCreate method.
type SAPCentralInstancesClientBeginDeleteOptions ¶
type SAPCentralInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPCentralInstancesClientBeginDeleteOptions contains the optional parameters for the SAPCentralInstancesClient.BeginDelete method.
type SAPCentralInstancesClientBeginStartInstanceOptions ¶
type SAPCentralInstancesClientBeginStartInstanceOptions struct { // SAP Central Services instance start request body. Body *StartRequest // Resumes the LRO from the provided token. ResumeToken string }
SAPCentralInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPCentralInstancesClient.BeginStartInstance method.
type SAPCentralInstancesClientBeginStopInstanceOptions ¶
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 SAPCentralInstancesClientCreateResponse ¶
type SAPCentralInstancesClientCreateResponse struct { // Define the SAP Central Services Instance resource. SAPCentralServerInstance }
SAPCentralInstancesClientCreateResponse contains the response from method SAPCentralInstancesClient.BeginCreate.
type SAPCentralInstancesClientDeleteResponse ¶
type SAPCentralInstancesClientDeleteResponse struct { }
SAPCentralInstancesClientDeleteResponse contains the response from method SAPCentralInstancesClient.BeginDelete.
type SAPCentralInstancesClientGetOptions ¶
type SAPCentralInstancesClientGetOptions struct { }
SAPCentralInstancesClientGetOptions contains the optional parameters for the SAPCentralInstancesClient.Get method.
type SAPCentralInstancesClientGetResponse ¶
type SAPCentralInstancesClientGetResponse struct { // Define the SAP Central Services Instance resource. SAPCentralServerInstance }
SAPCentralInstancesClientGetResponse contains the response from method SAPCentralInstancesClient.Get.
type SAPCentralInstancesClientListOptions ¶
type SAPCentralInstancesClientListOptions struct { }
SAPCentralInstancesClientListOptions contains the optional parameters for the SAPCentralInstancesClient.NewListPager method.
type SAPCentralInstancesClientListResponse ¶
type SAPCentralInstancesClientListResponse struct { // Defines the collection of SAP Central Services Instance resources. SAPCentralInstanceList }
SAPCentralInstancesClientListResponse contains the response from method SAPCentralInstancesClient.NewListPager.
type SAPCentralInstancesClientStartInstanceResponse ¶
type SAPCentralInstancesClientStartInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPCentralInstancesClientStartInstanceResponse contains the response from method SAPCentralInstancesClient.BeginStartInstance.
type SAPCentralInstancesClientStopInstanceResponse ¶
type SAPCentralInstancesClientStopInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPCentralInstancesClientStopInstanceResponse contains the response from method SAPCentralInstancesClient.BeginStopInstance.
type SAPCentralInstancesClientUpdateOptions ¶
type SAPCentralInstancesClientUpdateOptions struct { }
SAPCentralInstancesClientUpdateOptions contains the optional parameters for the SAPCentralInstancesClient.Update method.
type SAPCentralInstancesClientUpdateResponse ¶
type SAPCentralInstancesClientUpdateResponse struct { // Define the SAP Central Services Instance resource. SAPCentralServerInstance }
SAPCentralInstancesClientUpdateResponse contains the response from method SAPCentralInstancesClient.Update.
type SAPCentralServerInstance ¶
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 ¶
func (s SAPCentralServerInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPCentralServerInstance.
func (*SAPCentralServerInstance) UnmarshalJSON ¶
func (s *SAPCentralServerInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPCentralServerInstance.
type SAPCentralServerProperties ¶
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 ¶
func (s SAPCentralServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPCentralServerProperties.
func (*SAPCentralServerProperties) UnmarshalJSON ¶
func (s *SAPCentralServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPCentralServerProperties.
type SAPConfiguration ¶
type SAPConfiguration struct { // REQUIRED; The configuration Type. ConfigurationType *SAPConfigurationType }
SAPConfiguration - The SAP Configuration.
func (*SAPConfiguration) GetSAPConfiguration ¶
func (s *SAPConfiguration) GetSAPConfiguration() *SAPConfiguration
GetSAPConfiguration implements the SAPConfigurationClassification interface for type SAPConfiguration.
func (SAPConfiguration) MarshalJSON ¶
func (s SAPConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPConfiguration.
func (*SAPConfiguration) UnmarshalJSON ¶
func (s *SAPConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPConfiguration.
type SAPConfigurationClassification ¶
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 ¶
type SAPConfigurationType string
SAPConfigurationType - The configuration Type.
const ( SAPConfigurationTypeDeployment SAPConfigurationType = "Deployment" SAPConfigurationTypeDeploymentWithOSConfig SAPConfigurationType = "DeploymentWithOSConfig" SAPConfigurationTypeDiscovery SAPConfigurationType = "Discovery" )
func PossibleSAPConfigurationTypeValues ¶
func PossibleSAPConfigurationTypeValues() []SAPConfigurationType
PossibleSAPConfigurationTypeValues returns the possible values for the SAPConfigurationType const type.
type SAPDatabaseInstance ¶
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 ¶
func (s SAPDatabaseInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDatabaseInstance.
func (*SAPDatabaseInstance) UnmarshalJSON ¶
func (s *SAPDatabaseInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDatabaseInstance.
type SAPDatabaseInstanceList ¶
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 ¶
func (s SAPDatabaseInstanceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDatabaseInstanceList.
func (*SAPDatabaseInstanceList) UnmarshalJSON ¶
func (s *SAPDatabaseInstanceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDatabaseInstanceList.
type SAPDatabaseInstancesClient ¶
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 ¶
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 ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPDatabaseInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // LoadBalancerDetails: &armworkloadssapvirtualinstance.LoadBalancerDetails{ // ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/loadBalancers/db-loadBalancer"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloadssapvirtualinstance.DatabaseVMDetails{ // { // StorageDetails: []*armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPDatabaseInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloadssapvirtualinstance.DatabaseVMDetails{ // { // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/db-vm"), // }}, // }, // } }
Output:
func (*SAPDatabaseInstancesClient) BeginDelete ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SAPDatabaseInstancesClient) BeginStartInstance ¶
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-10-01-preview
- 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 (StartTheDatabaseInstanceOfTheSapSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStartInstanceOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloadssapvirtualinstance.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:
Example (StartVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StartInstance_WithInfraOperations.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStartInstanceOptions{Body: &armworkloadssapvirtualinstance.StartRequest{ StartVM: to.Ptr(true), }, }) 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 = armworkloadssapvirtualinstance.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 ¶
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-10-01-preview
- 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 (StopTheDatabaseInstanceOfTheSapSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStopInstanceOptions{Body: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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:
Example (StopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StopInstance_WithInfraOperations.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStopInstanceOptions{Body: &armworkloadssapvirtualinstance.StopRequest{ DeallocateVM: to.Ptr(true), 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 = armworkloadssapvirtualinstance.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) Get ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloadssapvirtualinstance.DatabaseVMDetails{ // { // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/db-vm"), // }}, // }, // } }
Output:
func (*SAPDatabaseInstancesClient) NewListPager ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.SAPDatabaseInstanceList{ // Value: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloadssapvirtualinstance.DatabaseVMDetails{ // { // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/db-vm"), // }}, // }, // }}, // } } }
Output:
func (*SAPDatabaseInstancesClient) Update ¶
func (client *SAPDatabaseInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body UpdateSAPDatabaseInstanceRequest, options *SAPDatabaseInstancesClientUpdateOptions) (SAPDatabaseInstancesClientUpdateResponse, error)
Update - Updates the Database 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-10-01-preview
- 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 - SAPDatabaseInstancesClientUpdateOptions contains the optional parameters for the SAPDatabaseInstancesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSAPDatabaseInstancesClient().Update(ctx, "test-rg", "X00", "databaseServer", armworkloadssapvirtualinstance.UpdateSAPDatabaseInstanceRequest{ Tags: map[string]*string{ "key1": to.Ptr("value1"), }, }, 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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPDatabaseProperties{ // DatabaseSid: to.Ptr("X00"), // DatabaseType: to.Ptr("hdb"), // IPAddress: to.Ptr("10.0.0.5"), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // Subnet: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VMDetails: []*armworkloadssapvirtualinstance.DatabaseVMDetails{ // { // VirtualMachineID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/db-vm"), // }}, // }, // } }
Output:
type SAPDatabaseInstancesClientBeginCreateOptions ¶
type SAPDatabaseInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPDatabaseInstancesClientBeginCreateOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginCreate method.
type SAPDatabaseInstancesClientBeginDeleteOptions ¶
type SAPDatabaseInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPDatabaseInstancesClientBeginDeleteOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginDelete method.
type SAPDatabaseInstancesClientBeginStartInstanceOptions ¶
type SAPDatabaseInstancesClientBeginStartInstanceOptions struct { // SAP Database server instance start request body. Body *StartRequest // Resumes the LRO from the provided token. ResumeToken string }
SAPDatabaseInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStartInstance method.
type SAPDatabaseInstancesClientBeginStopInstanceOptions ¶
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 SAPDatabaseInstancesClientCreateResponse ¶
type SAPDatabaseInstancesClientCreateResponse struct { // Define the Database resource. SAPDatabaseInstance }
SAPDatabaseInstancesClientCreateResponse contains the response from method SAPDatabaseInstancesClient.BeginCreate.
type SAPDatabaseInstancesClientDeleteResponse ¶
type SAPDatabaseInstancesClientDeleteResponse struct { }
SAPDatabaseInstancesClientDeleteResponse contains the response from method SAPDatabaseInstancesClient.BeginDelete.
type SAPDatabaseInstancesClientGetOptions ¶
type SAPDatabaseInstancesClientGetOptions struct { }
SAPDatabaseInstancesClientGetOptions contains the optional parameters for the SAPDatabaseInstancesClient.Get method.
type SAPDatabaseInstancesClientGetResponse ¶
type SAPDatabaseInstancesClientGetResponse struct { // Define the Database resource. SAPDatabaseInstance }
SAPDatabaseInstancesClientGetResponse contains the response from method SAPDatabaseInstancesClient.Get.
type SAPDatabaseInstancesClientListOptions ¶
type SAPDatabaseInstancesClientListOptions struct { }
SAPDatabaseInstancesClientListOptions contains the optional parameters for the SAPDatabaseInstancesClient.NewListPager method.
type SAPDatabaseInstancesClientListResponse ¶
type SAPDatabaseInstancesClientListResponse struct { // Defines the collection of SAP Database Instances. SAPDatabaseInstanceList }
SAPDatabaseInstancesClientListResponse contains the response from method SAPDatabaseInstancesClient.NewListPager.
type SAPDatabaseInstancesClientStartInstanceResponse ¶
type SAPDatabaseInstancesClientStartInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPDatabaseInstancesClientStartInstanceResponse contains the response from method SAPDatabaseInstancesClient.BeginStartInstance.
type SAPDatabaseInstancesClientStopInstanceResponse ¶
type SAPDatabaseInstancesClientStopInstanceResponse struct { // The current status of an async operation. OperationStatusResult }
SAPDatabaseInstancesClientStopInstanceResponse contains the response from method SAPDatabaseInstancesClient.BeginStopInstance.
type SAPDatabaseInstancesClientUpdateOptions ¶
type SAPDatabaseInstancesClientUpdateOptions struct { }
SAPDatabaseInstancesClientUpdateOptions contains the optional parameters for the SAPDatabaseInstancesClient.Update method.
type SAPDatabaseInstancesClientUpdateResponse ¶
type SAPDatabaseInstancesClientUpdateResponse struct { // Define the Database resource. SAPDatabaseInstance }
SAPDatabaseInstancesClientUpdateResponse contains the response from method SAPDatabaseInstancesClient.Update.
type SAPDatabaseProperties ¶
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 ¶
func (s SAPDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDatabaseProperties.
func (*SAPDatabaseProperties) UnmarshalJSON ¶
func (s *SAPDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDatabaseProperties.
type SAPDatabaseScaleMethod ¶
type SAPDatabaseScaleMethod string
SAPDatabaseScaleMethod - The database scale method.
const (
SAPDatabaseScaleMethodScaleUp SAPDatabaseScaleMethod = "ScaleUp"
)
func PossibleSAPDatabaseScaleMethodValues ¶
func PossibleSAPDatabaseScaleMethodValues() []SAPDatabaseScaleMethod
PossibleSAPDatabaseScaleMethodValues returns the possible values for the SAPDatabaseScaleMethod const type.
type SAPDatabaseType ¶
type SAPDatabaseType string
SAPDatabaseType - Defines the supported SAP Database types.
const ( SAPDatabaseTypeDB2 SAPDatabaseType = "DB2" SAPDatabaseTypeHANA SAPDatabaseType = "HANA" )
func PossibleSAPDatabaseTypeValues ¶
func PossibleSAPDatabaseTypeValues() []SAPDatabaseType
PossibleSAPDatabaseTypeValues returns the possible values for the SAPDatabaseType const type.
type SAPDeploymentType ¶
type SAPDeploymentType string
SAPDeploymentType - The type of SAP deployment, single server or Three tier.
const ( SAPDeploymentTypeSingleServer SAPDeploymentType = "SingleServer" SAPDeploymentTypeThreeTier SAPDeploymentType = "ThreeTier" )
func PossibleSAPDeploymentTypeValues ¶
func PossibleSAPDeploymentTypeValues() []SAPDeploymentType
PossibleSAPDeploymentTypeValues returns the possible values for the SAPDeploymentType const type.
type SAPDiskConfiguration ¶
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 ¶
func (s SAPDiskConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDiskConfiguration.
func (*SAPDiskConfiguration) UnmarshalJSON ¶
func (s *SAPDiskConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDiskConfiguration.
type SAPDiskConfigurationsRequest ¶
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 ¶
func (s SAPDiskConfigurationsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDiskConfigurationsRequest.
func (*SAPDiskConfigurationsRequest) UnmarshalJSON ¶
func (s *SAPDiskConfigurationsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDiskConfigurationsRequest.
type SAPDiskConfigurationsResult ¶
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 ¶
func (s SAPDiskConfigurationsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPDiskConfigurationsResult.
func (*SAPDiskConfigurationsResult) UnmarshalJSON ¶
func (s *SAPDiskConfigurationsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPDiskConfigurationsResult.
type SAPEnvironmentType ¶
type SAPEnvironmentType string
SAPEnvironmentType - Defines the environment type - Production/Non Production.
const ( SAPEnvironmentTypeNonProd SAPEnvironmentType = "NonProd" SAPEnvironmentTypeProd SAPEnvironmentType = "Prod" )
func PossibleSAPEnvironmentTypeValues ¶
func PossibleSAPEnvironmentTypeValues() []SAPEnvironmentType
PossibleSAPEnvironmentTypeValues returns the possible values for the SAPEnvironmentType const type.
type SAPHealthState ¶
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 ¶
func PossibleSAPHealthStateValues() []SAPHealthState
PossibleSAPHealthStateValues returns the possible values for the SAPHealthState const type.
type SAPHighAvailabilityType ¶
type SAPHighAvailabilityType string
SAPHighAvailabilityType - The high availability type (AvailabilitySet or AvailabilityZone).
const ( SAPHighAvailabilityTypeAvailabilitySet SAPHighAvailabilityType = "AvailabilitySet" SAPHighAvailabilityTypeAvailabilityZone SAPHighAvailabilityType = "AvailabilityZone" )
func PossibleSAPHighAvailabilityTypeValues ¶
func PossibleSAPHighAvailabilityTypeValues() []SAPHighAvailabilityType
PossibleSAPHighAvailabilityTypeValues returns the possible values for the SAPHighAvailabilityType const type.
type SAPInstallWithoutOSConfigSoftwareConfiguration ¶
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 ¶
func (s *SAPInstallWithoutOSConfigSoftwareConfiguration) GetSoftwareConfiguration() *SoftwareConfiguration
GetSoftwareConfiguration implements the SoftwareConfigurationClassification interface for type SAPInstallWithoutOSConfigSoftwareConfiguration.
func (SAPInstallWithoutOSConfigSoftwareConfiguration) MarshalJSON ¶
func (s SAPInstallWithoutOSConfigSoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPInstallWithoutOSConfigSoftwareConfiguration.
func (*SAPInstallWithoutOSConfigSoftwareConfiguration) UnmarshalJSON ¶
func (s *SAPInstallWithoutOSConfigSoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPInstallWithoutOSConfigSoftwareConfiguration.
type SAPProductType ¶
type SAPProductType string
SAPProductType - Defines the SAP Product type.
const ( SAPProductTypeECC SAPProductType = "ECC" SAPProductTypeOther SAPProductType = "Other" SAPProductTypeS4HANA SAPProductType = "S4HANA" )
func PossibleSAPProductTypeValues ¶
func PossibleSAPProductTypeValues() []SAPProductType
PossibleSAPProductTypeValues returns the possible values for the SAPProductType const type.
type SAPSizingRecommendationRequest ¶
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 ¶
func (s SAPSizingRecommendationRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSizingRecommendationRequest.
func (*SAPSizingRecommendationRequest) UnmarshalJSON ¶
func (s *SAPSizingRecommendationRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSizingRecommendationRequest.
type SAPSizingRecommendationResult ¶
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 ¶
func (s *SAPSizingRecommendationResult) GetSAPSizingRecommendationResult() *SAPSizingRecommendationResult
GetSAPSizingRecommendationResult implements the SAPSizingRecommendationResultClassification interface for type SAPSizingRecommendationResult.
func (SAPSizingRecommendationResult) MarshalJSON ¶
func (s SAPSizingRecommendationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSizingRecommendationResult.
func (*SAPSizingRecommendationResult) UnmarshalJSON ¶
func (s *SAPSizingRecommendationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSizingRecommendationResult.
type SAPSizingRecommendationResultClassification ¶
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 ¶
type SAPSoftwareInstallationType string
SAPSoftwareInstallationType - The SAP software installation Type.
const ( SAPSoftwareInstallationTypeExternal SAPSoftwareInstallationType = "External" SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig SAPSoftwareInstallationType = "SAPInstallWithoutOSConfig" SAPSoftwareInstallationTypeServiceInitiated SAPSoftwareInstallationType = "ServiceInitiated" )
func PossibleSAPSoftwareInstallationTypeValues ¶
func PossibleSAPSoftwareInstallationTypeValues() []SAPSoftwareInstallationType
PossibleSAPSoftwareInstallationTypeValues returns the possible values for the SAPSoftwareInstallationType const type.
type SAPSupportedResourceSKUsResult ¶
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 ¶
func (s SAPSupportedResourceSKUsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSupportedResourceSKUsResult.
func (*SAPSupportedResourceSKUsResult) UnmarshalJSON ¶
func (s *SAPSupportedResourceSKUsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSupportedResourceSKUsResult.
type SAPSupportedSKU ¶
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 ¶
func (s SAPSupportedSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSupportedSKU.
func (*SAPSupportedSKU) UnmarshalJSON ¶
func (s *SAPSupportedSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSupportedSKU.
type SAPSupportedSKUsRequest ¶
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 ¶
func (s SAPSupportedSKUsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPSupportedSKUsRequest.
func (*SAPSupportedSKUsRequest) UnmarshalJSON ¶
func (s *SAPSupportedSKUsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPSupportedSKUsRequest.
type SAPVirtualInstance ¶
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 // Managed service identity (user assigned identities) 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 ¶
func (s SAPVirtualInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstance.
func (*SAPVirtualInstance) UnmarshalJSON ¶
func (s *SAPVirtualInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstance.
type SAPVirtualInstanceError ¶
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 ¶
func (s SAPVirtualInstanceError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstanceError.
func (*SAPVirtualInstanceError) UnmarshalJSON ¶
func (s *SAPVirtualInstanceError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstanceError.
type SAPVirtualInstanceList ¶
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 ¶
func (s SAPVirtualInstanceList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstanceList.
func (*SAPVirtualInstanceList) UnmarshalJSON ¶
func (s *SAPVirtualInstanceList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstanceList.
type SAPVirtualInstanceProperties ¶
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 // Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options // to choose from are Public and Private. If 'Private' is chosen, the Storage // Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity // between VM extensions and the managed resource group storage account. // This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228 ManagedResourcesNetworkAccessType *ManagedResourcesNetworkAccessType // 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 ¶
func (s SAPVirtualInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstanceProperties.
func (*SAPVirtualInstanceProperties) UnmarshalJSON ¶
func (s *SAPVirtualInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstanceProperties.
type SAPVirtualInstanceState ¶
type SAPVirtualInstanceState string
SAPVirtualInstanceState - Defines the Virtual Instance for SAP state.
const ( SAPVirtualInstanceStateACSSInstallationBlocked SAPVirtualInstanceState = "ACSSInstallationBlocked" 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 ¶
func PossibleSAPVirtualInstanceStateValues() []SAPVirtualInstanceState
PossibleSAPVirtualInstanceStateValues returns the possible values for the SAPVirtualInstanceState const type.
type SAPVirtualInstanceStatus ¶
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 ¶
func PossibleSAPVirtualInstanceStatusValues() []SAPVirtualInstanceStatus
PossibleSAPVirtualInstanceStatusValues returns the possible values for the SAPVirtualInstanceStatus const type.
type SAPVirtualInstancesClient ¶
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 ¶
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 ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureOnlyForHaSystemWithAvailabilitySet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), }, }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureOnlyForHaSystemWithAvailabilityZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), }, }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureOnlyForSingleServerSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), NetworkConfiguration: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), // SubnetID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet"), // VirtualMachineConfiguration: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithDiskAndOsConfigurationForDistributedSystemRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), DiskConfiguration: &armworkloadssapvirtualinstance.DiskConfiguration{ DiskVolumeConfigurations: map[string]*armworkloadssapvirtualinstance.DiskVolumeConfiguration{ "backup": { Count: to.Ptr[int64](2), SizeGB: to.Ptr[int64](256), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "hana/data": { Count: to.Ptr[int64](4), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), }, }, "hana/log": { Count: to.Ptr[int64](3), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), }, }, "hana/shared": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](256), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "os": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](64), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "usr/sap": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), // DiskConfiguration: &armworkloadssapvirtualinstance.DiskConfiguration{ // DiskVolumeConfigurations: map[string]*armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // "backup": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "hana/data": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // "hana/log": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // "hana/shared": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "os": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "usr/sap": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithDiskAndOsConfigurationForHaSystemWithAvailabilitySetRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), DiskConfiguration: &armworkloadssapvirtualinstance.DiskConfiguration{ DiskVolumeConfigurations: map[string]*armworkloadssapvirtualinstance.DiskVolumeConfiguration{ "backup": { Count: to.Ptr[int64](2), SizeGB: to.Ptr[int64](256), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "hana/data": { Count: to.Ptr[int64](4), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), }, }, "hana/log": { Count: to.Ptr[int64](3), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), }, }, "hana/shared": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](256), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "os": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](64), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "usr/sap": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), // DiskConfiguration: &armworkloadssapvirtualinstance.DiskConfiguration{ // DiskVolumeConfigurations: map[string]*armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // "backup": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "hana/data": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // "hana/log": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // "hana/shared": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "os": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "usr/sap": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithDiskAndOsConfigurationForHaSystemWithAvailabilityZoneRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), DiskConfiguration: &armworkloadssapvirtualinstance.DiskConfiguration{ DiskVolumeConfigurations: map[string]*armworkloadssapvirtualinstance.DiskVolumeConfiguration{ "backup": { Count: to.Ptr[int64](2), SizeGB: to.Ptr[int64](256), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "hana/data": { Count: to.Ptr[int64](4), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), }, }, "hana/log": { Count: to.Ptr[int64](3), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), }, }, "hana/shared": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](256), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "os": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](64), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "usr/sap": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), // DiskConfiguration: &armworkloadssapvirtualinstance.DiskConfiguration{ // DiskVolumeConfigurations: map[string]*armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // "backup": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "hana/data": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // "hana/log": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // "hana/shared": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "os": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "usr/sap": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithDiskAndOsConfigurationsForSingleServerSystemRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), DbDiskConfiguration: &armworkloadssapvirtualinstance.DiskConfiguration{ DiskVolumeConfigurations: map[string]*armworkloadssapvirtualinstance.DiskVolumeConfiguration{ "backup": { Count: to.Ptr[int64](2), SizeGB: to.Ptr[int64](256), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "hana/data": { Count: to.Ptr[int64](4), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), }, }, "hana/log": { Count: to.Ptr[int64](3), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), }, }, "hana/shared": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](256), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "os": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](64), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), }, }, "usr/sap": { Count: to.Ptr[int64](1), SizeGB: to.Ptr[int64](128), SKU: &armworkloadssapvirtualinstance.DiskSKU{ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), }, }, }, }, NetworkConfiguration: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), // DbDiskConfiguration: &armworkloadssapvirtualinstance.DiskConfiguration{ // DiskVolumeConfigurations: map[string]*armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // "backup": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "hana/data": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // "hana/log": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // "hana/shared": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "os": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // "usr/sap": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // }, // }, // NetworkConfiguration: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationForDistributedSystemRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationForHaSystemWithAvailabilitySetRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationForHaSystemWithAvailabilityZoneRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationForSingleServerSystemRecommended) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), NetworkConfiguration: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), // NetworkConfiguration: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithAzureComputeGalleryImage) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Custom_Image.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ { KeyData: to.Ptr("ssh-rsa public key"), }}, }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), }, }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForDistributedSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{ NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName), ApplicationServer: &armworkloadssapvirtualinstance.ApplicationServerFullResourceNames{ AvailabilitySetName: to.Ptr("appAvSet"), VirtualMachines: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "default": { to.Ptr("app0disk0")}, }, HostName: to.Ptr("apphostName0"), NetworkInterfaces: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("appnic1"), }}, OSDiskName: to.Ptr("app1osdisk"), VMName: to.Ptr("appvm1"), }}, }, CentralServer: &armworkloadssapvirtualinstance.CentralServerFullResourceNames{ VirtualMachines: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "default": { to.Ptr("ascsdisk0")}, }, HostName: to.Ptr("ascshostName"), NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ascsnic"), }}, OSDiskName: to.Ptr("ascsosdisk"), VMName: to.Ptr("ascsvm"), }}, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseServerFullResourceNames{ VirtualMachines: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("dbnic"), }}, OSDiskName: to.Ptr("dbosdisk"), VMName: to.Ptr("dbvm"), }}, }, SharedStorage: &armworkloadssapvirtualinstance.SharedStorageResourceNames{ SharedStorageAccountName: to.Ptr("storageacc"), SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"), }, SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{ // NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName), // ApplicationServer: &armworkloadssapvirtualinstance.ApplicationServerFullResourceNames{ // AvailabilitySetName: to.Ptr("appAvSet"), // VirtualMachines: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("app0disk0")}, // }, // HostName: to.Ptr("apphostName0"), // NetworkInterfaces: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("appnic1"), // }}, // OSDiskName: to.Ptr("app1osdisk"), // VMName: to.Ptr("appvm1"), // }}, // }, // CentralServer: &armworkloadssapvirtualinstance.CentralServerFullResourceNames{ // VirtualMachines: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("ascsdisk0")}, // }, // HostName: to.Ptr("ascshostName"), // NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ascsnic"), // }}, // OSDiskName: to.Ptr("ascsosdisk"), // VMName: to.Ptr("ascsvm"), // }}, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseServerFullResourceNames{ // VirtualMachines: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("dbnic"), // }}, // OSDiskName: to.Ptr("dbosdisk"), // VMName: to.Ptr("dbvm"), // }}, // }, // SharedStorage: &armworkloadssapvirtualinstance.SharedStorageResourceNames{ // SharedStorageAccountName: to.Ptr("storageacc"), // SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{ NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName), ApplicationServer: &armworkloadssapvirtualinstance.ApplicationServerFullResourceNames{ AvailabilitySetName: to.Ptr("appAvSet"), VirtualMachines: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "default": { to.Ptr("app0disk0")}, }, HostName: to.Ptr("apphostName0"), NetworkInterfaces: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("appnic1"), }}, OSDiskName: to.Ptr("app1osdisk"), VMName: to.Ptr("appvm1"), }}, }, CentralServer: &armworkloadssapvirtualinstance.CentralServerFullResourceNames{ AvailabilitySetName: to.Ptr("csAvSet"), LoadBalancer: &armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ { HostName: to.Ptr("ascshostName"), NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ascsnic"), }}, OSDiskName: to.Ptr("ascsosdisk"), VMName: to.Ptr("ascsvm"), }, { HostName: to.Ptr("ershostName"), NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ersnic"), }}, OSDiskName: to.Ptr("ersosdisk"), VMName: to.Ptr("ersvm"), }}, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseServerFullResourceNames{ AvailabilitySetName: to.Ptr("dbAvSet"), LoadBalancer: &armworkloadssapvirtualinstance.LoadBalancerResourceNames{ BackendPoolNames: []*string{ to.Ptr("dbBackendPool")}, FrontendIPConfigurationNames: []*string{ to.Ptr("dbip")}, HealthProbeNames: []*string{ to.Ptr("dbHealthProbe")}, LoadBalancerName: to.Ptr("dblb"), }, VirtualMachines: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("dbsrnic"), }}, OSDiskName: to.Ptr("dbsrosdisk"), VMName: to.Ptr("dbvmsr"), }}, }, SharedStorage: &armworkloadssapvirtualinstance.SharedStorageResourceNames{ SharedStorageAccountName: to.Ptr("storageacc"), SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"), }, SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{ // NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName), // ApplicationServer: &armworkloadssapvirtualinstance.ApplicationServerFullResourceNames{ // AvailabilitySetName: to.Ptr("appAvSet"), // VirtualMachines: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("app0disk0")}, // }, // HostName: to.Ptr("apphostName0"), // NetworkInterfaces: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("appnic1"), // }}, // OSDiskName: to.Ptr("app1osdisk"), // VMName: to.Ptr("appvm1"), // }}, // }, // CentralServer: &armworkloadssapvirtualinstance.CentralServerFullResourceNames{ // AvailabilitySetName: to.Ptr("csAvSet"), // LoadBalancer: &armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ // { // HostName: to.Ptr("ascshostName"), // NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ascsnic"), // }}, // OSDiskName: to.Ptr("ascsosdisk"), // VMName: to.Ptr("ascsvm"), // }, // { // HostName: to.Ptr("ershostName"), // NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ersnic"), // }}, // OSDiskName: to.Ptr("ersosdisk"), // VMName: to.Ptr("ersvm"), // }}, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseServerFullResourceNames{ // AvailabilitySetName: to.Ptr("dbAvSet"), // LoadBalancer: &armworkloadssapvirtualinstance.LoadBalancerResourceNames{ // BackendPoolNames: []*string{ // to.Ptr("dbBackendPool")}, // FrontendIPConfigurationNames: []*string{ // to.Ptr("dbip")}, // HealthProbeNames: []*string{ // to.Ptr("dbHealthProbe")}, // LoadBalancerName: to.Ptr("dblb"), // }, // VirtualMachines: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("dbsrnic"), // }}, // OSDiskName: to.Ptr("dbsrosdisk"), // VMName: to.Ptr("dbvmsr"), // }}, // }, // SharedStorage: &armworkloadssapvirtualinstance.SharedStorageResourceNames{ // SharedStorageAccountName: to.Ptr("storageacc"), // SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{ NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName), ApplicationServer: &armworkloadssapvirtualinstance.ApplicationServerFullResourceNames{ VirtualMachines: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ { DataDiskNames: map[string][]*string{ "default": { to.Ptr("app0disk0")}, }, HostName: to.Ptr("apphostName0"), NetworkInterfaces: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("appnic1"), }}, OSDiskName: to.Ptr("app1osdisk"), VMName: to.Ptr("appvm1"), }}, }, CentralServer: &armworkloadssapvirtualinstance.CentralServerFullResourceNames{ LoadBalancer: &armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ { HostName: to.Ptr("ascshostName"), NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ascsnic"), }}, OSDiskName: to.Ptr("ascsosdisk"), VMName: to.Ptr("ascsvm"), }, { HostName: to.Ptr("ershostName"), NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("ersnic"), }}, OSDiskName: to.Ptr("ersosdisk"), VMName: to.Ptr("ersvm"), }}, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseServerFullResourceNames{ LoadBalancer: &armworkloadssapvirtualinstance.LoadBalancerResourceNames{ BackendPoolNames: []*string{ to.Ptr("dbBackendPool")}, FrontendIPConfigurationNames: []*string{ to.Ptr("dbip")}, HealthProbeNames: []*string{ to.Ptr("dbHealthProbe")}, LoadBalancerName: to.Ptr("dblb"), }, VirtualMachines: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ { NetworkInterfaceName: to.Ptr("dbsrnic"), }}, OSDiskName: to.Ptr("dbsrosdisk"), VMName: to.Ptr("dbvmsr"), }}, }, SharedStorage: &armworkloadssapvirtualinstance.SharedStorageResourceNames{ SharedStorageAccountName: to.Ptr("storageacc"), SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"), }, SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{ // NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName), // ApplicationServer: &armworkloadssapvirtualinstance.ApplicationServerFullResourceNames{ // VirtualMachines: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ // { // DataDiskNames: map[string][]*string{ // "default": []*string{ // to.Ptr("app0disk0")}, // }, // HostName: to.Ptr("apphostName0"), // NetworkInterfaces: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("appnic1"), // }}, // OSDiskName: to.Ptr("app1osdisk"), // VMName: to.Ptr("appvm1"), // }}, // }, // CentralServer: &armworkloadssapvirtualinstance.CentralServerFullResourceNames{ // LoadBalancer: &armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{ // { // HostName: to.Ptr("ascshostName"), // NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ascsnic"), // }}, // OSDiskName: to.Ptr("ascsosdisk"), // VMName: to.Ptr("ascsvm"), // }, // { // HostName: to.Ptr("ershostName"), // NetworkInterfaces: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ersnic"), // }}, // OSDiskName: to.Ptr("ersosdisk"), // VMName: to.Ptr("ersvm"), // }}, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseServerFullResourceNames{ // LoadBalancer: &armworkloadssapvirtualinstance.LoadBalancerResourceNames{ // BackendPoolNames: []*string{ // to.Ptr("dbBackendPool")}, // FrontendIPConfigurationNames: []*string{ // to.Ptr("dbip")}, // HealthProbeNames: []*string{ // to.Ptr("dbHealthProbe")}, // LoadBalancerName: to.Ptr("dblb"), // }, // VirtualMachines: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("dbsrnic"), // }}, // OSDiskName: to.Ptr("dbsrosdisk"), // VMName: to.Ptr("dbvmsr"), // }}, // }, // SharedStorage: &armworkloadssapvirtualinstance.SharedStorageResourceNames{ // SharedStorageAccountName: to.Ptr("storageacc"), // SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithCustomResourceNamesForSingleServerSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), NetworkConfiguration: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"), }, SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), // CustomResourceNames: &armworkloadssapvirtualinstance.SingleServerFullResourceNames{ // NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName), // VirtualMachine: &armworkloadssapvirtualinstance.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: []*armworkloadssapvirtualinstance.NetworkInterfaceResourceNames{ // { // NetworkInterfaceName: to.Ptr("ssnic"), // }}, // OSDiskName: to.Ptr("ssosdisk"), // VMName: to.Ptr("ssvm"), // }, // }, // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), // NetworkConfiguration: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (CreateInfrastructureWithOsConfigurationWithTrustedAccessEnabled) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_WithTrustedAccess.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), ManagedResourcesNetworkAccessType: to.Ptr(armworkloadssapvirtualinstance.ManagedResourcesNetworkAccessTypePrivate), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ManagedResourcesNetworkAccessType: to.Ptr(armworkloadssapvirtualinstance.ManagedResourcesNetworkAccessTypePrivate), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")), // }, // } }
Output:
Example (DetectSapSoftwareInstallationOnADistributedSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus2"), Tags: map[string]*string{ "created by": to.Ptr("azureuser"), }, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("{{resourcegrp}}"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E4ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E4ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{ IsSecondaryIPEnabled: to.Ptr(true), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("sap.bpaas.com"), }, SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal), CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeApplication), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "created by": to.Ptr("azureuser"), // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("aa-rg"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("sap.bpaas.com"), // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal), // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // }, // } }
Output:
Example (DetectSapSoftwareInstallationOnASingleServerSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), NetworkConfiguration: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal), CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA), // NetworkConfiguration: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal), // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // }, // } }
Output:
Example (DetectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal), CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal), // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // }, // } }
Output:
Example (DetectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("X00-RG"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_E16ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("84sapha-gen2"), Version: to.Ptr("latest"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("{your-username}"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("xyz"), PublicKey: to.Ptr("abc"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("xyz.test.com"), }, SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal), CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E32ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_E16ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("abc"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("xyz.test.com"), // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal), // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), // }, // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // }, // } }
Output:
Example (InstallSapSoftwareOnDistributedSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus2"), Tags: map[string]*string{ "created by": to.Ptr("azureuser"), }, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ AppResourceGroup: to.Ptr("{{resourcegrp}}"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("8.2"), Version: to.Ptr("8.2.2021091201"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E4ds_v4"), }, }, CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("8.2"), Version: to.Ptr("8.2.2021091201"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E4ds_v4"), }, }, DatabaseServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("RHEL-SAP-HA"), Publisher: to.Ptr("RedHat"), SKU: to.Ptr("8.2"), Version: to.Ptr("8.2.2021091201"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("azureuser"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_M32ts"), }, }, NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{ IsSecondaryIPEnabled: to.Ptr(true), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("sap.bpaas.com"), }, SoftwareConfiguration: &armworkloadssapvirtualinstance.SAPInstallWithoutOSConfigSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeApplication), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "created by": to.Ptr("azureuser"), // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("aa-rg"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("sap.bpaas.com"), // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.SAPInstallWithoutOSConfigSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationInProgress), // }, // } }
Output:
Example (InstallSapSoftwareOnSingleServerSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("eastus2"), Tags: map[string]*string{}, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), AppLocation: to.Ptr("eastus"), InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{ AppResourceGroup: to.Ptr("test-rg"), DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), SubnetID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet"), VirtualMachineConfiguration: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ ImageReference: &armworkloadssapvirtualinstance.ImageReference{ Offer: to.Ptr("SLES-SAP"), Publisher: to.Ptr("SUSE"), SKU: to.Ptr("12-sp4-gen2"), Version: to.Ptr("2022.02.01"), }, OSProfile: &armworkloadssapvirtualinstance.OSProfile{ AdminUsername: to.Ptr("azureappadmin"), OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), DisablePasswordAuthentication: to.Ptr(true), SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ PrivateKey: to.Ptr("{{privateKey}}"), PublicKey: to.Ptr("{{sshkey}}"), }, }, }, VMSize: to.Ptr("Standard_E32ds_v4"), }, }, OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ SapFqdn: to.Ptr("sap.bpaas.com"), }, SoftwareConfiguration: &armworkloadssapvirtualinstance.SAPInstallWithoutOSConfigSoftwareConfiguration{ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeApplication), // }, // Location: to.Ptr("eastus2"), // Tags: map[string]*string{ // "created by": to.Ptr("azureuser"), // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("aa-rg"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_E4ds_v4"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP-HA"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("azureuser"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"), // }, // }, // }, // VMSize: to.Ptr("Standard_M32ts"), // }, // }, // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{ // IsSecondaryIPEnabled: to.Ptr(true), // }, // }, // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{ // SapFqdn: to.Ptr("sap.bpaas.com"), // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.SAPInstallWithoutOSConfigSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationInProgress), // }, // } }
Output:
Example (RegisterExistingSapSystemAsVirtualInstanceForSapSolutions) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("northeurope"), Tags: map[string]*string{ "createdby": to.Ptr("abc@microsoft.com"), "test": to.Ptr("abc"), }, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDiscovery), CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-Q20-5b0097"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // }, // } }
Output:
Example (RegisterExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("northeurope"), Tags: map[string]*string{ "createdby": to.Ptr("abc@microsoft.com"), "test": to.Ptr("abc"), }, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-Q20-5b0097"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // }, // } }
Output:
Example (RegisterWithTrustedAccessEnabled) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_TrustedAccessEnable.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", armworkloadssapvirtualinstance.SAPVirtualInstance{ Location: to.Ptr("northeurope"), Tags: map[string]*string{ "createdby": to.Ptr("abc@microsoft.com"), "test": to.Ptr("abc"), }, Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDiscovery), CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"), }, Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), ManagedResourcesNetworkAccessType: to.Ptr(armworkloadssapvirtualinstance.ManagedResourcesNetworkAccessTypePrivate), SapProduct: to.Ptr(armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-Q20-5b0097"), // }, // ManagedResourcesNetworkAccessType: to.Ptr(armworkloadssapvirtualinstance.ManagedResourcesNetworkAccessTypePrivate), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // }, // } }
Output:
func (*SAPVirtualInstancesClient) BeginDelete ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SAPVirtualInstancesClient) BeginStart ¶
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-10-01-preview
- 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 (StartTheSapSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPVirtualInstancesClientBeginStartOptions{Body: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationStatusResult = armworkloadssapvirtualinstance.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:
Example (StartTheVirtualMachinesAndTheSapSystem) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start_WithInfraOperations.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPVirtualInstancesClientBeginStartOptions{Body: &armworkloadssapvirtualinstance.StartRequest{ StartVM: to.Ptr(true), }, }) 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 = armworkloadssapvirtualinstance.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 ¶
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-10-01-preview
- 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 (SapVirtualInstancesStop) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPVirtualInstancesClientBeginStopOptions{Body: &armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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:
Example (StopTheVirtualMachineSAndTheSapSystemOnIt) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop_WithInfraOperations.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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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", &armworkloadssapvirtualinstance.SAPVirtualInstancesClientBeginStopOptions{Body: &armworkloadssapvirtualinstance.StopRequest{ DeallocateVM: to.Ptr(true), 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 = armworkloadssapvirtualinstance.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) BeginUpdate ¶
func (client *SAPVirtualInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body UpdateSAPVirtualInstanceRequest, options *SAPVirtualInstancesClientBeginUpdateOptions) (*runtime.Poller[SAPVirtualInstancesClientUpdateResponse], error)
BeginUpdate - Updates a Virtual Instance for SAP solutions resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- 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 - SAPVirtualInstancesClientBeginUpdateOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginUpdate method.
Example (SapVirtualInstancesTrustedAccessEnableUpdate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_TrustedAccessEnable_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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginUpdate(ctx, "test-rg", "X00", armworkloadssapvirtualinstance.UpdateSAPVirtualInstanceRequest{ Identity: &armworkloadssapvirtualinstance.UserAssignedServiceIdentity{ Type: to.Ptr(armworkloadssapvirtualinstance.ManagedServiceIdentityTypeNone), }, Properties: &armworkloadssapvirtualinstance.UpdateSAPVirtualInstanceProperties{ ManagedResourcesNetworkAccessType: to.Ptr(armworkloadssapvirtualinstance.ManagedResourcesNetworkAccessTypePrivate), }, Tags: map[string]*string{ "key1": to.Ptr("svi1"), }, }, 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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("svi1"), // }, // Identity: &armworkloadssapvirtualinstance.UserAssignedServiceIdentity{ // Type: to.Ptr(armworkloadssapvirtualinstance.ManagedServiceIdentityTypeNone), // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ManagedResourcesNetworkAccessType: to.Ptr(armworkloadssapvirtualinstance.ManagedResourcesNetworkAccessTypePrivate), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateInfrastructureDeploymentPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusStarting), // }, // } }
Output:
Example (SapVirtualInstancesUpdate) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginUpdate(ctx, "test-rg", "X00", armworkloadssapvirtualinstance.UpdateSAPVirtualInstanceRequest{ Identity: &armworkloadssapvirtualinstance.UserAssignedServiceIdentity{ Type: to.Ptr(armworkloadssapvirtualinstance.ManagedServiceIdentityTypeNone), }, Tags: map[string]*string{ "key1": to.Ptr("svi1"), }, }, 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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // "key1": to.Ptr("svi1"), // }, // Identity: &armworkloadssapvirtualinstance.UserAssignedServiceIdentity{ // Type: to.Ptr(armworkloadssapvirtualinstance.ManagedServiceIdentityTypeNone), // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // }, // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateInfrastructureDeploymentPending), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusStarting), // }, // } }
Output:
func (*SAPVirtualInstancesClient) Get ¶
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-10-01-preview
- 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 (SapVirtualInstancesGet) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // }, // } }
Output:
Example (SapVirtualInstancesGetWithAcssInstallationBlocked) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get_ACSSInstallationBlocked.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateACSSInstallationBlocked), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // }, // } }
Output:
func (*SAPVirtualInstancesClient) NewListByResourceGroupPager ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.SAPVirtualInstanceList{ // Value: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // }, // }}, // } } }
Output:
func (*SAPVirtualInstancesClient) NewListBySubscriptionPager ¶
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-10-01-preview
- 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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.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 = armworkloadssapvirtualinstance.SAPVirtualInstanceList{ // Value: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{ // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"), // }, // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.CreatedByTypeUser), // }, // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment), // AppLocation: to.Ptr("eastus"), // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{ // AppResourceGroup: to.Ptr("X00-RG"), // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier), // ApplicationServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // CentralServer: &armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.VirtualMachineConfiguration{ // ImageReference: &armworkloadssapvirtualinstance.ImageReference{ // Offer: to.Ptr("RHEL-SAP"), // Publisher: to.Ptr("RedHat"), // SKU: to.Ptr("84sapha-gen2"), // Version: to.Ptr("latest"), // }, // OSProfile: &armworkloadssapvirtualinstance.OSProfile{ // AdminUsername: to.Ptr("{your-username}"), // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux), // DisablePasswordAuthentication: to.Ptr(true), // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{ // { // KeyData: to.Ptr("ssh-rsa public key"), // }}, // }, // }, // }, // VMSize: to.Ptr("Standard_D8s_v3"), // }, // }, // }, // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.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(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd), // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy), // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded), // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA), // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete), // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning), // }, // }}, // } } }
Output:
type SAPVirtualInstancesClientBeginCreateOptions ¶
type SAPVirtualInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPVirtualInstancesClientBeginCreateOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginCreate method.
type SAPVirtualInstancesClientBeginDeleteOptions ¶
type SAPVirtualInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPVirtualInstancesClientBeginDeleteOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginDelete method.
type SAPVirtualInstancesClientBeginStartOptions ¶
type SAPVirtualInstancesClientBeginStartOptions struct { // The Virtual Instance for SAP solutions resource start request body. Body *StartRequest // Resumes the LRO from the provided token. ResumeToken string }
SAPVirtualInstancesClientBeginStartOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginStart method.
type SAPVirtualInstancesClientBeginStopOptions ¶
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 SAPVirtualInstancesClientBeginUpdateOptions ¶
type SAPVirtualInstancesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SAPVirtualInstancesClientBeginUpdateOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginUpdate method.
type SAPVirtualInstancesClientCreateResponse ¶
type SAPVirtualInstancesClientCreateResponse struct { // Define the Virtual Instance for SAP solutions resource. SAPVirtualInstance }
SAPVirtualInstancesClientCreateResponse contains the response from method SAPVirtualInstancesClient.BeginCreate.
type SAPVirtualInstancesClientDeleteResponse ¶
type SAPVirtualInstancesClientDeleteResponse struct { }
SAPVirtualInstancesClientDeleteResponse contains the response from method SAPVirtualInstancesClient.BeginDelete.
type SAPVirtualInstancesClientGetOptions ¶
type SAPVirtualInstancesClientGetOptions struct { }
SAPVirtualInstancesClientGetOptions contains the optional parameters for the SAPVirtualInstancesClient.Get method.
type SAPVirtualInstancesClientGetResponse ¶
type SAPVirtualInstancesClientGetResponse struct { // Define the Virtual Instance for SAP solutions resource. SAPVirtualInstance }
SAPVirtualInstancesClientGetResponse contains the response from method SAPVirtualInstancesClient.Get.
type SAPVirtualInstancesClientListByResourceGroupOptions ¶
type SAPVirtualInstancesClientListByResourceGroupOptions struct { }
SAPVirtualInstancesClientListByResourceGroupOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListByResourceGroupPager method.
type SAPVirtualInstancesClientListByResourceGroupResponse ¶
type SAPVirtualInstancesClientListByResourceGroupResponse struct { // Defines the collection of Virtual Instance for SAP solutions resources. SAPVirtualInstanceList }
SAPVirtualInstancesClientListByResourceGroupResponse contains the response from method SAPVirtualInstancesClient.NewListByResourceGroupPager.
type SAPVirtualInstancesClientListBySubscriptionOptions ¶
type SAPVirtualInstancesClientListBySubscriptionOptions struct { }
SAPVirtualInstancesClientListBySubscriptionOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListBySubscriptionPager method.
type SAPVirtualInstancesClientListBySubscriptionResponse ¶
type SAPVirtualInstancesClientListBySubscriptionResponse struct { // Defines the collection of Virtual Instance for SAP solutions resources. SAPVirtualInstanceList }
SAPVirtualInstancesClientListBySubscriptionResponse contains the response from method SAPVirtualInstancesClient.NewListBySubscriptionPager.
type SAPVirtualInstancesClientStartResponse ¶
type SAPVirtualInstancesClientStartResponse struct { // The current status of an async operation. OperationStatusResult }
SAPVirtualInstancesClientStartResponse contains the response from method SAPVirtualInstancesClient.BeginStart.
type SAPVirtualInstancesClientStopResponse ¶
type SAPVirtualInstancesClientStopResponse struct { // The current status of an async operation. OperationStatusResult }
SAPVirtualInstancesClientStopResponse contains the response from method SAPVirtualInstancesClient.BeginStop.
type SAPVirtualInstancesClientUpdateResponse ¶
type SAPVirtualInstancesClientUpdateResponse struct { // Define the Virtual Instance for SAP solutions resource. SAPVirtualInstance }
SAPVirtualInstancesClientUpdateResponse contains the response from method SAPVirtualInstancesClient.BeginUpdate.
type SSHConfiguration ¶
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 ¶
func (s SSHConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHConfiguration.
func (*SSHConfiguration) UnmarshalJSON ¶
func (s *SSHConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHConfiguration.
type SSHKeyPair ¶
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 ¶
func (s SSHKeyPair) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHKeyPair.
func (*SSHKeyPair) UnmarshalJSON ¶
func (s *SSHKeyPair) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHKeyPair.
type SSHPublicKey ¶
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 ¶
func (s SSHPublicKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SSHPublicKey.
func (*SSHPublicKey) UnmarshalJSON ¶
func (s *SSHPublicKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey.
type SapVirtualInstanceProvisioningState ¶
type SapVirtualInstanceProvisioningState string
SapVirtualInstanceProvisioningState - Defines the provisioning states.
const ( SapVirtualInstanceProvisioningStateCanceled SapVirtualInstanceProvisioningState = "Canceled" SapVirtualInstanceProvisioningStateCreating SapVirtualInstanceProvisioningState = "Creating" SapVirtualInstanceProvisioningStateDeleting SapVirtualInstanceProvisioningState = "Deleting" SapVirtualInstanceProvisioningStateFailed SapVirtualInstanceProvisioningState = "Failed" SapVirtualInstanceProvisioningStateSucceeded SapVirtualInstanceProvisioningState = "Succeeded" SapVirtualInstanceProvisioningStateUpdating SapVirtualInstanceProvisioningState = "Updating" )
func PossibleSapVirtualInstanceProvisioningStateValues ¶
func PossibleSapVirtualInstanceProvisioningStateValues() []SapVirtualInstanceProvisioningState
PossibleSapVirtualInstanceProvisioningStateValues returns the possible values for the SapVirtualInstanceProvisioningState const type.
type ServiceInitiatedSoftwareConfiguration ¶
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 ¶
func (s *ServiceInitiatedSoftwareConfiguration) GetSoftwareConfiguration() *SoftwareConfiguration
GetSoftwareConfiguration implements the SoftwareConfigurationClassification interface for type ServiceInitiatedSoftwareConfiguration.
func (ServiceInitiatedSoftwareConfiguration) MarshalJSON ¶
func (s ServiceInitiatedSoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceInitiatedSoftwareConfiguration.
func (*ServiceInitiatedSoftwareConfiguration) UnmarshalJSON ¶
func (s *ServiceInitiatedSoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceInitiatedSoftwareConfiguration.
type SharedStorageResourceNames ¶
type SharedStorageResourceNames struct { string SharedStorageAccountPrivateEndPointName *string }SharedStorageAccountName *
SharedStorageResourceNames - The resource names object for shared storage.
func (SharedStorageResourceNames) MarshalJSON ¶
func (s SharedStorageResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedStorageResourceNames.
func (*SharedStorageResourceNames) UnmarshalJSON ¶
func (s *SharedStorageResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedStorageResourceNames.
type SingleServerConfiguration ¶
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 ¶
func (s *SingleServerConfiguration) GetInfrastructureConfiguration() *InfrastructureConfiguration
GetInfrastructureConfiguration implements the InfrastructureConfigurationClassification interface for type SingleServerConfiguration.
func (SingleServerConfiguration) MarshalJSON ¶
func (s SingleServerConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleServerConfiguration.
func (*SingleServerConfiguration) UnmarshalJSON ¶
func (s *SingleServerConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleServerConfiguration.
type SingleServerCustomResourceNames ¶
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 ¶
func (s *SingleServerCustomResourceNames) GetSingleServerCustomResourceNames() *SingleServerCustomResourceNames
GetSingleServerCustomResourceNames implements the SingleServerCustomResourceNamesClassification interface for type SingleServerCustomResourceNames.
func (SingleServerCustomResourceNames) MarshalJSON ¶
func (s SingleServerCustomResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleServerCustomResourceNames.
func (*SingleServerCustomResourceNames) UnmarshalJSON ¶
func (s *SingleServerCustomResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleServerCustomResourceNames.
type SingleServerCustomResourceNamesClassification ¶
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 ¶
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 ¶
func (s *SingleServerFullResourceNames) GetSingleServerCustomResourceNames() *SingleServerCustomResourceNames
GetSingleServerCustomResourceNames implements the SingleServerCustomResourceNamesClassification interface for type SingleServerFullResourceNames.
func (SingleServerFullResourceNames) MarshalJSON ¶
func (s SingleServerFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleServerFullResourceNames.
func (*SingleServerFullResourceNames) UnmarshalJSON ¶
func (s *SingleServerFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleServerFullResourceNames.
type SingleServerRecommendationResult ¶
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 ¶
func (s *SingleServerRecommendationResult) GetSAPSizingRecommendationResult() *SAPSizingRecommendationResult
GetSAPSizingRecommendationResult implements the SAPSizingRecommendationResultClassification interface for type SingleServerRecommendationResult.
func (SingleServerRecommendationResult) MarshalJSON ¶
func (s SingleServerRecommendationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SingleServerRecommendationResult.
func (*SingleServerRecommendationResult) UnmarshalJSON ¶
func (s *SingleServerRecommendationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SingleServerRecommendationResult.
type SkipFileShareConfiguration ¶
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 ¶
func (s *SkipFileShareConfiguration) GetFileShareConfiguration() *FileShareConfiguration
GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type SkipFileShareConfiguration.
func (SkipFileShareConfiguration) MarshalJSON ¶
func (s SkipFileShareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SkipFileShareConfiguration.
func (*SkipFileShareConfiguration) UnmarshalJSON ¶
func (s *SkipFileShareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SkipFileShareConfiguration.
type SoftwareConfiguration ¶
type SoftwareConfiguration struct { // REQUIRED; The SAP software installation Type. SoftwareInstallationType *SAPSoftwareInstallationType }
SoftwareConfiguration - The SAP Software configuration Input.
func (*SoftwareConfiguration) GetSoftwareConfiguration ¶
func (s *SoftwareConfiguration) GetSoftwareConfiguration() *SoftwareConfiguration
GetSoftwareConfiguration implements the SoftwareConfigurationClassification interface for type SoftwareConfiguration.
func (SoftwareConfiguration) MarshalJSON ¶
func (s SoftwareConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SoftwareConfiguration.
func (*SoftwareConfiguration) UnmarshalJSON ¶
func (s *SoftwareConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SoftwareConfiguration.
type SoftwareConfigurationClassification ¶
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 StartRequest ¶
type StartRequest struct { // The boolean value indicates whether to start the virtual machines before starting the SAP instances. StartVM *bool }
StartRequest - Start SAP instance(s) request body.
func (StartRequest) MarshalJSON ¶
func (s StartRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StartRequest.
func (*StartRequest) UnmarshalJSON ¶
func (s *StartRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StartRequest.
type StopRequest ¶
type StopRequest struct { // The boolean value indicates whether to Stop and deallocate the virtual machines along with the SAP instances. DeallocateVM *bool // 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 ¶
func (s StopRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StopRequest.
func (*StopRequest) UnmarshalJSON ¶
func (s *StopRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StopRequest.
type StorageConfiguration ¶
type StorageConfiguration struct { // flow if storage configuration is missing. TransportFileShareConfiguration FileShareConfigurationClassification }
StorageConfiguration - Gets or sets the storage configuration.
func (StorageConfiguration) MarshalJSON ¶
func (s StorageConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageConfiguration.
func (*StorageConfiguration) UnmarshalJSON ¶
func (s *StorageConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageConfiguration.
type StorageInformation ¶
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 ¶
func (s StorageInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageInformation.
func (*StorageInformation) UnmarshalJSON ¶
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 ThreeTierConfiguration ¶
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 ¶
func (t *ThreeTierConfiguration) GetInfrastructureConfiguration() *InfrastructureConfiguration
GetInfrastructureConfiguration implements the InfrastructureConfigurationClassification interface for type ThreeTierConfiguration.
func (ThreeTierConfiguration) MarshalJSON ¶
func (t ThreeTierConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThreeTierConfiguration.
func (*ThreeTierConfiguration) UnmarshalJSON ¶
func (t *ThreeTierConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThreeTierConfiguration.
type ThreeTierCustomResourceNames ¶
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 ¶
func (t *ThreeTierCustomResourceNames) GetThreeTierCustomResourceNames() *ThreeTierCustomResourceNames
GetThreeTierCustomResourceNames implements the ThreeTierCustomResourceNamesClassification interface for type ThreeTierCustomResourceNames.
func (ThreeTierCustomResourceNames) MarshalJSON ¶
func (t ThreeTierCustomResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThreeTierCustomResourceNames.
func (*ThreeTierCustomResourceNames) UnmarshalJSON ¶
func (t *ThreeTierCustomResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThreeTierCustomResourceNames.
type ThreeTierCustomResourceNamesClassification ¶
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 ¶
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 ¶
func (t *ThreeTierFullResourceNames) GetThreeTierCustomResourceNames() *ThreeTierCustomResourceNames
GetThreeTierCustomResourceNames implements the ThreeTierCustomResourceNamesClassification interface for type ThreeTierFullResourceNames.
func (ThreeTierFullResourceNames) MarshalJSON ¶
func (t ThreeTierFullResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThreeTierFullResourceNames.
func (*ThreeTierFullResourceNames) UnmarshalJSON ¶
func (t *ThreeTierFullResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThreeTierFullResourceNames.
type ThreeTierRecommendationResult ¶
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 ¶
func (t *ThreeTierRecommendationResult) GetSAPSizingRecommendationResult() *SAPSizingRecommendationResult
GetSAPSizingRecommendationResult implements the SAPSizingRecommendationResultClassification interface for type ThreeTierRecommendationResult.
func (ThreeTierRecommendationResult) MarshalJSON ¶
func (t ThreeTierRecommendationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ThreeTierRecommendationResult.
func (*ThreeTierRecommendationResult) UnmarshalJSON ¶
func (t *ThreeTierRecommendationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ThreeTierRecommendationResult.
type UpdateSAPApplicationInstanceRequest ¶
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 ¶
func (u UpdateSAPApplicationInstanceRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSAPApplicationInstanceRequest.
func (*UpdateSAPApplicationInstanceRequest) UnmarshalJSON ¶
func (u *UpdateSAPApplicationInstanceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSAPApplicationInstanceRequest.
type UpdateSAPCentralInstanceRequest ¶
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 ¶
func (u UpdateSAPCentralInstanceRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSAPCentralInstanceRequest.
func (*UpdateSAPCentralInstanceRequest) UnmarshalJSON ¶
func (u *UpdateSAPCentralInstanceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSAPCentralInstanceRequest.
type UpdateSAPDatabaseInstanceRequest ¶
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 ¶
func (u UpdateSAPDatabaseInstanceRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSAPDatabaseInstanceRequest.
func (*UpdateSAPDatabaseInstanceRequest) UnmarshalJSON ¶
func (u *UpdateSAPDatabaseInstanceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSAPDatabaseInstanceRequest.
type UpdateSAPVirtualInstanceProperties ¶
type UpdateSAPVirtualInstanceProperties struct { // Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options // to choose from are Public and Private. If 'Private' is chosen, the Storage // Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity // between VM extensions and the managed resource group storage account. // This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228 ManagedResourcesNetworkAccessType *ManagedResourcesNetworkAccessType }
UpdateSAPVirtualInstanceProperties - Defines the properties to be updated for Virtual Instance for SAP.
func (UpdateSAPVirtualInstanceProperties) MarshalJSON ¶
func (u UpdateSAPVirtualInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSAPVirtualInstanceProperties.
func (*UpdateSAPVirtualInstanceProperties) UnmarshalJSON ¶
func (u *UpdateSAPVirtualInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSAPVirtualInstanceProperties.
type UpdateSAPVirtualInstanceRequest ¶
type UpdateSAPVirtualInstanceRequest struct { // Managed service identity (user assigned identities) Identity *UserAssignedServiceIdentity // Defines the properties to be updated for Virtual Instance for SAP. Properties *UpdateSAPVirtualInstanceProperties // Gets or sets the Resource tags. Tags map[string]*string }
UpdateSAPVirtualInstanceRequest - Defines the request body for updating Virtual Instance for SAP.
func (UpdateSAPVirtualInstanceRequest) MarshalJSON ¶
func (u UpdateSAPVirtualInstanceRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateSAPVirtualInstanceRequest.
func (*UpdateSAPVirtualInstanceRequest) UnmarshalJSON ¶
func (u *UpdateSAPVirtualInstanceRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateSAPVirtualInstanceRequest.
type UserAssignedIdentity ¶
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 ¶
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type UserAssignedServiceIdentity ¶
type UserAssignedServiceIdentity struct { // REQUIRED; Type of manage identity Type *ManagedServiceIdentityType // User assigned identities dictionary UserAssignedIdentities map[string]*UserAssignedIdentity }
UserAssignedServiceIdentity - Managed service identity (user assigned identities)
func (UserAssignedServiceIdentity) MarshalJSON ¶
func (u UserAssignedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedServiceIdentity.
func (*UserAssignedServiceIdentity) UnmarshalJSON ¶
func (u *UserAssignedServiceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedServiceIdentity.
type VirtualMachineConfiguration ¶
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 ¶
func (v VirtualMachineConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineConfiguration.
func (*VirtualMachineConfiguration) UnmarshalJSON ¶
func (v *VirtualMachineConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineConfiguration.
type VirtualMachineResourceNames ¶
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 ¶
func (v VirtualMachineResourceNames) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineResourceNames.
func (*VirtualMachineResourceNames) UnmarshalJSON ¶
func (v *VirtualMachineResourceNames) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineResourceNames.
type WindowsConfiguration ¶
type WindowsConfiguration struct { // REQUIRED; The OS Type OSType *OSType }
WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
func (*WindowsConfiguration) GetOSConfiguration ¶
func (w *WindowsConfiguration) GetOSConfiguration() *OSConfiguration
GetOSConfiguration implements the OSConfigurationClassification interface for type WindowsConfiguration.
func (WindowsConfiguration) MarshalJSON ¶
func (w WindowsConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WindowsConfiguration.
func (*WindowsConfiguration) UnmarshalJSON ¶
func (w *WindowsConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WindowsConfiguration.
type WorkloadsClient ¶
type WorkloadsClient struct {
// contains filtered or unexported fields
}
WorkloadsClient contains the methods for the WorkloadsClient group. Don't use this type directly, use NewWorkloadsClient() instead.
func NewWorkloadsClient ¶
func NewWorkloadsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkloadsClient, error)
NewWorkloadsClient creates a new instance of WorkloadsClient 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 (*WorkloadsClient) SAPAvailabilityZoneDetails ¶
func (client *WorkloadsClient) SAPAvailabilityZoneDetails(ctx context.Context, location string, options *WorkloadsClientSAPAvailabilityZoneDetailsOptions) (WorkloadsClientSAPAvailabilityZoneDetailsResponse, 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-10-01-preview
- location - The name of Azure region.
- options - WorkloadsClientSAPAvailabilityZoneDetailsOptions contains the optional parameters for the WorkloadsClient.SAPAvailabilityZoneDetails method.
Example (SapAvailabilityZoneDetailsEastus) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPAvailabilityZoneDetails(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPAvailabilityZoneDetailsOptions{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 = armworkloadssapvirtualinstance.SAPAvailabilityZoneDetailsResult{ // AvailabilityZonePairs: []*armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPAvailabilityZoneDetails(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPAvailabilityZoneDetailsOptions{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 = armworkloadssapvirtualinstance.SAPAvailabilityZoneDetailsResult{ // AvailabilityZonePairs: []*armworkloadssapvirtualinstance.SAPAvailabilityZonePair{ // { // ZoneA: to.Ptr[int64](2), // ZoneB: to.Ptr[int64](3), // }}, // } }
Output:
func (*WorkloadsClient) SAPDiskConfigurations ¶
func (client *WorkloadsClient) SAPDiskConfigurations(ctx context.Context, location string, options *WorkloadsClientSAPDiskConfigurationsOptions) (WorkloadsClientSAPDiskConfigurationsResponse, 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-10-01-preview
- location - The name of Azure region.
- options - WorkloadsClientSAPDiskConfigurationsOptions contains the optional parameters for the WorkloadsClient.SAPDiskConfigurations method.
Example (SapDiskConfigurationsNonProd) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPDiskConfigurations(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPDiskConfigurationsOptions{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 = armworkloadssapvirtualinstance.SAPDiskConfigurationsResult{ // VolumeConfigurations: map[string]*armworkloadssapvirtualinstance.SAPDiskConfiguration{ // "backup": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/data": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/log": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/shared": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }}, // }, // "os": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }}, // }, // "usr/sap": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS), // }, // }}, // }, // }, // } }
Output:
Example (SapDiskConfigurationsProd) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPDiskConfigurations(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPDiskConfigurationsOptions{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 = armworkloadssapvirtualinstance.SAPDiskConfigurationsResult{ // VolumeConfigurations: map[string]*armworkloadssapvirtualinstance.SAPDiskConfiguration{ // "backup": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](2), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/data": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](4), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/log": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](3), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }}, // }, // "hana/shared": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](256), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }}, // }, // "os": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](64), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }}, // }, // "usr/sap": &armworkloadssapvirtualinstance.SAPDiskConfiguration{ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{ // Count: to.Ptr[int64](1), // SizeGB: to.Ptr[int64](128), // SKU: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }, // SupportedConfigurations: []*armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.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: &armworkloadssapvirtualinstance.DiskSKU{ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS), // }, // }}, // }, // }, // } }
Output:
func (*WorkloadsClient) SAPSizingRecommendations ¶
func (client *WorkloadsClient) SAPSizingRecommendations(ctx context.Context, location string, options *WorkloadsClientSAPSizingRecommendationsOptions) (WorkloadsClientSAPSizingRecommendationsResponse, 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-10-01-preview
- location - The name of Azure region.
- options - WorkloadsClientSAPSizingRecommendationsOptions contains the optional parameters for the WorkloadsClient.SAPSizingRecommendations method.
Example (SapSizingRecommendationsS4HanaDistributed) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPSizingRecommendations(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsOptions{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 = armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsResponse{ // SAPSizingRecommendationResultClassification: &armworkloadssapvirtualinstance.ThreeTierRecommendationResult{ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPSizingRecommendations(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsOptions{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 = armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsResponse{ // SAPSizingRecommendationResultClassification: &armworkloadssapvirtualinstance.ThreeTierRecommendationResult{ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPSizingRecommendations(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsOptions{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 = armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsResponse{ // SAPSizingRecommendationResultClassification: &armworkloadssapvirtualinstance.ThreeTierRecommendationResult{ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPSizingRecommendations(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsOptions{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 = armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsResponse{ // SAPSizingRecommendationResultClassification: &armworkloadssapvirtualinstance.SingleServerRecommendationResult{ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer), // VMSKU: to.Ptr("Standard_M128s"), // }, // } }
Output:
func (*WorkloadsClient) SAPSupportedSKU ¶
func (client *WorkloadsClient) SAPSupportedSKU(ctx context.Context, location string, options *WorkloadsClientSAPSupportedSKUOptions) (WorkloadsClientSAPSupportedSKUResponse, 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-10-01-preview
- location - The name of Azure region.
- options - WorkloadsClientSAPSupportedSKUOptions contains the optional parameters for the WorkloadsClient.SAPSupportedSKU method.
Example (SapSupportedSkusDistributed) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPSupportedSKU(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPSupportedSKUOptions{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 = armworkloadssapvirtualinstance.SAPSupportedResourceSKUsResult{ // SupportedSKUs: []*armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPSupportedSKU(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPSupportedSKUOptions{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 = armworkloadssapvirtualinstance.SAPSupportedResourceSKUsResult{ // SupportedSKUs: []*armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPSupportedSKU(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPSupportedSKUOptions{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 = armworkloadssapvirtualinstance.SAPSupportedResourceSKUsResult{ // SupportedSKUs: []*armworkloadssapvirtualinstance.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/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/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/workloadssapvirtualinstance/armworkloadssapvirtualinstance" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadsClient().SAPSupportedSKU(ctx, "centralus", &armworkloadssapvirtualinstance.WorkloadsClientSAPSupportedSKUOptions{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 = armworkloadssapvirtualinstance.SAPSupportedResourceSKUsResult{ // SupportedSKUs: []*armworkloadssapvirtualinstance.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 WorkloadsClientSAPAvailabilityZoneDetailsOptions ¶
type WorkloadsClientSAPAvailabilityZoneDetailsOptions struct { // SAP Availability Zone Details Request body SAPAvailabilityZoneDetails *SAPAvailabilityZoneDetailsRequest }
WorkloadsClientSAPAvailabilityZoneDetailsOptions contains the optional parameters for the WorkloadsClient.SAPAvailabilityZoneDetails method.
type WorkloadsClientSAPAvailabilityZoneDetailsResponse ¶
type WorkloadsClientSAPAvailabilityZoneDetailsResponse struct { // The list of supported availability zone pairs which are part of SAP HA deployment. SAPAvailabilityZoneDetailsResult }
WorkloadsClientSAPAvailabilityZoneDetailsResponse contains the response from method WorkloadsClient.SAPAvailabilityZoneDetails.
type WorkloadsClientSAPDiskConfigurationsOptions ¶
type WorkloadsClientSAPDiskConfigurationsOptions struct { // SAP Disk Configurations Request body SAPDiskConfigurations *SAPDiskConfigurationsRequest }
WorkloadsClientSAPDiskConfigurationsOptions contains the optional parameters for the WorkloadsClient.SAPDiskConfigurations method.
type WorkloadsClientSAPDiskConfigurationsResponse ¶
type WorkloadsClientSAPDiskConfigurationsResponse struct { // The list of disk configuration for vmSku which are part of SAP deployment. SAPDiskConfigurationsResult }
WorkloadsClientSAPDiskConfigurationsResponse contains the response from method WorkloadsClient.SAPDiskConfigurations.
type WorkloadsClientSAPSizingRecommendationsOptions ¶
type WorkloadsClientSAPSizingRecommendationsOptions struct { // SAP Sizing Recommendation Request body SAPSizingRecommendation *SAPSizingRecommendationRequest }
WorkloadsClientSAPSizingRecommendationsOptions contains the optional parameters for the WorkloadsClient.SAPSizingRecommendations method.
type WorkloadsClientSAPSizingRecommendationsResponse ¶
type WorkloadsClientSAPSizingRecommendationsResponse struct { // The SAP sizing recommendation result. SAPSizingRecommendationResultClassification }
WorkloadsClientSAPSizingRecommendationsResponse contains the response from method WorkloadsClient.SAPSizingRecommendations.
func (*WorkloadsClientSAPSizingRecommendationsResponse) UnmarshalJSON ¶
func (w *WorkloadsClientSAPSizingRecommendationsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadsClientSAPSizingRecommendationsResponse.
type WorkloadsClientSAPSupportedSKUOptions ¶
type WorkloadsClientSAPSupportedSKUOptions struct { // SAP Supported SKU Request body SAPSupportedSKU *SAPSupportedSKUsRequest }
WorkloadsClientSAPSupportedSKUOptions contains the optional parameters for the WorkloadsClient.SAPSupportedSKU method.
type WorkloadsClientSAPSupportedSKUResponse ¶
type WorkloadsClientSAPSupportedSKUResponse struct { // The list of supported SKUs for different resources which are part of SAP deployment. SAPSupportedResourceSKUsResult }
WorkloadsClientSAPSupportedSKUResponse contains the response from method WorkloadsClient.SAPSupportedSKU.
Source Files ¶
- build.go
- client_factory.go
- constants.go
- interfaces.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- polymorphic_helpers.go
- responses.go
- sapapplicationserverinstances_client.go
- sapcentralinstances_client.go
- sapdatabaseinstances_client.go
- sapvirtualinstances_client.go
- time_rfc3339.go
- workloads_client.go