Obtención de recomendaciones de ajuste de tamaño de SAP proporcionando sapS de entrada para el nivel de aplicación y la memoria necesarios para el nivel de base de datos
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations?api-version=2023-04-01
Parámetros de identificador URI
Nombre |
En |
Requerido |
Tipo |
Description |
location
|
path |
True
|
string
minLength: 1
|
Nombre de la región de Azure.
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
Identificador de la suscripción de destino.
|
api-version
|
query |
True
|
string
minLength: 1
|
Versión de la API que se va a usar para esta operación.
|
Cuerpo de la solicitud
Nombre |
Requerido |
Tipo |
Description |
appLocation
|
True
|
string
|
Ubicación geográfica donde se va a crear el recurso.
|
databaseType
|
True
|
SAPDatabaseType
|
Tipo de base de datos.
|
dbMemory
|
True
|
integer
(int64)
|
Configuración de la memoria de la base de datos.
|
deploymentType
|
True
|
SAPDeploymentType
|
Tipo de implementación. Por ejemplo: SingleServer/ThreeTier
|
environment
|
True
|
SAPEnvironmentType
|
Define el tipo de entorno: producción o no producción.
|
sapProduct
|
True
|
SAPProductType
|
Define el tipo de producto de SAP.
|
saps
|
True
|
integer
(int64)
|
Medición de SAP Application Performance Standard.
|
dbScaleMethod
|
|
SAPDatabaseScaleMethod
|
Método de escalado de base de datos.
|
highAvailabilityType
|
|
SAPHighAvailabilityType
|
Tipo de alta disponibilidad.
|
Respuestas
Nombre |
Tipo |
Description |
200 OK
|
SAPSizingRecommendationResult:
|
Resultado de la recomendación de ajuste de tamaño de SAP.
|
Other Status Codes
|
ErrorResponse
|
Respuesta de error que describe por qué se produjo un error en la operación.
|
Seguridad
azure_auth
Flujo de OAuth2 de Azure Active Directory
Tipo:
oauth2
Flujo:
implicit
Dirección URL de autorización:
https://login.microsoftonline.com/common/oauth2/authorize
Ámbitos
Nombre |
Description |
user_impersonation
|
suplantar la cuenta de usuario
|
Ejemplos
SAPSizingRecommendations_S4HANA_Distributed
Solicitud de ejemplo
POST https://management.azure.com/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/providers/Microsoft.Workloads/locations/centralus/sapVirtualInstanceMetadata/default/getSizingRecommendations?api-version=2023-04-01
import com.azure.resourcemanager.workloads.models.SapDatabaseScaleMethod;
import com.azure.resourcemanager.workloads.models.SapDatabaseType;
import com.azure.resourcemanager.workloads.models.SapDeploymentType;
import com.azure.resourcemanager.workloads.models.SapEnvironmentType;
import com.azure.resourcemanager.workloads.models.SapProductType;
import com.azure.resourcemanager.workloads.models.SapSizingRecommendationRequest;
/**
* Samples for ResourceProvider SapSizingRecommendations.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/
* SAPSizingRecommendations_S4HANA_Distributed.json
*/
/**
* Sample code: SAPSizingRecommendations_S4HANA_Distributed.
*
* @param manager Entry point to WorkloadsManager.
*/
public static void
sAPSizingRecommendationsS4HANADistributed(com.azure.resourcemanager.workloads.WorkloadsManager manager) {
manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus",
new SapSizingRecommendationRequest().withAppLocation("eastus").withEnvironment(SapEnvironmentType.PROD)
.withSapProduct(SapProductType.S4HANA).withDeploymentType(SapDeploymentType.THREE_TIER).withSaps(20000L)
.withDbMemory(1024L).withDatabaseType(SapDatabaseType.HANA)
.withDbScaleMethod(SapDatabaseScaleMethod.SCALE_UP),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.workloads import WorkloadsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-workloads
# USAGE
python sap_sizing_recommendations_s4_hana_distributed.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = WorkloadsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="8e17e36c-42e9-4cd5-a078-7b44883414e0",
)
response = client.sap_sizing_recommendations(
location="centralus",
)
print(response)
# x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armworkloads_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json
func ExampleClient_SAPSizingRecommendations_sapSizingRecommendationsS4HanaDistributed() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().SAPSizingRecommendations(ctx, "centralus", &armworkloads.ClientSAPSizingRecommendationsOptions{SAPSizingRecommendation: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armworkloads.ClientSAPSizingRecommendationsResponse{
// SAPSizingRecommendationResultClassification: &armworkloads.ThreeTierRecommendationResult{
// DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier),
// ApplicationServerInstanceCount: to.Ptr[int64](2),
// ApplicationServerVMSKU: to.Ptr("Standard_E8ds_v4"),
// CentralServerInstanceCount: to.Ptr[int64](1),
// CentralServerVMSKU: to.Ptr("Standard_E4ds_v4"),
// DatabaseInstanceCount: to.Ptr[int64](1),
// DbVMSKU: to.Ptr("Standard_M64s"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { WorkloadsClient } = require("@azure/arm-workloads");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier
*
* @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier
* x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json
*/
async function sapSizingRecommendationsS4HanaDistributed() {
const subscriptionId =
process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0";
const location = "centralus";
const credential = new DefaultAzureCredential();
const client = new WorkloadsClient(credential, subscriptionId);
const result = await client.sAPSizingRecommendations(location);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Workloads.Models;
using Azure.ResourceManager.Workloads;
// Generated from example definition: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json
// this example is just showing the usage of "SapSizingRecommendations" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation
AzureLocation location = new AzureLocation("centralus");
SapSizingRecommendationResult result = await subscriptionResource.SapSizingRecommendationsAsync(location);
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Respuesta de muestra
{
"deploymentType": "ThreeTier",
"applicationServerVmSku": "Standard_E8ds_v4",
"applicationServerInstanceCount": 2,
"centralServerVmSku": "Standard_E4ds_v4",
"centralServerInstanceCount": 1,
"dbVmSku": "Standard_M64s",
"databaseInstanceCount": 1
}
SAPSizingRecommendations_S4HANA_DistributedHA_AvSet
Solicitud de ejemplo
POST https://management.azure.com/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/providers/Microsoft.Workloads/locations/centralus/sapVirtualInstanceMetadata/default/getSizingRecommendations?api-version=2023-04-01
import com.azure.resourcemanager.workloads.models.SapDatabaseScaleMethod;
import com.azure.resourcemanager.workloads.models.SapDatabaseType;
import com.azure.resourcemanager.workloads.models.SapDeploymentType;
import com.azure.resourcemanager.workloads.models.SapEnvironmentType;
import com.azure.resourcemanager.workloads.models.SapHighAvailabilityType;
import com.azure.resourcemanager.workloads.models.SapProductType;
import com.azure.resourcemanager.workloads.models.SapSizingRecommendationRequest;
/**
* Samples for ResourceProvider SapSizingRecommendations.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/
* SAPSizingRecommendations_S4HANA_HA_AvSet.json
*/
/**
* Sample code: SAPSizingRecommendations_S4HANA_DistributedHA_AvSet.
*
* @param manager Entry point to WorkloadsManager.
*/
public static void
sAPSizingRecommendationsS4HANADistributedHAAvSet(com.azure.resourcemanager.workloads.WorkloadsManager manager) {
manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus",
new SapSizingRecommendationRequest().withAppLocation("eastus").withEnvironment(SapEnvironmentType.PROD)
.withSapProduct(SapProductType.S4HANA).withDeploymentType(SapDeploymentType.THREE_TIER).withSaps(75000L)
.withDbMemory(1024L).withDatabaseType(SapDatabaseType.HANA)
.withDbScaleMethod(SapDatabaseScaleMethod.SCALE_UP)
.withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_SET),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.workloads import WorkloadsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-workloads
# USAGE
python sap_sizing_recommendations_s4_hana_ha_av_set.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = WorkloadsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="8e17e36c-42e9-4cd5-a078-7b44883414e0",
)
response = client.sap_sizing_recommendations(
location="centralus",
)
print(response)
# x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armworkloads_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json
func ExampleClient_SAPSizingRecommendations_sapSizingRecommendationsS4HanaDistributedHaAvSet() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().SAPSizingRecommendations(ctx, "centralus", &armworkloads.ClientSAPSizingRecommendationsOptions{SAPSizingRecommendation: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armworkloads.ClientSAPSizingRecommendationsResponse{
// SAPSizingRecommendationResultClassification: &armworkloads.ThreeTierRecommendationResult{
// DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier),
// ApplicationServerInstanceCount: to.Ptr[int64](3),
// ApplicationServerVMSKU: to.Ptr("Standard_E16ds_v4"),
// CentralServerInstanceCount: to.Ptr[int64](2),
// CentralServerVMSKU: to.Ptr("Standard_E8ds_v4"),
// DatabaseInstanceCount: to.Ptr[int64](2),
// DbVMSKU: to.Ptr("Standard_M64s"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { WorkloadsClient } = require("@azure/arm-workloads");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier
*
* @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier
* x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json
*/
async function sapSizingRecommendationsS4HanaDistributedHaAvSet() {
const subscriptionId =
process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0";
const location = "centralus";
const credential = new DefaultAzureCredential();
const client = new WorkloadsClient(credential, subscriptionId);
const result = await client.sAPSizingRecommendations(location);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Workloads.Models;
using Azure.ResourceManager.Workloads;
// Generated from example definition: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json
// this example is just showing the usage of "SapSizingRecommendations" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation
AzureLocation location = new AzureLocation("centralus");
SapSizingRecommendationResult result = await subscriptionResource.SapSizingRecommendationsAsync(location);
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Respuesta de muestra
{
"deploymentType": "ThreeTier",
"applicationServerVmSku": "Standard_E16ds_v4",
"applicationServerInstanceCount": 3,
"centralServerVmSku": "Standard_E8ds_v4",
"centralServerInstanceCount": 2,
"dbVmSku": "Standard_M64s",
"databaseInstanceCount": 2
}
SAPSizingRecommendations_S4HANA_DistributedHA_AvZone
Solicitud de ejemplo
POST https://management.azure.com/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/providers/Microsoft.Workloads/locations/centralus/sapVirtualInstanceMetadata/default/getSizingRecommendations?api-version=2023-04-01
import com.azure.resourcemanager.workloads.models.SapDatabaseScaleMethod;
import com.azure.resourcemanager.workloads.models.SapDatabaseType;
import com.azure.resourcemanager.workloads.models.SapDeploymentType;
import com.azure.resourcemanager.workloads.models.SapEnvironmentType;
import com.azure.resourcemanager.workloads.models.SapHighAvailabilityType;
import com.azure.resourcemanager.workloads.models.SapProductType;
import com.azure.resourcemanager.workloads.models.SapSizingRecommendationRequest;
/**
* Samples for ResourceProvider SapSizingRecommendations.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/
* SAPSizingRecommendations_S4HANA_HA_AvZone.json
*/
/**
* Sample code: SAPSizingRecommendations_S4HANA_DistributedHA_AvZone.
*
* @param manager Entry point to WorkloadsManager.
*/
public static void sAPSizingRecommendationsS4HANADistributedHAAvZone(
com.azure.resourcemanager.workloads.WorkloadsManager manager) {
manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus",
new SapSizingRecommendationRequest().withAppLocation("eastus").withEnvironment(SapEnvironmentType.PROD)
.withSapProduct(SapProductType.S4HANA).withDeploymentType(SapDeploymentType.THREE_TIER).withSaps(75000L)
.withDbMemory(1024L).withDatabaseType(SapDatabaseType.HANA)
.withDbScaleMethod(SapDatabaseScaleMethod.SCALE_UP)
.withHighAvailabilityType(SapHighAvailabilityType.AVAILABILITY_ZONE),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.workloads import WorkloadsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-workloads
# USAGE
python sap_sizing_recommendations_s4_hana_ha_av_zone.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = WorkloadsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="8e17e36c-42e9-4cd5-a078-7b44883414e0",
)
response = client.sap_sizing_recommendations(
location="centralus",
)
print(response)
# x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armworkloads_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json
func ExampleClient_SAPSizingRecommendations_sapSizingRecommendationsS4HanaDistributedHaAvZone() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().SAPSizingRecommendations(ctx, "centralus", &armworkloads.ClientSAPSizingRecommendationsOptions{SAPSizingRecommendation: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armworkloads.ClientSAPSizingRecommendationsResponse{
// SAPSizingRecommendationResultClassification: &armworkloads.ThreeTierRecommendationResult{
// DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeThreeTier),
// ApplicationServerInstanceCount: to.Ptr[int64](6),
// ApplicationServerVMSKU: to.Ptr("Standard_E8ds_v4"),
// CentralServerInstanceCount: to.Ptr[int64](2),
// CentralServerVMSKU: to.Ptr("Standard_E4ds_v4"),
// DatabaseInstanceCount: to.Ptr[int64](2),
// DbVMSKU: to.Ptr("Standard_M64s"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { WorkloadsClient } = require("@azure/arm-workloads");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier
*
* @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier
* x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json
*/
async function sapSizingRecommendationsS4HanaDistributedHaAvZone() {
const subscriptionId =
process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0";
const location = "centralus";
const credential = new DefaultAzureCredential();
const client = new WorkloadsClient(credential, subscriptionId);
const result = await client.sAPSizingRecommendations(location);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Workloads.Models;
using Azure.ResourceManager.Workloads;
// Generated from example definition: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json
// this example is just showing the usage of "SapSizingRecommendations" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation
AzureLocation location = new AzureLocation("centralus");
SapSizingRecommendationResult result = await subscriptionResource.SapSizingRecommendationsAsync(location);
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Respuesta de muestra
{
"deploymentType": "ThreeTier",
"applicationServerVmSku": "Standard_E8ds_v4",
"applicationServerInstanceCount": 6,
"centralServerVmSku": "Standard_E4ds_v4",
"centralServerInstanceCount": 2,
"dbVmSku": "Standard_M64s",
"databaseInstanceCount": 2
}
SAPSizingRecommendations_S4HANA_SingleServer
Solicitud de ejemplo
POST https://management.azure.com/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/providers/Microsoft.Workloads/locations/centralus/sapVirtualInstanceMetadata/default/getSizingRecommendations?api-version=2023-04-01
import com.azure.resourcemanager.workloads.models.SapDatabaseScaleMethod;
import com.azure.resourcemanager.workloads.models.SapDatabaseType;
import com.azure.resourcemanager.workloads.models.SapDeploymentType;
import com.azure.resourcemanager.workloads.models.SapEnvironmentType;
import com.azure.resourcemanager.workloads.models.SapProductType;
import com.azure.resourcemanager.workloads.models.SapSizingRecommendationRequest;
/**
* Samples for ResourceProvider SapSizingRecommendations.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/
* SAPSizingRecommendations_S4HANA_SingleServer.json
*/
/**
* Sample code: SAPSizingRecommendations_S4HANA_SingleServer.
*
* @param manager Entry point to WorkloadsManager.
*/
public static void
sAPSizingRecommendationsS4HANASingleServer(com.azure.resourcemanager.workloads.WorkloadsManager manager) {
manager.resourceProviders().sapSizingRecommendationsWithResponse("centralus",
new SapSizingRecommendationRequest().withAppLocation("eastus").withEnvironment(SapEnvironmentType.NON_PROD)
.withSapProduct(SapProductType.S4HANA).withDeploymentType(SapDeploymentType.SINGLE_SERVER)
.withSaps(60000L).withDbMemory(2000L).withDatabaseType(SapDatabaseType.HANA)
.withDbScaleMethod(SapDatabaseScaleMethod.SCALE_UP),
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.workloads import WorkloadsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-workloads
# USAGE
python sap_sizing_recommendations_s4_hana_single_server.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = WorkloadsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="8e17e36c-42e9-4cd5-a078-7b44883414e0",
)
response = client.sap_sizing_recommendations(
location="centralus",
)
print(response)
# x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armworkloads_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/workloads/armworkloads"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1e7b408f3323e7f5424745718fe62c7a043a2337/specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json
func ExampleClient_SAPSizingRecommendations_sapSizingRecommendationsS4HanaSingleServer() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().SAPSizingRecommendations(ctx, "centralus", &armworkloads.ClientSAPSizingRecommendationsOptions{SAPSizingRecommendation: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armworkloads.ClientSAPSizingRecommendationsResponse{
// SAPSizingRecommendationResultClassification: &armworkloads.SingleServerRecommendationResult{
// DeploymentType: to.Ptr(armworkloads.SAPDeploymentTypeSingleServer),
// VMSKU: to.Ptr("Standard_M128s"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { WorkloadsClient } = require("@azure/arm-workloads");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier
*
* @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier
* x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json
*/
async function sapSizingRecommendationsS4HanaSingleServer() {
const subscriptionId =
process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0";
const location = "centralus";
const credential = new DefaultAzureCredential();
const client = new WorkloadsClient(credential, subscriptionId);
const result = await client.sAPSizingRecommendations(location);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Workloads.Models;
using Azure.ResourceManager.Workloads;
// Generated from example definition: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json
// this example is just showing the usage of "SapSizingRecommendations" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation
AzureLocation location = new AzureLocation("centralus");
SapSizingRecommendationResult result = await subscriptionResource.SapSizingRecommendationsAsync(location);
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Respuesta de muestra
{
"vmSku": "Standard_M128s",
"deploymentType": "SingleServer"
}
Definiciones
ErrorAdditionalInfo
Object
Información adicional sobre el error de administración de recursos.
Nombre |
Tipo |
Description |
info
|
object
|
Información adicional.
|
type
|
string
|
Tipo de información adicional.
|
ErrorDetail
Object
Detalle del error.
Nombre |
Tipo |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Información adicional del error.
|
code
|
string
|
Código de error.
|
details
|
ErrorDetail[]
|
Detalles del error.
|
message
|
string
|
Mensaje de error.
|
target
|
string
|
Destino del error.
|
ErrorResponse
Object
Respuesta de error
Nombre |
Tipo |
Description |
error
|
ErrorDetail
|
Objeto de error.
|
SAPDatabaseScaleMethod
Enumeración
Método de escalado de base de datos.
Valor |
Description |
ScaleUp
|
|
SAPDatabaseType
Enumeración
Define los tipos de base de datos de SAP admitidos.
Valor |
Description |
DB2
|
|
HANA
|
|
SAPDeploymentType
Enumeración
Tipo de implementación. Por ejemplo: SingleServer/ThreeTier
Valor |
Description |
SingleServer
|
|
ThreeTier
|
|
SAPEnvironmentType
Enumeración
Define el tipo de entorno: producción o no producción.
Valor |
Description |
NonProd
|
|
Prod
|
|
SAPHighAvailabilityType
Enumeración
Tipo de alta disponibilidad.
Valor |
Description |
AvailabilitySet
|
|
AvailabilityZone
|
|
SAPProductType
Enumeración
Define el tipo de producto de SAP.
Valor |
Description |
ECC
|
|
Other
|
|
S4HANA
|
|
SAPSizingRecommendationRequest
Object
Solicitud de recomendación de ajuste de tamaño de SAP.
Nombre |
Tipo |
Description |
appLocation
|
string
|
Ubicación geográfica donde se va a crear el recurso.
|
databaseType
|
SAPDatabaseType
|
Tipo de base de datos.
|
dbMemory
|
integer
(int64)
|
Configuración de la memoria de la base de datos.
|
dbScaleMethod
|
SAPDatabaseScaleMethod
|
Método de escalado de base de datos.
|
deploymentType
|
SAPDeploymentType
|
Tipo de implementación. Por ejemplo: SingleServer/ThreeTier
|
environment
|
SAPEnvironmentType
|
Define el tipo de entorno: producción o no producción.
|
highAvailabilityType
|
SAPHighAvailabilityType
|
Tipo de alta disponibilidad.
|
sapProduct
|
SAPProductType
|
Define el tipo de producto de SAP.
|
saps
|
integer
(int64)
|
Medición de SAP Application Performance Standard.
|
SingleServerRecommendationResult
Object
Configuración recomendada para un único sistema SAP de servidor.
Nombre |
Tipo |
Description |
deploymentType
|
string:
SingleServer
|
Tipo de implementación de SAP, servidor único o Tres niveles.
|
vmSku
|
string
|
SKU de máquina virtual recomendada para un solo servidor.
|
ThreeTierRecommendationResult
Object
Configuración recomendada para un sistema SAP de tres niveles.
Nombre |
Tipo |
Description |
applicationServerInstanceCount
|
integer
(int64)
|
Recuento de instancias del servidor de aplicaciones.
|
applicationServerVmSku
|
string
|
SKU de máquina virtual del servidor de aplicaciones.
|
centralServerInstanceCount
|
integer
(int64)
|
Recuento de instancias del servidor central.
|
centralServerVmSku
|
string
|
SKU de máquina virtual del servidor central.
|
databaseInstanceCount
|
integer
(int64)
|
Recuento de instancias del servidor de base de datos.
|
dbVmSku
|
string
|
SKU de máquina virtual de base de datos.
|
deploymentType
|
string:
ThreeTier
|
Tipo de implementación de SAP, servidor único o Tres niveles.
|