lib/v20190924/client.rb in tencentcloud-sdk-tcr-3.0.607 vs lib/v20190924/client.rb in tencentcloud-sdk-tcr-3.0.608
- old
+ new
@@ -483,10 +483,34 @@
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
+ # 创建自定义账户
+
+ # @param request: Request instance for CreateServiceAccount.
+ # @type request: :class:`Tencentcloud::tcr::V20190924::CreateServiceAccountRequest`
+ # @rtype: :class:`Tencentcloud::tcr::V20190924::CreateServiceAccountResponse`
+ def CreateServiceAccount(request)
+ body = send_request('CreateServiceAccount', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = CreateServiceAccountResponse.new
+ model.deserialize(response['Response'])
+ model
+ else
+ code = response['Response']['Error']['Code']
+ message = response['Response']['Error']['Message']
+ reqid = response['Response']['RequestId']
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
+ end
+ rescue TencentCloud::Common::TencentCloudSDKException => e
+ raise e
+ rescue StandardError => e
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
+ end
+
# 为一个镜像版本创建签名
# @param request: Request instance for CreateSignature.
# @type request: :class:`Tencentcloud::tcr::V20190924::CreateSignatureRequest`
# @rtype: :class:`Tencentcloud::tcr::V20190924::CreateSignatureResponse`
@@ -1085,10 +1109,34 @@
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
+ # 删除服务级账号
+
+ # @param request: Request instance for DeleteServiceAccount.
+ # @type request: :class:`Tencentcloud::tcr::V20190924::DeleteServiceAccountRequest`
+ # @rtype: :class:`Tencentcloud::tcr::V20190924::DeleteServiceAccountResponse`
+ def DeleteServiceAccount(request)
+ body = send_request('DeleteServiceAccount', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = DeleteServiceAccountResponse.new
+ model.deserialize(response['Response'])
+ model
+ else
+ code = response['Response']['Error']['Code']
+ message = response['Response']['Error']['Message']
+ reqid = response['Response']['RequestId']
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
+ end
+ rescue TencentCloud::Common::TencentCloudSDKException => e
+ raise e
+ rescue StandardError => e
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
+ end
+
# 删除命名空间加签策略
# @param request: Request instance for DeleteSignaturePolicy.
# @type request: :class:`Tencentcloud::tcr::V20190924::DeleteSignaturePolicyRequest`
# @rtype: :class:`Tencentcloud::tcr::V20190924::DeleteSignaturePolicyResponse`
@@ -1949,10 +1997,34 @@
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
+ # 查询服务级账号
+
+ # @param request: Request instance for DescribeServiceAccounts.
+ # @type request: :class:`Tencentcloud::tcr::V20190924::DescribeServiceAccountsRequest`
+ # @rtype: :class:`Tencentcloud::tcr::V20190924::DescribeServiceAccountsResponse`
+ def DescribeServiceAccounts(request)
+ body = send_request('DescribeServiceAccounts', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = DescribeServiceAccountsResponse.new
+ model.deserialize(response['Response'])
+ model
+ else
+ code = response['Response']['Error']['Code']
+ message = response['Response']['Error']['Message']
+ reqid = response['Response']['RequestId']
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
+ end
+ rescue TencentCloud::Common::TencentCloudSDKException => e
+ raise e
+ rescue StandardError => e
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
+ end
+
# 查询版本保留执行记录
# @param request: Request instance for DescribeTagRetentionExecution.
# @type request: :class:`Tencentcloud::tcr::V20190924::DescribeTagRetentionExecutionRequest`
# @rtype: :class:`Tencentcloud::tcr::V20190924::DescribeTagRetentionExecutionResponse`
@@ -2463,9 +2535,33 @@
def ModifySecurityPolicy(request)
body = send_request('ModifySecurityPolicy', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = ModifySecurityPolicyResponse.new
+ model.deserialize(response['Response'])
+ model
+ else
+ code = response['Response']['Error']['Code']
+ message = response['Response']['Error']['Message']
+ reqid = response['Response']['RequestId']
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
+ end
+ rescue TencentCloud::Common::TencentCloudSDKException => e
+ raise e
+ rescue StandardError => e
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
+ end
+
+ # 更新服务级账号
+
+ # @param request: Request instance for ModifyServiceAccount.
+ # @type request: :class:`Tencentcloud::tcr::V20190924::ModifyServiceAccountRequest`
+ # @rtype: :class:`Tencentcloud::tcr::V20190924::ModifyServiceAccountResponse`
+ def ModifyServiceAccount(request)
+ body = send_request('ModifyServiceAccount', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = ModifyServiceAccountResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
\ No newline at end of file