public void SecretsManagerListSecrets()
        {
            #region to-list-the-secrets-in-your-account-1524001246087

            var response = client.ListSecrets(new ListSecretsRequest
            {
            });

            List <SecretListEntry> secretList = response.SecretList;

            #endregion
        }
Esempio n. 2
0
        public void ListSecretsSmokeTest()
        {
#if BCL
            var response = secretsManagerClient.ListSecrets(new ListSecretsRequest
            {
            });
#elif CORECLR
            var response = secretsManagerClient.ListSecretsAsync(new ListSecretsRequest
            {
            }).Result;
#endif
            Assert.NotNull(response);
        }
        IEnumerable <ListSecretsResponse> IPaginator <ListSecretsResponse> .Paginate()
        {
            if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
            {
                throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
            }
            var nextToken = _request.NextToken;
            ListSecretsResponse response;

            do
            {
                _request.NextToken = nextToken;
                response           = _client.ListSecrets(_request);
                nextToken          = response.NextToken;
                yield return(response);
            }while (nextToken != null);
        }
Esempio n. 4
0
 private Amazon.SecretsManager.Model.ListSecretsResponse CallAWSServiceOperation(IAmazonSecretsManager client, Amazon.SecretsManager.Model.ListSecretsRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Secrets Manager", "ListSecrets");
     try
     {
         #if DESKTOP
         return(client.ListSecrets(request));
         #elif CORECLR
         return(client.ListSecretsAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }