diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md b/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md
index d91bbac6cf58..e61b2f79eefb 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 2.0.0 (2024-12-11)
+### Breaking Changes
+
+- `ManagedServiceIdentityTypeSystemAndUserAssigned` from enum `ManagedServiceIdentityType` has been removed
+
+### Features Added
+
+- New value `ManagedServiceIdentityTypeSystemAssignedUserAssigned` added to enum type `ManagedServiceIdentityType`
+
+
## 1.0.0 (2024-10-22)
### Breaking Changes
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/README.md b/sdk/resourcemanager/computefleet/armcomputefleet/README.md
index d92afe0f9bd2..4cc26831f84d 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/README.md
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/README.md
@@ -18,7 +18,7 @@ This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for ve
Install the Azure Compute Fleet module:
```sh
-go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet
+go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2
```
## Authorization
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/constants.go b/sdk/resourcemanager/computefleet/armcomputefleet/constants.go
index 9a5b1d23be3c..15db93573c51 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/constants.go
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/constants.go
@@ -6,7 +6,7 @@ package armcomputefleet
const (
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet"
- moduleVersion = "v1.0.0"
+ moduleVersion = "v2.0.0"
)
// AcceleratorManufacturer - Accelerator manufacturers supported by Azure VMs.
@@ -188,9 +188,9 @@ func PossibleDiffDiskOptionsValues() []DiffDiskOptions {
// resource disk space for Ephemeral OS disk provisioning. For more information on
// Ephemeral OS disk size requirements, please refer Ephemeral OS disk size
// requirements for Windows VM at
-// https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements
+// https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements
// and Linux VM at
-// https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements
+// https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements
// Minimum api-version for NvmeDisk: 2024-03-01.
type DiffDiskPlacement string
@@ -215,10 +215,10 @@ func PossibleDiffDiskPlacementValues() []DiffDiskPlacement {
// DiskControllerTypes - Specifies the disk controller type configured for the VM and
// VirtualMachineScaleSet. This property is only supported for virtual machines
// whose operating system disk and VM sku supports Generation 2
-// (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please
+// (https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2), please
// check the HyperVGenerations capability returned as part of VM sku capabilities
// in the response of Microsoft.Compute SKUs api for the region contains V2
-// (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more
+// (https://learn.microsoft.com/rest/api/compute/resourceskus/list). For more
// information about Disk Controller Types supported please refer to
// https://aka.ms/azure-diskcontrollertypes.
type DiskControllerTypes string
@@ -449,10 +449,10 @@ type ManagedServiceIdentityType string
const (
// ManagedServiceIdentityTypeNone - No managed identity.
ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None"
- // ManagedServiceIdentityTypeSystemAndUserAssigned - System and user assigned managed identity.
- ManagedServiceIdentityTypeSystemAndUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned"
// ManagedServiceIdentityTypeSystemAssigned - System assigned managed identity.
ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned"
+ // ManagedServiceIdentityTypeSystemAssignedUserAssigned - System and user assigned managed identity.
+ ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned"
// ManagedServiceIdentityTypeUserAssigned - User assigned managed identity.
ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned"
)
@@ -461,8 +461,8 @@ const (
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType {
return []ManagedServiceIdentityType{
ManagedServiceIdentityTypeNone,
- ManagedServiceIdentityTypeSystemAndUserAssigned,
ManagedServiceIdentityTypeSystemAssigned,
+ ManagedServiceIdentityTypeSystemAssignedUserAssigned,
ManagedServiceIdentityTypeUserAssigned,
}
}
@@ -799,9 +799,9 @@ func PossibleSpotAllocationStrategyValues() []SpotAllocationStrategy {
// zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant
// storage. For more information regarding disks supported for Windows Virtual
// Machines, refer to
-// https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for
+// https://learn.microsoft.com/azure/virtual-machines/windows/disks-types and, for
// Linux Virtual Machines, refer to
-// https://docs.microsoft.com/azure/virtual-machines/linux/disks-types
+// https://learn.microsoft.com/azure/virtual-machines/linux/disks-types
type StorageAccountTypes string
const (
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fake/fleets_server.go b/sdk/resourcemanager/computefleet/armcomputefleet/fake/fleets_server.go
index 50095603add1..efd507989a10 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/fake/fleets_server.go
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/fake/fleets_server.go
@@ -12,7 +12,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet"
+ "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2"
"net/http"
"net/url"
"regexp"
@@ -25,7 +25,7 @@ type FleetsServer struct {
BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, fleetName string, resource armcomputefleet.Fleet, options *armcomputefleet.FleetsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armcomputefleet.FleetsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder)
// BeginDelete is the fake for method FleetsClient.BeginDelete
- // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent
+ // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent
BeginDelete func(ctx context.Context, resourceGroupName string, fleetName string, options *armcomputefleet.FleetsClientBeginDeleteOptions) (resp azfake.PollerResponder[armcomputefleet.FleetsClientDeleteResponse], errResp azfake.ErrorResponder)
// Get is the fake for method FleetsClient.Get
@@ -88,29 +88,48 @@ func (f *FleetsServerTransport) Do(req *http.Request) (*http.Response, error) {
}
func (f *FleetsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) {
- var resp *http.Response
- var err error
-
- switch method {
- case "FleetsClient.BeginCreateOrUpdate":
- resp, err = f.dispatchBeginCreateOrUpdate(req)
- case "FleetsClient.BeginDelete":
- resp, err = f.dispatchBeginDelete(req)
- case "FleetsClient.Get":
- resp, err = f.dispatchGet(req)
- case "FleetsClient.NewListByResourceGroupPager":
- resp, err = f.dispatchNewListByResourceGroupPager(req)
- case "FleetsClient.NewListBySubscriptionPager":
- resp, err = f.dispatchNewListBySubscriptionPager(req)
- case "FleetsClient.NewListVirtualMachineScaleSetsPager":
- resp, err = f.dispatchNewListVirtualMachineScaleSetsPager(req)
- case "FleetsClient.BeginUpdate":
- resp, err = f.dispatchBeginUpdate(req)
- default:
- err = fmt.Errorf("unhandled API %s", method)
- }
-
- return resp, err
+ resultChan := make(chan result)
+ defer close(resultChan)
+
+ go func() {
+ var intercepted bool
+ var res result
+ if fleetsServerTransportInterceptor != nil {
+ res.resp, res.err, intercepted = fleetsServerTransportInterceptor.Do(req)
+ }
+ if !intercepted {
+ switch method {
+ case "FleetsClient.BeginCreateOrUpdate":
+ res.resp, res.err = f.dispatchBeginCreateOrUpdate(req)
+ case "FleetsClient.BeginDelete":
+ res.resp, res.err = f.dispatchBeginDelete(req)
+ case "FleetsClient.Get":
+ res.resp, res.err = f.dispatchGet(req)
+ case "FleetsClient.NewListByResourceGroupPager":
+ res.resp, res.err = f.dispatchNewListByResourceGroupPager(req)
+ case "FleetsClient.NewListBySubscriptionPager":
+ res.resp, res.err = f.dispatchNewListBySubscriptionPager(req)
+ case "FleetsClient.NewListVirtualMachineScaleSetsPager":
+ res.resp, res.err = f.dispatchNewListVirtualMachineScaleSetsPager(req)
+ case "FleetsClient.BeginUpdate":
+ res.resp, res.err = f.dispatchBeginUpdate(req)
+ default:
+ res.err = fmt.Errorf("unhandled API %s", method)
+ }
+
+ }
+ select {
+ case resultChan <- res:
+ case <-req.Context().Done():
+ }
+ }()
+
+ select {
+ case <-req.Context().Done():
+ return nil, req.Context().Err()
+ case res := <-resultChan:
+ return res.resp, res.err
+ }
}
func (f *FleetsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) {
@@ -194,9 +213,9 @@ func (f *FleetsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re
return nil, err
}
- if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
+ if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
f.beginDelete.remove(req)
- return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
+ return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
}
if !server.PollerResponderMore(beginDelete) {
f.beginDelete.remove(req)
@@ -396,3 +415,9 @@ func (f *FleetsServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Re
return resp, nil
}
+
+// set this to conditionally intercept incoming requests to FleetsServerTransport
+var fleetsServerTransportInterceptor interface {
+ // Do returns true if the server transport should use the returned response/error
+ Do(*http.Request) (*http.Response, error, bool)
+}
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fake/internal.go b/sdk/resourcemanager/computefleet/armcomputefleet/fake/internal.go
index 56a8f624f5f3..7425b6a669e2 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/fake/internal.go
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/fake/internal.go
@@ -10,6 +10,11 @@ import (
"sync"
)
+type result struct {
+ resp *http.Response
+ err error
+}
+
type nonRetriableError struct {
error
}
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fake/operations_server.go b/sdk/resourcemanager/computefleet/armcomputefleet/fake/operations_server.go
index a86d89fb4a63..1ca70f29e52a 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/fake/operations_server.go
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/fake/operations_server.go
@@ -11,7 +11,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet"
+ "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2"
"net/http"
)
@@ -51,17 +51,36 @@ func (o *OperationsServerTransport) Do(req *http.Request) (*http.Response, error
}
func (o *OperationsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) {
- var resp *http.Response
- var err error
+ resultChan := make(chan result)
+ defer close(resultChan)
- switch method {
- case "OperationsClient.NewListPager":
- resp, err = o.dispatchNewListPager(req)
- default:
- err = fmt.Errorf("unhandled API %s", method)
- }
+ go func() {
+ var intercepted bool
+ var res result
+ if operationsServerTransportInterceptor != nil {
+ res.resp, res.err, intercepted = operationsServerTransportInterceptor.Do(req)
+ }
+ if !intercepted {
+ switch method {
+ case "OperationsClient.NewListPager":
+ res.resp, res.err = o.dispatchNewListPager(req)
+ default:
+ res.err = fmt.Errorf("unhandled API %s", method)
+ }
+
+ }
+ select {
+ case resultChan <- res:
+ case <-req.Context().Done():
+ }
+ }()
- return resp, err
+ select {
+ case <-req.Context().Done():
+ return nil, req.Context().Err()
+ case res := <-resultChan:
+ return res.resp, res.err
+ }
}
func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) {
@@ -90,3 +109,9 @@ func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*ht
}
return resp, nil
}
+
+// set this to conditionally intercept incoming requests to OperationsServerTransport
+var operationsServerTransportInterceptor interface {
+ // Do returns true if the server transport should use the returned response/error
+ Do(*http.Request) (*http.Response, error, bool)
+}
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client_example_test.go b/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client_example_test.go
index 1499fe058820..eaa30bab6889 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client_example_test.go
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/fleets_client_example_test.go
@@ -8,7 +8,7 @@ import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet"
+ "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2"
"log"
)
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/go.mod b/sdk/resourcemanager/computefleet/armcomputefleet/go.mod
index 43724ff7ef95..044b494f3b84 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/go.mod
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/go.mod
@@ -1,9 +1,9 @@
-module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet
+module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2
go 1.18
require (
- github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0
+ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
)
@@ -14,8 +14,8 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
- golang.org/x/crypto v0.25.0 // indirect
- golang.org/x/net v0.27.0 // indirect
- golang.org/x/sys v0.22.0 // indirect
- golang.org/x/text v0.16.0 // indirect
+ golang.org/x/crypto v0.27.0 // indirect
+ golang.org/x/net v0.29.0 // indirect
+ golang.org/x/sys v0.25.0 // indirect
+ golang.org/x/text v0.18.0 // indirect
)
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/go.sum b/sdk/resourcemanager/computefleet/armcomputefleet/go.sum
index 09d275cb9a37..cbddbbd9ecec 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/go.sum
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/go.sum
@@ -1,5 +1,5 @@
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww=
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 h1:JZg6HRh6W6U4OLl6lk7BZ7BLisIzM9dG1R50zUk9C/M=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0/go.mod h1:YL1xnZ6QejvQHWJrX/AvhFl4WW4rqHVoKspWNVwFk0M=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY=
@@ -17,13 +17,13 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmd
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
-golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
-golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
-golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
-golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
+golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
+golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
+golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
+golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
-golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
-golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
+golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
+golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
+golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/models.go b/sdk/resourcemanager/computefleet/armcomputefleet/models.go
index caf2d6bf4392..1f991b54b735 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/models.go
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/models.go
@@ -117,9 +117,9 @@ type BaseVirtualMachineProfile struct {
// Server operating system are:
RHEL_BYOS (for RHEL)
SLES_BYOS
// (for SUSE)
For more information, see [Azure Hybrid Use Benefit for
// Windows
- // Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
+ // Server](https://learn.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
//
[Azure Hybrid Use Benefit for Linux
- // Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
+ // Server](https://learn.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
//
Minimum api-version: 2015-06-15
LicenseType *string
@@ -229,8 +229,8 @@ type DiffDiskSettings struct {
// values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is:
// **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk**
// is used. Refer to the VM size documentation for Windows VM at
- // https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
- // https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM
+ // https://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
+ // https://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM
// sizes exposes a cache disk.
Placement *DiffDiskPlacement
}
@@ -403,7 +403,7 @@ type KeyVaultSecretReference struct {
// 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).
+// Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
type LinuxConfiguration struct {
// Specifies whether password authentication should be disabled.
DisablePasswordAuthentication *bool
@@ -679,7 +679,7 @@ 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).
+ // Azure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
KeyData *string
// Specifies the full path on the created VM where ssh public key is stored. If
@@ -908,6 +908,7 @@ type VMAttributes struct {
LocalStorageInGiB *VMAttributeMinMaxDouble
// Specifies whether the VMSize supporting local storage should be used to build Fleet or not.
+ // Included - Default if not specified as most Azure VMs support local storage.
LocalStorageSupport *VMAttributeSupport
// The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified.
@@ -991,14 +992,14 @@ type VMSizeProperties struct {
// specified in the request body the default behavior is to set it to the value of
// vCPUs available for that VM size exposed in api response of [List all available
// virtual machine sizes in a
- // region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list).
+ // region](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list).
VCPUsAvailable *int32
// Specifies the vCPU to physical core ratio. When this property is not specified
// in the request body the default behavior is set to the value of vCPUsPerCore
// for the VM Size exposed in api response of [List all available virtual machine
// sizes in a
- // region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list).
+ // region](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list).
// **Setting this property to 1 also means that hyper-threading is disabled.**
VCPUsPerCore *int32
}
@@ -1018,16 +1019,16 @@ type VaultCertificate struct {
// This is the URL of a certificate that has been uploaded to Key Vault as a
// secret. For adding a secret to the Key Vault, see [Add a key or secret to the
// key
- // vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add).
+ // vault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add).
// In this case, your certificate needs to be It is the Base64 encoding of the
// following JSON Object which is encoded in UTF-8:
{
// "data":"",
"dataType":"pfx",
// "password":""
}
To install certificates on a virtual
// machine it is recommended to use the [Azure Key Vault virtual machine extension
// for
- // Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
+ // Linux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
// or the [Azure Key Vault virtual machine extension for
- // Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
+ // Windows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
CertificateURL *string
}
@@ -1419,10 +1420,10 @@ type VirtualMachineScaleSetOSProfile struct {
// "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)
+ // VM](https://learn.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)
+ // Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)
AdminPassword *string
// Specifies the name of the administrator account.
**Windows-only
@@ -1448,12 +1449,12 @@ type VirtualMachineScaleSetOSProfile struct {
// is decoded to a binary array that is saved as a file on the Virtual Machine.
// The maximum length of the binary array is 65535 bytes. For using cloud-init for
// your VM, see [Using cloud-init to customize a Linux VM during
- // creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)
+ // creation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init)
CustomData *string
// 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).
+ // Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
LinuxConfiguration *LinuxConfiguration
// Optional property which must either be set to True or omitted.
@@ -1462,9 +1463,9 @@ type VirtualMachineScaleSetOSProfile struct {
// Specifies set of certificates that should be installed onto the virtual
// machines in the scale set. To install certificates on a virtual machine it is
// recommended to use the [Azure Key Vault virtual machine extension for
- // Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
+ // Linux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
// or the [Azure Key Vault virtual machine extension for
- // Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
+ // Windows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
Secrets []*VaultSecretGroup
// Specifies Windows operating system settings on the virtual machine.
@@ -1531,7 +1532,7 @@ type VirtualMachineScaleSetStorageProfile struct {
// Specifies the parameters that are used to add data disks to the virtual
// machines in the scale set. For more information about disks, see [About disks
// and VHDs for Azure virtual
- // machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
+ // machines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).
DataDisks []*VirtualMachineScaleSetDataDisk
// Specifies the disk controller type configured for the virtual machines in the scale set. Minimum api-version: 2022-08-01
@@ -1546,7 +1547,7 @@ type VirtualMachineScaleSetStorageProfile struct {
// Specifies information about the operating system disk used by the virtual
// machines in the scale set. For more information about disks, see [About disks
// and VHDs for Azure virtual
- // machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
+ // machines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).
OSDisk *VirtualMachineScaleSetOSDisk
}
@@ -1561,16 +1562,16 @@ type WinRMListener struct {
// This is the URL of a certificate that has been uploaded to Key Vault as a
// secret. For adding a secret to the Key Vault, see [Add a key or secret to the
// key
- // vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add).
+ // vault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add).
// In this case, your certificate needs to be the Base64 encoding of the following
// JSON Object which is encoded in UTF-8:
{
// "data":"",
"dataType":"pfx",
// "password":""
}
To install certificates on a virtual
// machine it is recommended to use the [Azure Key Vault virtual machine extension
// for
- // Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
+ // Linux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)
// or the [Azure Key Vault virtual machine extension for
- // Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
+ // Windows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
CertificateURL *string
// Specifies the protocol of WinRM listener. Possible values are: **http,**
@@ -1604,9 +1605,9 @@ type WindowsConfiguration struct {
// Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".
// Possible values can be
- // [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id)
+ // [TimeZoneInfo.Id](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id)
// value from time zones returned by
- // [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones).
+ // [TimeZoneInfo.GetSystemTimeZones](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones).
TimeZone *string
// Specifies the Windows Remote Management listeners. This enables remote Windows
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/operations_client_example_test.go b/sdk/resourcemanager/computefleet/armcomputefleet/operations_client_example_test.go
index 9ba1df570e27..306f65f68a20 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/operations_client_example_test.go
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/operations_client_example_test.go
@@ -7,7 +7,7 @@ package armcomputefleet_test
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet"
+ "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computefleet/armcomputefleet/v2"
"log"
)
diff --git a/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml b/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml
index c8d950e137b2..20ad887ace9c 100644
--- a/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml
+++ b/sdk/resourcemanager/computefleet/armcomputefleet/tsp-location.yaml
@@ -1,4 +1,4 @@
directory: specification/azurefleet/AzureFleet.Management
-commit: c120171b3684d88562fa26ae7db5d22b7bfa95d8
+commit: 92214b1faaad098434ae37b69fcc896fdf8ecc8c
repo: Azure/azure-rest-api-specs
-additionalDirectories:
+additionalDirectories:
\ No newline at end of file
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/CHANGELOG.md b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/CHANGELOG.md
index 3a3e8181ab5f..88f28c6fd9c8 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/CHANGELOG.md
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/CHANGELOG.md
@@ -1,5 +1,80 @@
# Release History
+## 1.0.0 (2024-12-11)
+### Breaking Changes
+
+- Type of `CreateAndMountFileShareConfiguration.ConfigurationType` has been changed from `*ConfigurationType` to `*FileShareConfigurationType`
+- Type of `ErrorAdditionalInfo.Info` has been changed from `any` to `*ErrorAdditionalInfoInfo`
+- Type of `FileShareConfiguration.ConfigurationType` has been changed from `*ConfigurationType` to `*FileShareConfigurationType`
+- Type of `MountFileShareConfiguration.ConfigurationType` has been changed from `*ConfigurationType` to `*FileShareConfigurationType`
+- Type of `OperationStatusResult.PercentComplete` has been changed from `*float32` to `*float64`
+- Type of `SAPVirtualInstance.Identity` has been changed from `*UserAssignedServiceIdentity` to `*SAPVirtualInstanceIdentity`
+- Type of `SkipFileShareConfiguration.ConfigurationType` has been changed from `*ConfigurationType` to `*FileShareConfigurationType`
+- Type of `UpdateSAPVirtualInstanceRequest.Identity` has been changed from `*UserAssignedServiceIdentity` to `*SAPVirtualInstanceIdentity`
+- Enum `ConfigurationType` has been removed
+- Enum `ManagedServiceIdentityType` has been removed
+- Function `*ClientFactory.NewSAPCentralInstancesClient` has been removed
+- Function `*ClientFactory.NewWorkloadsClient` has been removed
+- Function `*SAPApplicationServerInstancesClient.BeginStartInstance` has been removed
+- Function `*SAPApplicationServerInstancesClient.BeginStopInstance` has been removed
+- Function `NewSAPCentralInstancesClient` has been removed
+- Function `*SAPCentralInstancesClient.BeginCreate` has been removed
+- Function `*SAPCentralInstancesClient.BeginDelete` has been removed
+- Function `*SAPCentralInstancesClient.Get` has been removed
+- Function `*SAPCentralInstancesClient.NewListPager` has been removed
+- Function `*SAPCentralInstancesClient.BeginStartInstance` has been removed
+- Function `*SAPCentralInstancesClient.BeginStopInstance` has been removed
+- Function `*SAPCentralInstancesClient.Update` has been removed
+- Function `*SAPDatabaseInstancesClient.BeginStartInstance` has been removed
+- Function `*SAPDatabaseInstancesClient.BeginStopInstance` has been removed
+- Function `NewWorkloadsClient` has been removed
+- Function `*WorkloadsClient.SAPAvailabilityZoneDetails` has been removed
+- Function `*WorkloadsClient.SAPDiskConfigurations` has been removed
+- Function `*WorkloadsClient.SAPSizingRecommendations` has been removed
+- Function `*WorkloadsClient.SAPSupportedSKU` has been removed
+- Struct `SAPApplicationServerInstanceList` has been removed
+- Struct `SAPCentralInstanceList` has been removed
+- Struct `SAPDatabaseInstanceList` has been removed
+- Struct `SAPVirtualInstanceList` has been removed
+- Struct `UserAssignedServiceIdentity` has been removed
+- Field `SAPApplicationServerInstanceList` of struct `SAPApplicationServerInstancesClientListResponse` has been removed
+- Field `SAPDatabaseInstanceList` of struct `SAPDatabaseInstancesClientListResponse` has been removed
+- Field `SAPVirtualInstanceList` of struct `SAPVirtualInstancesClientListByResourceGroupResponse` has been removed
+- Field `SAPVirtualInstanceList` of struct `SAPVirtualInstancesClientListBySubscriptionResponse` has been removed
+
+### Features Added
+
+- New enum type `FileShareConfigurationType` with values `FileShareConfigurationTypeCreateAndMount`, `FileShareConfigurationTypeMount`, `FileShareConfigurationTypeSkip`
+- New enum type `SAPVirtualInstanceIdentityType` with values `SAPVirtualInstanceIdentityTypeNone`, `SAPVirtualInstanceIdentityTypeUserAssigned`
+- New function `*ClientFactory.NewSAPCentralServerInstancesClient() *SAPCentralServerInstancesClient`
+- New function `*SAPApplicationServerInstancesClient.BeginStart(context.Context, string, string, string, *SAPApplicationServerInstancesClientBeginStartOptions) (*runtime.Poller[SAPApplicationServerInstancesClientStartResponse], error)`
+- New function `*SAPApplicationServerInstancesClient.BeginStop(context.Context, string, string, string, *SAPApplicationServerInstancesClientBeginStopOptions) (*runtime.Poller[SAPApplicationServerInstancesClientStopResponse], error)`
+- New function `NewSAPCentralServerInstancesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SAPCentralServerInstancesClient, error)`
+- New function `*SAPCentralServerInstancesClient.BeginCreate(context.Context, string, string, string, SAPCentralServerInstance, *SAPCentralServerInstancesClientBeginCreateOptions) (*runtime.Poller[SAPCentralServerInstancesClientCreateResponse], error)`
+- New function `*SAPCentralServerInstancesClient.BeginDelete(context.Context, string, string, string, *SAPCentralServerInstancesClientBeginDeleteOptions) (*runtime.Poller[SAPCentralServerInstancesClientDeleteResponse], error)`
+- New function `*SAPCentralServerInstancesClient.Get(context.Context, string, string, string, *SAPCentralServerInstancesClientGetOptions) (SAPCentralServerInstancesClientGetResponse, error)`
+- New function `*SAPCentralServerInstancesClient.NewListPager(string, string, *SAPCentralServerInstancesClientListOptions) *runtime.Pager[SAPCentralServerInstancesClientListResponse]`
+- New function `*SAPCentralServerInstancesClient.BeginStart(context.Context, string, string, string, *SAPCentralServerInstancesClientBeginStartOptions) (*runtime.Poller[SAPCentralServerInstancesClientStartResponse], error)`
+- New function `*SAPCentralServerInstancesClient.BeginStop(context.Context, string, string, string, *SAPCentralServerInstancesClientBeginStopOptions) (*runtime.Poller[SAPCentralServerInstancesClientStopResponse], error)`
+- New function `*SAPCentralServerInstancesClient.Update(context.Context, string, string, string, UpdateSAPCentralInstanceRequest, *SAPCentralServerInstancesClientUpdateOptions) (SAPCentralServerInstancesClientUpdateResponse, error)`
+- New function `*SAPDatabaseInstancesClient.BeginStart(context.Context, string, string, string, *SAPDatabaseInstancesClientBeginStartOptions) (*runtime.Poller[SAPDatabaseInstancesClientStartResponse], error)`
+- New function `*SAPDatabaseInstancesClient.BeginStop(context.Context, string, string, string, *SAPDatabaseInstancesClientBeginStopOptions) (*runtime.Poller[SAPDatabaseInstancesClientStopResponse], error)`
+- New function `*SAPVirtualInstancesClient.GetAvailabilityZoneDetails(context.Context, string, SAPAvailabilityZoneDetailsRequest, *SAPVirtualInstancesClientGetAvailabilityZoneDetailsOptions) (SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse, error)`
+- New function `*SAPVirtualInstancesClient.GetDiskConfigurations(context.Context, string, SAPDiskConfigurationsRequest, *SAPVirtualInstancesClientGetDiskConfigurationsOptions) (SAPVirtualInstancesClientGetDiskConfigurationsResponse, error)`
+- New function `*SAPVirtualInstancesClient.GetSapSupportedSKU(context.Context, string, SAPSupportedSKUsRequest, *SAPVirtualInstancesClientGetSapSupportedSKUOptions) (SAPVirtualInstancesClientGetSapSupportedSKUResponse, error)`
+- New function `*SAPVirtualInstancesClient.GetSizingRecommendations(context.Context, string, SAPSizingRecommendationRequest, *SAPVirtualInstancesClientGetSizingRecommendationsOptions) (SAPVirtualInstancesClientGetSizingRecommendationsResponse, error)`
+- New struct `ErrorAdditionalInfoInfo`
+- New struct `SAPApplicationServerInstanceListResult`
+- New struct `SAPCentralServerInstanceListResult`
+- New struct `SAPDatabaseInstanceListResult`
+- New struct `SAPVirtualInstanceIdentity`
+- New struct `SAPVirtualInstanceListResult`
+- New anonymous field `SAPApplicationServerInstanceListResult` in struct `SAPApplicationServerInstancesClientListResponse`
+- New anonymous field `SAPDatabaseInstanceListResult` in struct `SAPDatabaseInstancesClientListResponse`
+- New anonymous field `SAPVirtualInstanceListResult` in struct `SAPVirtualInstancesClientListByResourceGroupResponse`
+- New anonymous field `SAPVirtualInstanceListResult` in struct `SAPVirtualInstancesClientListBySubscriptionResponse`
+
+
## 0.1.0 (2024-02-23)
### Other Changes
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/autorest.md b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/autorest.md
deleted file mode 100644
index d90afb2e7ea1..000000000000
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/autorest.md
+++ /dev/null
@@ -1,13 +0,0 @@
-### AutoRest Configuration
-
-> see https://aka.ms/autorest
-
-``` yaml
-azure-arm: true
-require:
-- https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/readme.md
-- https://github.com/Azure/azure-rest-api-specs/blob/b1e318cbfd2e239db54c80af5e6aea7fdf658851/specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/readme.go.md
-license-header: MICROSOFT_MIT_NO_VERSION
-module-version: 0.1.0
-tag: package-preview-2023-10
-```
\ No newline at end of file
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/build.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/build.go
deleted file mode 100644
index 17e40c7f3d7d..000000000000
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/build.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-
-// This file enables 'go generate' to regenerate this specific SDK
-//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -alwaysSetBodyParamRequired -removeUnreferencedTypes resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance
-
-package armworkloadssapvirtualinstance
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/client_factory.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/client_factory.go
index caba65f1dc75..750a53c4eaea 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/client_factory.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/client_factory.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -22,7 +18,7 @@ type ClientFactory struct {
// 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.
+// - subscriptionID - The ID of the target subscription. The value must be an UUID.
// - credential - used to authorize requests. Usually a credential from azidentity.
// - options - pass nil to accept the default values.
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) {
@@ -51,9 +47,9 @@ func (c *ClientFactory) NewSAPApplicationServerInstancesClient() *SAPApplication
}
}
-// NewSAPCentralInstancesClient creates a new instance of SAPCentralInstancesClient.
-func (c *ClientFactory) NewSAPCentralInstancesClient() *SAPCentralInstancesClient {
- return &SAPCentralInstancesClient{
+// NewSAPCentralServerInstancesClient creates a new instance of SAPCentralServerInstancesClient.
+func (c *ClientFactory) NewSAPCentralServerInstancesClient() *SAPCentralServerInstancesClient {
+ return &SAPCentralServerInstancesClient{
subscriptionID: c.subscriptionID,
internal: c.internal,
}
@@ -74,11 +70,3 @@ func (c *ClientFactory) NewSAPVirtualInstancesClient() *SAPVirtualInstancesClien
internal: c.internal,
}
}
-
-// NewWorkloadsClient creates a new instance of WorkloadsClient.
-func (c *ClientFactory) NewWorkloadsClient() *WorkloadsClient {
- return &WorkloadsClient{
- subscriptionID: c.subscriptionID,
- internal: c.internal,
- }
-}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/constants.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/constants.go
index 8e5f27f91544..0d5a498238cf 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/constants.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/constants.go
@@ -1,22 +1,19 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
const (
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance"
- moduleVersion = "v0.1.0"
+ moduleVersion = "v1.0.0"
)
-// ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+// ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
type ActionType string
const (
+ // ActionTypeInternal - Actions are for internal-only APIs.
ActionTypeInternal ActionType = "Internal"
)
@@ -31,8 +28,11 @@ func PossibleActionTypeValues() []ActionType {
type ApplicationServerVirtualMachineType string
const (
- ApplicationServerVirtualMachineTypeActive ApplicationServerVirtualMachineType = "Active"
+ // ApplicationServerVirtualMachineTypeActive - Active Application server vm type.
+ ApplicationServerVirtualMachineTypeActive ApplicationServerVirtualMachineType = "Active"
+ // ApplicationServerVirtualMachineTypeStandby - Standby Application server vm type.
ApplicationServerVirtualMachineTypeStandby ApplicationServerVirtualMachineType = "Standby"
+ // ApplicationServerVirtualMachineTypeUnknown - Unknown Application server vm type.
ApplicationServerVirtualMachineTypeUnknown ApplicationServerVirtualMachineType = "Unknown"
)
@@ -49,13 +49,20 @@ func PossibleApplicationServerVirtualMachineTypeValues() []ApplicationServerVirt
type CentralServerVirtualMachineType string
const (
- CentralServerVirtualMachineTypeASCS CentralServerVirtualMachineType = "ASCS"
- CentralServerVirtualMachineTypeERS CentralServerVirtualMachineType = "ERS"
+ // CentralServerVirtualMachineTypeASCS - ASCS Central server vm type.
+ CentralServerVirtualMachineTypeASCS CentralServerVirtualMachineType = "ASCS"
+ // CentralServerVirtualMachineTypeERS - ERS Central server vm type.
+ CentralServerVirtualMachineTypeERS CentralServerVirtualMachineType = "ERS"
+ // CentralServerVirtualMachineTypeERSInactive - ERSInactive Central server vm type.
CentralServerVirtualMachineTypeERSInactive CentralServerVirtualMachineType = "ERSInactive"
- CentralServerVirtualMachineTypePrimary CentralServerVirtualMachineType = "Primary"
- CentralServerVirtualMachineTypeSecondary CentralServerVirtualMachineType = "Secondary"
- CentralServerVirtualMachineTypeStandby CentralServerVirtualMachineType = "Standby"
- CentralServerVirtualMachineTypeUnknown CentralServerVirtualMachineType = "Unknown"
+ // CentralServerVirtualMachineTypePrimary - Primary central server vm.
+ CentralServerVirtualMachineTypePrimary CentralServerVirtualMachineType = "Primary"
+ // CentralServerVirtualMachineTypeSecondary - Secondary central server vm.
+ CentralServerVirtualMachineTypeSecondary CentralServerVirtualMachineType = "Secondary"
+ // CentralServerVirtualMachineTypeStandby - Standby Central server vm type.
+ CentralServerVirtualMachineTypeStandby CentralServerVirtualMachineType = "Standby"
+ // CentralServerVirtualMachineTypeUnknown - Central server vm type unknown.
+ CentralServerVirtualMachineTypeUnknown CentralServerVirtualMachineType = "Unknown"
)
// PossibleCentralServerVirtualMachineTypeValues returns the possible values for the CentralServerVirtualMachineType const type.
@@ -71,32 +78,18 @@ func PossibleCentralServerVirtualMachineTypeValues() []CentralServerVirtualMachi
}
}
-// ConfigurationType - The type of file share config.
-type ConfigurationType string
-
-const (
- ConfigurationTypeCreateAndMount ConfigurationType = "CreateAndMount"
- ConfigurationTypeMount ConfigurationType = "Mount"
- ConfigurationTypeSkip ConfigurationType = "Skip"
-)
-
-// PossibleConfigurationTypeValues returns the possible values for the ConfigurationType const type.
-func PossibleConfigurationTypeValues() []ConfigurationType {
- return []ConfigurationType{
- ConfigurationTypeCreateAndMount,
- ConfigurationTypeMount,
- ConfigurationTypeSkip,
- }
-}
-
-// CreatedByType - The type of identity that created the resource.
+// CreatedByType - The kind of entity that created the resource.
type CreatedByType string
const (
- CreatedByTypeApplication CreatedByType = "Application"
- CreatedByTypeKey CreatedByType = "Key"
+ // CreatedByTypeApplication - The entity was created by an application.
+ CreatedByTypeApplication CreatedByType = "Application"
+ // CreatedByTypeKey - The entity was created by a key.
+ CreatedByTypeKey CreatedByType = "Key"
+ // CreatedByTypeManagedIdentity - The entity was created by a managed identity.
CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
- CreatedByTypeUser CreatedByType = "User"
+ // CreatedByTypeUser - The entity was created by a user.
+ CreatedByTypeUser CreatedByType = "User"
)
// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
@@ -113,13 +106,20 @@ func PossibleCreatedByTypeValues() []CreatedByType {
type DiskSKUName string
const (
- DiskSKUNamePremiumLRS DiskSKUName = "Premium_LRS"
- DiskSKUNamePremiumV2LRS DiskSKUName = "PremiumV2_LRS"
- DiskSKUNamePremiumZRS DiskSKUName = "Premium_ZRS"
- DiskSKUNameStandardLRS DiskSKUName = "Standard_LRS"
+ // DiskSKUNamePremiumLRS - Premium_LRS Disk SKU.
+ DiskSKUNamePremiumLRS DiskSKUName = "Premium_LRS"
+ // DiskSKUNamePremiumV2LRS - PremiumV2_LRS Disk SKU.
+ DiskSKUNamePremiumV2LRS DiskSKUName = "PremiumV2_LRS"
+ // DiskSKUNamePremiumZRS - Premium_ZRS Disk SKU.
+ DiskSKUNamePremiumZRS DiskSKUName = "Premium_ZRS"
+ // DiskSKUNameStandardLRS - Standard LRS Disk SKU.
+ DiskSKUNameStandardLRS DiskSKUName = "Standard_LRS"
+ // DiskSKUNameStandardSSDLRS - StandardSSD_LRS Disk SKU.
DiskSKUNameStandardSSDLRS DiskSKUName = "StandardSSD_LRS"
+ // DiskSKUNameStandardSSDZRS - StandardSSD_ZRS Disk SKU.
DiskSKUNameStandardSSDZRS DiskSKUName = "StandardSSD_ZRS"
- DiskSKUNameUltraSSDLRS DiskSKUName = "UltraSSD_LRS"
+ // DiskSKUNameUltraSSDLRS - UltraSSD_LRS Disk SKU.
+ DiskSKUNameUltraSSDLRS DiskSKUName = "UltraSSD_LRS"
)
// PossibleDiskSKUNameValues returns the possible values for the DiskSKUName const type.
@@ -139,7 +139,9 @@ func PossibleDiskSKUNameValues() []DiskSKUName {
type EnqueueReplicationServerType string
const (
+ // EnqueueReplicationServerTypeEnqueueReplicator1 - Enqueue Replication server type 1.
EnqueueReplicationServerTypeEnqueueReplicator1 EnqueueReplicationServerType = "EnqueueReplicator1"
+ // EnqueueReplicationServerTypeEnqueueReplicator2 - Enqueue Replication server type 2.
EnqueueReplicationServerTypeEnqueueReplicator2 EnqueueReplicationServerType = "EnqueueReplicator2"
)
@@ -151,12 +153,35 @@ func PossibleEnqueueReplicationServerTypeValues() []EnqueueReplicationServerType
}
}
+// FileShareConfigurationType - The type of file share config.
+type FileShareConfigurationType string
+
+const (
+ // FileShareConfigurationTypeCreateAndMount - Fileshare will be created and mounted by service.
+ FileShareConfigurationTypeCreateAndMount FileShareConfigurationType = "CreateAndMount"
+ // FileShareConfigurationTypeMount - Existing fileshare provided will be mounted by service.
+ FileShareConfigurationTypeMount FileShareConfigurationType = "Mount"
+ // FileShareConfigurationTypeSkip - Skip creating the file share.
+ FileShareConfigurationTypeSkip FileShareConfigurationType = "Skip"
+)
+
+// PossibleFileShareConfigurationTypeValues returns the possible values for the FileShareConfigurationType const type.
+func PossibleFileShareConfigurationTypeValues() []FileShareConfigurationType {
+ return []FileShareConfigurationType{
+ FileShareConfigurationTypeCreateAndMount,
+ FileShareConfigurationTypeMount,
+ FileShareConfigurationTypeSkip,
+ }
+}
+
// ManagedResourcesNetworkAccessType - Defines the network access type for managed resources.
type ManagedResourcesNetworkAccessType string
const (
+ // ManagedResourcesNetworkAccessTypePrivate - Managed resources will be deployed with public network access disabled.
ManagedResourcesNetworkAccessTypePrivate ManagedResourcesNetworkAccessType = "Private"
- ManagedResourcesNetworkAccessTypePublic ManagedResourcesNetworkAccessType = "Public"
+ // ManagedResourcesNetworkAccessTypePublic - Managed resources will be deployed with public network access enabled.
+ ManagedResourcesNetworkAccessTypePublic ManagedResourcesNetworkAccessType = "Public"
)
// PossibleManagedResourcesNetworkAccessTypeValues returns the possible values for the ManagedResourcesNetworkAccessType const type.
@@ -167,26 +192,11 @@ func PossibleManagedResourcesNetworkAccessTypeValues() []ManagedResourcesNetwork
}
}
-// ManagedServiceIdentityType - Type of managed service identity (only None, UserAssigned types are allowed).
-type ManagedServiceIdentityType string
-
-const (
- ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None"
- ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned"
-)
-
-// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.
-func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType {
- return []ManagedServiceIdentityType{
- ManagedServiceIdentityTypeNone,
- ManagedServiceIdentityTypeUserAssigned,
- }
-}
-
// NamingPatternType - The pattern type to be used for resource naming.
type NamingPatternType string
const (
+ // NamingPatternTypeFullResourceName - Full resource names that will be created by service.
NamingPatternTypeFullResourceName NamingPatternType = "FullResourceName"
)
@@ -201,7 +211,9 @@ func PossibleNamingPatternTypeValues() []NamingPatternType {
type OSType string
const (
- OSTypeLinux OSType = "Linux"
+ // OSTypeLinux - Linux OS Type.
+ OSTypeLinux OSType = "Linux"
+ // OSTypeWindows - Windows OS Type.
OSTypeWindows OSType = "Windows"
)
@@ -218,8 +230,11 @@ func PossibleOSTypeValues() []OSType {
type Origin string
const (
- OriginSystem Origin = "system"
- OriginUser Origin = "user"
+ // OriginSystem - Indicates the operation is initiated by a system.
+ OriginSystem Origin = "system"
+ // OriginUser - Indicates the operation is initiated by a user.
+ OriginUser Origin = "user"
+ // OriginUserSystem - Indicates the operation is initiated by a user or system.
OriginUserSystem Origin = "user,system"
)
@@ -236,9 +251,12 @@ func PossibleOriginValues() []Origin {
type SAPConfigurationType string
const (
- SAPConfigurationTypeDeployment SAPConfigurationType = "Deployment"
+ // SAPConfigurationTypeDeployment - SAP system will be deployed by service. No OS configurations will be done.
+ SAPConfigurationTypeDeployment SAPConfigurationType = "Deployment"
+ // SAPConfigurationTypeDeploymentWithOSConfig - SAP system will be deployed by service. OS configurations will be done.
SAPConfigurationTypeDeploymentWithOSConfig SAPConfigurationType = "DeploymentWithOSConfig"
- SAPConfigurationTypeDiscovery SAPConfigurationType = "Discovery"
+ // SAPConfigurationTypeDiscovery - Existing SAP system will be registered.
+ SAPConfigurationTypeDiscovery SAPConfigurationType = "Discovery"
)
// PossibleSAPConfigurationTypeValues returns the possible values for the SAPConfigurationType const type.
@@ -254,6 +272,7 @@ func PossibleSAPConfigurationTypeValues() []SAPConfigurationType {
type SAPDatabaseScaleMethod string
const (
+ // SAPDatabaseScaleMethodScaleUp - ScaleUp Hana Database deployment type
SAPDatabaseScaleMethodScaleUp SAPDatabaseScaleMethod = "ScaleUp"
)
@@ -268,7 +287,9 @@ func PossibleSAPDatabaseScaleMethodValues() []SAPDatabaseScaleMethod {
type SAPDatabaseType string
const (
- SAPDatabaseTypeDB2 SAPDatabaseType = "DB2"
+ // SAPDatabaseTypeDB2 - DB2 database type of the SAP system.
+ SAPDatabaseTypeDB2 SAPDatabaseType = "DB2"
+ // SAPDatabaseTypeHANA - HANA Database type of SAP system.
SAPDatabaseTypeHANA SAPDatabaseType = "HANA"
)
@@ -284,8 +305,10 @@ func PossibleSAPDatabaseTypeValues() []SAPDatabaseType {
type SAPDeploymentType string
const (
+ // SAPDeploymentTypeSingleServer - SAP Single server deployment type.
SAPDeploymentTypeSingleServer SAPDeploymentType = "SingleServer"
- SAPDeploymentTypeThreeTier SAPDeploymentType = "ThreeTier"
+ // SAPDeploymentTypeThreeTier - SAP Distributed deployment type.
+ SAPDeploymentTypeThreeTier SAPDeploymentType = "ThreeTier"
)
// PossibleSAPDeploymentTypeValues returns the possible values for the SAPDeploymentType const type.
@@ -300,8 +323,10 @@ func PossibleSAPDeploymentTypeValues() []SAPDeploymentType {
type SAPEnvironmentType string
const (
+ // SAPEnvironmentTypeNonProd - Non Production SAP system.
SAPEnvironmentTypeNonProd SAPEnvironmentType = "NonProd"
- SAPEnvironmentTypeProd SAPEnvironmentType = "Prod"
+ // SAPEnvironmentTypeProd - Production SAP system.
+ SAPEnvironmentTypeProd SAPEnvironmentType = "Prod"
)
// PossibleSAPEnvironmentTypeValues returns the possible values for the SAPEnvironmentType const type.
@@ -316,10 +341,14 @@ func PossibleSAPEnvironmentTypeValues() []SAPEnvironmentType {
type SAPHealthState string
const (
- SAPHealthStateDegraded SAPHealthState = "Degraded"
- SAPHealthStateHealthy SAPHealthState = "Healthy"
+ // SAPHealthStateDegraded - SAP System health is degraded.
+ SAPHealthStateDegraded SAPHealthState = "Degraded"
+ // SAPHealthStateHealthy - SAP System health is healthy.
+ SAPHealthStateHealthy SAPHealthState = "Healthy"
+ // SAPHealthStateUnhealthy - SAP System is unhealthy.
SAPHealthStateUnhealthy SAPHealthState = "Unhealthy"
- SAPHealthStateUnknown SAPHealthState = "Unknown"
+ // SAPHealthStateUnknown - SAP System health is unknown.
+ SAPHealthStateUnknown SAPHealthState = "Unknown"
)
// PossibleSAPHealthStateValues returns the possible values for the SAPHealthState const type.
@@ -336,7 +365,9 @@ func PossibleSAPHealthStateValues() []SAPHealthState {
type SAPHighAvailabilityType string
const (
- SAPHighAvailabilityTypeAvailabilitySet SAPHighAvailabilityType = "AvailabilitySet"
+ // SAPHighAvailabilityTypeAvailabilitySet - HA deployment with availability sets.
+ SAPHighAvailabilityTypeAvailabilitySet SAPHighAvailabilityType = "AvailabilitySet"
+ // SAPHighAvailabilityTypeAvailabilityZone - HA deployment with availability zones.
SAPHighAvailabilityTypeAvailabilityZone SAPHighAvailabilityType = "AvailabilityZone"
)
@@ -352,8 +383,11 @@ func PossibleSAPHighAvailabilityTypeValues() []SAPHighAvailabilityType {
type SAPProductType string
const (
- SAPProductTypeECC SAPProductType = "ECC"
- SAPProductTypeOther SAPProductType = "Other"
+ // SAPProductTypeECC - SAP Product ECC.
+ SAPProductTypeECC SAPProductType = "ECC"
+ // SAPProductTypeOther - SAP Products other than the ones listed.
+ SAPProductTypeOther SAPProductType = "Other"
+ // SAPProductTypeS4HANA - SAP Product S4HANA.
SAPProductTypeS4HANA SAPProductType = "S4HANA"
)
@@ -370,9 +404,12 @@ func PossibleSAPProductTypeValues() []SAPProductType {
type SAPSoftwareInstallationType string
const (
- SAPSoftwareInstallationTypeExternal SAPSoftwareInstallationType = "External"
+ // SAPSoftwareInstallationTypeExternal - External software installation type.
+ SAPSoftwareInstallationTypeExternal SAPSoftwareInstallationType = "External"
+ // SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig - SAP Install without OS Config.
SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig SAPSoftwareInstallationType = "SAPInstallWithoutOSConfig"
- SAPSoftwareInstallationTypeServiceInitiated SAPSoftwareInstallationType = "ServiceInitiated"
+ // SAPSoftwareInstallationTypeServiceInitiated - SAP Install managed by service.
+ SAPSoftwareInstallationTypeServiceInitiated SAPSoftwareInstallationType = "ServiceInitiated"
)
// PossibleSAPSoftwareInstallationTypeValues returns the possible values for the SAPSoftwareInstallationType const type.
@@ -384,23 +421,55 @@ func PossibleSAPSoftwareInstallationTypeValues() []SAPSoftwareInstallationType {
}
}
+// SAPVirtualInstanceIdentityType - Type of managed service identity (where only None and UserAssigned types are allowed).
+type SAPVirtualInstanceIdentityType string
+
+const (
+ // SAPVirtualInstanceIdentityTypeNone - No managed identity.
+ SAPVirtualInstanceIdentityTypeNone SAPVirtualInstanceIdentityType = "None"
+ // SAPVirtualInstanceIdentityTypeUserAssigned - User assigned managed identity.
+ SAPVirtualInstanceIdentityTypeUserAssigned SAPVirtualInstanceIdentityType = "UserAssigned"
+)
+
+// PossibleSAPVirtualInstanceIdentityTypeValues returns the possible values for the SAPVirtualInstanceIdentityType const type.
+func PossibleSAPVirtualInstanceIdentityTypeValues() []SAPVirtualInstanceIdentityType {
+ return []SAPVirtualInstanceIdentityType{
+ SAPVirtualInstanceIdentityTypeNone,
+ SAPVirtualInstanceIdentityTypeUserAssigned,
+ }
+}
+
// SAPVirtualInstanceState - Defines the Virtual Instance for SAP state.
type SAPVirtualInstanceState string
const (
- SAPVirtualInstanceStateACSSInstallationBlocked SAPVirtualInstanceState = "ACSSInstallationBlocked"
- SAPVirtualInstanceStateDiscoveryFailed SAPVirtualInstanceState = "DiscoveryFailed"
- SAPVirtualInstanceStateDiscoveryInProgress SAPVirtualInstanceState = "DiscoveryInProgress"
- SAPVirtualInstanceStateDiscoveryPending SAPVirtualInstanceState = "DiscoveryPending"
- SAPVirtualInstanceStateInfrastructureDeploymentFailed SAPVirtualInstanceState = "InfrastructureDeploymentFailed"
+ // SAPVirtualInstanceStateACSSInstallationBlocked - ACSS installation cannot proceed.
+ SAPVirtualInstanceStateACSSInstallationBlocked SAPVirtualInstanceState = "ACSSInstallationBlocked"
+ // SAPVirtualInstanceStateDiscoveryFailed - Registration has failed.
+ SAPVirtualInstanceStateDiscoveryFailed SAPVirtualInstanceState = "DiscoveryFailed"
+ // SAPVirtualInstanceStateDiscoveryInProgress - Registration is in progress.
+ SAPVirtualInstanceStateDiscoveryInProgress SAPVirtualInstanceState = "DiscoveryInProgress"
+ // SAPVirtualInstanceStateDiscoveryPending - Registration has not started.
+ SAPVirtualInstanceStateDiscoveryPending SAPVirtualInstanceState = "DiscoveryPending"
+ // SAPVirtualInstanceStateInfrastructureDeploymentFailed - Infrastructure deployment has failed.
+ SAPVirtualInstanceStateInfrastructureDeploymentFailed SAPVirtualInstanceState = "InfrastructureDeploymentFailed"
+ // SAPVirtualInstanceStateInfrastructureDeploymentInProgress - Infrastructure deployment is in progress.
SAPVirtualInstanceStateInfrastructureDeploymentInProgress SAPVirtualInstanceState = "InfrastructureDeploymentInProgress"
- SAPVirtualInstanceStateInfrastructureDeploymentPending SAPVirtualInstanceState = "InfrastructureDeploymentPending"
- SAPVirtualInstanceStateRegistrationComplete SAPVirtualInstanceState = "RegistrationComplete"
- SAPVirtualInstanceStateSoftwareDetectionFailed SAPVirtualInstanceState = "SoftwareDetectionFailed"
- SAPVirtualInstanceStateSoftwareDetectionInProgress SAPVirtualInstanceState = "SoftwareDetectionInProgress"
- SAPVirtualInstanceStateSoftwareInstallationFailed SAPVirtualInstanceState = "SoftwareInstallationFailed"
- SAPVirtualInstanceStateSoftwareInstallationInProgress SAPVirtualInstanceState = "SoftwareInstallationInProgress"
- SAPVirtualInstanceStateSoftwareInstallationPending SAPVirtualInstanceState = "SoftwareInstallationPending"
+ // SAPVirtualInstanceStateInfrastructureDeploymentPending - Infrastructure is not yet deployed.
+ SAPVirtualInstanceStateInfrastructureDeploymentPending SAPVirtualInstanceState = "InfrastructureDeploymentPending"
+ // SAPVirtualInstanceStateRegistrationComplete - Registration is complete.
+ SAPVirtualInstanceStateRegistrationComplete SAPVirtualInstanceState = "RegistrationComplete"
+ // SAPVirtualInstanceStateSoftwareDetectionFailed - Software detection failed.
+ SAPVirtualInstanceStateSoftwareDetectionFailed SAPVirtualInstanceState = "SoftwareDetectionFailed"
+ // SAPVirtualInstanceStateSoftwareDetectionInProgress - Software detection is in progress.
+ SAPVirtualInstanceStateSoftwareDetectionInProgress SAPVirtualInstanceState = "SoftwareDetectionInProgress"
+ // SAPVirtualInstanceStateSoftwareInstallationFailed - Software installation failed.
+ SAPVirtualInstanceStateSoftwareInstallationFailed SAPVirtualInstanceState = "SoftwareInstallationFailed"
+ // SAPVirtualInstanceStateSoftwareInstallationInProgress - Software installation is in progress.
+ SAPVirtualInstanceStateSoftwareInstallationInProgress SAPVirtualInstanceState = "SoftwareInstallationInProgress"
+ // SAPVirtualInstanceStateSoftwareInstallationPending - Infrastructure deployment is successful. Software installation is
+ // pending.
+ SAPVirtualInstanceStateSoftwareInstallationPending SAPVirtualInstanceState = "SoftwareInstallationPending"
)
// PossibleSAPVirtualInstanceStateValues returns the possible values for the SAPVirtualInstanceState const type.
@@ -426,13 +495,20 @@ func PossibleSAPVirtualInstanceStateValues() []SAPVirtualInstanceState {
type SAPVirtualInstanceStatus string
const (
- SAPVirtualInstanceStatusOffline SAPVirtualInstanceStatus = "Offline"
+ // SAPVirtualInstanceStatusOffline - SAP system is offline.
+ SAPVirtualInstanceStatusOffline SAPVirtualInstanceStatus = "Offline"
+ // SAPVirtualInstanceStatusPartiallyRunning - SAP system is partially running.
SAPVirtualInstanceStatusPartiallyRunning SAPVirtualInstanceStatus = "PartiallyRunning"
- SAPVirtualInstanceStatusRunning SAPVirtualInstanceStatus = "Running"
- SAPVirtualInstanceStatusSoftShutdown SAPVirtualInstanceStatus = "SoftShutdown"
- SAPVirtualInstanceStatusStarting SAPVirtualInstanceStatus = "Starting"
- SAPVirtualInstanceStatusStopping SAPVirtualInstanceStatus = "Stopping"
- SAPVirtualInstanceStatusUnavailable SAPVirtualInstanceStatus = "Unavailable"
+ // SAPVirtualInstanceStatusRunning - SAP system is running.
+ SAPVirtualInstanceStatusRunning SAPVirtualInstanceStatus = "Running"
+ // SAPVirtualInstanceStatusSoftShutdown - Soft shutdown of SAP system is initiated.
+ SAPVirtualInstanceStatusSoftShutdown SAPVirtualInstanceStatus = "SoftShutdown"
+ // SAPVirtualInstanceStatusStarting - SAP system is getting started.
+ SAPVirtualInstanceStatusStarting SAPVirtualInstanceStatus = "Starting"
+ // SAPVirtualInstanceStatusStopping - SAP system is being stopped.
+ SAPVirtualInstanceStatusStopping SAPVirtualInstanceStatus = "Stopping"
+ // SAPVirtualInstanceStatusUnavailable - SAP system status is unavailable.
+ SAPVirtualInstanceStatusUnavailable SAPVirtualInstanceStatus = "Unavailable"
)
// PossibleSAPVirtualInstanceStatusValues returns the possible values for the SAPVirtualInstanceStatus const type.
@@ -452,12 +528,18 @@ func PossibleSAPVirtualInstanceStatusValues() []SAPVirtualInstanceStatus {
type SapVirtualInstanceProvisioningState string
const (
- SapVirtualInstanceProvisioningStateCanceled SapVirtualInstanceProvisioningState = "Canceled"
- SapVirtualInstanceProvisioningStateCreating SapVirtualInstanceProvisioningState = "Creating"
- SapVirtualInstanceProvisioningStateDeleting SapVirtualInstanceProvisioningState = "Deleting"
- SapVirtualInstanceProvisioningStateFailed SapVirtualInstanceProvisioningState = "Failed"
+ // SapVirtualInstanceProvisioningStateCanceled - ACSS Canceled provisioning state.
+ SapVirtualInstanceProvisioningStateCanceled SapVirtualInstanceProvisioningState = "Canceled"
+ // SapVirtualInstanceProvisioningStateCreating - ACSS Creating provisioning state.
+ SapVirtualInstanceProvisioningStateCreating SapVirtualInstanceProvisioningState = "Creating"
+ // SapVirtualInstanceProvisioningStateDeleting - ACSS Deleting provisioning state.
+ SapVirtualInstanceProvisioningStateDeleting SapVirtualInstanceProvisioningState = "Deleting"
+ // SapVirtualInstanceProvisioningStateFailed - ACSS Failed provisioning state.
+ SapVirtualInstanceProvisioningStateFailed SapVirtualInstanceProvisioningState = "Failed"
+ // SapVirtualInstanceProvisioningStateSucceeded - ACSS succeeded provisioning state.
SapVirtualInstanceProvisioningStateSucceeded SapVirtualInstanceProvisioningState = "Succeeded"
- SapVirtualInstanceProvisioningStateUpdating SapVirtualInstanceProvisioningState = "Updating"
+ // SapVirtualInstanceProvisioningStateUpdating - ACSS updating provisioning state.
+ SapVirtualInstanceProvisioningStateUpdating SapVirtualInstanceProvisioningState = "Updating"
)
// PossibleSapVirtualInstanceProvisioningStateValues returns the possible values for the SapVirtualInstanceProvisioningState const type.
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/internal.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/internal.go
index 5f75802a569e..7425b6a669e2 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/internal.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/internal.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package fake
@@ -14,6 +10,11 @@ import (
"sync"
)
+type result struct {
+ resp *http.Response
+ err error
+}
+
type nonRetriableError struct {
error
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/operations_server.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/operations_server.go
index 1848d7f7e300..bf0a103eae45 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/operations_server.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/operations_server.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package fake
@@ -51,21 +47,40 @@ func (o *OperationsServerTransport) Do(req *http.Request) (*http.Response, error
return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
}
- var resp *http.Response
- var err error
+ return o.dispatchToMethodFake(req, method)
+}
- switch method {
- case "OperationsClient.NewListPager":
- resp, err = o.dispatchNewListPager(req)
- default:
- err = fmt.Errorf("unhandled API %s", method)
- }
+func (o *OperationsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) {
+ resultChan := make(chan result)
+ defer close(resultChan)
- if err != nil {
- return nil, err
- }
+ go func() {
+ var intercepted bool
+ var res result
+ if operationsServerTransportInterceptor != nil {
+ res.resp, res.err, intercepted = operationsServerTransportInterceptor.Do(req)
+ }
+ if !intercepted {
+ switch method {
+ case "OperationsClient.NewListPager":
+ res.resp, res.err = o.dispatchNewListPager(req)
+ default:
+ res.err = fmt.Errorf("unhandled API %s", method)
+ }
- return resp, nil
+ }
+ select {
+ case resultChan <- res:
+ case <-req.Context().Done():
+ }
+ }()
+
+ select {
+ case <-req.Context().Done():
+ return nil, req.Context().Err()
+ case res := <-resultChan:
+ return res.resp, res.err
+ }
}
func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) {
@@ -94,3 +109,9 @@ func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*ht
}
return resp, nil
}
+
+// set this to conditionally intercept incoming requests to OperationsServerTransport
+var operationsServerTransportInterceptor interface {
+ // Do returns true if the server transport should use the returned response/error
+ Do(*http.Request) (*http.Response, error, bool)
+}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapapplicationserverinstances_server.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapapplicationserverinstances_server.go
index fde564c462de..7613fd80fbcb 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapapplicationserverinstances_server.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapapplicationserverinstances_server.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package fake
@@ -27,10 +23,10 @@ import (
type SAPApplicationServerInstancesServer struct {
// BeginCreate is the fake for method SAPApplicationServerInstancesClient.BeginCreate
// HTTP status codes to indicate success: http.StatusOK, http.StatusCreated
- BeginCreate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body armworkloadssapvirtualinstance.SAPApplicationServerInstance, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginCreateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientCreateResponse], errResp azfake.ErrorResponder)
+ BeginCreate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, resource armworkloadssapvirtualinstance.SAPApplicationServerInstance, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginCreateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientCreateResponse], errResp azfake.ErrorResponder)
// BeginDelete is the fake for method SAPApplicationServerInstancesClient.BeginDelete
- // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent
+ // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent
BeginDelete func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginDeleteOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientDeleteResponse], errResp azfake.ErrorResponder)
// Get is the fake for method SAPApplicationServerInstancesClient.Get
@@ -41,17 +37,17 @@ type SAPApplicationServerInstancesServer struct {
// HTTP status codes to indicate success: http.StatusOK
NewListPager func(resourceGroupName string, sapVirtualInstanceName string, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientListOptions) (resp azfake.PagerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientListResponse])
- // BeginStartInstance is the fake for method SAPApplicationServerInstancesClient.BeginStartInstance
+ // BeginStart is the fake for method SAPApplicationServerInstancesClient.BeginStart
// HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted
- BeginStartInstance func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStartInstanceOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStartInstanceResponse], errResp azfake.ErrorResponder)
+ BeginStart func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStartOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStartResponse], errResp azfake.ErrorResponder)
- // BeginStopInstance is the fake for method SAPApplicationServerInstancesClient.BeginStopInstance
+ // BeginStop is the fake for method SAPApplicationServerInstancesClient.BeginStop
// HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted
- BeginStopInstance func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStopInstanceOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopInstanceResponse], errResp azfake.ErrorResponder)
+ BeginStop func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStopOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopResponse], errResp azfake.ErrorResponder)
// Update is the fake for method SAPApplicationServerInstancesClient.Update
// HTTP status codes to indicate success: http.StatusOK
- Update func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body armworkloadssapvirtualinstance.UpdateSAPApplicationInstanceRequest, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientUpdateOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientUpdateResponse], errResp azfake.ErrorResponder)
+ Update func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, properties armworkloadssapvirtualinstance.UpdateSAPApplicationInstanceRequest, options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientUpdateOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientUpdateResponse], errResp azfake.ErrorResponder)
}
// NewSAPApplicationServerInstancesServerTransport creates a new instance of SAPApplicationServerInstancesServerTransport with the provided implementation.
@@ -59,24 +55,24 @@ type SAPApplicationServerInstancesServer struct {
// azcore.ClientOptions.Transporter field in the client's constructor parameters.
func NewSAPApplicationServerInstancesServerTransport(srv *SAPApplicationServerInstancesServer) *SAPApplicationServerInstancesServerTransport {
return &SAPApplicationServerInstancesServerTransport{
- srv: srv,
- beginCreate: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientCreateResponse]](),
- beginDelete: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientDeleteResponse]](),
- newListPager: newTracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientListResponse]](),
- beginStartInstance: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStartInstanceResponse]](),
- beginStopInstance: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopInstanceResponse]](),
+ srv: srv,
+ beginCreate: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientCreateResponse]](),
+ beginDelete: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientDeleteResponse]](),
+ newListPager: newTracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientListResponse]](),
+ beginStart: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStartResponse]](),
+ beginStop: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopResponse]](),
}
}
// SAPApplicationServerInstancesServerTransport connects instances of armworkloadssapvirtualinstance.SAPApplicationServerInstancesClient to instances of SAPApplicationServerInstancesServer.
// Don't use this type directly, use NewSAPApplicationServerInstancesServerTransport instead.
type SAPApplicationServerInstancesServerTransport struct {
- srv *SAPApplicationServerInstancesServer
- beginCreate *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientCreateResponse]]
- beginDelete *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientDeleteResponse]]
- newListPager *tracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientListResponse]]
- beginStartInstance *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStartInstanceResponse]]
- beginStopInstance *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopInstanceResponse]]
+ srv *SAPApplicationServerInstancesServer
+ beginCreate *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientCreateResponse]]
+ beginDelete *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientDeleteResponse]]
+ newListPager *tracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientListResponse]]
+ beginStart *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStartResponse]]
+ beginStop *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopResponse]]
}
// Do implements the policy.Transporter interface for SAPApplicationServerInstancesServerTransport.
@@ -87,33 +83,52 @@ func (s *SAPApplicationServerInstancesServerTransport) Do(req *http.Request) (*h
return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
}
- var resp *http.Response
- var err error
-
- switch method {
- case "SAPApplicationServerInstancesClient.BeginCreate":
- resp, err = s.dispatchBeginCreate(req)
- case "SAPApplicationServerInstancesClient.BeginDelete":
- resp, err = s.dispatchBeginDelete(req)
- case "SAPApplicationServerInstancesClient.Get":
- resp, err = s.dispatchGet(req)
- case "SAPApplicationServerInstancesClient.NewListPager":
- resp, err = s.dispatchNewListPager(req)
- case "SAPApplicationServerInstancesClient.BeginStartInstance":
- resp, err = s.dispatchBeginStartInstance(req)
- case "SAPApplicationServerInstancesClient.BeginStopInstance":
- resp, err = s.dispatchBeginStopInstance(req)
- case "SAPApplicationServerInstancesClient.Update":
- resp, err = s.dispatchUpdate(req)
- default:
- err = fmt.Errorf("unhandled API %s", method)
- }
+ return s.dispatchToMethodFake(req, method)
+}
- if err != nil {
- return nil, err
- }
+func (s *SAPApplicationServerInstancesServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) {
+ resultChan := make(chan result)
+ defer close(resultChan)
- return resp, nil
+ go func() {
+ var intercepted bool
+ var res result
+ if sapApplicationServerInstancesServerTransportInterceptor != nil {
+ res.resp, res.err, intercepted = sapApplicationServerInstancesServerTransportInterceptor.Do(req)
+ }
+ if !intercepted {
+ switch method {
+ case "SAPApplicationServerInstancesClient.BeginCreate":
+ res.resp, res.err = s.dispatchBeginCreate(req)
+ case "SAPApplicationServerInstancesClient.BeginDelete":
+ res.resp, res.err = s.dispatchBeginDelete(req)
+ case "SAPApplicationServerInstancesClient.Get":
+ res.resp, res.err = s.dispatchGet(req)
+ case "SAPApplicationServerInstancesClient.NewListPager":
+ res.resp, res.err = s.dispatchNewListPager(req)
+ case "SAPApplicationServerInstancesClient.BeginStart":
+ res.resp, res.err = s.dispatchBeginStart(req)
+ case "SAPApplicationServerInstancesClient.BeginStop":
+ res.resp, res.err = s.dispatchBeginStop(req)
+ case "SAPApplicationServerInstancesClient.Update":
+ res.resp, res.err = s.dispatchUpdate(req)
+ default:
+ res.err = fmt.Errorf("unhandled API %s", method)
+ }
+
+ }
+ select {
+ case resultChan <- res:
+ case <-req.Context().Done():
+ }
+ }()
+
+ select {
+ case <-req.Context().Done():
+ return nil, req.Context().Err()
+ case res := <-resultChan:
+ return res.resp, res.err
+ }
}
func (s *SAPApplicationServerInstancesServerTransport) dispatchBeginCreate(req *http.Request) (*http.Response, error) {
@@ -205,9 +220,9 @@ func (s *SAPApplicationServerInstancesServerTransport) dispatchBeginDelete(req *
return nil, err
}
- if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
+ if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
s.beginDelete.remove(req)
- return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
+ return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
}
if !server.PollerResponderMore(beginDelete) {
s.beginDelete.remove(req)
@@ -294,12 +309,12 @@ func (s *SAPApplicationServerInstancesServerTransport) dispatchNewListPager(req
return resp, nil
}
-func (s *SAPApplicationServerInstancesServerTransport) dispatchBeginStartInstance(req *http.Request) (*http.Response, error) {
- if s.srv.BeginStartInstance == nil {
- return nil, &nonRetriableError{errors.New("fake for method BeginStartInstance not implemented")}
+func (s *SAPApplicationServerInstancesServerTransport) dispatchBeginStart(req *http.Request) (*http.Response, error) {
+ if s.srv.BeginStart == nil {
+ return nil, &nonRetriableError{errors.New("fake for method BeginStart not implemented")}
}
- beginStartInstance := s.beginStartInstance.get(req)
- if beginStartInstance == nil {
+ beginStart := s.beginStart.get(req)
+ if beginStart == nil {
const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/sapVirtualInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/applicationInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
@@ -322,42 +337,42 @@ func (s *SAPApplicationServerInstancesServerTransport) dispatchBeginStartInstanc
if err != nil {
return nil, err
}
- var options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStartInstanceOptions
+ var options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStartOptions
if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStartInstanceOptions{
+ options = &armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStartOptions{
Body: &body,
}
}
- respr, errRespr := s.srv.BeginStartInstance(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, applicationInstanceNameParam, options)
+ respr, errRespr := s.srv.BeginStart(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, applicationInstanceNameParam, options)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
- beginStartInstance = &respr
- s.beginStartInstance.add(req, beginStartInstance)
+ beginStart = &respr
+ s.beginStart.add(req, beginStart)
}
- resp, err := server.PollerResponderNext(beginStartInstance, req)
+ resp, err := server.PollerResponderNext(beginStart, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) {
- s.beginStartInstance.remove(req)
+ s.beginStart.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)}
}
- if !server.PollerResponderMore(beginStartInstance) {
- s.beginStartInstance.remove(req)
+ if !server.PollerResponderMore(beginStart) {
+ s.beginStart.remove(req)
}
return resp, nil
}
-func (s *SAPApplicationServerInstancesServerTransport) dispatchBeginStopInstance(req *http.Request) (*http.Response, error) {
- if s.srv.BeginStopInstance == nil {
- return nil, &nonRetriableError{errors.New("fake for method BeginStopInstance not implemented")}
+func (s *SAPApplicationServerInstancesServerTransport) dispatchBeginStop(req *http.Request) (*http.Response, error) {
+ if s.srv.BeginStop == nil {
+ return nil, &nonRetriableError{errors.New("fake for method BeginStop not implemented")}
}
- beginStopInstance := s.beginStopInstance.get(req)
- if beginStopInstance == nil {
+ beginStop := s.beginStop.get(req)
+ if beginStop == nil {
const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/sapVirtualInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/applicationInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
@@ -380,31 +395,31 @@ func (s *SAPApplicationServerInstancesServerTransport) dispatchBeginStopInstance
if err != nil {
return nil, err
}
- var options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStopInstanceOptions
+ var options *armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStopOptions
if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStopInstanceOptions{
+ options = &armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientBeginStopOptions{
Body: &body,
}
}
- respr, errRespr := s.srv.BeginStopInstance(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, applicationInstanceNameParam, options)
+ respr, errRespr := s.srv.BeginStop(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, applicationInstanceNameParam, options)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
- beginStopInstance = &respr
- s.beginStopInstance.add(req, beginStopInstance)
+ beginStop = &respr
+ s.beginStop.add(req, beginStop)
}
- resp, err := server.PollerResponderNext(beginStopInstance, req)
+ resp, err := server.PollerResponderNext(beginStop, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) {
- s.beginStopInstance.remove(req)
+ s.beginStop.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)}
}
- if !server.PollerResponderMore(beginStopInstance) {
- s.beginStopInstance.remove(req)
+ if !server.PollerResponderMore(beginStop) {
+ s.beginStop.remove(req)
}
return resp, nil
@@ -450,3 +465,9 @@ func (s *SAPApplicationServerInstancesServerTransport) dispatchUpdate(req *http.
}
return resp, nil
}
+
+// set this to conditionally intercept incoming requests to SAPApplicationServerInstancesServerTransport
+var sapApplicationServerInstancesServerTransportInterceptor interface {
+ // Do returns true if the server transport should use the returned response/error
+ Do(*http.Request) (*http.Response, error, bool)
+}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapcentralinstances_server.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapcentralserverinstances_server.go
similarity index 60%
rename from sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapcentralinstances_server.go
rename to sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapcentralserverinstances_server.go
index b4c64a343374..292a935256be 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapcentralinstances_server.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapcentralserverinstances_server.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package fake
@@ -23,100 +19,119 @@ import (
"regexp"
)
-// SAPCentralInstancesServer is a fake server for instances of the armworkloadssapvirtualinstance.SAPCentralInstancesClient type.
-type SAPCentralInstancesServer struct {
- // BeginCreate is the fake for method SAPCentralInstancesClient.BeginCreate
+// SAPCentralServerInstancesServer is a fake server for instances of the armworkloadssapvirtualinstance.SAPCentralServerInstancesClient type.
+type SAPCentralServerInstancesServer struct {
+ // BeginCreate is the fake for method SAPCentralServerInstancesClient.BeginCreate
// HTTP status codes to indicate success: http.StatusOK, http.StatusCreated
- BeginCreate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body armworkloadssapvirtualinstance.SAPCentralServerInstance, options *armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginCreateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientCreateResponse], errResp azfake.ErrorResponder)
+ BeginCreate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, resource armworkloadssapvirtualinstance.SAPCentralServerInstance, options *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientBeginCreateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientCreateResponse], errResp azfake.ErrorResponder)
- // BeginDelete is the fake for method SAPCentralInstancesClient.BeginDelete
- // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent
- BeginDelete func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginDeleteOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientDeleteResponse], errResp azfake.ErrorResponder)
+ // BeginDelete is the fake for method SAPCentralServerInstancesClient.BeginDelete
+ // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent
+ BeginDelete func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientBeginDeleteOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientDeleteResponse], errResp azfake.ErrorResponder)
- // Get is the fake for method SAPCentralInstancesClient.Get
+ // Get is the fake for method SAPCentralServerInstancesClient.Get
// HTTP status codes to indicate success: http.StatusOK
- Get func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralInstancesClientGetOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPCentralInstancesClientGetResponse], errResp azfake.ErrorResponder)
+ Get func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientGetOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientGetResponse], errResp azfake.ErrorResponder)
- // NewListPager is the fake for method SAPCentralInstancesClient.NewListPager
+ // NewListPager is the fake for method SAPCentralServerInstancesClient.NewListPager
// HTTP status codes to indicate success: http.StatusOK
- NewListPager func(resourceGroupName string, sapVirtualInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralInstancesClientListOptions) (resp azfake.PagerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientListResponse])
+ NewListPager func(resourceGroupName string, sapVirtualInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientListOptions) (resp azfake.PagerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientListResponse])
- // BeginStartInstance is the fake for method SAPCentralInstancesClient.BeginStartInstance
+ // BeginStart is the fake for method SAPCentralServerInstancesClient.BeginStart
// HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted
- BeginStartInstance func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStartInstanceOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientStartInstanceResponse], errResp azfake.ErrorResponder)
+ BeginStart func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientBeginStartOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStartResponse], errResp azfake.ErrorResponder)
- // BeginStopInstance is the fake for method SAPCentralInstancesClient.BeginStopInstance
+ // BeginStop is the fake for method SAPCentralServerInstancesClient.BeginStop
// HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted
- BeginStopInstance func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStopInstanceOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientStopInstanceResponse], errResp azfake.ErrorResponder)
+ BeginStop func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientBeginStopOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStopResponse], errResp azfake.ErrorResponder)
- // Update is the fake for method SAPCentralInstancesClient.Update
+ // Update is the fake for method SAPCentralServerInstancesClient.Update
// HTTP status codes to indicate success: http.StatusOK
- Update func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body armworkloadssapvirtualinstance.UpdateSAPCentralInstanceRequest, options *armworkloadssapvirtualinstance.SAPCentralInstancesClientUpdateOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPCentralInstancesClientUpdateResponse], errResp azfake.ErrorResponder)
+ Update func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, properties armworkloadssapvirtualinstance.UpdateSAPCentralInstanceRequest, options *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientUpdateOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientUpdateResponse], errResp azfake.ErrorResponder)
}
-// NewSAPCentralInstancesServerTransport creates a new instance of SAPCentralInstancesServerTransport with the provided implementation.
-// The returned SAPCentralInstancesServerTransport instance is connected to an instance of armworkloadssapvirtualinstance.SAPCentralInstancesClient via the
+// NewSAPCentralServerInstancesServerTransport creates a new instance of SAPCentralServerInstancesServerTransport with the provided implementation.
+// The returned SAPCentralServerInstancesServerTransport instance is connected to an instance of armworkloadssapvirtualinstance.SAPCentralServerInstancesClient via the
// azcore.ClientOptions.Transporter field in the client's constructor parameters.
-func NewSAPCentralInstancesServerTransport(srv *SAPCentralInstancesServer) *SAPCentralInstancesServerTransport {
- return &SAPCentralInstancesServerTransport{
- srv: srv,
- beginCreate: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientCreateResponse]](),
- beginDelete: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientDeleteResponse]](),
- newListPager: newTracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientListResponse]](),
- beginStartInstance: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientStartInstanceResponse]](),
- beginStopInstance: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientStopInstanceResponse]](),
+func NewSAPCentralServerInstancesServerTransport(srv *SAPCentralServerInstancesServer) *SAPCentralServerInstancesServerTransport {
+ return &SAPCentralServerInstancesServerTransport{
+ srv: srv,
+ beginCreate: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientCreateResponse]](),
+ beginDelete: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientDeleteResponse]](),
+ newListPager: newTracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientListResponse]](),
+ beginStart: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStartResponse]](),
+ beginStop: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStopResponse]](),
}
}
-// SAPCentralInstancesServerTransport connects instances of armworkloadssapvirtualinstance.SAPCentralInstancesClient to instances of SAPCentralInstancesServer.
-// Don't use this type directly, use NewSAPCentralInstancesServerTransport instead.
-type SAPCentralInstancesServerTransport struct {
- srv *SAPCentralInstancesServer
- beginCreate *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientCreateResponse]]
- beginDelete *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientDeleteResponse]]
- newListPager *tracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientListResponse]]
- beginStartInstance *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientStartInstanceResponse]]
- beginStopInstance *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralInstancesClientStopInstanceResponse]]
+// SAPCentralServerInstancesServerTransport connects instances of armworkloadssapvirtualinstance.SAPCentralServerInstancesClient to instances of SAPCentralServerInstancesServer.
+// Don't use this type directly, use NewSAPCentralServerInstancesServerTransport instead.
+type SAPCentralServerInstancesServerTransport struct {
+ srv *SAPCentralServerInstancesServer
+ beginCreate *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientCreateResponse]]
+ beginDelete *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientDeleteResponse]]
+ newListPager *tracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientListResponse]]
+ beginStart *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStartResponse]]
+ beginStop *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStopResponse]]
}
-// Do implements the policy.Transporter interface for SAPCentralInstancesServerTransport.
-func (s *SAPCentralInstancesServerTransport) Do(req *http.Request) (*http.Response, error) {
+// Do implements the policy.Transporter interface for SAPCentralServerInstancesServerTransport.
+func (s *SAPCentralServerInstancesServerTransport) Do(req *http.Request) (*http.Response, error) {
rawMethod := req.Context().Value(runtime.CtxAPINameKey{})
method, ok := rawMethod.(string)
if !ok {
return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
}
- var resp *http.Response
- var err error
-
- switch method {
- case "SAPCentralInstancesClient.BeginCreate":
- resp, err = s.dispatchBeginCreate(req)
- case "SAPCentralInstancesClient.BeginDelete":
- resp, err = s.dispatchBeginDelete(req)
- case "SAPCentralInstancesClient.Get":
- resp, err = s.dispatchGet(req)
- case "SAPCentralInstancesClient.NewListPager":
- resp, err = s.dispatchNewListPager(req)
- case "SAPCentralInstancesClient.BeginStartInstance":
- resp, err = s.dispatchBeginStartInstance(req)
- case "SAPCentralInstancesClient.BeginStopInstance":
- resp, err = s.dispatchBeginStopInstance(req)
- case "SAPCentralInstancesClient.Update":
- resp, err = s.dispatchUpdate(req)
- default:
- err = fmt.Errorf("unhandled API %s", method)
- }
+ return s.dispatchToMethodFake(req, method)
+}
- if err != nil {
- return nil, err
- }
+func (s *SAPCentralServerInstancesServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) {
+ resultChan := make(chan result)
+ defer close(resultChan)
- return resp, nil
+ go func() {
+ var intercepted bool
+ var res result
+ if sapCentralServerInstancesServerTransportInterceptor != nil {
+ res.resp, res.err, intercepted = sapCentralServerInstancesServerTransportInterceptor.Do(req)
+ }
+ if !intercepted {
+ switch method {
+ case "SAPCentralServerInstancesClient.BeginCreate":
+ res.resp, res.err = s.dispatchBeginCreate(req)
+ case "SAPCentralServerInstancesClient.BeginDelete":
+ res.resp, res.err = s.dispatchBeginDelete(req)
+ case "SAPCentralServerInstancesClient.Get":
+ res.resp, res.err = s.dispatchGet(req)
+ case "SAPCentralServerInstancesClient.NewListPager":
+ res.resp, res.err = s.dispatchNewListPager(req)
+ case "SAPCentralServerInstancesClient.BeginStart":
+ res.resp, res.err = s.dispatchBeginStart(req)
+ case "SAPCentralServerInstancesClient.BeginStop":
+ res.resp, res.err = s.dispatchBeginStop(req)
+ case "SAPCentralServerInstancesClient.Update":
+ res.resp, res.err = s.dispatchUpdate(req)
+ default:
+ res.err = fmt.Errorf("unhandled API %s", method)
+ }
+
+ }
+ select {
+ case resultChan <- res:
+ case <-req.Context().Done():
+ }
+ }()
+
+ select {
+ case <-req.Context().Done():
+ return nil, req.Context().Err()
+ case res := <-resultChan:
+ return res.resp, res.err
+ }
}
-func (s *SAPCentralInstancesServerTransport) dispatchBeginCreate(req *http.Request) (*http.Response, error) {
+func (s *SAPCentralServerInstancesServerTransport) dispatchBeginCreate(req *http.Request) (*http.Response, error) {
if s.srv.BeginCreate == nil {
return nil, &nonRetriableError{errors.New("fake for method BeginCreate not implemented")}
}
@@ -168,7 +183,7 @@ func (s *SAPCentralInstancesServerTransport) dispatchBeginCreate(req *http.Reque
return resp, nil
}
-func (s *SAPCentralInstancesServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) {
+func (s *SAPCentralServerInstancesServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) {
if s.srv.BeginDelete == nil {
return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")}
}
@@ -205,9 +220,9 @@ func (s *SAPCentralInstancesServerTransport) dispatchBeginDelete(req *http.Reque
return nil, err
}
- if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
+ if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
s.beginDelete.remove(req)
- return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
+ return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
}
if !server.PollerResponderMore(beginDelete) {
s.beginDelete.remove(req)
@@ -216,7 +231,7 @@ func (s *SAPCentralInstancesServerTransport) dispatchBeginDelete(req *http.Reque
return resp, nil
}
-func (s *SAPCentralInstancesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) {
+func (s *SAPCentralServerInstancesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) {
if s.srv.Get == nil {
return nil, &nonRetriableError{errors.New("fake for method Get not implemented")}
}
@@ -253,7 +268,7 @@ func (s *SAPCentralInstancesServerTransport) dispatchGet(req *http.Request) (*ht
return resp, nil
}
-func (s *SAPCentralInstancesServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) {
+func (s *SAPCentralServerInstancesServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) {
if s.srv.NewListPager == nil {
return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")}
}
@@ -276,7 +291,7 @@ func (s *SAPCentralInstancesServerTransport) dispatchNewListPager(req *http.Requ
resp := s.srv.NewListPager(resourceGroupNameParam, sapVirtualInstanceNameParam, nil)
newListPager = &resp
s.newListPager.add(req, newListPager)
- server.PagerResponderInjectNextLinks(newListPager, req, func(page *armworkloadssapvirtualinstance.SAPCentralInstancesClientListResponse, createLink func() string) {
+ server.PagerResponderInjectNextLinks(newListPager, req, func(page *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientListResponse, createLink func() string) {
page.NextLink = to.Ptr(createLink())
})
}
@@ -294,12 +309,12 @@ func (s *SAPCentralInstancesServerTransport) dispatchNewListPager(req *http.Requ
return resp, nil
}
-func (s *SAPCentralInstancesServerTransport) dispatchBeginStartInstance(req *http.Request) (*http.Response, error) {
- if s.srv.BeginStartInstance == nil {
- return nil, &nonRetriableError{errors.New("fake for method BeginStartInstance not implemented")}
+func (s *SAPCentralServerInstancesServerTransport) dispatchBeginStart(req *http.Request) (*http.Response, error) {
+ if s.srv.BeginStart == nil {
+ return nil, &nonRetriableError{errors.New("fake for method BeginStart not implemented")}
}
- beginStartInstance := s.beginStartInstance.get(req)
- if beginStartInstance == nil {
+ beginStart := s.beginStart.get(req)
+ if beginStart == nil {
const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/sapVirtualInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/centralInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
@@ -322,42 +337,42 @@ func (s *SAPCentralInstancesServerTransport) dispatchBeginStartInstance(req *htt
if err != nil {
return nil, err
}
- var options *armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStartInstanceOptions
+ var options *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientBeginStartOptions
if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStartInstanceOptions{
+ options = &armworkloadssapvirtualinstance.SAPCentralServerInstancesClientBeginStartOptions{
Body: &body,
}
}
- respr, errRespr := s.srv.BeginStartInstance(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, centralInstanceNameParam, options)
+ respr, errRespr := s.srv.BeginStart(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, centralInstanceNameParam, options)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
- beginStartInstance = &respr
- s.beginStartInstance.add(req, beginStartInstance)
+ beginStart = &respr
+ s.beginStart.add(req, beginStart)
}
- resp, err := server.PollerResponderNext(beginStartInstance, req)
+ resp, err := server.PollerResponderNext(beginStart, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) {
- s.beginStartInstance.remove(req)
+ s.beginStart.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)}
}
- if !server.PollerResponderMore(beginStartInstance) {
- s.beginStartInstance.remove(req)
+ if !server.PollerResponderMore(beginStart) {
+ s.beginStart.remove(req)
}
return resp, nil
}
-func (s *SAPCentralInstancesServerTransport) dispatchBeginStopInstance(req *http.Request) (*http.Response, error) {
- if s.srv.BeginStopInstance == nil {
- return nil, &nonRetriableError{errors.New("fake for method BeginStopInstance not implemented")}
+func (s *SAPCentralServerInstancesServerTransport) dispatchBeginStop(req *http.Request) (*http.Response, error) {
+ if s.srv.BeginStop == nil {
+ return nil, &nonRetriableError{errors.New("fake for method BeginStop not implemented")}
}
- beginStopInstance := s.beginStopInstance.get(req)
- if beginStopInstance == nil {
+ beginStop := s.beginStop.get(req)
+ if beginStop == nil {
const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/sapVirtualInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/centralInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
@@ -380,37 +395,37 @@ func (s *SAPCentralInstancesServerTransport) dispatchBeginStopInstance(req *http
if err != nil {
return nil, err
}
- var options *armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStopInstanceOptions
+ var options *armworkloadssapvirtualinstance.SAPCentralServerInstancesClientBeginStopOptions
if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.SAPCentralInstancesClientBeginStopInstanceOptions{
+ options = &armworkloadssapvirtualinstance.SAPCentralServerInstancesClientBeginStopOptions{
Body: &body,
}
}
- respr, errRespr := s.srv.BeginStopInstance(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, centralInstanceNameParam, options)
+ respr, errRespr := s.srv.BeginStop(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, centralInstanceNameParam, options)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
- beginStopInstance = &respr
- s.beginStopInstance.add(req, beginStopInstance)
+ beginStop = &respr
+ s.beginStop.add(req, beginStop)
}
- resp, err := server.PollerResponderNext(beginStopInstance, req)
+ resp, err := server.PollerResponderNext(beginStop, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) {
- s.beginStopInstance.remove(req)
+ s.beginStop.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)}
}
- if !server.PollerResponderMore(beginStopInstance) {
- s.beginStopInstance.remove(req)
+ if !server.PollerResponderMore(beginStop) {
+ s.beginStop.remove(req)
}
return resp, nil
}
-func (s *SAPCentralInstancesServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) {
+func (s *SAPCentralServerInstancesServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) {
if s.srv.Update == nil {
return nil, &nonRetriableError{errors.New("fake for method Update not implemented")}
}
@@ -450,3 +465,9 @@ func (s *SAPCentralInstancesServerTransport) dispatchUpdate(req *http.Request) (
}
return resp, nil
}
+
+// set this to conditionally intercept incoming requests to SAPCentralServerInstancesServerTransport
+var sapCentralServerInstancesServerTransportInterceptor interface {
+ // Do returns true if the server transport should use the returned response/error
+ Do(*http.Request) (*http.Response, error, bool)
+}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapdatabaseinstances_server.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapdatabaseinstances_server.go
index cf74eebc66d4..1750ca852dcc 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapdatabaseinstances_server.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapdatabaseinstances_server.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package fake
@@ -27,10 +23,10 @@ import (
type SAPDatabaseInstancesServer struct {
// BeginCreate is the fake for method SAPDatabaseInstancesClient.BeginCreate
// HTTP status codes to indicate success: http.StatusOK, http.StatusCreated
- BeginCreate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body armworkloadssapvirtualinstance.SAPDatabaseInstance, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginCreateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientCreateResponse], errResp azfake.ErrorResponder)
+ BeginCreate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, resource armworkloadssapvirtualinstance.SAPDatabaseInstance, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginCreateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientCreateResponse], errResp azfake.ErrorResponder)
// BeginDelete is the fake for method SAPDatabaseInstancesClient.BeginDelete
- // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent
+ // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent
BeginDelete func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginDeleteOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientDeleteResponse], errResp azfake.ErrorResponder)
// Get is the fake for method SAPDatabaseInstancesClient.Get
@@ -41,17 +37,17 @@ type SAPDatabaseInstancesServer struct {
// HTTP status codes to indicate success: http.StatusOK
NewListPager func(resourceGroupName string, sapVirtualInstanceName string, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientListOptions) (resp azfake.PagerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientListResponse])
- // BeginStartInstance is the fake for method SAPDatabaseInstancesClient.BeginStartInstance
+ // BeginStart is the fake for method SAPDatabaseInstancesClient.BeginStart
// HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted
- BeginStartInstance func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStartInstanceOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStartInstanceResponse], errResp azfake.ErrorResponder)
+ BeginStart func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStartOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStartResponse], errResp azfake.ErrorResponder)
- // BeginStopInstance is the fake for method SAPDatabaseInstancesClient.BeginStopInstance
+ // BeginStop is the fake for method SAPDatabaseInstancesClient.BeginStop
// HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted
- BeginStopInstance func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStopInstanceOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopInstanceResponse], errResp azfake.ErrorResponder)
+ BeginStop func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStopOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopResponse], errResp azfake.ErrorResponder)
// Update is the fake for method SAPDatabaseInstancesClient.Update
// HTTP status codes to indicate success: http.StatusOK
- Update func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body armworkloadssapvirtualinstance.UpdateSAPDatabaseInstanceRequest, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientUpdateOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientUpdateResponse], errResp azfake.ErrorResponder)
+ Update func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, properties armworkloadssapvirtualinstance.UpdateSAPDatabaseInstanceRequest, options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientUpdateOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientUpdateResponse], errResp azfake.ErrorResponder)
}
// NewSAPDatabaseInstancesServerTransport creates a new instance of SAPDatabaseInstancesServerTransport with the provided implementation.
@@ -59,24 +55,24 @@ type SAPDatabaseInstancesServer struct {
// azcore.ClientOptions.Transporter field in the client's constructor parameters.
func NewSAPDatabaseInstancesServerTransport(srv *SAPDatabaseInstancesServer) *SAPDatabaseInstancesServerTransport {
return &SAPDatabaseInstancesServerTransport{
- srv: srv,
- beginCreate: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientCreateResponse]](),
- beginDelete: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientDeleteResponse]](),
- newListPager: newTracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientListResponse]](),
- beginStartInstance: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStartInstanceResponse]](),
- beginStopInstance: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopInstanceResponse]](),
+ srv: srv,
+ beginCreate: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientCreateResponse]](),
+ beginDelete: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientDeleteResponse]](),
+ newListPager: newTracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientListResponse]](),
+ beginStart: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStartResponse]](),
+ beginStop: newTracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopResponse]](),
}
}
// SAPDatabaseInstancesServerTransport connects instances of armworkloadssapvirtualinstance.SAPDatabaseInstancesClient to instances of SAPDatabaseInstancesServer.
// Don't use this type directly, use NewSAPDatabaseInstancesServerTransport instead.
type SAPDatabaseInstancesServerTransport struct {
- srv *SAPDatabaseInstancesServer
- beginCreate *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientCreateResponse]]
- beginDelete *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientDeleteResponse]]
- newListPager *tracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientListResponse]]
- beginStartInstance *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStartInstanceResponse]]
- beginStopInstance *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopInstanceResponse]]
+ srv *SAPDatabaseInstancesServer
+ beginCreate *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientCreateResponse]]
+ beginDelete *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientDeleteResponse]]
+ newListPager *tracker[azfake.PagerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientListResponse]]
+ beginStart *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStartResponse]]
+ beginStop *tracker[azfake.PollerResponder[armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopResponse]]
}
// Do implements the policy.Transporter interface for SAPDatabaseInstancesServerTransport.
@@ -87,33 +83,52 @@ func (s *SAPDatabaseInstancesServerTransport) Do(req *http.Request) (*http.Respo
return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
}
- var resp *http.Response
- var err error
-
- switch method {
- case "SAPDatabaseInstancesClient.BeginCreate":
- resp, err = s.dispatchBeginCreate(req)
- case "SAPDatabaseInstancesClient.BeginDelete":
- resp, err = s.dispatchBeginDelete(req)
- case "SAPDatabaseInstancesClient.Get":
- resp, err = s.dispatchGet(req)
- case "SAPDatabaseInstancesClient.NewListPager":
- resp, err = s.dispatchNewListPager(req)
- case "SAPDatabaseInstancesClient.BeginStartInstance":
- resp, err = s.dispatchBeginStartInstance(req)
- case "SAPDatabaseInstancesClient.BeginStopInstance":
- resp, err = s.dispatchBeginStopInstance(req)
- case "SAPDatabaseInstancesClient.Update":
- resp, err = s.dispatchUpdate(req)
- default:
- err = fmt.Errorf("unhandled API %s", method)
- }
+ return s.dispatchToMethodFake(req, method)
+}
- if err != nil {
- return nil, err
- }
+func (s *SAPDatabaseInstancesServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) {
+ resultChan := make(chan result)
+ defer close(resultChan)
- return resp, nil
+ go func() {
+ var intercepted bool
+ var res result
+ if sapDatabaseInstancesServerTransportInterceptor != nil {
+ res.resp, res.err, intercepted = sapDatabaseInstancesServerTransportInterceptor.Do(req)
+ }
+ if !intercepted {
+ switch method {
+ case "SAPDatabaseInstancesClient.BeginCreate":
+ res.resp, res.err = s.dispatchBeginCreate(req)
+ case "SAPDatabaseInstancesClient.BeginDelete":
+ res.resp, res.err = s.dispatchBeginDelete(req)
+ case "SAPDatabaseInstancesClient.Get":
+ res.resp, res.err = s.dispatchGet(req)
+ case "SAPDatabaseInstancesClient.NewListPager":
+ res.resp, res.err = s.dispatchNewListPager(req)
+ case "SAPDatabaseInstancesClient.BeginStart":
+ res.resp, res.err = s.dispatchBeginStart(req)
+ case "SAPDatabaseInstancesClient.BeginStop":
+ res.resp, res.err = s.dispatchBeginStop(req)
+ case "SAPDatabaseInstancesClient.Update":
+ res.resp, res.err = s.dispatchUpdate(req)
+ default:
+ res.err = fmt.Errorf("unhandled API %s", method)
+ }
+
+ }
+ select {
+ case resultChan <- res:
+ case <-req.Context().Done():
+ }
+ }()
+
+ select {
+ case <-req.Context().Done():
+ return nil, req.Context().Err()
+ case res := <-resultChan:
+ return res.resp, res.err
+ }
}
func (s *SAPDatabaseInstancesServerTransport) dispatchBeginCreate(req *http.Request) (*http.Response, error) {
@@ -205,9 +220,9 @@ func (s *SAPDatabaseInstancesServerTransport) dispatchBeginDelete(req *http.Requ
return nil, err
}
- if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
+ if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
s.beginDelete.remove(req)
- return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
+ return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
}
if !server.PollerResponderMore(beginDelete) {
s.beginDelete.remove(req)
@@ -294,12 +309,12 @@ func (s *SAPDatabaseInstancesServerTransport) dispatchNewListPager(req *http.Req
return resp, nil
}
-func (s *SAPDatabaseInstancesServerTransport) dispatchBeginStartInstance(req *http.Request) (*http.Response, error) {
- if s.srv.BeginStartInstance == nil {
- return nil, &nonRetriableError{errors.New("fake for method BeginStartInstance not implemented")}
+func (s *SAPDatabaseInstancesServerTransport) dispatchBeginStart(req *http.Request) (*http.Response, error) {
+ if s.srv.BeginStart == nil {
+ return nil, &nonRetriableError{errors.New("fake for method BeginStart not implemented")}
}
- beginStartInstance := s.beginStartInstance.get(req)
- if beginStartInstance == nil {
+ beginStart := s.beginStart.get(req)
+ if beginStart == nil {
const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/sapVirtualInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
@@ -322,42 +337,42 @@ func (s *SAPDatabaseInstancesServerTransport) dispatchBeginStartInstance(req *ht
if err != nil {
return nil, err
}
- var options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStartInstanceOptions
+ var options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStartOptions
if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStartInstanceOptions{
+ options = &armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStartOptions{
Body: &body,
}
}
- respr, errRespr := s.srv.BeginStartInstance(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, databaseInstanceNameParam, options)
+ respr, errRespr := s.srv.BeginStart(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, databaseInstanceNameParam, options)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
- beginStartInstance = &respr
- s.beginStartInstance.add(req, beginStartInstance)
+ beginStart = &respr
+ s.beginStart.add(req, beginStart)
}
- resp, err := server.PollerResponderNext(beginStartInstance, req)
+ resp, err := server.PollerResponderNext(beginStart, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) {
- s.beginStartInstance.remove(req)
+ s.beginStart.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)}
}
- if !server.PollerResponderMore(beginStartInstance) {
- s.beginStartInstance.remove(req)
+ if !server.PollerResponderMore(beginStart) {
+ s.beginStart.remove(req)
}
return resp, nil
}
-func (s *SAPDatabaseInstancesServerTransport) dispatchBeginStopInstance(req *http.Request) (*http.Response, error) {
- if s.srv.BeginStopInstance == nil {
- return nil, &nonRetriableError{errors.New("fake for method BeginStopInstance not implemented")}
+func (s *SAPDatabaseInstancesServerTransport) dispatchBeginStop(req *http.Request) (*http.Response, error) {
+ if s.srv.BeginStop == nil {
+ return nil, &nonRetriableError{errors.New("fake for method BeginStop not implemented")}
}
- beginStopInstance := s.beginStopInstance.get(req)
- if beginStopInstance == nil {
+ beginStop := s.beginStop.get(req)
+ if beginStop == nil {
const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/sapVirtualInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop`
regex := regexp.MustCompile(regexStr)
matches := regex.FindStringSubmatch(req.URL.EscapedPath())
@@ -380,31 +395,31 @@ func (s *SAPDatabaseInstancesServerTransport) dispatchBeginStopInstance(req *htt
if err != nil {
return nil, err
}
- var options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStopInstanceOptions
+ var options *armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStopOptions
if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStopInstanceOptions{
+ options = &armworkloadssapvirtualinstance.SAPDatabaseInstancesClientBeginStopOptions{
Body: &body,
}
}
- respr, errRespr := s.srv.BeginStopInstance(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, databaseInstanceNameParam, options)
+ respr, errRespr := s.srv.BeginStop(req.Context(), resourceGroupNameParam, sapVirtualInstanceNameParam, databaseInstanceNameParam, options)
if respErr := server.GetError(errRespr, req); respErr != nil {
return nil, respErr
}
- beginStopInstance = &respr
- s.beginStopInstance.add(req, beginStopInstance)
+ beginStop = &respr
+ s.beginStop.add(req, beginStop)
}
- resp, err := server.PollerResponderNext(beginStopInstance, req)
+ resp, err := server.PollerResponderNext(beginStop, req)
if err != nil {
return nil, err
}
if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) {
- s.beginStopInstance.remove(req)
+ s.beginStop.remove(req)
return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)}
}
- if !server.PollerResponderMore(beginStopInstance) {
- s.beginStopInstance.remove(req)
+ if !server.PollerResponderMore(beginStop) {
+ s.beginStop.remove(req)
}
return resp, nil
@@ -450,3 +465,9 @@ func (s *SAPDatabaseInstancesServerTransport) dispatchUpdate(req *http.Request)
}
return resp, nil
}
+
+// set this to conditionally intercept incoming requests to SAPDatabaseInstancesServerTransport
+var sapDatabaseInstancesServerTransportInterceptor interface {
+ // Do returns true if the server transport should use the returned response/error
+ Do(*http.Request) (*http.Response, error, bool)
+}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapvirtualinstances_server.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapvirtualinstances_server.go
index 603a01a7b054..fc4305d0fc6a 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapvirtualinstances_server.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/sapvirtualinstances_server.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package fake
@@ -27,16 +23,32 @@ import (
type SAPVirtualInstancesServer struct {
// BeginCreate is the fake for method SAPVirtualInstancesClient.BeginCreate
// HTTP status codes to indicate success: http.StatusOK, http.StatusCreated
- BeginCreate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body armworkloadssapvirtualinstance.SAPVirtualInstance, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientBeginCreateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse], errResp azfake.ErrorResponder)
+ BeginCreate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, resource armworkloadssapvirtualinstance.SAPVirtualInstance, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientBeginCreateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse], errResp azfake.ErrorResponder)
// BeginDelete is the fake for method SAPVirtualInstancesClient.BeginDelete
- // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent
+ // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent
BeginDelete func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientBeginDeleteOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientDeleteResponse], errResp azfake.ErrorResponder)
// Get is the fake for method SAPVirtualInstancesClient.Get
// HTTP status codes to indicate success: http.StatusOK
Get func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetResponse], errResp azfake.ErrorResponder)
+ // GetAvailabilityZoneDetails is the fake for method SAPVirtualInstancesClient.GetAvailabilityZoneDetails
+ // HTTP status codes to indicate success: http.StatusOK
+ GetAvailabilityZoneDetails func(ctx context.Context, location string, body armworkloadssapvirtualinstance.SAPAvailabilityZoneDetailsRequest, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetAvailabilityZoneDetailsOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse], errResp azfake.ErrorResponder)
+
+ // GetDiskConfigurations is the fake for method SAPVirtualInstancesClient.GetDiskConfigurations
+ // HTTP status codes to indicate success: http.StatusOK
+ GetDiskConfigurations func(ctx context.Context, location string, body armworkloadssapvirtualinstance.SAPDiskConfigurationsRequest, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetDiskConfigurationsOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetDiskConfigurationsResponse], errResp azfake.ErrorResponder)
+
+ // GetSapSupportedSKU is the fake for method SAPVirtualInstancesClient.GetSapSupportedSKU
+ // HTTP status codes to indicate success: http.StatusOK
+ GetSapSupportedSKU func(ctx context.Context, location string, body armworkloadssapvirtualinstance.SAPSupportedSKUsRequest, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetSapSupportedSKUOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetSapSupportedSKUResponse], errResp azfake.ErrorResponder)
+
+ // GetSizingRecommendations is the fake for method SAPVirtualInstancesClient.GetSizingRecommendations
+ // HTTP status codes to indicate success: http.StatusOK
+ GetSizingRecommendations func(ctx context.Context, location string, body armworkloadssapvirtualinstance.SAPSizingRecommendationRequest, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetSizingRecommendationsOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetSizingRecommendationsResponse], errResp azfake.ErrorResponder)
+
// NewListByResourceGroupPager is the fake for method SAPVirtualInstancesClient.NewListByResourceGroupPager
// HTTP status codes to indicate success: http.StatusOK
NewListByResourceGroupPager func(resourceGroupName string, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientListByResourceGroupOptions) (resp azfake.PagerResponder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientListByResourceGroupResponse])
@@ -55,7 +67,7 @@ type SAPVirtualInstancesServer struct {
// BeginUpdate is the fake for method SAPVirtualInstancesClient.BeginUpdate
// HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted
- BeginUpdate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body armworkloadssapvirtualinstance.UpdateSAPVirtualInstanceRequest, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientBeginUpdateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientUpdateResponse], errResp azfake.ErrorResponder)
+ BeginUpdate func(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, properties armworkloadssapvirtualinstance.UpdateSAPVirtualInstanceRequest, options *armworkloadssapvirtualinstance.SAPVirtualInstancesClientBeginUpdateOptions) (resp azfake.PollerResponder[armworkloadssapvirtualinstance.SAPVirtualInstancesClientUpdateResponse], errResp azfake.ErrorResponder)
}
// NewSAPVirtualInstancesServerTransport creates a new instance of SAPVirtualInstancesServerTransport with the provided implementation.
@@ -95,35 +107,62 @@ func (s *SAPVirtualInstancesServerTransport) Do(req *http.Request) (*http.Respon
return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
}
- var resp *http.Response
- var err error
-
- switch method {
- case "SAPVirtualInstancesClient.BeginCreate":
- resp, err = s.dispatchBeginCreate(req)
- case "SAPVirtualInstancesClient.BeginDelete":
- resp, err = s.dispatchBeginDelete(req)
- case "SAPVirtualInstancesClient.Get":
- resp, err = s.dispatchGet(req)
- case "SAPVirtualInstancesClient.NewListByResourceGroupPager":
- resp, err = s.dispatchNewListByResourceGroupPager(req)
- case "SAPVirtualInstancesClient.NewListBySubscriptionPager":
- resp, err = s.dispatchNewListBySubscriptionPager(req)
- case "SAPVirtualInstancesClient.BeginStart":
- resp, err = s.dispatchBeginStart(req)
- case "SAPVirtualInstancesClient.BeginStop":
- resp, err = s.dispatchBeginStop(req)
- case "SAPVirtualInstancesClient.BeginUpdate":
- resp, err = s.dispatchBeginUpdate(req)
- default:
- err = fmt.Errorf("unhandled API %s", method)
- }
+ return s.dispatchToMethodFake(req, method)
+}
- if err != nil {
- return nil, err
- }
+func (s *SAPVirtualInstancesServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) {
+ resultChan := make(chan result)
+ defer close(resultChan)
- return resp, nil
+ go func() {
+ var intercepted bool
+ var res result
+ if sapVirtualInstancesServerTransportInterceptor != nil {
+ res.resp, res.err, intercepted = sapVirtualInstancesServerTransportInterceptor.Do(req)
+ }
+ if !intercepted {
+ switch method {
+ case "SAPVirtualInstancesClient.BeginCreate":
+ res.resp, res.err = s.dispatchBeginCreate(req)
+ case "SAPVirtualInstancesClient.BeginDelete":
+ res.resp, res.err = s.dispatchBeginDelete(req)
+ case "SAPVirtualInstancesClient.Get":
+ res.resp, res.err = s.dispatchGet(req)
+ case "SAPVirtualInstancesClient.GetAvailabilityZoneDetails":
+ res.resp, res.err = s.dispatchGetAvailabilityZoneDetails(req)
+ case "SAPVirtualInstancesClient.GetDiskConfigurations":
+ res.resp, res.err = s.dispatchGetDiskConfigurations(req)
+ case "SAPVirtualInstancesClient.GetSapSupportedSKU":
+ res.resp, res.err = s.dispatchGetSapSupportedSKU(req)
+ case "SAPVirtualInstancesClient.GetSizingRecommendations":
+ res.resp, res.err = s.dispatchGetSizingRecommendations(req)
+ case "SAPVirtualInstancesClient.NewListByResourceGroupPager":
+ res.resp, res.err = s.dispatchNewListByResourceGroupPager(req)
+ case "SAPVirtualInstancesClient.NewListBySubscriptionPager":
+ res.resp, res.err = s.dispatchNewListBySubscriptionPager(req)
+ case "SAPVirtualInstancesClient.BeginStart":
+ res.resp, res.err = s.dispatchBeginStart(req)
+ case "SAPVirtualInstancesClient.BeginStop":
+ res.resp, res.err = s.dispatchBeginStop(req)
+ case "SAPVirtualInstancesClient.BeginUpdate":
+ res.resp, res.err = s.dispatchBeginUpdate(req)
+ default:
+ res.err = fmt.Errorf("unhandled API %s", method)
+ }
+
+ }
+ select {
+ case resultChan <- res:
+ case <-req.Context().Done():
+ }
+ }()
+
+ select {
+ case <-req.Context().Done():
+ return nil, req.Context().Err()
+ case res := <-resultChan:
+ return res.resp, res.err
+ }
}
func (s *SAPVirtualInstancesServerTransport) dispatchBeginCreate(req *http.Request) (*http.Response, error) {
@@ -207,9 +246,9 @@ func (s *SAPVirtualInstancesServerTransport) dispatchBeginDelete(req *http.Reque
return nil, err
}
- if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
+ if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) {
s.beginDelete.remove(req)
- return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
+ return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)}
}
if !server.PollerResponderMore(beginDelete) {
s.beginDelete.remove(req)
@@ -251,6 +290,138 @@ func (s *SAPVirtualInstancesServerTransport) dispatchGet(req *http.Request) (*ht
return resp, nil
}
+func (s *SAPVirtualInstancesServerTransport) dispatchGetAvailabilityZoneDetails(req *http.Request) (*http.Response, error) {
+ if s.srv.GetAvailabilityZoneDetails == nil {
+ return nil, &nonRetriableError{errors.New("fake for method GetAvailabilityZoneDetails not implemented")}
+ }
+ const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails`
+ regex := regexp.MustCompile(regexStr)
+ matches := regex.FindStringSubmatch(req.URL.EscapedPath())
+ if matches == nil || len(matches) < 2 {
+ return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
+ }
+ body, err := server.UnmarshalRequestAsJSON[armworkloadssapvirtualinstance.SAPAvailabilityZoneDetailsRequest](req)
+ if err != nil {
+ return nil, err
+ }
+ locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")])
+ if err != nil {
+ return nil, err
+ }
+ respr, errRespr := s.srv.GetAvailabilityZoneDetails(req.Context(), locationParam, body, nil)
+ if respErr := server.GetError(errRespr, req); respErr != nil {
+ return nil, respErr
+ }
+ respContent := server.GetResponseContent(respr)
+ if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
+ return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
+ }
+ resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SAPAvailabilityZoneDetailsResult, req)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+func (s *SAPVirtualInstancesServerTransport) dispatchGetDiskConfigurations(req *http.Request) (*http.Response, error) {
+ if s.srv.GetDiskConfigurations == nil {
+ return nil, &nonRetriableError{errors.New("fake for method GetDiskConfigurations not implemented")}
+ }
+ const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sapVirtualInstanceMetadata/default/getDiskConfigurations`
+ regex := regexp.MustCompile(regexStr)
+ matches := regex.FindStringSubmatch(req.URL.EscapedPath())
+ if matches == nil || len(matches) < 2 {
+ return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
+ }
+ body, err := server.UnmarshalRequestAsJSON[armworkloadssapvirtualinstance.SAPDiskConfigurationsRequest](req)
+ if err != nil {
+ return nil, err
+ }
+ locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")])
+ if err != nil {
+ return nil, err
+ }
+ respr, errRespr := s.srv.GetDiskConfigurations(req.Context(), locationParam, body, nil)
+ if respErr := server.GetError(errRespr, req); respErr != nil {
+ return nil, respErr
+ }
+ respContent := server.GetResponseContent(respr)
+ if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
+ return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
+ }
+ resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SAPDiskConfigurationsResult, req)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+func (s *SAPVirtualInstancesServerTransport) dispatchGetSapSupportedSKU(req *http.Request) (*http.Response, error) {
+ if s.srv.GetSapSupportedSKU == nil {
+ return nil, &nonRetriableError{errors.New("fake for method GetSapSupportedSKU not implemented")}
+ }
+ const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sapVirtualInstanceMetadata/default/getSapSupportedSku`
+ regex := regexp.MustCompile(regexStr)
+ matches := regex.FindStringSubmatch(req.URL.EscapedPath())
+ if matches == nil || len(matches) < 2 {
+ return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
+ }
+ body, err := server.UnmarshalRequestAsJSON[armworkloadssapvirtualinstance.SAPSupportedSKUsRequest](req)
+ if err != nil {
+ return nil, err
+ }
+ locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")])
+ if err != nil {
+ return nil, err
+ }
+ respr, errRespr := s.srv.GetSapSupportedSKU(req.Context(), locationParam, body, nil)
+ if respErr := server.GetError(errRespr, req); respErr != nil {
+ return nil, respErr
+ }
+ respContent := server.GetResponseContent(respr)
+ if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
+ return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
+ }
+ resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SAPSupportedResourceSKUsResult, req)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
+func (s *SAPVirtualInstancesServerTransport) dispatchGetSizingRecommendations(req *http.Request) (*http.Response, error) {
+ if s.srv.GetSizingRecommendations == nil {
+ return nil, &nonRetriableError{errors.New("fake for method GetSizingRecommendations not implemented")}
+ }
+ const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sapVirtualInstanceMetadata/default/getSizingRecommendations`
+ regex := regexp.MustCompile(regexStr)
+ matches := regex.FindStringSubmatch(req.URL.EscapedPath())
+ if matches == nil || len(matches) < 2 {
+ return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
+ }
+ body, err := server.UnmarshalRequestAsJSON[armworkloadssapvirtualinstance.SAPSizingRecommendationRequest](req)
+ if err != nil {
+ return nil, err
+ }
+ locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")])
+ if err != nil {
+ return nil, err
+ }
+ respr, errRespr := s.srv.GetSizingRecommendations(req.Context(), locationParam, body, nil)
+ if respErr := server.GetError(errRespr, req); respErr != nil {
+ return nil, respErr
+ }
+ respContent := server.GetResponseContent(respr)
+ if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
+ return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
+ }
+ resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SAPSizingRecommendationResultClassification, req)
+ if err != nil {
+ return nil, err
+ }
+ return resp, nil
+}
+
func (s *SAPVirtualInstancesServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) {
if s.srv.NewListByResourceGroupPager == nil {
return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")}
@@ -476,3 +647,9 @@ func (s *SAPVirtualInstancesServerTransport) dispatchBeginUpdate(req *http.Reque
return resp, nil
}
+
+// set this to conditionally intercept incoming requests to SAPVirtualInstancesServerTransport
+var sapVirtualInstancesServerTransportInterceptor interface {
+ // Do returns true if the server transport should use the returned response/error
+ Do(*http.Request) (*http.Response, error, bool)
+}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/server_factory.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/server_factory.go
index 76fde4013d4e..8ac4cb3857c5 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/server_factory.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/server_factory.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package fake
@@ -19,12 +15,20 @@ import (
// ServerFactory is a fake server for instances of the armworkloadssapvirtualinstance.ClientFactory type.
type ServerFactory struct {
- OperationsServer OperationsServer
+ // OperationsServer contains the fakes for client OperationsClient
+ OperationsServer OperationsServer
+
+ // SAPApplicationServerInstancesServer contains the fakes for client SAPApplicationServerInstancesClient
SAPApplicationServerInstancesServer SAPApplicationServerInstancesServer
- SAPCentralInstancesServer SAPCentralInstancesServer
- SAPDatabaseInstancesServer SAPDatabaseInstancesServer
- SAPVirtualInstancesServer SAPVirtualInstancesServer
- WorkloadsServer WorkloadsServer
+
+ // SAPCentralServerInstancesServer contains the fakes for client SAPCentralServerInstancesClient
+ SAPCentralServerInstancesServer SAPCentralServerInstancesServer
+
+ // SAPDatabaseInstancesServer contains the fakes for client SAPDatabaseInstancesClient
+ SAPDatabaseInstancesServer SAPDatabaseInstancesServer
+
+ // SAPVirtualInstancesServer contains the fakes for client SAPVirtualInstancesClient
+ SAPVirtualInstancesServer SAPVirtualInstancesServer
}
// NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation.
@@ -43,10 +47,9 @@ type ServerFactoryTransport struct {
trMu sync.Mutex
trOperationsServer *OperationsServerTransport
trSAPApplicationServerInstancesServer *SAPApplicationServerInstancesServerTransport
- trSAPCentralInstancesServer *SAPCentralInstancesServerTransport
+ trSAPCentralServerInstancesServer *SAPCentralServerInstancesServerTransport
trSAPDatabaseInstancesServer *SAPDatabaseInstancesServerTransport
trSAPVirtualInstancesServer *SAPVirtualInstancesServerTransport
- trWorkloadsServer *WorkloadsServerTransport
}
// Do implements the policy.Transporter interface for ServerFactoryTransport.
@@ -70,11 +73,11 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) {
return NewSAPApplicationServerInstancesServerTransport(&s.srv.SAPApplicationServerInstancesServer)
})
resp, err = s.trSAPApplicationServerInstancesServer.Do(req)
- case "SAPCentralInstancesClient":
- initServer(s, &s.trSAPCentralInstancesServer, func() *SAPCentralInstancesServerTransport {
- return NewSAPCentralInstancesServerTransport(&s.srv.SAPCentralInstancesServer)
+ case "SAPCentralServerInstancesClient":
+ initServer(s, &s.trSAPCentralServerInstancesServer, func() *SAPCentralServerInstancesServerTransport {
+ return NewSAPCentralServerInstancesServerTransport(&s.srv.SAPCentralServerInstancesServer)
})
- resp, err = s.trSAPCentralInstancesServer.Do(req)
+ resp, err = s.trSAPCentralServerInstancesServer.Do(req)
case "SAPDatabaseInstancesClient":
initServer(s, &s.trSAPDatabaseInstancesServer, func() *SAPDatabaseInstancesServerTransport {
return NewSAPDatabaseInstancesServerTransport(&s.srv.SAPDatabaseInstancesServer)
@@ -85,9 +88,6 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) {
return NewSAPVirtualInstancesServerTransport(&s.srv.SAPVirtualInstancesServer)
})
resp, err = s.trSAPVirtualInstancesServer.Do(req)
- case "WorkloadsClient":
- initServer(s, &s.trWorkloadsServer, func() *WorkloadsServerTransport { return NewWorkloadsServerTransport(&s.srv.WorkloadsServer) })
- resp, err = s.trWorkloadsServer.Do(req)
default:
err = fmt.Errorf("unhandled client %s", client)
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/time_rfc3339.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/time_rfc3339.go
index 81f308b0d343..87ee11e83b32 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/time_rfc3339.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/time_rfc3339.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package fake
@@ -60,6 +56,9 @@ func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error {
}
func (t *dateTimeRFC3339) UnmarshalText(data []byte) error {
+ if len(data) == 0 {
+ return nil
+ }
tzOffset := tzOffsetRegex.Match(data)
hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t")
var layout string
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/workloads_server.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/workloads_server.go
deleted file mode 100644
index 52a61891416f..000000000000
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/fake/workloads_server.go
+++ /dev/null
@@ -1,242 +0,0 @@
-//go:build go1.18
-// +build go1.18
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-
-package fake
-
-import (
- "context"
- "errors"
- "fmt"
- azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake"
- "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server"
- "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance"
- "net/http"
- "net/url"
- "reflect"
- "regexp"
-)
-
-// WorkloadsServer is a fake server for instances of the armworkloadssapvirtualinstance.WorkloadsClient type.
-type WorkloadsServer struct {
- // SAPAvailabilityZoneDetails is the fake for method WorkloadsClient.SAPAvailabilityZoneDetails
- // HTTP status codes to indicate success: http.StatusOK
- SAPAvailabilityZoneDetails func(ctx context.Context, location string, options *armworkloadssapvirtualinstance.WorkloadsClientSAPAvailabilityZoneDetailsOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.WorkloadsClientSAPAvailabilityZoneDetailsResponse], errResp azfake.ErrorResponder)
-
- // SAPDiskConfigurations is the fake for method WorkloadsClient.SAPDiskConfigurations
- // HTTP status codes to indicate success: http.StatusOK
- SAPDiskConfigurations func(ctx context.Context, location string, options *armworkloadssapvirtualinstance.WorkloadsClientSAPDiskConfigurationsOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.WorkloadsClientSAPDiskConfigurationsResponse], errResp azfake.ErrorResponder)
-
- // SAPSizingRecommendations is the fake for method WorkloadsClient.SAPSizingRecommendations
- // HTTP status codes to indicate success: http.StatusOK
- SAPSizingRecommendations func(ctx context.Context, location string, options *armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsResponse], errResp azfake.ErrorResponder)
-
- // SAPSupportedSKU is the fake for method WorkloadsClient.SAPSupportedSKU
- // HTTP status codes to indicate success: http.StatusOK
- SAPSupportedSKU func(ctx context.Context, location string, options *armworkloadssapvirtualinstance.WorkloadsClientSAPSupportedSKUOptions) (resp azfake.Responder[armworkloadssapvirtualinstance.WorkloadsClientSAPSupportedSKUResponse], errResp azfake.ErrorResponder)
-}
-
-// NewWorkloadsServerTransport creates a new instance of WorkloadsServerTransport with the provided implementation.
-// The returned WorkloadsServerTransport instance is connected to an instance of armworkloadssapvirtualinstance.WorkloadsClient via the
-// azcore.ClientOptions.Transporter field in the client's constructor parameters.
-func NewWorkloadsServerTransport(srv *WorkloadsServer) *WorkloadsServerTransport {
- return &WorkloadsServerTransport{srv: srv}
-}
-
-// WorkloadsServerTransport connects instances of armworkloadssapvirtualinstance.WorkloadsClient to instances of WorkloadsServer.
-// Don't use this type directly, use NewWorkloadsServerTransport instead.
-type WorkloadsServerTransport struct {
- srv *WorkloadsServer
-}
-
-// Do implements the policy.Transporter interface for WorkloadsServerTransport.
-func (w *WorkloadsServerTransport) Do(req *http.Request) (*http.Response, error) {
- rawMethod := req.Context().Value(runtime.CtxAPINameKey{})
- method, ok := rawMethod.(string)
- if !ok {
- return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")}
- }
-
- var resp *http.Response
- var err error
-
- switch method {
- case "WorkloadsClient.SAPAvailabilityZoneDetails":
- resp, err = w.dispatchSAPAvailabilityZoneDetails(req)
- case "WorkloadsClient.SAPDiskConfigurations":
- resp, err = w.dispatchSAPDiskConfigurations(req)
- case "WorkloadsClient.SAPSizingRecommendations":
- resp, err = w.dispatchSAPSizingRecommendations(req)
- case "WorkloadsClient.SAPSupportedSKU":
- resp, err = w.dispatchSAPSupportedSKU(req)
- default:
- err = fmt.Errorf("unhandled API %s", method)
- }
-
- if err != nil {
- return nil, err
- }
-
- return resp, nil
-}
-
-func (w *WorkloadsServerTransport) dispatchSAPAvailabilityZoneDetails(req *http.Request) (*http.Response, error) {
- if w.srv.SAPAvailabilityZoneDetails == nil {
- return nil, &nonRetriableError{errors.New("fake for method SAPAvailabilityZoneDetails not implemented")}
- }
- const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails`
- regex := regexp.MustCompile(regexStr)
- matches := regex.FindStringSubmatch(req.URL.EscapedPath())
- if matches == nil || len(matches) < 2 {
- return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
- }
- body, err := server.UnmarshalRequestAsJSON[armworkloadssapvirtualinstance.SAPAvailabilityZoneDetailsRequest](req)
- if err != nil {
- return nil, err
- }
- locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")])
- if err != nil {
- return nil, err
- }
- var options *armworkloadssapvirtualinstance.WorkloadsClientSAPAvailabilityZoneDetailsOptions
- if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.WorkloadsClientSAPAvailabilityZoneDetailsOptions{
- SAPAvailabilityZoneDetails: &body,
- }
- }
- respr, errRespr := w.srv.SAPAvailabilityZoneDetails(req.Context(), locationParam, options)
- if respErr := server.GetError(errRespr, req); respErr != nil {
- return nil, respErr
- }
- respContent := server.GetResponseContent(respr)
- if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
- return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
- }
- resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SAPAvailabilityZoneDetailsResult, req)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-func (w *WorkloadsServerTransport) dispatchSAPDiskConfigurations(req *http.Request) (*http.Response, error) {
- if w.srv.SAPDiskConfigurations == nil {
- return nil, &nonRetriableError{errors.New("fake for method SAPDiskConfigurations not implemented")}
- }
- const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sapVirtualInstanceMetadata/default/getDiskConfigurations`
- regex := regexp.MustCompile(regexStr)
- matches := regex.FindStringSubmatch(req.URL.EscapedPath())
- if matches == nil || len(matches) < 2 {
- return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
- }
- body, err := server.UnmarshalRequestAsJSON[armworkloadssapvirtualinstance.SAPDiskConfigurationsRequest](req)
- if err != nil {
- return nil, err
- }
- locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")])
- if err != nil {
- return nil, err
- }
- var options *armworkloadssapvirtualinstance.WorkloadsClientSAPDiskConfigurationsOptions
- if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.WorkloadsClientSAPDiskConfigurationsOptions{
- SAPDiskConfigurations: &body,
- }
- }
- respr, errRespr := w.srv.SAPDiskConfigurations(req.Context(), locationParam, options)
- if respErr := server.GetError(errRespr, req); respErr != nil {
- return nil, respErr
- }
- respContent := server.GetResponseContent(respr)
- if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
- return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
- }
- resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SAPDiskConfigurationsResult, req)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-func (w *WorkloadsServerTransport) dispatchSAPSizingRecommendations(req *http.Request) (*http.Response, error) {
- if w.srv.SAPSizingRecommendations == nil {
- return nil, &nonRetriableError{errors.New("fake for method SAPSizingRecommendations not implemented")}
- }
- const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sapVirtualInstanceMetadata/default/getSizingRecommendations`
- regex := regexp.MustCompile(regexStr)
- matches := regex.FindStringSubmatch(req.URL.EscapedPath())
- if matches == nil || len(matches) < 2 {
- return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
- }
- body, err := server.UnmarshalRequestAsJSON[armworkloadssapvirtualinstance.SAPSizingRecommendationRequest](req)
- if err != nil {
- return nil, err
- }
- locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")])
- if err != nil {
- return nil, err
- }
- var options *armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsOptions
- if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.WorkloadsClientSAPSizingRecommendationsOptions{
- SAPSizingRecommendation: &body,
- }
- }
- respr, errRespr := w.srv.SAPSizingRecommendations(req.Context(), locationParam, options)
- if respErr := server.GetError(errRespr, req); respErr != nil {
- return nil, respErr
- }
- respContent := server.GetResponseContent(respr)
- if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
- return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
- }
- resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SAPSizingRecommendationResultClassification, req)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
-
-func (w *WorkloadsServerTransport) dispatchSAPSupportedSKU(req *http.Request) (*http.Response, error) {
- if w.srv.SAPSupportedSKU == nil {
- return nil, &nonRetriableError{errors.New("fake for method SAPSupportedSKU not implemented")}
- }
- const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Workloads/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sapVirtualInstanceMetadata/default/getSapSupportedSku`
- regex := regexp.MustCompile(regexStr)
- matches := regex.FindStringSubmatch(req.URL.EscapedPath())
- if matches == nil || len(matches) < 2 {
- return nil, fmt.Errorf("failed to parse path %s", req.URL.Path)
- }
- body, err := server.UnmarshalRequestAsJSON[armworkloadssapvirtualinstance.SAPSupportedSKUsRequest](req)
- if err != nil {
- return nil, err
- }
- locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")])
- if err != nil {
- return nil, err
- }
- var options *armworkloadssapvirtualinstance.WorkloadsClientSAPSupportedSKUOptions
- if !reflect.ValueOf(body).IsZero() {
- options = &armworkloadssapvirtualinstance.WorkloadsClientSAPSupportedSKUOptions{
- SAPSupportedSKU: &body,
- }
- }
- respr, errRespr := w.srv.SAPSupportedSKU(req.Context(), locationParam, options)
- if respErr := server.GetError(errRespr, req); respErr != nil {
- return nil, respErr
- }
- respContent := server.GetResponseContent(respr)
- if !contains([]int{http.StatusOK}, respContent.HTTPStatus) {
- return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)}
- }
- resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SAPSupportedResourceSKUsResult, req)
- if err != nil {
- return nil, err
- }
- return resp, nil
-}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/go.mod b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/go.mod
index cbc72d4d4f77..56da7dd00518 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/go.mod
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/go.mod
@@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloadssapvirtual
go 1.18
require (
- github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0
+ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
)
@@ -14,8 +14,8 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
- golang.org/x/crypto v0.25.0 // indirect
- golang.org/x/net v0.27.0 // indirect
- golang.org/x/sys v0.22.0 // indirect
- golang.org/x/text v0.16.0 // indirect
+ golang.org/x/crypto v0.27.0 // indirect
+ golang.org/x/net v0.29.0 // indirect
+ golang.org/x/sys v0.25.0 // indirect
+ golang.org/x/text v0.18.0 // indirect
)
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/go.sum b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/go.sum
index 09d275cb9a37..cbddbbd9ecec 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/go.sum
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/go.sum
@@ -1,5 +1,5 @@
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww=
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 h1:JZg6HRh6W6U4OLl6lk7BZ7BLisIzM9dG1R50zUk9C/M=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0/go.mod h1:YL1xnZ6QejvQHWJrX/AvhFl4WW4rqHVoKspWNVwFk0M=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY=
@@ -17,13 +17,13 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmd
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
-golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
-golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
-golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
-golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
+golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
+golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
+golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
+golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
-golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
-golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
+golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
+golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
+golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/interfaces.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/interfaces.go
index d5a628b5cd4c..6f702bf2f8db 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/interfaces.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/interfaces.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/models.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/models.go
index 3ba605dab9fb..adaedf235cfb 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/models.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/models.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -41,7 +37,7 @@ type ApplicationServerVMDetails struct {
// READ-ONLY; Defines the type of application server VM.
Type *ApplicationServerVirtualMachineType
- // READ-ONLY
+ // READ-ONLY; The virtual machine id.
VirtualMachineID *string
}
@@ -66,8 +62,7 @@ type CentralServerFullResourceNames struct {
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.
+ // number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS.
VirtualMachines []*VirtualMachineResourceNames
}
@@ -80,16 +75,17 @@ type CentralServerVMDetails struct {
// READ-ONLY; Defines the type of central server VM.
Type *CentralServerVirtualMachineType
- // READ-ONLY
+ // READ-ONLY; The virtual machine id.
VirtualMachineID *string
}
// 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.
+// 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.
type CreateAndMountFileShareConfiguration struct {
- // REQUIRED; The type of file share config.
- ConfigurationType *ConfigurationType
+ // CONSTANT; The type of file share config.
+ // Field has constant value FileShareConfigurationTypeCreateAndMount, any specified value is ignored.
+ ConfigurationType *FileShareConfigurationType
// The name of transport file share resource group. This should be pre created by the customer. The app rg is used in case
// of missing input.
@@ -146,7 +142,7 @@ type DatabaseVMDetails struct {
// Storage.
StorageDetails []*StorageInformation
- // READ-ONLY
+ // READ-ONLY; The virtual machine id.
VirtualMachineID *string
}
@@ -161,7 +157,8 @@ type DeployerVMPackages struct {
// DeploymentConfiguration - Deployment Configuration.
type DeploymentConfiguration struct {
- // REQUIRED; The configuration Type.
+ // CONSTANT; The deployment configuration Type.
+ // Field has constant value SAPConfigurationTypeDeployment, any specified value is ignored.
ConfigurationType *SAPConfigurationType
// The geo-location where the SAP system is to be created.
@@ -183,7 +180,8 @@ func (d *DeploymentConfiguration) GetSAPConfiguration() *SAPConfiguration {
// DeploymentWithOSConfiguration - Deployment along with OS Configuration.
type DeploymentWithOSConfiguration struct {
- // REQUIRED; The configuration Type.
+ // CONSTANT; The configuration Type.
+ // Field has constant value SAPConfigurationTypeDeploymentWithOSConfig, any specified value is ignored.
ConfigurationType *SAPConfigurationType
// The geo-location where the SAP system is to be created.
@@ -208,16 +206,16 @@ func (d *DeploymentWithOSConfiguration) GetSAPConfiguration() *SAPConfiguration
// DiscoveryConfiguration - Discovery Details.
type DiscoveryConfiguration struct {
- // REQUIRED; The configuration Type.
+ // CONSTANT; The configuration Type.
+ // Field has constant value SAPConfigurationTypeDiscovery, any specified value is ignored.
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.
+ // 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.
@@ -255,14 +253,14 @@ type DiskDetails struct {
// The minimum supported disk count.
MinimumSupportedDiskCount *int64
- // The type of disk sku. For example, StandardLRS, StandardZRS, PremiumLRS, PremiumZRS.
+ // The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS.
SKU *DiskSKU
// The disk size in GB.
SizeGB *int64
}
-// DiskSKU - The type of disk sku. For example, StandardLRS, StandardZRS, PremiumLRS, PremiumZRS.
+// DiskSKU - The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS.
type DiskSKU struct {
// Defines the disk sku name.
Name *DiskSKUName
@@ -322,12 +320,15 @@ type EnqueueServerProperties struct {
// ErrorAdditionalInfo - The resource management error additional info.
type ErrorAdditionalInfo struct {
// READ-ONLY; The additional info.
- Info any
+ Info *ErrorAdditionalInfoInfo
// READ-ONLY; The additional info type.
Type *string
}
+type ErrorAdditionalInfoInfo struct {
+}
+
// ErrorDefinition - Error definition.
type ErrorDefinition struct {
// READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code.
@@ -361,7 +362,8 @@ type ErrorDetail struct {
// ExternalInstallationSoftwareConfiguration - The SAP Software configuration Input when the software is installed externally
// outside the service.
type ExternalInstallationSoftwareConfiguration struct {
- // REQUIRED; The SAP software installation Type.
+ // CONSTANT; The SAP software installation Type.
+ // Field has constant value SAPSoftwareInstallationTypeExternal, any specified value is ignored.
SoftwareInstallationType *SAPSoftwareInstallationType
// The resource ID of the virtual machine containing the central server instance.
@@ -378,8 +380,8 @@ func (e *ExternalInstallationSoftwareConfiguration) GetSoftwareConfiguration() *
// 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.
type FileShareConfiguration struct {
- // REQUIRED; The type of file share config.
- ConfigurationType *ConfigurationType
+ // REQUIRED; The type of file share config, eg: Mount/CreateAndMount/Skip.
+ ConfigurationType *FileShareConfigurationType
}
// GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type FileShareConfiguration.
@@ -411,13 +413,12 @@ type HighAvailabilitySoftwareConfiguration struct {
}
// 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.
+// 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.
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.
+ // 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.
@@ -430,10 +431,9 @@ type ImageReference struct {
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.
+ // 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
}
@@ -442,7 +442,7 @@ 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.
+ // REQUIRED; The SAP deployment type. Eg: SingleServer/ThreeTier.
DeploymentType *SAPDeploymentType
}
@@ -451,10 +451,11 @@ func (i *InfrastructureConfiguration) GetInfrastructureConfiguration() *Infrastr
return i
}
-// 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].
+// 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://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
type LinuxConfiguration struct {
- // REQUIRED; The OS Type
+ // CONSTANT; The OS Type
+ // Field has constant value OSTypeLinux, any specified value is ignored.
OSType *OSType
// Specifies whether password authentication should be disabled.
@@ -476,7 +477,7 @@ func (l *LinuxConfiguration) GetOSConfiguration() *OSConfiguration {
// LoadBalancerDetails - The Load Balancer details such as Load Balancer ID.
type LoadBalancerDetails struct {
- // READ-ONLY
+ // READ-ONLY; Fully qualified resource ID for the load balancer.
ID *string
}
@@ -530,8 +531,9 @@ type MessageServerProperties struct {
// 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.
type MountFileShareConfiguration struct {
- // REQUIRED; The type of file share config.
- ConfigurationType *ConfigurationType
+ // CONSTANT; The type of file share config, mount in this case.
+ // Field has constant value FileShareConfigurationTypeMount, any specified value is ignored.
+ ConfigurationType *FileShareConfigurationType
// REQUIRED; The fileshare resource ID
ID *string
@@ -556,10 +558,9 @@ type NetworkConfiguration struct {
// NetworkInterfaceResourceNames - The resource names object for network interface and related resources.
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.
+ // 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
}
@@ -575,32 +576,22 @@ func (o *OSConfiguration) GetOSConfiguration() *OSConfiguration { return o }
// OSProfile - Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once
// VM is provisioned.
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]
+ // 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://learn.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://learn.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.
+ // 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.
@@ -609,14 +600,14 @@ type OSProfile struct {
// Operation - Details of a REST API operation, returned from the Resource Provider Operations API
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.
+ // Extensible 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.
+ // READ-ONLY; Localized display information for this particular operation.
+ Display *OperationDisplay
+
+ // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ // Resource Manager/control-plane operations.
IsDataAction *bool
// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
@@ -628,7 +619,7 @@ type Operation struct {
Origin *Origin
}
-// OperationDisplay - Localized display information for this particular operation.
+// OperationDisplay - Localized display information for and operation.
type OperationDisplay struct {
// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
Description *string
@@ -649,11 +640,11 @@ type OperationDisplay struct {
// 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.
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
+ // REQUIRED; The Operation items on this page
Value []*Operation
+
+ // The link to the next page of items
+ NextLink *string
}
// OperationStatusResult - The current status of an async operation.
@@ -677,7 +668,7 @@ type OperationStatusResult struct {
Operations []*OperationStatusResult
// Percent of the operation that is complete.
- PercentComplete *float32
+ PercentComplete *float64
// The start time of the operation.
StartTime *time.Time
@@ -697,18 +688,18 @@ type SAPApplicationServerInstance struct {
// REQUIRED; The geo-location where the resource lives
Location *string
- // Defines the SAP Application Server instance properties.
+ // The resource-specific properties for this resource.
Properties *SAPApplicationServerProperties
// Resource tags.
Tags map[string]*string
+ // READ-ONLY; The name of SAP Application Server instance resource.
+ Name *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
@@ -716,13 +707,13 @@ type SAPApplicationServerInstance struct {
Type *string
}
-// SAPApplicationServerInstanceList - Defines the collection of SAP Application Server Instance resources.
-type SAPApplicationServerInstanceList struct {
- // Gets the value of next link.
- NextLink *string
-
- // Gets the list of SAP Application Server instance resources.
+// SAPApplicationServerInstanceListResult - The response of a SAPApplicationServerInstance list operation.
+type SAPApplicationServerInstanceListResult struct {
+ // REQUIRED; The SAPApplicationServerInstance items on this page
Value []*SAPApplicationServerInstance
+
+ // The link to the next page of items
+ NextLink *string
}
// SAPApplicationServerProperties - Defines the SAP Application Server instance properties.
@@ -803,32 +794,23 @@ type SAPAvailabilityZonePair struct {
ZoneB *int64
}
-// SAPCentralInstanceList - Defines the collection of SAP Central Services Instance resources.
-type SAPCentralInstanceList struct {
- // Gets the value of next link.
- NextLink *string
-
- // Gets the list of SAP central services instance resources.
- Value []*SAPCentralServerInstance
-}
-
// SAPCentralServerInstance - Define the SAP Central Services Instance resource.
type SAPCentralServerInstance struct {
// REQUIRED; The geo-location where the resource lives
Location *string
- // Defines the SAP Central Services Instance properties.
+ // The resource-specific properties for this resource.
Properties *SAPCentralServerProperties
// Resource tags.
Tags map[string]*string
+ // READ-ONLY; Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
+ Name *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
@@ -836,6 +818,15 @@ type SAPCentralServerInstance struct {
Type *string
}
+// SAPCentralServerInstanceListResult - The response of a SAPCentralServerInstance list operation.
+type SAPCentralServerInstanceListResult struct {
+ // REQUIRED; The SAPCentralServerInstance items on this page
+ Value []*SAPCentralServerInstance
+
+ // The link to the next page of items
+ NextLink *string
+}
+
// SAPCentralServerProperties - Defines the SAP Central Services Instance properties.
type SAPCentralServerProperties struct {
// Defines the SAP Enqueue Replication Server (ERS) properties.
@@ -883,7 +874,7 @@ type SAPCentralServerProperties struct {
// SAPConfiguration - The SAP Configuration.
type SAPConfiguration struct {
- // REQUIRED; The configuration Type.
+ // REQUIRED; The configuration type. Eg: Deployment/Discovery
ConfigurationType *SAPConfigurationType
}
@@ -895,18 +886,18 @@ type SAPDatabaseInstance struct {
// REQUIRED; The geo-location where the resource lives
Location *string
- // Defines the Database properties.
+ // The resource-specific properties for this resource.
Properties *SAPDatabaseProperties
// Resource tags.
Tags map[string]*string
+ // READ-ONLY; Database resource name string modeled as parameter for auto generation to work correctly.
+ Name *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
@@ -914,13 +905,13 @@ type SAPDatabaseInstance struct {
Type *string
}
-// SAPDatabaseInstanceList - Defines the collection of SAP Database Instances.
-type SAPDatabaseInstanceList struct {
- // Gets the value of next link.
- NextLink *string
-
- // Gets the list of SAP Database instances.
+// SAPDatabaseInstanceListResult - The response of a SAPDatabaseInstance list operation.
+type SAPDatabaseInstanceListResult struct {
+ // REQUIRED; The SAPDatabaseInstance items on this page
Value []*SAPDatabaseInstance
+
+ // The link to the next page of items
+ NextLink *string
}
// SAPDatabaseProperties - Defines the Database properties.
@@ -1000,7 +991,8 @@ type SAPInstallWithoutOSConfigSoftwareConfiguration struct {
// REQUIRED; The SAP bits storage account id.
SapBitsStorageAccountID *string
- // REQUIRED; The SAP software installation Type.
+ // CONSTANT; The SAP software installation Type.
+ // Field has constant value SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig, any specified value is ignored.
SoftwareInstallationType *SAPSoftwareInstallationType
// REQUIRED; The software version to install.
@@ -1049,7 +1041,7 @@ type SAPSizingRecommendationRequest struct {
// SAPSizingRecommendationResult - The SAP sizing recommendation result.
type SAPSizingRecommendationResult struct {
- // REQUIRED; The type of SAP deployment, single server or Three tier.
+ // REQUIRED; The deployment type. Eg: SingleServer/ThreeTier
DeploymentType *SAPDeploymentType
}
@@ -1102,11 +1094,14 @@ 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
+ // READ-ONLY; The name of the Virtual Instances for SAP solutions resource
+ Name *string
- // Managed service identity (user assigned identities)
- Identity *UserAssignedServiceIdentity
+ // The managed service identities assigned to this resource.
+ Identity *SAPVirtualInstanceIdentity
+
+ // The resource-specific properties for this resource.
+ Properties *SAPVirtualInstanceProperties
// Resource tags.
Tags map[string]*string
@@ -1114,9 +1109,6 @@ type SAPVirtualInstance struct {
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
- // READ-ONLY; The name of the resource
- Name *string
-
// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
SystemData *SystemData
@@ -1130,13 +1122,22 @@ type SAPVirtualInstanceError struct {
Properties *ErrorDefinition
}
-// SAPVirtualInstanceList - Defines the collection of Virtual Instance for SAP solutions resources.
-type SAPVirtualInstanceList struct {
- // Gets the value of next link.
- NextLink *string
+// SAPVirtualInstanceIdentity - Managed service identity (user assigned identities)
+type SAPVirtualInstanceIdentity struct {
+ // REQUIRED; The type of managed identity assigned to this resource.
+ Type *SAPVirtualInstanceIdentityType
+
+ // The identities assigned to this resource by the user.
+ UserAssignedIdentities map[string]*UserAssignedIdentity
+}
- // Gets the list of Virtual Instances for SAP solutions resources.
+// SAPVirtualInstanceListResult - The response of a SAPVirtualInstance list operation.
+type SAPVirtualInstanceListResult struct {
+ // REQUIRED; The SAPVirtualInstance items on this page
Value []*SAPVirtualInstance
+
+ // The link to the next page of items
+ NextLink *string
}
// SAPVirtualInstanceProperties - Defines the Virtual Instance for SAP solutions resource properties.
@@ -1155,10 +1156,9 @@ type SAPVirtualInstanceProperties struct {
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
+ // 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.
@@ -1184,7 +1184,7 @@ type SSHConfiguration struct {
}
// 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].
+// For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
type SSHKeyPair struct {
// SSH private key.
PrivateKey *string
@@ -1197,8 +1197,7 @@ type SSHKeyPair struct {
// is placed.
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].
+ // format.
For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
KeyData *string
}
@@ -1216,7 +1215,8 @@ type ServiceInitiatedSoftwareConfiguration struct {
// REQUIRED; The FQDN to set for the SAP system during install.
SapFqdn *string
- // REQUIRED; The SAP software installation Type.
+ // CONSTANT; The SAP software installation Type, service initiated in this case.
+ // Field has constant value SAPSoftwareInstallationTypeServiceInitiated, any specified value is ignored.
SoftwareInstallationType *SAPSoftwareInstallationType
// REQUIRED; The software version to install.
@@ -1243,12 +1243,13 @@ type SharedStorageResourceNames struct {
}
// 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]
+// please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409)
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.
+ // CONSTANT; The type of SAP deployment, single server in this case.
+ // Field has constant value SAPDeploymentTypeSingleServer, any specified value is ignored.
DeploymentType *SAPDeploymentType
// REQUIRED; The subnet id.
@@ -1281,7 +1282,7 @@ func (s *SingleServerConfiguration) GetInfrastructureConfiguration() *Infrastruc
// SingleServerCustomResourceNames - The resource-names input to specify custom names for underlying azure resources that
// are part of a single server SAP system.
type SingleServerCustomResourceNames struct {
- // REQUIRED; The pattern type to be used for resource naming.
+ // REQUIRED; The naming pattern type.
NamingPatternType *NamingPatternType
}
@@ -1293,7 +1294,8 @@ func (s *SingleServerCustomResourceNames) GetSingleServerCustomResourceNames() *
// SingleServerFullResourceNames - The resource name object where the specified values will be full resource names of the
// corresponding resources in a single server SAP system.
type SingleServerFullResourceNames struct {
- // REQUIRED; The pattern type to be used for resource naming.
+ // CONSTANT; The pattern type to be used for resource naming.
+ // Field has constant value NamingPatternTypeFullResourceName, any specified value is ignored.
NamingPatternType *NamingPatternType
// The resource names object for virtual machine and related resources.
@@ -1309,7 +1311,7 @@ func (s *SingleServerFullResourceNames) GetSingleServerCustomResourceNames() *Si
// SingleServerRecommendationResult - The recommended configuration for a single server SAP system.
type SingleServerRecommendationResult struct {
- // REQUIRED; The type of SAP deployment, single server or Three tier.
+ // REQUIRED; The single server SAP deployment type.
DeploymentType *SAPDeploymentType
// The recommended VM SKU for single server.
@@ -1326,8 +1328,9 @@ func (s *SingleServerRecommendationResult) GetSAPSizingRecommendationResult() *S
// SkipFileShareConfiguration - Gets or sets the file share configuration for scenarios where transport directory fileshare
// is not created or required.
type SkipFileShareConfiguration struct {
- // REQUIRED; The type of file share config.
- ConfigurationType *ConfigurationType
+ // CONSTANT; The type of file share config, skip in this case i.e. fileshare is not created or required.
+ // Field has constant value FileShareConfigurationTypeSkip, any specified value is ignored.
+ ConfigurationType *FileShareConfigurationType
}
// GetFileShareConfiguration implements the FileShareConfigurationClassification interface for type SkipFileShareConfiguration.
@@ -1339,7 +1342,7 @@ func (s *SkipFileShareConfiguration) GetFileShareConfiguration() *FileShareConfi
// SoftwareConfiguration - The SAP Software configuration Input.
type SoftwareConfiguration struct {
- // REQUIRED; The SAP software installation Type.
+ // REQUIRED; The SAP software installation type.
SoftwareInstallationType *SAPSoftwareInstallationType
}
@@ -1358,8 +1361,8 @@ type StopRequest struct {
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.
+ // 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
}
@@ -1372,7 +1375,7 @@ type StorageConfiguration struct {
// StorageInformation - Storage details of all the Storage accounts attached to the VM. For e.g. NFS on AFS Shared Storage.
type StorageInformation struct {
- // READ-ONLY
+ // READ-ONLY; Fully qualified resource ID for the storage account.
ID *string
}
@@ -1398,7 +1401,7 @@ type SystemData struct {
}
// 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]
+// please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409)
type ThreeTierConfiguration struct {
// REQUIRED; The application resource group where SAP system resources will be deployed.
AppResourceGroup *string
@@ -1412,7 +1415,8 @@ type ThreeTierConfiguration struct {
// REQUIRED; The database configuration.
DatabaseServer *DatabaseConfiguration
- // REQUIRED; The type of SAP deployment, single server or Three tier.
+ // CONSTANT; The type of SAP deployment, ThreeTier in this case.
+ // Field has constant value SAPDeploymentTypeThreeTier, any specified value is ignored.
DeploymentType *SAPDeploymentType
// The set of custom names to be used for underlying azure resources that are part of the SAP system.
@@ -1451,7 +1455,8 @@ func (t *ThreeTierCustomResourceNames) GetThreeTierCustomResourceNames() *ThreeT
// ThreeTierFullResourceNames - The resource name object where the specified values will be full resource names of the corresponding
// resources in a three tier SAP system.
type ThreeTierFullResourceNames struct {
- // REQUIRED; The pattern type to be used for resource naming.
+ // CONSTANT; The pattern type to be used for resource naming, FullResourceName in this case.
+ // Field has constant value NamingPatternTypeFullResourceName, any specified value is ignored.
NamingPatternType *NamingPatternType
// The full resource names object for application layer resources. The number of entries in this list should be equal to the
@@ -1478,7 +1483,7 @@ func (t *ThreeTierFullResourceNames) GetThreeTierCustomResourceNames() *ThreeTie
// ThreeTierRecommendationResult - The recommended configuration for a three tier SAP system.
type ThreeTierRecommendationResult struct {
- // REQUIRED; The type of SAP deployment, single server or Three tier.
+ // REQUIRED; The three tier SAP deployment type.
DeploymentType *SAPDeploymentType
// The application server instance count.
@@ -1525,22 +1530,21 @@ type UpdateSAPDatabaseInstanceRequest struct {
Tags map[string]*string
}
-// UpdateSAPVirtualInstanceProperties - Defines the properties to be updated for Virtual Instance for SAP.
+// UpdateSAPVirtualInstanceProperties - Defines the update request body properties for updating Virtual Instance for SAP.
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
+ // 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
}
// UpdateSAPVirtualInstanceRequest - Defines the request body for updating Virtual Instance for SAP.
type UpdateSAPVirtualInstanceRequest struct {
// Managed service identity (user assigned identities)
- Identity *UserAssignedServiceIdentity
+ Identity *SAPVirtualInstanceIdentity
- // Defines the properties to be updated for Virtual Instance for SAP.
+ // The update properties.
Properties *UpdateSAPVirtualInstanceProperties
// Gets or sets the Resource tags.
@@ -1556,15 +1560,6 @@ type UserAssignedIdentity struct {
PrincipalID *string
}
-// UserAssignedServiceIdentity - Managed service identity (user assigned identities)
-type UserAssignedServiceIdentity struct {
- // REQUIRED; Type of manage identity
- Type *ManagedServiceIdentityType
-
- // User assigned identities dictionary
- UserAssignedIdentities map[string]*UserAssignedIdentity
-}
-
// VirtualMachineConfiguration - Defines the virtual machine configuration.
type VirtualMachineConfiguration struct {
// REQUIRED; The image reference.
@@ -1580,13 +1575,12 @@ type VirtualMachineConfiguration struct {
// VirtualMachineResourceNames - The resource names object for virtual machine and related resources.
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
+ // 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.
+ // 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
@@ -1594,21 +1588,21 @@ type VirtualMachineResourceNames struct {
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.
+ // 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.
+ // 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
}
// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
type WindowsConfiguration struct {
- // REQUIRED; The OS Type
+ // CONSTANT; The OS Type
+ // Field has constant value OSTypeWindows, any specified value is ignored.
OSType *OSType
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/models_serde.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/models_serde.go
index a4cbf08d5ef7..ee88a36bad39 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/models_serde.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/models_serde.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -224,7 +220,7 @@ func (c *CentralServerVMDetails) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type CreateAndMountFileShareConfiguration.
func (c CreateAndMountFileShareConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["configurationType"] = ConfigurationTypeCreateAndMount
+ objectMap["configurationType"] = FileShareConfigurationTypeCreateAndMount
populate(objectMap, "resourceGroup", c.ResourceGroup)
populate(objectMap, "storageAccountName", c.StorageAccountName)
return json.Marshal(objectMap)
@@ -754,7 +750,7 @@ func (e *EnqueueServerProperties) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- populateAny(objectMap, "info", e.Info)
+ populate(objectMap, "info", e.Info)
populate(objectMap, "type", e.Type)
return json.Marshal(objectMap)
}
@@ -894,7 +890,7 @@ func (e *ExternalInstallationSoftwareConfiguration) UnmarshalJSON(data []byte) e
// MarshalJSON implements the json.Marshaller interface for type FileShareConfiguration.
func (f FileShareConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["configurationType"] = f.ConfigurationType
+ populate(objectMap, "configurationType", f.ConfigurationType)
return json.Marshal(objectMap)
}
@@ -1054,7 +1050,7 @@ func (i *ImageReference) UnmarshalJSON(data []byte) error {
func (i InfrastructureConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "appResourceGroup", i.AppResourceGroup)
- objectMap["deploymentType"] = i.DeploymentType
+ populate(objectMap, "deploymentType", i.DeploymentType)
return json.Marshal(objectMap)
}
@@ -1267,7 +1263,7 @@ func (m *MessageServerProperties) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type MountFileShareConfiguration.
func (m MountFileShareConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["configurationType"] = ConfigurationTypeMount
+ objectMap["configurationType"] = FileShareConfigurationTypeMount
populate(objectMap, "id", m.ID)
populate(objectMap, "privateEndpointId", m.PrivateEndpointID)
return json.Marshal(objectMap)
@@ -1356,7 +1352,7 @@ func (n *NetworkInterfaceResourceNames) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type OSConfiguration.
func (o OSConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["osType"] = o.OSType
+ populate(objectMap, "osType", o.OSType)
return json.Marshal(objectMap)
}
@@ -1665,16 +1661,16 @@ func (s *SAPApplicationServerInstance) UnmarshalJSON(data []byte) error {
return nil
}
-// MarshalJSON implements the json.Marshaller interface for type SAPApplicationServerInstanceList.
-func (s SAPApplicationServerInstanceList) MarshalJSON() ([]byte, error) {
+// MarshalJSON implements the json.Marshaller interface for type SAPApplicationServerInstanceListResult.
+func (s SAPApplicationServerInstanceListResult) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "nextLink", s.NextLink)
populate(objectMap, "value", s.Value)
return json.Marshal(objectMap)
}
-// UnmarshalJSON implements the json.Unmarshaller interface for type SAPApplicationServerInstanceList.
-func (s *SAPApplicationServerInstanceList) UnmarshalJSON(data []byte) error {
+// UnmarshalJSON implements the json.Unmarshaller interface for type SAPApplicationServerInstanceListResult.
+func (s *SAPApplicationServerInstanceListResult) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", s, err)
@@ -1876,37 +1872,6 @@ func (s *SAPAvailabilityZonePair) UnmarshalJSON(data []byte) error {
return nil
}
-// MarshalJSON implements the json.Marshaller interface for type SAPCentralInstanceList.
-func (s SAPCentralInstanceList) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]any)
- populate(objectMap, "nextLink", s.NextLink)
- populate(objectMap, "value", s.Value)
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON implements the json.Unmarshaller interface for type SAPCentralInstanceList.
-func (s *SAPCentralInstanceList) UnmarshalJSON(data []byte) error {
- var rawMsg map[string]json.RawMessage
- if err := json.Unmarshal(data, &rawMsg); err != nil {
- return fmt.Errorf("unmarshalling type %T: %v", s, err)
- }
- for key, val := range rawMsg {
- var err error
- switch key {
- case "nextLink":
- err = unpopulate(val, "NextLink", &s.NextLink)
- delete(rawMsg, key)
- case "value":
- err = unpopulate(val, "Value", &s.Value)
- delete(rawMsg, key)
- }
- if err != nil {
- return fmt.Errorf("unmarshalling type %T: %v", s, err)
- }
- }
- return nil
-}
-
// MarshalJSON implements the json.Marshaller interface for type SAPCentralServerInstance.
func (s SAPCentralServerInstance) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
@@ -1958,6 +1923,37 @@ func (s *SAPCentralServerInstance) UnmarshalJSON(data []byte) error {
return nil
}
+// MarshalJSON implements the json.Marshaller interface for type SAPCentralServerInstanceListResult.
+func (s SAPCentralServerInstanceListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", s.NextLink)
+ populate(objectMap, "value", s.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SAPCentralServerInstanceListResult.
+func (s *SAPCentralServerInstanceListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &s.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &s.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
// MarshalJSON implements the json.Marshaller interface for type SAPCentralServerProperties.
func (s SAPCentralServerProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
@@ -2040,7 +2036,7 @@ func (s *SAPCentralServerProperties) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type SAPConfiguration.
func (s SAPConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["configurationType"] = s.ConfigurationType
+ populate(objectMap, "configurationType", s.ConfigurationType)
return json.Marshal(objectMap)
}
@@ -2115,16 +2111,16 @@ func (s *SAPDatabaseInstance) UnmarshalJSON(data []byte) error {
return nil
}
-// MarshalJSON implements the json.Marshaller interface for type SAPDatabaseInstanceList.
-func (s SAPDatabaseInstanceList) MarshalJSON() ([]byte, error) {
+// MarshalJSON implements the json.Marshaller interface for type SAPDatabaseInstanceListResult.
+func (s SAPDatabaseInstanceListResult) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "nextLink", s.NextLink)
populate(objectMap, "value", s.Value)
return json.Marshal(objectMap)
}
-// UnmarshalJSON implements the json.Unmarshaller interface for type SAPDatabaseInstanceList.
-func (s *SAPDatabaseInstanceList) UnmarshalJSON(data []byte) error {
+// UnmarshalJSON implements the json.Unmarshaller interface for type SAPDatabaseInstanceListResult.
+func (s *SAPDatabaseInstanceListResult) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", s, err)
@@ -2415,7 +2411,7 @@ func (s *SAPSizingRecommendationRequest) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type SAPSizingRecommendationResult.
func (s SAPSizingRecommendationResult) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["deploymentType"] = s.DeploymentType
+ populate(objectMap, "deploymentType", s.DeploymentType)
return json.Marshal(objectMap)
}
@@ -2630,16 +2626,47 @@ func (s *SAPVirtualInstanceError) UnmarshalJSON(data []byte) error {
return nil
}
-// MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstanceList.
-func (s SAPVirtualInstanceList) MarshalJSON() ([]byte, error) {
+// MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstanceIdentity.
+func (s SAPVirtualInstanceIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "type", s.Type)
+ populate(objectMap, "userAssignedIdentities", s.UserAssignedIdentities)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstanceIdentity.
+func (s *SAPVirtualInstanceIdentity) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "type":
+ err = unpopulate(val, "Type", &s.Type)
+ delete(rawMsg, key)
+ case "userAssignedIdentities":
+ err = unpopulate(val, "UserAssignedIdentities", &s.UserAssignedIdentities)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SAPVirtualInstanceListResult.
+func (s SAPVirtualInstanceListResult) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
populate(objectMap, "nextLink", s.NextLink)
populate(objectMap, "value", s.Value)
return json.Marshal(objectMap)
}
-// UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstanceList.
-func (s *SAPVirtualInstanceList) UnmarshalJSON(data []byte) error {
+// UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstanceListResult.
+func (s *SAPVirtualInstanceListResult) UnmarshalJSON(data []byte) error {
var rawMsg map[string]json.RawMessage
if err := json.Unmarshal(data, &rawMsg); err != nil {
return fmt.Errorf("unmarshalling type %T: %v", s, err)
@@ -2949,7 +2976,7 @@ func (s *SingleServerConfiguration) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type SingleServerCustomResourceNames.
func (s SingleServerCustomResourceNames) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["namingPatternType"] = s.NamingPatternType
+ populate(objectMap, "namingPatternType", s.NamingPatternType)
return json.Marshal(objectMap)
}
@@ -3038,7 +3065,7 @@ func (s *SingleServerRecommendationResult) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type SkipFileShareConfiguration.
func (s SkipFileShareConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["configurationType"] = ConfigurationTypeSkip
+ objectMap["configurationType"] = FileShareConfigurationTypeSkip
return json.Marshal(objectMap)
}
@@ -3065,7 +3092,7 @@ func (s *SkipFileShareConfiguration) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type SoftwareConfiguration.
func (s SoftwareConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["softwareInstallationType"] = s.SoftwareInstallationType
+ populate(objectMap, "softwareInstallationType", s.SoftwareInstallationType)
return json.Marshal(objectMap)
}
@@ -3310,7 +3337,7 @@ func (t *ThreeTierConfiguration) UnmarshalJSON(data []byte) error {
// MarshalJSON implements the json.Marshaller interface for type ThreeTierCustomResourceNames.
func (t ThreeTierCustomResourceNames) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
- objectMap["namingPatternType"] = t.NamingPatternType
+ populate(objectMap, "namingPatternType", t.NamingPatternType)
return json.Marshal(objectMap)
}
@@ -3602,37 +3629,6 @@ func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error {
return nil
}
-// MarshalJSON implements the json.Marshaller interface for type UserAssignedServiceIdentity.
-func (u UserAssignedServiceIdentity) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]any)
- populate(objectMap, "type", u.Type)
- populate(objectMap, "userAssignedIdentities", u.UserAssignedIdentities)
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedServiceIdentity.
-func (u *UserAssignedServiceIdentity) UnmarshalJSON(data []byte) error {
- var rawMsg map[string]json.RawMessage
- if err := json.Unmarshal(data, &rawMsg); err != nil {
- return fmt.Errorf("unmarshalling type %T: %v", u, err)
- }
- for key, val := range rawMsg {
- var err error
- switch key {
- case "type":
- err = unpopulate(val, "Type", &u.Type)
- delete(rawMsg, key)
- case "userAssignedIdentities":
- err = unpopulate(val, "UserAssignedIdentities", &u.UserAssignedIdentities)
- delete(rawMsg, key)
- }
- if err != nil {
- return fmt.Errorf("unmarshalling type %T: %v", u, err)
- }
- }
- return nil
-}
-
// MarshalJSON implements the json.Marshaller interface for type VirtualMachineConfiguration.
func (v VirtualMachineConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]any)
@@ -3748,16 +3744,6 @@ func populate(m map[string]any, k string, v any) {
}
}
-func populateAny(m map[string]any, k string, v any) {
- if v == nil {
- return
- } else if azcore.IsNullValue(v) {
- m[k] = nil
- } else {
- m[k] = v
- }
-}
-
func unpopulate(data json.RawMessage, fn string, v any) error {
if data == nil || string(data) == "null" {
return nil
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/operations_client.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/operations_client.go
index b8bc3adcba32..3bc79af74b05 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/operations_client.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/operations_client.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -37,9 +33,9 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO
return client, nil
}
-// NewListPager - Lists all the available API operations under this PR
+// NewListPager - List the operations for the provider
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] {
return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{
@@ -65,14 +61,14 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption
}
// listCreateRequest creates the List request.
-func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) {
+func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *OperationsClientListOptions) (*policy.Request, error) {
urlPath := "/providers/Microsoft.Workloads/operations"
req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
if err != nil {
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/operations_client_example_test.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/operations_client_example_test.go
index 5d08b8a4c4be..6552b7d20fed 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/operations_client_example_test.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/operations_client_example_test.go
@@ -1,30 +1,24 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-// DO NOT EDIT.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance_test
import (
"context"
- "log"
-
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance"
+ "log"
)
-// 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
+// Generated from example definition: 2024-09-01/Operations_List.json
func ExampleOperationsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
@@ -39,278 +33,1101 @@ func ExampleOperationsClient_NewListPager() {
_ = 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),
+ // page = armworkloadssapvirtualinstance.OperationsClientListResponse{
+ // OperationListResult: armworkloadssapvirtualinstance.OperationListResult{
+ // Value: []*armworkloadssapvirtualinstance.Operation{
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/RegisteredSubscriptions/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("RegisteredSubscriptions"),
+ // Operation: to.Ptr("Gets/Lists registered subscriptions"),
+ // Description: to.Ptr("Reads registered subscriptions"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/wordpressInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads/wordpressInstances"),
+ // Operation: to.Ptr("WordpressInstances_List"),
+ // Description: to.Ptr("Lists WordpressInstances resources under a phpWorkload resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/wordpressInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads/wordpressInstances"),
+ // Operation: to.Ptr("WordpressInstances_Get"),
+ // Description: to.Ptr("Gets a WordpressInstances resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/wordpressInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads/wordpressInstances"),
+ // Operation: to.Ptr("WordpressInstances_CreateOrUpdate"),
+ // Description: to.Ptr("Create or updated WordpressInstances resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/wordpressInstances/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads/wordpressInstances"),
+ // Operation: to.Ptr("WordpressInstances_Delete"),
+ // Description: to.Ptr("Delete WordpressInstances resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/skus/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("Skus"),
+ // Operation: to.Ptr("Gets the list of Microsoft.Workloads SKUs available for your Subscription"),
+ // Description: to.Ptr("Gets the list of Microsoft.Workloads SKUs available for your Subscription"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/Operations/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("Operations"),
+ // Operation: to.Ptr("read_Operations"),
+ // Description: to.Ptr("read Operations"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/register/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("Microsoft.Workloads"),
+ // Operation: to.Ptr("Register the Microsoft.Workloads"),
+ // Description: to.Ptr("Register the subscription for Microsoft.Workloads"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/unregister/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("Microsoft.Workloads"),
+ // Operation: to.Ptr("Unregister the Microsoft.Workloads"),
+ // Description: to.Ptr("Unregister the subscription for Microsoft.Workloads"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/Locations/OperationStatuses/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("Locations/OperationStatuses"),
+ // Operation: to.Ptr("read_OperationStatuses"),
+ // Description: to.Ptr("read OperationStatuses"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/Locations/OperationStatuses/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("Locations/OperationStatuses"),
+ // Operation: to.Ptr("write_OperationStatuses"),
+ // Description: to.Ptr("write OperationStatuses"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads"),
+ // Operation: to.Ptr("PhpWorkloads_ListBySubscription"),
+ // Description: to.Ptr("Lists phpWorkload resources in a subscription"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads"),
+ // Operation: to.Ptr("PhpWorkloads_ListByResourceGroup"),
+ // Description: to.Ptr("Lists phpWorkload resources in a resource group"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads"),
+ // Operation: to.Ptr("PhpWorkloads_Get"),
+ // Description: to.Ptr("Gets a phpWorkload resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads"),
+ // Operation: to.Ptr("PhpWorkloads_CreateOrUpdate"),
+ // Description: to.Ptr("Create or updated phpWorkloads resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads"),
+ // Operation: to.Ptr("PhpWorkloads_Delete"),
+ // Description: to.Ptr("Delete phpWorkloads resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/phpWorkloads/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("phpWorkloads"),
+ // Operation: to.Ptr("PhpWorkloads_Update"),
+ // Description: to.Ptr("Update PHP workload resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/applicationInstances"),
+ // Operation: to.Ptr("SAPApplicationServerInstances_Get"),
+ // Description: to.Ptr("Gets the SAP Application Server Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/applicationInstances"),
+ // Operation: to.Ptr("SAPApplicationServerInstances_Create"),
+ // Description: to.Ptr("Puts the SAP Application Server Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/applicationInstances"),
+ // Operation: to.Ptr("SAPApplicationServerInstances_Delete"),
+ // Description: to.Ptr("Deletes the SAP Application Server Instance.
This operation will be used by service only. Delete by end user will return a Bad Request error."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/applicationInstances"),
+ // Operation: to.Ptr("SAPApplicationServerInstances_Update"),
+ // Description: to.Ptr("Puts the SAP Application Server Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/applicationInstances"),
+ // Operation: to.Ptr("SAPApplicationServerInstances_List"),
+ // Description: to.Ptr("Lists the SAP Application server Instances in an SVI."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/start/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/applicationInstances"),
+ // Operation: to.Ptr("SAPApplicationServerInstances_StartInstance"),
+ // Description: to.Ptr("Starts the SAP Application server Instance in an SVI."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/applicationInstances/stop/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/applicationInstances"),
+ // Operation: to.Ptr("SAPApplicationServerInstances_StopInstance"),
+ // Description: to.Ptr("Stops the SAP Application server Instance in an SVI."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/centralInstances"),
+ // Operation: to.Ptr("SAPCentralInstances_Get"),
+ // Description: to.Ptr("Gets the SAP Central Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/centralInstances"),
+ // Operation: to.Ptr("SAPCentralInstances_Create"),
+ // Description: to.Ptr("Puts the SAP Central Instance.
This will be used by service only. PUT by end user will return a Bad Request error."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/centralInstances"),
+ // Operation: to.Ptr("SAPCentralInstances_Delete"),
+ // Description: to.Ptr("Deletes the SAP Central Instance.
This will be used by service only. Delete by end user will return a Bad Request error."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/centralInstances"),
+ // Operation: to.Ptr("SAPCentralInstances_Update"),
+ // Description: to.Ptr("Updates the SAP Central Instance.
This can be used to update tags."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/centralInstances"),
+ // Operation: to.Ptr("SAPCentralInstances_List"),
+ // Description: to.Ptr("Lists the SAP Central Instances in an SVI."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/start/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/centralInstances"),
+ // Operation: to.Ptr("SAPCentralInstances_StartInstance"),
+ // Description: to.Ptr("Starts the SAP Central server Instance in an SVI."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/centralInstances/stop/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/centralInstances"),
+ // Operation: to.Ptr("SAPCentralInstances_StopInstance"),
+ // Description: to.Ptr("Stops the SAP Central server Instance in an SVI."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/databaseInstances"),
+ // Operation: to.Ptr("SAPDatabaseInstances_Get"),
+ // Description: to.Ptr("Gets the SAP Database Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/databaseInstances"),
+ // Operation: to.Ptr("SAPDatabaseInstances_Create"),
+ // Description: to.Ptr("Puts the SAP Database Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/databaseInstances"),
+ // Operation: to.Ptr("SAPDatabaseInstances_Delete"),
+ // Description: to.Ptr("Deletes the SAP Database Instance.
This will be used by service only. Delete by end user will return a Bad Request error."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/databaseInstances"),
+ // Operation: to.Ptr("SAPDatabaseInstances_Update"),
+ // Description: to.Ptr("Puts the SAP Database Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/databaseInstances"),
+ // Operation: to.Ptr("SAPDatabaseInstances_List"),
+ // Description: to.Ptr("Lists the SAP Database Instances in an SVI."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/start/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/databaseInstances"),
+ // Operation: to.Ptr("SAPDatabaseInstances_StartInstance"),
+ // Description: to.Ptr("Starts the database instance of the SAP system."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/databaseInstances/stop/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances/databaseInstances"),
+ // Operation: to.Ptr("SAPDatabaseInstances_StopInstance"),
+ // Description: to.Ptr("Stops the database instance of the SAP system."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors"),
+ // Operation: to.Ptr("monitors_List"),
+ // Description: to.Ptr("Gets a list of SAP monitors in the specified subscription. The operations returns various properties of each SAP monitor."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors"),
+ // Operation: to.Ptr("monitors_ListByResourceGroup"),
+ // Description: to.Ptr("Gets a list of SAP monitors in the specified resource group."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors"),
+ // Operation: to.Ptr("monitors_Get"),
+ // Description: to.Ptr("Gets properties of a SAP monitor for the specified subscription, resource group, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors"),
+ // Operation: to.Ptr("monitors_Create"),
+ // Description: to.Ptr("Creates a SAP monitor for the specified subscription, resource group, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors"),
+ // Operation: to.Ptr("monitors_Delete"),
+ // Description: to.Ptr("Deletes a SAP monitor with the specified subscription, resource group, and monitor name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors"),
+ // Operation: to.Ptr("monitors_Update"),
+ // Description: to.Ptr("Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/providerInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/providerInstances"),
+ // Operation: to.Ptr("ProviderInstances_List"),
+ // Description: to.Ptr("Gets a list of provider instances in the specified SAP monitor. The operations returns various properties of each provider instances."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/providerInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/providerInstances"),
+ // Operation: to.Ptr("ProviderInstances_Get"),
+ // Description: to.Ptr("Gets properties of a provider instance for the specified subscription, resource group, Monitor name, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/providerInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/providerInstances"),
+ // Operation: to.Ptr("ProviderInstances_Create"),
+ // Description: to.Ptr("Creates a provider instance for the specified subscription, resource group, Monitor name, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/providerInstances/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/providerInstances"),
+ // Operation: to.Ptr("ProviderInstances_Delete"),
+ // Description: to.Ptr("Deletes a provider instance for the specified subscription, resource group, Monitor name, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/alerts/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/alerts"),
+ // Operation: to.Ptr("Alerts_List"),
+ // Description: to.Ptr("Gets a list of alert instances in the specified SAP monitor. The operations returns various properties of each provider instances."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/alerts/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/alerts"),
+ // Operation: to.Ptr("Alerts_Get"),
+ // Description: to.Ptr("Gets properties of a alert for the specified subscription, resource group, Monitor name, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/alerts/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/alerts"),
+ // Operation: to.Ptr("Alerts_Create"),
+ // Description: to.Ptr("Creates a alert for the specified subscription, resource group, Monitor name, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/alerts/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/alerts"),
+ // Operation: to.Ptr("Alerts_Delete"),
+ // Description: to.Ptr("Deletes a alert for the specified subscription, resource group, Monitor name, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/alertTemplates/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/alertTemplates"),
+ // Operation: to.Ptr("AlertTemplates_List"),
+ // Description: to.Ptr("Gets properties of an alert template for the specified subscription, resource group, SAP monitor name, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/alertTemplates/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/alertTemplates"),
+ // Operation: to.Ptr("AlertTemplates_Get"),
+ // Description: to.Ptr("Gets properties of a alert for the specified subscription, resource group, Monitor name, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/sapLandscapeMonitor"),
+ // Operation: to.Ptr("SapLandscapeMonitor_List"),
+ // Description: to.Ptr("Gets a list of properties of a SAP Landscape monitor configuration for the specified subscription, resource group, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/sapLandscapeMonitor"),
+ // Operation: to.Ptr("SapLandscapeMonitor_Get"),
+ // Description: to.Ptr("Gets properties of a SAP Landscape monitor configuration for the specified subscription, resource group, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/sapLandscapeMonitor"),
+ // Operation: to.Ptr("SapLandscapeMonitor_Create"),
+ // Description: to.Ptr("Creates a SAP Landscape monitor configuration for the specified subscription, resource group, and resource name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/monitors/sapLandscapeMonitor/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("monitors/sapLandscapeMonitor"),
+ // Operation: to.Ptr("SapLandscapeMonitor_Delete"),
+ // Description: to.Ptr("Deletes a SAP Landscape monitor configuration with the specified subscription, resource group, and monitor name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances"),
+ // Operation: to.Ptr("SAPVirtualInstances_Get"),
+ // Description: to.Ptr("Gets an SAP Virtual Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances"),
+ // Operation: to.Ptr("SAPVirtualInstances_Create"),
+ // Description: to.Ptr("Creates an SAP Virtual Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances"),
+ // Operation: to.Ptr("SAPVirtualInstances_Delete"),
+ // Description: to.Ptr("Deletes an SAP Virtual Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances"),
+ // Operation: to.Ptr("SAPVirtualInstances_Update"),
+ // Description: to.Ptr("Updates an SAP Virtual Instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances"),
+ // Operation: to.Ptr("SAPVirtualInstances_ListByResourceGroup"),
+ // Description: to.Ptr("Gets all SAP Virtual Instances in a resource group."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances"),
+ // Operation: to.Ptr("SAPVirtualInstances_ListBySubscription"),
+ // Description: to.Ptr("Gets all SAP Virtual Instances in the subscription."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/start/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances"),
+ // Operation: to.Ptr("SAPVirtualInstances_Start"),
+ // Description: to.Ptr("Starts the SAP System."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapVirtualInstances/stop/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapVirtualInstances"),
+ // Operation: to.Ptr("SAPVirtualInstances_Stop"),
+ // Description: to.Ptr("Stops the SAP System."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/locations/sapVirtualInstanceMetadata/getSizingRecommendations/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("locations/sapVirtualInstanceMetadata"),
+ // Operation: to.Ptr("SAPSizingRecommendations"),
+ // Description: to.Ptr("Get SAP sizing recommendations."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/locations/sapVirtualInstanceMetadata/getSapSupportedSku/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("locations/sapVirtualInstanceMetadata"),
+ // Operation: to.Ptr("SAPSupportedSku"),
+ // Description: to.Ptr("Get SAP supported SKUs."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/locations/sapVirtualInstanceMetadata/getDiskConfigurations/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("locations/sapVirtualInstanceMetadata"),
+ // Operation: to.Ptr("SAPDiskConfigurations"),
+ // Description: to.Ptr("Get SAP Disk Configurations."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/locations/sapVirtualInstanceMetadata/getAvailabilityZoneDetails/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("locations/sapVirtualInstanceMetadata"),
+ // Operation: to.Ptr("SAPAvailabilityZoneDetails"),
+ // Description: to.Ptr("Get SAP Availability Zone Details."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors"),
+ // Operation: to.Ptr("Connectors_Get"),
+ // Description: to.Ptr("Gets a connector resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors"),
+ // Operation: to.Ptr("Connectors_Create"),
+ // Description: to.Ptr("Creates a connector resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors"),
+ // Operation: to.Ptr("Connectors_Delete"),
+ // Description: to.Ptr("Deletes a connector resource and its child resources, which are the associated connection resources. All the child resources have to be deleted before deleting the connector resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors"),
+ // Operation: to.Ptr("Connectors_Update"),
+ // Description: to.Ptr("Updates a connector resource"),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors"),
+ // Operation: to.Ptr("Connectors_ListByResourceGroup"),
+ // Description: to.Ptr("Gets all connector resources in a Resource Group."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors"),
+ // Operation: to.Ptr("Connectors_ListBySubscription"),
+ // Description: to.Ptr("Gets all connector resources in a Subscription."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/acssBackups"),
+ // Operation: to.Ptr("ACSSBackupConnections_Get"),
+ // Description: to.Ptr("Gets the backup connection resource of virtual instance for SAP."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/acssBackups"),
+ // Operation: to.Ptr("ACSSBackupConnections_Create"),
+ // Description: to.Ptr("Creates the backup connection resource of virtual instance for SAP."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/acssBackups"),
+ // Operation: to.Ptr("ACSSBackupConnections_Delete"),
+ // Description: to.Ptr("Deletes the backup connection resource of virtual instance for SAP."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/acssBackups"),
+ // Operation: to.Ptr("ACSSBackupConnections_Update"),
+ // Description: to.Ptr("Updates the backup connection resource of virtual instance for SAP.
This can be used to update tags on the resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/acssBackups/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/acssBackups"),
+ // Operation: to.Ptr("ACSSBackupConnections_List"),
+ // Description: to.Ptr("Lists the backup connection resources of virtual instance for SAP under the given connector resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/sapVirtualInstanceMonitors/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/sapVirtualInstanceMonitors"),
+ // Operation: to.Ptr("SapVirtualInstanceMonitorConnections_Get"),
+ // Description: to.Ptr("Gets the monitor connection resource of virtual instance for SAP."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/sapVirtualInstanceMonitors/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/sapVirtualInstanceMonitors"),
+ // Operation: to.Ptr("SapVirtualInstanceMonitorConnections_Create"),
+ // Description: to.Ptr("Creates the monitor connection resource of virtual instance for SAP."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/sapVirtualInstanceMonitors/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/sapVirtualInstanceMonitors"),
+ // Operation: to.Ptr("SapVirtualInstanceMonitorConnections_Delete"),
+ // Description: to.Ptr("Deletes the monitor connection resource of virtual instance for SAP."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/sapVirtualInstanceMonitors/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/sapVirtualInstanceMonitors"),
+ // Operation: to.Ptr("SapVirtualInstanceMonitorConnections_Update"),
+ // Description: to.Ptr("Updates the monitor connection resource of virtual instance for SAP.
This can be used to update tags on the resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/connectors/sapVirtualInstanceMonitors/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("connectors/sapVirtualInstanceMonitors"),
+ // Operation: to.Ptr("SapVirtualInstanceMonitorConnections_List"),
+ // Description: to.Ptr("Lists the monitor connection resources of virtual instance for SAP under the given connector resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/insights/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("insights"),
+ // Operation: to.Ptr("Insights_Get"),
+ // Description: to.Ptr("Gets properties of Workloads Insights instance for the specified subscription, resource group and instance name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/insights/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("insights"),
+ // Operation: to.Ptr("Insights_ListByResourceGroup"),
+ // Description: to.Ptr("Gets a list of Workloads Insight instances in the specified subscription and resource group. The operations returns various properties of each instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/insights/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("insights"),
+ // Operation: to.Ptr("Insights_List"),
+ // Description: to.Ptr("Gets a list of Workloads Insight instances in the specified subscription. The operations returns various properties of each instance."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/insights/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("insights"),
+ // Operation: to.Ptr("Insights_Create"),
+ // Description: to.Ptr("Creates a Workloads Insights instance for the specified subscription, resource group, and instance name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/insights/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("insights"),
+ // Operation: to.Ptr("Insights_Delete"),
+ // Description: to.Ptr("Deletes a Workloads Insights instance for the specified subscription, resource group and instance name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/insights/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("insights"),
+ // Operation: to.Ptr("Insights_Update"),
+ // Description: to.Ptr("Patches the Workload Insights instance for the specified subscription, resource group, and instance name."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites"),
+ // Operation: to.Ptr("SAPDiscoverySites_Get"),
+ // Description: to.Ptr("Gets a SAP Migration discovery site resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites"),
+ // Operation: to.Ptr("SAPDiscoverySites_Create"),
+ // Description: to.Ptr("Creates a discovery site for SAP Migration."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites"),
+ // Operation: to.Ptr("SAPDiscoverySites_Delete"),
+ // Description: to.Ptr("Deletes a SAP Migration discovery site resource and its child resources, that is the associated SAP Instances and Server Instances."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites"),
+ // Operation: to.Ptr("SAPDiscoverySites_Update"),
+ // Description: to.Ptr("SAPDiscoverySites_Update."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites"),
+ // Operation: to.Ptr("SAPDiscoverySites_ListByResourceGroup"),
+ // Description: to.Ptr("Gets all SAP Migration discovery site resources in a Resource Group."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites"),
+ // Operation: to.Ptr("SAPDiscoverySites_ListBySubscription"),
+ // Description: to.Ptr("Gets all SAP Migration discovery site resources in a Subscription."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/importEntities/action"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites"),
+ // Operation: to.Ptr("SAPDiscoverySites_ImportEntities"),
+ // Description: to.Ptr("Import a SAP Migration discovery site resource and it's child resources, that is the SAP instances and Server instances."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances"),
+ // Operation: to.Ptr("SAPInstances_Get"),
+ // Description: to.Ptr("Gets the SAP Instance resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances"),
+ // Operation: to.Ptr("SAPInstances_Create"),
+ // Description: to.Ptr("Creates the SAP Instance resource.
This will be used by service only. PUT operation on this resource by end user will return a Bad Request error."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances"),
+ // Operation: to.Ptr("SAPInstances_Delete"),
+ // Description: to.Ptr("Deletes the SAP 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 SAP Migration discovery site resource, using the delete operation on it."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances"),
+ // Operation: to.Ptr("SAPInstances_Update"),
+ // Description: to.Ptr("Updates the SAP Instance resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances"),
+ // Operation: to.Ptr("SAPInstances_List"),
+ // Description: to.Ptr("Lists the SAP Instance resources for the given SAP Migration discovery site resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/serverInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances/serverInstances"),
+ // Operation: to.Ptr("ServerInstances_Get"),
+ // Description: to.Ptr("Gets the Server Instance resource."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/serverInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances/serverInstances"),
+ // Operation: to.Ptr("ServerInstances_Create"),
+ // Description: to.Ptr("Creates the Server Instance resource.
This will be used by service only. PUT operation on this resource by end user will return a Bad Request error."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/serverInstances/delete"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances/serverInstances"),
+ // Operation: to.Ptr("ServerInstances_Delete"),
+ // Description: to.Ptr("Deletes the Server 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 SAP Migration discovery site resource, using the delete operation on it."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/serverInstances/write"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances/serverInstances"),
+ // Operation: to.Ptr("ServerInstances_Update"),
+ // Description: to.Ptr("Updates the Server Instance resource. This operation on a resource by end user will return a Bad Request error."),
+ // },
+ // },
+ // {
+ // Name: to.Ptr("Microsoft.Workloads/sapDiscoverySites/sapInstances/serverInstances/read"),
+ // IsDataAction: to.Ptr(false),
+ // Display: &armworkloadssapvirtualinstance.OperationDisplay{
+ // Provider: to.Ptr("Microsoft.Workloads"),
+ // Resource: to.Ptr("sapDiscoverySites/sapInstances/serverInstances"),
+ // Operation: to.Ptr("ServerInstances_List"),
+ // Description: to.Ptr("Lists the Server Instance resources for the given SAP Instance resource."),
+ // },
+ // },
// },
- // {
- // 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),
- // }},
+ // },
// }
}
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/options.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/options.go
index af565915360c..11124bbe7472 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/options.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/options.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -16,35 +12,35 @@ type OperationsClientListOptions struct {
// SAPApplicationServerInstancesClientBeginCreateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginCreate
// method.
type SAPApplicationServerInstancesClientBeginCreateOptions struct {
- // Resumes the LRO from the provided token.
+ // Resumes the long-running operation from the provided token.
ResumeToken string
}
// SAPApplicationServerInstancesClientBeginDeleteOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginDelete
// method.
type SAPApplicationServerInstancesClientBeginDeleteOptions struct {
- // Resumes the LRO from the provided token.
+ // Resumes the long-running operation from the provided token.
ResumeToken string
}
-// SAPApplicationServerInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStartInstance
+// SAPApplicationServerInstancesClientBeginStartOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStart
// method.
-type SAPApplicationServerInstancesClientBeginStartInstanceOptions struct {
+type SAPApplicationServerInstancesClientBeginStartOptions struct {
+ // Resumes the long-running operation from the provided token.
+ ResumeToken string
+
// SAP Application server instance start request body.
Body *StartRequest
-
- // Resumes the LRO from the provided token.
- ResumeToken string
}
-// SAPApplicationServerInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStopInstance
+// SAPApplicationServerInstancesClientBeginStopOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStop
// method.
-type SAPApplicationServerInstancesClientBeginStopInstanceOptions struct {
+type SAPApplicationServerInstancesClientBeginStopOptions struct {
+ // Resumes the long-running operation from the provided token.
+ ResumeToken string
+
// SAP Application server instance stop request body.
Body *StopRequest
-
- // Resumes the LRO from the provided token.
- ResumeToken string
}
// SAPApplicationServerInstancesClientGetOptions contains the optional parameters for the SAPApplicationServerInstancesClient.Get
@@ -65,87 +61,90 @@ type SAPApplicationServerInstancesClientUpdateOptions struct {
// placeholder for future optional parameters
}
-// SAPCentralInstancesClientBeginCreateOptions contains the optional parameters for the SAPCentralInstancesClient.BeginCreate
+// SAPCentralServerInstancesClientBeginCreateOptions contains the optional parameters for the SAPCentralServerInstancesClient.BeginCreate
// method.
-type SAPCentralInstancesClientBeginCreateOptions struct {
- // Resumes the LRO from the provided token.
+type SAPCentralServerInstancesClientBeginCreateOptions struct {
+ // Resumes the long-running operation from the provided token.
ResumeToken string
}
-// SAPCentralInstancesClientBeginDeleteOptions contains the optional parameters for the SAPCentralInstancesClient.BeginDelete
+// SAPCentralServerInstancesClientBeginDeleteOptions contains the optional parameters for the SAPCentralServerInstancesClient.BeginDelete
// method.
-type SAPCentralInstancesClientBeginDeleteOptions struct {
- // Resumes the LRO from the provided token.
+type SAPCentralServerInstancesClientBeginDeleteOptions struct {
+ // Resumes the long-running operation from the provided token.
ResumeToken string
}
-// SAPCentralInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPCentralInstancesClient.BeginStartInstance
+// SAPCentralServerInstancesClientBeginStartOptions contains the optional parameters for the SAPCentralServerInstancesClient.BeginStart
// method.
-type SAPCentralInstancesClientBeginStartInstanceOptions struct {
+type SAPCentralServerInstancesClientBeginStartOptions struct {
+ // Resumes the long-running operation from the provided token.
+ ResumeToken string
+
// SAP Central Services instance start request body.
Body *StartRequest
-
- // Resumes the LRO from the provided token.
- ResumeToken string
}
-// SAPCentralInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPCentralInstancesClient.BeginStopInstance
+// SAPCentralServerInstancesClientBeginStopOptions contains the optional parameters for the SAPCentralServerInstancesClient.BeginStop
// method.
-type SAPCentralInstancesClientBeginStopInstanceOptions struct {
+type SAPCentralServerInstancesClientBeginStopOptions struct {
+ // Resumes the long-running operation from the provided token.
+ ResumeToken string
+
// SAP Central Services instance stop request body.
Body *StopRequest
-
- // Resumes the LRO from the provided token.
- ResumeToken string
}
-// SAPCentralInstancesClientGetOptions contains the optional parameters for the SAPCentralInstancesClient.Get method.
-type SAPCentralInstancesClientGetOptions struct {
+// SAPCentralServerInstancesClientGetOptions contains the optional parameters for the SAPCentralServerInstancesClient.Get
+// method.
+type SAPCentralServerInstancesClientGetOptions struct {
// placeholder for future optional parameters
}
-// SAPCentralInstancesClientListOptions contains the optional parameters for the SAPCentralInstancesClient.NewListPager method.
-type SAPCentralInstancesClientListOptions struct {
+// SAPCentralServerInstancesClientListOptions contains the optional parameters for the SAPCentralServerInstancesClient.NewListPager
+// method.
+type SAPCentralServerInstancesClientListOptions struct {
// placeholder for future optional parameters
}
-// SAPCentralInstancesClientUpdateOptions contains the optional parameters for the SAPCentralInstancesClient.Update method.
-type SAPCentralInstancesClientUpdateOptions struct {
+// SAPCentralServerInstancesClientUpdateOptions contains the optional parameters for the SAPCentralServerInstancesClient.Update
+// method.
+type SAPCentralServerInstancesClientUpdateOptions struct {
// placeholder for future optional parameters
}
// SAPDatabaseInstancesClientBeginCreateOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginCreate
// method.
type SAPDatabaseInstancesClientBeginCreateOptions struct {
- // Resumes the LRO from the provided token.
+ // Resumes the long-running operation from the provided token.
ResumeToken string
}
// SAPDatabaseInstancesClientBeginDeleteOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginDelete
// method.
type SAPDatabaseInstancesClientBeginDeleteOptions struct {
- // Resumes the LRO from the provided token.
+ // Resumes the long-running operation from the provided token.
ResumeToken string
}
-// SAPDatabaseInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStartInstance
+// SAPDatabaseInstancesClientBeginStartOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStart
// method.
-type SAPDatabaseInstancesClientBeginStartInstanceOptions struct {
+type SAPDatabaseInstancesClientBeginStartOptions struct {
+ // Resumes the long-running operation from the provided token.
+ ResumeToken string
+
// SAP Database server instance start request body.
Body *StartRequest
-
- // Resumes the LRO from the provided token.
- ResumeToken string
}
-// SAPDatabaseInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStopInstance
+// SAPDatabaseInstancesClientBeginStopOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStop
// method.
-type SAPDatabaseInstancesClientBeginStopInstanceOptions struct {
+type SAPDatabaseInstancesClientBeginStopOptions struct {
+ // Resumes the long-running operation from the provided token.
+ ResumeToken string
+
// Stop request for the database instance of the SAP system.
Body *StopRequest
-
- // Resumes the LRO from the provided token.
- ResumeToken string
}
// SAPDatabaseInstancesClientGetOptions contains the optional parameters for the SAPDatabaseInstancesClient.Get method.
@@ -167,84 +166,81 @@ type SAPDatabaseInstancesClientUpdateOptions struct {
// SAPVirtualInstancesClientBeginCreateOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginCreate
// method.
type SAPVirtualInstancesClientBeginCreateOptions struct {
- // Resumes the LRO from the provided token.
+ // Resumes the long-running operation from the provided token.
ResumeToken string
}
// SAPVirtualInstancesClientBeginDeleteOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginDelete
// method.
type SAPVirtualInstancesClientBeginDeleteOptions struct {
- // Resumes the LRO from the provided token.
+ // Resumes the long-running operation from the provided token.
ResumeToken string
}
// SAPVirtualInstancesClientBeginStartOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginStart
// method.
type SAPVirtualInstancesClientBeginStartOptions struct {
+ // Resumes the long-running operation from the provided token.
+ ResumeToken string
+
// The Virtual Instance for SAP solutions resource start request body.
Body *StartRequest
-
- // Resumes the LRO from the provided token.
- ResumeToken string
}
// SAPVirtualInstancesClientBeginStopOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginStop
// method.
type SAPVirtualInstancesClientBeginStopOptions struct {
+ // Resumes the long-running operation from the provided token.
+ ResumeToken string
+
// The Virtual Instance for SAP solutions resource stop request body.
Body *StopRequest
-
- // Resumes the LRO from the provided token.
- ResumeToken string
}
// SAPVirtualInstancesClientBeginUpdateOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginUpdate
// method.
type SAPVirtualInstancesClientBeginUpdateOptions struct {
- // Resumes the LRO from the provided token.
+ // Resumes the long-running operation from the provided token.
ResumeToken string
}
-// SAPVirtualInstancesClientGetOptions contains the optional parameters for the SAPVirtualInstancesClient.Get method.
-type SAPVirtualInstancesClientGetOptions struct {
+// SAPVirtualInstancesClientGetAvailabilityZoneDetailsOptions contains the optional parameters for the SAPVirtualInstancesClient.GetAvailabilityZoneDetails
+// method.
+type SAPVirtualInstancesClientGetAvailabilityZoneDetailsOptions struct {
// placeholder for future optional parameters
}
-// SAPVirtualInstancesClientListByResourceGroupOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListByResourceGroupPager
+// SAPVirtualInstancesClientGetDiskConfigurationsOptions contains the optional parameters for the SAPVirtualInstancesClient.GetDiskConfigurations
// method.
-type SAPVirtualInstancesClientListByResourceGroupOptions struct {
+type SAPVirtualInstancesClientGetDiskConfigurationsOptions struct {
// placeholder for future optional parameters
}
-// SAPVirtualInstancesClientListBySubscriptionOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListBySubscriptionPager
-// method.
-type SAPVirtualInstancesClientListBySubscriptionOptions struct {
+// SAPVirtualInstancesClientGetOptions contains the optional parameters for the SAPVirtualInstancesClient.Get method.
+type SAPVirtualInstancesClientGetOptions struct {
// placeholder for future optional parameters
}
-// WorkloadsClientSAPAvailabilityZoneDetailsOptions contains the optional parameters for the WorkloadsClient.SAPAvailabilityZoneDetails
+// SAPVirtualInstancesClientGetSapSupportedSKUOptions contains the optional parameters for the SAPVirtualInstancesClient.GetSapSupportedSKU
// method.
-type WorkloadsClientSAPAvailabilityZoneDetailsOptions struct {
- // SAP Availability Zone Details Request body
- SAPAvailabilityZoneDetails *SAPAvailabilityZoneDetailsRequest
+type SAPVirtualInstancesClientGetSapSupportedSKUOptions struct {
+ // placeholder for future optional parameters
}
-// WorkloadsClientSAPDiskConfigurationsOptions contains the optional parameters for the WorkloadsClient.SAPDiskConfigurations
+// SAPVirtualInstancesClientGetSizingRecommendationsOptions contains the optional parameters for the SAPVirtualInstancesClient.GetSizingRecommendations
// method.
-type WorkloadsClientSAPDiskConfigurationsOptions struct {
- // SAP Disk Configurations Request body
- SAPDiskConfigurations *SAPDiskConfigurationsRequest
+type SAPVirtualInstancesClientGetSizingRecommendationsOptions struct {
+ // placeholder for future optional parameters
}
-// WorkloadsClientSAPSizingRecommendationsOptions contains the optional parameters for the WorkloadsClient.SAPSizingRecommendations
+// SAPVirtualInstancesClientListByResourceGroupOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListByResourceGroupPager
// method.
-type WorkloadsClientSAPSizingRecommendationsOptions struct {
- // SAP Sizing Recommendation Request body
- SAPSizingRecommendation *SAPSizingRecommendationRequest
+type SAPVirtualInstancesClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
}
-// WorkloadsClientSAPSupportedSKUOptions contains the optional parameters for the WorkloadsClient.SAPSupportedSKU method.
-type WorkloadsClientSAPSupportedSKUOptions struct {
- // SAP Supported SKU Request body
- SAPSupportedSKU *SAPSupportedSKUsRequest
+// SAPVirtualInstancesClientListBySubscriptionOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListBySubscriptionPager
+// method.
+type SAPVirtualInstancesClientListBySubscriptionOptions struct {
+ // placeholder for future optional parameters
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/polymorphic_helpers.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/polymorphic_helpers.go
index 0d6862f0c70c..ccad72c54fb3 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/polymorphic_helpers.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/polymorphic_helpers.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -20,12 +16,12 @@ func unmarshalFileShareConfigurationClassification(rawMsg json.RawMessage) (File
}
var b FileShareConfigurationClassification
switch m["configurationType"] {
- case string(ConfigurationTypeCreateAndMount):
+ case string(FileShareConfigurationTypeSkip):
+ b = &SkipFileShareConfiguration{}
+ case string(FileShareConfigurationTypeCreateAndMount):
b = &CreateAndMountFileShareConfiguration{}
- case string(ConfigurationTypeMount):
+ case string(FileShareConfigurationTypeMount):
b = &MountFileShareConfiguration{}
- case string(ConfigurationTypeSkip):
- b = &SkipFileShareConfiguration{}
default:
b = &FileShareConfiguration{}
}
@@ -68,10 +64,10 @@ func unmarshalOSConfigurationClassification(rawMsg json.RawMessage) (OSConfigura
}
var b OSConfigurationClassification
switch m["osType"] {
- case string(OSTypeLinux):
- b = &LinuxConfiguration{}
case string(OSTypeWindows):
b = &WindowsConfiguration{}
+ case string(OSTypeLinux):
+ b = &LinuxConfiguration{}
default:
b = &OSConfiguration{}
}
@@ -91,12 +87,12 @@ func unmarshalSAPConfigurationClassification(rawMsg json.RawMessage) (SAPConfigu
}
var b SAPConfigurationClassification
switch m["configurationType"] {
+ case string(SAPConfigurationTypeDiscovery):
+ b = &DiscoveryConfiguration{}
case string(SAPConfigurationTypeDeployment):
b = &DeploymentConfiguration{}
case string(SAPConfigurationTypeDeploymentWithOSConfig):
b = &DeploymentWithOSConfiguration{}
- case string(SAPConfigurationTypeDiscovery):
- b = &DiscoveryConfiguration{}
default:
b = &SAPConfiguration{}
}
@@ -160,12 +156,12 @@ func unmarshalSoftwareConfigurationClassification(rawMsg json.RawMessage) (Softw
}
var b SoftwareConfigurationClassification
switch m["softwareInstallationType"] {
- case string(SAPSoftwareInstallationTypeExternal):
- b = &ExternalInstallationSoftwareConfiguration{}
- case string(SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig):
- b = &SAPInstallWithoutOSConfigSoftwareConfiguration{}
case string(SAPSoftwareInstallationTypeServiceInitiated):
b = &ServiceInitiatedSoftwareConfiguration{}
+ case string(SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig):
+ b = &SAPInstallWithoutOSConfigSoftwareConfiguration{}
+ case string(SAPSoftwareInstallationTypeExternal):
+ b = &ExternalInstallationSoftwareConfiguration{}
default:
b = &SoftwareConfiguration{}
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/responses.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/responses.go
index 46127783a0b7..5c7e0824ceb5 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/responses.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/responses.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -33,18 +29,18 @@ type SAPApplicationServerInstancesClientGetResponse struct {
// SAPApplicationServerInstancesClientListResponse contains the response from method SAPApplicationServerInstancesClient.NewListPager.
type SAPApplicationServerInstancesClientListResponse struct {
- // Defines the collection of SAP Application Server Instance resources.
- SAPApplicationServerInstanceList
+ // The response of a SAPApplicationServerInstance list operation.
+ SAPApplicationServerInstanceListResult
}
-// SAPApplicationServerInstancesClientStartInstanceResponse contains the response from method SAPApplicationServerInstancesClient.BeginStartInstance.
-type SAPApplicationServerInstancesClientStartInstanceResponse struct {
+// SAPApplicationServerInstancesClientStartResponse contains the response from method SAPApplicationServerInstancesClient.BeginStart.
+type SAPApplicationServerInstancesClientStartResponse struct {
// The current status of an async operation.
OperationStatusResult
}
-// SAPApplicationServerInstancesClientStopInstanceResponse contains the response from method SAPApplicationServerInstancesClient.BeginStopInstance.
-type SAPApplicationServerInstancesClientStopInstanceResponse struct {
+// SAPApplicationServerInstancesClientStopResponse contains the response from method SAPApplicationServerInstancesClient.BeginStop.
+type SAPApplicationServerInstancesClientStopResponse struct {
// The current status of an async operation.
OperationStatusResult
}
@@ -55,43 +51,43 @@ type SAPApplicationServerInstancesClientUpdateResponse struct {
SAPApplicationServerInstance
}
-// SAPCentralInstancesClientCreateResponse contains the response from method SAPCentralInstancesClient.BeginCreate.
-type SAPCentralInstancesClientCreateResponse struct {
+// SAPCentralServerInstancesClientCreateResponse contains the response from method SAPCentralServerInstancesClient.BeginCreate.
+type SAPCentralServerInstancesClientCreateResponse struct {
// Define the SAP Central Services Instance resource.
SAPCentralServerInstance
}
-// SAPCentralInstancesClientDeleteResponse contains the response from method SAPCentralInstancesClient.BeginDelete.
-type SAPCentralInstancesClientDeleteResponse struct {
+// SAPCentralServerInstancesClientDeleteResponse contains the response from method SAPCentralServerInstancesClient.BeginDelete.
+type SAPCentralServerInstancesClientDeleteResponse struct {
// placeholder for future response values
}
-// SAPCentralInstancesClientGetResponse contains the response from method SAPCentralInstancesClient.Get.
-type SAPCentralInstancesClientGetResponse struct {
+// SAPCentralServerInstancesClientGetResponse contains the response from method SAPCentralServerInstancesClient.Get.
+type SAPCentralServerInstancesClientGetResponse struct {
// Define the SAP Central Services Instance resource.
SAPCentralServerInstance
}
-// SAPCentralInstancesClientListResponse contains the response from method SAPCentralInstancesClient.NewListPager.
-type SAPCentralInstancesClientListResponse struct {
- // Defines the collection of SAP Central Services Instance resources.
- SAPCentralInstanceList
+// SAPCentralServerInstancesClientListResponse contains the response from method SAPCentralServerInstancesClient.NewListPager.
+type SAPCentralServerInstancesClientListResponse struct {
+ // The response of a SAPCentralServerInstance list operation.
+ SAPCentralServerInstanceListResult
}
-// SAPCentralInstancesClientStartInstanceResponse contains the response from method SAPCentralInstancesClient.BeginStartInstance.
-type SAPCentralInstancesClientStartInstanceResponse struct {
+// SAPCentralServerInstancesClientStartResponse contains the response from method SAPCentralServerInstancesClient.BeginStart.
+type SAPCentralServerInstancesClientStartResponse struct {
// The current status of an async operation.
OperationStatusResult
}
-// SAPCentralInstancesClientStopInstanceResponse contains the response from method SAPCentralInstancesClient.BeginStopInstance.
-type SAPCentralInstancesClientStopInstanceResponse struct {
+// SAPCentralServerInstancesClientStopResponse contains the response from method SAPCentralServerInstancesClient.BeginStop.
+type SAPCentralServerInstancesClientStopResponse struct {
// The current status of an async operation.
OperationStatusResult
}
-// SAPCentralInstancesClientUpdateResponse contains the response from method SAPCentralInstancesClient.Update.
-type SAPCentralInstancesClientUpdateResponse struct {
+// SAPCentralServerInstancesClientUpdateResponse contains the response from method SAPCentralServerInstancesClient.Update.
+type SAPCentralServerInstancesClientUpdateResponse struct {
// Define the SAP Central Services Instance resource.
SAPCentralServerInstance
}
@@ -115,18 +111,18 @@ type SAPDatabaseInstancesClientGetResponse struct {
// SAPDatabaseInstancesClientListResponse contains the response from method SAPDatabaseInstancesClient.NewListPager.
type SAPDatabaseInstancesClientListResponse struct {
- // Defines the collection of SAP Database Instances.
- SAPDatabaseInstanceList
+ // The response of a SAPDatabaseInstance list operation.
+ SAPDatabaseInstanceListResult
}
-// SAPDatabaseInstancesClientStartInstanceResponse contains the response from method SAPDatabaseInstancesClient.BeginStartInstance.
-type SAPDatabaseInstancesClientStartInstanceResponse struct {
+// SAPDatabaseInstancesClientStartResponse contains the response from method SAPDatabaseInstancesClient.BeginStart.
+type SAPDatabaseInstancesClientStartResponse struct {
// The current status of an async operation.
OperationStatusResult
}
-// SAPDatabaseInstancesClientStopInstanceResponse contains the response from method SAPDatabaseInstancesClient.BeginStopInstance.
-type SAPDatabaseInstancesClientStopInstanceResponse struct {
+// SAPDatabaseInstancesClientStopResponse contains the response from method SAPDatabaseInstancesClient.BeginStop.
+type SAPDatabaseInstancesClientStopResponse struct {
// The current status of an async operation.
OperationStatusResult
}
@@ -148,22 +144,46 @@ type SAPVirtualInstancesClientDeleteResponse struct {
// placeholder for future response values
}
+// SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse contains the response from method SAPVirtualInstancesClient.GetAvailabilityZoneDetails.
+type SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse struct {
+ // The list of supported availability zone pairs which are part of SAP HA deployment.
+ SAPAvailabilityZoneDetailsResult
+}
+
+// SAPVirtualInstancesClientGetDiskConfigurationsResponse contains the response from method SAPVirtualInstancesClient.GetDiskConfigurations.
+type SAPVirtualInstancesClientGetDiskConfigurationsResponse struct {
+ // The list of disk configuration for vmSku which are part of SAP deployment.
+ SAPDiskConfigurationsResult
+}
+
// SAPVirtualInstancesClientGetResponse contains the response from method SAPVirtualInstancesClient.Get.
type SAPVirtualInstancesClientGetResponse struct {
// Define the Virtual Instance for SAP solutions resource.
SAPVirtualInstance
}
+// SAPVirtualInstancesClientGetSapSupportedSKUResponse contains the response from method SAPVirtualInstancesClient.GetSapSupportedSKU.
+type SAPVirtualInstancesClientGetSapSupportedSKUResponse struct {
+ // The list of supported SKUs for different resources which are part of SAP deployment.
+ SAPSupportedResourceSKUsResult
+}
+
+// SAPVirtualInstancesClientGetSizingRecommendationsResponse contains the response from method SAPVirtualInstancesClient.GetSizingRecommendations.
+type SAPVirtualInstancesClientGetSizingRecommendationsResponse struct {
+ // The SAP sizing recommendation result.
+ SAPSizingRecommendationResultClassification
+}
+
// SAPVirtualInstancesClientListByResourceGroupResponse contains the response from method SAPVirtualInstancesClient.NewListByResourceGroupPager.
type SAPVirtualInstancesClientListByResourceGroupResponse struct {
- // Defines the collection of Virtual Instance for SAP solutions resources.
- SAPVirtualInstanceList
+ // The response of a SAPVirtualInstance list operation.
+ SAPVirtualInstanceListResult
}
// SAPVirtualInstancesClientListBySubscriptionResponse contains the response from method SAPVirtualInstancesClient.NewListBySubscriptionPager.
type SAPVirtualInstancesClientListBySubscriptionResponse struct {
- // Defines the collection of Virtual Instance for SAP solutions resources.
- SAPVirtualInstanceList
+ // The response of a SAPVirtualInstance list operation.
+ SAPVirtualInstanceListResult
}
// SAPVirtualInstancesClientStartResponse contains the response from method SAPVirtualInstancesClient.BeginStart.
@@ -183,37 +203,3 @@ type SAPVirtualInstancesClientUpdateResponse struct {
// Define the Virtual Instance for SAP solutions resource.
SAPVirtualInstance
}
-
-// WorkloadsClientSAPAvailabilityZoneDetailsResponse contains the response from method WorkloadsClient.SAPAvailabilityZoneDetails.
-type WorkloadsClientSAPAvailabilityZoneDetailsResponse struct {
- // The list of supported availability zone pairs which are part of SAP HA deployment.
- SAPAvailabilityZoneDetailsResult
-}
-
-// WorkloadsClientSAPDiskConfigurationsResponse contains the response from method WorkloadsClient.SAPDiskConfigurations.
-type WorkloadsClientSAPDiskConfigurationsResponse struct {
- // The list of disk configuration for vmSku which are part of SAP deployment.
- SAPDiskConfigurationsResult
-}
-
-// WorkloadsClientSAPSizingRecommendationsResponse contains the response from method WorkloadsClient.SAPSizingRecommendations.
-type WorkloadsClientSAPSizingRecommendationsResponse struct {
- // The SAP sizing recommendation result.
- SAPSizingRecommendationResultClassification
-}
-
-// UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadsClientSAPSizingRecommendationsResponse.
-func (w *WorkloadsClientSAPSizingRecommendationsResponse) UnmarshalJSON(data []byte) error {
- res, err := unmarshalSAPSizingRecommendationResultClassification(data)
- if err != nil {
- return err
- }
- w.SAPSizingRecommendationResultClassification = res
- return nil
-}
-
-// WorkloadsClientSAPSupportedSKUResponse contains the response from method WorkloadsClient.SAPSupportedSKU.
-type WorkloadsClientSAPSupportedSKUResponse struct {
- // The list of supported SKUs for different resources which are part of SAP deployment.
- SAPSupportedResourceSKUsResult
-}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/responses_serde.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/responses_serde.go
new file mode 100644
index 000000000000..ff87f92c7633
--- /dev/null
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/responses_serde.go
@@ -0,0 +1,15 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
+
+package armworkloadssapvirtualinstance
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SAPVirtualInstancesClientGetSizingRecommendationsResponse.
+func (s *SAPVirtualInstancesClientGetSizingRecommendationsResponse) UnmarshalJSON(data []byte) error {
+ res, err := unmarshalSAPSizingRecommendationResultClassification(data)
+ if err != nil {
+ return err
+ }
+ s.SAPSizingRecommendationResultClassification = res
+ return nil
+}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapapplicationserverinstances_client.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapapplicationserverinstances_client.go
index 9a8e05592e28..5e0986185f46 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapapplicationserverinstances_client.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapapplicationserverinstances_client.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -28,7 +24,7 @@ type SAPApplicationServerInstancesClient struct {
}
// NewSAPApplicationServerInstancesClient creates a new instance of SAPApplicationServerInstancesClient with the specified values.
-// - subscriptionID - The ID of the target subscription.
+// - subscriptionID - The ID of the target subscription. The value must be an UUID.
// - credential - used to authorize requests. Usually a credential from azidentity.
// - options - pass nil to accept the default values.
func NewSAPApplicationServerInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SAPApplicationServerInstancesClient, error) {
@@ -43,26 +39,25 @@ func NewSAPApplicationServerInstancesClient(subscriptionID string, credential az
return client, nil
}
-// 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.
+// BeginCreate - Puts the SAP Application Server Instance resource. <br><br>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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - applicationInstanceName - The name of SAP Application Server instance resource.
-// - body - The SAP Application Server Instance resource request body.
+// - resource - The SAP Application Server Instance resource request body.
// - options - SAPApplicationServerInstancesClientBeginCreateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginCreate
// method.
-func (client *SAPApplicationServerInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body SAPApplicationServerInstance, options *SAPApplicationServerInstancesClientBeginCreateOptions) (*runtime.Poller[SAPApplicationServerInstancesClientCreateResponse], error) {
+func (client *SAPApplicationServerInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, resource SAPApplicationServerInstance, options *SAPApplicationServerInstancesClientBeginCreateOptions) (*runtime.Poller[SAPApplicationServerInstancesClientCreateResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.create(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, options)
+ resp, err := client.create(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, resource, options)
if err != nil {
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPApplicationServerInstancesClientCreateResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
@@ -72,18 +67,18 @@ func (client *SAPApplicationServerInstancesClient) BeginCreate(ctx context.Conte
}
}
-// Create - Puts the SAP Application Server Instance resource.
-// This will be used by service only. PUT by end user will return a Bad Request error.
+// Create - Puts the SAP Application Server Instance resource. <br><br>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
-func (client *SAPApplicationServerInstancesClient) create(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body SAPApplicationServerInstance, options *SAPApplicationServerInstancesClientBeginCreateOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPApplicationServerInstancesClient) create(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, resource SAPApplicationServerInstance, options *SAPApplicationServerInstancesClientBeginCreateOptions) (*http.Response, error) {
var err error
const operationName = "SAPApplicationServerInstancesClient.BeginCreate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.createCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, options)
+ req, err := client.createCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, resource, options)
if err != nil {
return nil, err
}
@@ -99,7 +94,7 @@ func (client *SAPApplicationServerInstancesClient) create(ctx context.Context, r
}
// createCreateRequest creates the Create request.
-func (client *SAPApplicationServerInstancesClient) createCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body SAPApplicationServerInstance, options *SAPApplicationServerInstancesClientBeginCreateOptions) (*policy.Request, error) {
+func (client *SAPApplicationServerInstancesClient) createCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, resource SAPApplicationServerInstance, _ *SAPApplicationServerInstancesClientBeginCreateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -122,20 +117,21 @@ func (client *SAPApplicationServerInstancesClient) createCreateRequest(ctx conte
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
- if err := runtime.MarshalAsJSON(req, body); err != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, resource); err != nil {
return nil, err
}
return req, nil
}
-// 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.
+// BeginDelete - Deletes the SAP Application Server Instance resource. <br><br>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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - applicationInstanceName - The name of SAP Application Server instance resource.
@@ -148,8 +144,7 @@ func (client *SAPApplicationServerInstancesClient) BeginDelete(ctx context.Conte
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPApplicationServerInstancesClientDeleteResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
@@ -159,11 +154,11 @@ func (client *SAPApplicationServerInstancesClient) BeginDelete(ctx context.Conte
}
}
-// Delete - 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.
+// Delete - Deletes the SAP Application Server Instance resource. <br><br>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
+// Generated from API version 2024-09-01
func (client *SAPApplicationServerInstancesClient) deleteOperation(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "SAPApplicationServerInstancesClient.BeginDelete"
@@ -186,7 +181,7 @@ func (client *SAPApplicationServerInstancesClient) deleteOperation(ctx context.C
}
// deleteCreateRequest creates the Delete request.
-func (client *SAPApplicationServerInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginDeleteOptions) (*policy.Request, error) {
+func (client *SAPApplicationServerInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, _ *SAPApplicationServerInstancesClientBeginDeleteOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -209,7 +204,7 @@ func (client *SAPApplicationServerInstancesClient) deleteCreateRequest(ctx conte
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -218,7 +213,7 @@ func (client *SAPApplicationServerInstancesClient) deleteCreateRequest(ctx conte
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - applicationInstanceName - The name of SAP Application Server instance resource.
@@ -247,7 +242,7 @@ func (client *SAPApplicationServerInstancesClient) Get(ctx context.Context, reso
}
// getCreateRequest creates the Get request.
-func (client *SAPApplicationServerInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientGetOptions) (*policy.Request, error) {
+func (client *SAPApplicationServerInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, _ *SAPApplicationServerInstancesClientGetOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -270,7 +265,7 @@ func (client *SAPApplicationServerInstancesClient) getCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -287,7 +282,7 @@ func (client *SAPApplicationServerInstancesClient) getHandleResponse(resp *http.
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - options - SAPApplicationServerInstancesClientListOptions contains the optional parameters for the SAPApplicationServerInstancesClient.NewListPager
@@ -316,7 +311,7 @@ func (client *SAPApplicationServerInstancesClient) NewListPager(resourceGroupNam
}
// listCreateRequest creates the List request.
-func (client *SAPApplicationServerInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPApplicationServerInstancesClientListOptions) (*policy.Request, error) {
+func (client *SAPApplicationServerInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, _ *SAPApplicationServerInstancesClientListOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -335,7 +330,7 @@ func (client *SAPApplicationServerInstancesClient) listCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -344,50 +339,49 @@ func (client *SAPApplicationServerInstancesClient) listCreateRequest(ctx context
// listHandleResponse handles the List response.
func (client *SAPApplicationServerInstancesClient) listHandleResponse(resp *http.Response) (SAPApplicationServerInstancesClientListResponse, error) {
result := SAPApplicationServerInstancesClientListResponse{}
- if err := runtime.UnmarshalAsJSON(resp, &result.SAPApplicationServerInstanceList); err != nil {
+ if err := runtime.UnmarshalAsJSON(resp, &result.SAPApplicationServerInstanceListResult); err != nil {
return SAPApplicationServerInstancesClientListResponse{}, err
}
return result, nil
}
-// BeginStartInstance - Starts the SAP Application Server Instance.
+// BeginStart - Starts the SAP Application Server Instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - applicationInstanceName - The name of SAP Application Server instance resource.
-// - options - SAPApplicationServerInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStartInstance
+// - options - SAPApplicationServerInstancesClientBeginStartOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStart
// method.
-func (client *SAPApplicationServerInstancesClient) BeginStartInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStartInstanceOptions) (*runtime.Poller[SAPApplicationServerInstancesClientStartInstanceResponse], error) {
+func (client *SAPApplicationServerInstancesClient) BeginStart(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStartOptions) (*runtime.Poller[SAPApplicationServerInstancesClientStartResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.startInstance(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, options)
+ resp, err := client.start(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, options)
if err != nil {
return nil, err
}
- poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPApplicationServerInstancesClientStartInstanceResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPApplicationServerInstancesClientStartResponse]{
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
- return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPApplicationServerInstancesClientStartInstanceResponse]{
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPApplicationServerInstancesClientStartResponse]{
Tracer: client.internal.Tracer(),
})
}
}
-// StartInstance - Starts the SAP Application Server Instance.
+// Start - Starts the SAP Application Server Instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
-func (client *SAPApplicationServerInstancesClient) startInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStartInstanceOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPApplicationServerInstancesClient) start(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStartOptions) (*http.Response, error) {
var err error
- const operationName = "SAPApplicationServerInstancesClient.BeginStartInstance"
+ const operationName = "SAPApplicationServerInstancesClient.BeginStart"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.startInstanceCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, options)
+ req, err := client.startCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, options)
if err != nil {
return nil, err
}
@@ -402,8 +396,8 @@ func (client *SAPApplicationServerInstancesClient) startInstance(ctx context.Con
return httpResp, nil
}
-// startInstanceCreateRequest creates the StartInstance request.
-func (client *SAPApplicationServerInstancesClient) startInstanceCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStartInstanceOptions) (*policy.Request, error) {
+// startCreateRequest creates the Start request.
+func (client *SAPApplicationServerInstancesClient) startCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStartOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -426,10 +420,11 @@ func (client *SAPApplicationServerInstancesClient) startInstanceCreateRequest(ct
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Body != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, *options.Body); err != nil {
return nil, err
}
@@ -438,44 +433,43 @@ func (client *SAPApplicationServerInstancesClient) startInstanceCreateRequest(ct
return req, nil
}
-// BeginStopInstance - Stops the SAP Application Server Instance.
+// BeginStop - Stops the SAP Application Server Instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - applicationInstanceName - The name of SAP Application Server instance resource.
-// - options - SAPApplicationServerInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStopInstance
+// - options - SAPApplicationServerInstancesClientBeginStopOptions contains the optional parameters for the SAPApplicationServerInstancesClient.BeginStop
// method.
-func (client *SAPApplicationServerInstancesClient) BeginStopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStopInstanceOptions) (*runtime.Poller[SAPApplicationServerInstancesClientStopInstanceResponse], error) {
+func (client *SAPApplicationServerInstancesClient) BeginStop(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStopOptions) (*runtime.Poller[SAPApplicationServerInstancesClientStopResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.stopInstance(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, options)
+ resp, err := client.stop(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, options)
if err != nil {
return nil, err
}
- poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPApplicationServerInstancesClientStopInstanceResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPApplicationServerInstancesClientStopResponse]{
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
- return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPApplicationServerInstancesClientStopInstanceResponse]{
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPApplicationServerInstancesClientStopResponse]{
Tracer: client.internal.Tracer(),
})
}
}
-// StopInstance - Stops the SAP Application Server Instance.
+// Stop - Stops the SAP Application Server Instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
-func (client *SAPApplicationServerInstancesClient) stopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStopInstanceOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPApplicationServerInstancesClient) stop(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStopOptions) (*http.Response, error) {
var err error
- const operationName = "SAPApplicationServerInstancesClient.BeginStopInstance"
+ const operationName = "SAPApplicationServerInstancesClient.BeginStop"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.stopInstanceCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, options)
+ req, err := client.stopCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, options)
if err != nil {
return nil, err
}
@@ -490,8 +484,8 @@ func (client *SAPApplicationServerInstancesClient) stopInstance(ctx context.Cont
return httpResp, nil
}
-// stopInstanceCreateRequest creates the StopInstance request.
-func (client *SAPApplicationServerInstancesClient) stopInstanceCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStopInstanceOptions) (*policy.Request, error) {
+// stopCreateRequest creates the Stop request.
+func (client *SAPApplicationServerInstancesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, options *SAPApplicationServerInstancesClientBeginStopOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -514,10 +508,11 @@ func (client *SAPApplicationServerInstancesClient) stopInstanceCreateRequest(ctx
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Body != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, *options.Body); err != nil {
return nil, err
}
@@ -526,23 +521,23 @@ func (client *SAPApplicationServerInstancesClient) stopInstanceCreateRequest(ctx
return req, nil
}
-// Update - Updates the SAP Application server instance resource. This can be used to update tags on the resource.
+// Update - Puts the SAP Application Server Instance resource.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - applicationInstanceName - The name of SAP Application Server instance resource.
-// - body - The SAP Application Server Instance resource request body.
+// - properties - The SAP Application Server Instance resource request body.
// - options - SAPApplicationServerInstancesClientUpdateOptions contains the optional parameters for the SAPApplicationServerInstancesClient.Update
// method.
-func (client *SAPApplicationServerInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body UpdateSAPApplicationInstanceRequest, options *SAPApplicationServerInstancesClientUpdateOptions) (SAPApplicationServerInstancesClientUpdateResponse, error) {
+func (client *SAPApplicationServerInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, properties UpdateSAPApplicationInstanceRequest, options *SAPApplicationServerInstancesClientUpdateOptions) (SAPApplicationServerInstancesClientUpdateResponse, error) {
var err error
const operationName = "SAPApplicationServerInstancesClient.Update"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.updateCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body, options)
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, properties, options)
if err != nil {
return SAPApplicationServerInstancesClientUpdateResponse{}, err
}
@@ -559,7 +554,7 @@ func (client *SAPApplicationServerInstancesClient) Update(ctx context.Context, r
}
// updateCreateRequest creates the Update request.
-func (client *SAPApplicationServerInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, body UpdateSAPApplicationInstanceRequest, options *SAPApplicationServerInstancesClientUpdateOptions) (*policy.Request, error) {
+func (client *SAPApplicationServerInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, applicationInstanceName string, properties UpdateSAPApplicationInstanceRequest, _ *SAPApplicationServerInstancesClientUpdateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -582,10 +577,11 @@ func (client *SAPApplicationServerInstancesClient) updateCreateRequest(ctx conte
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
- if err := runtime.MarshalAsJSON(req, body); err != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, properties); err != nil {
return nil, err
}
return req, nil
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapapplicationserverinstances_client_example_test.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapapplicationserverinstances_client_example_test.go
index f126fa2c64f1..994f42f6ce84 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapapplicationserverinstances_client_example_test.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapapplicationserverinstances_client_example_test.go
@@ -1,94 +1,99 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-// DO NOT EDIT.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance_test
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"
+ "log"
)
-// 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
-func ExampleSAPApplicationServerInstancesClient_Get() {
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_Create.json
+func ExampleSAPApplicationServerInstancesClient_BeginCreate_sapApplicationServerInstancesCreate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
- res, err := clientFactory.NewSAPApplicationServerInstancesClient().Get(ctx, "test-rg", "X00", "app01", nil)
+ poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginCreate(ctx, "test-rg", "X00", "app01", armworkloadssapvirtualinstance.SAPApplicationServerInstance{
+ Location: to.Ptr("westcentralus"),
+ Properties: &armworkloadssapvirtualinstance.SAPApplicationServerProperties{},
+ Tags: map[string]*string{},
+ }, 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("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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
// },
// }
}
-// 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
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_CreateForHaWithAvailabilitySet.json
func ExampleSAPApplicationServerInstancesClient_BeginCreate_createSapApplicationServerInstancesForHaSystemWithAvailabilitySet() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPApplicationServerProperties{},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -100,319 +105,371 @@ func ExampleSAPApplicationServerInstancesClient_BeginCreate_createSapApplication
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
// },
- // {
- // 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"),
- // }},
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
// },
// }
}
-// 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
-func ExampleSAPApplicationServerInstancesClient_BeginCreate_sapApplicationServerInstancesCreate() {
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_Delete.json
+func ExampleSAPApplicationServerInstancesClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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)
+ poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginDelete(ctx, "test-rg", "X00", "app01", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
- res, err := poller.PollUntilDone(ctx, nil)
+ _, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
+}
+
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json
+func ExampleSAPApplicationServerInstancesClient_Get() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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("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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientGetResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
// },
// }
}
-// 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
-func ExampleSAPApplicationServerInstancesClient_Update() {
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_ListBySapVirtualInstance.json
+func ExampleSAPApplicationServerInstancesClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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)
+ 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 = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientListResponse{
+ // SAPApplicationServerInstanceListResult: armworkloadssapvirtualinstance.SAPApplicationServerInstanceListResult{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // {
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // },
+ // },
+ // }
+ }
+}
+
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstance.json
+func ExampleSAPApplicationServerInstancesClient_BeginStart_startTheSapApplicationServerInstance() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginStart(ctx, "test-rg", "X00", "app01", &SAPApplicationServerInstancesClientBeginStartOptions{
+ body: &armworkloadssapvirtualinstance.StartRequest{}})
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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStartResponse{
+ // 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"),
// },
// }
}
-// 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
-func ExampleSAPApplicationServerInstancesClient_BeginDelete() {
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstanceVM.json
+func ExampleSAPApplicationServerInstancesClient_BeginStart_startVirtualMachineAndTheSapApplicationServerInstanceOnIt() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
- poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginDelete(ctx, "test-rg", "X00", "app01", nil)
+ poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginStart(ctx, "test-rg", "X00", "app01", &SAPApplicationServerInstancesClientBeginStartOptions{
+ body: &armworkloadssapvirtualinstance.StartRequest{
+ StartVM: to.Ptr(true),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
- _, err = poller.PollUntilDone(ctx, nil)
+ 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 = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStartResponse{
+ // 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"),
+ // },
+ // }
}
-// 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
-func ExampleSAPApplicationServerInstancesClient_NewListPager() {
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstance.json
+func ExampleSAPApplicationServerInstancesClient_BeginStop_stopTheSapApplicationServerInstance() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
- // }},
- // },
- // }},
- // }
+ poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginStop(ctx, "test-rg", "X00", "app01", &SAPApplicationServerInstancesClientBeginStopOptions{
+ 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 = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopResponse{
+ // 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"),
+ // },
+ // }
}
-// 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
-func ExampleSAPApplicationServerInstancesClient_BeginStartInstance_startVirtualMachineAndTheSapApplicationServerInstanceOnIt() {
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceInfrastructure.json
+func ExampleSAPApplicationServerInstancesClient_BeginStop_stopTheSapApplicationServerInstanceAndItSInfrastructure() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
- })
+ poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginStop(ctx, "test-rg", "X00", "app01", &SAPApplicationServerInstancesClientBeginStopOptions{
+ body: &armworkloadssapvirtualinstance.StopRequest{
+ DeallocateVM: to.Ptr(true),
+ SoftStopTimeoutSeconds: to.Ptr[int64](0),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
@@ -423,27 +480,32 @@ func ExampleSAPApplicationServerInstancesClient_BeginStartInstance_startVirtualM
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopResponse{
+ // 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"),
+ // },
// }
}
-// 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
-func ExampleSAPApplicationServerInstancesClient_BeginStartInstance_startTheSapApplicationServerInstance() {
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoft.json
+func ExampleSAPApplicationServerInstancesClient_BeginStop_softStopTheSapApplicationServerInstance() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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})
+ poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginStop(ctx, "test-rg", "X00", "app01", &SAPApplicationServerInstancesClientBeginStopOptions{
+ body: &armworkloadssapvirtualinstance.StopRequest{
+ SoftStopTimeoutSeconds: to.Ptr[int64](300),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
@@ -454,30 +516,33 @@ func ExampleSAPApplicationServerInstancesClient_BeginStartInstance_startTheSapAp
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopResponse{
+ // 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"),
+ // },
// }
}
-// 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
-func ExampleSAPApplicationServerInstancesClient_BeginStopInstance_stopTheSapApplicationServerInstance() {
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoftInfrastructure.json
+func ExampleSAPApplicationServerInstancesClient_BeginStop_softStopTheSapApplicationServerInstanceAndItSInfrastructure() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
- })
+ poller, err := clientFactory.NewSAPApplicationServerInstancesClient().BeginStop(ctx, "test-rg", "X00", "app01", &SAPApplicationServerInstancesClientBeginStopOptions{
+ body: &armworkloadssapvirtualinstance.StopRequest{
+ DeallocateVM: to.Ptr(true),
+ SoftStopTimeoutSeconds: to.Ptr[int64](300),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
@@ -488,46 +553,76 @@ func ExampleSAPApplicationServerInstancesClient_BeginStopInstance_stopTheSapAppl
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientStopResponse{
+ // 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"),
+ // },
// }
}
-// 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
-func ExampleSAPApplicationServerInstancesClient_BeginStopInstance_stopTheSapApplicationServerInstanceAndTheVirtualMachine() {
+// Generated from example definition: 2024-09-01/SapApplicationServerInstances_Update.json
+func ExampleSAPApplicationServerInstancesClient_Update() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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),
- },
- })
+ 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)
}
- 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"),
+ // res = armworkloadssapvirtualinstance.SAPApplicationServerInstancesClientUpdateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
// }
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralinstances_client_example_test.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralinstances_client_example_test.go
deleted file mode 100644
index 84bf884df766..000000000000
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralinstances_client_example_test.go
+++ /dev/null
@@ -1,606 +0,0 @@
-//go:build go1.18
-// +build go1.18
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-// DO NOT EDIT.
-
-package armworkloadssapvirtualinstance_test
-
-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"
-)
-
-// 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
-func ExampleSAPCentralInstancesClient_Get() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }},
- // },
- // }
-}
-
-// 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
-func ExampleSAPCentralInstancesClient_BeginCreate_createSapCentralInstancesForHaSystemWithAvailabilitySet() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }},
- // },
- // }
-}
-
-// 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
-func ExampleSAPCentralInstancesClient_BeginCreate_sapCentralInstancesCreate() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }},
- // },
- // }
-}
-
-// 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
-func ExampleSAPCentralInstancesClient_Update() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }},
- // },
- // }
-}
-
-// 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
-func ExampleSAPCentralInstancesClient_BeginDelete() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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)
- }
-}
-
-// 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
-func ExampleSAPCentralInstancesClient_NewListPager() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }},
- // },
- // }},
- // }
- }
-}
-
-// 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
-func ExampleSAPCentralInstancesClient_BeginStartInstance_startTheSapCentralServicesInstance() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }
-}
-
-// 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
-func ExampleSAPCentralInstancesClient_BeginStartInstance_startTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }
-}
-
-// 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
-func ExampleSAPCentralInstancesClient_BeginStopInstance_stopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }
-}
-
-// 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
-func ExampleSAPCentralInstancesClient_BeginStopInstance_stopTheSapCentralServicesInstance() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }
-}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralinstances_client.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralserverinstances_client.go
similarity index 62%
rename from sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralinstances_client.go
rename to sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralserverinstances_client.go
index 5941cfe5dca7..2f3c222e252f 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralinstances_client.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralserverinstances_client.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -20,70 +16,69 @@ import (
"strings"
)
-// SAPCentralInstancesClient contains the methods for the SAPCentralInstances group.
-// Don't use this type directly, use NewSAPCentralInstancesClient() instead.
-type SAPCentralInstancesClient struct {
+// SAPCentralServerInstancesClient contains the methods for the SAPCentralServerInstances group.
+// Don't use this type directly, use NewSAPCentralServerInstancesClient() instead.
+type SAPCentralServerInstancesClient struct {
internal *arm.Client
subscriptionID string
}
-// NewSAPCentralInstancesClient creates a new instance of SAPCentralInstancesClient with the specified values.
-// - subscriptionID - The ID of the target subscription.
+// NewSAPCentralServerInstancesClient creates a new instance of SAPCentralServerInstancesClient with the specified values.
+// - subscriptionID - The ID of the target subscription. The value must be an UUID.
// - credential - used to authorize requests. Usually a credential from azidentity.
// - options - pass nil to accept the default values.
-func NewSAPCentralInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SAPCentralInstancesClient, error) {
+func NewSAPCentralServerInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SAPCentralServerInstancesClient, error) {
cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
if err != nil {
return nil, err
}
- client := &SAPCentralInstancesClient{
+ client := &SAPCentralServerInstancesClient{
subscriptionID: subscriptionID,
internal: cl,
}
return client, nil
}
-// 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.
+// BeginCreate - Creates the SAP Central Services Instance resource. <br><br>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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
-// - body - The SAP Central Services Instance request body.
-// - options - SAPCentralInstancesClientBeginCreateOptions contains the optional parameters for the SAPCentralInstancesClient.BeginCreate
+// - resource - The SAP Central Services Instance request body.
+// - options - SAPCentralServerInstancesClientBeginCreateOptions contains the optional parameters for the SAPCentralServerInstancesClient.BeginCreate
// method.
-func (client *SAPCentralInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body SAPCentralServerInstance, options *SAPCentralInstancesClientBeginCreateOptions) (*runtime.Poller[SAPCentralInstancesClientCreateResponse], error) {
+func (client *SAPCentralServerInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, resource SAPCentralServerInstance, options *SAPCentralServerInstancesClientBeginCreateOptions) (*runtime.Poller[SAPCentralServerInstancesClientCreateResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.create(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, options)
+ resp, err := client.create(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, resource, options)
if err != nil {
return nil, err
}
- poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPCentralInstancesClientCreateResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPCentralServerInstancesClientCreateResponse]{
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
- return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPCentralInstancesClientCreateResponse]{
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPCentralServerInstancesClientCreateResponse]{
Tracer: client.internal.Tracer(),
})
}
}
-// Create - 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.
+// Create - Creates the SAP Central Services Instance resource. <br><br>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
-func (client *SAPCentralInstancesClient) create(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body SAPCentralServerInstance, options *SAPCentralInstancesClientBeginCreateOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPCentralServerInstancesClient) create(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, resource SAPCentralServerInstance, options *SAPCentralServerInstancesClientBeginCreateOptions) (*http.Response, error) {
var err error
- const operationName = "SAPCentralInstancesClient.BeginCreate"
+ const operationName = "SAPCentralServerInstancesClient.BeginCreate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.createCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, options)
+ req, err := client.createCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, resource, options)
if err != nil {
return nil, err
}
@@ -99,7 +94,7 @@ func (client *SAPCentralInstancesClient) create(ctx context.Context, resourceGro
}
// createCreateRequest creates the Create request.
-func (client *SAPCentralInstancesClient) createCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body SAPCentralServerInstance, options *SAPCentralInstancesClientBeginCreateOptions) (*policy.Request, error) {
+func (client *SAPCentralServerInstancesClient) createCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, resource SAPCentralServerInstance, _ *SAPCentralServerInstancesClientBeginCreateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -122,55 +117,53 @@ func (client *SAPCentralInstancesClient) createCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
- if err := runtime.MarshalAsJSON(req, body); err != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, resource); err != nil {
return nil, err
}
return req, nil
}
-// 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.
+// BeginDelete - Deletes the SAP Central Services Instance resource. <br><br>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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
-// - options - SAPCentralInstancesClientBeginDeleteOptions contains the optional parameters for the SAPCentralInstancesClient.BeginDelete
+// - options - SAPCentralServerInstancesClientBeginDeleteOptions contains the optional parameters for the SAPCentralServerInstancesClient.BeginDelete
// method.
-func (client *SAPCentralInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginDeleteOptions) (*runtime.Poller[SAPCentralInstancesClientDeleteResponse], error) {
+func (client *SAPCentralServerInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralServerInstancesClientBeginDeleteOptions) (*runtime.Poller[SAPCentralServerInstancesClientDeleteResponse], error) {
if options == nil || options.ResumeToken == "" {
resp, err := client.deleteOperation(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
if err != nil {
return nil, err
}
- poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPCentralInstancesClientDeleteResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPCentralServerInstancesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
- return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPCentralInstancesClientDeleteResponse]{
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPCentralServerInstancesClientDeleteResponse]{
Tracer: client.internal.Tracer(),
})
}
}
-// Delete - 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.
+// Delete - Deletes the SAP Central Services Instance resource. <br><br>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
-func (client *SAPCentralInstancesClient) deleteOperation(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginDeleteOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPCentralServerInstancesClient) deleteOperation(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralServerInstancesClientBeginDeleteOptions) (*http.Response, error) {
var err error
- const operationName = "SAPCentralInstancesClient.BeginDelete"
+ const operationName = "SAPCentralServerInstancesClient.BeginDelete"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
@@ -190,7 +183,7 @@ func (client *SAPCentralInstancesClient) deleteOperation(ctx context.Context, re
}
// deleteCreateRequest creates the Delete request.
-func (client *SAPCentralInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginDeleteOptions) (*policy.Request, error) {
+func (client *SAPCentralServerInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, _ *SAPCentralServerInstancesClientBeginDeleteOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -213,7 +206,7 @@ func (client *SAPCentralInstancesClient) deleteCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -222,35 +215,36 @@ func (client *SAPCentralInstancesClient) deleteCreateRequest(ctx context.Context
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
-// - options - SAPCentralInstancesClientGetOptions contains the optional parameters for the SAPCentralInstancesClient.Get method.
-func (client *SAPCentralInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientGetOptions) (SAPCentralInstancesClientGetResponse, error) {
+// - options - SAPCentralServerInstancesClientGetOptions contains the optional parameters for the SAPCentralServerInstancesClient.Get
+// method.
+func (client *SAPCentralServerInstancesClient) Get(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralServerInstancesClientGetOptions) (SAPCentralServerInstancesClientGetResponse, error) {
var err error
- const operationName = "SAPCentralInstancesClient.Get"
+ const operationName = "SAPCentralServerInstancesClient.Get"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
req, err := client.getCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
if err != nil {
- return SAPCentralInstancesClientGetResponse{}, err
+ return SAPCentralServerInstancesClientGetResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
- return SAPCentralInstancesClientGetResponse{}, err
+ return SAPCentralServerInstancesClientGetResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
- return SAPCentralInstancesClientGetResponse{}, err
+ return SAPCentralServerInstancesClientGetResponse{}, err
}
resp, err := client.getHandleResponse(httpResp)
return resp, err
}
// getCreateRequest creates the Get request.
-func (client *SAPCentralInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientGetOptions) (*policy.Request, error) {
+func (client *SAPCentralServerInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, _ *SAPCentralServerInstancesClientGetOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -273,35 +267,35 @@ func (client *SAPCentralInstancesClient) getCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// getHandleResponse handles the Get response.
-func (client *SAPCentralInstancesClient) getHandleResponse(resp *http.Response) (SAPCentralInstancesClientGetResponse, error) {
- result := SAPCentralInstancesClientGetResponse{}
+func (client *SAPCentralServerInstancesClient) getHandleResponse(resp *http.Response) (SAPCentralServerInstancesClientGetResponse, error) {
+ result := SAPCentralServerInstancesClientGetResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.SAPCentralServerInstance); err != nil {
- return SAPCentralInstancesClientGetResponse{}, err
+ return SAPCentralServerInstancesClientGetResponse{}, err
}
return result, nil
}
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
-// - options - SAPCentralInstancesClientListOptions contains the optional parameters for the SAPCentralInstancesClient.NewListPager
+// - options - SAPCentralServerInstancesClientListOptions contains the optional parameters for the SAPCentralServerInstancesClient.NewListPager
// method.
-func (client *SAPCentralInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, options *SAPCentralInstancesClientListOptions) *runtime.Pager[SAPCentralInstancesClientListResponse] {
- return runtime.NewPager(runtime.PagingHandler[SAPCentralInstancesClientListResponse]{
- More: func(page SAPCentralInstancesClientListResponse) bool {
+func (client *SAPCentralServerInstancesClient) NewListPager(resourceGroupName string, sapVirtualInstanceName string, options *SAPCentralServerInstancesClientListOptions) *runtime.Pager[SAPCentralServerInstancesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[SAPCentralServerInstancesClientListResponse]{
+ More: func(page SAPCentralServerInstancesClientListResponse) bool {
return page.NextLink != nil && len(*page.NextLink) > 0
},
- Fetcher: func(ctx context.Context, page *SAPCentralInstancesClientListResponse) (SAPCentralInstancesClientListResponse, error) {
- ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SAPCentralInstancesClient.NewListPager")
+ Fetcher: func(ctx context.Context, page *SAPCentralServerInstancesClientListResponse) (SAPCentralServerInstancesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SAPCentralServerInstancesClient.NewListPager")
nextLink := ""
if page != nil {
nextLink = *page.NextLink
@@ -310,7 +304,7 @@ func (client *SAPCentralInstancesClient) NewListPager(resourceGroupName string,
return client.listCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, options)
}, nil)
if err != nil {
- return SAPCentralInstancesClientListResponse{}, err
+ return SAPCentralServerInstancesClientListResponse{}, err
}
return client.listHandleResponse(resp)
},
@@ -319,7 +313,7 @@ func (client *SAPCentralInstancesClient) NewListPager(resourceGroupName string,
}
// listCreateRequest creates the List request.
-func (client *SAPCentralInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPCentralInstancesClientListOptions) (*policy.Request, error) {
+func (client *SAPCentralServerInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, _ *SAPCentralServerInstancesClientListOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -338,59 +332,58 @@ func (client *SAPCentralInstancesClient) listCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
}
// listHandleResponse handles the List response.
-func (client *SAPCentralInstancesClient) listHandleResponse(resp *http.Response) (SAPCentralInstancesClientListResponse, error) {
- result := SAPCentralInstancesClientListResponse{}
- if err := runtime.UnmarshalAsJSON(resp, &result.SAPCentralInstanceList); err != nil {
- return SAPCentralInstancesClientListResponse{}, err
+func (client *SAPCentralServerInstancesClient) listHandleResponse(resp *http.Response) (SAPCentralServerInstancesClientListResponse, error) {
+ result := SAPCentralServerInstancesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SAPCentralServerInstanceListResult); err != nil {
+ return SAPCentralServerInstancesClientListResponse{}, err
}
return result, nil
}
-// BeginStartInstance - Starts the SAP Central Services Instance.
+// BeginStart - Starts the SAP Central Services Instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
-// - options - SAPCentralInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPCentralInstancesClient.BeginStartInstance
+// - options - SAPCentralServerInstancesClientBeginStartOptions contains the optional parameters for the SAPCentralServerInstancesClient.BeginStart
// method.
-func (client *SAPCentralInstancesClient) BeginStartInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginStartInstanceOptions) (*runtime.Poller[SAPCentralInstancesClientStartInstanceResponse], error) {
+func (client *SAPCentralServerInstancesClient) BeginStart(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralServerInstancesClientBeginStartOptions) (*runtime.Poller[SAPCentralServerInstancesClientStartResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.startInstance(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
+ resp, err := client.start(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
if err != nil {
return nil, err
}
- poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPCentralInstancesClientStartInstanceResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPCentralServerInstancesClientStartResponse]{
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
- return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPCentralInstancesClientStartInstanceResponse]{
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPCentralServerInstancesClientStartResponse]{
Tracer: client.internal.Tracer(),
})
}
}
-// StartInstance - Starts the SAP Central Services Instance.
+// Start - Starts the SAP Central Services Instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
-func (client *SAPCentralInstancesClient) startInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginStartInstanceOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPCentralServerInstancesClient) start(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralServerInstancesClientBeginStartOptions) (*http.Response, error) {
var err error
- const operationName = "SAPCentralInstancesClient.BeginStartInstance"
+ const operationName = "SAPCentralServerInstancesClient.BeginStart"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.startInstanceCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
+ req, err := client.startCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
if err != nil {
return nil, err
}
@@ -405,8 +398,8 @@ func (client *SAPCentralInstancesClient) startInstance(ctx context.Context, reso
return httpResp, nil
}
-// startInstanceCreateRequest creates the StartInstance request.
-func (client *SAPCentralInstancesClient) startInstanceCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginStartInstanceOptions) (*policy.Request, error) {
+// startCreateRequest creates the Start request.
+func (client *SAPCentralServerInstancesClient) startCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralServerInstancesClientBeginStartOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -429,10 +422,11 @@ func (client *SAPCentralInstancesClient) startInstanceCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Body != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, *options.Body); err != nil {
return nil, err
}
@@ -441,44 +435,43 @@ func (client *SAPCentralInstancesClient) startInstanceCreateRequest(ctx context.
return req, nil
}
-// BeginStopInstance - Stops the SAP Central Services Instance.
+// BeginStop - Stops the SAP Central Services Instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
-// - options - SAPCentralInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPCentralInstancesClient.BeginStopInstance
+// - options - SAPCentralServerInstancesClientBeginStopOptions contains the optional parameters for the SAPCentralServerInstancesClient.BeginStop
// method.
-func (client *SAPCentralInstancesClient) BeginStopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginStopInstanceOptions) (*runtime.Poller[SAPCentralInstancesClientStopInstanceResponse], error) {
+func (client *SAPCentralServerInstancesClient) BeginStop(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralServerInstancesClientBeginStopOptions) (*runtime.Poller[SAPCentralServerInstancesClientStopResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.stopInstance(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
+ resp, err := client.stop(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
if err != nil {
return nil, err
}
- poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPCentralInstancesClientStopInstanceResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPCentralServerInstancesClientStopResponse]{
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
- return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPCentralInstancesClientStopInstanceResponse]{
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPCentralServerInstancesClientStopResponse]{
Tracer: client.internal.Tracer(),
})
}
}
-// StopInstance - Stops the SAP Central Services Instance.
+// Stop - Stops the SAP Central Services Instance.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
-func (client *SAPCentralInstancesClient) stopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginStopInstanceOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPCentralServerInstancesClient) stop(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralServerInstancesClientBeginStopOptions) (*http.Response, error) {
var err error
- const operationName = "SAPCentralInstancesClient.BeginStopInstance"
+ const operationName = "SAPCentralServerInstancesClient.BeginStop"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.stopInstanceCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
+ req, err := client.stopCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, options)
if err != nil {
return nil, err
}
@@ -493,8 +486,8 @@ func (client *SAPCentralInstancesClient) stopInstance(ctx context.Context, resou
return httpResp, nil
}
-// stopInstanceCreateRequest creates the StopInstance request.
-func (client *SAPCentralInstancesClient) stopInstanceCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralInstancesClientBeginStopInstanceOptions) (*policy.Request, error) {
+// stopCreateRequest creates the Stop request.
+func (client *SAPCentralServerInstancesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, options *SAPCentralServerInstancesClientBeginStopOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -517,10 +510,11 @@ func (client *SAPCentralInstancesClient) stopInstanceCreateRequest(ctx context.C
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Body != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, *options.Body); err != nil {
return nil, err
}
@@ -529,41 +523,41 @@ func (client *SAPCentralInstancesClient) stopInstanceCreateRequest(ctx context.C
return req, nil
}
-// Update - Updates the SAP Central Services Instance resource.
-// This can be used to update tags on the resource.
+// Update - Updates the SAP Central Services Instance resource. <br><br>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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - centralInstanceName - Central Services Instance resource name string modeled as parameter for auto generation to work correctly.
-// - body - The SAP Central Services Instance resource request body.
-// - options - SAPCentralInstancesClientUpdateOptions contains the optional parameters for the SAPCentralInstancesClient.Update
+// - properties - The SAP Central Services Instance resource request body.
+// - options - SAPCentralServerInstancesClientUpdateOptions contains the optional parameters for the SAPCentralServerInstancesClient.Update
// method.
-func (client *SAPCentralInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body UpdateSAPCentralInstanceRequest, options *SAPCentralInstancesClientUpdateOptions) (SAPCentralInstancesClientUpdateResponse, error) {
+func (client *SAPCentralServerInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, properties UpdateSAPCentralInstanceRequest, options *SAPCentralServerInstancesClientUpdateOptions) (SAPCentralServerInstancesClientUpdateResponse, error) {
var err error
- const operationName = "SAPCentralInstancesClient.Update"
+ const operationName = "SAPCentralServerInstancesClient.Update"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.updateCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, body, options)
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, centralInstanceName, properties, options)
if err != nil {
- return SAPCentralInstancesClientUpdateResponse{}, err
+ return SAPCentralServerInstancesClientUpdateResponse{}, err
}
httpResp, err := client.internal.Pipeline().Do(req)
if err != nil {
- return SAPCentralInstancesClientUpdateResponse{}, err
+ return SAPCentralServerInstancesClientUpdateResponse{}, err
}
if !runtime.HasStatusCode(httpResp, http.StatusOK) {
err = runtime.NewResponseError(httpResp)
- return SAPCentralInstancesClientUpdateResponse{}, err
+ return SAPCentralServerInstancesClientUpdateResponse{}, err
}
resp, err := client.updateHandleResponse(httpResp)
return resp, err
}
// updateCreateRequest creates the Update request.
-func (client *SAPCentralInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, body UpdateSAPCentralInstanceRequest, options *SAPCentralInstancesClientUpdateOptions) (*policy.Request, error) {
+func (client *SAPCentralServerInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, centralInstanceName string, properties UpdateSAPCentralInstanceRequest, _ *SAPCentralServerInstancesClientUpdateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -586,20 +580,21 @@ func (client *SAPCentralInstancesClient) updateCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
- if err := runtime.MarshalAsJSON(req, body); err != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, properties); err != nil {
return nil, err
}
return req, nil
}
// updateHandleResponse handles the Update response.
-func (client *SAPCentralInstancesClient) updateHandleResponse(resp *http.Response) (SAPCentralInstancesClientUpdateResponse, error) {
- result := SAPCentralInstancesClientUpdateResponse{}
+func (client *SAPCentralServerInstancesClient) updateHandleResponse(resp *http.Response) (SAPCentralServerInstancesClientUpdateResponse, error) {
+ result := SAPCentralServerInstancesClientUpdateResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.SAPCentralServerInstance); err != nil {
- return SAPCentralInstancesClientUpdateResponse{}, err
+ return SAPCentralServerInstancesClientUpdateResponse{}, err
}
return result, nil
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralserverinstances_client_example_test.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralserverinstances_client_example_test.go
new file mode 100644
index 000000000000..c682e2bcaabc
--- /dev/null
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapcentralserverinstances_client_example_test.go
@@ -0,0 +1,627 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
+
+package armworkloadssapvirtualinstance_test
+
+import (
+ "context"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
+ "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
+ "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance"
+ "log"
+)
+
+// Generated from example definition: 2024-09-01/SapCentralInstances_Create.json
+func ExampleSAPCentralServerInstancesClient_BeginCreate_sapCentralServerInstancesCreate() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPCentralServerInstancesClient().BeginCreate(ctx, "test-rg", "X00", "centralServer", armworkloadssapvirtualinstance.SAPCentralServerInstance{
+ Location: to.Ptr("westcentralus"),
+ Properties: &armworkloadssapvirtualinstance.SAPCentralServerProperties{},
+ Tags: map[string]*string{},
+ }, 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 = armworkloadssapvirtualinstance.SAPCentralServerInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapCentralInstances_CreateForHaWithAvailabilitySet.json
+func ExampleSAPCentralServerInstancesClient_BeginCreate_createSapCentralInstancesForHaSystemWithAvailabilitySet() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPCentralServerInstancesClient().BeginCreate(ctx, "test-rg", "X00", "centralServer", armworkloadssapvirtualinstance.SAPCentralServerInstance{
+ Location: to.Ptr("westcentralus"),
+ Properties: &armworkloadssapvirtualinstance.SAPCentralServerProperties{},
+ Tags: map[string]*string{},
+ }, 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 = armworkloadssapvirtualinstance.SAPCentralServerInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapCentralInstances_Delete.json
+func ExampleSAPCentralServerInstancesClient_BeginDelete() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPCentralServerInstancesClient().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)
+ }
+}
+
+// Generated from example definition: 2024-09-01/SapCentralInstances_Get.json
+func ExampleSAPCentralServerInstancesClient_Get() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ res, err := clientFactory.NewSAPCentralServerInstancesClient().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 = armworkloadssapvirtualinstance.SAPCentralServerInstancesClientGetResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapCentralServerInstances_ListBySapVirtualInstance.json
+func ExampleSAPCentralServerInstancesClient_NewListPager() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ pager := clientFactory.NewSAPCentralServerInstancesClient().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 = armworkloadssapvirtualinstance.SAPCentralServerInstancesClientListResponse{
+ // SAPCentralServerInstanceListResult: armworkloadssapvirtualinstance.SAPCentralServerInstanceListResult{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // },
+ // },
+ // }
+ }
+}
+
+// Generated from example definition: 2024-09-01/SapCentralInstances_StartInstance.json
+func ExampleSAPCentralServerInstancesClient_BeginStart_startTheSapCentralServicesInstance() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPCentralServerInstancesClient().BeginStart(ctx, "test-rg", "X00", "centralServer", &SAPCentralServerInstancesClientBeginStartOptions{
+ body: &armworkloadssapvirtualinstance.StartRequest{}})
+ 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 = armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStartResponse{
+ // 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"),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapCentralInstances_StartInstanceVM.json
+func ExampleSAPCentralServerInstancesClient_BeginStart_startTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPCentralServerInstancesClient().BeginStart(ctx, "test-rg", "X00", "centralServer", &SAPCentralServerInstancesClientBeginStartOptions{
+ 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 = armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStartResponse{
+ // 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"),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapCentralInstances_StopInstance.json
+func ExampleSAPCentralServerInstancesClient_BeginStop_stopTheSapCentralServicesInstance() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPCentralServerInstancesClient().BeginStop(ctx, "test-rg", "X00", "centralServer", &SAPCentralServerInstancesClientBeginStopOptions{
+ 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 = armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStopResponse{
+ // 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"),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapCentralInstances_StopInstanceVM.json
+func ExampleSAPCentralServerInstancesClient_BeginStop_stopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPCentralServerInstancesClient().BeginStop(ctx, "test-rg", "X00", "centralServer", &SAPCentralServerInstancesClientBeginStopOptions{
+ 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 = armworkloadssapvirtualinstance.SAPCentralServerInstancesClientStopResponse{
+ // 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"),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapCentralInstances_Update.json
+func ExampleSAPCentralServerInstancesClient_Update() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ res, err := clientFactory.NewSAPCentralServerInstancesClient().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 = armworkloadssapvirtualinstance.SAPCentralServerInstancesClientUpdateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
+}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapdatabaseinstances_client.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapdatabaseinstances_client.go
index 82161ffb0f2a..db0c2fe0240e 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapdatabaseinstances_client.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapdatabaseinstances_client.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -28,7 +24,7 @@ type SAPDatabaseInstancesClient struct {
}
// NewSAPDatabaseInstancesClient creates a new instance of SAPDatabaseInstancesClient with the specified values.
-// - subscriptionID - The ID of the target subscription.
+// - subscriptionID - The ID of the target subscription. The value must be an UUID.
// - credential - used to authorize requests. Usually a credential from azidentity.
// - options - pass nil to accept the default values.
func NewSAPDatabaseInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SAPDatabaseInstancesClient, error) {
@@ -43,26 +39,25 @@ func NewSAPDatabaseInstancesClient(subscriptionID string, credential azcore.Toke
return client, nil
}
-// 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.
+// BeginCreate - Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
-// - body - Request body of Database resource of a SAP system.
+// - resource - Request body of Database resource of a SAP system.
// - options - SAPDatabaseInstancesClientBeginCreateOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginCreate
// method.
-func (client *SAPDatabaseInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body SAPDatabaseInstance, options *SAPDatabaseInstancesClientBeginCreateOptions) (*runtime.Poller[SAPDatabaseInstancesClientCreateResponse], error) {
+func (client *SAPDatabaseInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, resource SAPDatabaseInstance, options *SAPDatabaseInstancesClientBeginCreateOptions) (*runtime.Poller[SAPDatabaseInstancesClientCreateResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.create(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, options)
+ resp, err := client.create(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, resource, options)
if err != nil {
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPDatabaseInstancesClientCreateResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
@@ -72,18 +67,18 @@ func (client *SAPDatabaseInstancesClient) BeginCreate(ctx context.Context, resou
}
}
-// Create - 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.
+// Create - Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>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
-func (client *SAPDatabaseInstancesClient) create(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body SAPDatabaseInstance, options *SAPDatabaseInstancesClientBeginCreateOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPDatabaseInstancesClient) create(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, resource SAPDatabaseInstance, options *SAPDatabaseInstancesClientBeginCreateOptions) (*http.Response, error) {
var err error
const operationName = "SAPDatabaseInstancesClient.BeginCreate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.createCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, options)
+ req, err := client.createCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, resource, options)
if err != nil {
return nil, err
}
@@ -99,7 +94,7 @@ func (client *SAPDatabaseInstancesClient) create(ctx context.Context, resourceGr
}
// createCreateRequest creates the Create request.
-func (client *SAPDatabaseInstancesClient) createCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body SAPDatabaseInstance, options *SAPDatabaseInstancesClientBeginCreateOptions) (*policy.Request, error) {
+func (client *SAPDatabaseInstancesClient) createCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, resource SAPDatabaseInstance, _ *SAPDatabaseInstancesClientBeginCreateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -122,20 +117,21 @@ func (client *SAPDatabaseInstancesClient) createCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
- if err := runtime.MarshalAsJSON(req, body); err != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, resource); err != nil {
return nil, err
}
return req, nil
}
-// 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.
+// BeginDelete - Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
@@ -148,8 +144,7 @@ func (client *SAPDatabaseInstancesClient) BeginDelete(ctx context.Context, resou
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPDatabaseInstancesClientDeleteResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
@@ -159,11 +154,11 @@ func (client *SAPDatabaseInstancesClient) BeginDelete(ctx context.Context, resou
}
}
-// Delete - 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.
+// Delete - Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>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
+// Generated from API version 2024-09-01
func (client *SAPDatabaseInstancesClient) deleteOperation(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "SAPDatabaseInstancesClient.BeginDelete"
@@ -186,7 +181,7 @@ func (client *SAPDatabaseInstancesClient) deleteOperation(ctx context.Context, r
}
// deleteCreateRequest creates the Delete request.
-func (client *SAPDatabaseInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginDeleteOptions) (*policy.Request, error) {
+func (client *SAPDatabaseInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, _ *SAPDatabaseInstancesClientBeginDeleteOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -209,7 +204,7 @@ func (client *SAPDatabaseInstancesClient) deleteCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -218,7 +213,7 @@ func (client *SAPDatabaseInstancesClient) deleteCreateRequest(ctx context.Contex
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
@@ -247,7 +242,7 @@ func (client *SAPDatabaseInstancesClient) Get(ctx context.Context, resourceGroup
}
// getCreateRequest creates the Get request.
-func (client *SAPDatabaseInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientGetOptions) (*policy.Request, error) {
+func (client *SAPDatabaseInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, _ *SAPDatabaseInstancesClientGetOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -270,7 +265,7 @@ func (client *SAPDatabaseInstancesClient) getCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -287,7 +282,7 @@ func (client *SAPDatabaseInstancesClient) getHandleResponse(resp *http.Response)
// NewListPager - Lists the Database resources associated with a Virtual Instance for SAP solutions resource.
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - options - SAPDatabaseInstancesClientListOptions contains the optional parameters for the SAPDatabaseInstancesClient.NewListPager
@@ -316,7 +311,7 @@ func (client *SAPDatabaseInstancesClient) NewListPager(resourceGroupName string,
}
// listCreateRequest creates the List request.
-func (client *SAPDatabaseInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPDatabaseInstancesClientListOptions) (*policy.Request, error) {
+func (client *SAPDatabaseInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, _ *SAPDatabaseInstancesClientListOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -335,7 +330,7 @@ func (client *SAPDatabaseInstancesClient) listCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -344,50 +339,49 @@ func (client *SAPDatabaseInstancesClient) listCreateRequest(ctx context.Context,
// listHandleResponse handles the List response.
func (client *SAPDatabaseInstancesClient) listHandleResponse(resp *http.Response) (SAPDatabaseInstancesClientListResponse, error) {
result := SAPDatabaseInstancesClientListResponse{}
- if err := runtime.UnmarshalAsJSON(resp, &result.SAPDatabaseInstanceList); err != nil {
+ if err := runtime.UnmarshalAsJSON(resp, &result.SAPDatabaseInstanceListResult); err != nil {
return SAPDatabaseInstancesClientListResponse{}, err
}
return result, nil
}
-// BeginStartInstance - Starts the database instance of the SAP system.
+// BeginStart - 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
-// - options - SAPDatabaseInstancesClientBeginStartInstanceOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStartInstance
+// - options - SAPDatabaseInstancesClientBeginStartOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStart
// method.
-func (client *SAPDatabaseInstancesClient) BeginStartInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStartInstanceOptions) (*runtime.Poller[SAPDatabaseInstancesClientStartInstanceResponse], error) {
+func (client *SAPDatabaseInstancesClient) BeginStart(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStartOptions) (*runtime.Poller[SAPDatabaseInstancesClientStartResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.startInstance(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, options)
+ resp, err := client.start(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, options)
if err != nil {
return nil, err
}
- poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPDatabaseInstancesClientStartInstanceResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPDatabaseInstancesClientStartResponse]{
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
- return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPDatabaseInstancesClientStartInstanceResponse]{
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPDatabaseInstancesClientStartResponse]{
Tracer: client.internal.Tracer(),
})
}
}
-// StartInstance - Starts the database instance of the SAP system.
+// Start - 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
-func (client *SAPDatabaseInstancesClient) startInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStartInstanceOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPDatabaseInstancesClient) start(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStartOptions) (*http.Response, error) {
var err error
- const operationName = "SAPDatabaseInstancesClient.BeginStartInstance"
+ const operationName = "SAPDatabaseInstancesClient.BeginStart"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.startInstanceCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, options)
+ req, err := client.startCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, options)
if err != nil {
return nil, err
}
@@ -402,8 +396,8 @@ func (client *SAPDatabaseInstancesClient) startInstance(ctx context.Context, res
return httpResp, nil
}
-// startInstanceCreateRequest creates the StartInstance request.
-func (client *SAPDatabaseInstancesClient) startInstanceCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStartInstanceOptions) (*policy.Request, error) {
+// startCreateRequest creates the Start request.
+func (client *SAPDatabaseInstancesClient) startCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStartOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -426,10 +420,11 @@ func (client *SAPDatabaseInstancesClient) startInstanceCreateRequest(ctx context
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Body != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, *options.Body); err != nil {
return nil, err
}
@@ -438,44 +433,43 @@ func (client *SAPDatabaseInstancesClient) startInstanceCreateRequest(ctx context
return req, nil
}
-// BeginStopInstance - Stops the database instance of the SAP system.
+// BeginStop - 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
-// - options - SAPDatabaseInstancesClientBeginStopInstanceOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStopInstance
+// - options - SAPDatabaseInstancesClientBeginStopOptions contains the optional parameters for the SAPDatabaseInstancesClient.BeginStop
// method.
-func (client *SAPDatabaseInstancesClient) BeginStopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStopInstanceOptions) (*runtime.Poller[SAPDatabaseInstancesClientStopInstanceResponse], error) {
+func (client *SAPDatabaseInstancesClient) BeginStop(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStopOptions) (*runtime.Poller[SAPDatabaseInstancesClientStopResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.stopInstance(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, options)
+ resp, err := client.stop(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, options)
if err != nil {
return nil, err
}
- poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPDatabaseInstancesClientStopInstanceResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPDatabaseInstancesClientStopResponse]{
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
- return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPDatabaseInstancesClientStopInstanceResponse]{
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SAPDatabaseInstancesClientStopResponse]{
Tracer: client.internal.Tracer(),
})
}
}
-// StopInstance - Stops the database instance of the SAP system.
+// Stop - 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
-func (client *SAPDatabaseInstancesClient) stopInstance(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStopInstanceOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPDatabaseInstancesClient) stop(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStopOptions) (*http.Response, error) {
var err error
- const operationName = "SAPDatabaseInstancesClient.BeginStopInstance"
+ const operationName = "SAPDatabaseInstancesClient.BeginStop"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.stopInstanceCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, options)
+ req, err := client.stopCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, options)
if err != nil {
return nil, err
}
@@ -490,8 +484,8 @@ func (client *SAPDatabaseInstancesClient) stopInstance(ctx context.Context, reso
return httpResp, nil
}
-// stopInstanceCreateRequest creates the StopInstance request.
-func (client *SAPDatabaseInstancesClient) stopInstanceCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStopInstanceOptions) (*policy.Request, error) {
+// stopCreateRequest creates the Stop request.
+func (client *SAPDatabaseInstancesClient) stopCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, options *SAPDatabaseInstancesClientBeginStopOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -514,10 +508,11 @@ func (client *SAPDatabaseInstancesClient) stopInstanceCreateRequest(ctx context.
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Body != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, *options.Body); err != nil {
return nil, err
}
@@ -526,23 +521,23 @@ func (client *SAPDatabaseInstancesClient) stopInstanceCreateRequest(ctx context.
return req, nil
}
-// Update - Updates the Database instance resource. This can be used to update tags on the resource.
+// Update - Updates the Database resource.
// If the operation fails it returns an *azcore.ResponseError type.
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - databaseInstanceName - Database resource name string modeled as parameter for auto generation to work correctly.
-// - body - Database resource update request body.
+// - properties - Database resource update request body.
// - options - SAPDatabaseInstancesClientUpdateOptions contains the optional parameters for the SAPDatabaseInstancesClient.Update
// method.
-func (client *SAPDatabaseInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body UpdateSAPDatabaseInstanceRequest, options *SAPDatabaseInstancesClientUpdateOptions) (SAPDatabaseInstancesClientUpdateResponse, error) {
+func (client *SAPDatabaseInstancesClient) Update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, properties UpdateSAPDatabaseInstanceRequest, options *SAPDatabaseInstancesClientUpdateOptions) (SAPDatabaseInstancesClientUpdateResponse, error) {
var err error
const operationName = "SAPDatabaseInstancesClient.Update"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.updateCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body, options)
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, properties, options)
if err != nil {
return SAPDatabaseInstancesClientUpdateResponse{}, err
}
@@ -559,7 +554,7 @@ func (client *SAPDatabaseInstancesClient) Update(ctx context.Context, resourceGr
}
// updateCreateRequest creates the Update request.
-func (client *SAPDatabaseInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, body UpdateSAPDatabaseInstanceRequest, options *SAPDatabaseInstancesClientUpdateOptions) (*policy.Request, error) {
+func (client *SAPDatabaseInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, databaseInstanceName string, properties UpdateSAPDatabaseInstanceRequest, _ *SAPDatabaseInstancesClientUpdateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -582,10 +577,11 @@ func (client *SAPDatabaseInstancesClient) updateCreateRequest(ctx context.Contex
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
- if err := runtime.MarshalAsJSON(req, body); err != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, properties); err != nil {
return nil, err
}
return req, nil
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapdatabaseinstances_client_example_test.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapdatabaseinstances_client_example_test.go
index 05c7f04b06f0..1a21f88cb51b 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapdatabaseinstances_client_example_test.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapdatabaseinstances_client_example_test.go
@@ -1,78 +1,91 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-// DO NOT EDIT.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance_test
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"
+ "log"
)
-// 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
-func ExampleSAPDatabaseInstancesClient_Get() {
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_Create.json
+func ExampleSAPDatabaseInstancesClient_BeginCreate_sapDatabaseInstancesCreate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
- res, err := clientFactory.NewSAPDatabaseInstancesClient().Get(ctx, "test-rg", "X00", "databaseServer", nil)
+ poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginCreate(ctx, "test-rg", "X00", "databaseServer", armworkloadssapvirtualinstance.SAPDatabaseInstance{
+ Location: to.Ptr("westcentralus"),
+ Properties: &armworkloadssapvirtualinstance.SAPDatabaseProperties{},
+ Tags: map[string]*string{},
+ }, 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"),
- // 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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientCreateResponse{
+ // 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("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
// },
// }
}
-// 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
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_CreateForHaWithAvailabilitySet.json
func ExampleSAPDatabaseInstancesClient_BeginCreate_createSapDatabaseInstancesForHaSystemWithAvailabilitySet() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPDatabaseProperties{},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -84,243 +97,292 @@ func ExampleSAPDatabaseInstancesClient_BeginCreate_createSapDatabaseInstancesFor
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientCreateResponse{
+ // 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("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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"),
- // }},
// },
// }
}
-// 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
-func ExampleSAPDatabaseInstancesClient_BeginCreate_sapDatabaseInstancesCreate() {
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_Delete.json
+func ExampleSAPDatabaseInstancesClient_BeginDelete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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)
+ poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginDelete(ctx, "test-rg", "X00", "databaseServer", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
- res, err := poller.PollUntilDone(ctx, nil)
+ _, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
+}
+
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json
+func ExampleSAPDatabaseInstancesClient_Get() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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"),
- // 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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientGetResponse{
+ // 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("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // Tags: map[string]*string{
+ // },
// },
// }
}
-// 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
-func ExampleSAPDatabaseInstancesClient_Update() {
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_List.json
+func ExampleSAPDatabaseInstancesClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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)
+ 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 = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientListResponse{
+ // SAPDatabaseInstanceListResult: armworkloadssapvirtualinstance.SAPDatabaseInstanceListResult{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // },
+ // },
+ // }
+ }
+}
+
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstance.json
+func ExampleSAPDatabaseInstancesClient_BeginStart_startTheDatabaseInstanceOfTheSapSystem() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginStart(ctx, "test-rg", "X00", "db0", &SAPDatabaseInstancesClientBeginStartOptions{
+ body: &armworkloadssapvirtualinstance.StartRequest{}})
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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStartResponse{
+ // 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"),
// },
// }
}
-// 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
-func ExampleSAPDatabaseInstancesClient_BeginDelete() {
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstanceVM.json
+func ExampleSAPDatabaseInstancesClient_BeginStart_startVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
- poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginDelete(ctx, "test-rg", "X00", "databaseServer", nil)
+ poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginStart(ctx, "test-rg", "X00", "db0", &SAPDatabaseInstancesClientBeginStartOptions{
+ body: &armworkloadssapvirtualinstance.StartRequest{
+ StartVM: to.Ptr(true),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
- _, err = poller.PollUntilDone(ctx, nil)
+ 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 = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStartResponse{
+ // 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"),
+ // },
+ // }
}
-// 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
-func ExampleSAPDatabaseInstancesClient_NewListPager() {
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstance.json
+func ExampleSAPDatabaseInstancesClient_BeginStop_stopTheDatabaseInstanceOfTheSapSystem() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
- // }},
- // },
- // }},
- // }
+ poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginStop(ctx, "test-rg", "X00", "db0", &SAPDatabaseInstancesClientBeginStopOptions{
+ 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 = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopResponse{
+ // 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"),
+ // },
+ // }
}
-// 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
-func ExampleSAPDatabaseInstancesClient_BeginStartInstance_startVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt() {
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoft.json
+func ExampleSAPDatabaseInstancesClient_BeginStop_softStopTheDatabaseInstanceOfTheSapSystem() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
- })
+ poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginStop(ctx, "test-rg", "X00", "db0", &SAPDatabaseInstancesClientBeginStopOptions{
+ body: &armworkloadssapvirtualinstance.StopRequest{
+ SoftStopTimeoutSeconds: to.Ptr[int64](300),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
@@ -331,27 +393,33 @@ func ExampleSAPDatabaseInstancesClient_BeginStartInstance_startVirtualMachineAnd
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopResponse{
+ // 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"),
+ // },
// }
}
-// 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
-func ExampleSAPDatabaseInstancesClient_BeginStartInstance_startTheDatabaseInstanceOfTheSapSystem() {
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoftVM.json
+func ExampleSAPDatabaseInstancesClient_BeginStop_softStopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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})
+ poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginStop(ctx, "test-rg", "X00", "db0", &SAPDatabaseInstancesClientBeginStopOptions{
+ body: &armworkloadssapvirtualinstance.StopRequest{
+ DeallocateVM: to.Ptr(true),
+ SoftStopTimeoutSeconds: to.Ptr[int64](300),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
@@ -362,31 +430,33 @@ func ExampleSAPDatabaseInstancesClient_BeginStartInstance_startTheDatabaseInstan
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopResponse{
+ // 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"),
+ // },
// }
}
-// 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
-func ExampleSAPDatabaseInstancesClient_BeginStopInstance_stopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS() {
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceVM.json
+func ExampleSAPDatabaseInstancesClient_BeginStop_stopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
- })
+ poller, err := clientFactory.NewSAPDatabaseInstancesClient().BeginStop(ctx, "test-rg", "X00", "db0", &SAPDatabaseInstancesClientBeginStopOptions{
+ body: &armworkloadssapvirtualinstance.StopRequest{
+ DeallocateVM: to.Ptr(true),
+ SoftStopTimeoutSeconds: to.Ptr[int64](0),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
@@ -397,45 +467,68 @@ func ExampleSAPDatabaseInstancesClient_BeginStopInstance_stopTheDatabaseInstance
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientStopResponse{
+ // 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"),
+ // },
// }
}
-// 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
-func ExampleSAPDatabaseInstancesClient_BeginStopInstance_stopTheDatabaseInstanceOfTheSapSystem() {
+// Generated from example definition: 2024-09-01/SapDatabaseInstances_Update.json
+func ExampleSAPDatabaseInstancesClient_Update() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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),
- },
- })
+ 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)
}
- 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"),
+ // res = armworkloadssapvirtualinstance.SAPDatabaseInstancesClientUpdateResponse{
+ // 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("westcentralus"),
+ // 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"),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
// }
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapvirtualinstances_client.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapvirtualinstances_client.go
index 41aa288ee716..c11ecdd67200 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapvirtualinstances_client.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapvirtualinstances_client.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -28,7 +24,7 @@ type SAPVirtualInstancesClient struct {
}
// NewSAPVirtualInstancesClient creates a new instance of SAPVirtualInstancesClient with the specified values.
-// - subscriptionID - The ID of the target subscription.
+// - subscriptionID - The ID of the target subscription. The value must be an UUID.
// - credential - used to authorize requests. Usually a credential from azidentity.
// - options - pass nil to accept the default values.
func NewSAPVirtualInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SAPVirtualInstancesClient, error) {
@@ -46,21 +42,20 @@ func NewSAPVirtualInstancesClient(subscriptionID string, credential azcore.Token
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
-// - body - Virtual Instance for SAP solutions resource request body.
+// - resource - Virtual Instance for SAP solutions resource request body.
// - options - SAPVirtualInstancesClientBeginCreateOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginCreate
// method.
-func (client *SAPVirtualInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body SAPVirtualInstance, options *SAPVirtualInstancesClientBeginCreateOptions) (*runtime.Poller[SAPVirtualInstancesClientCreateResponse], error) {
+func (client *SAPVirtualInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, resource SAPVirtualInstance, options *SAPVirtualInstancesClientBeginCreateOptions) (*runtime.Poller[SAPVirtualInstancesClientCreateResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.create(ctx, resourceGroupName, sapVirtualInstanceName, body, options)
+ resp, err := client.create(ctx, resourceGroupName, sapVirtualInstanceName, resource, options)
if err != nil {
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPVirtualInstancesClientCreateResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
@@ -73,14 +68,14 @@ func (client *SAPVirtualInstancesClient) BeginCreate(ctx context.Context, resour
// Create - 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
-func (client *SAPVirtualInstancesClient) create(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body SAPVirtualInstance, options *SAPVirtualInstancesClientBeginCreateOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPVirtualInstancesClient) create(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, resource SAPVirtualInstance, options *SAPVirtualInstancesClientBeginCreateOptions) (*http.Response, error) {
var err error
const operationName = "SAPVirtualInstancesClient.BeginCreate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.createCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, body, options)
+ req, err := client.createCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, resource, options)
if err != nil {
return nil, err
}
@@ -96,7 +91,7 @@ func (client *SAPVirtualInstancesClient) create(ctx context.Context, resourceGro
}
// createCreateRequest creates the Create request.
-func (client *SAPVirtualInstancesClient) createCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body SAPVirtualInstance, options *SAPVirtualInstancesClientBeginCreateOptions) (*policy.Request, error) {
+func (client *SAPVirtualInstancesClient) createCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, resource SAPVirtualInstance, _ *SAPVirtualInstancesClientBeginCreateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -115,10 +110,11 @@ func (client *SAPVirtualInstancesClient) createCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
- if err := runtime.MarshalAsJSON(req, body); err != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, resource); err != nil {
return nil, err
}
return req, nil
@@ -128,7 +124,7 @@ func (client *SAPVirtualInstancesClient) createCreateRequest(ctx context.Context
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - options - SAPVirtualInstancesClientBeginDeleteOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginDelete
@@ -140,8 +136,7 @@ func (client *SAPVirtualInstancesClient) BeginDelete(ctx context.Context, resour
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPVirtualInstancesClientDeleteResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
@@ -155,7 +150,7 @@ func (client *SAPVirtualInstancesClient) BeginDelete(ctx context.Context, resour
// 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
+// Generated from API version 2024-09-01
func (client *SAPVirtualInstancesClient) deleteOperation(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPVirtualInstancesClientBeginDeleteOptions) (*http.Response, error) {
var err error
const operationName = "SAPVirtualInstancesClient.BeginDelete"
@@ -178,7 +173,7 @@ func (client *SAPVirtualInstancesClient) deleteOperation(ctx context.Context, re
}
// deleteCreateRequest creates the Delete request.
-func (client *SAPVirtualInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPVirtualInstancesClientBeginDeleteOptions) (*policy.Request, error) {
+func (client *SAPVirtualInstancesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, _ *SAPVirtualInstancesClientBeginDeleteOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -197,7 +192,7 @@ func (client *SAPVirtualInstancesClient) deleteCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -206,7 +201,7 @@ func (client *SAPVirtualInstancesClient) deleteCreateRequest(ctx context.Context
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - options - SAPVirtualInstancesClientGetOptions contains the optional parameters for the SAPVirtualInstancesClient.Get method.
@@ -233,7 +228,7 @@ func (client *SAPVirtualInstancesClient) Get(ctx context.Context, resourceGroupN
}
// getCreateRequest creates the Get request.
-func (client *SAPVirtualInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPVirtualInstancesClientGetOptions) (*policy.Request, error) {
+func (client *SAPVirtualInstancesClient) getCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, _ *SAPVirtualInstancesClientGetOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -252,7 +247,7 @@ func (client *SAPVirtualInstancesClient) getCreateRequest(ctx context.Context, r
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -267,9 +262,269 @@ func (client *SAPVirtualInstancesClient) getHandleResponse(resp *http.Response)
return result, nil
}
+// GetAvailabilityZoneDetails - 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 2024-09-01
+// - location - The name of the Azure region.
+// - body - The content of the action request
+// - options - SAPVirtualInstancesClientGetAvailabilityZoneDetailsOptions contains the optional parameters for the SAPVirtualInstancesClient.GetAvailabilityZoneDetails
+// method.
+func (client *SAPVirtualInstancesClient) GetAvailabilityZoneDetails(ctx context.Context, location string, body SAPAvailabilityZoneDetailsRequest, options *SAPVirtualInstancesClientGetAvailabilityZoneDetailsOptions) (SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse, error) {
+ var err error
+ const operationName = "SAPVirtualInstancesClient.GetAvailabilityZoneDetails"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getAvailabilityZoneDetailsCreateRequest(ctx, location, body, options)
+ if err != nil {
+ return SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse{}, err
+ }
+ resp, err := client.getAvailabilityZoneDetailsHandleResponse(httpResp)
+ return resp, err
+}
+
+// getAvailabilityZoneDetailsCreateRequest creates the GetAvailabilityZoneDetails request.
+func (client *SAPVirtualInstancesClient) getAvailabilityZoneDetailsCreateRequest(ctx context.Context, location string, body SAPAvailabilityZoneDetailsRequest, _ *SAPVirtualInstancesClientGetAvailabilityZoneDetailsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-09-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, body); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// getAvailabilityZoneDetailsHandleResponse handles the GetAvailabilityZoneDetails response.
+func (client *SAPVirtualInstancesClient) getAvailabilityZoneDetailsHandleResponse(resp *http.Response) (SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse, error) {
+ result := SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SAPAvailabilityZoneDetailsResult); err != nil {
+ return SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse{}, err
+ }
+ return result, nil
+}
+
+// GetDiskConfigurations - 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 2024-09-01
+// - location - The name of the Azure region.
+// - body - The content of the action request
+// - options - SAPVirtualInstancesClientGetDiskConfigurationsOptions contains the optional parameters for the SAPVirtualInstancesClient.GetDiskConfigurations
+// method.
+func (client *SAPVirtualInstancesClient) GetDiskConfigurations(ctx context.Context, location string, body SAPDiskConfigurationsRequest, options *SAPVirtualInstancesClientGetDiskConfigurationsOptions) (SAPVirtualInstancesClientGetDiskConfigurationsResponse, error) {
+ var err error
+ const operationName = "SAPVirtualInstancesClient.GetDiskConfigurations"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getDiskConfigurationsCreateRequest(ctx, location, body, options)
+ if err != nil {
+ return SAPVirtualInstancesClientGetDiskConfigurationsResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SAPVirtualInstancesClientGetDiskConfigurationsResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SAPVirtualInstancesClientGetDiskConfigurationsResponse{}, err
+ }
+ resp, err := client.getDiskConfigurationsHandleResponse(httpResp)
+ return resp, err
+}
+
+// getDiskConfigurationsCreateRequest creates the GetDiskConfigurations request.
+func (client *SAPVirtualInstancesClient) getDiskConfigurationsCreateRequest(ctx context.Context, location string, body SAPDiskConfigurationsRequest, _ *SAPVirtualInstancesClientGetDiskConfigurationsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-09-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, body); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// getDiskConfigurationsHandleResponse handles the GetDiskConfigurations response.
+func (client *SAPVirtualInstancesClient) getDiskConfigurationsHandleResponse(resp *http.Response) (SAPVirtualInstancesClientGetDiskConfigurationsResponse, error) {
+ result := SAPVirtualInstancesClientGetDiskConfigurationsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SAPDiskConfigurationsResult); err != nil {
+ return SAPVirtualInstancesClientGetDiskConfigurationsResponse{}, err
+ }
+ return result, nil
+}
+
+// GetSapSupportedSKU - 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 2024-09-01
+// - location - The name of the Azure region.
+// - body - The content of the action request
+// - options - SAPVirtualInstancesClientGetSapSupportedSKUOptions contains the optional parameters for the SAPVirtualInstancesClient.GetSapSupportedSKU
+// method.
+func (client *SAPVirtualInstancesClient) GetSapSupportedSKU(ctx context.Context, location string, body SAPSupportedSKUsRequest, options *SAPVirtualInstancesClientGetSapSupportedSKUOptions) (SAPVirtualInstancesClientGetSapSupportedSKUResponse, error) {
+ var err error
+ const operationName = "SAPVirtualInstancesClient.GetSapSupportedSKU"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getSapSupportedSKUCreateRequest(ctx, location, body, options)
+ if err != nil {
+ return SAPVirtualInstancesClientGetSapSupportedSKUResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SAPVirtualInstancesClientGetSapSupportedSKUResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SAPVirtualInstancesClientGetSapSupportedSKUResponse{}, err
+ }
+ resp, err := client.getSapSupportedSKUHandleResponse(httpResp)
+ return resp, err
+}
+
+// getSapSupportedSKUCreateRequest creates the GetSapSupportedSKU request.
+func (client *SAPVirtualInstancesClient) getSapSupportedSKUCreateRequest(ctx context.Context, location string, body SAPSupportedSKUsRequest, _ *SAPVirtualInstancesClientGetSapSupportedSKUOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-09-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, body); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// getSapSupportedSKUHandleResponse handles the GetSapSupportedSKU response.
+func (client *SAPVirtualInstancesClient) getSapSupportedSKUHandleResponse(resp *http.Response) (SAPVirtualInstancesClientGetSapSupportedSKUResponse, error) {
+ result := SAPVirtualInstancesClientGetSapSupportedSKUResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SAPSupportedResourceSKUsResult); err != nil {
+ return SAPVirtualInstancesClientGetSapSupportedSKUResponse{}, err
+ }
+ return result, nil
+}
+
+// GetSizingRecommendations - Gets the sizing recommendations.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-09-01
+// - location - The name of the Azure region.
+// - body - The content of the action request
+// - options - SAPVirtualInstancesClientGetSizingRecommendationsOptions contains the optional parameters for the SAPVirtualInstancesClient.GetSizingRecommendations
+// method.
+func (client *SAPVirtualInstancesClient) GetSizingRecommendations(ctx context.Context, location string, body SAPSizingRecommendationRequest, options *SAPVirtualInstancesClientGetSizingRecommendationsOptions) (SAPVirtualInstancesClientGetSizingRecommendationsResponse, error) {
+ var err error
+ const operationName = "SAPVirtualInstancesClient.GetSizingRecommendations"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getSizingRecommendationsCreateRequest(ctx, location, body, options)
+ if err != nil {
+ return SAPVirtualInstancesClientGetSizingRecommendationsResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SAPVirtualInstancesClientGetSizingRecommendationsResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SAPVirtualInstancesClientGetSizingRecommendationsResponse{}, err
+ }
+ resp, err := client.getSizingRecommendationsHandleResponse(httpResp)
+ return resp, err
+}
+
+// getSizingRecommendationsCreateRequest creates the GetSizingRecommendations request.
+func (client *SAPVirtualInstancesClient) getSizingRecommendationsCreateRequest(ctx context.Context, location string, body SAPSizingRecommendationRequest, _ *SAPVirtualInstancesClientGetSizingRecommendationsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-09-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, body); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// getSizingRecommendationsHandleResponse handles the GetSizingRecommendations response.
+func (client *SAPVirtualInstancesClient) getSizingRecommendationsHandleResponse(resp *http.Response) (SAPVirtualInstancesClientGetSizingRecommendationsResponse, error) {
+ result := SAPVirtualInstancesClientGetSizingRecommendationsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result); err != nil {
+ return SAPVirtualInstancesClientGetSizingRecommendationsResponse{}, err
+ }
+ return result, nil
+}
+
// NewListByResourceGroupPager - Gets all Virtual Instances for SAP solutions resources in a Resource Group.
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - options - SAPVirtualInstancesClientListByResourceGroupOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListByResourceGroupPager
// method.
@@ -297,7 +552,7 @@ func (client *SAPVirtualInstancesClient) NewListByResourceGroupPager(resourceGro
}
// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
-func (client *SAPVirtualInstancesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *SAPVirtualInstancesClientListByResourceGroupOptions) (*policy.Request, error) {
+func (client *SAPVirtualInstancesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *SAPVirtualInstancesClientListByResourceGroupOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -312,7 +567,7 @@ func (client *SAPVirtualInstancesClient) listByResourceGroupCreateRequest(ctx co
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -321,7 +576,7 @@ func (client *SAPVirtualInstancesClient) listByResourceGroupCreateRequest(ctx co
// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
func (client *SAPVirtualInstancesClient) listByResourceGroupHandleResponse(resp *http.Response) (SAPVirtualInstancesClientListByResourceGroupResponse, error) {
result := SAPVirtualInstancesClientListByResourceGroupResponse{}
- if err := runtime.UnmarshalAsJSON(resp, &result.SAPVirtualInstanceList); err != nil {
+ if err := runtime.UnmarshalAsJSON(resp, &result.SAPVirtualInstanceListResult); err != nil {
return SAPVirtualInstancesClientListByResourceGroupResponse{}, err
}
return result, nil
@@ -329,7 +584,7 @@ func (client *SAPVirtualInstancesClient) listByResourceGroupHandleResponse(resp
// NewListBySubscriptionPager - Gets all Virtual Instances for SAP solutions resources in a Subscription.
//
-// Generated from API version 2023-10-01-preview
+// Generated from API version 2024-09-01
// - options - SAPVirtualInstancesClientListBySubscriptionOptions contains the optional parameters for the SAPVirtualInstancesClient.NewListBySubscriptionPager
// method.
func (client *SAPVirtualInstancesClient) NewListBySubscriptionPager(options *SAPVirtualInstancesClientListBySubscriptionOptions) *runtime.Pager[SAPVirtualInstancesClientListBySubscriptionResponse] {
@@ -356,7 +611,7 @@ func (client *SAPVirtualInstancesClient) NewListBySubscriptionPager(options *SAP
}
// listBySubscriptionCreateRequest creates the ListBySubscription request.
-func (client *SAPVirtualInstancesClient) listBySubscriptionCreateRequest(ctx context.Context, options *SAPVirtualInstancesClientListBySubscriptionOptions) (*policy.Request, error) {
+func (client *SAPVirtualInstancesClient) listBySubscriptionCreateRequest(ctx context.Context, _ *SAPVirtualInstancesClientListBySubscriptionOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -367,7 +622,7 @@ func (client *SAPVirtualInstancesClient) listBySubscriptionCreateRequest(ctx con
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
return req, nil
@@ -376,7 +631,7 @@ func (client *SAPVirtualInstancesClient) listBySubscriptionCreateRequest(ctx con
// listBySubscriptionHandleResponse handles the ListBySubscription response.
func (client *SAPVirtualInstancesClient) listBySubscriptionHandleResponse(resp *http.Response) (SAPVirtualInstancesClientListBySubscriptionResponse, error) {
result := SAPVirtualInstancesClientListBySubscriptionResponse{}
- if err := runtime.UnmarshalAsJSON(resp, &result.SAPVirtualInstanceList); err != nil {
+ if err := runtime.UnmarshalAsJSON(resp, &result.SAPVirtualInstanceListResult); err != nil {
return SAPVirtualInstancesClientListBySubscriptionResponse{}, err
}
return result, nil
@@ -385,7 +640,7 @@ func (client *SAPVirtualInstancesClient) listBySubscriptionHandleResponse(resp *
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - options - SAPVirtualInstancesClientBeginStartOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginStart
@@ -397,8 +652,7 @@ func (client *SAPVirtualInstancesClient) BeginStart(ctx context.Context, resourc
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPVirtualInstancesClientStartResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
@@ -411,7 +665,7 @@ func (client *SAPVirtualInstancesClient) BeginStart(ctx context.Context, resourc
// Start - 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
+// Generated from API version 2024-09-01
func (client *SAPVirtualInstancesClient) start(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPVirtualInstancesClientBeginStartOptions) (*http.Response, error) {
var err error
const operationName = "SAPVirtualInstancesClient.BeginStart"
@@ -453,10 +707,11 @@ func (client *SAPVirtualInstancesClient) startCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Body != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, *options.Body); err != nil {
return nil, err
}
@@ -468,7 +723,7 @@ func (client *SAPVirtualInstancesClient) startCreateRequest(ctx context.Context,
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
// - options - SAPVirtualInstancesClientBeginStopOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginStop
@@ -480,8 +735,7 @@ func (client *SAPVirtualInstancesClient) BeginStop(ctx context.Context, resource
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPVirtualInstancesClientStopResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
@@ -494,7 +748,7 @@ func (client *SAPVirtualInstancesClient) BeginStop(ctx context.Context, resource
// Stop - 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
+// Generated from API version 2024-09-01
func (client *SAPVirtualInstancesClient) stop(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, options *SAPVirtualInstancesClientBeginStopOptions) (*http.Response, error) {
var err error
const operationName = "SAPVirtualInstancesClient.BeginStop"
@@ -536,10 +790,11 @@ func (client *SAPVirtualInstancesClient) stopCreateRequest(ctx context.Context,
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
if options != nil && options.Body != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
if err := runtime.MarshalAsJSON(req, *options.Body); err != nil {
return nil, err
}
@@ -551,21 +806,20 @@ func (client *SAPVirtualInstancesClient) stopCreateRequest(ctx context.Context,
// 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
+// Generated from API version 2024-09-01
// - resourceGroupName - The name of the resource group. The name is case insensitive.
// - sapVirtualInstanceName - The name of the Virtual Instances for SAP solutions resource
-// - body - Request body to update a Virtual Instance for SAP solutions resource.
+// - properties - Request body to update a Virtual Instance for SAP solutions resource.
// - options - SAPVirtualInstancesClientBeginUpdateOptions contains the optional parameters for the SAPVirtualInstancesClient.BeginUpdate
// method.
-func (client *SAPVirtualInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body UpdateSAPVirtualInstanceRequest, options *SAPVirtualInstancesClientBeginUpdateOptions) (*runtime.Poller[SAPVirtualInstancesClientUpdateResponse], error) {
+func (client *SAPVirtualInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, properties UpdateSAPVirtualInstanceRequest, options *SAPVirtualInstancesClientBeginUpdateOptions) (*runtime.Poller[SAPVirtualInstancesClientUpdateResponse], error) {
if options == nil || options.ResumeToken == "" {
- resp, err := client.update(ctx, resourceGroupName, sapVirtualInstanceName, body, options)
+ resp, err := client.update(ctx, resourceGroupName, sapVirtualInstanceName, properties, options)
if err != nil {
return nil, err
}
poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SAPVirtualInstancesClientUpdateResponse]{
- FinalStateVia: runtime.FinalStateViaLocation,
- Tracer: client.internal.Tracer(),
+ Tracer: client.internal.Tracer(),
})
return poller, err
} else {
@@ -578,14 +832,14 @@ func (client *SAPVirtualInstancesClient) BeginUpdate(ctx context.Context, resour
// Update - 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
-func (client *SAPVirtualInstancesClient) update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body UpdateSAPVirtualInstanceRequest, options *SAPVirtualInstancesClientBeginUpdateOptions) (*http.Response, error) {
+// Generated from API version 2024-09-01
+func (client *SAPVirtualInstancesClient) update(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, properties UpdateSAPVirtualInstanceRequest, options *SAPVirtualInstancesClientBeginUpdateOptions) (*http.Response, error) {
var err error
const operationName = "SAPVirtualInstancesClient.BeginUpdate"
ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
defer func() { endSpan(err) }()
- req, err := client.updateCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, body, options)
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, sapVirtualInstanceName, properties, options)
if err != nil {
return nil, err
}
@@ -601,7 +855,7 @@ func (client *SAPVirtualInstancesClient) update(ctx context.Context, resourceGro
}
// updateCreateRequest creates the Update request.
-func (client *SAPVirtualInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, body UpdateSAPVirtualInstanceRequest, options *SAPVirtualInstancesClientBeginUpdateOptions) (*policy.Request, error) {
+func (client *SAPVirtualInstancesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sapVirtualInstanceName string, properties UpdateSAPVirtualInstanceRequest, _ *SAPVirtualInstancesClientBeginUpdateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionID cannot be empty")
@@ -620,10 +874,11 @@ func (client *SAPVirtualInstancesClient) updateCreateRequest(ctx context.Context
return nil, err
}
reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
+ reqQP.Set("api-version", "2024-09-01")
req.Raw().URL.RawQuery = reqQP.Encode()
req.Raw().Header["Accept"] = []string{"application/json"}
- if err := runtime.MarshalAsJSON(req, body); err != nil {
+ req.Raw().Header["Content-Type"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, properties); err != nil {
return nil, err
}
return req, nil
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapvirtualinstances_client_example_test.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapvirtualinstances_client_example_test.go
index 98ebd270b844..de17c597f870 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapvirtualinstances_client_example_test.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/sapvirtualinstances_client_example_test.go
@@ -1,122 +1,127 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-// DO NOT EDIT.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance_test
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"
+ "log"
)
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationWithAzureComputeGalleryImage() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectDS.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationOnADistributedSystem() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("eastus2"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
- Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
- AppResourceGroup: to.Ptr("X00-RG"),
- DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ AppResourceGroup: to.Ptr("{{resourcegrp}}"),
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"),
+ 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{
- ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"),
+ 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}"),
+ AdminUsername: to.Ptr("azureuser"),
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"),
- }},
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("{{privateKey}}"),
+ PublicKey: to.Ptr("{{sshkey}}"),
},
},
},
- VMSize: to.Ptr("Standard_E32ds_v4"),
+ VMSize: to.Ptr("Standard_E4ds_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"),
+ 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{
- ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"),
+ 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}"),
+ AdminUsername: to.Ptr("azureuser"),
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"),
- }},
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("{{privateKey}}"),
+ PublicKey: to.Ptr("{{sshkey}}"),
},
},
},
- VMSize: to.Ptr("Standard_E16ds_v4"),
+ VMSize: to.Ptr("Standard_E4ds_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"),
+ 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{
- ID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"),
+ 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}"),
+ AdminUsername: to.Ptr("azureuser"),
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"),
- }},
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("{{privateKey}}"),
+ PublicKey: to.Ptr("{{sshkey}}"),
},
},
},
VMSize: to.Ptr("Standard_M32ts"),
},
},
- HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
+ IsSecondaryIPEnabled: to.Ptr(true),
},
},
+ OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ SapFqdn: to.Ptr("sap.bpaas.com"),
+ },
+ SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{
+ CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal),
+ },
},
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{
+ "created by": to.Ptr("azureuser"),
+ },
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -128,140 +133,145 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
// 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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("eastus2"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("aa-rg"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E4ds_v4"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E4ds_v4"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
+ // IsSecondaryIPEnabled: to.Ptr(true),
// },
// },
- // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("sap.bpaas.com"),
+ // },
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{
+ // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal),
// },
// },
+ // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
+ // },
+ // SystemData: &armworkloadssapvirtualinstance.SystemData{
+ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-18T18:25:55.2406546Z"); 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.1945444Z"); return t}()),
+ // LastModifiedBy: to.Ptr("f1bc9460-9d57-4c16-99a8-5a19378a3a93"),
+ // LastModifiedByType: to.Ptr(armworkloadssapvirtualinstance.CreatedByTypeApplication),
+ // },
+ // Tags: map[string]*string{
+ // "created by": to.Ptr("azureuser"),
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationWithCustomResourceNamesForDistributedSystem() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilitySet.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
+ Offer: to.Ptr("RHEL-SAP-HA"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -269,8 +279,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -281,11 +291,11 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
},
},
CentralServer: &armworkloadssapvirtualinstance.CentralServerConfiguration{
- InstanceCount: to.Ptr[int64](1),
+ 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"),
+ Offer: to.Ptr("RHEL-SAP-HA"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -293,8 +303,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -304,92 +314,13 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
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),
+ 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"),
+ Offer: to.Ptr("RHEL-SAP-HA"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -397,8 +328,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -408,17 +339,23 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
VMSize: to.Ptr("Standard_M32ts"),
},
},
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ },
},
OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
SapFqdn: to.Ptr("xyz.test.com"),
},
+ SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{
+ CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal),
+ },
},
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{
- Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"),
- },
- SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -430,222 +367,145 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
// 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"),
- // },
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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"),
// },
- // },
- // 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"),
+ // OSProfile: &armworkloadssapvirtualinstance.OSProfile{
+ // AdminUsername: to.Ptr("{your-username}"),
+ // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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")},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
// },
- // 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"),
+ // },
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
// },
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending),
- // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")),
// },
- // }
+ // },
+ // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ // },
+ // },
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
+ // },
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{
+ // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal),
+ // },
+ // },
+ // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilityZone.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
+ Offer: to.Ptr("RHEL-SAP-HA"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -653,8 +513,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -669,7 +529,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
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"),
+ Offer: to.Ptr("RHEL-SAP-HA"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -677,8 +537,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -688,142 +548,13 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
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"),
+ Offer: to.Ptr("RHEL-SAP-HA"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -831,8 +562,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -842,20 +573,23 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
VMSize: to.Ptr("Standard_M32ts"),
},
},
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
},
},
OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
SapFqdn: to.Ptr("xyz.test.com"),
},
+ SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{
+ CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal),
+ },
},
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{
- Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"),
- },
- SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -867,270 +601,274 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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")},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
// },
- // 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")),
- // },
- // }
+ // },
+ // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ // },
+ // },
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
+ // },
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.ExternalInstallationSoftwareConfiguration{
+ // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal),
+ // },
+ // },
+ // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectSingleServer.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationOnASingleServerSystem() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
- InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
AppResourceGroup: to.Ptr("X00-RG"),
- DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
- ApplicationServer: &armworkloadssapvirtualinstance.ApplicationServerConfiguration{
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ 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{
+ CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal),
+ },
+ },
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ },
+ Tags: map[string]*string{},
+ }, 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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // 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{
+ // CentralServerVMID: to.Ptr("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeExternal),
+ // },
+ // },
+ // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
+ // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDS.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForDistributedSystem() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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("westcentralus"),
+ Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ AppResourceGroup: to.Ptr("X00-RG"),
+ 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{
@@ -1143,11 +881,14 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
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"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
@@ -1155,7 +896,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
},
},
CentralServer: &armworkloadssapvirtualinstance.CentralServerConfiguration{
- InstanceCount: to.Ptr[int64](2),
+ 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{
@@ -1167,146 +908,23 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
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"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
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),
+ 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{
@@ -1318,31 +936,27 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
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"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ 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),
- },
- },
- OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
- SapFqdn: to.Ptr("xyz.test.com"),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
},
},
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{
- Name: to.Ptr("mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0"),
- },
- SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -1354,427 +968,145 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
- // },
+ // 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"),
// },
- // },
- // 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{
+ // OSProfile: &armworkloadssapvirtualinstance.OSProfile{
+ // AdminUsername: to.Ptr("{your-username}"),
+ // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
// {
- // 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"),
+ // KeyData: to.Ptr("ssh-rsa public key"),
// },
- // 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")),
- // },
- // }
-}
-
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationWithCustomResourceNamesForSingleServerSystem() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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_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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
// },
// },
// },
- // 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"),
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending),
- // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatus("Unknown")),
// },
- // }
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // },
+ // },
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationWithTrustedAccessEnabled() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsDSRecommended.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
+ 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"),
@@ -1785,8 +1117,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -1798,7 +1130,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
},
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"),
+ 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"),
@@ -1809,8 +1141,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -1821,9 +1153,55 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
},
},
DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{
- DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ 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/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet"),
+ 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"),
@@ -1834,8 +1212,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -1845,15 +1223,16 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
VMSize: to.Ptr("Standard_M32ts"),
},
},
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
},
OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
SapFqdn: to.Ptr("xyz.test.com"),
},
},
- Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- ManagedResourcesNetworkAccessType: to.Ptr(armworkloadssapvirtualinstance.ManagedResourcesNetworkAccessTypePrivate),
- SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -1865,138 +1244,182 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // },
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // 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),
+ // },
+ // },
+ // },
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
// },
- // 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"),
// },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForDistributedSystem() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilitySetRecommended.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilitySetRecommended() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
- Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
+ 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"),
@@ -2007,13 +1430,11 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForDis
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"),
- }},
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
},
},
},
@@ -2021,8 +1442,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForDis
},
},
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"),
+ 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"),
@@ -2033,13 +1454,11 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForDis
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"),
- }},
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
},
},
},
@@ -2047,9 +1466,55 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForDis
},
},
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"),
+ 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"),
@@ -2060,24 +1525,30 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForDis
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"),
- }},
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
},
},
},
VMSize: to.Ptr("Standard_M32ts"),
},
},
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ 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),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -2089,143 +1560,185 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForDis
// 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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // 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),
+ // },
+ // },
+ // },
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaSystemWithAvailabilitySet() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilityZoneRecommended.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilityZoneRecommended() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
- Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
+ 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"),
@@ -2236,13 +1749,11 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaS
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"),
- }},
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
},
},
},
@@ -2251,7 +1762,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaS
},
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"),
+ 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"),
@@ -2262,13 +1773,11 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaS
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"),
- }},
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
},
},
},
@@ -2276,40 +1785,89 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaS
},
},
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"),
- }},
+ 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),
},
},
- },
- VMSize: to.Ptr("Standard_M32ts"),
- },
- },
- HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
- },
- },
- },
- Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- },
+ "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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
+ },
+ },
+ },
+ VMSize: to.Ptr("Standard_M32ts"),
+ },
+ },
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ 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),
+ },
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -2321,230 +1879,263 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaS
// 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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // 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),
+ // },
+ // },
+ // },
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
// },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaSystemWithAvailabilityZone() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsSingleServerRecommended.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
- Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
AppLocation: to.Ptr("eastus"),
- InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
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"),
+ 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),
+ },
},
- 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"),
- }},
- },
+ "hana/data": {
+ Count: to.Ptr[int64](4),
+ SizeGB: to.Ptr[int64](128),
+ SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
},
},
- 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"),
+ "hana/log": {
+ Count: to.Ptr[int64](3),
+ SizeGB: to.Ptr[int64](128),
+ SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ },
},
- 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"),
- }},
- },
+ "hana/shared": {
+ Count: to.Ptr[int64](1),
+ SizeGB: to.Ptr[int64](256),
+ SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
},
},
- 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"),
+ "os": {
+ Count: to.Ptr[int64](1),
+ SizeGB: to.Ptr[int64](64),
+ SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ },
},
- 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"),
- }},
- },
+ "usr/sap": {
+ Count: to.Ptr[int64](1),
+ SizeGB: to.Ptr[int64](128),
+ SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
},
},
- VMSize: to.Ptr("Standard_M32ts"),
},
},
- HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ 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.SAPEnvironmentTypeProd),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -2556,84 +2147,70 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaS
// 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"),
- // }},
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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),
// },
// },
- // },
- // 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"),
- // }},
+ // "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),
// },
// },
// },
- // 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"),
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ // 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"),
@@ -2644,180 +2221,62 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaS
// 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"),
- // }},
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
// },
// },
// },
- // VMSize: to.Ptr("Standard_M32ts"),
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
// },
- // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ // 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),
// },
- // 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")),
- // },
- // }
-}
-
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForSingleServerSystem() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // },
- // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAndOsConfigurationForDistributedSystemRecommended() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilitySet.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaSystemWithAvailabilitySet() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
- Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
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"),
+ 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"),
@@ -2828,11 +2287,14 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
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"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
@@ -2840,8 +2302,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
},
},
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"),
+ 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"),
@@ -2852,11 +2314,14 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
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"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
@@ -2864,84 +2329,43 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
},
},
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"),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
VMSize: to.Ptr("Standard_M32ts"),
},
},
- },
- OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
- SapFqdn: to.Ptr("xyz.test.com"),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ },
},
},
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -2953,183 +2377,148 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
// 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"),
- // },
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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"),
// },
- // },
- // 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"),
+ // OSProfile: &armworkloadssapvirtualinstance.OSProfile{
+ // AdminUsername: to.Ptr("{your-username}"),
+ // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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),
- // },
+ // 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"),
// },
- // "usr/sap": &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
- // Count: to.Ptr[int64](1),
- // SizeGB: to.Ptr[int64](128),
- // SKU: &armworkloadssapvirtualinstance.DiskSKU{
- // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // OSProfile: &armworkloadssapvirtualinstance.OSProfile{
+ // AdminUsername: to.Ptr("{your-username}"),
+ // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAndOsConfigurationForHaSystemWithAvailabilitySetRecommended() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilityZone.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForHaSystemWithAvailabilityZone() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
- Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
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"),
+ 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"),
@@ -3140,11 +2529,14 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
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"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
@@ -3153,7 +2545,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
},
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"),
+ 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"),
@@ -3164,11 +2556,14 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
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"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
@@ -3176,55 +2571,9 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
},
},
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),
- },
- },
- },
- },
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
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"),
+ 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"),
@@ -3235,28 +2584,30 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
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"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
VMSize: to.Ptr("Standard_M32ts"),
},
},
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
},
},
- OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
- SapFqdn: to.Ptr("xyz.test.com"),
- },
},
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -3268,201 +2619,163 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
// 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"),
- // },
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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"),
// },
- // },
- // 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"),
+ // OSProfile: &armworkloadssapvirtualinstance.OSProfile{
+ // AdminUsername: to.Ptr("{your-username}"),
+ // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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),
- // },
+ // 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"),
// },
- // "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),
+ // OSProfile: &armworkloadssapvirtualinstance.OSProfile{
+ // AdminUsername: to.Ptr("{your-username}"),
+ // OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
// },
- // },
- // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAndOsConfigurationForHaSystemWithAvailabilityZoneRecommended() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsComputeGalleryImage.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationWithAzureComputeGalleryImage() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
- Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
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"),
+ 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"),
+ 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),
- SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
- PrivateKey: to.Ptr("xyz"),
- PublicKey: to.Ptr("abc"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
@@ -3471,22 +2784,22 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
},
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"),
+ 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"),
+ 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),
- SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
- PrivateKey: to.Ptr("xyz"),
- PublicKey: to.Ptr("abc"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
@@ -3494,87 +2807,40 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
},
},
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),
- },
- },
- },
- },
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
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"),
+ 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"),
+ 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),
- SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
- PrivateKey: to.Ptr("xyz"),
- PublicKey: to.Ptr("abc"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
VMSize: to.Ptr("Standard_M32ts"),
},
},
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
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),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -3586,401 +2852,136 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAn
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // },
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // VMSize: to.Ptr("Standard_E32ds_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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
// },
// },
- // 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),
// },
- // 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")),
- // },
- // }
-}
-
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithDiskAndOsConfigurationsForSingleServerSystemRecommended() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationForDistributedSystemRecommended() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesDS.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
@@ -3994,8 +2995,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4018,8 +3019,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4029,31 +3030,125 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
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"),
+ CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{
+ ApplicationServer: &armworkloadssapvirtualinstance.ApplicationServerFullResourceNames{
+ AvailabilitySetName: to.Ptr("appAvSet"),
+ VirtualMachines: []*armworkloadssapvirtualinstance.VirtualMachineResourceNames{
+ {
+ DataDiskNames: map[string][]*string{
+ "default": {
+ to.Ptr("app0disk0"),
+ },
},
- },
- },
- VMSize: to.Ptr("Standard_M32ts"),
- },
+ 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"),
+ },
+ },
+ },
+ NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
+ },
+ },
+ },
+ VMSize: to.Ptr("Standard_M32ts"),
+ },
},
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
},
OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
SapFqdn: to.Ptr("xyz.test.com"),
@@ -4062,6 +3157,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -4073,134 +3169,226 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // },
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{
+ // 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"),
+ // },
+ // },
// },
- // 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"),
+ // 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"),
// },
// },
// },
- // 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"),
+ // 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"),
+ // },
+ // },
// },
- // 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"),
+ // NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // },
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
// },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationForHaSystemWithAvailabilitySetRecommended() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilitySet.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
@@ -4214,8 +3402,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4238,8 +3426,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4249,32 +3437,187 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
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"),
+ CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{
+ 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"),
},
},
- VMSize: to.Ptr("Standard_M32ts"),
},
- },
- HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ 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"),
+ },
+ },
+ },
+ NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
+ },
+ },
+ },
+ VMSize: to.Ptr("Standard_M32ts"),
+ },
+ },
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
},
},
@@ -4285,6 +3628,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -4296,137 +3640,290 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // },
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{
+ // 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"),
+ // },
+ // },
// },
- // 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"),
+ // 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"),
// },
// },
// },
- // 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"),
+ // 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"),
+ // },
+ // },
// },
- // 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"),
+ // NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
// },
// },
- // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
// },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationForHaSystemWithAvailabilityZoneRecommended() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilityZone.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
@@ -4440,8 +3937,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4464,8 +3961,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4475,6 +3972,157 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
VMSize: to.Ptr("Standard_E16ds_v4"),
},
},
+ CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{
+ 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"),
+ },
+ },
+ },
+ NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName),
+ SharedStorage: &armworkloadssapvirtualinstance.SharedStorageResourceNames{
+ SharedStorageAccountName: to.Ptr("storageacc"),
+ SharedStorageAccountPrivateEndPointName: to.Ptr("peForxNFS"),
+ },
+ },
DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{
DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
InstanceCount: to.Ptr[int64](2),
@@ -4489,8 +4137,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4500,6 +4148,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
VMSize: to.Ptr("Standard_M32ts"),
},
},
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
},
@@ -4511,6 +4160,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -4522,138 +4172,289 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // },
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // CustomResourceNames: &armworkloadssapvirtualinstance.ThreeTierFullResourceNames{
+ // 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"),
+ // },
+ // },
// },
- // 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"),
+ // 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"),
// },
// },
// },
- // 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"),
+ // 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"),
+ // },
+ // },
// },
- // 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"),
+ // NamingPatternType: to.Ptr(armworkloadssapvirtualinstance.NamingPatternTypeFullResourceName),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
// },
// },
- // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
// },
// },
- // 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),
// },
- // 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")),
- // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConfigurationForSingleServerSystemRecommended() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesSingleServer.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
AppResourceGroup: to.Ptr("X00-RG"),
- DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
IsSecondaryIPEnabled: to.Ptr(true),
},
@@ -4668,8 +4469,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4686,6 +4487,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -4697,88 +4499,118 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOsConf
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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"),
+ // },
// },
- // 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"),
+ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // VMSize: to.Ptr("Standard_E32ds_v4"),
+ // },
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
// },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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_CreateTransport.json
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithANewSapTransportDirectoryFileshare() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsDSRecommended.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationForDistributedSystemRecommended() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
@@ -4792,8 +4624,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithANewSa
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4816,8 +4648,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithANewSa
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4841,8 +4673,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithANewSa
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -4852,13 +4684,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithANewSa
VMSize: to.Ptr("Standard_M32ts"),
},
},
- StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
- TransportFileShareConfiguration: &armworkloadssapvirtualinstance.CreateAndMountFileShareConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.ConfigurationTypeCreateAndMount),
- ResourceGroup: to.Ptr("rgName"),
- StorageAccountName: to.Ptr("storageName"),
- },
- },
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
},
OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
SapFqdn: to.Ptr("xyz.test.com"),
@@ -4867,6 +4693,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithANewSa
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -4878,141 +4705,133 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithANewSa
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
// },
- // StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
- // TransportFileShareConfiguration: &armworkloadssapvirtualinstance.CreateAndMountFileShareConfiguration{
- // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.ConfigurationTypeCreateAndMount),
- // ResourceGroup: to.Ptr("rgName"),
- // StorageAccountName: to.Ptr("storageName"),
- // },
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
// },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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_MountTransport.json
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExistingSapTransportDirectoryFileshare() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilitySetRecommended.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationForHaSystemWithAvailabilitySetRecommended() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
@@ -5026,8 +4845,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExis
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -5038,7 +4857,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExis
},
},
CentralServer: &armworkloadssapvirtualinstance.CentralServerConfiguration{
- InstanceCount: to.Ptr[int64](1),
+ 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{
@@ -5050,8 +4869,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExis
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -5063,7 +4882,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExis
},
DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{
DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
- InstanceCount: to.Ptr[int64](1),
+ 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{
@@ -5075,8 +4894,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExis
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -5086,12 +4905,9 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExis
VMSize: to.Ptr("Standard_M32ts"),
},
},
- StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
- TransportFileShareConfiguration: &armworkloadssapvirtualinstance.MountFileShareConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.ConfigurationTypeMount),
- ID: to.Ptr("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"),
- PrivateEndpointID: to.Ptr("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"),
- },
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
},
},
OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
@@ -5101,6 +4917,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExis
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -5112,141 +4929,136 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExis
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
// },
- // },
- // StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
- // TransportFileShareConfiguration: &armworkloadssapvirtualinstance.MountFileShareConfiguration{
- // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.ConfigurationTypeMount),
- // ID: to.Ptr("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"),
- // PrivateEndpointID: to.Ptr("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"),
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
// },
// },
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
+ // },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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_SkipTransport.json
-func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASapTransportDirectoryFileshare() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilityZoneRecommended.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationForHaSystemWithAvailabilityZoneRecommended() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
@@ -5260,8 +5072,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASa
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -5272,7 +5084,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASa
},
},
CentralServer: &armworkloadssapvirtualinstance.CentralServerConfiguration{
- InstanceCount: to.Ptr[int64](1),
+ 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{
@@ -5284,8 +5096,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASa
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -5297,7 +5109,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASa
},
DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{
DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
- InstanceCount: to.Ptr[int64](1),
+ 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{
@@ -5309,8 +5121,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASa
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -5320,10 +5132,9 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASa
VMSize: to.Ptr("Standard_M32ts"),
},
},
- StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
- TransportFileShareConfiguration: &armworkloadssapvirtualinstance.SkipFileShareConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.ConfigurationTypeSkip),
- },
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
},
},
OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
@@ -5333,6 +5144,7 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASa
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -5344,228 +5156,171 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASa
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // },
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // VMSize: to.Ptr("Standard_E32ds_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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
+ // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
// },
// },
- // 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"),
- // },
- // },
- // StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
- // TransportFileShareConfiguration: &armworkloadssapvirtualinstance.SkipFileShareConfiguration{
- // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.ConfigurationTypeSkip),
- // },
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
// },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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")),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationOnADistributedSystem() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsSIngleServerRecommended.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationForSingleServerSystemRecommended() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
- },
+ Location: to.Ptr("westcentralus"),
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"),
- },
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
+ AppResourceGroup: to.Ptr("X00-RG"),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
+ IsSecondaryIPEnabled: to.Ptr(true),
},
- 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"),
+ 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"),
},
- },
- 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}}"),
- },
+ OSProfile: &armworkloadssapvirtualinstance.OSProfile{
+ AdminUsername: to.Ptr("{your-username}"),
+ OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
},
},
- VMSize: to.Ptr("Standard_M32ts"),
},
- },
- NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
- IsSecondaryIPEnabled: to.Ptr(true),
+ VMSize: to.Ptr("Standard_E32ds_v4"),
},
},
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"),
+ SapFqdn: to.Ptr("xyz.test.com"),
},
},
- Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -5577,147 +5332,96 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
+ // IsSecondaryIPEnabled: to.Ptr(true),
// },
- // },
- // 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"),
+ // 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"),
+ // Offer: to.Ptr("RHEL-SAP"),
// Publisher: to.Ptr("RedHat"),
// SKU: to.Ptr("84sapha-gen2"),
// Version: to.Ptr("latest"),
// },
// OSProfile: &armworkloadssapvirtualinstance.OSProfile{
- // AdminUsername: to.Ptr("azureuser"),
+ // AdminUsername: to.Ptr("{your-username}"),
// 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"),
+ // PublicKey: to.Ptr("abc"),
// },
// },
// },
- // VMSize: to.Ptr("Standard_M32ts"),
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
// },
- // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
- // IsSecondaryIPEnabled: to.Ptr(true),
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
// },
// },
- // 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.SAPEnvironmentTypeNonProd),
+ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown),
+ // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationOnASingleServerSystem() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraSingleServer.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureOnlyForSingleServerSystem() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
- Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
AppResourceGroup: to.Ptr("X00-RG"),
- DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
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"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -5725,28 +5429,25 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
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"),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ {
+ KeyData: to.Ptr("ssh-rsa public key"),
+ },
+ },
},
},
},
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),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -5758,96 +5459,91 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.SingleServerConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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),
+ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown),
+ // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithExistingFileshare.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithAnExistingSapTransportDirectoryFileshare() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -5855,8 +5551,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -5867,11 +5563,11 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
},
},
CentralServer: &armworkloadssapvirtualinstance.CentralServerConfiguration{
- InstanceCount: to.Ptr[int64](2),
+ 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-HA"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -5879,8 +5575,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -5892,11 +5588,11 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
},
DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{
DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
- InstanceCount: to.Ptr[int64](2),
+ 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-HA"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -5904,8 +5600,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -5915,21 +5611,23 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
VMSize: to.Ptr("Standard_M32ts"),
},
},
- HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
+ TransportFileShareConfiguration: &armworkloadssapvirtualinstance.MountFileShareConfiguration{
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.FileShareConfigurationTypeMount),
+ ID: to.Ptr("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"),
+ PrivateEndpointID: to.Ptr("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"),
+ },
},
},
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),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -5941,145 +5639,146 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
+ // TransportFileShareConfiguration: &armworkloadssapvirtualinstance.MountFileShareConfiguration{
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.FileShareConfigurationTypeMount),
+ // ID: to.Ptr("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"),
+ // PrivateEndpointID: to.Ptr("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
// },
// },
- // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
// },
// },
- // 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),
+ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown),
+ // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithNewFileshare.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithANewSapTransportDirectoryFileshare() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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{},
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
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"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -6087,8 +5786,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -6099,11 +5798,11 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
},
},
CentralServer: &armworkloadssapvirtualinstance.CentralServerConfiguration{
- InstanceCount: to.Ptr[int64](2),
+ 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-HA"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -6111,8 +5810,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -6124,11 +5823,11 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
},
DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{
DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
- InstanceCount: to.Ptr[int64](2),
+ 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-HA"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
SKU: to.Ptr("84sapha-gen2"),
Version: to.Ptr("latest"),
@@ -6136,8 +5835,8 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
PrivateKey: to.Ptr("xyz"),
PublicKey: to.Ptr("abc"),
@@ -6147,21 +5846,23 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
VMSize: to.Ptr("Standard_M32ts"),
},
},
- HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
+ TransportFileShareConfiguration: &armworkloadssapvirtualinstance.CreateAndMountFileShareConfiguration{
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.FileShareConfigurationTypeCreateAndMount),
+ ResourceGroup: to.Ptr("rgName"),
+ StorageAccountName: to.Ptr("storageName"),
+ },
},
},
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),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -6173,230 +5874,451 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_detectSapSoftwareInstallationO
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
+ // TransportFileShareConfiguration: &armworkloadssapvirtualinstance.CreateAndMountFileShareConfiguration{
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.FileShareConfigurationTypeCreateAndMount),
+ // ResourceGroup: to.Ptr("rgName"),
+ // StorageAccountName: to.Ptr("storageName"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
// },
// },
- // HighAvailabilityConfig: &armworkloadssapvirtualinstance.HighAvailabilityConfiguration{
- // HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("xyz.test.com"),
// },
// },
- // 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),
+ // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateUnknown),
+ // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationPending),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_installSapSoftwareOnDistributedSystem() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithOsTrustedAccess.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithOSConfigurationWithTrustedAccessEnabled() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
- },
+ Location: to.Ptr("westcentralus"),
Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
- ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
- AppResourceGroup: to.Ptr("{{resourcegrp}}"),
- DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ AppResourceGroup: to.Ptr("X00-RG"),
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"),
+ 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"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
- SKU: to.Ptr("8.2"),
- Version: to.Ptr("8.2.2021091201"),
+ SKU: to.Ptr("84sapha-gen2"),
+ Version: to.Ptr("latest"),
},
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
- AdminUsername: to.Ptr("azureuser"),
+ AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
- PrivateKey: to.Ptr("{{privateKey}}"),
- PublicKey: to.Ptr("{{sshkey}}"),
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
},
},
},
- VMSize: to.Ptr("Standard_E4ds_v4"),
+ VMSize: to.Ptr("Standard_E32ds_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"),
+ 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"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
- SKU: to.Ptr("8.2"),
- Version: to.Ptr("8.2.2021091201"),
+ SKU: to.Ptr("84sapha-gen2"),
+ Version: to.Ptr("latest"),
},
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
- AdminUsername: to.Ptr("azureuser"),
+ AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
- PrivateKey: to.Ptr("{{privateKey}}"),
- PublicKey: to.Ptr("{{sshkey}}"),
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
},
},
},
- VMSize: to.Ptr("Standard_E4ds_v4"),
+ VMSize: to.Ptr("Standard_E16ds_v4"),
},
},
DatabaseServer: &armworkloadssapvirtualinstance.DatabaseConfiguration{
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
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"),
+ 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"),
+ Offer: to.Ptr("RHEL-SAP"),
Publisher: to.Ptr("RedHat"),
- SKU: to.Ptr("8.2"),
- Version: to.Ptr("8.2.2021091201"),
+ SKU: to.Ptr("84sapha-gen2"),
+ Version: to.Ptr("latest"),
},
OSProfile: &armworkloadssapvirtualinstance.OSProfile{
- AdminUsername: to.Ptr("azureuser"),
+ AdminUsername: to.Ptr("{your-username}"),
OSConfiguration: &armworkloadssapvirtualinstance.LinuxConfiguration{
- OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
- PrivateKey: to.Ptr("{{privateKey}}"),
- PublicKey: to.Ptr("{{sshkey}}"),
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
},
},
},
VMSize: to.Ptr("Standard_M32ts"),
},
},
- NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
- IsSecondaryIPEnabled: to.Ptr(true),
- },
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
},
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"),
+ SapFqdn: to.Ptr("xyz.test.com"),
+ },
+ },
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ ManagedResourcesNetworkAccessType: to.Ptr(armworkloadssapvirtualinstance.ManagedResourcesNetworkAccessTypePrivate),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ },
+ Tags: map[string]*string{},
+ }, 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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // },
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithoutFileshare.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_createInfrastructureWithoutASapTransportDirectoryFileshare() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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("westcentralus"),
+ Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ AppResourceGroup: to.Ptr("X00-RG"),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("xyz"),
+ PublicKey: to.Ptr("abc"),
+ },
+ },
+ },
+ VMSize: to.Ptr("Standard_M32ts"),
+ },
+ },
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
+ TransportFileShareConfiguration: &armworkloadssapvirtualinstance.SkipFileShareConfiguration{
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.FileShareConfigurationTypeSkip),
+ },
+ },
+ },
+ OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ SapFqdn: to.Ptr("xyz.test.com"),
},
},
Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
},
+ Tags: map[string]*string{},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
@@ -6408,945 +6330,2361 @@ func ExampleSAPVirtualInstancesClient_BeginCreate_installSapSoftwareOnDistribute
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_E32ds_v4"),
// },
- // 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"),
+ // },
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_E16ds_v4"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_M32ts"),
// },
- // 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"),
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // StorageConfiguration: &armworkloadssapvirtualinstance.StorageConfiguration{
+ // TransportFileShareConfiguration: &armworkloadssapvirtualinstance.SkipFileShareConfiguration{
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.FileShareConfigurationTypeSkip),
+ // },
+ // },
+ // },
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallDS.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_installSapSoftwareOnDistributedSystem() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
+ Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ AppResourceGroup: to.Ptr("{{resourcegrp}}"),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ PrivateKey: to.Ptr("{{privateKey}}"),
+ PublicKey: to.Ptr("{{sshkey}}"),
+ },
+ },
+ },
+ VMSize: to.Ptr("Standard_M32ts"),
+ },
+ },
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
+ IsSecondaryIPEnabled: to.Ptr(true),
+ },
+ },
+ OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ SapFqdn: to.Ptr("sap.bpaas.com"),
+ },
+ SoftwareConfiguration: &armworkloadssapvirtualinstance.SAPInstallWithoutOSConfigSoftwareConfiguration{
+ 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"),
+ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig),
+ SoftwareVersion: to.Ptr("SAP S/4HANA 1909 SPS 03"),
+ },
+ },
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ },
+ Tags: map[string]*string{
+ "created by": to.Ptr("azureuser"),
+ },
+ }, 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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("eastus2"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("aa-rg"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
+ // IsSecondaryIPEnabled: to.Ptr(true),
+ // },
+ // },
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("sap.bpaas.com"),
+ // },
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.SAPInstallWithoutOSConfigSoftwareConfiguration{
+ // 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"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig),
+ // SoftwareVersion: to.Ptr("SAP S/4HANA 1909 SPS 03"),
+ // },
+ // },
+ // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationInProgress),
+ // },
+ // SystemData: &armworkloadssapvirtualinstance.SystemData{
+ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-18T18:25:55.2406546Z"); 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.1945444Z"); return t}()),
+ // LastModifiedBy: to.Ptr("f1bc9460-9d57-4c16-99a8-5a19378a3a93"),
+ // LastModifiedByType: to.Ptr(armworkloadssapvirtualinstance.CreatedByTypeApplication),
+ // },
+ // Tags: map[string]*string{
+ // "created by": to.Ptr("azureuser"),
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallSingleServer.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_installSapSoftwareOnSingleServerSystem() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
+ Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ AppLocation: to.Ptr("eastus"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ 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{
+ DisablePasswordAuthentication: to.Ptr(true),
+ OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ 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{
+ 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"),
+ SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig),
+ SoftwareVersion: to.Ptr("SAP S/4HANA 1909 SPS 03"),
+ },
+ },
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ },
+ Tags: map[string]*string{},
+ }, 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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("eastus2"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentWithOSConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeploymentWithOSConfig),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("aa-rg"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("ssh-rsa AAA generated-by-azure"),
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_M32ts"),
+ // },
+ // },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
+ // IsSecondaryIPEnabled: to.Ptr(true),
+ // },
+ // },
+ // OSSapConfiguration: &armworkloadssapvirtualinstance.OsSapConfiguration{
+ // SapFqdn: to.Ptr("sap.bpaas.com"),
+ // },
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.SAPInstallWithoutOSConfigSoftwareConfiguration{
+ // 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"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeSAPInstallWithoutOSConfig),
+ // SoftwareVersion: to.Ptr("SAP S/4HANA 1909 SPS 03"),
+ // },
+ // },
+ // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationInProgress),
+ // },
+ // SystemData: &armworkloadssapvirtualinstance.SystemData{
+ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-08-18T18:25:55.2406546Z"); 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.1945444Z"); return t}()),
+ // LastModifiedBy: to.Ptr("f1bc9460-9d57-4c16-99a8-5a19378a3a93"),
+ // LastModifiedByType: to.Ptr(armworkloadssapvirtualinstance.CreatedByTypeApplication),
+ // },
+ // Tags: map[string]*string{
+ // "created by": to.Ptr("azureuser"),
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutions.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_registerExistingSapSystemAsVirtualInstanceForSapSolutions() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
+ Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{
+ CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDiscovery),
+ },
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ },
+ Tags: map[string]*string{
+ "createdby": to.Ptr("abc@microsoft.com"),
+ "test": to.Ptr("abc"),
+ },
+ }, 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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("northeurope"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{
+ // AppLocation: to.Ptr("westeurope"),
+ // CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg-infra/providers/Microsoft.Compute/virtualMachines/q20ascsvm0"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDiscovery),
+ // },
+ // 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),
+ // },
+ // SystemData: &armworkloadssapvirtualinstance.SystemData{
+ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-27T08:22:52.3318907Z"); 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.9310503Z"); return t}()),
+ // LastModifiedBy: to.Ptr("abc@microsoft.com"),
+ // LastModifiedByType: to.Ptr(armworkloadssapvirtualinstance.CreatedByTypeUser),
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutionsCustom.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
+ Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{
+ CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDiscovery),
+ ManagedRgStorageAccountName: to.Ptr("q20saacssgrs"),
+ },
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ },
+ Tags: map[string]*string{
+ "createdby": to.Ptr("abc@microsoft.com"),
+ "test": to.Ptr("abc"),
+ },
+ }, 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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("northeurope"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{
+ // AppLocation: to.Ptr("westeurope"),
+ // CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg-infra/providers/Microsoft.Compute/virtualMachines/q20ascsvm0"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDiscovery),
+ // 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),
+ // },
+ // SystemData: &armworkloadssapvirtualinstance.SystemData{
+ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-27T08:22:52.3318907Z"); 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.9310503Z"); return t}()),
+ // LastModifiedBy: to.Ptr("abc@microsoft.com"),
+ // LastModifiedByType: to.Ptr(armworkloadssapvirtualinstance.CreatedByTypeUser),
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterWithTrustedAccess.json
+func ExampleSAPVirtualInstancesClient_BeginCreate_registerWithTrustedAccessEnabled() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
+ Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{
+ CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0"),
+ ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDiscovery),
+ },
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
+ ManagedResourcesNetworkAccessType: to.Ptr(armworkloadssapvirtualinstance.ManagedResourcesNetworkAccessTypePrivate),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ },
+ Tags: map[string]*string{
+ "createdby": to.Ptr("abc@microsoft.com"),
+ "test": to.Ptr("abc"),
+ },
+ }, 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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientCreateResponse{
+ // 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"),
+ // Location: to.Ptr("northeurope"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DiscoveryConfiguration{
+ // AppLocation: to.Ptr("westeurope"),
+ // CentralServerVMID: to.Ptr("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg-infra/providers/Microsoft.Compute/virtualMachines/q20ascsvm0"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDiscovery),
+ // },
+ // 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),
+ // },
+ // SystemData: &armworkloadssapvirtualinstance.SystemData{
+ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-07-27T08:22:52.3318907Z"); 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.9310503Z"); return t}()),
+ // LastModifiedBy: to.Ptr("abc@microsoft.com"),
+ // LastModifiedByType: to.Ptr(armworkloadssapvirtualinstance.CreatedByTypeUser),
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_Delete.json
+func ExampleSAPVirtualInstancesClient_BeginDelete() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", 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)
+ }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json
+func ExampleSAPVirtualInstancesClient_Get_sapVirtualInstancesGet() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
+ // },
+ // },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
+ // },
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
// },
- // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
- // IsSecondaryIPEnabled: to.Ptr(true),
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{
+ // 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"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeServiceInitiated),
+ // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"),
// },
// },
- // 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),
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationInProgress),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_installSapSoftwareOnSingleServerSystem() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json
+func ExampleSAPVirtualInstancesClient_Get_sapVirtualInstancesGetWithAcssInstallationBlocked() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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)
+ res, err := clientFactory.NewSAPVirtualInstancesClient().Get(ctx, "test-rg", "X00", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
- res, err := poller.PollUntilDone(ctx, nil)
- if err != nil {
- log.Fatalf("failed to pull the result: %v", err)
- }
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
- // res.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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetResponse{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSH: &armworkloadssapvirtualinstance.SSHConfiguration{
+ // PublicKeys: []*armworkloadssapvirtualinstance.SSHPublicKey{
+ // {
+ // KeyData: to.Ptr("ssh-rsa public key"),
+ // },
+ // },
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // VMSize: to.Ptr("Standard_M32ts"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
// },
- // NetworkConfiguration: &armworkloadssapvirtualinstance.NetworkConfiguration{
- // IsSecondaryIPEnabled: to.Ptr(true),
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{
+ // 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"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeServiceInitiated),
+ // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"),
// },
// },
- // 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),
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateSoftwareInstallationInProgress),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_eastus.json
+func ExampleSAPVirtualInstancesClient_GetAvailabilityZoneDetails_sapAvailabilityZoneDetailsInEastUs() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetAvailabilityZoneDetails(ctx, "eastus", armworkloadssapvirtualinstance.SAPAvailabilityZoneDetailsRequest{
+ AppLocation: to.Ptr("eastus"),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
- res, err := poller.PollUntilDone(ctx, nil)
+ // 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.SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse{
+ // SAPAvailabilityZoneDetailsResult: &armworkloadssapvirtualinstance.SAPAvailabilityZoneDetailsResult{
+ // AvailabilityZonePairs: []*armworkloadssapvirtualinstance.SAPAvailabilityZonePair{
+ // {
+ // ZoneA: to.Ptr[int64](1),
+ // ZoneB: to.Ptr[int64](2),
+ // },
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_northeurope.json
+func ExampleSAPVirtualInstancesClient_GetAvailabilityZoneDetails_sapAvailabilityZoneDetailsInNorthEurope() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
- log.Fatalf("failed to pull the result: %v", err)
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetAvailabilityZoneDetails(ctx, "northeurope", armworkloadssapvirtualinstance.SAPAvailabilityZoneDetailsRequest{
+ AppLocation: to.Ptr("northeurope"),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ }, 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("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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetAvailabilityZoneDetailsResponse{
+ // SAPAvailabilityZoneDetailsResult: &armworkloadssapvirtualinstance.SAPAvailabilityZoneDetailsResult{
+ // AvailabilityZonePairs: []*armworkloadssapvirtualinstance.SAPAvailabilityZonePair{
+ // {
+ // ZoneA: to.Ptr[int64](2),
+ // ZoneB: to.Ptr[int64](3),
+ // },
// },
- // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
- // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy),
- // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{
- // Name: to.Ptr("mrg-Q20-5b0097"),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_NonProd.json
+func ExampleSAPVirtualInstancesClient_GetDiskConfigurations_sapDiskConfigurationsForInputEnvironmentNonProd() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetDiskConfigurations(ctx, "centralus", armworkloadssapvirtualinstance.SAPDiskConfigurationsRequest{
+ AppLocation: to.Ptr("eastus"),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ DbVMSKU: to.Ptr("Standard_M32ts"),
+ }, 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.SAPVirtualInstancesClientGetDiskConfigurationsResponse{
+ // SAPDiskConfigurationsResult: &armworkloadssapvirtualinstance.SAPDiskConfigurationsResult{
+ // VolumeConfigurations: map[string]*armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // "hana/data": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // Count: to.Ptr[int64](4),
+ // SizeGB: to.Ptr[int64](128),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](4),
+ // MaximumSupportedDiskCount: to.Ptr[int64](5),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // },
+ // },
+ // "hana/log": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // Count: to.Ptr[int64](3),
+ // SizeGB: to.Ptr[int64](128),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](3),
+ // MaximumSupportedDiskCount: to.Ptr[int64](5),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // },
+ // },
+ // "hana/shared": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // Count: to.Ptr[int64](1),
+ // SizeGB: to.Ptr[int64](256),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](256),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](1100),
+ // MbpsReadWrite: to.Ptr[int64](125),
+ // DiskTier: to.Ptr("P15"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](512),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](2300),
+ // MbpsReadWrite: to.Ptr[int64](150),
+ // DiskTier: to.Ptr("P20"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](1024),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](5000),
+ // MbpsReadWrite: to.Ptr[int64](200),
+ // DiskTier: to.Ptr("P30"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](2048),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](7500),
+ // MbpsReadWrite: to.Ptr[int64](250),
+ // DiskTier: to.Ptr("P40"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](4096),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](7500),
+ // MbpsReadWrite: to.Ptr[int64](250),
+ // DiskTier: to.Ptr("P50"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](256),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E15"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](512),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E20"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](1024),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E30"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](2048),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E40"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](4096),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E50"),
+ // },
+ // },
+ // },
+ // "usr/sap": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // Count: to.Ptr[int64](1),
+ // SizeGB: to.Ptr[int64](128),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](256),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](1100),
+ // MbpsReadWrite: to.Ptr[int64](125),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](512),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](2300),
+ // MbpsReadWrite: to.Ptr[int64](150),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](256),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E15"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](512),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E20"),
+ // },
+ // },
+ // },
+ // "os": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // Count: to.Ptr[int64](1),
+ // SizeGB: to.Ptr[int64](64),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](64),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](240),
+ // MbpsReadWrite: to.Ptr[int64](50),
+ // DiskTier: to.Ptr("P6"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](64),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("P6"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // },
+ // },
+ // "backup": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // Count: to.Ptr[int64](2),
+ // SizeGB: to.Ptr[int64](256),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](0),
+ // MaximumSupportedDiskCount: to.Ptr[int64](6),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](256),
+ // MinimumSupportedDiskCount: to.Ptr[int64](0),
+ // MaximumSupportedDiskCount: to.Ptr[int64](6),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E15"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNameStandardSSDLRS),
+ // },
+ // SizeGB: to.Ptr[int64](512),
+ // MinimumSupportedDiskCount: to.Ptr[int64](0),
+ // MaximumSupportedDiskCount: to.Ptr[int64](6),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](60),
+ // DiskTier: to.Ptr("E20"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](0),
+ // MaximumSupportedDiskCount: to.Ptr[int64](6),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](256),
+ // MinimumSupportedDiskCount: to.Ptr[int64](0),
+ // MaximumSupportedDiskCount: to.Ptr[int64](6),
+ // IopsReadWrite: to.Ptr[int64](1100),
+ // MbpsReadWrite: to.Ptr[int64](125),
+ // DiskTier: to.Ptr("P15"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](512),
+ // MinimumSupportedDiskCount: to.Ptr[int64](0),
+ // MaximumSupportedDiskCount: to.Ptr[int64](6),
+ // IopsReadWrite: to.Ptr[int64](2300),
+ // MbpsReadWrite: to.Ptr[int64](150),
+ // DiskTier: to.Ptr("P20"),
+ // },
+ // },
+ // },
// },
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
- // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_registerExistingSapSystemAsVirtualInstanceForSapSolutions() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_Prod.json
+func ExampleSAPVirtualInstancesClient_GetDiskConfigurations_sapDiskConfigurationsForInputEnvironmentProd() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetDiskConfigurations(ctx, "centralus", armworkloadssapvirtualinstance.SAPDiskConfigurationsRequest{
+ AppLocation: to.Ptr("eastus"),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ DbVMSKU: to.Ptr("Standard_M32ts"),
}, 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetDiskConfigurationsResponse{
+ // SAPDiskConfigurationsResult: &armworkloadssapvirtualinstance.SAPDiskConfigurationsResult{
+ // VolumeConfigurations: map[string]*armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // "hana/data": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // Count: to.Ptr[int64](4),
+ // SizeGB: to.Ptr[int64](128),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](4),
+ // MaximumSupportedDiskCount: to.Ptr[int64](5),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // },
+ // },
+ // "hana/log": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // Count: to.Ptr[int64](3),
+ // SizeGB: to.Ptr[int64](128),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](3),
+ // MaximumSupportedDiskCount: to.Ptr[int64](5),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // },
+ // },
+ // "hana/shared": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // Count: to.Ptr[int64](1),
+ // SizeGB: to.Ptr[int64](256),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](256),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](1100),
+ // MbpsReadWrite: to.Ptr[int64](125),
+ // DiskTier: to.Ptr("P15"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](512),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](2300),
+ // MbpsReadWrite: to.Ptr[int64](150),
+ // DiskTier: to.Ptr("P20"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](1024),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](5000),
+ // MbpsReadWrite: to.Ptr[int64](200),
+ // DiskTier: to.Ptr("P30"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](2048),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](7500),
+ // MbpsReadWrite: to.Ptr[int64](250),
+ // DiskTier: to.Ptr("P40"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](4096),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](7500),
+ // MbpsReadWrite: to.Ptr[int64](250),
+ // DiskTier: to.Ptr("P50"),
+ // },
+ // },
+ // },
+ // "usr/sap": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // Count: to.Ptr[int64](1),
+ // SizeGB: to.Ptr[int64](128),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](256),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](1100),
+ // MbpsReadWrite: to.Ptr[int64](125),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](512),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](2300),
+ // MbpsReadWrite: to.Ptr[int64](150),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // },
+ // },
+ // "os": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // Count: to.Ptr[int64](1),
+ // SizeGB: to.Ptr[int64](64),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](64),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](240),
+ // MbpsReadWrite: to.Ptr[int64](50),
+ // DiskTier: to.Ptr("P6"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](1),
+ // MaximumSupportedDiskCount: to.Ptr[int64](1),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // },
+ // },
+ // "backup": &armworkloadssapvirtualinstance.SAPDiskConfiguration{
+ // RecommendedConfiguration: &armworkloadssapvirtualinstance.DiskVolumeConfiguration{
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // Count: to.Ptr[int64](2),
+ // SizeGB: to.Ptr[int64](256),
+ // },
+ // SupportedConfigurations: []*armworkloadssapvirtualinstance.DiskDetails{
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](128),
+ // MinimumSupportedDiskCount: to.Ptr[int64](0),
+ // MaximumSupportedDiskCount: to.Ptr[int64](6),
+ // IopsReadWrite: to.Ptr[int64](500),
+ // MbpsReadWrite: to.Ptr[int64](100),
+ // DiskTier: to.Ptr("P10"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](256),
+ // MinimumSupportedDiskCount: to.Ptr[int64](0),
+ // MaximumSupportedDiskCount: to.Ptr[int64](6),
+ // IopsReadWrite: to.Ptr[int64](1100),
+ // MbpsReadWrite: to.Ptr[int64](125),
+ // DiskTier: to.Ptr("P15"),
+ // },
+ // {
+ // SKU: &armworkloadssapvirtualinstance.DiskSKU{
+ // Name: to.Ptr(armworkloadssapvirtualinstance.DiskSKUNamePremiumLRS),
+ // },
+ // SizeGB: to.Ptr[int64](512),
+ // MinimumSupportedDiskCount: to.Ptr[int64](0),
+ // MaximumSupportedDiskCount: to.Ptr[int64](6),
+ // IopsReadWrite: to.Ptr[int64](2300),
+ // MbpsReadWrite: to.Ptr[int64](150),
+ // DiskTier: to.Ptr("P20"),
+ // },
+ // },
+ // },
// },
- // ProvisioningState: to.Ptr(armworkloadssapvirtualinstance.SapVirtualInstanceProvisioningStateSucceeded),
- // SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
- // State: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStateRegistrationComplete),
- // Status: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceStatusRunning),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginCreate_registerWithTrustedAccessEnabled() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_Distributed.json
+func ExampleSAPVirtualInstancesClient_GetSapSupportedSKU_sapSupportedSkUsForDistributedNonHaEnvironment() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetSapSupportedSKU(ctx, "centralus", armworkloadssapvirtualinstance.SAPSupportedSKUsRequest{
+ AppLocation: to.Ptr("eastus"),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
}, 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetSapSupportedSKUResponse{
+ // 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"),
+ // },
// },
- // 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),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_Get_sapVirtualInstancesGetWithAcssInstallationBlocked() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvSet.json
+func ExampleSAPVirtualInstancesClient_GetSapSupportedSKU_sapSupportedSkUsForDistributedHaEnvironmentWithAvailabilitySet() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
- res, err := clientFactory.NewSAPVirtualInstancesClient().Get(ctx, "test-rg", "X00", nil)
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetSapSupportedSKU(ctx, "centralus", armworkloadssapvirtualinstance.SAPSupportedSKUsRequest{
+ AppLocation: to.Ptr("eastus"),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ }, 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"),
- // },
- // },
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetSapSupportedSKUResponse{
+ // SAPSupportedResourceSKUsResult: &armworkloadssapvirtualinstance.SAPSupportedResourceSKUsResult{
+ // SupportedSKUs: []*armworkloadssapvirtualinstance.SAPSupportedSKU{
+ // {
+ // IsAppServerCertified: to.Ptr(true),
+ // IsDatabaseCertified: to.Ptr(false),
+ // VMSKU: to.Ptr("Standard_E4ds_v4"),
// },
- // 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"),
+ // {
+ // 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"),
// },
// },
- // 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),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_Get_sapVirtualInstancesGet() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvZone.json
+func ExampleSAPVirtualInstancesClient_GetSapSupportedSKU_sapSupportedSkusForHaWithAvailabilityZone() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
- res, err := clientFactory.NewSAPVirtualInstancesClient().Get(ctx, "test-rg", "X00", nil)
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetSapSupportedSKU(ctx, "centralus", armworkloadssapvirtualinstance.SAPSupportedSKUsRequest{
+ AppLocation: to.Ptr("eastus"),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ }, 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"),
- // },
- // },
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetSapSupportedSKUResponse{
+ // 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"),
// },
- // 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"),
+ // {
+ // IsAppServerCertified: to.Ptr(true),
+ // IsDatabaseCertified: to.Ptr(true),
+ // VMSKU: to.Ptr("Standard_M416s_v2"),
// },
// },
- // 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),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginUpdate_sapVirtualInstancesTrustedAccessEnableUpdate() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_SingleServer.json
+func ExampleSAPVirtualInstancesClient_GetSapSupportedSKU_sapSupportedSkUsForSingleServer() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
- },
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetSapSupportedSKU(ctx, "centralus", armworkloadssapvirtualinstance.SAPSupportedSKUsRequest{
+ AppLocation: to.Ptr("eastus"),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
}, 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetSapSupportedSKUResponse{
+ // 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"),
+ // },
// },
- // 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),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginUpdate_sapVirtualInstancesUpdate() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_Distributed.json
+func ExampleSAPVirtualInstancesClient_GetSizingRecommendations_sapSizingRecommendationsForNonHaDistributedSystem() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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"),
- },
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetSizingRecommendations(ctx, "centralus", armworkloadssapvirtualinstance.SAPSizingRecommendationRequest{
+ AppLocation: to.Ptr("eastus"),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ Saps: to.Ptr[int64](20000),
+ DbMemory: to.Ptr[int64](1024),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DbScaleMethod: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseScaleMethodScaleUp),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
- res, err := poller.PollUntilDone(ctx, nil)
+ // 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.SAPVirtualInstancesClientGetSizingRecommendationsResponse{
+ // ThreeTierRecommendationResult: &armworkloadssapvirtualinstance.ThreeTierRecommendationResult{
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // ApplicationServerVMSKU: to.Ptr("Standard_E8ds_v4"),
+ // ApplicationServerInstanceCount: to.Ptr[int64](2),
+ // CentralServerVMSKU: to.Ptr("Standard_E4ds_v4"),
+ // CentralServerInstanceCount: to.Ptr[int64](1),
+ // DbVMSKU: to.Ptr("Standard_M64s"),
+ // DatabaseInstanceCount: to.Ptr[int64](1),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvSet.json
+func ExampleSAPVirtualInstancesClient_GetSizingRecommendations_sapSizingRecommendationsForHaWithAvailabilitySet() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
- log.Fatalf("failed to pull the result: %v", err)
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetSizingRecommendations(ctx, "centralus", armworkloadssapvirtualinstance.SAPSizingRecommendationRequest{
+ AppLocation: to.Ptr("eastus"),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ Saps: to.Ptr[int64](75000),
+ DbMemory: to.Ptr[int64](1024),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DbScaleMethod: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseScaleMethodScaleUp),
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilitySet),
+ }, 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{
- // "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),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientGetSizingRecommendationsResponse{
+ // ThreeTierRecommendationResult: &armworkloadssapvirtualinstance.ThreeTierRecommendationResult{
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // ApplicationServerVMSKU: to.Ptr("Standard_E16ds_v4"),
+ // ApplicationServerInstanceCount: to.Ptr[int64](3),
+ // CentralServerVMSKU: to.Ptr("Standard_E8ds_v4"),
+ // CentralServerInstanceCount: to.Ptr[int64](2),
+ // DbVMSKU: to.Ptr("Standard_M64s"),
+ // DatabaseInstanceCount: to.Ptr[int64](2),
// },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginDelete() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvZone.json
+func ExampleSAPVirtualInstancesClient_GetSizingRecommendations_sapSizingRecommendationsForHaWithAvailabilityZone() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
- poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginDelete(ctx, "test-rg", "X00", nil)
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetSizingRecommendations(ctx, "centralus", armworkloadssapvirtualinstance.SAPSizingRecommendationRequest{
+ AppLocation: to.Ptr("eastus"),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ Saps: to.Ptr[int64](75000),
+ DbMemory: to.Ptr[int64](1024),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DbScaleMethod: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseScaleMethodScaleUp),
+ HighAvailabilityType: to.Ptr(armworkloadssapvirtualinstance.SAPHighAvailabilityTypeAvailabilityZone),
+ }, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
- _, err = poller.PollUntilDone(ctx, nil)
+ // 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.SAPVirtualInstancesClientGetSizingRecommendationsResponse{
+ // ThreeTierRecommendationResult: &armworkloadssapvirtualinstance.ThreeTierRecommendationResult{
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // ApplicationServerVMSKU: to.Ptr("Standard_E8ds_v4"),
+ // ApplicationServerInstanceCount: to.Ptr[int64](6),
+ // CentralServerVMSKU: to.Ptr("Standard_E4ds_v4"),
+ // CentralServerInstanceCount: to.Ptr[int64](2),
+ // DbVMSKU: to.Ptr("Standard_M64s"),
+ // DatabaseInstanceCount: to.Ptr[int64](2),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_SingleServer.json
+func ExampleSAPVirtualInstancesClient_GetSizingRecommendations_sapSizingRecommendationsForSingleServer() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
- log.Fatalf("failed to pull the result: %v", err)
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ res, err := clientFactory.NewSAPVirtualInstancesClient().GetSizingRecommendations(ctx, "centralus", armworkloadssapvirtualinstance.SAPSizingRecommendationRequest{
+ AppLocation: to.Ptr("eastus"),
+ Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeNonProd),
+ SapProduct: to.Ptr(armworkloadssapvirtualinstance.SAPProductTypeS4HANA),
+ DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ Saps: to.Ptr[int64](60000),
+ DbMemory: to.Ptr[int64](2000),
+ DatabaseType: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseTypeHANA),
+ DbScaleMethod: to.Ptr(armworkloadssapvirtualinstance.SAPDatabaseScaleMethodScaleUp),
+ }, 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.SAPVirtualInstancesClientGetSizingRecommendationsResponse{
+ // SingleServerRecommendationResult: &armworkloadssapvirtualinstance.SingleServerRecommendationResult{
+ // VMSKU: to.Ptr("Standard_M128s"),
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeSingleServer),
+ // },
+ // }
}
-// 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
+// Generated from example definition: 2024-09-01/SapVirtualInstances_ListByResourceGroup.json
func ExampleSAPVirtualInstancesClient_NewListByResourceGroupPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
@@ -7361,259 +8699,244 @@ func ExampleSAPVirtualInstancesClient_NewListByResourceGroupPager() {
_ = 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"),
- // }},
+ // page = armworkloadssapvirtualinstance.SAPVirtualInstancesClientListByResourceGroupResponse{
+ // SAPVirtualInstanceListResult: armworkloadssapvirtualinstance.SAPVirtualInstanceListResult{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // VMSize: to.Ptr("Standard_D8s_v3"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // },
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{
+ // 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"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeServiceInitiated),
+ // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"),
// },
// },
- // 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),
// },
- // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy),
- // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{
- // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"),
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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"),
- // }},
+ // {
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // VMSize: to.Ptr("Standard_D8s_v3"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // },
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{
+ // 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"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeServiceInitiated),
+ // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"),
// },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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),
// },
- // }},
+ // },
+ // },
// }
}
}
-// 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
+// Generated from example definition: 2024-09-01/SapVirtualInstances_ListBySubscription.json
func ExampleSAPVirtualInstancesClient_NewListBySubscriptionPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("6d875e77-e412-4d7d-9af4-8895278b4443", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
@@ -7628,263 +8951,323 @@ func ExampleSAPVirtualInstancesClient_NewListBySubscriptionPager() {
_ = 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"),
- // }},
+ // page = armworkloadssapvirtualinstance.SAPVirtualInstancesClientListBySubscriptionResponse{
+ // SAPVirtualInstanceListResult: armworkloadssapvirtualinstance.SAPVirtualInstanceListResult{
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // VMSize: to.Ptr("Standard_D8s_v3"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // },
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{
+ // 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"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeServiceInitiated),
+ // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"),
// },
// },
- // 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),
// },
- // Environment: to.Ptr(armworkloadssapvirtualinstance.SAPEnvironmentTypeProd),
- // Health: to.Ptr(armworkloadssapvirtualinstance.SAPHealthStateHealthy),
- // ManagedResourceGroupConfiguration: &armworkloadssapvirtualinstance.ManagedRGConfiguration{
- // Name: to.Ptr("mrg-x00-6d875e77-e412-4d7d-9af4-8895278b4443"),
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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"),
- // }},
+ // {
+ // 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"),
+ // Location: to.Ptr("westcentralus"),
+ // Properties: &armworkloadssapvirtualinstance.SAPVirtualInstanceProperties{
+ // Configuration: &armworkloadssapvirtualinstance.DeploymentConfiguration{
+ // AppLocation: to.Ptr("eastus"),
+ // ConfigurationType: to.Ptr(armworkloadssapvirtualinstance.SAPConfigurationTypeDeployment),
+ // InfrastructureConfiguration: &armworkloadssapvirtualinstance.ThreeTierConfiguration{
+ // AppResourceGroup: to.Ptr("X00-RG"),
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // 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"),
- // }},
+ // 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{
+ // DisablePasswordAuthentication: to.Ptr(true),
+ // OSType: to.Ptr(armworkloadssapvirtualinstance.OSTypeLinux),
+ // SSHKeyPair: &armworkloadssapvirtualinstance.SSHKeyPair{
+ // PublicKey: to.Ptr("abc"),
+ // },
// },
// },
+ // VMSize: to.Ptr("Standard_D8s_v3"),
// },
- // VMSize: to.Ptr("Standard_D8s_v3"),
// },
+ // DeploymentType: to.Ptr(armworkloadssapvirtualinstance.SAPDeploymentTypeThreeTier),
+ // },
+ // SoftwareConfiguration: &armworkloadssapvirtualinstance.ServiceInitiatedSoftwareConfiguration{
+ // 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"),
+ // SoftwareInstallationType: to.Ptr(armworkloadssapvirtualinstance.SAPSoftwareInstallationTypeServiceInitiated),
+ // SoftwareVersion: to.Ptr("SAP S/4HANA 2020 FPS01"),
// },
// },
- // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
// },
- // 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),
// },
- // }},
+ // },
+ // },
// }
}
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginStart_startTheSapSystem() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_Start.json
+func ExampleSAPVirtualInstancesClient_BeginStart_sapVirtualInstancesStart() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginStart(ctx, "test-rg", "X00", &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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientStartResponse{
+ // 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"),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_StartWithInfraOperations.json
+func ExampleSAPVirtualInstancesClient_BeginStart_sapVirtualInstancesStartWithInfraOperations() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginStart(ctx, "test-rg", "X00", &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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientStartResponse{
+ // 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"),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStop.json
+func ExampleSAPVirtualInstancesClient_BeginStop_softStopOfSapVirtualInstancesStop() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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})
+ poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginStop(ctx, "test-rg", "X00", &SAPVirtualInstancesClientBeginStopOptions{
+ body: &armworkloadssapvirtualinstance.StopRequest{
+ SoftStopTimeoutSeconds: to.Ptr[int64](300),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
@@ -7895,30 +9278,33 @@ func ExampleSAPVirtualInstancesClient_BeginStart_startTheSapSystem() {
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientStopResponse{
+ // 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"),
+ // },
// }
}
-// 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
-func ExampleSAPVirtualInstancesClient_BeginStart_startTheVirtualMachinesAndTheSapSystem() {
+// Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStopVMAndSystem.json
+func ExampleSAPVirtualInstancesClient_BeginStop_softStopTheVirtualMachineSAndTheSapSystemOnIt() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
- })
+ poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginStop(ctx, "test-rg", "X00", &SAPVirtualInstancesClientBeginStopOptions{
+ body: &armworkloadssapvirtualinstance.StopRequest{
+ DeallocateVM: to.Ptr(true),
+ SoftStopTimeoutSeconds: to.Ptr[int64](300),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
@@ -7929,30 +9315,32 @@ func ExampleSAPVirtualInstancesClient_BeginStart_startTheVirtualMachinesAndTheSa
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientStopResponse{
+ // 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"),
+ // },
// }
}
-// 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
+// Generated from example definition: 2024-09-01/SapVirtualInstances_Stop.json
func ExampleSAPVirtualInstancesClient_BeginStop_sapVirtualInstancesStop() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
- })
+ poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginStop(ctx, "test-rg", "X00", &SAPVirtualInstancesClientBeginStopOptions{
+ body: &armworkloadssapvirtualinstance.StopRequest{
+ SoftStopTimeoutSeconds: to.Ptr[int64](0),
+ }})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
@@ -7963,31 +9351,144 @@ func ExampleSAPVirtualInstancesClient_BeginStop_sapVirtualInstancesStop() {
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientStopResponse{
+ // 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"),
+ // },
// }
}
-// 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
+// Generated from example definition: 2024-09-01/SapVirtualInstances_StopVMAndSystem.json
func ExampleSAPVirtualInstancesClient_BeginStop_stopTheVirtualMachineSAndTheSapSystemOnIt() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", cred, nil)
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginStop(ctx, "test-rg", "X00", &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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientStopResponse{
+ // 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"),
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_Update.json
+func ExampleSAPVirtualInstancesClient_BeginUpdate_sapVirtualInstancesUpdate() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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.SAPVirtualInstanceIdentity{
+ Type: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceIdentityTypeNone),
+ },
+ Properties: &armworkloadssapvirtualinstance.UpdateSAPVirtualInstanceProperties{},
+ 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 = armworkloadssapvirtualinstance.SAPVirtualInstancesClientUpdateResponse{
+ // 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"),
+ // Identity: &armworkloadssapvirtualinstance.SAPVirtualInstanceIdentity{
+ // Type: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceIdentityTypeNone),
+ // },
+ // Location: to.Ptr("westcentralus"),
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // "key1": to.Ptr("svi1"),
+ // },
+ // },
+ // }
+}
+
+// Generated from example definition: 2024-09-01/SapVirtualInstances_UpdateTrustedAccess.json
+func ExampleSAPVirtualInstancesClient_BeginUpdate_sapVirtualInstancesTrustedAccessEnableUpdate() {
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("8e17e36c-42e9-4cd5-a078-7b44883414e0", 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),
- },
- })
+ poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginUpdate(ctx, "test-rg", "X00", armworkloadssapvirtualinstance.UpdateSAPVirtualInstanceRequest{
+ Identity: &armworkloadssapvirtualinstance.SAPVirtualInstanceIdentity{
+ Type: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceIdentityTypeNone),
+ },
+ 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)
}
@@ -7998,11 +9499,41 @@ func ExampleSAPVirtualInstancesClient_BeginStop_stopTheVirtualMachineSAndTheSapS
// 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"),
+ // res = armworkloadssapvirtualinstance.SAPVirtualInstancesClientUpdateResponse{
+ // 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"),
+ // Identity: &armworkloadssapvirtualinstance.SAPVirtualInstanceIdentity{
+ // Type: to.Ptr(armworkloadssapvirtualinstance.SAPVirtualInstanceIdentityTypeNone),
+ // },
+ // Location: to.Ptr("westcentralus"),
+ // 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),
+ // },
+ // 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),
+ // },
+ // Tags: map[string]*string{
+ // "key1": to.Ptr("svi1"),
+ // },
+ // },
// }
}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/time_rfc3339.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/time_rfc3339.go
index 09e8f6ac88ee..8bb5d8bfeb1d 100644
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/time_rfc3339.go
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/time_rfc3339.go
@@ -1,10 +1,6 @@
-//go:build go1.18
-// +build go1.18
-
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.
package armworkloadssapvirtualinstance
@@ -60,6 +56,9 @@ func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error {
}
func (t *dateTimeRFC3339) UnmarshalText(data []byte) error {
+ if len(data) == 0 {
+ return nil
+ }
tzOffset := tzOffsetRegex.Match(data)
hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t")
var layout string
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/tsp-location.yaml b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/tsp-location.yaml
new file mode 100644
index 000000000000..bf6a3d3fbe33
--- /dev/null
+++ b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/tsp-location.yaml
@@ -0,0 +1,4 @@
+directory: specification/workloads/Workloads.SAPVirtualInstance.Management
+commit: 92214b1faaad098434ae37b69fcc896fdf8ecc8c
+repo: Azure/azure-rest-api-specs
+additionalDirectories:
\ No newline at end of file
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/workloads_client.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/workloads_client.go
deleted file mode 100644
index 41f67e9e5343..000000000000
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/workloads_client.go
+++ /dev/null
@@ -1,309 +0,0 @@
-//go:build go1.18
-// +build go1.18
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-
-package armworkloadssapvirtualinstance
-
-import (
- "context"
- "errors"
- "github.com/Azure/azure-sdk-for-go/sdk/azcore"
- "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
- "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
- "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
- "net/http"
- "net/url"
- "strings"
-)
-
-// WorkloadsClient contains the methods for the WorkloadsClient group.
-// Don't use this type directly, use NewWorkloadsClient() instead.
-type WorkloadsClient struct {
- internal *arm.Client
- subscriptionID string
-}
-
-// 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 NewWorkloadsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkloadsClient, error) {
- cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
- if err != nil {
- return nil, err
- }
- client := &WorkloadsClient{
- subscriptionID: subscriptionID,
- internal: cl,
- }
- return client, nil
-}
-
-// 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.
-func (client *WorkloadsClient) SAPAvailabilityZoneDetails(ctx context.Context, location string, options *WorkloadsClientSAPAvailabilityZoneDetailsOptions) (WorkloadsClientSAPAvailabilityZoneDetailsResponse, error) {
- var err error
- const operationName = "WorkloadsClient.SAPAvailabilityZoneDetails"
- ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
- ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
- defer func() { endSpan(err) }()
- req, err := client.sapAvailabilityZoneDetailsCreateRequest(ctx, location, options)
- if err != nil {
- return WorkloadsClientSAPAvailabilityZoneDetailsResponse{}, err
- }
- httpResp, err := client.internal.Pipeline().Do(req)
- if err != nil {
- return WorkloadsClientSAPAvailabilityZoneDetailsResponse{}, err
- }
- if !runtime.HasStatusCode(httpResp, http.StatusOK) {
- err = runtime.NewResponseError(httpResp)
- return WorkloadsClientSAPAvailabilityZoneDetailsResponse{}, err
- }
- resp, err := client.sapAvailabilityZoneDetailsHandleResponse(httpResp)
- return resp, err
-}
-
-// sapAvailabilityZoneDetailsCreateRequest creates the SAPAvailabilityZoneDetails request.
-func (client *WorkloadsClient) sapAvailabilityZoneDetailsCreateRequest(ctx context.Context, location string, options *WorkloadsClientSAPAvailabilityZoneDetailsOptions) (*policy.Request, error) {
- urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails"
- if client.subscriptionID == "" {
- return nil, errors.New("parameter client.subscriptionID cannot be empty")
- }
- urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
- if location == "" {
- return nil, errors.New("parameter location cannot be empty")
- }
- urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
- req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
- if err != nil {
- return nil, err
- }
- reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
- req.Raw().URL.RawQuery = reqQP.Encode()
- req.Raw().Header["Accept"] = []string{"application/json"}
- if options != nil && options.SAPAvailabilityZoneDetails != nil {
- if err := runtime.MarshalAsJSON(req, *options.SAPAvailabilityZoneDetails); err != nil {
- return nil, err
- }
- return req, nil
- }
- return req, nil
-}
-
-// sapAvailabilityZoneDetailsHandleResponse handles the SAPAvailabilityZoneDetails response.
-func (client *WorkloadsClient) sapAvailabilityZoneDetailsHandleResponse(resp *http.Response) (WorkloadsClientSAPAvailabilityZoneDetailsResponse, error) {
- result := WorkloadsClientSAPAvailabilityZoneDetailsResponse{}
- if err := runtime.UnmarshalAsJSON(resp, &result.SAPAvailabilityZoneDetailsResult); err != nil {
- return WorkloadsClientSAPAvailabilityZoneDetailsResponse{}, err
- }
- return result, nil
-}
-
-// 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.
-func (client *WorkloadsClient) SAPDiskConfigurations(ctx context.Context, location string, options *WorkloadsClientSAPDiskConfigurationsOptions) (WorkloadsClientSAPDiskConfigurationsResponse, error) {
- var err error
- const operationName = "WorkloadsClient.SAPDiskConfigurations"
- ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
- ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
- defer func() { endSpan(err) }()
- req, err := client.sapDiskConfigurationsCreateRequest(ctx, location, options)
- if err != nil {
- return WorkloadsClientSAPDiskConfigurationsResponse{}, err
- }
- httpResp, err := client.internal.Pipeline().Do(req)
- if err != nil {
- return WorkloadsClientSAPDiskConfigurationsResponse{}, err
- }
- if !runtime.HasStatusCode(httpResp, http.StatusOK) {
- err = runtime.NewResponseError(httpResp)
- return WorkloadsClientSAPDiskConfigurationsResponse{}, err
- }
- resp, err := client.sapDiskConfigurationsHandleResponse(httpResp)
- return resp, err
-}
-
-// sapDiskConfigurationsCreateRequest creates the SAPDiskConfigurations request.
-func (client *WorkloadsClient) sapDiskConfigurationsCreateRequest(ctx context.Context, location string, options *WorkloadsClientSAPDiskConfigurationsOptions) (*policy.Request, error) {
- urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations"
- if client.subscriptionID == "" {
- return nil, errors.New("parameter client.subscriptionID cannot be empty")
- }
- urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
- if location == "" {
- return nil, errors.New("parameter location cannot be empty")
- }
- urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
- req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
- if err != nil {
- return nil, err
- }
- reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
- req.Raw().URL.RawQuery = reqQP.Encode()
- req.Raw().Header["Accept"] = []string{"application/json"}
- if options != nil && options.SAPDiskConfigurations != nil {
- if err := runtime.MarshalAsJSON(req, *options.SAPDiskConfigurations); err != nil {
- return nil, err
- }
- return req, nil
- }
- return req, nil
-}
-
-// sapDiskConfigurationsHandleResponse handles the SAPDiskConfigurations response.
-func (client *WorkloadsClient) sapDiskConfigurationsHandleResponse(resp *http.Response) (WorkloadsClientSAPDiskConfigurationsResponse, error) {
- result := WorkloadsClientSAPDiskConfigurationsResponse{}
- if err := runtime.UnmarshalAsJSON(resp, &result.SAPDiskConfigurationsResult); err != nil {
- return WorkloadsClientSAPDiskConfigurationsResponse{}, err
- }
- return result, nil
-}
-
-// 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.
-func (client *WorkloadsClient) SAPSizingRecommendations(ctx context.Context, location string, options *WorkloadsClientSAPSizingRecommendationsOptions) (WorkloadsClientSAPSizingRecommendationsResponse, error) {
- var err error
- const operationName = "WorkloadsClient.SAPSizingRecommendations"
- ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
- ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
- defer func() { endSpan(err) }()
- req, err := client.sapSizingRecommendationsCreateRequest(ctx, location, options)
- if err != nil {
- return WorkloadsClientSAPSizingRecommendationsResponse{}, err
- }
- httpResp, err := client.internal.Pipeline().Do(req)
- if err != nil {
- return WorkloadsClientSAPSizingRecommendationsResponse{}, err
- }
- if !runtime.HasStatusCode(httpResp, http.StatusOK) {
- err = runtime.NewResponseError(httpResp)
- return WorkloadsClientSAPSizingRecommendationsResponse{}, err
- }
- resp, err := client.sapSizingRecommendationsHandleResponse(httpResp)
- return resp, err
-}
-
-// sapSizingRecommendationsCreateRequest creates the SAPSizingRecommendations request.
-func (client *WorkloadsClient) sapSizingRecommendationsCreateRequest(ctx context.Context, location string, options *WorkloadsClientSAPSizingRecommendationsOptions) (*policy.Request, error) {
- urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations"
- if client.subscriptionID == "" {
- return nil, errors.New("parameter client.subscriptionID cannot be empty")
- }
- urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
- if location == "" {
- return nil, errors.New("parameter location cannot be empty")
- }
- urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
- req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
- if err != nil {
- return nil, err
- }
- reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
- req.Raw().URL.RawQuery = reqQP.Encode()
- req.Raw().Header["Accept"] = []string{"application/json"}
- if options != nil && options.SAPSizingRecommendation != nil {
- if err := runtime.MarshalAsJSON(req, *options.SAPSizingRecommendation); err != nil {
- return nil, err
- }
- return req, nil
- }
- return req, nil
-}
-
-// sapSizingRecommendationsHandleResponse handles the SAPSizingRecommendations response.
-func (client *WorkloadsClient) sapSizingRecommendationsHandleResponse(resp *http.Response) (WorkloadsClientSAPSizingRecommendationsResponse, error) {
- result := WorkloadsClientSAPSizingRecommendationsResponse{}
- if err := runtime.UnmarshalAsJSON(resp, &result); err != nil {
- return WorkloadsClientSAPSizingRecommendationsResponse{}, err
- }
- return result, nil
-}
-
-// 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.
-func (client *WorkloadsClient) SAPSupportedSKU(ctx context.Context, location string, options *WorkloadsClientSAPSupportedSKUOptions) (WorkloadsClientSAPSupportedSKUResponse, error) {
- var err error
- const operationName = "WorkloadsClient.SAPSupportedSKU"
- ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
- ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
- defer func() { endSpan(err) }()
- req, err := client.sapSupportedSKUCreateRequest(ctx, location, options)
- if err != nil {
- return WorkloadsClientSAPSupportedSKUResponse{}, err
- }
- httpResp, err := client.internal.Pipeline().Do(req)
- if err != nil {
- return WorkloadsClientSAPSupportedSKUResponse{}, err
- }
- if !runtime.HasStatusCode(httpResp, http.StatusOK) {
- err = runtime.NewResponseError(httpResp)
- return WorkloadsClientSAPSupportedSKUResponse{}, err
- }
- resp, err := client.sapSupportedSKUHandleResponse(httpResp)
- return resp, err
-}
-
-// sapSupportedSKUCreateRequest creates the SAPSupportedSKU request.
-func (client *WorkloadsClient) sapSupportedSKUCreateRequest(ctx context.Context, location string, options *WorkloadsClientSAPSupportedSKUOptions) (*policy.Request, error) {
- urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku"
- if client.subscriptionID == "" {
- return nil, errors.New("parameter client.subscriptionID cannot be empty")
- }
- urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
- if location == "" {
- return nil, errors.New("parameter location cannot be empty")
- }
- urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
- req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
- if err != nil {
- return nil, err
- }
- reqQP := req.Raw().URL.Query()
- reqQP.Set("api-version", "2023-10-01-preview")
- req.Raw().URL.RawQuery = reqQP.Encode()
- req.Raw().Header["Accept"] = []string{"application/json"}
- if options != nil && options.SAPSupportedSKU != nil {
- if err := runtime.MarshalAsJSON(req, *options.SAPSupportedSKU); err != nil {
- return nil, err
- }
- return req, nil
- }
- return req, nil
-}
-
-// sapSupportedSKUHandleResponse handles the SAPSupportedSKU response.
-func (client *WorkloadsClient) sapSupportedSKUHandleResponse(resp *http.Response) (WorkloadsClientSAPSupportedSKUResponse, error) {
- result := WorkloadsClientSAPSupportedSKUResponse{}
- if err := runtime.UnmarshalAsJSON(resp, &result.SAPSupportedResourceSKUsResult); err != nil {
- return WorkloadsClientSAPSupportedSKUResponse{}, err
- }
- return result, nil
-}
diff --git a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/workloads_client_example_test.go b/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/workloads_client_example_test.go
deleted file mode 100644
index 6df69bcbd252..000000000000
--- a/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance/workloads_client_example_test.go
+++ /dev/null
@@ -1,1194 +0,0 @@
-//go:build go1.18
-// +build go1.18
-
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-// DO NOT EDIT.
-
-package armworkloadssapvirtualinstance_test
-
-import (
- "context"
- "log"
-
- "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloadssapvirtualinstance/armworkloadssapvirtualinstance"
-)
-
-// 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
-func ExampleWorkloadsClient_SAPSizingRecommendations_sapSizingRecommendationsS4HanaDistributed() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // },
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPSizingRecommendations_sapSizingRecommendationsS4HanaDistributedHaAvSet() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // },
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPSizingRecommendations_sapSizingRecommendationsS4HanaDistributedHaAvZone() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // },
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPSizingRecommendations_sapSizingRecommendationsS4HanaSingleServer() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // },
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPSupportedSKU_sapSupportedSkusDistributed() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }},
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPSupportedSKU_sapSupportedSkusDistributedHaAvSet() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }},
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPSupportedSKU_sapSupportedSkusDistributedHaAvZone() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }},
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPSupportedSKU_sapSupportedSkusSingleServer() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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"),
- // }},
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPDiskConfigurations_sapDiskConfigurationsNonProd() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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),
- // },
- // }},
- // },
- // },
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPDiskConfigurations_sapDiskConfigurationsProd() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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),
- // },
- // }},
- // },
- // },
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPAvailabilityZoneDetails_sapAvailabilityZoneDetailsEastus() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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),
- // }},
- // }
-}
-
-// 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
-func ExampleWorkloadsClient_SAPAvailabilityZoneDetails_sapAvailabilityZoneDetailsNortheurope() {
- cred, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- log.Fatalf("failed to obtain a credential: %v", err)
- }
- ctx := context.Background()
- clientFactory, err := armworkloadssapvirtualinstance.NewClientFactory("", 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),
- // }},
- // }
-}