Trying to get the total count of api keys in my API gateway through SDK. Also, I am unsure of the proper implementation of the parameters that the GetApiKeysRequest takes in.
My main objective is to get the count of all API keys that are already existing for my account.
The code goes this way:
class Program
{
public static void Main(string[] args)
{
var awsUserAccessKey = "xxxxx";
var awsUserSecretKey = "yyyyyyyyyyy";
var regionEndpoint = "us-west-2";
var keysInRepository = new GetApiKeysRequest
{
CustomerId = "",
IncludeValues = true||false,
Limit=0,
NameQuery = "",
Position = ""
};
var client = new AmazonAPIGatewayClient(awsUserAccessKey, awsUserSecretKey, regionEndpoint);
var apiKeys =client.GetApiKeys(keysInRepository);
Console.Read();
}
}
This same code gives an error. The security token in this request is invalid (Amazon.APIGateway exception).
I am not sure about how to set the parameters for this request.