Ejemplo n.º 1
0
        /// <summary>
        /// 添加密钥标签
        /// </summary>
        public CreateKmsTagResponse CreateKmsTag(CreateKmsTagRequest createKmsTagRequest)
        {
            Dictionary <string, string> urlParam = new Dictionary <string, string>();

            urlParam.Add("version_id", createKmsTagRequest.VersionId.ToString());
            urlParam.Add("key_id", createKmsTagRequest.KeyId.ToString());
            string              urlPath  = HttpUtils.AddUrlPath("/{version_id}/{project_id}/kms/{key_id}/tags", urlParam);
            SdkRequest          request  = HttpUtils.InitSdkRequest(urlPath, "application/json;charset=UTF-8", createKmsTagRequest);
            HttpResponseMessage response = DoHttpRequestSync("POST", request);

            return(JsonUtils.DeSerializeNull <CreateKmsTagResponse>(response));
        }