POST https://management.azure.com/subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp/providers/Microsoft.Help/solutions/SolutionResourceName1/warmup?api-version=2024-03-01-preview
/**
* Samples for SolutionOperation WarmUp.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_WarmUp.json
*/
/**
* Sample code: Solution_WarmUp.
*
* @param manager Entry point to SelfHelpManager.
*/
public static void solutionWarmUp(com.azure.resourcemanager.selfhelp.SelfHelpManager manager) {
manager.solutionOperations().warmUpWithResponse(
"subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp",
"SolutionResourceName1", null, 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.selfhelp import SelfHelpMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-selfhelp
# USAGE
python solution_warm_up.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 = SelfHelpMgmtClient(
credential=DefaultAzureCredential(),
)
client.solution.warm_up(
scope="subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp",
solution_resource_name="SolutionResourceName1",
)
# x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_WarmUp.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 armselfhelp_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/selfhelp/armselfhelp/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c3cc9abe085093ba880ee3eeb792edb4fa789553/specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_WarmUp.json
func ExampleSolutionClient_WarmUp() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armselfhelp.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewSolutionClient().WarmUp(ctx, "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp", "SolutionResourceName1", &armselfhelp.SolutionClientWarmUpOptions{SolutionWarmUpRequestBody: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { HelpRP } = require("@azure/arm-selfhelp");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Warm up the solution resource by preloading asynchronous diagnostics results into cache
*
* @summary Warm up the solution resource by preloading asynchronous diagnostics results into cache
* x-ms-original-file: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_WarmUp.json
*/
async function solutionWarmUp() {
const scope =
"subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp";
const solutionResourceName = "SolutionResourceName1";
const credential = new DefaultAzureCredential();
const client = new HelpRP(credential);
const result = await client.solution.warmUp(scope, solutionResourceName);
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.SelfHelp.Models;
using Azure.ResourceManager.SelfHelp;
// Generated from example definition: specification/help/resource-manager/Microsoft.Help/preview/2024-03-01-preview/examples/Solution_WarmUp.json
// this example is just showing the usage of "Solution_WarmUp" 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 SelfHelpSolutionResource created on azure
// for more information of creating SelfHelpSolutionResource, please refer to the document of SelfHelpSolutionResource
string scope = "subscriptions/mySubscription/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-rp";
string solutionResourceName = "SolutionResourceName1";
ResourceIdentifier selfHelpSolutionResourceId = SelfHelpSolutionResource.CreateResourceIdentifier(scope, solutionResourceName);
SelfHelpSolutionResource selfHelpSolution = client.GetSelfHelpSolutionResource(selfHelpSolutionResourceId);
// invoke the operation
await selfHelpSolution.WarmUpAsync();
Console.WriteLine("Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue