public void KeyManagementServiceCancelKeyDeletion()
        {
            #region to-cancel-deletion-of-a-cmk-1477428535102

            var response = client.CancelKeyDeletion(new CancelKeyDeletionRequest
            {
                KeyId = "1234abcd-12ab-34cd-56ef-1234567890ab" // The identifier of the CMK whose deletion you are canceling. You can use the key ID or the Amazon Resource Name (ARN) of the CMK.
            });

            string keyId = response.KeyId; // The ARN of the CMK whose deletion you canceled.

            #endregion
        }
Example #2
0
 private Amazon.KeyManagementService.Model.CancelKeyDeletionResponse CallAWSServiceOperation(IAmazonKeyManagementService client, Amazon.KeyManagementService.Model.CancelKeyDeletionRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Key Management Service", "CancelKeyDeletion");
     try
     {
         #if DESKTOP
         return(client.CancelKeyDeletion(request));
         #elif CORECLR
         return(client.CancelKeyDeletionAsync(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;
     }
 }