Detiene la aplicación SAP, es decir, las instancias del servidor de aplicaciones y la instancia de Central Services.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/stop?api-version=2023-04-01
Parámetros de identificador URI
Nombre |
En |
Requerido |
Tipo |
Description |
resourceGroupName
|
path |
True
|
string
|
Nombre del grupo de recursos. El nombre distingue mayúsculas de minúsculas.
|
sapVirtualInstanceName
|
path |
True
|
string
|
El nombre del recurso Instancias virtuales para soluciones de SAP
|
subscriptionId
|
path |
True
|
string
|
Identificador de la suscripción de destino.
|
api-version
|
query |
True
|
string
|
Versión de API que se usará para la operación.
|
Cuerpo de la solicitud
Nombre |
Tipo |
Description |
softStopTimeoutSeconds
|
integer
|
Este parámetro define cuánto tiempo (en segundos) espera el apagado temporal hasta que los clientes RFC/HTTP ya no tienen en cuenta el servidor para las llamadas con equilibrio de carga. El valor 0 significa que el kernel no espera, pero entra directamente en el siguiente estado de apagado, es decir, la detención.
|
Respuestas
Nombre |
Tipo |
Description |
200 OK
|
OperationStatusResult
|
Aceptar
|
202 Accepted
|
|
Aceptado
|
Other Status Codes
|
ErrorResponse
|
Respuesta de error que describe el motivo del error de la operación.
|
Seguridad
azure_auth
Flujo OAuth2 de Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nombre |
Description |
user_impersonation
|
suplantación de su cuenta de usuario
|
Ejemplos
SAPVirtualInstances_Stop
Sample Request
POST https://management.azure.com/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Workloads/sapVirtualInstances/X00/stop?api-version=2023-04-01
{
"softStopTimeoutSeconds": 0
}
import com.azure.resourcemanager.workloads.models.StopRequest;
/** Samples for SapVirtualInstances Stop. */
public final class Main {
/*
* x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json
*/
/**
* Sample code: SAPVirtualInstances_Stop.
*
* @param manager Entry point to WorkloadsManager.
*/
public static void sAPVirtualInstancesStop(com.azure.resourcemanager.workloads.WorkloadsManager manager) {
manager
.sapVirtualInstances()
.stop("test-rg", "X00", new StopRequest().withSoftStopTimeoutSeconds(0L), 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_virtual_instances_stop.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_virtual_instances.begin_stop(
resource_group_name="test-rg",
sap_virtual_instance_name="X00",
).result()
print(response)
# x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Stop.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/azcore/to"
"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/SAPVirtualInstances_Stop.json
func ExampleSAPVirtualInstancesClient_BeginStop() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armworkloads.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewSAPVirtualInstancesClient().BeginStop(ctx, "test-rg", "X00", &armworkloads.SAPVirtualInstancesClientBeginStopOptions{Body: &armworkloads.StopRequest{
SoftStopTimeoutSeconds: to.Ptr[int64](0),
},
})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.OperationStatusResult = armworkloads.OperationStatusResult{
// Name: to.Ptr("1e4193c3-206e-4916-b124-1da16175eb0e"),
// EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:38:07.000Z"); return t}()),
// ID: to.Ptr("/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/operations/locations/centralus/1e4193c3-206e-4916-b124-1da16175eb0e"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T03:36:07.000Z"); return t}()),
// Status: to.Ptr("Succeeded"),
// }
}
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 Stops the SAP Application, that is the Application server instances and Central Services instance.
*
* @summary Stops the SAP Application, that is the Application server instances and Central Services instance.
* x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json
*/
async function sapVirtualInstancesStop() {
const subscriptionId =
process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0";
const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
const sapVirtualInstanceName = "X00";
const body = { softStopTimeoutSeconds: 0 };
const options = { body };
const credential = new DefaultAzureCredential();
const client = new WorkloadsClient(credential, subscriptionId);
const result = await client.sAPVirtualInstances.beginStopAndWait(
resourceGroupName,
sapVirtualInstanceName,
options
);
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 System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Workloads;
using Azure.ResourceManager.Workloads.Models;
// Generated from example definition: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json
// this example is just showing the usage of "SAPVirtualInstances_Stop" 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 SapVirtualInstanceResource created on azure
// for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
string resourceGroupName = "test-rg";
string sapVirtualInstanceName = "X00";
ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
// invoke the operation
SapStopContent content = new SapStopContent()
{
SoftStopTimeoutSeconds = 0,
};
ArmOperation<OperationStatusResult> lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content);
OperationStatusResult result = lro.Value;
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
Sample Response
{
"id": "/subscriptions/6d875e77-e412-4d7d-9af4-8895278b4443/resourceGroups/test-rg/providers/Microsoft.Workloads/operations/locations/centralus/1e4193c3-206e-4916-b124-1da16175eb0e",
"name": "1e4193c3-206e-4916-b124-1da16175eb0e",
"status": "Succeeded",
"startTime": "2021-08-19T03:36:07.000Z",
"endTime": "2021-08-19T03:38:07.000Z",
"error": null
}
azure-AsyncOperation: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/EASTUS2EUAP/operationStatuses/b7d35156-cfc9-419f-838a-b1e7eff64474*465BB862DF6F3B58F4A29B409D4197F48D5A22B67E126174D4C11F42B19263E5?api-version=2021-12-01-preview
Definiciones
ErrorAdditionalInfo
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
Detalle del error.
Nombre |
Tipo |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Información adicional del error.
|
code
|
string
|
Código de error.
|
details
|
ErrorDetail[]
|
Los detalles del error.
|
message
|
string
|
El mensaje de error.
|
target
|
string
|
Destino del error.
|
ErrorResponse
Respuesta de error
Nombre |
Tipo |
Description |
error
|
ErrorDetail
|
Objeto de error.
|
OperationStatusResult
Estado actual de una operación asincrónica.
Nombre |
Tipo |
Description |
endTime
|
string
|
La hora de finalización de la operación.
|
error
|
ErrorDetail
|
Si está presente, detalles del error de operación.
|
id
|
string
|
Identificador completo para la operación asincrónica.
|
name
|
string
|
Nombre de la operación asincrónica.
|
operations
|
OperationStatusResult[]
|
Lista de operaciones.
|
percentComplete
|
number
|
Porcentaje de la operación que se ha completado.
|
startTime
|
string
|
La hora de inicio de la operación.
|
status
|
string
|
Estado de la operación.
|
StopRequest
Detenga el cuerpo de la solicitud de las instancias de SAP.
Nombre |
Tipo |
Valor predeterminado |
Description |
softStopTimeoutSeconds
|
integer
|
0
|
Este parámetro define cuánto tiempo (en segundos) espera el apagado temporal hasta que los clientes RFC/HTTP ya no tienen en cuenta el servidor para las llamadas con equilibrio de carga. El valor 0 significa que el kernel no espera, pero entra directamente en el siguiente estado de apagado, es decir, la detención.
|