/// <summary> /// Checks whether you have the required permissions for the action, without actually making the request. /// </summary> /// <param name="request">Request to do a dry run of.</param> /// <returns>Result of the dry run.</returns> public DryRunResponse DryRun(AmazonEC2Request request) { DryRunResponse response = new DryRunResponse { IsSuccessful = false }; if (request == null) { response.Message = "Request must not be null"; return response; } DryRunInfo dryRunInfo; Type requestType = request.GetType(); if (!MethodCache.TryGetValue(requestType, out dryRunInfo) || dryRunInfo == null) { response.Message = "Unrecognized request"; return response; } dryRunInfo.DryRun(this, request, ref response); return response; }