Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.ListAccessKeysAsync C# (CSharp) Method

ListAccessKeysAsync() public method

/// The request was rejected because it referenced an entity that does not exist. The /// error message describes the entity. /// /// The request processing has failed because of an unknown error, exception or failure. ///
public ListAccessKeysAsync ( ListAccessKeysResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
callback ListAccessKeysResponse>.AmazonServiceCallback
options AsyncOptions /// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property. ///
return void
        public void ListAccessKeysAsync(AmazonServiceCallback<ListAccessKeysRequest, ListAccessKeysResponse> callback, AsyncOptions options = null)
        {
            ListAccessKeysAsync(new ListAccessKeysRequest(), callback, options);
        }

Same methods

AmazonIdentityManagementServiceClient::ListAccessKeysAsync ( ListAccessKeysRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient::ListAccessKeysAsync ( System cancellationToken = default(CancellationToken) ) : Task
AmazonIdentityManagementServiceClient::ListAccessKeysAsync ( ListAccessKeysRequest request, ListAccessKeysResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void

Usage Example

Exemplo n.º 1
0
 public static void DeleteAccessKeysForUser(AmazonIdentityManagementServiceClient client, string username)
 {
     ListAccessKeysResponse response = client.ListAccessKeysAsync(new ListAccessKeysRequest() { UserName = username }).Result;
     foreach (AccessKeyMetadata akm in response.AccessKeyMetadata)
     {
         client.DeleteAccessKeyAsync(new DeleteAccessKeyRequest() { UserName = username, AccessKeyId = akm.AccessKeyId }).Wait();
     }
 }
AmazonIdentityManagementServiceClient