from azure.identity import DefaultAzureCredential
from azure.mgmt.healthdataaiservices import HealthDataAIServicesMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-healthdataaiservices
# USAGE
python operations_list_maximum_set_gen.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 = HealthDataAIServicesMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.operations.list()
for item in response:
print(item)
# x-ms-original-file: 2024-09-20/Operations_List_MaximumSet_Gen.json
if __name__ == "__main__":
main()
package armhealthdataaiservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthdataaiservices/armhealthdataaiservices"
)
// Generated from example definition: 2024-09-20/Operations_List_MaximumSet_Gen.json
func ExampleOperationsClient_NewListPager_operationsListMaximumSetGeneratedByMaximumSetRuleStable() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhealthdataaiservices.NewClientFactory("<subscriptionID>", 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 = armhealthdataaiservices.OperationsClientListResponse{
// OperationListResult: armhealthdataaiservices.OperationListResult{
// Value: []*armhealthdataaiservices.Operation{
// {
// Name: to.Ptr("vlozcqymdxttexvmhouwzob"),
// IsDataAction: to.Ptr(true),
// Display: &armhealthdataaiservices.OperationDisplay{
// Provider: to.Ptr("hwy"),
// Resource: to.Ptr("yxabgnzjshmqldqthxonpam"),
// Operation: to.Ptr("quwaawjasjgpqhskxoxzx"),
// Description: to.Ptr("ayqiodducsbwvzcgno"),
// },
// Origin: to.Ptr(armhealthdataaiservices.OriginUser),
// ActionType: to.Ptr(armhealthdataaiservices.ActionTypeInternal),
// },
// },
// NextLink: to.Ptr("https://microsoft.com/a"),
// },
// }
}
}
const { HealthDataAIServicesClient } = require("@azure/arm-healthdataaiservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to list the operations for the provider
*
* @summary list the operations for the provider
* x-ms-original-file: 2024-09-20/Operations_List_MaximumSet_Gen.json
*/
async function operationsListMaximumSetGeneratedByMaximumSetRuleStable() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-00000000000";
const client = new HealthDataAIServicesClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.healthdataaiservices import HealthDataAIServicesMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-healthdataaiservices
# USAGE
python operations_list_minimum_set_gen.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 = HealthDataAIServicesMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.operations.list()
for item in response:
print(item)
# x-ms-original-file: 2024-09-20/Operations_List_MinimumSet_Gen.json
if __name__ == "__main__":
main()
package armhealthdataaiservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/healthdataaiservices/armhealthdataaiservices"
)
// Generated from example definition: 2024-09-20/Operations_List_MinimumSet_Gen.json
func ExampleOperationsClient_NewListPager_operationsListMinimumSetGeneratedByMinimumSetRuleStable() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhealthdataaiservices.NewClientFactory("<subscriptionID>", 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 = armhealthdataaiservices.OperationsClientListResponse{
// OperationListResult: armhealthdataaiservices.OperationListResult{
// },
// }
}
}
const { HealthDataAIServicesClient } = require("@azure/arm-healthdataaiservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to list the operations for the provider
*
* @summary list the operations for the provider
* x-ms-original-file: 2024-09-20/Operations_List_MinimumSet_Gen.json
*/
async function operationsListMinimumSetGeneratedByMinimumSetRuleStable() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-00000000000";
const client = new HealthDataAIServicesClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operations.list()) {
resArray.push(item);
}
console.log(resArray);
}
Uma lista de operações da API REST com suporte por um Provedor de Recursos do Azure. Ele contém um link de URL para obter o próximo conjunto de resultados.
O executor pretendido da operação; como no RBAC (Controle de Acesso Baseado em Recursos) e na UX de logs de auditoria. O valor padrão é "user,system"
ActionType
Enumeração
Enumeração. Indica o tipo de ação. "Interno" refere-se a ações que são apenas para APIs internas.
Valor
Description
Internal
Display
Objeto
Informações de exibição localizadas para esta operação específica.
Nome
Tipo
Description
description
string
A descrição amigável curta e localizada da operação; adequado para dicas de ferramentas e exibições detalhadas.
operation
string
O nome amigável conciso localizado para a operação; adequado para listas suspensas. Por exemplo, "Criar ou atualizar máquina virtual", "Reiniciar máquina virtual".
provider
string
A forma amigável localizada do nome do provedor de recursos, por exemplo, "Microsoft Monitoring Insights" ou "Microsoft Compute".
resource
string
O nome amigável localizado do tipo de recurso relacionado a essa operação. Por exemplo, "Máquinas Virtuais" ou "Coleções de Agendamento de Trabalho".
ErrorAdditionalInfo
Objeto
As informações adicionais do erro de gerenciamento de recursos.
Informações de exibição localizadas para esta operação específica.
isDataAction
boolean
Se a operação se aplica ao plano de dados. Isso é "true" para operações de plano de dados e "false" para operações arm/control-plane.
name
string
O nome da operação, de acordo com o RBAC (Controle de Acesso Resource-Based). Exemplos: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
O executor pretendido da operação; como no RBAC (Controle de Acesso Baseado em Recursos) e na UX de logs de auditoria. O valor padrão é "user,system"
OperationListResult
Objeto
Uma lista de operações da API REST com suporte por um Provedor de Recursos do Azure. Ele contém um link de URL para obter o próximo conjunto de resultados.
Nome
Tipo
Description
nextLink
string
(uri)
URL para obter o próximo conjunto de resultados da lista de operações (se houver algum).