Add new apis.

This commit is contained in:
sdk-team
2023-08-30 09:38:32 +00:00
parent 3fba042126
commit 40f61e3ce6
28 changed files with 1923 additions and 1 deletions

View File

@@ -1 +1 @@
1.36.1742
1.36.1743

View File

@@ -23,6 +23,8 @@ set(swas-open_public_header
set(swas-open_public_header_model
include/alibabacloud/swas-open/model/AllocatePublicConnectionRequest.h
include/alibabacloud/swas-open/model/AllocatePublicConnectionResult.h
include/alibabacloud/swas-open/model/CreateCommandRequest.h
include/alibabacloud/swas-open/model/CreateCommandResult.h
include/alibabacloud/swas-open/model/CreateCustomImageRequest.h
include/alibabacloud/swas-open/model/CreateCustomImageResult.h
include/alibabacloud/swas-open/model/CreateFirewallRuleRequest.h
@@ -35,6 +37,8 @@ set(swas-open_public_header_model
include/alibabacloud/swas-open/model/CreateInstancesResult.h
include/alibabacloud/swas-open/model/CreateSnapshotRequest.h
include/alibabacloud/swas-open/model/CreateSnapshotResult.h
include/alibabacloud/swas-open/model/DeleteCommandRequest.h
include/alibabacloud/swas-open/model/DeleteCommandResult.h
include/alibabacloud/swas-open/model/DeleteCustomImageRequest.h
include/alibabacloud/swas-open/model/DeleteCustomImageResult.h
include/alibabacloud/swas-open/model/DeleteFirewallRuleRequest.h
@@ -49,6 +53,10 @@ set(swas-open_public_header_model
include/alibabacloud/swas-open/model/DescribeCloudAssistantStatusResult.h
include/alibabacloud/swas-open/model/DescribeCloudMonitorAgentStatusesRequest.h
include/alibabacloud/swas-open/model/DescribeCloudMonitorAgentStatusesResult.h
include/alibabacloud/swas-open/model/DescribeCommandInvocationsRequest.h
include/alibabacloud/swas-open/model/DescribeCommandInvocationsResult.h
include/alibabacloud/swas-open/model/DescribeCommandsRequest.h
include/alibabacloud/swas-open/model/DescribeCommandsResult.h
include/alibabacloud/swas-open/model/DescribeDatabaseErrorLogsRequest.h
include/alibabacloud/swas-open/model/DescribeDatabaseErrorLogsResult.h
include/alibabacloud/swas-open/model/DescribeDatabaseInstanceMetricDataRequest.h
@@ -81,6 +89,8 @@ set(swas-open_public_header_model
include/alibabacloud/swas-open/model/InstallCloudAssistantResult.h
include/alibabacloud/swas-open/model/InstallCloudMonitorAgentRequest.h
include/alibabacloud/swas-open/model/InstallCloudMonitorAgentResult.h
include/alibabacloud/swas-open/model/InvokeCommandRequest.h
include/alibabacloud/swas-open/model/InvokeCommandResult.h
include/alibabacloud/swas-open/model/ListCustomImagesRequest.h
include/alibabacloud/swas-open/model/ListCustomImagesResult.h
include/alibabacloud/swas-open/model/ListDisksRequest.h
@@ -147,6 +157,8 @@ set(swas-open_public_header_model
include/alibabacloud/swas-open/model/StopInstanceResult.h
include/alibabacloud/swas-open/model/StopInstancesRequest.h
include/alibabacloud/swas-open/model/StopInstancesResult.h
include/alibabacloud/swas-open/model/UpdateCommandAttributeRequest.h
include/alibabacloud/swas-open/model/UpdateCommandAttributeResult.h
include/alibabacloud/swas-open/model/UpdateDiskAttributeRequest.h
include/alibabacloud/swas-open/model/UpdateDiskAttributeResult.h
include/alibabacloud/swas-open/model/UpdateInstanceAttributeRequest.h
@@ -162,6 +174,8 @@ set(swas-open_src
src/SWAS-OPENClient.cc
src/model/AllocatePublicConnectionRequest.cc
src/model/AllocatePublicConnectionResult.cc
src/model/CreateCommandRequest.cc
src/model/CreateCommandResult.cc
src/model/CreateCustomImageRequest.cc
src/model/CreateCustomImageResult.cc
src/model/CreateFirewallRuleRequest.cc
@@ -174,6 +188,8 @@ set(swas-open_src
src/model/CreateInstancesResult.cc
src/model/CreateSnapshotRequest.cc
src/model/CreateSnapshotResult.cc
src/model/DeleteCommandRequest.cc
src/model/DeleteCommandResult.cc
src/model/DeleteCustomImageRequest.cc
src/model/DeleteCustomImageResult.cc
src/model/DeleteFirewallRuleRequest.cc
@@ -188,6 +204,10 @@ set(swas-open_src
src/model/DescribeCloudAssistantStatusResult.cc
src/model/DescribeCloudMonitorAgentStatusesRequest.cc
src/model/DescribeCloudMonitorAgentStatusesResult.cc
src/model/DescribeCommandInvocationsRequest.cc
src/model/DescribeCommandInvocationsResult.cc
src/model/DescribeCommandsRequest.cc
src/model/DescribeCommandsResult.cc
src/model/DescribeDatabaseErrorLogsRequest.cc
src/model/DescribeDatabaseErrorLogsResult.cc
src/model/DescribeDatabaseInstanceMetricDataRequest.cc
@@ -220,6 +240,8 @@ set(swas-open_src
src/model/InstallCloudAssistantResult.cc
src/model/InstallCloudMonitorAgentRequest.cc
src/model/InstallCloudMonitorAgentResult.cc
src/model/InvokeCommandRequest.cc
src/model/InvokeCommandResult.cc
src/model/ListCustomImagesRequest.cc
src/model/ListCustomImagesResult.cc
src/model/ListDisksRequest.cc
@@ -286,6 +308,8 @@ set(swas-open_src
src/model/StopInstanceResult.cc
src/model/StopInstancesRequest.cc
src/model/StopInstancesResult.cc
src/model/UpdateCommandAttributeRequest.cc
src/model/UpdateCommandAttributeResult.cc
src/model/UpdateDiskAttributeRequest.cc
src/model/UpdateDiskAttributeResult.cc
src/model/UpdateInstanceAttributeRequest.cc

View File

@@ -24,6 +24,8 @@
#include "SWAS_OPENExport.h"
#include "model/AllocatePublicConnectionRequest.h"
#include "model/AllocatePublicConnectionResult.h"
#include "model/CreateCommandRequest.h"
#include "model/CreateCommandResult.h"
#include "model/CreateCustomImageRequest.h"
#include "model/CreateCustomImageResult.h"
#include "model/CreateFirewallRuleRequest.h"
@@ -36,6 +38,8 @@
#include "model/CreateInstancesResult.h"
#include "model/CreateSnapshotRequest.h"
#include "model/CreateSnapshotResult.h"
#include "model/DeleteCommandRequest.h"
#include "model/DeleteCommandResult.h"
#include "model/DeleteCustomImageRequest.h"
#include "model/DeleteCustomImageResult.h"
#include "model/DeleteFirewallRuleRequest.h"
@@ -50,6 +54,10 @@
#include "model/DescribeCloudAssistantStatusResult.h"
#include "model/DescribeCloudMonitorAgentStatusesRequest.h"
#include "model/DescribeCloudMonitorAgentStatusesResult.h"
#include "model/DescribeCommandInvocationsRequest.h"
#include "model/DescribeCommandInvocationsResult.h"
#include "model/DescribeCommandsRequest.h"
#include "model/DescribeCommandsResult.h"
#include "model/DescribeDatabaseErrorLogsRequest.h"
#include "model/DescribeDatabaseErrorLogsResult.h"
#include "model/DescribeDatabaseInstanceMetricDataRequest.h"
@@ -82,6 +90,8 @@
#include "model/InstallCloudAssistantResult.h"
#include "model/InstallCloudMonitorAgentRequest.h"
#include "model/InstallCloudMonitorAgentResult.h"
#include "model/InvokeCommandRequest.h"
#include "model/InvokeCommandResult.h"
#include "model/ListCustomImagesRequest.h"
#include "model/ListCustomImagesResult.h"
#include "model/ListDisksRequest.h"
@@ -148,6 +158,8 @@
#include "model/StopInstanceResult.h"
#include "model/StopInstancesRequest.h"
#include "model/StopInstancesResult.h"
#include "model/UpdateCommandAttributeRequest.h"
#include "model/UpdateCommandAttributeResult.h"
#include "model/UpdateDiskAttributeRequest.h"
#include "model/UpdateDiskAttributeResult.h"
#include "model/UpdateInstanceAttributeRequest.h"
@@ -170,6 +182,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::AllocatePublicConnectionResult> AllocatePublicConnectionOutcome;
typedef std::future<AllocatePublicConnectionOutcome> AllocatePublicConnectionOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::AllocatePublicConnectionRequest&, const AllocatePublicConnectionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AllocatePublicConnectionAsyncHandler;
typedef Outcome<Error, Model::CreateCommandResult> CreateCommandOutcome;
typedef std::future<CreateCommandOutcome> CreateCommandOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::CreateCommandRequest&, const CreateCommandOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateCommandAsyncHandler;
typedef Outcome<Error, Model::CreateCustomImageResult> CreateCustomImageOutcome;
typedef std::future<CreateCustomImageOutcome> CreateCustomImageOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::CreateCustomImageRequest&, const CreateCustomImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateCustomImageAsyncHandler;
@@ -188,6 +203,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateSnapshotResult> CreateSnapshotOutcome;
typedef std::future<CreateSnapshotOutcome> CreateSnapshotOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::CreateSnapshotRequest&, const CreateSnapshotOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateSnapshotAsyncHandler;
typedef Outcome<Error, Model::DeleteCommandResult> DeleteCommandOutcome;
typedef std::future<DeleteCommandOutcome> DeleteCommandOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::DeleteCommandRequest&, const DeleteCommandOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteCommandAsyncHandler;
typedef Outcome<Error, Model::DeleteCustomImageResult> DeleteCustomImageOutcome;
typedef std::future<DeleteCustomImageOutcome> DeleteCustomImageOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::DeleteCustomImageRequest&, const DeleteCustomImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteCustomImageAsyncHandler;
@@ -209,6 +227,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeCloudMonitorAgentStatusesResult> DescribeCloudMonitorAgentStatusesOutcome;
typedef std::future<DescribeCloudMonitorAgentStatusesOutcome> DescribeCloudMonitorAgentStatusesOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::DescribeCloudMonitorAgentStatusesRequest&, const DescribeCloudMonitorAgentStatusesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCloudMonitorAgentStatusesAsyncHandler;
typedef Outcome<Error, Model::DescribeCommandInvocationsResult> DescribeCommandInvocationsOutcome;
typedef std::future<DescribeCommandInvocationsOutcome> DescribeCommandInvocationsOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::DescribeCommandInvocationsRequest&, const DescribeCommandInvocationsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCommandInvocationsAsyncHandler;
typedef Outcome<Error, Model::DescribeCommandsResult> DescribeCommandsOutcome;
typedef std::future<DescribeCommandsOutcome> DescribeCommandsOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::DescribeCommandsRequest&, const DescribeCommandsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeCommandsAsyncHandler;
typedef Outcome<Error, Model::DescribeDatabaseErrorLogsResult> DescribeDatabaseErrorLogsOutcome;
typedef std::future<DescribeDatabaseErrorLogsOutcome> DescribeDatabaseErrorLogsOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::DescribeDatabaseErrorLogsRequest&, const DescribeDatabaseErrorLogsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDatabaseErrorLogsAsyncHandler;
@@ -257,6 +281,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::InstallCloudMonitorAgentResult> InstallCloudMonitorAgentOutcome;
typedef std::future<InstallCloudMonitorAgentOutcome> InstallCloudMonitorAgentOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::InstallCloudMonitorAgentRequest&, const InstallCloudMonitorAgentOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InstallCloudMonitorAgentAsyncHandler;
typedef Outcome<Error, Model::InvokeCommandResult> InvokeCommandOutcome;
typedef std::future<InvokeCommandOutcome> InvokeCommandOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::InvokeCommandRequest&, const InvokeCommandOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InvokeCommandAsyncHandler;
typedef Outcome<Error, Model::ListCustomImagesResult> ListCustomImagesOutcome;
typedef std::future<ListCustomImagesOutcome> ListCustomImagesOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::ListCustomImagesRequest&, const ListCustomImagesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCustomImagesAsyncHandler;
@@ -356,6 +383,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::StopInstancesResult> StopInstancesOutcome;
typedef std::future<StopInstancesOutcome> StopInstancesOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::StopInstancesRequest&, const StopInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopInstancesAsyncHandler;
typedef Outcome<Error, Model::UpdateCommandAttributeResult> UpdateCommandAttributeOutcome;
typedef std::future<UpdateCommandAttributeOutcome> UpdateCommandAttributeOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::UpdateCommandAttributeRequest&, const UpdateCommandAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateCommandAttributeAsyncHandler;
typedef Outcome<Error, Model::UpdateDiskAttributeResult> UpdateDiskAttributeOutcome;
typedef std::future<UpdateDiskAttributeOutcome> UpdateDiskAttributeOutcomeCallable;
typedef std::function<void(const SWAS_OPENClient*, const Model::UpdateDiskAttributeRequest&, const UpdateDiskAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateDiskAttributeAsyncHandler;
@@ -379,6 +409,9 @@ namespace AlibabaCloud
AllocatePublicConnectionOutcome allocatePublicConnection(const Model::AllocatePublicConnectionRequest &request)const;
void allocatePublicConnectionAsync(const Model::AllocatePublicConnectionRequest& request, const AllocatePublicConnectionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AllocatePublicConnectionOutcomeCallable allocatePublicConnectionCallable(const Model::AllocatePublicConnectionRequest& request) const;
CreateCommandOutcome createCommand(const Model::CreateCommandRequest &request)const;
void createCommandAsync(const Model::CreateCommandRequest& request, const CreateCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateCommandOutcomeCallable createCommandCallable(const Model::CreateCommandRequest& request) const;
CreateCustomImageOutcome createCustomImage(const Model::CreateCustomImageRequest &request)const;
void createCustomImageAsync(const Model::CreateCustomImageRequest& request, const CreateCustomImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateCustomImageOutcomeCallable createCustomImageCallable(const Model::CreateCustomImageRequest& request) const;
@@ -397,6 +430,9 @@ namespace AlibabaCloud
CreateSnapshotOutcome createSnapshot(const Model::CreateSnapshotRequest &request)const;
void createSnapshotAsync(const Model::CreateSnapshotRequest& request, const CreateSnapshotAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateSnapshotOutcomeCallable createSnapshotCallable(const Model::CreateSnapshotRequest& request) const;
DeleteCommandOutcome deleteCommand(const Model::DeleteCommandRequest &request)const;
void deleteCommandAsync(const Model::DeleteCommandRequest& request, const DeleteCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteCommandOutcomeCallable deleteCommandCallable(const Model::DeleteCommandRequest& request) const;
DeleteCustomImageOutcome deleteCustomImage(const Model::DeleteCustomImageRequest &request)const;
void deleteCustomImageAsync(const Model::DeleteCustomImageRequest& request, const DeleteCustomImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteCustomImageOutcomeCallable deleteCustomImageCallable(const Model::DeleteCustomImageRequest& request) const;
@@ -418,6 +454,12 @@ namespace AlibabaCloud
DescribeCloudMonitorAgentStatusesOutcome describeCloudMonitorAgentStatuses(const Model::DescribeCloudMonitorAgentStatusesRequest &request)const;
void describeCloudMonitorAgentStatusesAsync(const Model::DescribeCloudMonitorAgentStatusesRequest& request, const DescribeCloudMonitorAgentStatusesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeCloudMonitorAgentStatusesOutcomeCallable describeCloudMonitorAgentStatusesCallable(const Model::DescribeCloudMonitorAgentStatusesRequest& request) const;
DescribeCommandInvocationsOutcome describeCommandInvocations(const Model::DescribeCommandInvocationsRequest &request)const;
void describeCommandInvocationsAsync(const Model::DescribeCommandInvocationsRequest& request, const DescribeCommandInvocationsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeCommandInvocationsOutcomeCallable describeCommandInvocationsCallable(const Model::DescribeCommandInvocationsRequest& request) const;
DescribeCommandsOutcome describeCommands(const Model::DescribeCommandsRequest &request)const;
void describeCommandsAsync(const Model::DescribeCommandsRequest& request, const DescribeCommandsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeCommandsOutcomeCallable describeCommandsCallable(const Model::DescribeCommandsRequest& request) const;
DescribeDatabaseErrorLogsOutcome describeDatabaseErrorLogs(const Model::DescribeDatabaseErrorLogsRequest &request)const;
void describeDatabaseErrorLogsAsync(const Model::DescribeDatabaseErrorLogsRequest& request, const DescribeDatabaseErrorLogsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDatabaseErrorLogsOutcomeCallable describeDatabaseErrorLogsCallable(const Model::DescribeDatabaseErrorLogsRequest& request) const;
@@ -466,6 +508,9 @@ namespace AlibabaCloud
InstallCloudMonitorAgentOutcome installCloudMonitorAgent(const Model::InstallCloudMonitorAgentRequest &request)const;
void installCloudMonitorAgentAsync(const Model::InstallCloudMonitorAgentRequest& request, const InstallCloudMonitorAgentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
InstallCloudMonitorAgentOutcomeCallable installCloudMonitorAgentCallable(const Model::InstallCloudMonitorAgentRequest& request) const;
InvokeCommandOutcome invokeCommand(const Model::InvokeCommandRequest &request)const;
void invokeCommandAsync(const Model::InvokeCommandRequest& request, const InvokeCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
InvokeCommandOutcomeCallable invokeCommandCallable(const Model::InvokeCommandRequest& request) const;
ListCustomImagesOutcome listCustomImages(const Model::ListCustomImagesRequest &request)const;
void listCustomImagesAsync(const Model::ListCustomImagesRequest& request, const ListCustomImagesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListCustomImagesOutcomeCallable listCustomImagesCallable(const Model::ListCustomImagesRequest& request) const;
@@ -565,6 +610,9 @@ namespace AlibabaCloud
StopInstancesOutcome stopInstances(const Model::StopInstancesRequest &request)const;
void stopInstancesAsync(const Model::StopInstancesRequest& request, const StopInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
StopInstancesOutcomeCallable stopInstancesCallable(const Model::StopInstancesRequest& request) const;
UpdateCommandAttributeOutcome updateCommandAttribute(const Model::UpdateCommandAttributeRequest &request)const;
void updateCommandAttributeAsync(const Model::UpdateCommandAttributeRequest& request, const UpdateCommandAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateCommandAttributeOutcomeCallable updateCommandAttributeCallable(const Model::UpdateCommandAttributeRequest& request) const;
UpdateDiskAttributeOutcome updateDiskAttribute(const Model::UpdateDiskAttributeRequest &request)const;
void updateDiskAttributeAsync(const Model::UpdateDiskAttributeRequest& request, const UpdateDiskAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateDiskAttributeOutcomeCallable updateDiskAttributeCallable(const Model::UpdateDiskAttributeRequest& request) const;

View File

@@ -0,0 +1,63 @@
/*
* 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_SWAS_OPEN_MODEL_CREATECOMMANDREQUEST_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_CREATECOMMANDREQUEST_H_
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace SWAS_OPEN {
namespace Model {
class ALIBABACLOUD_SWAS_OPEN_EXPORT CreateCommandRequest : public RpcServiceRequest {
public:
CreateCommandRequest();
~CreateCommandRequest();
std::string getWorkingDir() const;
void setWorkingDir(const std::string &workingDir);
std::string getDescription() const;
void setDescription(const std::string &description);
std::string getType() const;
void setType(const std::string &type);
std::string getCommandContent() const;
void setCommandContent(const std::string &commandContent);
long getTimeout() const;
void setTimeout(long timeout);
std::string getRegionId() const;
void setRegionId(const std::string &regionId);
std::string getName() const;
void setName(const std::string &name);
bool getEnableParameter() const;
void setEnableParameter(bool enableParameter);
private:
std::string workingDir_;
std::string description_;
std::string type_;
std::string commandContent_;
long timeout_;
std::string regionId_;
std::string name_;
bool enableParameter_;
};
} // namespace Model
} // namespace SWAS_OPEN
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_CREATECOMMANDREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* 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_SWAS_OPEN_MODEL_CREATECOMMANDRESULT_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_CREATECOMMANDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
namespace AlibabaCloud
{
namespace SWAS_OPEN
{
namespace Model
{
class ALIBABACLOUD_SWAS_OPEN_EXPORT CreateCommandResult : public ServiceResult
{
public:
CreateCommandResult();
explicit CreateCommandResult(const std::string &payload);
~CreateCommandResult();
std::string getCommandId()const;
protected:
void parse(const std::string &payload);
private:
std::string commandId_;
};
}
}
}
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_CREATECOMMANDRESULT_H_

View File

@@ -0,0 +1,45 @@
/*
* 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_SWAS_OPEN_MODEL_DELETECOMMANDREQUEST_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_DELETECOMMANDREQUEST_H_
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace SWAS_OPEN {
namespace Model {
class ALIBABACLOUD_SWAS_OPEN_EXPORT DeleteCommandRequest : public RpcServiceRequest {
public:
DeleteCommandRequest();
~DeleteCommandRequest();
std::string getCommandId() const;
void setCommandId(const std::string &commandId);
std::string getRegionId() const;
void setRegionId(const std::string &regionId);
private:
std::string commandId_;
std::string regionId_;
};
} // namespace Model
} // namespace SWAS_OPEN
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DELETECOMMANDREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_SWAS_OPEN_MODEL_DELETECOMMANDRESULT_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_DELETECOMMANDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
namespace AlibabaCloud
{
namespace SWAS_OPEN
{
namespace Model
{
class ALIBABACLOUD_SWAS_OPEN_EXPORT DeleteCommandResult : public ServiceResult
{
public:
DeleteCommandResult();
explicit DeleteCommandResult(const std::string &payload);
~DeleteCommandResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DELETECOMMANDRESULT_H_

View File

@@ -0,0 +1,66 @@
/*
* 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_SWAS_OPEN_MODEL_DESCRIBECOMMANDINVOCATIONSREQUEST_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECOMMANDINVOCATIONSREQUEST_H_
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace SWAS_OPEN {
namespace Model {
class ALIBABACLOUD_SWAS_OPEN_EXPORT DescribeCommandInvocationsRequest : public RpcServiceRequest {
public:
DescribeCommandInvocationsRequest();
~DescribeCommandInvocationsRequest();
std::string getCommandId() const;
void setCommandId(const std::string &commandId);
std::string getPageNumber() const;
void setPageNumber(const std::string &pageNumber);
std::string getRegionId() const;
void setRegionId(const std::string &regionId);
std::string getPageSize() const;
void setPageSize(const std::string &pageSize);
std::string getInvokeId() const;
void setInvokeId(const std::string &invokeId);
std::string getCommandName() const;
void setCommandName(const std::string &commandName);
std::string getCommandType() const;
void setCommandType(const std::string &commandType);
std::string getInstanceId() const;
void setInstanceId(const std::string &instanceId);
std::string getInvocationStatus() const;
void setInvocationStatus(const std::string &invocationStatus);
private:
std::string commandId_;
std::string pageNumber_;
std::string regionId_;
std::string pageSize_;
std::string invokeId_;
std::string commandName_;
std::string commandType_;
std::string instanceId_;
std::string invocationStatus_;
};
} // namespace Model
} // namespace SWAS_OPEN
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECOMMANDINVOCATIONSREQUEST_H_

View File

@@ -0,0 +1,84 @@
/*
* 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_SWAS_OPEN_MODEL_DESCRIBECOMMANDINVOCATIONSRESULT_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECOMMANDINVOCATIONSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
namespace AlibabaCloud
{
namespace SWAS_OPEN
{
namespace Model
{
class ALIBABACLOUD_SWAS_OPEN_EXPORT DescribeCommandInvocationsResult : public ServiceResult
{
public:
struct Command
{
struct InvokeInstance
{
std::string invocationStatus;
std::string finishTime;
std::string instanceId;
std::string output;
long exitCode;
std::string errorInfo;
std::string startTime;
std::string errorCode;
};
std::string invocationStatus;
std::string parameters;
std::string commandDescription;
long timeout;
std::vector<Command::InvokeInstance> invokeInstances;
std::string workingDir;
std::string commandContent;
std::string commandType;
std::string username;
std::string creationTime;
std::string commandId;
std::string commandName;
std::string invokeId;
};
DescribeCommandInvocationsResult();
explicit DescribeCommandInvocationsResult(const std::string &payload);
~DescribeCommandInvocationsResult();
int getTotalCount()const;
int getPageSize()const;
int getPageNumber()const;
std::vector<Command> getCommandInvocations()const;
protected:
void parse(const std::string &payload);
private:
int totalCount_;
int pageSize_;
int pageNumber_;
std::vector<Command> commandInvocations_;
};
}
}
}
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECOMMANDINVOCATIONSRESULT_H_

View File

@@ -0,0 +1,60 @@
/*
* 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_SWAS_OPEN_MODEL_DESCRIBECOMMANDSREQUEST_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECOMMANDSREQUEST_H_
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace SWAS_OPEN {
namespace Model {
class ALIBABACLOUD_SWAS_OPEN_EXPORT DescribeCommandsRequest : public RpcServiceRequest {
public:
DescribeCommandsRequest();
~DescribeCommandsRequest();
std::string getType() const;
void setType(const std::string &type);
std::string getCommandId() const;
void setCommandId(const std::string &commandId);
std::string getPageNumber() const;
void setPageNumber(const std::string &pageNumber);
std::string getRegionId() const;
void setRegionId(const std::string &regionId);
std::string getProvider() const;
void setProvider(const std::string &provider);
std::string getName() const;
void setName(const std::string &name);
std::string getPageSize() const;
void setPageSize(const std::string &pageSize);
private:
std::string type_;
std::string commandId_;
std::string pageNumber_;
std::string regionId_;
std::string provider_;
std::string name_;
std::string pageSize_;
};
} // namespace Model
} // namespace SWAS_OPEN
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECOMMANDSREQUEST_H_

View File

@@ -0,0 +1,80 @@
/*
* 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_SWAS_OPEN_MODEL_DESCRIBECOMMANDSRESULT_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECOMMANDSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
namespace AlibabaCloud
{
namespace SWAS_OPEN
{
namespace Model
{
class ALIBABACLOUD_SWAS_OPEN_EXPORT DescribeCommandsResult : public ServiceResult
{
public:
struct Command
{
struct ParameterDefinition
{
std::string defaultValue;
std::string description;
bool required;
std::string parameterName;
std::vector<std::string> possibleValues;
};
std::string workingDir;
std::string commandContent;
std::vector<Command::ParameterDefinition> parameterDefinitions;
std::string type;
std::string description;
std::vector<std::string> parameterNames;
long timeout;
std::string creationTime;
bool enableParameter;
std::string commandId;
std::string name;
std::string provider;
};
DescribeCommandsResult();
explicit DescribeCommandsResult(const std::string &payload);
~DescribeCommandsResult();
int getTotalCount()const;
int getPageSize()const;
int getPageNumber()const;
std::vector<Command> getCommands()const;
protected:
void parse(const std::string &payload);
private:
int totalCount_;
int pageSize_;
int pageNumber_;
std::vector<Command> commands_;
};
}
}
}
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_DESCRIBECOMMANDSRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* 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_SWAS_OPEN_MODEL_INVOKECOMMANDREQUEST_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_INVOKECOMMANDREQUEST_H_
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace SWAS_OPEN {
namespace Model {
class ALIBABACLOUD_SWAS_OPEN_EXPORT InvokeCommandRequest : public RpcServiceRequest {
public:
InvokeCommandRequest();
~InvokeCommandRequest();
std::string getCommandId() const;
void setCommandId(const std::string &commandId);
std::string getRegionId() const;
void setRegionId(const std::string &regionId);
std::string getInstanceIds() const;
void setInstanceIds(const std::string &instanceIds);
std::map<std::string, std::string> getParameters() const;
void setParameters(const std::map<std::string, std::string> &parameters);
std::string getUsername() const;
void setUsername(const std::string &username);
private:
std::string commandId_;
std::string regionId_;
std::string instanceIds_;
std::map<std::string, std::string> parameters_;
std::string username_;
};
} // namespace Model
} // namespace SWAS_OPEN
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_INVOKECOMMANDREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* 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_SWAS_OPEN_MODEL_INVOKECOMMANDRESULT_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_INVOKECOMMANDRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
namespace AlibabaCloud
{
namespace SWAS_OPEN
{
namespace Model
{
class ALIBABACLOUD_SWAS_OPEN_EXPORT InvokeCommandResult : public ServiceResult
{
public:
InvokeCommandResult();
explicit InvokeCommandResult(const std::string &payload);
~InvokeCommandResult();
std::string getInvokeId()const;
protected:
void parse(const std::string &payload);
private:
std::string invokeId_;
};
}
}
}
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_INVOKECOMMANDRESULT_H_

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_SWAS_OPEN_MODEL_UPDATECOMMANDATTRIBUTEREQUEST_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_UPDATECOMMANDATTRIBUTEREQUEST_H_
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace SWAS_OPEN {
namespace Model {
class ALIBABACLOUD_SWAS_OPEN_EXPORT UpdateCommandAttributeRequest : public RpcServiceRequest {
public:
UpdateCommandAttributeRequest();
~UpdateCommandAttributeRequest();
std::string getWorkingDir() const;
void setWorkingDir(const std::string &workingDir);
std::string getDescription() const;
void setDescription(const std::string &description);
std::string getCommandId() const;
void setCommandId(const std::string &commandId);
long getTimeout() const;
void setTimeout(long timeout);
std::string getRegionId() const;
void setRegionId(const std::string &regionId);
std::string getName() const;
void setName(const std::string &name);
private:
std::string workingDir_;
std::string description_;
std::string commandId_;
long timeout_;
std::string regionId_;
std::string name_;
};
} // namespace Model
} // namespace SWAS_OPEN
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_UPDATECOMMANDATTRIBUTEREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_SWAS_OPEN_MODEL_UPDATECOMMANDATTRIBUTERESULT_H_
#define ALIBABACLOUD_SWAS_OPEN_MODEL_UPDATECOMMANDATTRIBUTERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/swas-open/SWAS_OPENExport.h>
namespace AlibabaCloud
{
namespace SWAS_OPEN
{
namespace Model
{
class ALIBABACLOUD_SWAS_OPEN_EXPORT UpdateCommandAttributeResult : public ServiceResult
{
public:
UpdateCommandAttributeResult();
explicit UpdateCommandAttributeResult(const std::string &payload);
~UpdateCommandAttributeResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_SWAS_OPEN_MODEL_UPDATECOMMANDATTRIBUTERESULT_H_

View File

@@ -87,6 +87,42 @@ SWAS_OPENClient::AllocatePublicConnectionOutcomeCallable SWAS_OPENClient::alloca
return task->get_future();
}
SWAS_OPENClient::CreateCommandOutcome SWAS_OPENClient::createCommand(const CreateCommandRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateCommandOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateCommandOutcome(CreateCommandResult(outcome.result()));
else
return CreateCommandOutcome(outcome.error());
}
void SWAS_OPENClient::createCommandAsync(const CreateCommandRequest& request, const CreateCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createCommand(request), context);
};
asyncExecute(new Runnable(fn));
}
SWAS_OPENClient::CreateCommandOutcomeCallable SWAS_OPENClient::createCommandCallable(const CreateCommandRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateCommandOutcome()>>(
[this, request]()
{
return this->createCommand(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SWAS_OPENClient::CreateCustomImageOutcome SWAS_OPENClient::createCustomImage(const CreateCustomImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -303,6 +339,42 @@ SWAS_OPENClient::CreateSnapshotOutcomeCallable SWAS_OPENClient::createSnapshotCa
return task->get_future();
}
SWAS_OPENClient::DeleteCommandOutcome SWAS_OPENClient::deleteCommand(const DeleteCommandRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteCommandOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteCommandOutcome(DeleteCommandResult(outcome.result()));
else
return DeleteCommandOutcome(outcome.error());
}
void SWAS_OPENClient::deleteCommandAsync(const DeleteCommandRequest& request, const DeleteCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteCommand(request), context);
};
asyncExecute(new Runnable(fn));
}
SWAS_OPENClient::DeleteCommandOutcomeCallable SWAS_OPENClient::deleteCommandCallable(const DeleteCommandRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteCommandOutcome()>>(
[this, request]()
{
return this->deleteCommand(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SWAS_OPENClient::DeleteCustomImageOutcome SWAS_OPENClient::deleteCustomImage(const DeleteCustomImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -555,6 +627,78 @@ SWAS_OPENClient::DescribeCloudMonitorAgentStatusesOutcomeCallable SWAS_OPENClien
return task->get_future();
}
SWAS_OPENClient::DescribeCommandInvocationsOutcome SWAS_OPENClient::describeCommandInvocations(const DescribeCommandInvocationsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeCommandInvocationsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeCommandInvocationsOutcome(DescribeCommandInvocationsResult(outcome.result()));
else
return DescribeCommandInvocationsOutcome(outcome.error());
}
void SWAS_OPENClient::describeCommandInvocationsAsync(const DescribeCommandInvocationsRequest& request, const DescribeCommandInvocationsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeCommandInvocations(request), context);
};
asyncExecute(new Runnable(fn));
}
SWAS_OPENClient::DescribeCommandInvocationsOutcomeCallable SWAS_OPENClient::describeCommandInvocationsCallable(const DescribeCommandInvocationsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeCommandInvocationsOutcome()>>(
[this, request]()
{
return this->describeCommandInvocations(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SWAS_OPENClient::DescribeCommandsOutcome SWAS_OPENClient::describeCommands(const DescribeCommandsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeCommandsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeCommandsOutcome(DescribeCommandsResult(outcome.result()));
else
return DescribeCommandsOutcome(outcome.error());
}
void SWAS_OPENClient::describeCommandsAsync(const DescribeCommandsRequest& request, const DescribeCommandsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeCommands(request), context);
};
asyncExecute(new Runnable(fn));
}
SWAS_OPENClient::DescribeCommandsOutcomeCallable SWAS_OPENClient::describeCommandsCallable(const DescribeCommandsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeCommandsOutcome()>>(
[this, request]()
{
return this->describeCommands(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SWAS_OPENClient::DescribeDatabaseErrorLogsOutcome SWAS_OPENClient::describeDatabaseErrorLogs(const DescribeDatabaseErrorLogsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1131,6 +1275,42 @@ SWAS_OPENClient::InstallCloudMonitorAgentOutcomeCallable SWAS_OPENClient::instal
return task->get_future();
}
SWAS_OPENClient::InvokeCommandOutcome SWAS_OPENClient::invokeCommand(const InvokeCommandRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return InvokeCommandOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return InvokeCommandOutcome(InvokeCommandResult(outcome.result()));
else
return InvokeCommandOutcome(outcome.error());
}
void SWAS_OPENClient::invokeCommandAsync(const InvokeCommandRequest& request, const InvokeCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, invokeCommand(request), context);
};
asyncExecute(new Runnable(fn));
}
SWAS_OPENClient::InvokeCommandOutcomeCallable SWAS_OPENClient::invokeCommandCallable(const InvokeCommandRequest &request) const
{
auto task = std::make_shared<std::packaged_task<InvokeCommandOutcome()>>(
[this, request]()
{
return this->invokeCommand(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SWAS_OPENClient::ListCustomImagesOutcome SWAS_OPENClient::listCustomImages(const ListCustomImagesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2319,6 +2499,42 @@ SWAS_OPENClient::StopInstancesOutcomeCallable SWAS_OPENClient::stopInstancesCall
return task->get_future();
}
SWAS_OPENClient::UpdateCommandAttributeOutcome SWAS_OPENClient::updateCommandAttribute(const UpdateCommandAttributeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateCommandAttributeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateCommandAttributeOutcome(UpdateCommandAttributeResult(outcome.result()));
else
return UpdateCommandAttributeOutcome(outcome.error());
}
void SWAS_OPENClient::updateCommandAttributeAsync(const UpdateCommandAttributeRequest& request, const UpdateCommandAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateCommandAttribute(request), context);
};
asyncExecute(new Runnable(fn));
}
SWAS_OPENClient::UpdateCommandAttributeOutcomeCallable SWAS_OPENClient::updateCommandAttributeCallable(const UpdateCommandAttributeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateCommandAttributeOutcome()>>(
[this, request]()
{
return this->updateCommandAttribute(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
SWAS_OPENClient::UpdateDiskAttributeOutcome SWAS_OPENClient::updateDiskAttribute(const UpdateDiskAttributeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,99 @@
/*
* 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/swas-open/model/CreateCommandRequest.h>
using AlibabaCloud::SWAS_OPEN::Model::CreateCommandRequest;
CreateCommandRequest::CreateCommandRequest()
: RpcServiceRequest("swas-open", "2020-06-01", "CreateCommand") {
setMethod(HttpRequest::Method::Post);
}
CreateCommandRequest::~CreateCommandRequest() {}
std::string CreateCommandRequest::getWorkingDir() const {
return workingDir_;
}
void CreateCommandRequest::setWorkingDir(const std::string &workingDir) {
workingDir_ = workingDir;
setParameter(std::string("WorkingDir"), workingDir);
}
std::string CreateCommandRequest::getDescription() const {
return description_;
}
void CreateCommandRequest::setDescription(const std::string &description) {
description_ = description;
setParameter(std::string("Description"), description);
}
std::string CreateCommandRequest::getType() const {
return type_;
}
void CreateCommandRequest::setType(const std::string &type) {
type_ = type;
setParameter(std::string("Type"), type);
}
std::string CreateCommandRequest::getCommandContent() const {
return commandContent_;
}
void CreateCommandRequest::setCommandContent(const std::string &commandContent) {
commandContent_ = commandContent;
setParameter(std::string("CommandContent"), commandContent);
}
long CreateCommandRequest::getTimeout() const {
return timeout_;
}
void CreateCommandRequest::setTimeout(long timeout) {
timeout_ = timeout;
setParameter(std::string("Timeout"), std::to_string(timeout));
}
std::string CreateCommandRequest::getRegionId() const {
return regionId_;
}
void CreateCommandRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}
std::string CreateCommandRequest::getName() const {
return name_;
}
void CreateCommandRequest::setName(const std::string &name) {
name_ = name;
setParameter(std::string("Name"), name);
}
bool CreateCommandRequest::getEnableParameter() const {
return enableParameter_;
}
void CreateCommandRequest::setEnableParameter(bool enableParameter) {
enableParameter_ = enableParameter;
setParameter(std::string("EnableParameter"), enableParameter ? "true" : "false");
}

View File

@@ -0,0 +1,51 @@
/*
* 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/swas-open/model/CreateCommandResult.h>
#include <json/json.h>
using namespace AlibabaCloud::SWAS_OPEN;
using namespace AlibabaCloud::SWAS_OPEN::Model;
CreateCommandResult::CreateCommandResult() :
ServiceResult()
{}
CreateCommandResult::CreateCommandResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateCommandResult::~CreateCommandResult()
{}
void CreateCommandResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["CommandId"].isNull())
commandId_ = value["CommandId"].asString();
}
std::string CreateCommandResult::getCommandId()const
{
return commandId_;
}

View File

@@ -0,0 +1,45 @@
/*
* 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/swas-open/model/DeleteCommandRequest.h>
using AlibabaCloud::SWAS_OPEN::Model::DeleteCommandRequest;
DeleteCommandRequest::DeleteCommandRequest()
: RpcServiceRequest("swas-open", "2020-06-01", "DeleteCommand") {
setMethod(HttpRequest::Method::Post);
}
DeleteCommandRequest::~DeleteCommandRequest() {}
std::string DeleteCommandRequest::getCommandId() const {
return commandId_;
}
void DeleteCommandRequest::setCommandId(const std::string &commandId) {
commandId_ = commandId;
setParameter(std::string("CommandId"), commandId);
}
std::string DeleteCommandRequest::getRegionId() const {
return regionId_;
}
void DeleteCommandRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/swas-open/model/DeleteCommandResult.h>
#include <json/json.h>
using namespace AlibabaCloud::SWAS_OPEN;
using namespace AlibabaCloud::SWAS_OPEN::Model;
DeleteCommandResult::DeleteCommandResult() :
ServiceResult()
{}
DeleteCommandResult::DeleteCommandResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteCommandResult::~DeleteCommandResult()
{}
void DeleteCommandResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,108 @@
/*
* 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/swas-open/model/DescribeCommandInvocationsRequest.h>
using AlibabaCloud::SWAS_OPEN::Model::DescribeCommandInvocationsRequest;
DescribeCommandInvocationsRequest::DescribeCommandInvocationsRequest()
: RpcServiceRequest("swas-open", "2020-06-01", "DescribeCommandInvocations") {
setMethod(HttpRequest::Method::Post);
}
DescribeCommandInvocationsRequest::~DescribeCommandInvocationsRequest() {}
std::string DescribeCommandInvocationsRequest::getCommandId() const {
return commandId_;
}
void DescribeCommandInvocationsRequest::setCommandId(const std::string &commandId) {
commandId_ = commandId;
setParameter(std::string("CommandId"), commandId);
}
std::string DescribeCommandInvocationsRequest::getPageNumber() const {
return pageNumber_;
}
void DescribeCommandInvocationsRequest::setPageNumber(const std::string &pageNumber) {
pageNumber_ = pageNumber;
setParameter(std::string("PageNumber"), pageNumber);
}
std::string DescribeCommandInvocationsRequest::getRegionId() const {
return regionId_;
}
void DescribeCommandInvocationsRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}
std::string DescribeCommandInvocationsRequest::getPageSize() const {
return pageSize_;
}
void DescribeCommandInvocationsRequest::setPageSize(const std::string &pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), pageSize);
}
std::string DescribeCommandInvocationsRequest::getInvokeId() const {
return invokeId_;
}
void DescribeCommandInvocationsRequest::setInvokeId(const std::string &invokeId) {
invokeId_ = invokeId;
setParameter(std::string("InvokeId"), invokeId);
}
std::string DescribeCommandInvocationsRequest::getCommandName() const {
return commandName_;
}
void DescribeCommandInvocationsRequest::setCommandName(const std::string &commandName) {
commandName_ = commandName;
setParameter(std::string("CommandName"), commandName);
}
std::string DescribeCommandInvocationsRequest::getCommandType() const {
return commandType_;
}
void DescribeCommandInvocationsRequest::setCommandType(const std::string &commandType) {
commandType_ = commandType;
setParameter(std::string("CommandType"), commandType);
}
std::string DescribeCommandInvocationsRequest::getInstanceId() const {
return instanceId_;
}
void DescribeCommandInvocationsRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}
std::string DescribeCommandInvocationsRequest::getInvocationStatus() const {
return invocationStatus_;
}
void DescribeCommandInvocationsRequest::setInvocationStatus(const std::string &invocationStatus) {
invocationStatus_ = invocationStatus;
setParameter(std::string("InvocationStatus"), invocationStatus);
}

View File

@@ -0,0 +1,122 @@
/*
* 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/swas-open/model/DescribeCommandInvocationsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::SWAS_OPEN;
using namespace AlibabaCloud::SWAS_OPEN::Model;
DescribeCommandInvocationsResult::DescribeCommandInvocationsResult() :
ServiceResult()
{}
DescribeCommandInvocationsResult::DescribeCommandInvocationsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeCommandInvocationsResult::~DescribeCommandInvocationsResult()
{}
void DescribeCommandInvocationsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCommandInvocationsNode = value["CommandInvocations"]["command"];
for (auto valueCommandInvocationscommand : allCommandInvocationsNode)
{
Command commandInvocationsObject;
if(!valueCommandInvocationscommand["InvokeId"].isNull())
commandInvocationsObject.invokeId = valueCommandInvocationscommand["InvokeId"].asString();
if(!valueCommandInvocationscommand["CreationTime"].isNull())
commandInvocationsObject.creationTime = valueCommandInvocationscommand["CreationTime"].asString();
if(!valueCommandInvocationscommand["CommandId"].isNull())
commandInvocationsObject.commandId = valueCommandInvocationscommand["CommandId"].asString();
if(!valueCommandInvocationscommand["InvocationStatus"].isNull())
commandInvocationsObject.invocationStatus = valueCommandInvocationscommand["InvocationStatus"].asString();
if(!valueCommandInvocationscommand["CommandName"].isNull())
commandInvocationsObject.commandName = valueCommandInvocationscommand["CommandName"].asString();
if(!valueCommandInvocationscommand["CommandType"].isNull())
commandInvocationsObject.commandType = valueCommandInvocationscommand["CommandType"].asString();
if(!valueCommandInvocationscommand["CommandDescription"].isNull())
commandInvocationsObject.commandDescription = valueCommandInvocationscommand["CommandDescription"].asString();
if(!valueCommandInvocationscommand["Username"].isNull())
commandInvocationsObject.username = valueCommandInvocationscommand["Username"].asString();
if(!valueCommandInvocationscommand["WorkingDir"].isNull())
commandInvocationsObject.workingDir = valueCommandInvocationscommand["WorkingDir"].asString();
if(!valueCommandInvocationscommand["Timeout"].isNull())
commandInvocationsObject.timeout = std::stol(valueCommandInvocationscommand["Timeout"].asString());
if(!valueCommandInvocationscommand["CommandContent"].isNull())
commandInvocationsObject.commandContent = valueCommandInvocationscommand["CommandContent"].asString();
if(!valueCommandInvocationscommand["Parameters"].isNull())
commandInvocationsObject.parameters = valueCommandInvocationscommand["Parameters"].asString();
auto allInvokeInstancesNode = valueCommandInvocationscommand["InvokeInstances"]["invokeInstance"];
for (auto valueCommandInvocationscommandInvokeInstancesinvokeInstance : allInvokeInstancesNode)
{
Command::InvokeInstance invokeInstancesObject;
if(!valueCommandInvocationscommandInvokeInstancesinvokeInstance["InstanceId"].isNull())
invokeInstancesObject.instanceId = valueCommandInvocationscommandInvokeInstancesinvokeInstance["InstanceId"].asString();
if(!valueCommandInvocationscommandInvokeInstancesinvokeInstance["StartTime"].isNull())
invokeInstancesObject.startTime = valueCommandInvocationscommandInvokeInstancesinvokeInstance["StartTime"].asString();
if(!valueCommandInvocationscommandInvokeInstancesinvokeInstance["FinishTime"].isNull())
invokeInstancesObject.finishTime = valueCommandInvocationscommandInvokeInstancesinvokeInstance["FinishTime"].asString();
if(!valueCommandInvocationscommandInvokeInstancesinvokeInstance["InvocationStatus"].isNull())
invokeInstancesObject.invocationStatus = valueCommandInvocationscommandInvokeInstancesinvokeInstance["InvocationStatus"].asString();
if(!valueCommandInvocationscommandInvokeInstancesinvokeInstance["Output"].isNull())
invokeInstancesObject.output = valueCommandInvocationscommandInvokeInstancesinvokeInstance["Output"].asString();
if(!valueCommandInvocationscommandInvokeInstancesinvokeInstance["ExitCode"].isNull())
invokeInstancesObject.exitCode = std::stol(valueCommandInvocationscommandInvokeInstancesinvokeInstance["ExitCode"].asString());
if(!valueCommandInvocationscommandInvokeInstancesinvokeInstance["ErrorInfo"].isNull())
invokeInstancesObject.errorInfo = valueCommandInvocationscommandInvokeInstancesinvokeInstance["ErrorInfo"].asString();
if(!valueCommandInvocationscommandInvokeInstancesinvokeInstance["ErrorCode"].isNull())
invokeInstancesObject.errorCode = valueCommandInvocationscommandInvokeInstancesinvokeInstance["ErrorCode"].asString();
commandInvocationsObject.invokeInstances.push_back(invokeInstancesObject);
}
commandInvocations_.push_back(commandInvocationsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
int DescribeCommandInvocationsResult::getTotalCount()const
{
return totalCount_;
}
int DescribeCommandInvocationsResult::getPageSize()const
{
return pageSize_;
}
int DescribeCommandInvocationsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<DescribeCommandInvocationsResult::Command> DescribeCommandInvocationsResult::getCommandInvocations()const
{
return commandInvocations_;
}

View File

@@ -0,0 +1,90 @@
/*
* 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/swas-open/model/DescribeCommandsRequest.h>
using AlibabaCloud::SWAS_OPEN::Model::DescribeCommandsRequest;
DescribeCommandsRequest::DescribeCommandsRequest()
: RpcServiceRequest("swas-open", "2020-06-01", "DescribeCommands") {
setMethod(HttpRequest::Method::Post);
}
DescribeCommandsRequest::~DescribeCommandsRequest() {}
std::string DescribeCommandsRequest::getType() const {
return type_;
}
void DescribeCommandsRequest::setType(const std::string &type) {
type_ = type;
setParameter(std::string("Type"), type);
}
std::string DescribeCommandsRequest::getCommandId() const {
return commandId_;
}
void DescribeCommandsRequest::setCommandId(const std::string &commandId) {
commandId_ = commandId;
setParameter(std::string("CommandId"), commandId);
}
std::string DescribeCommandsRequest::getPageNumber() const {
return pageNumber_;
}
void DescribeCommandsRequest::setPageNumber(const std::string &pageNumber) {
pageNumber_ = pageNumber;
setParameter(std::string("PageNumber"), pageNumber);
}
std::string DescribeCommandsRequest::getRegionId() const {
return regionId_;
}
void DescribeCommandsRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}
std::string DescribeCommandsRequest::getProvider() const {
return provider_;
}
void DescribeCommandsRequest::setProvider(const std::string &provider) {
provider_ = provider;
setParameter(std::string("Provider"), provider);
}
std::string DescribeCommandsRequest::getName() const {
return name_;
}
void DescribeCommandsRequest::setName(const std::string &name) {
name_ = name;
setParameter(std::string("Name"), name);
}
std::string DescribeCommandsRequest::getPageSize() const {
return pageSize_;
}
void DescribeCommandsRequest::setPageSize(const std::string &pageSize) {
pageSize_ = pageSize;
setParameter(std::string("PageSize"), pageSize);
}

View File

@@ -0,0 +1,116 @@
/*
* 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/swas-open/model/DescribeCommandsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::SWAS_OPEN;
using namespace AlibabaCloud::SWAS_OPEN::Model;
DescribeCommandsResult::DescribeCommandsResult() :
ServiceResult()
{}
DescribeCommandsResult::DescribeCommandsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeCommandsResult::~DescribeCommandsResult()
{}
void DescribeCommandsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allCommandsNode = value["Commands"]["command"];
for (auto valueCommandscommand : allCommandsNode)
{
Command commandsObject;
if(!valueCommandscommand["CommandId"].isNull())
commandsObject.commandId = valueCommandscommand["CommandId"].asString();
if(!valueCommandscommand["CreationTime"].isNull())
commandsObject.creationTime = valueCommandscommand["CreationTime"].asString();
if(!valueCommandscommand["Name"].isNull())
commandsObject.name = valueCommandscommand["Name"].asString();
if(!valueCommandscommand["Provider"].isNull())
commandsObject.provider = valueCommandscommand["Provider"].asString();
if(!valueCommandscommand["Type"].isNull())
commandsObject.type = valueCommandscommand["Type"].asString();
if(!valueCommandscommand["Timeout"].isNull())
commandsObject.timeout = std::stol(valueCommandscommand["Timeout"].asString());
if(!valueCommandscommand["Description"].isNull())
commandsObject.description = valueCommandscommand["Description"].asString();
if(!valueCommandscommand["WorkingDir"].isNull())
commandsObject.workingDir = valueCommandscommand["WorkingDir"].asString();
if(!valueCommandscommand["CommandContent"].isNull())
commandsObject.commandContent = valueCommandscommand["CommandContent"].asString();
if(!valueCommandscommand["EnableParameter"].isNull())
commandsObject.enableParameter = valueCommandscommand["EnableParameter"].asString() == "true";
auto allParameterDefinitionsNode = valueCommandscommand["ParameterDefinitions"]["parameterDefinition"];
for (auto valueCommandscommandParameterDefinitionsparameterDefinition : allParameterDefinitionsNode)
{
Command::ParameterDefinition parameterDefinitionsObject;
if(!valueCommandscommandParameterDefinitionsparameterDefinition["Required"].isNull())
parameterDefinitionsObject.required = valueCommandscommandParameterDefinitionsparameterDefinition["Required"].asString() == "true";
if(!valueCommandscommandParameterDefinitionsparameterDefinition["Description"].isNull())
parameterDefinitionsObject.description = valueCommandscommandParameterDefinitionsparameterDefinition["Description"].asString();
if(!valueCommandscommandParameterDefinitionsparameterDefinition["DefaultValue"].isNull())
parameterDefinitionsObject.defaultValue = valueCommandscommandParameterDefinitionsparameterDefinition["DefaultValue"].asString();
if(!valueCommandscommandParameterDefinitionsparameterDefinition["ParameterName"].isNull())
parameterDefinitionsObject.parameterName = valueCommandscommandParameterDefinitionsparameterDefinition["ParameterName"].asString();
auto allPossibleValues = value["PossibleValues"]["possibleValue"];
for (auto value : allPossibleValues)
parameterDefinitionsObject.possibleValues.push_back(value.asString());
commandsObject.parameterDefinitions.push_back(parameterDefinitionsObject);
}
auto allParameterNames = value["ParameterNames"]["parameterName"];
for (auto value : allParameterNames)
commandsObject.parameterNames.push_back(value.asString());
commands_.push_back(commandsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stoi(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stoi(value["PageSize"].asString());
}
int DescribeCommandsResult::getTotalCount()const
{
return totalCount_;
}
int DescribeCommandsResult::getPageSize()const
{
return pageSize_;
}
int DescribeCommandsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<DescribeCommandsResult::Command> DescribeCommandsResult::getCommands()const
{
return commands_;
}

View File

@@ -0,0 +1,74 @@
/*
* 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/swas-open/model/InvokeCommandRequest.h>
using AlibabaCloud::SWAS_OPEN::Model::InvokeCommandRequest;
InvokeCommandRequest::InvokeCommandRequest()
: RpcServiceRequest("swas-open", "2020-06-01", "InvokeCommand") {
setMethod(HttpRequest::Method::Post);
}
InvokeCommandRequest::~InvokeCommandRequest() {}
std::string InvokeCommandRequest::getCommandId() const {
return commandId_;
}
void InvokeCommandRequest::setCommandId(const std::string &commandId) {
commandId_ = commandId;
setParameter(std::string("CommandId"), commandId);
}
std::string InvokeCommandRequest::getRegionId() const {
return regionId_;
}
void InvokeCommandRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}
std::string InvokeCommandRequest::getInstanceIds() const {
return instanceIds_;
}
void InvokeCommandRequest::setInstanceIds(const std::string &instanceIds) {
instanceIds_ = instanceIds;
setParameter(std::string("InstanceIds"), instanceIds);
}
std::map<std::string, std::string> InvokeCommandRequest::getParameters() const {
return parameters_;
}
void InvokeCommandRequest::setParameters(const std::map<std::string, std::string> &parameters) {
parameters_ = parameters;
for(auto const &iter1 : parameters) {
setParameter(std::string("Parameters") + "." + iter1.first, iter1.second);
}
}
std::string InvokeCommandRequest::getUsername() const {
return username_;
}
void InvokeCommandRequest::setUsername(const std::string &username) {
username_ = username;
setParameter(std::string("Username"), username);
}

View File

@@ -0,0 +1,51 @@
/*
* 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/swas-open/model/InvokeCommandResult.h>
#include <json/json.h>
using namespace AlibabaCloud::SWAS_OPEN;
using namespace AlibabaCloud::SWAS_OPEN::Model;
InvokeCommandResult::InvokeCommandResult() :
ServiceResult()
{}
InvokeCommandResult::InvokeCommandResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
InvokeCommandResult::~InvokeCommandResult()
{}
void InvokeCommandResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["InvokeId"].isNull())
invokeId_ = value["InvokeId"].asString();
}
std::string InvokeCommandResult::getInvokeId()const
{
return invokeId_;
}

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/swas-open/model/UpdateCommandAttributeRequest.h>
using AlibabaCloud::SWAS_OPEN::Model::UpdateCommandAttributeRequest;
UpdateCommandAttributeRequest::UpdateCommandAttributeRequest()
: RpcServiceRequest("swas-open", "2020-06-01", "UpdateCommandAttribute") {
setMethod(HttpRequest::Method::Post);
}
UpdateCommandAttributeRequest::~UpdateCommandAttributeRequest() {}
std::string UpdateCommandAttributeRequest::getWorkingDir() const {
return workingDir_;
}
void UpdateCommandAttributeRequest::setWorkingDir(const std::string &workingDir) {
workingDir_ = workingDir;
setParameter(std::string("WorkingDir"), workingDir);
}
std::string UpdateCommandAttributeRequest::getDescription() const {
return description_;
}
void UpdateCommandAttributeRequest::setDescription(const std::string &description) {
description_ = description;
setParameter(std::string("Description"), description);
}
std::string UpdateCommandAttributeRequest::getCommandId() const {
return commandId_;
}
void UpdateCommandAttributeRequest::setCommandId(const std::string &commandId) {
commandId_ = commandId;
setParameter(std::string("CommandId"), commandId);
}
long UpdateCommandAttributeRequest::getTimeout() const {
return timeout_;
}
void UpdateCommandAttributeRequest::setTimeout(long timeout) {
timeout_ = timeout;
setParameter(std::string("Timeout"), std::to_string(timeout));
}
std::string UpdateCommandAttributeRequest::getRegionId() const {
return regionId_;
}
void UpdateCommandAttributeRequest::setRegionId(const std::string &regionId) {
regionId_ = regionId;
setParameter(std::string("RegionId"), regionId);
}
std::string UpdateCommandAttributeRequest::getName() const {
return name_;
}
void UpdateCommandAttributeRequest::setName(const std::string &name) {
name_ = name;
setParameter(std::string("Name"), name);
}

View File

@@ -0,0 +1,44 @@
/*
* 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/swas-open/model/UpdateCommandAttributeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::SWAS_OPEN;
using namespace AlibabaCloud::SWAS_OPEN::Model;
UpdateCommandAttributeResult::UpdateCommandAttributeResult() :
ServiceResult()
{}
UpdateCommandAttributeResult::UpdateCommandAttributeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateCommandAttributeResult::~UpdateCommandAttributeResult()
{}
void UpdateCommandAttributeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}