Ruft Die Metadaten von Anbietervorgängen für den angegebenen Ressourcenanbieter ab.
GET https://management.azure.com/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}?api-version=2022-04-01
With optional parameters:
GET https://management.azure.com/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}?api-version=2022-04-01&$expand={$expand}
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
resourceProviderNamespace
|
path |
True
|
string
|
Der Namespace des Ressourcenanbieters.
|
api-version
|
query |
True
|
string
|
Hierbei handelt es sich um die für diesen Vorgang zu verwendende API-Version.
|
$expand
|
query |
|
string
|
Gibt an, ob die Werte erweitert werden sollen.
|
Antworten
Berechtigungen
Ihnen muss eine Rolle mit den folgenden Berechtigungen zugewiesen sein, damit Sie diese API aufrufen können. Weitere Informationen finden Sie unter Integrierte Azure-Rollen.
Microsoft.Authorization/providerOperations/read
Sicherheit
azure_auth
Azure Active Directory-OAuth2-Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel Ihres Benutzerkontos
|
Beispiele
Sample Request
GET https://management.azure.com/providers/Microsoft.Authorization/providerOperations/resourceProviderNamespace?api-version=2022-04-01
/** Samples for ProviderOperationsMetadata Get. */
public final class Main {
/*
* x-ms-original-file:
* specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/
* GetProviderOperationsRP.json
*/
/**
* Sample code: List provider operations metadata for resource provider.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void
listProviderOperationsMetadataForResourceProvider(com.azure.resourcemanager.AzureResourceManager azure) {
azure.accessManagement().roleAssignments().manager().roleServiceClient().getProviderOperationsMetadatas()
.getWithResponse("resourceProviderNamespace", 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.authorization import AuthorizationManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-authorization
# USAGE
python get_provider_operations_rp.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 = AuthorizationManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.provider_operations_metadata.get(
resource_provider_namespace="resourceProviderNamespace",
)
print(response)
# x-ms-original-file: specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetProviderOperationsRP.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 armauthorization_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/310a0100f5b020c1900c527a6aa70d21992f078a/specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetProviderOperationsRP.json
func ExampleProviderOperationsMetadataClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armauthorization.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProviderOperationsMetadataClient().Get(ctx, "resourceProviderNamespace", &armauthorization.ProviderOperationsMetadataClientGetOptions{Expand: 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.ProviderOperationsMetadata = armauthorization.ProviderOperationsMetadata{
// Name: to.Ptr("name"),
// Type: to.Ptr("type"),
// DisplayName: to.Ptr("displayName"),
// ID: to.Ptr("id"),
// ResourceTypes: []*armauthorization.ResourceType{
// {
// Name: to.Ptr("name"),
// DisplayName: to.Ptr("name"),
// Operations: []*armauthorization.ProviderOperation{
// },
// }},
// Operations: []*armauthorization.ProviderOperation{
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AuthorizationManagementClient } = require("@azure/arm-authorization");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets provider operations metadata for the specified resource provider.
*
* @summary Gets provider operations metadata for the specified resource provider.
* x-ms-original-file: specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetProviderOperationsRP.json
*/
async function listProviderOperationsMetadataForResourceProvider() {
const resourceProviderNamespace = "resourceProviderNamespace";
const credential = new DefaultAzureCredential();
const client = new AuthorizationManagementClient(credential);
const result = await client.providerOperationsMetadataOperations.get(resourceProviderNamespace);
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.Authorization;
// Generated from example definition: specification/authorization/resource-manager/Microsoft.Authorization/stable/2022-04-01/examples/GetProviderOperationsRP.json
// this example is just showing the usage of "ProviderOperationsMetadata_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 TenantResource created on azure
// for more information of creating TenantResource, please refer to the document of TenantResource
var tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current;
// get the collection of this AuthorizationProviderOperationsMetadataResource
AuthorizationProviderOperationsMetadataCollection collection = tenantResource.GetAllAuthorizationProviderOperationsMetadata();
// invoke the operation
string resourceProviderNamespace = "resourceProviderNamespace";
NullableResponse<AuthorizationProviderOperationsMetadataResource> response = await collection.GetIfExistsAsync(resourceProviderNamespace);
AuthorizationProviderOperationsMetadataResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
AuthorizationProviderOperationsMetadataData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
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": "id",
"name": "name",
"type": "type",
"displayName": "displayName",
"resourceTypes": [
{
"name": "name",
"displayName": "name",
"operations": []
}
],
"operations": []
}
Definitionen
ErrorAdditionalInfo
Zusätzliche Informationen zum Ressourcenverwaltungsfehler.
Name |
Typ |
Beschreibung |
info
|
object
|
Zusätzliche Informationen.
|
type
|
string
|
Typ der zusätzlichen Informationen.
|
ErrorDetail
Die Fehlerdetails.
Name |
Typ |
Beschreibung |
additionalInfo
|
ErrorAdditionalInfo[]
|
Die zusätzlichen Fehlerinformationen.
|
code
|
string
|
Der Fehlercode.
|
details
|
ErrorDetail[]
|
Die Fehlerdetails.
|
message
|
string
|
Die Fehlermeldung.
|
target
|
string
|
Das Fehlerziel.
|
ErrorResponse
Fehlerantwort
Name |
Typ |
Beschreibung |
error
|
ErrorDetail
|
Das Fehlerobjekt.
|
ProviderOperation
Vorgang
Name |
Typ |
Beschreibung |
description
|
string
|
Die Vorgangsbeschreibung.
|
displayName
|
string
|
Der Anzeigename des Vorgangs.
|
isDataAction
|
boolean
|
Das dataAction-Flag, um den Vorgangstyp anzugeben.
|
name
|
string
|
Der Vorgangsname.
|
origin
|
string
|
Der Vorgangsursprung.
|
Metadaten für Anbietervorgänge
Name |
Typ |
Beschreibung |
displayName
|
string
|
Der Anzeigename des Anbieters.
|
id
|
string
|
Die Anbieter-ID.
|
name
|
string
|
Der Anbietername.
|
operations
|
ProviderOperation[]
|
Die Anbietervorgänge.
|
resourceTypes
|
ResourceType[]
|
Die Anbieterressourcentypen
|
type
|
string
|
Der Anbietertyp.
|
ResourceType
Ressourcentyp
Name |
Typ |
Beschreibung |
displayName
|
string
|
Der Anzeigename des Ressourcentyps.
|
name
|
string
|
Der Name des Ressourcentyps.
|
operations
|
ProviderOperation[]
|
Die Ressourcentypvorgänge.
|