feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,260 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/sso/SSOErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/sso/model/GetRoleCredentialsResult.h>
#include <aws/sso/model/ListAccountRolesResult.h>
#include <aws/sso/model/ListAccountsResult.h>
#include <aws/core/NoResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace SSO
{
namespace Model
{
class GetRoleCredentialsRequest;
class ListAccountRolesRequest;
class ListAccountsRequest;
class LogoutRequest;
typedef Aws::Utils::Outcome<GetRoleCredentialsResult, SSOError> GetRoleCredentialsOutcome;
typedef Aws::Utils::Outcome<ListAccountRolesResult, SSOError> ListAccountRolesOutcome;
typedef Aws::Utils::Outcome<ListAccountsResult, SSOError> ListAccountsOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, SSOError> LogoutOutcome;
typedef std::future<GetRoleCredentialsOutcome> GetRoleCredentialsOutcomeCallable;
typedef std::future<ListAccountRolesOutcome> ListAccountRolesOutcomeCallable;
typedef std::future<ListAccountsOutcome> ListAccountsOutcomeCallable;
typedef std::future<LogoutOutcome> LogoutOutcomeCallable;
} // namespace Model
class SSOClient;
typedef std::function<void(const SSOClient*, const Model::GetRoleCredentialsRequest&, const Model::GetRoleCredentialsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetRoleCredentialsResponseReceivedHandler;
typedef std::function<void(const SSOClient*, const Model::ListAccountRolesRequest&, const Model::ListAccountRolesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListAccountRolesResponseReceivedHandler;
typedef std::function<void(const SSOClient*, const Model::ListAccountsRequest&, const Model::ListAccountsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListAccountsResponseReceivedHandler;
typedef std::function<void(const SSOClient*, const Model::LogoutRequest&, const Model::LogoutOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > LogoutResponseReceivedHandler;
/**
* <p>AWS Single Sign-On Portal is a web service that makes it easy for you to
* assign user access to AWS SSO resources such as the user portal. Users can get
* AWS account applications and roles assigned to them and get federated into the
* application.</p> <p>For general information about AWS SSO, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What
* is AWS Single Sign-On?</a> in the <i>AWS SSO User Guide</i>.</p> <p>This API
* reference guide describes the AWS SSO Portal operations that you can call
* programatically and includes detailed information on data types and errors.</p>
* <p>AWS provides SDKs that consist of libraries and sample code for
* various programming languages and platforms, such as Java, Ruby, .Net, iOS, or
* Android. The SDKs provide a convenient way to create programmatic access to AWS
* SSO and other AWS services. For more information about the AWS SDKs, including
* how to download and install them, see <a
* href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
*
*/
class AWS_SSO_API SSOClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SSOClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SSOClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
SSOClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~SSOClient();
/**
* <p>Returns the STS short-term credentials for a given role name that is assigned
* to the user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials">AWS
* API Reference</a></p>
*/
virtual Model::GetRoleCredentialsOutcome GetRoleCredentials(const Model::GetRoleCredentialsRequest& request) const;
/**
* <p>Returns the STS short-term credentials for a given role name that is assigned
* to the user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetRoleCredentialsOutcomeCallable GetRoleCredentialsCallable(const Model::GetRoleCredentialsRequest& request) const;
/**
* <p>Returns the STS short-term credentials for a given role name that is assigned
* to the user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetRoleCredentialsAsync(const Model::GetRoleCredentialsRequest& request, const GetRoleCredentialsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists all roles that are assigned to the user for a given AWS
* account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles">AWS
* API Reference</a></p>
*/
virtual Model::ListAccountRolesOutcome ListAccountRoles(const Model::ListAccountRolesRequest& request) const;
/**
* <p>Lists all roles that are assigned to the user for a given AWS
* account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListAccountRolesOutcomeCallable ListAccountRolesCallable(const Model::ListAccountRolesRequest& request) const;
/**
* <p>Lists all roles that are assigned to the user for a given AWS
* account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListAccountRolesAsync(const Model::ListAccountRolesRequest& request, const ListAccountRolesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists all AWS accounts assigned to the user. These AWS accounts are assigned
* by the administrator of the account. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers">Assign
* User Access</a> in the <i>AWS SSO User Guide</i>. This operation returns a
* paginated response.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts">AWS
* API Reference</a></p>
*/
virtual Model::ListAccountsOutcome ListAccounts(const Model::ListAccountsRequest& request) const;
/**
* <p>Lists all AWS accounts assigned to the user. These AWS accounts are assigned
* by the administrator of the account. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers">Assign
* User Access</a> in the <i>AWS SSO User Guide</i>. This operation returns a
* paginated response.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListAccountsOutcomeCallable ListAccountsCallable(const Model::ListAccountsRequest& request) const;
/**
* <p>Lists all AWS accounts assigned to the user. These AWS accounts are assigned
* by the administrator of the account. For more information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers">Assign
* User Access</a> in the <i>AWS SSO User Guide</i>. This operation returns a
* paginated response.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListAccountsAsync(const Model::ListAccountsRequest& request, const ListAccountsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Removes the client- and server-side session that is associated with the
* user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout">AWS API
* Reference</a></p>
*/
virtual Model::LogoutOutcome Logout(const Model::LogoutRequest& request) const;
/**
* <p>Removes the client- and server-side session that is associated with the
* user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout">AWS API
* Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::LogoutOutcomeCallable LogoutCallable(const Model::LogoutRequest& request) const;
/**
* <p>Removes the client- and server-side session that is associated with the
* user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout">AWS API
* Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void LogoutAsync(const Model::LogoutRequest& request, const LogoutResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void GetRoleCredentialsAsyncHelper(const Model::GetRoleCredentialsRequest& request, const GetRoleCredentialsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListAccountRolesAsyncHelper(const Model::ListAccountRolesRequest& request, const ListAccountRolesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListAccountsAsyncHelper(const Model::ListAccountsRequest& request, const ListAccountsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void LogoutAsyncHelper(const Model::LogoutRequest& request, const LogoutResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
};
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SSO
{
namespace SSOEndpoint
{
AWS_SSO_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace SSOEndpoint
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_SSO_API SSOErrorMarshaller : public Aws::Client::JsonErrorMarshaller
{
public:
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override;
};
} // namespace Client
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/core/client/AWSError.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/sso/SSO_EXPORTS.h>
namespace Aws
{
namespace SSO
{
enum class SSOErrors
{
//From Core//
//////////////////////////////////////////////////////////////////////////////////////////
INCOMPLETE_SIGNATURE = 0,
INTERNAL_FAILURE = 1,
INVALID_ACTION = 2,
INVALID_CLIENT_TOKEN_ID = 3,
INVALID_PARAMETER_COMBINATION = 4,
INVALID_QUERY_PARAMETER = 5,
INVALID_PARAMETER_VALUE = 6,
MISSING_ACTION = 7, // SDK should never allow
MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
MISSING_PARAMETER = 9, // SDK should never allow
OPT_IN_REQUIRED = 10,
REQUEST_EXPIRED = 11,
SERVICE_UNAVAILABLE = 12,
THROTTLING = 13,
VALIDATION = 14,
ACCESS_DENIED = 15,
RESOURCE_NOT_FOUND = 16,
UNRECOGNIZED_CLIENT = 17,
MALFORMED_QUERY_STRING = 18,
SLOW_DOWN = 19,
REQUEST_TIME_TOO_SKEWED = 20,
INVALID_SIGNATURE = 21,
SIGNATURE_DOES_NOT_MATCH = 22,
INVALID_ACCESS_KEY_ID = 23,
REQUEST_TIMEOUT = 24,
NETWORK_CONNECTION = 99,
UNKNOWN = 100,
///////////////////////////////////////////////////////////////////////////////////////////
INVALID_REQUEST= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
TOO_MANY_REQUESTS,
UNAUTHORIZED
};
class AWS_SSO_API SSOError : public Aws::Client::AWSError<SSOErrors>
{
public:
SSOError() {}
SSOError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<SSOErrors>(rhs) {}
SSOError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<SSOErrors>(rhs) {}
SSOError(const Aws::Client::AWSError<SSOErrors>& rhs) : Aws::Client::AWSError<SSOErrors>(rhs) {}
SSOError(Aws::Client::AWSError<SSOErrors>&& rhs) : Aws::Client::AWSError<SSOErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace SSOErrorMapper
{
AWS_SSO_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace SSO
{
class AWS_SSO_API SSORequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~SSORequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_1 ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2019-06-10"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,29 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_SSO_EXPORTS
#define AWS_SSO_API __declspec(dllexport)
#else
#define AWS_SSO_API __declspec(dllimport)
#endif /* AWS_SSO_EXPORTS */
#else
#define AWS_SSO_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_SSO_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,176 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSO
{
namespace Model
{
/**
* <p>Provides information about your AWS account.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/AccountInfo">AWS API
* Reference</a></p>
*/
class AWS_SSO_API AccountInfo
{
public:
AccountInfo();
AccountInfo(Aws::Utils::Json::JsonView jsonValue);
AccountInfo& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
*/
inline const Aws::String& GetAccountId() const{ return m_accountId; }
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
*/
inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
*/
inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
*/
inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
*/
inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
*/
inline AccountInfo& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
*/
inline AccountInfo& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
*/
inline AccountInfo& WithAccountId(const char* value) { SetAccountId(value); return *this;}
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
*/
inline const Aws::String& GetAccountName() const{ return m_accountName; }
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
*/
inline bool AccountNameHasBeenSet() const { return m_accountNameHasBeenSet; }
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
*/
inline void SetAccountName(const Aws::String& value) { m_accountNameHasBeenSet = true; m_accountName = value; }
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
*/
inline void SetAccountName(Aws::String&& value) { m_accountNameHasBeenSet = true; m_accountName = std::move(value); }
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
*/
inline void SetAccountName(const char* value) { m_accountNameHasBeenSet = true; m_accountName.assign(value); }
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
*/
inline AccountInfo& WithAccountName(const Aws::String& value) { SetAccountName(value); return *this;}
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
*/
inline AccountInfo& WithAccountName(Aws::String&& value) { SetAccountName(std::move(value)); return *this;}
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
*/
inline AccountInfo& WithAccountName(const char* value) { SetAccountName(value); return *this;}
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
*/
inline const Aws::String& GetEmailAddress() const{ return m_emailAddress; }
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
*/
inline bool EmailAddressHasBeenSet() const { return m_emailAddressHasBeenSet; }
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
*/
inline void SetEmailAddress(const Aws::String& value) { m_emailAddressHasBeenSet = true; m_emailAddress = value; }
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
*/
inline void SetEmailAddress(Aws::String&& value) { m_emailAddressHasBeenSet = true; m_emailAddress = std::move(value); }
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
*/
inline void SetEmailAddress(const char* value) { m_emailAddressHasBeenSet = true; m_emailAddress.assign(value); }
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
*/
inline AccountInfo& WithEmailAddress(const Aws::String& value) { SetEmailAddress(value); return *this;}
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
*/
inline AccountInfo& WithEmailAddress(Aws::String&& value) { SetEmailAddress(std::move(value)); return *this;}
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
*/
inline AccountInfo& WithEmailAddress(const char* value) { SetEmailAddress(value); return *this;}
private:
Aws::String m_accountId;
bool m_accountIdHasBeenSet;
Aws::String m_accountName;
bool m_accountNameHasBeenSet;
Aws::String m_emailAddress;
bool m_emailAddressHasBeenSet;
};
} // namespace Model
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,203 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/sso/SSORequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace SSO
{
namespace Model
{
/**
*/
class AWS_SSO_API GetRoleCredentialsRequest : public SSORequest
{
public:
GetRoleCredentialsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetRoleCredentials"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline const Aws::String& GetRoleName() const{ return m_roleName; }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline GetRoleCredentialsRequest& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;}
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline GetRoleCredentialsRequest& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;}
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline GetRoleCredentialsRequest& WithRoleName(const char* value) { SetRoleName(value); return *this;}
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline const Aws::String& GetAccountId() const{ return m_accountId; }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline GetRoleCredentialsRequest& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline GetRoleCredentialsRequest& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline GetRoleCredentialsRequest& WithAccountId(const char* value) { SetAccountId(value); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline const Aws::String& GetAccessToken() const{ return m_accessToken; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(const Aws::String& value) { m_accessTokenHasBeenSet = true; m_accessToken = value; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(Aws::String&& value) { m_accessTokenHasBeenSet = true; m_accessToken = std::move(value); }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(const char* value) { m_accessTokenHasBeenSet = true; m_accessToken.assign(value); }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline GetRoleCredentialsRequest& WithAccessToken(const Aws::String& value) { SetAccessToken(value); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline GetRoleCredentialsRequest& WithAccessToken(Aws::String&& value) { SetAccessToken(std::move(value)); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline GetRoleCredentialsRequest& WithAccessToken(const char* value) { SetAccessToken(value); return *this;}
private:
Aws::String m_roleName;
bool m_roleNameHasBeenSet;
Aws::String m_accountId;
bool m_accountIdHasBeenSet;
Aws::String m_accessToken;
bool m_accessTokenHasBeenSet;
};
} // namespace Model
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/sso/model/RoleCredentials.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SSO
{
namespace Model
{
class AWS_SSO_API GetRoleCredentialsResult
{
public:
GetRoleCredentialsResult();
GetRoleCredentialsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetRoleCredentialsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The credentials for the role that is assigned to the user.</p>
*/
inline const RoleCredentials& GetRoleCredentials() const{ return m_roleCredentials; }
/**
* <p>The credentials for the role that is assigned to the user.</p>
*/
inline void SetRoleCredentials(const RoleCredentials& value) { m_roleCredentials = value; }
/**
* <p>The credentials for the role that is assigned to the user.</p>
*/
inline void SetRoleCredentials(RoleCredentials&& value) { m_roleCredentials = std::move(value); }
/**
* <p>The credentials for the role that is assigned to the user.</p>
*/
inline GetRoleCredentialsResult& WithRoleCredentials(const RoleCredentials& value) { SetRoleCredentials(value); return *this;}
/**
* <p>The credentials for the role that is assigned to the user.</p>
*/
inline GetRoleCredentialsResult& WithRoleCredentials(RoleCredentials&& value) { SetRoleCredentials(std::move(value)); return *this;}
private:
RoleCredentials m_roleCredentials;
};
} // namespace Model
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,235 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/sso/SSORequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace SSO
{
namespace Model
{
/**
*/
class AWS_SSO_API ListAccountRolesRequest : public SSORequest
{
public:
ListAccountRolesRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListAccountRoles"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The page token from the previous response output when you request subsequent
* pages.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The page token from the previous response output when you request subsequent
* pages.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>The page token from the previous response output when you request subsequent
* pages.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>The page token from the previous response output when you request subsequent
* pages.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>The page token from the previous response output when you request subsequent
* pages.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>The page token from the previous response output when you request subsequent
* pages.</p>
*/
inline ListAccountRolesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The page token from the previous response output when you request subsequent
* pages.</p>
*/
inline ListAccountRolesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The page token from the previous response output when you request subsequent
* pages.</p>
*/
inline ListAccountRolesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>The number of items that clients can request per page.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The number of items that clients can request per page.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The number of items that clients can request per page.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The number of items that clients can request per page.</p>
*/
inline ListAccountRolesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline const Aws::String& GetAccessToken() const{ return m_accessToken; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(const Aws::String& value) { m_accessTokenHasBeenSet = true; m_accessToken = value; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(Aws::String&& value) { m_accessTokenHasBeenSet = true; m_accessToken = std::move(value); }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(const char* value) { m_accessTokenHasBeenSet = true; m_accessToken.assign(value); }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline ListAccountRolesRequest& WithAccessToken(const Aws::String& value) { SetAccessToken(value); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline ListAccountRolesRequest& WithAccessToken(Aws::String&& value) { SetAccessToken(std::move(value)); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline ListAccountRolesRequest& WithAccessToken(const char* value) { SetAccessToken(value); return *this;}
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline const Aws::String& GetAccountId() const{ return m_accountId; }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline ListAccountRolesRequest& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline ListAccountRolesRequest& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
*/
inline ListAccountRolesRequest& WithAccountId(const char* value) { SetAccountId(value); return *this;}
private:
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
Aws::String m_accessToken;
bool m_accessTokenHasBeenSet;
Aws::String m_accountId;
bool m_accountIdHasBeenSet;
};
} // namespace Model
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/sso/model/RoleInfo.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SSO
{
namespace Model
{
class AWS_SSO_API ListAccountRolesResult
{
public:
ListAccountRolesResult();
ListAccountRolesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListAccountRolesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline ListAccountRolesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline ListAccountRolesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline ListAccountRolesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>A paginated response with the list of roles and the next token if more
* results are available.</p>
*/
inline const Aws::Vector<RoleInfo>& GetRoleList() const{ return m_roleList; }
/**
* <p>A paginated response with the list of roles and the next token if more
* results are available.</p>
*/
inline void SetRoleList(const Aws::Vector<RoleInfo>& value) { m_roleList = value; }
/**
* <p>A paginated response with the list of roles and the next token if more
* results are available.</p>
*/
inline void SetRoleList(Aws::Vector<RoleInfo>&& value) { m_roleList = std::move(value); }
/**
* <p>A paginated response with the list of roles and the next token if more
* results are available.</p>
*/
inline ListAccountRolesResult& WithRoleList(const Aws::Vector<RoleInfo>& value) { SetRoleList(value); return *this;}
/**
* <p>A paginated response with the list of roles and the next token if more
* results are available.</p>
*/
inline ListAccountRolesResult& WithRoleList(Aws::Vector<RoleInfo>&& value) { SetRoleList(std::move(value)); return *this;}
/**
* <p>A paginated response with the list of roles and the next token if more
* results are available.</p>
*/
inline ListAccountRolesResult& AddRoleList(const RoleInfo& value) { m_roleList.push_back(value); return *this; }
/**
* <p>A paginated response with the list of roles and the next token if more
* results are available.</p>
*/
inline ListAccountRolesResult& AddRoleList(RoleInfo&& value) { m_roleList.push_back(std::move(value)); return *this; }
private:
Aws::String m_nextToken;
Aws::Vector<RoleInfo> m_roleList;
};
} // namespace Model
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,191 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/sso/SSORequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace SSO
{
namespace Model
{
/**
*/
class AWS_SSO_API ListAccountsRequest : public SSORequest
{
public:
ListAccountsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListAccounts"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the
* previous response output.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the
* previous response output.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the
* previous response output.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the
* previous response output.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the
* previous response output.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the
* previous response output.</p>
*/
inline ListAccountsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the
* previous response output.</p>
*/
inline ListAccountsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the
* previous response output.</p>
*/
inline ListAccountsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>This is the number of items clients can request per page.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>This is the number of items clients can request per page.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>This is the number of items clients can request per page.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>This is the number of items clients can request per page.</p>
*/
inline ListAccountsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline const Aws::String& GetAccessToken() const{ return m_accessToken; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(const Aws::String& value) { m_accessTokenHasBeenSet = true; m_accessToken = value; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(Aws::String&& value) { m_accessTokenHasBeenSet = true; m_accessToken = std::move(value); }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(const char* value) { m_accessTokenHasBeenSet = true; m_accessToken.assign(value); }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline ListAccountsRequest& WithAccessToken(const Aws::String& value) { SetAccessToken(value); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline ListAccountsRequest& WithAccessToken(Aws::String&& value) { SetAccessToken(std::move(value)); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline ListAccountsRequest& WithAccessToken(const char* value) { SetAccessToken(value); return *this;}
private:
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
Aws::String m_accessToken;
bool m_accessTokenHasBeenSet;
};
} // namespace Model
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/sso/model/AccountInfo.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SSO
{
namespace Model
{
class AWS_SSO_API ListAccountsResult
{
public:
ListAccountsResult();
ListAccountsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListAccountsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline ListAccountsResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline ListAccountsResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
*/
inline ListAccountsResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>A paginated response with the list of account information and the next token
* if more results are available.</p>
*/
inline const Aws::Vector<AccountInfo>& GetAccountList() const{ return m_accountList; }
/**
* <p>A paginated response with the list of account information and the next token
* if more results are available.</p>
*/
inline void SetAccountList(const Aws::Vector<AccountInfo>& value) { m_accountList = value; }
/**
* <p>A paginated response with the list of account information and the next token
* if more results are available.</p>
*/
inline void SetAccountList(Aws::Vector<AccountInfo>&& value) { m_accountList = std::move(value); }
/**
* <p>A paginated response with the list of account information and the next token
* if more results are available.</p>
*/
inline ListAccountsResult& WithAccountList(const Aws::Vector<AccountInfo>& value) { SetAccountList(value); return *this;}
/**
* <p>A paginated response with the list of account information and the next token
* if more results are available.</p>
*/
inline ListAccountsResult& WithAccountList(Aws::Vector<AccountInfo>&& value) { SetAccountList(std::move(value)); return *this;}
/**
* <p>A paginated response with the list of account information and the next token
* if more results are available.</p>
*/
inline ListAccountsResult& AddAccountList(const AccountInfo& value) { m_accountList.push_back(value); return *this; }
/**
* <p>A paginated response with the list of account information and the next token
* if more results are available.</p>
*/
inline ListAccountsResult& AddAccountList(AccountInfo&& value) { m_accountList.push_back(std::move(value)); return *this; }
private:
Aws::String m_nextToken;
Aws::Vector<AccountInfo> m_accountList;
};
} // namespace Model
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,109 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/sso/SSORequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SSO
{
namespace Model
{
/**
*/
class AWS_SSO_API LogoutRequest : public SSORequest
{
public:
LogoutRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "Logout"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline const Aws::String& GetAccessToken() const{ return m_accessToken; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(const Aws::String& value) { m_accessTokenHasBeenSet = true; m_accessToken = value; }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(Aws::String&& value) { m_accessTokenHasBeenSet = true; m_accessToken = std::move(value); }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline void SetAccessToken(const char* value) { m_accessTokenHasBeenSet = true; m_accessToken.assign(value); }
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline LogoutRequest& WithAccessToken(const Aws::String& value) { SetAccessToken(value); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline LogoutRequest& WithAccessToken(Aws::String&& value) { SetAccessToken(std::move(value)); return *this;}
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more
* information, see <a
* href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a>
* in the <i>AWS SSO OIDC API Reference Guide</i>.</p>
*/
inline LogoutRequest& WithAccessToken(const char* value) { SetAccessToken(value); return *this;}
private:
Aws::String m_accessToken;
bool m_accessTokenHasBeenSet;
};
} // namespace Model
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,281 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSO
{
namespace Model
{
/**
* <p>Provides information about the role credentials that are assigned to the
* user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/RoleCredentials">AWS
* API Reference</a></p>
*/
class AWS_SSO_API RoleCredentials
{
public:
RoleCredentials();
RoleCredentials(Aws::Utils::Json::JsonView jsonValue);
RoleCredentials& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The identifier used for the temporary security credentials. For more
* information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline const Aws::String& GetAccessKeyId() const{ return m_accessKeyId; }
/**
* <p>The identifier used for the temporary security credentials. For more
* information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline bool AccessKeyIdHasBeenSet() const { return m_accessKeyIdHasBeenSet; }
/**
* <p>The identifier used for the temporary security credentials. For more
* information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline void SetAccessKeyId(const Aws::String& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = value; }
/**
* <p>The identifier used for the temporary security credentials. For more
* information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline void SetAccessKeyId(Aws::String&& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = std::move(value); }
/**
* <p>The identifier used for the temporary security credentials. For more
* information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline void SetAccessKeyId(const char* value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId.assign(value); }
/**
* <p>The identifier used for the temporary security credentials. For more
* information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline RoleCredentials& WithAccessKeyId(const Aws::String& value) { SetAccessKeyId(value); return *this;}
/**
* <p>The identifier used for the temporary security credentials. For more
* information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline RoleCredentials& WithAccessKeyId(Aws::String&& value) { SetAccessKeyId(std::move(value)); return *this;}
/**
* <p>The identifier used for the temporary security credentials. For more
* information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline RoleCredentials& WithAccessKeyId(const char* value) { SetAccessKeyId(value); return *this;}
/**
* <p>The key that is used to sign the request. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline const Aws::String& GetSecretAccessKey() const{ return m_secretAccessKey; }
/**
* <p>The key that is used to sign the request. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline bool SecretAccessKeyHasBeenSet() const { return m_secretAccessKeyHasBeenSet; }
/**
* <p>The key that is used to sign the request. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline void SetSecretAccessKey(const Aws::String& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = value; }
/**
* <p>The key that is used to sign the request. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline void SetSecretAccessKey(Aws::String&& value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey = std::move(value); }
/**
* <p>The key that is used to sign the request. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline void SetSecretAccessKey(const char* value) { m_secretAccessKeyHasBeenSet = true; m_secretAccessKey.assign(value); }
/**
* <p>The key that is used to sign the request. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline RoleCredentials& WithSecretAccessKey(const Aws::String& value) { SetSecretAccessKey(value); return *this;}
/**
* <p>The key that is used to sign the request. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline RoleCredentials& WithSecretAccessKey(Aws::String&& value) { SetSecretAccessKey(std::move(value)); return *this;}
/**
* <p>The key that is used to sign the request. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline RoleCredentials& WithSecretAccessKey(const char* value) { SetSecretAccessKey(value); return *this;}
/**
* <p>The token used for temporary credentials. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline const Aws::String& GetSessionToken() const{ return m_sessionToken; }
/**
* <p>The token used for temporary credentials. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline bool SessionTokenHasBeenSet() const { return m_sessionTokenHasBeenSet; }
/**
* <p>The token used for temporary credentials. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline void SetSessionToken(const Aws::String& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = value; }
/**
* <p>The token used for temporary credentials. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline void SetSessionToken(Aws::String&& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = std::move(value); }
/**
* <p>The token used for temporary credentials. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline void SetSessionToken(const char* value) { m_sessionTokenHasBeenSet = true; m_sessionToken.assign(value); }
/**
* <p>The token used for temporary credentials. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline RoleCredentials& WithSessionToken(const Aws::String& value) { SetSessionToken(value); return *this;}
/**
* <p>The token used for temporary credentials. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline RoleCredentials& WithSessionToken(Aws::String&& value) { SetSessionToken(std::move(value)); return *this;}
/**
* <p>The token used for temporary credentials. For more information, see <a
* href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using
* Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
*/
inline RoleCredentials& WithSessionToken(const char* value) { SetSessionToken(value); return *this;}
/**
* <p>The date on which temporary security credentials expire.</p>
*/
inline long long GetExpiration() const{ return m_expiration; }
/**
* <p>The date on which temporary security credentials expire.</p>
*/
inline bool ExpirationHasBeenSet() const { return m_expirationHasBeenSet; }
/**
* <p>The date on which temporary security credentials expire.</p>
*/
inline void SetExpiration(long long value) { m_expirationHasBeenSet = true; m_expiration = value; }
/**
* <p>The date on which temporary security credentials expire.</p>
*/
inline RoleCredentials& WithExpiration(long long value) { SetExpiration(value); return *this;}
private:
Aws::String m_accessKeyId;
bool m_accessKeyIdHasBeenSet;
Aws::String m_secretAccessKey;
bool m_secretAccessKeyHasBeenSet;
Aws::String m_sessionToken;
bool m_sessionTokenHasBeenSet;
long long m_expiration;
bool m_expirationHasBeenSet;
};
} // namespace Model
} // namespace SSO
} // namespace Aws

View File

@@ -0,0 +1,133 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/sso/SSO_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SSO
{
namespace Model
{
/**
* <p>Provides information about the role that is assigned to the
* user.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/RoleInfo">AWS API
* Reference</a></p>
*/
class AWS_SSO_API RoleInfo
{
public:
RoleInfo();
RoleInfo(Aws::Utils::Json::JsonView jsonValue);
RoleInfo& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline const Aws::String& GetRoleName() const{ return m_roleName; }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); }
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline RoleInfo& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;}
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline RoleInfo& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;}
/**
* <p>The friendly name of the role that is assigned to the user.</p>
*/
inline RoleInfo& WithRoleName(const char* value) { SetRoleName(value); return *this;}
/**
* <p>The identifier of the AWS account assigned to the user.</p>
*/
inline const Aws::String& GetAccountId() const{ return m_accountId; }
/**
* <p>The identifier of the AWS account assigned to the user.</p>
*/
inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
/**
* <p>The identifier of the AWS account assigned to the user.</p>
*/
inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; }
/**
* <p>The identifier of the AWS account assigned to the user.</p>
*/
inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); }
/**
* <p>The identifier of the AWS account assigned to the user.</p>
*/
inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); }
/**
* <p>The identifier of the AWS account assigned to the user.</p>
*/
inline RoleInfo& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;}
/**
* <p>The identifier of the AWS account assigned to the user.</p>
*/
inline RoleInfo& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;}
/**
* <p>The identifier of the AWS account assigned to the user.</p>
*/
inline RoleInfo& WithAccountId(const char* value) { SetAccountId(value); return *this;}
private:
Aws::String m_roleName;
bool m_roleNameHasBeenSet;
Aws::String m_accountId;
bool m_accountIdHasBeenSet;
};
} // namespace Model
} // namespace SSO
} // namespace Aws