RunasUserPassword is not required in CreateJobFile.

This commit is contained in:
sdk-team
2022-11-21 07:17:08 +00:00
parent 14f9dd0353
commit 3b6ccb6d6f
8 changed files with 307 additions and 1 deletions

View File

@@ -1 +1 @@
1.36.1342
1.36.1343

View File

@@ -123,6 +123,8 @@ set(ehpc_public_header_model
include/alibabacloud/ehpc/model/GetHybridClusterConfigResult.h
include/alibabacloud/ehpc/model/GetIfEcsTypeSupportHtConfigRequest.h
include/alibabacloud/ehpc/model/GetIfEcsTypeSupportHtConfigResult.h
include/alibabacloud/ehpc/model/GetJobLogRequest.h
include/alibabacloud/ehpc/model/GetJobLogResult.h
include/alibabacloud/ehpc/model/GetPostScriptsRequest.h
include/alibabacloud/ehpc/model/GetPostScriptsResult.h
include/alibabacloud/ehpc/model/GetSchedulerInfoRequest.h
@@ -390,6 +392,8 @@ set(ehpc_src
src/model/GetHybridClusterConfigResult.cc
src/model/GetIfEcsTypeSupportHtConfigRequest.cc
src/model/GetIfEcsTypeSupportHtConfigResult.cc
src/model/GetJobLogRequest.cc
src/model/GetJobLogResult.cc
src/model/GetPostScriptsRequest.cc
src/model/GetPostScriptsResult.cc
src/model/GetSchedulerInfoRequest.cc

View File

@@ -124,6 +124,8 @@
#include "model/GetHybridClusterConfigResult.h"
#include "model/GetIfEcsTypeSupportHtConfigRequest.h"
#include "model/GetIfEcsTypeSupportHtConfigResult.h"
#include "model/GetJobLogRequest.h"
#include "model/GetJobLogResult.h"
#include "model/GetPostScriptsRequest.h"
#include "model/GetPostScriptsResult.h"
#include "model/GetSchedulerInfoRequest.h"
@@ -448,6 +450,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetIfEcsTypeSupportHtConfigResult> GetIfEcsTypeSupportHtConfigOutcome;
typedef std::future<GetIfEcsTypeSupportHtConfigOutcome> GetIfEcsTypeSupportHtConfigOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::GetIfEcsTypeSupportHtConfigRequest&, const GetIfEcsTypeSupportHtConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetIfEcsTypeSupportHtConfigAsyncHandler;
typedef Outcome<Error, Model::GetJobLogResult> GetJobLogOutcome;
typedef std::future<GetJobLogOutcome> GetJobLogOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::GetJobLogRequest&, const GetJobLogOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetJobLogAsyncHandler;
typedef Outcome<Error, Model::GetPostScriptsResult> GetPostScriptsOutcome;
typedef std::future<GetPostScriptsOutcome> GetPostScriptsOutcomeCallable;
typedef std::function<void(const EHPCClient*, const Model::GetPostScriptsRequest&, const GetPostScriptsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPostScriptsAsyncHandler;
@@ -849,6 +854,9 @@ namespace AlibabaCloud
GetIfEcsTypeSupportHtConfigOutcome getIfEcsTypeSupportHtConfig(const Model::GetIfEcsTypeSupportHtConfigRequest &request)const;
void getIfEcsTypeSupportHtConfigAsync(const Model::GetIfEcsTypeSupportHtConfigRequest& request, const GetIfEcsTypeSupportHtConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetIfEcsTypeSupportHtConfigOutcomeCallable getIfEcsTypeSupportHtConfigCallable(const Model::GetIfEcsTypeSupportHtConfigRequest& request) const;
GetJobLogOutcome getJobLog(const Model::GetJobLogRequest &request)const;
void getJobLogAsync(const Model::GetJobLogRequest& request, const GetJobLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetJobLogOutcomeCallable getJobLogCallable(const Model::GetJobLogRequest& request) const;
GetPostScriptsOutcome getPostScripts(const Model::GetPostScriptsRequest &request)const;
void getPostScriptsAsync(const Model::GetPostScriptsRequest& request, const GetPostScriptsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetPostScriptsOutcomeCallable getPostScriptsCallable(const Model::GetPostScriptsRequest& request) const;

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_EHPC_MODEL_GETJOBLOGREQUEST_H_
#define ALIBABACLOUD_EHPC_MODEL_GETJOBLOGREQUEST_H_
#include <alibabacloud/ehpc/EHPCExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace EHPC {
namespace Model {
class ALIBABACLOUD_EHPC_EXPORT GetJobLogRequest : public RpcServiceRequest {
public:
GetJobLogRequest();
~GetJobLogRequest();
long getOffset() const;
void setOffset(long offset);
std::string getExecHost() const;
void setExecHost(const std::string &execHost);
std::string getClusterId() const;
void setClusterId(const std::string &clusterId);
std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId);
std::string getJobId() const;
void setJobId(const std::string &jobId);
int getSize() const;
void setSize(int size);
private:
long offset_;
std::string execHost_;
std::string clusterId_;
std::string accessKeyId_;
std::string jobId_;
int size_;
};
} // namespace Model
} // namespace EHPC
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_EHPC_MODEL_GETJOBLOGREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_EHPC_MODEL_GETJOBLOGRESULT_H_
#define ALIBABACLOUD_EHPC_MODEL_GETJOBLOGRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ehpc/EHPCExport.h>
namespace AlibabaCloud
{
namespace EHPC
{
namespace Model
{
class ALIBABACLOUD_EHPC_EXPORT GetJobLogResult : public ServiceResult
{
public:
GetJobLogResult();
explicit GetJobLogResult(const std::string &payload);
~GetJobLogResult();
std::string getOutputLog()const;
std::string getErrorLog()const;
std::string getJobId()const;
protected:
void parse(const std::string &payload);
private:
std::string outputLog_;
std::string errorLog_;
std::string jobId_;
};
}
}
}
#endif // !ALIBABACLOUD_EHPC_MODEL_GETJOBLOGRESULT_H_

View File

@@ -1887,6 +1887,42 @@ EHPCClient::GetIfEcsTypeSupportHtConfigOutcomeCallable EHPCClient::getIfEcsTypeS
return task->get_future();
}
EHPCClient::GetJobLogOutcome EHPCClient::getJobLog(const GetJobLogRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetJobLogOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetJobLogOutcome(GetJobLogResult(outcome.result()));
else
return GetJobLogOutcome(outcome.error());
}
void EHPCClient::getJobLogAsync(const GetJobLogRequest& request, const GetJobLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getJobLog(request), context);
};
asyncExecute(new Runnable(fn));
}
EHPCClient::GetJobLogOutcomeCallable EHPCClient::getJobLogCallable(const GetJobLogRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetJobLogOutcome()>>(
[this, request]()
{
return this->getJobLog(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EHPCClient::GetPostScriptsOutcome EHPCClient::getPostScripts(const GetPostScriptsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,81 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ehpc/model/GetJobLogRequest.h>
using AlibabaCloud::EHPC::Model::GetJobLogRequest;
GetJobLogRequest::GetJobLogRequest()
: RpcServiceRequest("ehpc", "2018-04-12", "GetJobLog") {
setMethod(HttpRequest::Method::Get);
}
GetJobLogRequest::~GetJobLogRequest() {}
long GetJobLogRequest::getOffset() const {
return offset_;
}
void GetJobLogRequest::setOffset(long offset) {
offset_ = offset;
setParameter(std::string("Offset"), std::to_string(offset));
}
std::string GetJobLogRequest::getExecHost() const {
return execHost_;
}
void GetJobLogRequest::setExecHost(const std::string &execHost) {
execHost_ = execHost;
setParameter(std::string("ExecHost"), execHost);
}
std::string GetJobLogRequest::getClusterId() const {
return clusterId_;
}
void GetJobLogRequest::setClusterId(const std::string &clusterId) {
clusterId_ = clusterId;
setParameter(std::string("ClusterId"), clusterId);
}
std::string GetJobLogRequest::getAccessKeyId() const {
return accessKeyId_;
}
void GetJobLogRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::string GetJobLogRequest::getJobId() const {
return jobId_;
}
void GetJobLogRequest::setJobId(const std::string &jobId) {
jobId_ = jobId;
setParameter(std::string("JobId"), jobId);
}
int GetJobLogRequest::getSize() const {
return size_;
}
void GetJobLogRequest::setSize(int size) {
size_ = size;
setParameter(std::string("Size"), std::to_string(size));
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ehpc/model/GetJobLogResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
GetJobLogResult::GetJobLogResult() :
ServiceResult()
{}
GetJobLogResult::GetJobLogResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetJobLogResult::~GetJobLogResult()
{}
void GetJobLogResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["JobId"].isNull())
jobId_ = value["JobId"].asString();
if(!value["OutputLog"].isNull())
outputLog_ = value["OutputLog"].asString();
if(!value["ErrorLog"].isNull())
errorLog_ = value["ErrorLog"].asString();
}
std::string GetJobLogResult::getOutputLog()const
{
return outputLog_;
}
std::string GetJobLogResult::getErrorLog()const
{
return errorLog_;
}
std::string GetJobLogResult::getJobId()const
{
return jobId_;
}