Exemple #1
0
        internal GetKeyRotationStatusResponse GetKeyRotationStatus(GetKeyRotationStatusRequest request)
        {
            var marshaller   = new GetKeyRotationStatusRequestMarshaller();
            var unmarshaller = GetKeyRotationStatusResponseUnmarshaller.Instance;

            return(Invoke <GetKeyRotationStatusRequest, GetKeyRotationStatusResponse>(request, marshaller, unmarshaller));
        }
Exemple #2
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetKeyRotationStatus operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetKeyRotationStatus 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>
        public Task <GetKeyRotationStatusResponse> GetKeyRotationStatusAsync(GetKeyRotationStatusRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetKeyRotationStatusRequestMarshaller();
            var unmarshaller = GetKeyRotationStatusResponseUnmarshaller.Instance;

            return(InvokeAsync <GetKeyRotationStatusRequest, GetKeyRotationStatusResponse>(request, marshaller,
                                                                                           unmarshaller, cancellationToken));
        }
Exemple #3
0
        /// <summary>
        /// 查询指定的CMK是否开启了密钥轮换功能。
        /// </summary>
        /// <param name="req"><see cref="GetKeyRotationStatusRequest"/></param>
        /// <returns><see cref="GetKeyRotationStatusResponse"/></returns>
        public GetKeyRotationStatusResponse GetKeyRotationStatusSync(GetKeyRotationStatusRequest req)
        {
            JsonResponseModel <GetKeyRotationStatusResponse> rsp = null;

            try
            {
                var strResp = this.InternalRequestSync(req, "GetKeyRotationStatus");
                rsp = JsonConvert.DeserializeObject <JsonResponseModel <GetKeyRotationStatusResponse> >(strResp);
            }
            catch (JsonSerializationException e)
            {
                throw new TencentCloudSDKException(e.Message);
            }
            return(rsp.Response);
        }