forked from aws-samples/aws-dataexchange-api-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
30 lines (26 loc) · 874 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Threading.Tasks;
using Amazon.DataExchange;
using Amazon.DataExchange.Model;
namespace AwsDataExchangeSample
{
class Program
{
static void Main(string[] args)
{
AmazonDataExchangeClient client = new AmazonDataExchangeClient();
ListDataSetsRequest listDataSetsRequest = new ListDataSetsRequest();
listDataSetsRequest.Origin = "ENTITLED";
Task<ListDataSetsResponse> dataSetsRequestTask = client.ListDataSetsAsync(listDataSetsRequest);
dataSetsRequestTask.Wait();
foreach (DataSetEntry dataSetEntry in dataSetsRequestTask.Result.DataSets)
{
Console.WriteLine("{0}/{1}: {2}\n {3}",
dataSetEntry.OriginDetails.ProductId,
dataSetEntry.Id,
dataSetEntry.Name,
dataSetEntry.Description);
}
}
}
}