Update cert API.

This commit is contained in:
sdk-team
2020-10-16 01:38:46 +00:00
parent b0fe238f34
commit d704ed0f33
20 changed files with 1148 additions and 2 deletions

View File

@@ -375,6 +375,42 @@ DcdnClient::BatchStopDcdnDomainOutcomeCallable DcdnClient::batchStopDcdnDomainCa
return task->get_future();
}
DcdnClient::CreateDcdnCertificateSigningRequestOutcome DcdnClient::createDcdnCertificateSigningRequest(const CreateDcdnCertificateSigningRequestRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateDcdnCertificateSigningRequestOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateDcdnCertificateSigningRequestOutcome(CreateDcdnCertificateSigningRequestResult(outcome.result()));
else
return CreateDcdnCertificateSigningRequestOutcome(outcome.error());
}
void DcdnClient::createDcdnCertificateSigningRequestAsync(const CreateDcdnCertificateSigningRequestRequest& request, const CreateDcdnCertificateSigningRequestAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createDcdnCertificateSigningRequest(request), context);
};
asyncExecute(new Runnable(fn));
}
DcdnClient::CreateDcdnCertificateSigningRequestOutcomeCallable DcdnClient::createDcdnCertificateSigningRequestCallable(const CreateDcdnCertificateSigningRequestRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateDcdnCertificateSigningRequestOutcome()>>(
[this, request]()
{
return this->createDcdnCertificateSigningRequest(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DcdnClient::DeleteDcdnDomainOutcome DcdnClient::deleteDcdnDomain(const DeleteDcdnDomainRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2607,6 +2643,42 @@ DcdnClient::DescribeDcdnUserTagsOutcomeCallable DcdnClient::describeDcdnUserTags
return task->get_future();
}
DcdnClient::DescribeDcdnVerifyContentOutcome DcdnClient::describeDcdnVerifyContent(const DescribeDcdnVerifyContentRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeDcdnVerifyContentOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeDcdnVerifyContentOutcome(DescribeDcdnVerifyContentResult(outcome.result()));
else
return DescribeDcdnVerifyContentOutcome(outcome.error());
}
void DcdnClient::describeDcdnVerifyContentAsync(const DescribeDcdnVerifyContentRequest& request, const DescribeDcdnVerifyContentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeDcdnVerifyContent(request), context);
};
asyncExecute(new Runnable(fn));
}
DcdnClient::DescribeDcdnVerifyContentOutcomeCallable DcdnClient::describeDcdnVerifyContentCallable(const DescribeDcdnVerifyContentRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeDcdnVerifyContentOutcome()>>(
[this, request]()
{
return this->describeDcdnVerifyContent(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DcdnClient::DescribeUserDcdnIpaStatusOutcome DcdnClient::describeUserDcdnIpaStatus(const DescribeUserDcdnIpaStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2895,6 +2967,42 @@ DcdnClient::SetDcdnConfigOfVersionOutcomeCallable DcdnClient::setDcdnConfigOfVer
return task->get_future();
}
DcdnClient::SetDcdnDomainCSRCertificateOutcome DcdnClient::setDcdnDomainCSRCertificate(const SetDcdnDomainCSRCertificateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SetDcdnDomainCSRCertificateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SetDcdnDomainCSRCertificateOutcome(SetDcdnDomainCSRCertificateResult(outcome.result()));
else
return SetDcdnDomainCSRCertificateOutcome(outcome.error());
}
void DcdnClient::setDcdnDomainCSRCertificateAsync(const SetDcdnDomainCSRCertificateRequest& request, const SetDcdnDomainCSRCertificateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, setDcdnDomainCSRCertificate(request), context);
};
asyncExecute(new Runnable(fn));
}
DcdnClient::SetDcdnDomainCSRCertificateOutcomeCallable DcdnClient::setDcdnDomainCSRCertificateCallable(const SetDcdnDomainCSRCertificateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SetDcdnDomainCSRCertificateOutcome()>>(
[this, request]()
{
return this->setDcdnDomainCSRCertificate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
DcdnClient::SetDcdnDomainCertificateOutcome DcdnClient::setDcdnDomainCertificate(const SetDcdnDomainCertificateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3255,3 +3363,39 @@ DcdnClient::UpdateDcdnIpaDomainOutcomeCallable DcdnClient::updateDcdnIpaDomainCa
return task->get_future();
}
DcdnClient::VerifyDcdnDomainOwnerOutcome DcdnClient::verifyDcdnDomainOwner(const VerifyDcdnDomainOwnerRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return VerifyDcdnDomainOwnerOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return VerifyDcdnDomainOwnerOutcome(VerifyDcdnDomainOwnerResult(outcome.result()));
else
return VerifyDcdnDomainOwnerOutcome(outcome.error());
}
void DcdnClient::verifyDcdnDomainOwnerAsync(const VerifyDcdnDomainOwnerRequest& request, const VerifyDcdnDomainOwnerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, verifyDcdnDomainOwner(request), context);
};
asyncExecute(new Runnable(fn));
}
DcdnClient::VerifyDcdnDomainOwnerOutcomeCallable DcdnClient::verifyDcdnDomainOwnerCallable(const VerifyDcdnDomainOwnerRequest &request) const
{
auto task = std::make_shared<std::packaged_task<VerifyDcdnDomainOwnerOutcome()>>(
[this, request]()
{
return this->verifyDcdnDomainOwner(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,128 @@
/*
* 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/dcdn/model/CreateDcdnCertificateSigningRequestRequest.h>
using AlibabaCloud::Dcdn::Model::CreateDcdnCertificateSigningRequestRequest;
CreateDcdnCertificateSigningRequestRequest::CreateDcdnCertificateSigningRequestRequest() :
RpcServiceRequest("dcdn", "2018-01-15", "CreateDcdnCertificateSigningRequest")
{
setMethod(HttpRequest::Method::Post);
}
CreateDcdnCertificateSigningRequestRequest::~CreateDcdnCertificateSigningRequestRequest()
{}
std::string CreateDcdnCertificateSigningRequestRequest::getCountry()const
{
return country_;
}
void CreateDcdnCertificateSigningRequestRequest::setCountry(const std::string& country)
{
country_ = country;
setParameter("Country", country);
}
std::string CreateDcdnCertificateSigningRequestRequest::getCity()const
{
return city_;
}
void CreateDcdnCertificateSigningRequestRequest::setCity(const std::string& city)
{
city_ = city;
setParameter("City", city);
}
std::string CreateDcdnCertificateSigningRequestRequest::getCommonName()const
{
return commonName_;
}
void CreateDcdnCertificateSigningRequestRequest::setCommonName(const std::string& commonName)
{
commonName_ = commonName;
setParameter("CommonName", commonName);
}
std::string CreateDcdnCertificateSigningRequestRequest::getState()const
{
return state_;
}
void CreateDcdnCertificateSigningRequestRequest::setState(const std::string& state)
{
state_ = state;
setParameter("State", state);
}
std::string CreateDcdnCertificateSigningRequestRequest::getEmail()const
{
return email_;
}
void CreateDcdnCertificateSigningRequestRequest::setEmail(const std::string& email)
{
email_ = email;
setParameter("Email", email);
}
std::string CreateDcdnCertificateSigningRequestRequest::getSANs()const
{
return sANs_;
}
void CreateDcdnCertificateSigningRequestRequest::setSANs(const std::string& sANs)
{
sANs_ = sANs;
setParameter("SANs", sANs);
}
long CreateDcdnCertificateSigningRequestRequest::getOwnerId()const
{
return ownerId_;
}
void CreateDcdnCertificateSigningRequestRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string CreateDcdnCertificateSigningRequestRequest::getOrganization()const
{
return organization_;
}
void CreateDcdnCertificateSigningRequestRequest::setOrganization(const std::string& organization)
{
organization_ = organization;
setParameter("Organization", organization);
}
std::string CreateDcdnCertificateSigningRequestRequest::getOrganizationUnit()const
{
return organizationUnit_;
}
void CreateDcdnCertificateSigningRequestRequest::setOrganizationUnit(const std::string& organizationUnit)
{
organizationUnit_ = organizationUnit;
setParameter("OrganizationUnit", organizationUnit);
}

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/dcdn/model/CreateDcdnCertificateSigningRequestResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dcdn;
using namespace AlibabaCloud::Dcdn::Model;
CreateDcdnCertificateSigningRequestResult::CreateDcdnCertificateSigningRequestResult() :
ServiceResult()
{}
CreateDcdnCertificateSigningRequestResult::CreateDcdnCertificateSigningRequestResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateDcdnCertificateSigningRequestResult::~CreateDcdnCertificateSigningRequestResult()
{}
void CreateDcdnCertificateSigningRequestResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["CommonName"].isNull())
commonName_ = value["CommonName"].asString();
if(!value["Csr"].isNull())
csr_ = value["Csr"].asString();
if(!value["PubMd5"].isNull())
pubMd5_ = value["PubMd5"].asString();
}
std::string CreateDcdnCertificateSigningRequestResult::getCsr()const
{
return csr_;
}
std::string CreateDcdnCertificateSigningRequestResult::getPubMd5()const
{
return pubMd5_;
}
std::string CreateDcdnCertificateSigningRequestResult::getCommonName()const
{
return commonName_;
}

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/dcdn/model/DescribeDcdnVerifyContentRequest.h>
using AlibabaCloud::Dcdn::Model::DescribeDcdnVerifyContentRequest;
DescribeDcdnVerifyContentRequest::DescribeDcdnVerifyContentRequest() :
RpcServiceRequest("dcdn", "2018-01-15", "DescribeDcdnVerifyContent")
{
setMethod(HttpRequest::Method::Post);
}
DescribeDcdnVerifyContentRequest::~DescribeDcdnVerifyContentRequest()
{}
std::string DescribeDcdnVerifyContentRequest::getDomainName()const
{
return domainName_;
}
void DescribeDcdnVerifyContentRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
long DescribeDcdnVerifyContentRequest::getOwnerId()const
{
return ownerId_;
}
void DescribeDcdnVerifyContentRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

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/dcdn/model/DescribeDcdnVerifyContentResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dcdn;
using namespace AlibabaCloud::Dcdn::Model;
DescribeDcdnVerifyContentResult::DescribeDcdnVerifyContentResult() :
ServiceResult()
{}
DescribeDcdnVerifyContentResult::DescribeDcdnVerifyContentResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDcdnVerifyContentResult::~DescribeDcdnVerifyContentResult()
{}
void DescribeDcdnVerifyContentResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Content"].isNull())
content_ = value["Content"].asString();
}
std::string DescribeDcdnVerifyContentResult::getContent()const
{
return content_;
}

View File

@@ -0,0 +1,62 @@
/*
* 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/dcdn/model/SetDcdnDomainCSRCertificateRequest.h>
using AlibabaCloud::Dcdn::Model::SetDcdnDomainCSRCertificateRequest;
SetDcdnDomainCSRCertificateRequest::SetDcdnDomainCSRCertificateRequest() :
RpcServiceRequest("dcdn", "2018-01-15", "SetDcdnDomainCSRCertificate")
{
setMethod(HttpRequest::Method::Post);
}
SetDcdnDomainCSRCertificateRequest::~SetDcdnDomainCSRCertificateRequest()
{}
std::string SetDcdnDomainCSRCertificateRequest::getServerCertificate()const
{
return serverCertificate_;
}
void SetDcdnDomainCSRCertificateRequest::setServerCertificate(const std::string& serverCertificate)
{
serverCertificate_ = serverCertificate;
setParameter("ServerCertificate", serverCertificate);
}
std::string SetDcdnDomainCSRCertificateRequest::getDomainName()const
{
return domainName_;
}
void SetDcdnDomainCSRCertificateRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
long SetDcdnDomainCSRCertificateRequest::getOwnerId()const
{
return ownerId_;
}
void SetDcdnDomainCSRCertificateRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

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/dcdn/model/SetDcdnDomainCSRCertificateResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dcdn;
using namespace AlibabaCloud::Dcdn::Model;
SetDcdnDomainCSRCertificateResult::SetDcdnDomainCSRCertificateResult() :
ServiceResult()
{}
SetDcdnDomainCSRCertificateResult::SetDcdnDomainCSRCertificateResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SetDcdnDomainCSRCertificateResult::~SetDcdnDomainCSRCertificateResult()
{}
void SetDcdnDomainCSRCertificateResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,62 @@
/*
* 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/dcdn/model/VerifyDcdnDomainOwnerRequest.h>
using AlibabaCloud::Dcdn::Model::VerifyDcdnDomainOwnerRequest;
VerifyDcdnDomainOwnerRequest::VerifyDcdnDomainOwnerRequest() :
RpcServiceRequest("dcdn", "2018-01-15", "VerifyDcdnDomainOwner")
{
setMethod(HttpRequest::Method::Post);
}
VerifyDcdnDomainOwnerRequest::~VerifyDcdnDomainOwnerRequest()
{}
std::string VerifyDcdnDomainOwnerRequest::getVerifyType()const
{
return verifyType_;
}
void VerifyDcdnDomainOwnerRequest::setVerifyType(const std::string& verifyType)
{
verifyType_ = verifyType;
setParameter("VerifyType", verifyType);
}
std::string VerifyDcdnDomainOwnerRequest::getDomainName()const
{
return domainName_;
}
void VerifyDcdnDomainOwnerRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
long VerifyDcdnDomainOwnerRequest::getOwnerId()const
{
return ownerId_;
}
void VerifyDcdnDomainOwnerRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}

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/dcdn/model/VerifyDcdnDomainOwnerResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Dcdn;
using namespace AlibabaCloud::Dcdn::Model;
VerifyDcdnDomainOwnerResult::VerifyDcdnDomainOwnerResult() :
ServiceResult()
{}
VerifyDcdnDomainOwnerResult::VerifyDcdnDomainOwnerResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
VerifyDcdnDomainOwnerResult::~VerifyDcdnDomainOwnerResult()
{}
void VerifyDcdnDomainOwnerResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Content"].isNull())
content_ = value["Content"].asString();
}
std::string VerifyDcdnDomainOwnerResult::getContent()const
{
return content_;
}