Há mais exemplos do AWS SDK disponíveis no repositório do GitHub Documento de Exemplos do AWS SDK
Usar DescribeExportTasks com um SDK da AWS
O código de exemplo a seguir mostra como usar DescribeExportTasks.
- .NET
-
- SDK para .NET
-
nota
Há mais no GitHub. Encontre o exemplo completo e veja como configurar e executar no AWS Code Examples Repository
. using System; using System.Threading.Tasks; using Amazon.CloudWatchLogs; using Amazon.CloudWatchLogs.Model; /// <summary> /// Shows how to retrieve a list of information about Amazon CloudWatch /// Logs export tasks. /// </summary> public class DescribeExportTasks { public static async Task Main() { // This client object will be associated with the same AWS Region // as the default user on this system. If you need to use a // different AWS Region, pass it as a parameter to the client // constructor. var client = new AmazonCloudWatchLogsClient(); var request = new DescribeExportTasksRequest { Limit = 5, }; var response = new DescribeExportTasksResponse(); do { response = await client.DescribeExportTasksAsync(request); response.ExportTasks.ForEach(t => { Console.WriteLine($"{t.TaskName} with ID: {t.TaskId} has status: {t.Status}"); }); } while (response.NextToken is not null); } }-
Consulte detalhes da API em DescribeExportTasks na Referência da API AWS SDK para .NET.
-
DeleteSubscriptionFilter
DescribeLogGroups