GET https://management.azure.com/providers/Microsoft.DocumentDB/operations?api-version=2025-04-15
/**
* Samples for Operations List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2025-04-15/examples/CosmosDBOperationsList.
* json
*/
/**
* Sample code: CosmosDBOperationsList.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void cosmosDBOperationsList(com.azure.resourcemanager.AzureResourceManager azure) {
azure.cosmosDBAccounts().manager().serviceClient().getOperations().list(com.azure.core.util.Context.NONE);
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.cosmosdb import CosmosDBManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-cosmosdb
# USAGE
python cosmos_db_operations_list.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 = CosmosDBManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.operations.list()
for item in response:
print(item)
# x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2025-04-15/examples/CosmosDBOperationsList.json
if __name__ == "__main__":
main()
package armcosmos_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/011ecc5633300a5eefe43dde748f269d39e96458/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2025-04-15/examples/CosmosDBOperationsList.json
func ExampleOperationsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcosmos.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationsClient().NewListPager(nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.OperationListResult = armcosmos.OperationListResult{
// Value: []*armcosmos.Operation{
// {
// Name: to.Ptr("operationName"),
// Display: &armcosmos.OperationDisplay{
// Description: to.Ptr("description"),
// Operation: to.Ptr("operationName"),
// Provider: to.Ptr("providerName"),
// Resource: to.Ptr("resourceName"),
// },
// }},
// }
}
}
const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Lists all of the available Cosmos DB Resource Provider operations.
*
* @summary Lists all of the available Cosmos DB Resource Provider operations.
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2025-04-15/examples/CosmosDBOperationsList.json
*/
async function cosmosDbOperationsList() {
const subscriptionId =
process.env["COSMOSDB_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new CosmosDBManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (const item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
Ergebnis der Anforderung zum Auflisten von Ressourcenanbietervorgängen. Sie enthält eine Liste von Vorgängen und einen URL-Link, um den nächsten Satz von Ergebnissen abzurufen.
Display
Objekt
Das Objekt, das den Vorgang darstellt.
Name
Typ
Beschreibung
Description
string
Beschreibung des Vorgangs
Operation
string
Vorgangstyp: Lesen, Schreiben, Löschen usw.
Provider
string
Dienstanbieter: Microsoft.ResourceProvider
Resource
string
Ressource, für die der Vorgang ausgeführt wird: Profil, Endpunkt usw.
Ergebnis der Anforderung zum Auflisten von Ressourcenanbietervorgängen. Sie enthält eine Liste von Vorgängen und einen URL-Link, um den nächsten Satz von Ergebnissen abzurufen.
Name
Typ
Beschreibung
nextLink
string
URL zum Abrufen des nächsten Vorgangslistenergebnisses, falls vorhanden.