public static CancelKeyDeletionResponse Unmarshall(UnmarshallerContext context)
        {
            CancelKeyDeletionResponse cancelKeyDeletionResponse = new CancelKeyDeletionResponse();

            cancelKeyDeletionResponse.HttpResponse = context.HttpResponse;
            cancelKeyDeletionResponse.RequestId    = context.StringValue("CancelKeyDeletion.RequestId");

            return(cancelKeyDeletionResponse);
        }
        public static CancelKeyDeletionResponse Unmarshall(UnmarshallerContext context)
        {
            CancelKeyDeletionResponse cancelKeyDeletionResponse = new CancelKeyDeletionResponse();

            cancelKeyDeletionResponse.HttpResponse = context.HttpResponse;
            cancelKeyDeletionResponse.RequestId = context.StringValue("CancelKeyDeletion.RequestId");

            return cancelKeyDeletionResponse;
        }
Beispiel #3
0
        private static async Task CancelKeyDeletion(KmsManagementClient kmsManagementClient, string keyId)
        {
            logger.Info("Cancel Key Deletion");

            CancelKeyDeletionRequest cancelKeyDeletionRequest = new CancelKeyDeletionRequest
            {
                KeyId = keyId
            };
            CancelKeyDeletionResponse cancelKeyDeletionResponse = await kmsManagementClient.CancelKeyDeletion(cancelKeyDeletionRequest);

            logger.Info($"Key Disabled Successfully: {cancelKeyDeletionResponse.Key.DisplayName}");
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            CancelKeyDeletionResponse response = new CancelKeyDeletionResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("KeyId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.KeyId = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }