예제 #1
0
        /// <summary>
        /// 创建凭据版本
        /// </summary>
        public async Task <CreateSecretVersionResponse> CreateSecretVersionAsync(CreateSecretVersionRequest createSecretVersionRequest)
        {
            Dictionary <string, string> urlParam = new Dictionary <string, string>();

            urlParam.Add("secret_id", createSecretVersionRequest.SecretId.ToString());
            string              urlPath  = HttpUtils.AddUrlPath("/v1/{project_id}/secrets/{secret_id}/versions", urlParam);
            SdkRequest          request  = HttpUtils.InitSdkRequest(urlPath, "application/json;charset=UTF-8", createSecretVersionRequest);
            HttpResponseMessage response = await DoHttpRequestAsync("POST", request);

            return(JsonUtils.DeSerialize <CreateSecretVersionResponse>(response));
        }
예제 #2
0
 /// <summary>
 ///  创建机密新的版本,默认为已启用状态
 /// </summary>
 /// <param name="request">请求参数信息</param>
 /// <returns>请求结果信息</returns>
 public async Task <CreateSecretVersionResponse> CreateSecretVersion(CreateSecretVersionRequest request)
 {
     return(await new CreateSecretVersionExecutor().Client(this).Execute <CreateSecretVersionResponse, CreateSecretVersionResult, CreateSecretVersionRequest>(request).ConfigureAwait(false));
 }
예제 #3
0
 /// <summary>
 ///  创建机密新的版本,默认为已启用状态
 /// </summary>
 /// <param name="request">请求参数信息</param>
 /// <returns>请求结果信息</returns>
 public CreateSecretVersionResponse CreateSecretVersion(CreateSecretVersionRequest request)
 {
     return(new CreateSecretVersionExecutor().Client(this).Execute <CreateSecretVersionResponse, CreateSecretVersionResult, CreateSecretVersionRequest>(request));
 }