internal virtual RestoreSecretResponse RestoreSecret(RestoreSecretRequest request) { var marshaller = RestoreSecretRequestMarshaller.Instance; var unmarshaller = RestoreSecretResponseUnmarshaller.Instance; return(Invoke <RestoreSecretRequest, RestoreSecretResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the RestoreSecret operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RestoreSecret operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret">REST API Reference for RestoreSecret Operation</seealso> public virtual Task <RestoreSecretResponse> RestoreSecretAsync(RestoreSecretRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = RestoreSecretRequestMarshaller.Instance; var unmarshaller = RestoreSecretResponseUnmarshaller.Instance; return(InvokeAsync <RestoreSecretRequest, RestoreSecretResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the RestoreSecret operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RestoreSecret operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RestoreSecret">REST API Reference for RestoreSecret Operation</seealso> public virtual Task <RestoreSecretResponse> RestoreSecretAsync(RestoreSecretRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = RestoreSecretRequestMarshaller.Instance; options.ResponseUnmarshaller = RestoreSecretResponseUnmarshaller.Instance; return(InvokeAsync <RestoreSecretResponse>(request, options, cancellationToken)); }
internal virtual RestoreSecretResponse RestoreSecret(RestoreSecretRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = RestoreSecretRequestMarshaller.Instance; options.ResponseUnmarshaller = RestoreSecretResponseUnmarshaller.Instance; return(Invoke <RestoreSecretResponse>(request, options)); }
/// <summary> /// 取消凭据的定时删除任务 /// </summary> public async Task <RestoreSecretResponse> RestoreSecretAsync(RestoreSecretRequest restoreSecretRequest) { Dictionary <string, string> urlParam = new Dictionary <string, string>(); urlParam.Add("secret_id", restoreSecretRequest.SecretId.ToString()); string urlPath = HttpUtils.AddUrlPath("/v1/{project_id}/secrets/{secret_id}/scheduled-deleted-tasks/cancel", urlParam); SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", restoreSecretRequest); HttpResponseMessage response = await DoHttpRequestAsync("POST", request); return(JsonUtils.DeSerialize <RestoreSecretResponse>(response)); }
/// <summary> /// RestoreSecret接口的同步版本,该接口用于恢复计划删除(PendingDelete状态)中的凭据,取消计划删除。取消计划删除的凭据将处于Disabled 状态,如需恢复使用,通过EnableSecret 接口开启凭据。 /// </summary> /// <param name="req">参考<see cref="RestoreSecretRequest"/></param> /// <returns>参考<see cref="RestoreSecretResponse"/>实例</returns> public RestoreSecretResponse RestoreSecretSync(RestoreSecretRequest req) { JsonResponseModel <RestoreSecretResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "RestoreSecret"); rsp = JsonConvert.DeserializeObject <JsonResponseModel <RestoreSecretResponse> >(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return(rsp.Response); }