19#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_IAM_CLIENT_H
20#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_IAM_CLIENT_H
22#include "google/cloud/iam/admin/v1/iam_connection.h"
23#include "google/cloud/future.h"
24#include "google/cloud/iam_updater.h"
25#include "google/cloud/options.h"
26#include "google/cloud/polling_policy.h"
27#include "google/cloud/status_or.h"
28#include "google/cloud/version.h"
34GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
107 return a.connection_ == b.connection_;
188 google::iam::admin::v1::ListServiceAccountsRequest request,
250 google::iam::admin::v1::GetServiceAccountRequest
const& request,
285 std::string
const& name, std::string
const& account_id,
286 google::iam::admin::v1::ServiceAccount
const& service_account,
318 google::iam::admin::v1::CreateServiceAccountRequest
const& request,
350 google::iam::admin::v1::PatchServiceAccountRequest
const& request,
437 google::iam::admin::v1::DeleteServiceAccountRequest
const& request,
476 StatusOr<
google::iam::admin::v1::UndeleteServiceAccountResponse>
478 google::iam::admin::v1::UndeleteServiceAccountRequest
const& request,
516 google::iam::admin::v1::EnableServiceAccountRequest
const& request,
563 google::iam::admin::v1::DisableServiceAccountRequest
const& request,
598 StatusOr<
google::iam::admin::v1::ListServiceAccountKeysResponse>
600 std::string
const& name,
602 google::iam::admin::v1::ListServiceAccountKeysRequest::KeyType>
const&
635 StatusOr<
google::iam::admin::v1::ListServiceAccountKeysResponse>
637 google::iam::admin::v1::ListServiceAccountKeysRequest
const& request,
671 std::string
const& name,
672 google::iam::admin::v1::ServiceAccountPublicKeyType public_key_type,
704 google::iam::admin::v1::GetServiceAccountKeyRequest
const& request,
741 std::string
const& name,
742 google::iam::admin::v1::ServiceAccountPrivateKeyType private_key_type,
743 google::iam::admin::v1::ServiceAccountKeyAlgorithm key_algorithm,
775 google::iam::admin::v1::CreateServiceAccountKeyRequest
const& request,
812 google::iam::admin::v1::UploadServiceAccountKeyRequest
const& request,
873 google::iam::admin::v1::DeleteServiceAccountKeyRequest
const& request,
935 google::iam::admin::v1::DisableServiceAccountKeyRequest
const& request,
993 google::iam::admin::v1::EnableServiceAccountKeyRequest
const& request,
1122 std::string
const& resource,
google::iam::v1::Policy
const& policy,
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1146 IamUpdater
const& updater,
1230 std::string
const& resource, std::vector<std::string>
const& permissions,
1264 google::iam::v1::TestIamPermissionsRequest
const& request,
1306 std::string
const& full_resource_name,
Options opts
= {});
1348 google::iam::admin::v1::QueryGrantableRolesRequest request,
1452 google::iam::admin::v1::CreateRoleRequest
const& request,
1484 google::iam::admin::v1::UpdateRoleRequest
const& request,
1534 google::iam::admin::v1::DeleteRoleRequest
const& request,
1566 google::iam::admin::v1::UndeleteRoleRequest
const& request,
1609 google::iam::admin::v1::QueryTestablePermissionsRequest request,
1644 StatusOr<
google::iam::admin::v1::QueryAuditableServicesResponse>
1646 google::iam::admin::v1::QueryAuditableServicesRequest
const& request,
1684 google::iam::admin::v1::LintPolicyRequest
const& request,
1692GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
1693namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS;
Creates and manages Identity and Access Management (IAM) resources.
Definition: iam_client.h:90
StatusOr< google::iam::admin::v1::ServiceAccount > CreateServiceAccount(std::string const &name, std::string const &account_id, google::iam::admin::v1::ServiceAccount const &service_account, Options opts={})
Creates a ServiceAccount.
friend bool operator==(IAMClient const &a, IAMClient const &b)
Definition: iam_client.h:106
IAMClient & operator=(IAMClient const &)=default
StatusOr< google::iam::admin::v1::ServiceAccountKey > UploadServiceAccountKey(google::iam::admin::v1::UploadServiceAccountKeyRequest const &request, Options opts={})
Uploads the public key portion of a key pair that you manage, and associates the public key with a Se...
Status DisableServiceAccountKey(google::iam::admin::v1::DisableServiceAccountKeyRequest const &request, Options opts={})
Disable a ServiceAccountKey.
StatusOr< google::iam::v1::Policy > SetIamPolicy(std::string const &resource, IamUpdater const &updater, Options opts={})
Updates the IAM policy for resource using an optimistic concurrency control loop.
StreamRange< google::iam::admin::v1::Permission > QueryTestablePermissions(google::iam::admin::v1::QueryTestablePermissionsRequest request, Options opts={})
Lists every permission that you can test on a resource.
Status DeleteServiceAccount(std::string const &name, Options opts={})
Deletes a ServiceAccount.
StreamRange< google::iam::admin::v1::Role > QueryGrantableRoles(std::string const &full_resource_name, Options opts={})
Lists roles that can be granted on a Google Cloud resource.
StatusOr< google::iam::admin::v1::ListServiceAccountKeysResponse > ListServiceAccountKeys(std::string const &name, std::vector< google::iam::admin::v1::ListServiceAccountKeysRequest::KeyType > const &key_types, Options opts={})
Lists every ServiceAccountKey for a service account.
IAMClient(std::shared_ptr< IAMConnection > connection, Options opts={})
StatusOr< google::iam::v1::Policy > SetIamPolicy(std::string const &resource, google::iam::v1::Policy const &policy, Options opts={})
Sets the IAM policy that is attached to a ServiceAccount.
StatusOr< google::iam::admin::v1::Role > CreateRole(google::iam::admin::v1::CreateRoleRequest const &request, Options opts={})
Creates a new custom Role.
StatusOr< google::iam::admin::v1::ListServiceAccountKeysResponse > ListServiceAccountKeys(google::iam::admin::v1::ListServiceAccountKeysRequest const &request, Options opts={})
Lists every ServiceAccountKey for a service account.
friend bool operator!=(IAMClient const &a, IAMClient const &b)
Definition: iam_client.h:109
StatusOr< google::iam::admin::v1::ServiceAccountKey > GetServiceAccountKey(std::string const &name, google::iam::admin::v1::ServiceAccountPublicKeyType public_key_type, Options opts={})
Gets a ServiceAccountKey.
Status EnableServiceAccountKey(google::iam::admin::v1::EnableServiceAccountKeyRequest const &request, Options opts={})
Enable a ServiceAccountKey.
StatusOr< google::iam::admin::v1::QueryAuditableServicesResponse > QueryAuditableServices(google::iam::admin::v1::QueryAuditableServicesRequest const &request, Options opts={})
Returns a list of services that allow you to opt into audit logs that are not generated by default.
StatusOr< google::iam::v1::Policy > SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &request, Options opts={})
Sets the IAM policy that is attached to a ServiceAccount.
Status DisableServiceAccountKey(std::string const &name, Options opts={})
Disable a ServiceAccountKey.
StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions(std::string const &resource, std::vector< std::string > const &permissions, Options opts={})
Tests whether the caller has the specified permissions on a ServiceAccount.
Status DeleteServiceAccountKey(std::string const &name, Options opts={})
Deletes a ServiceAccountKey.
StatusOr< google::iam::admin::v1::ServiceAccountKey > CreateServiceAccountKey(google::iam::admin::v1::CreateServiceAccountKeyRequest const &request, Options opts={})
Creates a ServiceAccountKey.
StreamRange< google::iam::admin::v1::ServiceAccount > ListServiceAccounts(google::iam::admin::v1::ListServiceAccountsRequest request, Options opts={})
Lists every ServiceAccount that belongs to a specific project.
StatusOr< google::iam::admin::v1::Role > GetRole(google::iam::admin::v1::GetRoleRequest const &request, Options opts={})
Gets the definition of a Role.
StatusOr< google::iam::admin::v1::ServiceAccountKey > CreateServiceAccountKey(std::string const &name, google::iam::admin::v1::ServiceAccountPrivateKeyType private_key_type, google::iam::admin::v1::ServiceAccountKeyAlgorithm key_algorithm, Options opts={})
Creates a ServiceAccountKey.
StatusOr< google::iam::admin::v1::Role > DeleteRole(google::iam::admin::v1::DeleteRoleRequest const &request, Options opts={})
Deletes a custom Role.
StreamRange< google::iam::admin::v1::Role > QueryGrantableRoles(google::iam::admin::v1::QueryGrantableRolesRequest request, Options opts={})
Lists roles that can be granted on a Google Cloud resource.
StatusOr< google::iam::admin::v1::ServiceAccount > GetServiceAccount(std::string const &name, Options opts={})
Gets a ServiceAccount.
StatusOr< google::iam::admin::v1::Role > UpdateRole(google::iam::admin::v1::UpdateRoleRequest const &request, Options opts={})
Updates the definition of a custom Role.
StatusOr< google::iam::admin::v1::LintPolicyResponse > LintPolicy(google::iam::admin::v1::LintPolicyRequest const &request, Options opts={})
Lints, or validates, an IAM policy.
StatusOr< google::iam::admin::v1::ServiceAccount > GetServiceAccount(google::iam::admin::v1::GetServiceAccountRequest const &request, Options opts={})
Gets a ServiceAccount.
StatusOr< google::iam::admin::v1::ServiceAccount > CreateServiceAccount(google::iam::admin::v1::CreateServiceAccountRequest const &request, Options opts={})
Creates a ServiceAccount.
StatusOr< google::iam::v1::Policy > GetIamPolicy(std::string const &resource, Options opts={})
Gets the IAM policy that is attached to a ServiceAccount.
Status EnableServiceAccount(google::iam::admin::v1::EnableServiceAccountRequest const &request, Options opts={})
Enables a ServiceAccount that was disabled by DisableServiceAccount.
IAMClient(IAMClient const &)=default
StatusOr< google::iam::admin::v1::UndeleteServiceAccountResponse > UndeleteServiceAccount(google::iam::admin::v1::UndeleteServiceAccountRequest const &request, Options opts={})
Restores a deleted ServiceAccount.
StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &request, Options opts={})
Tests whether the caller has the specified permissions on a ServiceAccount.
Status EnableServiceAccountKey(std::string const &name, Options opts={})
Enable a ServiceAccountKey.
StreamRange< google::iam::admin::v1::Role > ListRoles(google::iam::admin::v1::ListRolesRequest request, Options opts={})
Lists every predefined Role that IAM supports, or every custom role that is defined for an organizati...
IAMClient(IAMClient &&)=default
StatusOr< google::iam::admin::v1::ServiceAccountKey > GetServiceAccountKey(google::iam::admin::v1::GetServiceAccountKeyRequest const &request, Options opts={})
Gets a ServiceAccountKey.
StatusOr< google::iam::v1::Policy > GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &request, Options opts={})
Gets the IAM policy that is attached to a ServiceAccount.
Status DisableServiceAccount(google::iam::admin::v1::DisableServiceAccountRequest const &request, Options opts={})
Disables a ServiceAccount immediately.
StreamRange< google::iam::admin::v1::ServiceAccount > ListServiceAccounts(std::string const &name, Options opts={})
Lists every ServiceAccount that belongs to a specific project.
IAMClient & operator=(IAMClient &&)=default
StatusOr< google::iam::admin::v1::Role > UndeleteRole(google::iam::admin::v1::UndeleteRoleRequest const &request, Options opts={})
Undeletes a custom Role.
StatusOr< google::iam::admin::v1::ServiceAccount > PatchServiceAccount(google::iam::admin::v1::PatchServiceAccountRequest const &request, Options opts={})
Patches a ServiceAccount.
Status DeleteServiceAccountKey(google::iam::admin::v1::DeleteServiceAccountKeyRequest const &request, Options opts={})
Deletes a ServiceAccountKey.
Status DeleteServiceAccount(google::iam::admin::v1::DeleteServiceAccountRequest const &request, Options opts={})
Deletes a ServiceAccount.
The IAMConnection object for IAMClient.
Definition: iam_connection.h:60
Definition: iam_client.h:33