GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}?api-version=2022-02-22
URI Parameters
Name
In
Required
Type
Description
automationAccountName
path
True
string
The name of the automation account.
hybridRunbookWorkerGroupName
path
True
string
The hybrid runbook worker group name
resourceGroupName
path
True
string
Name of an Azure Resource group.
Regex pattern: ^[-\w\._]+$
subscriptionId
path
True
string
Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/testaccount/hybridRunbookWorkerGroups/TestHybridGroup?api-version=2022-02-22
import com.azure.core.util.Context;
/** Samples for HybridRunbookWorkerGroup Get. */
public final class Main {
/*
* x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/getHybridRunbookWorkerGroup.json
*/
/**
* Sample code: Get a hybrid worker group.
*
* @param manager Entry point to AutomationManager.
*/
public static void getAHybridWorkerGroup(com.azure.resourcemanager.automation.AutomationManager manager) {
manager.hybridRunbookWorkerGroups().getWithResponse("rg", "testaccount", "TestHybridGroup", Context.NONE);
}
}
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Automation;
using Azure.ResourceManager.Automation.Models;
// Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/getHybridRunbookWorkerGroup.json
// this example is just showing the usage of "HybridRunbookWorkerGroup_Get" 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 HybridRunbookWorkerGroupResource created on azure
// for more information of creating HybridRunbookWorkerGroupResource, please refer to the document of HybridRunbookWorkerGroupResource
string subscriptionId = "subid";
string resourceGroupName = "rg";
string automationAccountName = "testaccount";
string hybridRunbookWorkerGroupName = "TestHybridGroup";
ResourceIdentifier hybridRunbookWorkerGroupResourceId = HybridRunbookWorkerGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName);
HybridRunbookWorkerGroupResource hybridRunbookWorkerGroup = client.GetHybridRunbookWorkerGroupResource(hybridRunbookWorkerGroupResourceId);
// invoke the operation
HybridRunbookWorkerGroupResource result = await hybridRunbookWorkerGroup.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
HybridRunbookWorkerGroupData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");