Elencare tutti i file di log in un determinato server.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/logFiles?api-version=2018-06-01
Parametri dell'URI
Nome
In
Necessario
Tipo
Descrizione
resourceGroupName
path
True
string
Nome del gruppo di risorse. Per il nome non viene fatta distinzione tra maiuscole e minuscole.
GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforMariaDB/servers/testserver/logFiles?api-version=2018-06-01
/**
* Samples for LogFiles ListByServer.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/LogFileListByServer.json
*/
/**
* Sample code: LogFileList.
*
* @param manager Entry point to MariaDBManager.
*/
public static void logFileList(com.azure.resourcemanager.mariadb.MariaDBManager manager) {
manager.logFiles().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE);
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.rdbms.mariadb import MariaDBManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-rdbms
# USAGE
python log_file_list_by_server.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 = MariaDBManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.log_files.list_by_server(
resource_group_name="TestGroup",
server_name="testserver",
)
for item in response:
print(item)
# x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/LogFileListByServer.json
if __name__ == "__main__":
main()
const { MariaDBManagementClient } = require("@azure/arm-mariadb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List all the log files in a given server.
*
* @summary List all the log files in a given server.
* x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/LogFileListByServer.json
*/
async function logFileList() {
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = "TestGroup";
const serverName = "testserver";
const credential = new DefaultAzureCredential();
const client = new MariaDBManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.logFiles.listByServer(resourceGroupName, serverName)) {
resArray.push(item);
}
console.log(resArray);
}
logFileList().catch(console.error);
Risposta di errore
Risposta di errore comune per tutte le API Resource Manager di Azure per restituire i dettagli dell'errore per le operazioni non riuscite. Segue anche il formato di risposta di errore OData.
ErrorAdditionalInfo
Informazioni aggiuntive sull'errore di gestione delle risorse.
ID di risorsa completo per la risorsa. Ad esempio - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
name
string
Nome del file di log.
properties.createdTime
string
Timestamp di creazione del file di log.
properties.lastModifiedTime
string
Timestamp dell'ultima modifica del file di log.
properties.sizeInKB
integer
Dimensioni del file di log.
properties.type
string
Tipo del file di log.
properties.url
string
URL da cui scaricare il file di log.
type
string
Tipo di risorsa. Ad esempio, "Microsoft.Compute/virtualMachines" o "Microsoft.Storage/storageAccounts"