Get the status of an azure asynchronous operation associated with a private link scope operation.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/privateLinkScopeOperationStatuses/{asyncOperationId}?api-version=2021-07-01-preview
URI Parameters
Name |
In |
Required |
Type |
Description |
asyncOperationId
|
path |
True
|
string
|
The operation Id.
|
resourceGroupName
|
path |
True
|
string
|
The name of the resource group. The name is case insensitive.
|
subscriptionId
|
path |
True
|
string
|
The ID of the target subscription.
|
api-version
|
query |
True
|
string
|
The API version to use for this operation.
|
Responses
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
impersonate your user account
|
Examples
Get specific operation status
Sample request
GET https://management.azure.com/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/MyResourceGroup/providers/microsoft.insights/privateLinkScopeOperationStatuses/713192d7-503f-477a-9cfe-4efc3ee2bd11?api-version=2021-07-01-preview
/**
* Samples for PrivateLinkScopeOperationStatus GetByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/
* privateLinkScopeOperationStatuses.json
*/
/**
* Sample code: Get specific operation status.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void getSpecificOperationStatus(com.azure.resourcemanager.AzureResourceManager azure) {
azure.diagnosticSettings().manager().serviceClient().getPrivateLinkScopeOperationStatus()
.getByResourceGroupWithResponse("MyResourceGroup", "713192d7-503f-477a-9cfe-4efc3ee2bd11",
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
package armmonitor_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/969fd0c2634fbcc1975d7abe3749330a5145a97c/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/privateLinkScopeOperationStatuses.json
func ExamplePrivateLinkScopeOperationStatusClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmonitor.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkScopeOperationStatusClient().Get(ctx, "713192d7-503f-477a-9cfe-4efc3ee2bd11", "MyResourceGroup", 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.OperationStatus = armmonitor.OperationStatus{
// Name: to.Ptr("713192d7-503f-477a-9cfe-4efc3ee2bd11"),
// EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-01T16:13:13.933Z"); return t}()),
// ID: to.Ptr("/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/privateLinkScopeOperationStatuses/713192d7-503f-477a-9cfe-4efc3ee2bd11"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-01T13:13:13.933Z"); 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 { MonitorClient } = require("@azure/arm-monitor");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the status of an azure asynchronous operation associated with a private link scope operation.
*
* @summary Get the status of an azure asynchronous operation associated with a private link scope operation.
* x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/privateLinkScopeOperationStatuses.json
*/
async function getSpecificOperationStatus() {
const subscriptionId =
process.env["MONITOR_SUBSCRIPTION_ID"] || "613192d7-503f-477a-9cfe-4efc3ee2bd60";
const asyncOperationId = "713192d7-503f-477a-9cfe-4efc3ee2bd11";
const resourceGroupName = process.env["MONITOR_RESOURCE_GROUP"] || "MyResourceGroup";
const credential = new DefaultAzureCredential();
const client = new MonitorClient(credential, subscriptionId);
const result = await client.privateLinkScopeOperationStatus.get(
asyncOperationId,
resourceGroupName,
);
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.Monitor.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Monitor;
// Generated from example definition: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/privateLinkScopeOperationStatuses.json
// this example is just showing the usage of "PrivateLinkScopeOperationStatus_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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "613192d7-503f-477a-9cfe-4efc3ee2bd60";
string resourceGroupName = "MyResourceGroup";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// invoke the operation
string asyncOperationId = "713192d7-503f-477a-9cfe-4efc3ee2bd11";
MonitorPrivateLinkScopeOperationStatus result = await resourceGroupResource.GetPrivateLinkScopeOperationStatusAsync(asyncOperationId);
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/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/privateLinkScopeOperationStatuses/713192d7-503f-477a-9cfe-4efc3ee2bd11",
"name": "713192d7-503f-477a-9cfe-4efc3ee2bd11",
"startTime": "2017-01-01T13:13:13.933Z",
"endTime": "2017-01-01T16:13:13.933Z",
"status": "Succeeded"
}
Definitions
DefaultErrorResponse
Default error response
Name |
Type |
Description |
error
|
ErrorDetail
|
The error object.
|
ErrorAdditionalInfo
The resource management error additional info.
Name |
Type |
Description |
info
|
object
|
The additional info.
|
type
|
string
|
The additional info type.
|
ErrorDetail
The error detail.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
code
|
string
|
The error code.
|
details
|
ErrorDetail[]
|
The error details.
|
message
|
string
|
The error message.
|
target
|
string
|
The error target.
|
OperationStatus
The status of operation.
Name |
Type |
Description |
endTime
|
string
|
End time of the job in standard ISO8601 format.
|
error
|
ErrorDetail
|
The error detail of the operation if any.
|
id
|
string
|
The operation Id.
|
name
|
string
|
The operation name.
|
startTime
|
string
|
Start time of the job in standard ISO8601 format.
|
status
|
string
|
The status of the operation.
|