Supported bind idp user api.

This commit is contained in:
sdk-team
2025-11-11 14:03:33 +00:00
parent 322f1ef667
commit 5048e01469
16 changed files with 875 additions and 1 deletions

View File

@@ -303,6 +303,42 @@ EiamClient::AuthorizeApplicationToUsersOutcomeCallable EiamClient::authorizeAppl
return task->get_future();
}
EiamClient::BindUserAuthnSourceMappingOutcome EiamClient::bindUserAuthnSourceMapping(const BindUserAuthnSourceMappingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return BindUserAuthnSourceMappingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return BindUserAuthnSourceMappingOutcome(BindUserAuthnSourceMappingResult(outcome.result()));
else
return BindUserAuthnSourceMappingOutcome(outcome.error());
}
void EiamClient::bindUserAuthnSourceMappingAsync(const BindUserAuthnSourceMappingRequest& request, const BindUserAuthnSourceMappingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, bindUserAuthnSourceMapping(request), context);
};
asyncExecute(new Runnable(fn));
}
EiamClient::BindUserAuthnSourceMappingOutcomeCallable EiamClient::bindUserAuthnSourceMappingCallable(const BindUserAuthnSourceMappingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<BindUserAuthnSourceMappingOutcome()>>(
[this, request]()
{
return this->bindUserAuthnSourceMapping(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EiamClient::CreateApplicationOutcome EiamClient::createApplication(const CreateApplicationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -5271,6 +5307,42 @@ EiamClient::ListSynchronizationJobsOutcomeCallable EiamClient::listSynchronizati
return task->get_future();
}
EiamClient::ListUserAuthnSourceMappingsOutcome EiamClient::listUserAuthnSourceMappings(const ListUserAuthnSourceMappingsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListUserAuthnSourceMappingsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListUserAuthnSourceMappingsOutcome(ListUserAuthnSourceMappingsResult(outcome.result()));
else
return ListUserAuthnSourceMappingsOutcome(outcome.error());
}
void EiamClient::listUserAuthnSourceMappingsAsync(const ListUserAuthnSourceMappingsRequest& request, const ListUserAuthnSourceMappingsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listUserAuthnSourceMappings(request), context);
};
asyncExecute(new Runnable(fn));
}
EiamClient::ListUserAuthnSourceMappingsOutcomeCallable EiamClient::listUserAuthnSourceMappingsCallable(const ListUserAuthnSourceMappingsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListUserAuthnSourceMappingsOutcome()>>(
[this, request]()
{
return this->listUserAuthnSourceMappings(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EiamClient::ListUsersOutcome EiamClient::listUsers(const ListUsersRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -6243,6 +6315,42 @@ EiamClient::SetUserPrimaryOrganizationalUnitOutcomeCallable EiamClient::setUserP
return task->get_future();
}
EiamClient::UnbindUserAuthnSourceMappingOutcome EiamClient::unbindUserAuthnSourceMapping(const UnbindUserAuthnSourceMappingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UnbindUserAuthnSourceMappingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UnbindUserAuthnSourceMappingOutcome(UnbindUserAuthnSourceMappingResult(outcome.result()));
else
return UnbindUserAuthnSourceMappingOutcome(outcome.error());
}
void EiamClient::unbindUserAuthnSourceMappingAsync(const UnbindUserAuthnSourceMappingRequest& request, const UnbindUserAuthnSourceMappingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, unbindUserAuthnSourceMapping(request), context);
};
asyncExecute(new Runnable(fn));
}
EiamClient::UnbindUserAuthnSourceMappingOutcomeCallable EiamClient::unbindUserAuthnSourceMappingCallable(const UnbindUserAuthnSourceMappingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UnbindUserAuthnSourceMappingOutcome()>>(
[this, request]()
{
return this->unbindUserAuthnSourceMapping(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EiamClient::UnlockUserOutcome EiamClient::unlockUser(const UnlockUserRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

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.
*/
#include <alibabacloud/eiam/model/BindUserAuthnSourceMappingRequest.h>
using AlibabaCloud::Eiam::Model::BindUserAuthnSourceMappingRequest;
BindUserAuthnSourceMappingRequest::BindUserAuthnSourceMappingRequest()
: RpcServiceRequest("eiam", "2021-12-01", "BindUserAuthnSourceMapping") {
setMethod(HttpRequest::Method::Post);
}
BindUserAuthnSourceMappingRequest::~BindUserAuthnSourceMappingRequest() {}
std::string BindUserAuthnSourceMappingRequest::getUserId() const {
return userId_;
}
void BindUserAuthnSourceMappingRequest::setUserId(const std::string &userId) {
userId_ = userId;
setParameter(std::string("UserId"), userId);
}
std::string BindUserAuthnSourceMappingRequest::getIdentityProviderId() const {
return identityProviderId_;
}
void BindUserAuthnSourceMappingRequest::setIdentityProviderId(const std::string &identityProviderId) {
identityProviderId_ = identityProviderId;
setParameter(std::string("IdentityProviderId"), identityProviderId);
}
std::string BindUserAuthnSourceMappingRequest::getUserExternalId() const {
return userExternalId_;
}
void BindUserAuthnSourceMappingRequest::setUserExternalId(const std::string &userExternalId) {
userExternalId_ = userExternalId;
setParameter(std::string("UserExternalId"), userExternalId);
}
std::string BindUserAuthnSourceMappingRequest::getInstanceId() const {
return instanceId_;
}
void BindUserAuthnSourceMappingRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}

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

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/eiam/model/ListUserAuthnSourceMappingsRequest.h>
using AlibabaCloud::Eiam::Model::ListUserAuthnSourceMappingsRequest;
ListUserAuthnSourceMappingsRequest::ListUserAuthnSourceMappingsRequest()
: RpcServiceRequest("eiam", "2021-12-01", "ListUserAuthnSourceMappings") {
setMethod(HttpRequest::Method::Post);
}
ListUserAuthnSourceMappingsRequest::~ListUserAuthnSourceMappingsRequest() {}
std::string ListUserAuthnSourceMappingsRequest::getUserId() const {
return userId_;
}
void ListUserAuthnSourceMappingsRequest::setUserId(const std::string &userId) {
userId_ = userId;
setParameter(std::string("UserId"), userId);
}
std::string ListUserAuthnSourceMappingsRequest::getNextToken() const {
return nextToken_;
}
void ListUserAuthnSourceMappingsRequest::setNextToken(const std::string &nextToken) {
nextToken_ = nextToken;
setParameter(std::string("NextToken"), nextToken);
}
std::string ListUserAuthnSourceMappingsRequest::getIdentityProviderId() const {
return identityProviderId_;
}
void ListUserAuthnSourceMappingsRequest::setIdentityProviderId(const std::string &identityProviderId) {
identityProviderId_ = identityProviderId;
setParameter(std::string("IdentityProviderId"), identityProviderId);
}
std::string ListUserAuthnSourceMappingsRequest::getPreviousToken() const {
return previousToken_;
}
void ListUserAuthnSourceMappingsRequest::setPreviousToken(const std::string &previousToken) {
previousToken_ = previousToken;
setParameter(std::string("PreviousToken"), previousToken);
}
std::string ListUserAuthnSourceMappingsRequest::getUserExternalId() const {
return userExternalId_;
}
void ListUserAuthnSourceMappingsRequest::setUserExternalId(const std::string &userExternalId) {
userExternalId_ = userExternalId;
setParameter(std::string("UserExternalId"), userExternalId);
}
std::string ListUserAuthnSourceMappingsRequest::getInstanceId() const {
return instanceId_;
}
void ListUserAuthnSourceMappingsRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}
int ListUserAuthnSourceMappingsRequest::getMaxResults() const {
return maxResults_;
}
void ListUserAuthnSourceMappingsRequest::setMaxResults(int maxResults) {
maxResults_ = maxResults;
setParameter(std::string("MaxResults"), std::to_string(maxResults));
}

View File

@@ -0,0 +1,97 @@
/*
* 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/eiam/model/ListUserAuthnSourceMappingsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Eiam;
using namespace AlibabaCloud::Eiam::Model;
ListUserAuthnSourceMappingsResult::ListUserAuthnSourceMappingsResult() :
ServiceResult()
{}
ListUserAuthnSourceMappingsResult::ListUserAuthnSourceMappingsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListUserAuthnSourceMappingsResult::~ListUserAuthnSourceMappingsResult()
{}
void ListUserAuthnSourceMappingsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allUserAuthnSourceMappingsNode = value["UserAuthnSourceMappings"]["UserAuthnSourceMapping"];
for (auto valueUserAuthnSourceMappingsUserAuthnSourceMapping : allUserAuthnSourceMappingsNode)
{
UserAuthnSourceMapping userAuthnSourceMappingsObject;
if(!valueUserAuthnSourceMappingsUserAuthnSourceMapping["InstanceId"].isNull())
userAuthnSourceMappingsObject.instanceId = valueUserAuthnSourceMappingsUserAuthnSourceMapping["InstanceId"].asString();
if(!valueUserAuthnSourceMappingsUserAuthnSourceMapping["UserId"].isNull())
userAuthnSourceMappingsObject.userId = valueUserAuthnSourceMappingsUserAuthnSourceMapping["UserId"].asString();
if(!valueUserAuthnSourceMappingsUserAuthnSourceMapping["UserExternalId"].isNull())
userAuthnSourceMappingsObject.userExternalId = valueUserAuthnSourceMappingsUserAuthnSourceMapping["UserExternalId"].asString();
if(!valueUserAuthnSourceMappingsUserAuthnSourceMapping["AuthnSourceType"].isNull())
userAuthnSourceMappingsObject.authnSourceType = valueUserAuthnSourceMappingsUserAuthnSourceMapping["AuthnSourceType"].asString();
if(!valueUserAuthnSourceMappingsUserAuthnSourceMapping["IdentityProviderId"].isNull())
userAuthnSourceMappingsObject.identityProviderId = valueUserAuthnSourceMappingsUserAuthnSourceMapping["IdentityProviderId"].asString();
if(!valueUserAuthnSourceMappingsUserAuthnSourceMapping["CreateTime"].isNull())
userAuthnSourceMappingsObject.createTime = std::stol(valueUserAuthnSourceMappingsUserAuthnSourceMapping["CreateTime"].asString());
if(!valueUserAuthnSourceMappingsUserAuthnSourceMapping["UpdateTime"].isNull())
userAuthnSourceMappingsObject.updateTime = std::stol(valueUserAuthnSourceMappingsUserAuthnSourceMapping["UpdateTime"].asString());
userAuthnSourceMappings_.push_back(userAuthnSourceMappingsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stoi(value["TotalCount"].asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
if(!value["PreviousToken"].isNull())
previousToken_ = value["PreviousToken"].asString();
if(!value["MaxResults"].isNull())
maxResults_ = std::stoi(value["MaxResults"].asString());
}
int ListUserAuthnSourceMappingsResult::getTotalCount()const
{
return totalCount_;
}
std::string ListUserAuthnSourceMappingsResult::getPreviousToken()const
{
return previousToken_;
}
std::string ListUserAuthnSourceMappingsResult::getNextToken()const
{
return nextToken_;
}
std::vector<ListUserAuthnSourceMappingsResult::UserAuthnSourceMapping> ListUserAuthnSourceMappingsResult::getUserAuthnSourceMappings()const
{
return userAuthnSourceMappings_;
}
int ListUserAuthnSourceMappingsResult::getMaxResults()const
{
return maxResults_;
}

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.
*/
#include <alibabacloud/eiam/model/UnbindUserAuthnSourceMappingRequest.h>
using AlibabaCloud::Eiam::Model::UnbindUserAuthnSourceMappingRequest;
UnbindUserAuthnSourceMappingRequest::UnbindUserAuthnSourceMappingRequest()
: RpcServiceRequest("eiam", "2021-12-01", "UnbindUserAuthnSourceMapping") {
setMethod(HttpRequest::Method::Post);
}
UnbindUserAuthnSourceMappingRequest::~UnbindUserAuthnSourceMappingRequest() {}
std::string UnbindUserAuthnSourceMappingRequest::getUserId() const {
return userId_;
}
void UnbindUserAuthnSourceMappingRequest::setUserId(const std::string &userId) {
userId_ = userId;
setParameter(std::string("UserId"), userId);
}
std::string UnbindUserAuthnSourceMappingRequest::getIdentityProviderId() const {
return identityProviderId_;
}
void UnbindUserAuthnSourceMappingRequest::setIdentityProviderId(const std::string &identityProviderId) {
identityProviderId_ = identityProviderId;
setParameter(std::string("IdentityProviderId"), identityProviderId);
}
std::string UnbindUserAuthnSourceMappingRequest::getUserExternalId() const {
return userExternalId_;
}
void UnbindUserAuthnSourceMappingRequest::setUserExternalId(const std::string &userExternalId) {
userExternalId_ = userExternalId;
setParameter(std::string("UserExternalId"), userExternalId);
}
std::string UnbindUserAuthnSourceMappingRequest::getInstanceId() const {
return instanceId_;
}
void UnbindUserAuthnSourceMappingRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}

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