Retrieve a list of jobs streams identified by job name.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams?api-version=2019-06-01
With optional parameters:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName}/streams?$filter={$filter}&api-version=2019-06-01
URI Parameters
Name
In
Required
Type
Description
automationAccountName
path
True
string
The name of the automation account.
jobName
path
True
string
The job 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/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobs/foo/streams?api-version=2019-06-01
import com.azure.core.util.Context;
/** Samples for JobStream ListByJob. */
public final class Main {
/*
* x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/listJobStreamsByJob.json
*/
/**
* Sample code: List job streams by job name.
*
* @param manager Entry point to AutomationManager.
*/
public static void listJobStreamsByJobName(com.azure.resourcemanager.automation.AutomationManager manager) {
manager.jobStreams().listByJob("mygroup", "ContoseAutomationAccount", "foo", null, null, 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/2019-06-01/examples/job/listJobStreamsByJob.json
// this example is just showing the usage of "JobStream_ListByJob" 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 AutomationJobResource created on azure
// for more information of creating AutomationJobResource, please refer to the document of AutomationJobResource
string subscriptionId = "51766542-3ed7-4a72-a187-0c8ab644ddab";
string resourceGroupName = "mygroup";
string automationAccountName = "ContoseAutomationAccount";
string jobName = "foo";
ResourceIdentifier automationJobResourceId = AutomationJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, jobName);
AutomationJobResource automationJob = client.GetAutomationJobResource(automationJobResourceId);
// invoke the operation and iterate over the result
await foreach (AutomationJobStream item in automationJob.GetJobStreamsAsync())
{
Console.WriteLine($"Succeeded: {item}");
}
Console.WriteLine($"Succeeded");